Mono to Stereo Operation | Using RackAFX/RackAFX Projects | Forum


Please consider registering

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 Topic RSS sp_TopicIcon
Mono to Stereo Operation
New Member
March 10, 2016 - 5:54 pm
Member Since: March 10, 2016
Forum Posts: 2
sp_UserOfflineSmall Offline

Hi Will/everyone else

Loving the FX book and RackAFX so far!

I have run in to a little issue with a plugin I am trying to develop. I am building a delay plugin that should allow a mono or stereo file to be loaded and will produce a stereo output. (ie panned delays). The effects is intended as an INSERT effect and I am having problems with the mono -> stereo scenario.

I have read Will's post about mono/stereo files and insert/aux effects (, but can't seem to figure out what I am doing wrong. For this particular scenario in the FX routing options in the bottom right-hand corner of RackAFX I have "Insert" and "1->2" selected.

The issue seems to arise in my processAudioFrame function. I have included very simplified code below to try and illustrate my issue:

bool __stdcall CParDelayTwo::processAudioFrame(float* pInputBuffer, float* pOutputBuffer, UINT uNumInputChannels, UINT uNumOutputChannels)
float xn = pInputBuffer[0]; //left channel input
pOutputBuffer[0] = {..left channel output..}

// should enter this loop when the routing is mono input to stereo output.
if (uNumInputChannels == 1 && uNumOutputChannels == 2)
float xn = pInputBuffer[0]; // pInputBuffer[0] also processed as it is a mono input
..different processing...
pOutputBuffer[1] = {..right channel output..}

if (uNumInputChannels == 2 && uNumOutputChannels == 2)
float xn = pInputBuffer[1];
pOutputBuffer[1] = {..right channel output..}

return true;

Through testing I have determined that the 'if loop' for mono input to stereo output is never entered {if (uNumInputChannels == 1 && uNumOutputChannels == 2) }. The initial processing is simply done and identical outputs are sent to the left and right channels. There is no difference in the ouput regardless of whether my FX routing is 1->1 or 1->2. When a stereo file is loaded and the FX routing is changed to 2 -> 2 the plugin functions as it should.

If anyone has any idea what is happening, or if my explanation is difficult to understand please let me know! Is there an explanation somewhere regarding the pInputBuffer and pOutputBuffer for mono and stereo modes of operation?


Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 768

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 842

Posts: 3347

Moderators: W Pirkle: 689