Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
assign saved preset to 2Statebutton
No permission to create posts
February 22, 2016
3:03 pm
Avatar
staiff
Guest
Guests

hello !
like said the title i would like to know if it's possible to assign a saved/created preset to a 2statebutton in GUI designer or assignsbuttons ?

Also parameter a "bypass" button. i saw an ON/OFF button. That's the same ?

newbie so explain with details...
thanks.

Staiff.

February 22, 2016
6:38 pm
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

It has already been covered in the Forum (the Forum Search tool works very well)

http://www.willpirkle.com/foru.....-controls/

If you want to implement your own bypass, then just use the 2-state switch; it has two states:

0 = SWITCH_OFF
1 = SWITCH_ON

Note that when setting up the 2-state switches you can default to OFF or ON as the first state.

- Will

February 22, 2016
11:09 pm
Avatar
staiff
Guest
Guests

hello !
for Bypassing: this code work:
"float Bypass = m_uBypass;
if (m_uBypass == ON);
m_fWetMix = 0.000000;"
but when i clic on "OFF" the sound don't return at initial state (wetmix = 50.00000)

and the slider controlling the wet/dry mix don't move when bypass in ON (still showing 50%

🙁 ...

February 23, 2016
12:20 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

1) I do not know why you are doing this:

float Bypass = m_uBypass;

2) there is no code to reset the mix to 50% when OFF

3) there is no sendUpdateGUI() to move the slider for both cases

4) this is not a good strategy for implementing plugin-side bypass (NOTE: there is a bypass button in RackAFX, and soft-bypass is ported to VST3 as well). Instead, you should do something like:

if(m_uBypass == SWITCH_ON)
{
/// just copy the input directly to the output
pOutputBuffer[0] = pInputBuffer[0];
etc...

return;
}

... reset of processAudioFrame( ) here.

- WP

February 23, 2016
1:34 am
Avatar
staiff
Guest
Guests

don't work = no bypass .
and when i just write:

if(m_uBypass == ON)
{
pOutputBuffer = pInputBuffer;}

the "ON" sound a "bip" (like an error sound) but i can put "OFF" and retreive all in place. if i keep the "[o]" after input & output it don't work.

EDIT: This code work (!!! :D):
if (m_uBypass == ON)
{
pOutputBuffer[0] = pInputBuffer[0];
pOutputBuffer[0] = pInputBuffer[1];
pOutputBuffer[1] = pInputBuffer[1];
pOutputBuffer[1] = pInputBuffer[0];
return TRUE;

}

thanks

February 23, 2016
2:15 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

First, this:

f(m_uBypass == ON)
{
pOutputBuffer = pInputBuffer;}

shows that you need to work on your C++ programming some more.

Next, the code is wrong:

pOutputBuffer[0] = pInputBuffer[0]; <- left output = left input
pOutputBuffer[0] = pInputBuffer[1]; <- left output = right input
pOutputBuffer[1] = pInputBuffer[1]; <- right output = right input
pOutputBuffer[1] = pInputBuffer[0]; mono
mono -> stereo
stereo -> stereo

Your code will crash if you use a mono WAV file for input, and will not work properly if using AUX mode with one input and two outputs. This is all documented in my FX (brown) book.

- WP

WP

February 23, 2016
7:25 pm
Avatar
staiff
Guest
Guests

correct ?:
"if (m_uBypass == ON)
{
pOutputBuffer[0] = pInputBuffer[0];
pOutputBuffer[1] = pInputBuffer[1];
pOutputBuffer[1] = pInputBuffer[0];

return TRUE;

}

m_fMeterOutput = pOutputBuffer[0]; pOutputBuffer[1];"

for the assigned button to preset: Help !

the concept: 4 presets (+factory). 5 buttons in GUI editor (off,1,2,3,4). Button off =factory, button 1 = preset_1, button 2 = Preset_2, etc. ...

GUI interface = when a button (2states or button ON/OFF ?) is pushed, other buttons are switched to "OFF". the button call assigned preset so.

when you swith button (1,2,3,4) you switch preset (1,2,3,4). when you switch "OFF" button = factory preset. but if you select a preset by the VST host preset scrolldown menu = the assigned button in GUI switch to "ON" also.

I don't how to do that. really. i read the brown book and saw the sendUpdateGUI (page 525 B.3) but nothing about i want to do.

