|
08-21-2011, 01:10 AM
|
#1
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Selecting presets from within IPlug
I select a preset from within IPlug when it receives a MIDI Program Change. I have copied the code to do this from effSetProgram:
Code:
ModifyCurrentPreset();
RestorePreset(pMsg->mData1);
This worked fine in REAPER v3.78, but I have just discovered it doesn't work in REAPER v4.01. The plug-in parameters and GUI controls do update, but the selected preset in the list of presets doesn't change. This could be a REAPER bug, but then again, another plug-in I have (ComboSister) still works fine with Program Changes and presets.
Looking back at my code, I now wonder how the host would know the preset has changed in the first place. Any ideas?
|
|
|
08-21-2011, 02:10 AM
|
#2
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
i encountered similar problems when i implemented my preset handling in ES.
if you search in my zip file for InformHostOfProgramChange() you should be able to work out how I fixed it.
Code:
void IPlugVST::InformHostOfProgramChange()
{
mHostCallback(&mAEffect, audioMasterUpdateDisplay, 0, 0, 0, 0.0f);
}
void IPlugAU::InformHostOfProgramChange()
{
InformListeners(kAudioUnitProperty_PresentPreset, kAudioUnitScope_Global);
}
|
|
|
08-21-2011, 02:14 AM
|
#3
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Yeah, that must be it. Cheers, thanks a lot!
EDIT: I have found the original commit in your Git repository, and I have extracted the relevant code from it, and REAPER v4.01 now updates the preset selection. Yay!
Last edited by Tale; 08-21-2011 at 03:11 AM.
|
|
|
08-27-2011, 01:03 PM
|
#4
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
Quote:
Originally Posted by olilarkin
Code:
void IPlugAU::InformHostOfProgramChange()
{
InformListeners(kAudioUnitProperty_PresentPreset, kAudioUnitScope_Global);
}
|
This doesn't seem to work for me, at least not in REAPER and AU Lab. I have also tried kAudioUnitProperty_CurrentPreset, but to no avail.
|
|
|
08-27-2011, 01:09 PM
|
#5
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
me neither in those hosts. au lab seems to be very buggy anyway when it comes to aupresets. In Logic in doesn't work that well (sometimes doesn't update). In Garageband it seems ok.
oli
|
|
|
08-28-2011, 12:53 AM
|
#6
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
OK, thanks. Then I think will disable IPlugAU::InformHostOfProgramChange for now.
|
|
|
08-28-2011, 05:37 AM
|
#7
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
actually i just tried it in aulab and it works... only in reaper it doesn't work at all and in logic it doesn't always work reliably
|
|
|
09-02-2011, 10:16 AM
|
#8
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
also works fine in Studio One
oli
|
|
|
09-26-2011, 10:41 AM
|
#9
|
Human being with feelings
Join Date: Aug 2011
Posts: 89
|
I just call InformHostOfProgramChange() and for me it works fine in Renoise, doesn't do anything in Reaper and in Ableton Live 8 (all on Windows with a VST) it works but it releases your click, so if you're dragging a slider while it calls InformHostOfProgramChange() well you can't drag it anymore, which is pretty irritating.
Am I doing something wrong or is it IPlug or is it Ableton Live and Reaper that aren't doing it right?
|
|
|
09-28-2011, 12:33 PM
|
#10
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
Quote:
Originally Posted by A_SN
I just call InformHostOfProgramChange() and for me it works fine in Renoise, doesn't do anything in Reaper and in Ableton Live 8 (all on Windows with a VST) it works but it releases your click, so if you're dragging a slider while it calls InformHostOfProgramChange() well you can't drag it anymore, which is pretty irritating.
Am I doing something wrong or is it IPlug or is it Ableton Live and Reaper that aren't doing it right?
|
i think it is probably IPlug that is causing this behaviour, but personally, i wouldn't put preset recall on a slider anyway - i think it's better as forward/back buttons or a menu because it's not the kind of control that someone will "ride". In your case you could only call InformHostOfProgramChange() when the mouse is released.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:12 PM.
|