Recording a hardware input (via MixerChannel)

Hi there,

I’m trying to record an external hardware synth’s audio via a MixerChannel (ddw Quark). In what’s probably a user error, the file is created but no audio is recorded. Ie: I get a full length silent file.

Because I’m monitoring the synth through my audio interface, I’m sending the MixerChannel’s output to a silent bus. However, in an earlier experiment, I sent the output to another main ‘2-bus’ MixerChannel, but it still recorded silence, so I don’t think that’s the problem.

I’m not sure what I’m doing wrong. MixerChannel is great, but has outdated documentation, so it’s easy to miss something. But my error could be anywhere really.

Here’s some code to hopefully illustrate…

// synthdef for routing mono input
SynthDef(\inputRouter, { |out|
	var sig =\, 1);, sig);

// mixer channel for mono input (with silent out)
m = MixerChannel(\m, s, 1, 1, 1.0, outbus: 99)

// start synth (listening to HW input 2)
x = Synth(\inputRouter, [
	\in, 1,
	\out, m.inbus.index

m.prepareRecord("~/Desktop/mx-test.wav".standardizePath, "wave", "float")


// when done

// clean up;


I’m prone to making silly user errors, so any help or guidance will be much appreciated. Thanks very much.


When using MixerChannel, synths should be set to the channel’s bus and live within either the mixer’s synthgroup or effectgroup. If you don’t put it in the right group, then order of execution is not guaranteed and you’ll run into problems like this.

MixerChannel has a method play that handles this for you (for SynthDef names and patterns) – in general it’s better to use this, rather than handling the plumbing by yourself. (Also playfx for effect inserts.)

Also I think bus number 1 is likely to be wrong. With default settings, you have two output channels (audio buses 0 and 1) and two input channels (buses 2 and 3). You could choose one of the following ways:

// Option A, using your SynthDef
a =\inputRouter, [in: s.options.numOutputBusChannels]);

// Option B:
SynthDef(\inputRouter, { |out|
	var sig =\;, sig);

// now in = 0 means first input channel, 1 = second channel, so:

a =\inputRouter, [in: 0]);


1 Like

@jamshark70, thanks ever so much for the speedy reply!

As you suggested, my problem was indeed the input bus numbers. Using fixes that. Embarrassingly, I’d forgotten that SC bus numbers don’t equal the numbers printed on my audio interface.

I’d also forgotten to use MixerChannel’s .play method. In my normal working framework I use a lot of .playfx, but not the .play method, so my leaky OnePole brain had filtered it out. :wink:

It’s working now. Thanks again.

Glad it worked :grin: and I’m glad to hear that someone is using MixerChannel.

For posterity (in case anyone stumbles across this thread later), multichannel hardware in is different with SoundIn vs In:, 2)[0, 1])

Both of those produce the same result (but, not relevant for mono input).


1 Like

Just to say MixerChannel has become crucial to my workflow. Not just for ‘mixing’ and send FX routing, but also for very simple recording of ‘stems’ for further work in a DAW.

Thanks again for your help and also for the MixerChannel quark.