PDA

View Full Version : Preset problems


junioreq
07-20-2010, 01:06 PM
ok, i'm using this:


SimpleDelay::SimpleDelay(IPlugInstanceInfo instanceInfo): IPLUG_CTOR(kNumParams, 0, instanceInfo) {
TRACE;


and I have a preset like this:



MakePresetFromNamedParams("name", 10,
kthresh, 0.00,
kratio, -21.00,
ksidechain, 1,
kknee, 1.50,
kbypass, 250.00,
kattack, 0.00,
krelease, 0.00,
kmakeup, 2,
kpunkd, 1,
kpunkdswitch, 0.00
);


Its not showing up in the preset box though... So i changed the zero here to a 1 thinking that means how many presets, and it just crashes reaper:


SimpleDelay::SimpleDelay(IPlugInstanceInfo instanceInfo): IPLUG_CTOR(kNumParams, 0, instanceInfo) {
TRACE;


Its only showing one preset, and not the one i coded in??

~Rob.

junioreq
07-20-2010, 01:19 PM
If I change that 0 to a 6 like the example project, I get this:

http://stash.reaper.fm/oldsb/958216/6error.PNG

junioreq
07-20-2010, 01:28 PM
Heh, solved it, I keep this stuff up here, in case anyone else has a prob. The problem was here:


MakePresetFromNamedParams("name", 11,
kthresh, 0.00,
kratio, -21.00,
ksidechain, 1,
kknee, 1.50,
kbypass, 250.00,
kattack, 0.00,
krelease, 0.00,
kmakeup, 2,
kpunkd, 1,
kpunkdswitch, 0.00,
koutgain,1.0
);



Looks like that "11" means what number the program was. Obviously at the top if I said there were 6 presets, its gonna throw an error cause at the bottom I said that the preset is preset 11. Chaging it to a "1", meaning its the first preset fixed :)

~Rob.

junioreq
07-20-2010, 01:56 PM
hmm its working now, name is showing up, but the knobs and stuff are not coming out with the values aka no preset, not updating.

The preset code itself is correct. in the right enum order..

MakePresetFromNamedParams("Rob", 1,
kattack, 20.51,
krelease, 487.98,
kknee, 2,
kthresh, -65.78,
kratio, 4,
kpunkdswitch, 1,
kpunkd, 6.87,
kmakeup, -12.87,
kbypass, 1,
ksidechain, 0);

MakeDefaultPreset("-", 5);

~Rob.

Tale
07-20-2010, 04:03 PM
hmm its working now, name is showing up, but the knobs and stuff are not coming out with the values aka no preset, not updating.

The preset code itself is correct. in the right enum order..
I don't think the order matters here.

I think it should be 10 not 1 after all, because this defines the number of parameters you are making a preset from, i.e.:

MakePresetFromNamedParams("Rob", 10, ...

didomite
05-05-2013, 03:34 PM
I had the same issue. It was because I was sending in a preset value that was not of the type I had defined.

GetParam(kSomeParam)->InitDouble("kSomeParam", 0, 0., 1, 1., "");

I defined that as a double, but then during my MakePresetFromNamedParams,

MakePresetFromNamedParams("61 params in my program", 61,

kboolParam, true,

kSomeParam, 7,
...
...

kSomeParams was Init'd as a Double, yet in that contructor I had set kSomeParam to 7 instead of "7."