If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Updated - pan knob (L/R mix)
16 posts
• Page 1 of 2 • 1, 2
Updated - pan knob (L/R mix)
Updated version posted below-- use that one!!
--------------
So when I first started off with this Flowstone thing I was really surprised to find that I couldn't find any proper pan knobs that mixed the left and right signals anywhere. After some time of searching I finally just said hey, I'll make my own, can't be too hard. Well, I did it, but it actually took me a few hours and was quite a convoluted mess of wires for such a simple thing! I knew there had to be a simpler way about it, so yesterday I sat down and figured out how to put this together in DSP code, and that's what I'm sharing with you today.
It would be hard to believe that nobody would have such a basic and simple thing already, but since I had so much trouble coming across an example of this I figured I should share.
To be clear, this doesn't just simply fade the left and right signals separately, it progressively mixes one signal into the other like most useful pan knobs you find in software do. I also went so far as to apply a -3dB pan law here (in the last two lines if you want to comment it out). This doesn't match my DAW's (FL Studio's) pan knobs exactly except at the extremes (full left, full right, or center), so I'm not sure if there's a "more correct" way to do this, but it works and sounds just fine. Also it's entirely probable that there's a better or more efficient way of writing this code, but I'm not too worried about it.
Anyways, it's a stinkin' pan knob! Yahoo!
--------------
So when I first started off with this Flowstone thing I was really surprised to find that I couldn't find any proper pan knobs that mixed the left and right signals anywhere. After some time of searching I finally just said hey, I'll make my own, can't be too hard. Well, I did it, but it actually took me a few hours and was quite a convoluted mess of wires for such a simple thing! I knew there had to be a simpler way about it, so yesterday I sat down and figured out how to put this together in DSP code, and that's what I'm sharing with you today.
It would be hard to believe that nobody would have such a basic and simple thing already, but since I had so much trouble coming across an example of this I figured I should share.
To be clear, this doesn't just simply fade the left and right signals separately, it progressively mixes one signal into the other like most useful pan knobs you find in software do. I also went so far as to apply a -3dB pan law here (in the last two lines if you want to comment it out). This doesn't match my DAW's (FL Studio's) pan knobs exactly except at the extremes (full left, full right, or center), so I'm not sure if there's a "more correct" way to do this, but it works and sounds just fine. Also it's entirely probable that there's a better or more efficient way of writing this code, but I'm not too worried about it.
Anyways, it's a stinkin' pan knob! Yahoo!
- Attachments
-
- Pan (L-R mix).fsm
- (8.12 KiB) Downloaded 1406 times
Last edited by Perfect Human Interface on Wed Mar 11, 2015 1:16 am, edited 2 times in total.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Pan Knob! Woo!
Here's the version I allways use:
-
Yuroun - Posts: 27
- Joined: Mon Dec 19, 2011 7:32 pm
- Location: Tilburg, The Nethlands
Re: Pan Knob! Woo!
That doesn't mix the signals though.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Updated - pan knob (L/R mix)
I came back to this and made what should be a much more efficient version. Back then I thought it would be a good idea to put everything into a DSP block for whatever reason (even division). This version only performs 3 stream multiplies and 2 stream subtracts and moves the rest into green.
As before, this pans a stereo signal by progressively mixing left or right one into the other, and a -3 dB pan law is applied.
I'm also including a simple pan (no mixing signals) suitable for mono inputs.
Enjoy
As before, this pans a stereo signal by progressively mixing left or right one into the other, and a -3 dB pan law is applied.
I'm also including a simple pan (no mixing signals) suitable for mono inputs.
Enjoy
- Attachments
-
- Pan (L-R Mix) 2.fsm
- (1.27 KiB) Downloaded 1278 times
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Updated - pan knob (L/R mix)
Nice work PHI . Thanks for posting
Must say ... I appreciate being able to 'look inside' how a design is laid out.
Makes me look at things working in a different light.
Much respect
Must say ... I appreciate being able to 'look inside' how a design is laid out.
Makes me look at things working in a different light.
Much respect
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Updated - pan knob (L/R mix)
thats interesting concept, while i'm not sure if the mixing of one channel into the other is a very common thing, i just tested the pan sliders in the cubase mixer and they don't do this..
anyway while doing some research on that i collected the most common ways for panners which are squareroot panning and sinusoidal panning which has the best constant loudness (3db law)
about the mixing one into the other channel i could found only one example algorithm on some Faust tutorial here which also uses squareroots to archieve constant loudness, just that its a bit more than -3db in the middle..
anyways i ported the algorithm to FS so you can compare it with your version
anyway while doing some research on that i collected the most common ways for panners which are squareroot panning and sinusoidal panning which has the best constant loudness (3db law)
about the mixing one into the other channel i could found only one example algorithm on some Faust tutorial here which also uses squareroots to archieve constant loudness, just that its a bit more than -3db in the middle..
anyways i ported the algorithm to FS so you can compare it with your version
- Attachments
-
- panners.fsm
- (584.04 KiB) Downloaded 1195 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Updated - pan knob (L/R mix)
Nubeat7 wrote:thats interesting concept, while i'm not sure if the mixing of one channel into the other is a very common thing, i just tested the pan sliders in the cubase mixer and they don't do this..
My understanding was that it's very common. FL Studio's panners work this way, but I don't have experience with other DAW software (I would hope other DAWs do this honestly). I believe simply scaling the left and right channels individually is technically called "balance." But this is usually much more musically useful for stereo content because you don't lose any information as you pan to the left or the right, and it's more realistic because of that. For a mono source there's of course no reason to mix the signals.
Thanks for digging up those algorithms! I looked at them but I'll "listen" to them later. To my understanding, those would be examples of a "circular" pan law, which you're correct should be more accurate in terms of constant loudness. My example is a "linear" or "triangular" pan law. It's more of an approximation but it works fine (it doesn't matter very much in practice).
Those square roots are certainly a lot simpler to implement than mucking around with all that annoying and confusing green. My understanding is that square roots are expensive though, and especially if you're going to use Ruby, I think my example would be a good bit faster, if you were for example to automate the control. Not sure exactly how much of an impact that would have but it's something to consider.
With my design thing's are getting inverted so often it got really confusing. But one thing to note is that since one signal is getting added to the other (gets bigger), rather than just one being attenuated (gets smaller), the pan law was actually applied upside down. I'm not even 100% sure that the whole "equal loudness" thing is applied in exactly the same way here, but to my ear it sounded right and that's, essentially, what this is about. That also means that at neutral the input signal equals the output, which is beneficial in that you can add it to your schematic without having to compensate for the attenuation at default.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Updated - pan knob (L/R mix)
Thanks NuBeat !
Will check this out
Also grabbed the Faust pdf ... interesting stuff. If I could interpret C, probably more so
Where so you Guys find all this stuff Well, anyway ... thanks again !
Will check this out
Also grabbed the Faust pdf ... interesting stuff. If I could interpret C, probably more so
Where so you Guys find all this stuff Well, anyway ... thanks again !
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Updated - pan knob (L/R mix)
Perfect Human Interface wrote:My understanding was that it's very common. FL Studio's panners work this way, but I don't have experience with other DAW software (I would hope other DAWs do this honestly).
also tested reaper, renoise and ableton and no one is mixing one channel into the other (i just tested this on the master tracks)
it also sounds unlogical to me, because if i have a stereo source the "content" of the left and right channel is already there and normally i don't want some content from one channel inside the other ,
lets take some example
i recorded a drumset, after everything is inside the box and mixed well, i found that the left channel is louder then the right, normally i take the pan knob on my stereo channel and move it slightly to the right until both channels are good, after the mix (the positioning of the single drumset tracks) is already done i don't want to change the positioning of any channel content ( i just want the right side a bit louder) this means i don't want to feed my very leftsided crash or hihats into the right channel, whats left should sty left..
so i would see your case more as a special case
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Updated - pan knob (L/R mix)
Nubeat7 wrote:also tested reaper, renoise and ableton and no one is mixing one channel into the other (i just tested this on the master tracks)
That's quite interesting. As I said I don't have experience with other DAW software so I only had assumptions.
lets take some example
i recorded a drumset, after everything is inside the box and mixed well, i found that the left channel is louder then the right, normally i take the pan knob on my stereo channel and move it slightly to the right until both channels are good, after the mix (the positioning of the single drumset tracks) is already done i don't want to change the positioning of any channel content ( i just want the right side a bit louder) this means i don't want to feed my very leftsided crash or hihats into the right channel, whats left should sty left..
so i would see your case more as a special case
Here's the thing my friend. We're talking about two different things and there could be usage cases for either. You provided a good one for that method. So I'll give you one for the other method.
Say you have a signal with a stereo chorus, or some kind of wobble or movement between the left and right channels. As you pan this signal to the left or right, without mixing the signals, one of the channels fades to 0, and what you end up with is a sound that's fading in and out, where originally it was just moving side to side. So you've completely lost part of the original signal.
Lets call not mixing the signals "balance" and mixing the signals "panning." Balance would therefore refer to exactly what it sounds like-- the relative balance between the left and right channels. The word "panning" is based on the same word use for film and such, where the image is moved side to side. So the idea is that you're moving the perceived sound source side to side. So where you've described making a correction, this would be more of a creative choice, or a positioning choice in mixing. And I mentioned it being more realistic, that's because if you imagine a real-world sound source moving to the left or right in front of you, all of the sound information from that source is still reaching your ears regardless of how far it's moved (though it's true panning is still not a completely accurate representation of real-world spacial audio). Another way to put it would be that the left and right signals are not being dissociated, which is important because our hearing does not interpret differences in our left and right ears as unique objects, but rather uses sounds from both ears to understand each object, so it makes sense that the software would also maintain association between the signals.
Here's a quote from the Wikipedia page:
The pan pot is not the same as a balance control on a consumer stereo receiver. The balance control takes a stereo source and varies the relative level of the two channels. The left channel will never come out of the right speaker by the action of a balance control. A pan control can send the left channel to either the left or the right speakers or anywhere in between. Note that mixers which have stereo input channels controlled by a single pan pot are in fact using the balance control architecture in those channels, not pan control.
The last sentence is interesting. I believe it's referring to the idea that (in the author's apparent experience) a stereo pan would actually have two pan knobs (one for each channel) rather than one. Obviously a pan design like the one I provided is just combining this into one knob, for simplicity sake. But I'm interested to know if other DAW software might have something like this.
Ultimately I think it's important to note the differences in use cases. One is more likely to be more useful depending on your workflow and style of making music. If you're doing it the old fashioned way, recording with microphones, and generally working with mono signals, then the "balance" style control is likely to be more useful. If on the other hand you're working with stereo synthesizers and pre-recorded samples, you most likely want a pan that mixes the signals.
I will note that this is the Flowstone forums and so we're working with software synthesizers and effects. So my recommendations are that if you specifically want a "balance" control for some reason, then use one. If you have a mono signal you want to pan, either method is identical so use the cheaper one (non-mixing). If you want to move a stereo sound left or right, definitely go with the mixed-signal pan.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 37 guests