musikinformatik / SuperDirt

Tidal Audio Engine
GNU General Public License v2.0
520 stars 74 forks source link

audio sends #152

Closed muziker closed 4 years ago

muziker commented 4 years ago

Is there a way to get an audio send out of superdirt without letting the audio run through the panning algorithm ? Also together with a tidalcycle audio routing parameter to configure sending audio to different audio outputs?

According to a conversation in the tidal lurk channel:

So, to put it into concrete terms: I want to be able to have multiple stereo pairs or mono outputs specified. That way i can elect to route the audio into an external fx or have a 12x12 speaker array output. With multiple stereo pairs, i'd like to be able to specify which to send audio to. eg. d1$n"1 1 2 3"#a"1 2 3"# pan" 0.1 0.7 1" where a specifies which output to send to and pan is applied to that output, if that output is mono, then no panning happens. With this, there can be diffusion type performances that are precisely controllable with tidalcycles

telephon commented 4 years ago

Here is an example: https://github.com/musikinformatik/SuperDirt/blob/develop/hacks/live-spatialisation.scd Is anything missing there?

telephon commented 4 years ago

Btw. you'd write # channel "1 3 0 2" and not use pan if you want to route to a discrete channel.

muziker commented 4 years ago

The nproxy routes the orbits into a supercollider audio buss, and that ultimately routes it into a stereo supercollider audio output. What i'd like is 8 channel output from supercollider like s.options.numOutputBusChannels = 8. Where channels 0-1 is the usual stereo output, but 2-7 is individual outputs.

The nproxy playN also isn't so intuitive. For example, when doing this d1$n"1 2 3"#s"bd", Ndef(\dirty).playN([0, 6, 9], [1, 0.5, 0.7], [0, 1, 0]); routes audio to 0,6,9 regardless of channel selection in tidal.

Maybe it's a question of altering the settings

telephon commented 4 years ago

Maybe it's a question of altering the settings

Of course you need to first make an 8-channel superdirt. Then you can freely map those 8 channels like above (you can skip the third array if you are mapping all 8 channels somewhere with the first array). For what you expect playN may not be intuitive, but it gives you the freedom to do what you want. There is a helpfile for it, too.

muziker commented 4 years ago

Btw. you'd write # channel "1 3 0 2" and not use pan if you want to route to a discrete channel.

This one doesn't seem to really do anything

telephon commented 4 years ago

This works for me (but somehow I have to remove synths/try-load-extra-synths.scd (but you seem not to have a problem with it, so you can ignore that).

(edited)


(
~dirt = SuperDirt(8, s);
~dirt.start(57120, 0 ! 4);  
)

(
Ndef(\dirty).ar(~dirt.numChannels); // make a place for a signal
~dirt.orbits.do { |each| each.outBus = Ndef(\dirty).bus };
Ndef(\dirty).scope;
Ndef(\dirty).play;
)

SuperDirt.default = ~dirt;

(
fork {
    16.do { |i|
        (type:\dirt,  s:\imp, channel:i).play;
        0.5.wait
    }
}
)

You can try the same in tidal and see if that works.

muziker commented 4 years ago

It's working in tidal. I had some room setting on, and it is bleeding slightly into all the other channels. Ndef(\dirty) needs to be playing as well. Fyi for anyone else trying to do this

telephon commented 4 years ago

(I've pushed an extended example to the develop branch in develop/hacks/live-spatialisation.scd)