Updated - pan knob (L/R mix)
Posted: Fri Apr 19, 2013 2:20 am
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!