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
Step 3: Use the variables
No permission to create posts
December 27, 2014
11:16 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

In this simple examples, I will cook the raw data and use it in the processAudioFrame() function.

// --- first note how the enumerated UINT is tested
if(m_uMute == ON)
{
pOutputBuffer[0] = 0.0;
pOutputBuffer[1] = 0.0;
}
else // next, do the cooking and apply the control variable
{
float fVolume = pow(float(10.0), m_fVolume_dB/(float)20.0);
pOutputBuffer[0] = pInputBuffer[0]*fVolume;

// Mono-In, Stereo-Out (AUX Effect)
if(uNumInputChannels == 1 && uNumOutputChannels == 2)
pOutputBuffer[1] = pInputBuffer[0]*fVolume;

// Stereo-In, Stereo-Out (INSERT Effect)
if(uNumInputChannels == 2 && uNumOutputChannels == 2)
pOutputBuffer[1] = pInputBuffer[1]*fVolume;
}

NOTE: for your own practice, see the Volume-in-dB project and move the cooking function into userInterfaceChange() after declaring the cooked variable in your .h file; this is all described in detail in the FX book, Chapter 2.

Build and test the plug-in in your AU client of choice. Notice how the two controls are manifested in the simple default GUI.

Next Topic: editing the AU files for each new project

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

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