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: 143
Member Since:
January 28, 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:
6 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