Someone could explain me in detail how to do that ?

Thanks in advance.

staiff.

February 25, 2016
9:28 pm
Avatar
staiff
Guest
Guests

No answers ? Ok: Maybe it's too difficult for you; Maybe you don't anderstand what i mean/want. So: Example:

I took one of YOUR plugin (so you know how it was coded) = the dimension D style Chorus + custom GUI. Example by picture:
http://img11.hostingpics.net/pics/741510examplepresets.pngImage Enlarger
http://img11.hostingpics.net/p.....resets.png

My (future) plugin will do the same. An imitation of old vintage hardware without LCD screen, but presets selected by swith buttons instead.

In this case users can/could select presets by the scroll down menu - but inside the plugin too.

Do you understand what i want to build now ?
i learn C++, i try to understand/working on, but i don't find anything about this style of fonction (really, very well explain)
ERS did it !!!
http://emptyroomsystems.com/ERSDimD.jpg

So it's possible...

February 26, 2016
1:48 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

Here is a simple plugin with "factory presets" that are hard-coded into the plugin and accessed with a slider control. This is as simple as I can make it.

sendUpdateGUI( ) is exactly what you need to make the sliders update.

http://willpirkle.com/Download.....resets.zip

Note that these are hardcoded factory presets within the plugin and have nothing to do with the presets that you create using the Preset controls in RackAFX.

- Will

February 26, 2016
3:28 pm
Avatar
staiff
Guest
Guests

EDIT/Update at the end of message. I decided to not edit it and let it visible to show you i'm really stupid/newbie 😀

original reply:
Hello !
Thanks !
as i don't use presets slider but the 4 swith buttons i modified the text/code (and replace the number of "case" with my code numbers):
"switch (nControlIndex)
{
case 45: // preset_1
{
if (m_uPreset_1 == SWITCH_ON)
m_uPreset_2 = SWITCH_OFF;
m_uPreset_3 = SWITCH_OFF;
m_uPreset_4 = SWITCH_OFF;
m_uPresetOff = SWITCH_OFF;

// --- set variables
m_fRate_Hz = 5.000000; (just for test, to see the slider move)
m_fDepth = 50;
m_fWetMix = 100;

// --- update
sendUpdateGUI();

}
case 46: // preset_2
{

if (m_uPreset_2 == SWITCH_ON)
m_uPreset_1 = SWITCH_OFF;
m_uPreset_3 = SWITCH_OFF;
m_uPreset_4 = SWITCH_OFF;
m_uPresetOff = SWITCH_OFF;

// --- set variables
m_fRate_Hz = 0.250000;
m_fDepth = 100;
m_fWetMix = 100;

// --- update
sendUpdateGUI();

}
break;

}
// just update all
updateModules();

return true;
}"

Test: work 50%

i i switch button_1 = preset_1 work. But if i switch then to button_2: preset_2 don't load. but if i select factory preset using the Preset controls in RackAFX (to reset the preset settings), and after that select button_2= preset_2 work. after that, of course reselect button_1 don't work...

So i must find why presets don't switch preset_1/preset_2 - button_1/button_2 directly.

But the gui work (and prototype in load mode also, of course): buttons switch OFF/ON ( Button_1 switch Button_2 OFF and vice versa).

you may notice that i delete the "}
break;
}

default:
break;
}"
at the end cause it return a "building failed" if i let it 🙁

Update:
i just added "break;" at the end of each of "case settings":

case 45: // preset_1
"snip snip snip" (yeah ! Prove i read your book, LOL)
// --- update
sendUpdateGUI();

break;
}

case 46: // preset_2
"snip snip snip"
// --- update
sendUpdateGUI();
break;

}
break;

}
// just update all
updateModules();

return true;
}

always problem with "}break;} default:"... building failed.
But it work without that at this time so...

Thank you Will 😀

Now i have 4 presets (+1 factory/reset) to write. i have work to do ! 😉

February 26, 2016
5:56 pm
Avatar
staiff
Guest
Guests

It work !!!

thanks Will 🙂

I will do the same but with my own plugin now. 😉

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: W Pirkle
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Derek: 41

Peter: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 478

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 29

Topics: 479

Posts: 1870

Newest Members:

certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 140

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140