-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let's sort out the panning scheme #36
Comments
Ah that is unintended, it must have been a misunderstanding from past conversations. You can easily play around with different channel mappings as you go:
there are a lot of possible solutions, maybe we find an optimal default. |
I believe this is a result of Classic Dirt's behavior being a little confusing, and due to "panning" having an ambiguous definition for stereo signals IIRC, Classic Dirt will play stereo samples in stereo, but only if I believe SuperDirt, by default, will just mix down to mono then pan with any input. If you want something else, like @telephon says there are a number of possible options. In my own SuperDirt what I did was to insert something like this into the
Basically, interpret |
Yes I think there would be a better default to the one that classic dirt has. Personally though I'd want |
yes - how would it translate to multichannel output / multichannel in + multichannel output ? |
I can't see how this generalises to multichannel outputs or soundfiles.. 2 in/out seems a special case. But maybe we can make it generalise with an additional parameter, On a tangent, it'd be nice if a ring configuration went from -1 to 1, and if this worked for stereo as well, so -1 to 1 went from right to left, and then back again. Then |
Currently, both stereo and multichannel panning works between 0 and 1, in stereo it is a left -> right pan, in multichannel it is a full round. How should it be mapped? Do you mean we should interpret -1 for stereo as 1? |
I really can't speak to scenarios where channels > 2. In the case of a 2-channel (L and R) setup, I think
This will work for any min/max/range of But like I said, I really have no idea how this translates to a setup with more than two channels. |
Let's say you have a stereo sound file with a sawtooth wave on the left and a sine on the right. Hen panning it, would the sine ever be audible on the left? And the sawtooth on the right? |
@telephon no. In a two-channel setup, Pan is the expression of the amplitude of either side; it will never blend the two channels. I've never used any audio editing/recording/mixing software that does something different with "panning". Again, let's say
|
well, in the standard mixing, I would have thought that e.g. with |
(Btw. the reason we are discussing here is that we try to find a solution that is more general than the conventions – that naturally involves trade offs.) |
@telephon that is not my understanding or expectation of how No problem with the discussion; it's good to figure things out :) I am arguing strongly for convention in this case. If there is a more general problem to solve that would benefit from a non-conventional approach, then so be it, but I think it would go against what most Tidal users would expect. My personal preference would be a conventional panning implementation by default, and perhaps an option for a less-conventional, blended panning implementation when more than two channels are used. My opinion is that this is what most new Tidal users would expect. |
@kindohm yes, that would be great if convention turns out to be a special case of a more general scheme. Right now I suspect that this is difficult, the possibilities branch out a bit too much. I didn't know that on mixers the panning scheme is "hemispherical". It's a good convention, but at least one problem seems to me that it has no meaning outside stereo, has it? I'm currently rewriting |
I suspect the main combinations people use in practice are these:
I don't know if people work with multichannel inputs -> multichannel out, but I've never run into it. |
@bgold-cosmos yes, that seems to be about what I have come up in my notes on paper. Although for the 2-2 case I see that sometimes you really want to only have the left channel when you pan to 0. So already here there are are four possibilities: mix+pan, balance, hemispherical and caterpillar like, as discussed above.
It is done a lot in electroacoustic music, and I think that tidal is a valuable language in these areas. In any case it is quite idiomatic in supercollider to think in terms of multiple channels mapped in various ways. |
@muellmusik how would you do it? |
Um, I'm not sure exactly what 'it' is here, but a couple of observations:
|
@muellmusic: thanks for chiming in (pun intended). The meaning of 'it' is: to find a good configurable default of how to pan an N-channel input to an M-channel output, where the most common cases would be
There are a couple of parameters that could be interesting enough to expose them:
Tidal has a pan range from |
My suggestion would be the following:
My rationale for this is that it supports the most common cases out of the box (stereo or mono to stereo), but generalises well to different values of N and M. It requires no special treatments (note that 1. is actually just a particular case of 2., and does not require a separate implementation). Splaying, while perhaps not a 'standard' approach, is very useful in live coding once you wrap your mind around it. Apologies if this seems obvious, and hope it is of some use! |
In this approach, what would a |
Yes, include the stereo case. My instinct is that the default should clip position rather than wrap as in a ring, since the case of panning a stereo field is more likely than surround systems. But a ring should be made very easy to do, maybe just a flag. 2 cents, anyway. |
actually, so:
Maybe a |
I would suggest spread 0 would mean a mixdown, panned to the location indicated by centre. Spread 1 is maximum spread. Sorry the comment above about levels has more to do with width (i.e. is a source panned across more than two adjacent inputs at any given position), so ignore that. -1 could be a special case of hard assigning channels until you run out of inputs (wrapping outputs?), but is that a likely generalisable use case? I'd suggest mocking up a few interfaces and seeing how they feel in use. |
I think I've found a solution that has both behaviours. A parameter
|
@kindohm is this solved by https://github.com/musikinformatik/SuperDirt/tree/topic-panning ? |
@telephon probably, but how do I test? I have superdirt installed currently. How do I overwrite my superdirt quark with this branch? Just clone the branch and copy-paste the files over the quark's files? |
I've done something like this:
|
Yes, that's the correct way. |
trying to test. but I can't get any folders of samples to get loaded. |
Now merged to 0.9-dev. |
… for parameters like |
I think |
@yaxu: no, a
ok, good idea. Would that be the same for stereo, I suppose? |
Ok I'll look further into these parameters.
|
Ah, now I remember. fixed here d0fd9c0 |
This was resolved quite a long time ago. Not sure what commit it was. Will log a new issue if a new concern comes up. |
I'm having problems getting multichannel panning parameters to work. For example, using eight channels..
Reading the above, I expected 1/16 to get added to the The following plays over two speakers (adding the 1/16 straight to the pan):
And this plays over one speaker (using the 'bd' sample which is already mono):
Note that |
I'll take a look ... |
Some random questions first: Why do you have a
But this is unrelated, given that I have this setup: (
s.reboot { // server options are only updated on reboot
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html
s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples
s.options.memSize = 8192 * 32; // increase this if you get "alloc failed" messages
s.options.numWireBufs = 64; // increase this if you get "exceeded number of interconnect buffers" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 8; // <=== set this to your hardware output channel size, if necessary
s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary
// boot the server and start SuperDirt
s.waitForBoot {
~dirt = SuperDirt(8, s); // EIGHT output channels, increase if you want to pan across more channels
~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)
// for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/*");
// s.sync; // optionally: wait for samples to be read
~dirt.start(57120, 0 ! 12); // start listening on port 57120, create two busses each sending audio to channel 0
// optional, needed for convenient access from sclang:
(
~d1 = ~dirt.orbits[0]; ~d2 = ~dirt.orbits[1]; ~d3 = ~dirt.orbits[2];
~d4 = ~dirt.orbits[3]; ~d5 = ~dirt.orbits[4]; ~d6 = ~dirt.orbits[5];
~d7 = ~dirt.orbits[6]; ~d8 = ~dirt.orbits[7]; ~d9 = ~dirt.orbits[8];
~d10 = ~dirt.orbits[9]; ~d11 = ~dirt.orbits[10]; ~d12 = ~dirt.orbits[11];
);
};
s.latency = 0.3; // increase this if you get "late" messages
};
);
I get a circle, using d1 $ slow 2 $ sound "bd*8" # pan (saw |+ (1/16))
# pansplay "0"
# gain 1.4 |
Sorry returning to this after some time!
.. then we get a circle but sd is played over a minimum of two speakers. I would like to work with discrete speakers where stereo samples get mixed down to mono. I think it was |
Ok I've worked out that it is working for stereo synths like (I'm still confused about what |
hey everyone ! I've been reading this through as i'm considering doing a multichannel show using Tidal for the first time. It will be with 16 speakers and i'm trying out a config using 16 output for Supercollider and Superdirt and checking it out with scope. However, i still don't understand how to either activate and / or access any of these parameters - such as pansplay, splay, span etc. Are they integrated in the current version of Superdirt or do i need to do something on the Supercollider side as well ? The main thing i'm trying to do is send a sound to all outputs in a balanced way. Is there a built in SplayAz or equivalent in Superdirt that would allow to spread a sample or synth across all channels in balance - or what would be the appropriate way to have a single sound, whether mono or stereo, spread out throughout all channels without phasing issues ? Panning between 0 and 1 works great so i'm just wondering how to alternatively tighten the output to one channel or spread it out to all channels to dilate and compress the sound. This tidal code mentioned above (let (span, span_p) = pF "span" Nothing) yields error messages. let (span, span_p) = pF "span" Nothing So I've just tried on my end with a simple let splay = pF "splay" etc. And i have another question regarding custom FXs but maybe after all this ! Many many thanks x |
Hi @maxlouisr, The code for making extra parameters has simplified over the years. Try this: let span = pF "span"
splay = pF "splay"
panWidth = pF "panWidth"
orientation = pF "orientation" and let us know how you get on! |
Ah reading more, I see you already tried that. As far as I know, these should still work, but when I last tried some years, I had difficulty getting panwidth/splay to work. Perhaps there was something I didn't understand. |
Hey @yaxu thanks for getting back ! No indeed i'd tried that already but nothing happens that i could see - none of these parameters seem to affect the panning of either mono or stereo samples. However i'd overlooked testing it out on synths, for which there seem to be mild differences - the parameter 'orientation' works as expected on mono synths. The others don't seem to do anything that i could see (i tried superfm and supermandolin). On a stereo synth, all parameters have a behaviour but it's odd. I can't quite wrap my head around it, not does it correspond to my experience of these tools (PanAz, SplayAz) on the supercollider side. From what i see they they occasionally send out the sound to a third or four channel at best depending on parameter value. |
Hi @maxlouisr I don't have a multichannel sound system to hand but just tried this by looking at the supercollider scope with 16 channels configured. I see the same behaviour, nothing works for samples (mono or stereo) but does for synths. I could get @telephon has this worked for you recently? |
Hey ! Yes ok that's good to know was using with capital. It looks like around panwidth 20/30 you can send out to most channels. I was playing code yesterday looking at the scope. First of all really enjoyed the effect of playing multichannel on stereo ! it's really cool - you get this offscreen presence as sounds vanish either left or right. I also made a quick test using custom pan and splay effect and it seems to work surprisingly well (including with routings and effects), but i'm guessing this would mean trouble somewhere down the line ? ~dirt.addModule('splaz', { |dirtEvent| )}, { ~splaz.notNil }); SynthDef("splaz" ++ ~dirt.numChannels, { ~dirt.addModule('panaz', { |dirtEvent| )}, { ~panaz.notNil }); SynthDef("panaz" ++ ~dirt.numChannels, { |
I haven't tried. But we can try it out, probably in two weeks. |
Hey, I'm on site now but can't figure a good way to get a centered sound (coming out simultaneously from all speakers). Setting the channel paramater to [0,2,4,6,8,10,12,14] makes it louder as the signal is sent out full blast to each speaker rather than going through a panning process with level compensation. And I can’t find a way to use the span or splay paramaters, neither on synths or samples. The only thing that works so far is my own custom SplayAz effect above, although it mixes down the input to mono. |
Sorry I'm not a supercollider/superdirt expert.. Maybe not useful, but the last time I played on a multichannel system (Amoenus soundsystem in London), rather than sending one channel per speaker, I sent 8 mono channels. I then sent OSC messages to control the xyz, spread, doppler, presence, yaw and heaviness for each of those channels. Just in case you have a similar ambisonic mixer thingie that can be remote controlled like this. Here's the config I made for that, in case it's somehow useful..
|
hi alex thanks for you response ! This doesn't really apply to the context i'm in but thanks for taking the time to share just in case. |
You can set the global amplitude: But maybe you want this as an effect? You could then just write a module that does such a mapping. SynthDef("dirt_mono" ++ ~dirt.numChannels, { |out|
var orig, signal, n;
n = ~dirt.numChannels;
orig = In.ar(out, n);
signal = orig.sum.dup(n) * (1/n);
ReplaceOut.ar(out, signal);
}, [\ir]).add;
~dirt.addModule('mono',
{ |dirtEvent|
dirtEvent.sendSynth("dirt_mono" ++ ~numChannels,
[
out: ~out
])
}, { ~mono.notNil }); |
Hi Julian, thanks a lot for your response. |
Let's say your SuperDirt instance has 16 channels. Then,
sums all existing channels of your synth and sends the mix to all 16 output channels. |
There "stereo image" of a sample is lost when played in SuperDirt. For example, a sample that inherently contains right and left panning sounds like a "mono" sample without any panning in SuperDirt. Example:
https://soundcloud.com/kindohm/stereo-image-difference/s-Oh8f6
The above is a recording of the sample played in SuperDirt, then in Classic Dirt. The sample has a panning oscillation that should be audible in any audio player. In SuperDirt, it sounds like a "mono" sample that doesn't pan. In classic Dirt, the panning is audible.
The text was updated successfully, but these errors were encountered: