Old 08-11-2022, 09:05 AM   #1
intalentive
Human being with feelings
 
Join Date: Aug 2022
Posts: 1
Default How to tell if signal is mono?

Hi all,

Long time Reaper user, first time developer + forum poster.

I am working on a CPU-intensive plug-in that I'm building with JUCE and testing in Reaper. I would like to be able to do less work when the signal is mono, but mono .wav files are still sent out to two channels. From the point of view of JUCE, it seems that every Reaper instrument track is stereo.

Is there any straightforward way to test whether the audio stream is actually mono, despite coming in on two channels? (I mean other than explicitly checking that the two channels null.)

Thanks in advance.

Last edited by intalentive; 08-11-2022 at 10:26 AM. Reason: clarification
intalentive is offline   Reply With Quote
Old 08-11-2022, 01:37 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 11,305
Default

Hi,

Quote:
Is there any straightforward way to test whether the audio stream is actually mono, despite coming in on two channels? (I mean other than explicitly checking that the two channels null.)
Hm..generally I wouldn't think so as that's how it's defined (S=L-R).

Reaper specifically, tracks always have an even number of channels, so they are at least stereo, and mono tracks don't exist (you probably figured that out).

To check if a plugin receives a mono stream one could check via TrackFX_GetPinMappings() Api (similar for Take FX), which is possible for (VST) plugins to access via the VST extension SDK.

As you're using JUCE, there's an example in the JUCE source how to access the Reaper API:
https://github.com/juce-framework/JU...ewPluginDemo.h

Last edited by nofish; 08-11-2022 at 01:52 PM.
nofish is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.