Unknown Amplitude Fluctuation in Stereo Panning Mixer
Just trying to make sure that my stereo panning mixer is made correctly.
Actually it works, but the thing is when the peak amplitude is at 0.707 i get a wierd fluctuation of
amplitude from cycle~. During my first test: say with the frequency at 440 hz, the sound is stable but then
in a short amount of time it sounds like there is an increase in amplitude, then a bit later it gets back to it’s
normal amplitude (i couldnt detect the variation via any meters). the annoying thing is that when i tested the patch
a second time there was no wierd fluctuation…was wondering if i’m missing out on something.
As a beginner level in Max i would very much appreciate the help.
All the best & cheers!
This looks like a good, equal-power panner to me.
thx very much for your feedback, it’s much appreciated!…so if you havent heard any irregular fluctuations
in amplitude then theres no reason for me to be paranoid about it, :) and it’s been a relief to get confirmation!
thx again, all the best & cheers!
PS: will be nice to check out your website, great stuff!
wihout looking at your patch:
0.707 is the center position .. is there everything ok with
the phase, can it for example be that the left and the right
side have an offset of 1? so that when one channel is in
the centerposition the other one is one step off from the center?
Minor point: there actually will be a minor fluctuation in your volumes. It may or may not matter for your purposes, but it’s going to happen because the line~ is transitioning linearly, even though the destinations are set with sqrt.
If you use a longer transition time, you’ll hear it. (Try going from 0 to 1 over 1000 ms)
Two ways of solving it: use sqrt~ on the output of line~ (you can just use one line~, and then invert its output with !-~ 1 and then sqrt~ for the other channel) or make a lookup table. You can read through a stereo buffer use wave~ with a 0-1 signal.
----------begin_max5_patcher---------- 1351.3oc0Zs0aaaCE9Y6eEb5wAGOQIKeYuLrUfATfBrAzBTLDTDPKQayFYRU Ip3jVT+au7hjrjsbDchjpWQfR5g29NemqT1ea3.qkrGwIVfeGbKXvfuMbv.k HofAY++AVaQO5GhRTSyxmscKlxsFoGiiejqj+NF69zHvGPKCw4CRS2RngXtZ kvLgj.07YK+7MtdklIKkmOU6LoqXTNEsEqVveFSPgf+hEFjunHD2eCgt9tXr OWqCtSmO1dD.5HeNW82N1isAepzNlP9pZGUSJSb75kpCdrsTv2GNT9XjgTBE uSnMmvHQfO9g+9OpkKrOkKbl21bwjYPEW3YK+k2DSIC0VgiyT3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i7m+ZS8bpAsi9cCdwsbNqa3vr 96tf.xdkJahUl11rBT+pKuJokhq5AGaZkYutwqApSiO8myM7NC87K2r+bLSM dNS5HOG3rrW3z0D0j7kXdSomx870l1mO+TcehJcUjnFOSruZ4yFuLaGk49Zj Xt7Kp1McV0oWSUMmxu22bJSAGo7pDWBKM1O+7xucN3.lBvIbBs3CH51CuetR SZCIHnxmCiU.IQ1zm9ybpVSno34nipd7HujWOgG0QAaheb6W7zn8xo+rW1lX ul2a3YlIvwq2fyTSgCre7dfFfmYWWvYZ+AGS7k6OWYSxLC6u.cC8b5Gz3Zni S+fFSpY0ekH7L.M8WAcSBw8tp3lWZwScuXG8MARBji9F.cz29mi+l+H1suO7 GKQA88C -----------end_max5_patcher-----------
by offset of 1, do you mean a phase difference of 360?.
in regards to phase, that was one of the things i thought that might be the problem
after i heard the fluctuations, but i couldnt see how that could have happened since the
left and right side are processed equally in center position. however as Peter points out,
"there actually will be a minor fluctuation in your volumes, because the line~ is transitioning
thx much for your help!…the fluctuations seems to be gone after i used the sqrt on the output of line, but
then you get a click at the end of the each transition…how do you think i can get rid of the clicks?…as to the lookup
table, although i understand the logic, i couldnt get it to work out yet so i couldnt test it, will see what i
thx much again, cheers!
You shouldn’t be getting clicks (with the one I posted), but if you post your patch, I’ll take a look.
Your probably right because my revision of the patch maybe incorrect.
As to the clicks, it’s especially audible when you pan suddenly from hard right
to hard left and vice versa and also when you suddenly pan from right or left to center.
In any case i think i’m missing something, so i really appreciate that you’ll take
a look at it…by the way do you think the fluctuations are gone for good?
hope to talk soon, all the best & cheers!
This is correct; it’s an equal power pan curve. You’re changing the volume rapidly (100 ms) which is usually going to introduce some sort of artifact if it’s extreme. (and going from hard left to hard right over 100 ms will be extreme)
Sudden changes usually produce artifacts in digital audio. There’s ways of compensating for some of them (e.g. antialiasing measures in oscillators).
i’m aware of what your saying, i’m only hoping to attain a simple panner like the one in
"ableton live" where sudden shifts dont introduce clicks, but the good thing is the learning process,
so any objects/externals/abstractions for "antialiasing measures in oscillators"?
PS: even if i change the pan with a 1000ms ramp it still clicks at the end, so that was my actual concern.
have good sunday, cheers!
I don’t get clicks with the last patch you posted, and you absolutely shouldn’t be getting them with a ramp of 1000 ms!
Is this the entire patch? (and is the panner constrained to 0-1 for its input?)
These have pretty useful explanations of many current approaches, though they’re not for the faint-hearted of math:
the last one i posted was the revised version: single line~ to √~.
the one i posted now includes the clip~ which doesnt make any difference(hope it’s correct).
ex: when i ramp from hard L to hard R or vice versa you get the click at the end of each
ramp and like a said it doesnt matter if i constrain the panner via clip~.
…the patch will be the abstraction, "panner" for my stereo mixer.
by the way i found the user that i’d lost track of whose the maker of an 8-Channel Mixer.
I learned the panning algorithm from his patch: http://cycling74.com/toolbox/8-channel-mixer/.
as to the links thx very much, i’m not a math guy, but i’ve just started working trying to understand
the FFT which i’m especially interested in but i’ve yet to study the nature of imaginary numbers and how
singals are represented mathematically. will be getting back to fft after i finish the stereo mixer i’m working on.
cheers to the big apple from izmir-tr!
Can you post a recording? I can’t duplicate this. (Mac/Windows? Max 5/6? and which version? (e.g. 6.0.7))
Sorry for my late response, my schedule with school and my projects has really intensified in
the past couple of weeks so i didnt have the chance to respond/record…i’ll post a recording as soon
as i can…as to my Max version: 6.0.5 with Mac.
Cheers, and have a good weekend!…by the way hope you werent effected by the hurricane,
and hope everythings getting better down there.
by "offset of 1" i was thinking about an integer number coming from a GUI object – a frequent source of such errors.
Sorry for the long delay, i posted the recording. As i’ve said the clicks are heard at
the end of each ramp at the opposite channel (so if i pan from hard left to hard right,
the click is heard from the L-channel). The ramp is set to 1000 ms.
all the best, cheers!
could you please give an example because i dont understand what you mean by,
"an integer number coming from a GUI object", how would it create such errors?
all the best & cheers!
Just an FYI.
A strictly accurate equal power curve is 6 dB down in the center and that’s what you have here. Most pro consoles use 3 dB down (Neve and most) or 4.5 dB down (SSL) in the center since two speakers in an acoustic space tend to sum roughly to +3dB instead of the electronic +6dB. (if they sum at all)
If you pan something and leave it there, this makes little difference. If your stereo pair is also used in mono, some instruments may balance differently than you expect. Most people will not notice, but if you have worked on pro gear for a long time, it will feel different.