In.ar(channel) and meters mismatch

Hello,

I am trying to make an environment in Ubuntu that plays some files on Reaper and I listen to those channels with SuperCollider to code over the soundfiles playing. So, like:

Reaper out_1-2 → Supercollider in 1-2
Reaper out_3-4 → Supercollider in 3-4
… etc. …

So, in Ubuntu I do the following. I start QJackCtl, I create a bunch of outputs in Reaper (let’s say 80), and I create a number of inputs in SuperCollider (let’s say 80: Server.default.options.numInputBusChannels = 80)

Then I play Reaper, and I can see that the track that I am sending to output 40 is correctly shown in my meter at in=40 in SuperCollider. Everything looks good so far.

Then I create the following code:

SynthDef(\spatialize, {
			arg in; var sig;
			sig = SplayAz.ar(
				~numberOfChannelsOutput,
				FreeVerb.ar( In.ar(in, 2), \verbMix.kr(0), \verbRoom.kr(0), \verbDamp.kr(0) ),
				\spread.kr(0),
				\vol.kr(1),
				\width.kr(2),
				\center.kr(0),
				\orient.kr(0.5) );
			Out.ar(\out.kr(0), sig);
		}).add;

but to listen to the track 40, I have to pass a in=48. It’s like if in is shifted by 8, when using In.ar(). Is there some reason for this behavior that comes to your mind?

You are probably using 8 output buses?

In SC output buses come first, followed by input buses. You can use SoundIn instead of In to index into your inputs:

https://doc.sccode.org/Classes/SoundIn.html

@lucedan This could help you, explains basics.

https://ccrma.stanford.edu/~ruviaro/texts/A_Gentle_Introduction_To_SuperCollider.pdf

Section 30, 31 in this case.