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
14.1 TremoloPanner fMonoIn
No permission to create posts
January 4, 2016
12:32 pm
Avatar
stonerichnau@gmail.com
New Member
Members
Forum Posts: 1
Member Since:
January 4, 2016
sp_UserOfflineSmall Offline

Hi

What is the meaning of fMonoIn variable? It doesn't seem to get used to produce output.

stone

January 4, 2016
8:18 pm
Avatar
W Pirkle
Admin
Forum Posts: 208
Member Since:
January 29, 2017
sp_UserOfflineSmall Offline

Hi Stone

Thanks for catching this! The Panner code, as it stands, is actually modulating the "Balance" when the input is a stereo signal - on a stereo input a pan control really is a balance control. The original plugin summed the inputs together when the input is stereo, then pans that signal. Some prefer modulating the balance as it preserves the stereo signal. But the book example is supposed to be a true panner. The corrected code is here:

// branch
if(m_uMode == Tremolo)
{
fGnL = calculateGainFactor(fYn);

// do MONO (Left) channel
pOutputBuffer[0] = pInputBuffer[0]*fGnL;
}
else // panner sums inputs
{
if(uNumInputChannels == 1)
fMonoIn = pInputBuffer[0];
else
fMonoIn = 0.5*(pInputBuffer[0] + pInputBuffer[1]);

calculatePannerGainFactor(fYn, &fGnL, &fGnR);

// do MONO (Left) channel
pOutputBuffer[0] = fMonoIn*fGnL;
}

// Mono-In, Stereo-Out (AUX Effect)
if(uNumInputChannels == 1 && uNumOutputChannels == 2)
pOutputBuffer[1] = fMonoIn*fGnR;; // split

// Stereo-In, Stereo-Out (INSERT Effect)
if(uNumInputChannels == 2 && uNumOutputChannels == 2)
{
// branch
if(m_uMode == Tremolo)
{
// do right channel, use same gain as left
pOutputBuffer[1] = pInputBuffer[1]*fGnL;
}
else
{
// do right channel, its value
pOutputBuffer[1] = fMonoIn*fGnR;
}
}

Thanks again!

Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 44

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

JimmyM: 29

EZB: 24

lppier: 23

Msaldaña: 18

Member Stats:

Guest Posters: 1

Members: 508

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 525

Posts: 2030

Newest Members:

strings4v, TheSmile, semihyavuzz, alfredLue, danioc, midnightskate3, Alia5, Shamal Sundar, Walker, Brad

Moderators: W Pirkle: 208

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 208