Spatialization - a new (old) way

25 views
Skip to first unread message

Catalin C.

unread,
Jul 5, 2019, 7:06:30 PM7/5/19
to Analog Box
Stereophony - what it consists of? Most people, even some engineers and producers would say that, for any individual source in a recording, some level difference between left and right speakers is enough to make someone pinpoint that source more to the left or right from the middle of the perceived sonic image, as they sit in front of their system, in the famous "stereo triangle".

Well, it turns out to be more complicated and I won't be trying to make some dissertation on binaural recording and reproduction systems, as it's not the place, plus those are not practical for the average PC musician (whew!). Suffice to say it's based on the fact that sound from a source placed more to the right or left in relation to the listener will reach the contralateral ear not only with reduced pressure, i. e. level, volume, but also with a time delay. It seems trivial because it can be easily represented, yet the difference we're talking here (an order of 1-5ms) is so small it's been ignored in many instances by music people.
So... here I am, an amateur trying to tackle the issue.
When talking about stereo audio the effect of delaying one side versus the other with a difference that small is called the precedence effect or Haas effect, by the discoverer's name. Basically, when you apply such delay, the sound will appear coming from the opposite side to the delayed one.
Interestingly, as of recent years, for the computer music community at large there's been an offer of Haas effect solutions, in the form of dedicated VST plugins, or even included in other, more complex spatialization plugins - not named as such, but as "Inter-aural Time Differences" (ITD) options, whereas the simple act of panning induces "Inter-aural Level Differences" (ILD). Such plugins have been met with enthusiasm and subsequently praised - I have listened some too and the guys behind them know what they're doing. With those plugs, the stereo sound becomes really "stereo" ("solid" in ancient Greek). Unfortunately the full products cost some and are CPU-intensive.
So, panning and Haas effect in conjunction - that's what works best. But how it's done? A quick Web search leads us to the books written by the late John Eargle, a big name in audio engineering of which I also found about only recently, and here's a quote from him specifically on the Haas effect:

The effect is a very basic one and has been observed throughout years of architectural acoustical design. Haas observed that the displacement of a sound source between two loudspeakers due to slight time delays could be compensated for by intensity imbalances. In the example of Figure 3-7, a time delay of 5 milliseconds in the right loudspeaker transmission channel results in localization at the left when both channels are fed the same signal level. However, if the leading channel is lowered in level some 10 dB, then the listener again perceives a phantom image in the middle of the array. The trade-off between delay and intensity is a useful one in sound recording and signal processing, and it is effective up to delays of about 25 to 30 milliseconds, as shown in Figure 3-8. As this graph indicates, time delays between frontal pairs of loudspeakers can be compensated by raising the level of the delayed channel by the corresponding amount. Beyond 25 to 30 milliseconds, the ear begins to hear the delayed sound as a distinct echo, and the trade-off is no longer effective in terms of restoring center localization.
 (John M. Eargle, Handbook of Recording Engineering - as previewed on Google Books)

Spot on! We can see a relationship between the time difference and the level difference. Can we try to obtain the inverse? that is, to emphasize the displacement by decreasing the delayed channel's level by the specified amount? Can we do this in ABox?
Well, I've done this attempt, and the result, which I dare bring forth, in the attachment to this post, is a block that takes a mono signal, an oscillator's output for example, and routes it through 2 delay objects in parallel, one to give the Left, the other the Right signal respectively. Each delay has an external knob that you use to dial in the value. Further inside, in the control path, some arcane math translates this input and controls a muxer turned fader at the exit from the aforementioned delay. It does exactly what I've questioned above. The resulting pan value is shown on a readout.

Procedure: To pan a source gradually, from center to one side, leave the corresponding knob at 0* and turn the other knob while looking at the readout to see where the source is exactly. The knobs are made endless and the math gives the natural number value, so you can play with the knob continuously if you wish, with seemingly minimal artifacts.

(*otherwise you'd cause unnecessary level dropouts)

Limitations: Well, as I'm not an actual mathematician (very far from that), I couldn't come with a formula to give a proper fading curve; thus, when turning the knobs past ~339 samples value that side gets muted and the source appears 100% in the other channel; plus I didn't find (yet) any other correlations than the one cited above, and even if I did, again I don't know the math to make them work together. Still, a dropout of more than 10dB is less and less noticeable, compared to values above it, so I guess it would be a neverending game of approximations to build a "realistic" fading curve beyond that.

But the ears seem content with the result! Panning the instruments this way makes them sound like being spread out left-right a little more, expanding the sonic image outside the speaker line, all that as heard in some selected older recordings. I'm fascinated with good stereophony. I'm giving everybody an example so you can get a thorough impression of what happens.
Since I'm still poor at sequencing I decided to use, as demo, the jambot #33 from the library ("Introspection Extrovertion"), one of the more musical ones. With apologies to Mr. Turner.
This circuit is a mod to it containing both the spatialization of the melodic instruments with the mixer object and the one with the "Haas&Pan" blocks I've built (plus my mixer block), on toggle, with the same pan values in both versions so anyone can A-B the two methods. I took the liberty of spreading further apart a bit the harmony instruments, to better showcase the differences. Tip: if your stereo has any option of "virtual surround" or whatever it's called, try that as well!
Now... I hope it just works for other users as it works for me. Any suggestions welcome.

Enjoy,

Catalin
jambot_33_2019-07-05.ABox2

Keith Blackwell

unread,
Jul 5, 2019, 9:20:21 PM7/5/19
to analo...@googlegroups.com
Catalin wrote:
> a block that takes a mono signal ... routes it through 2 delay objects in parallel, one to give the Left, the other the Right signal respectively.

Cool idea.  Jambot 33 is a fun choice, also.  I think I managed to simplify your Haas block a bit while, I hope, keeping the same function.  But what I would prefer is a panner that takes the pan (-1 to +1) as an input and computes the needed delay and gain reduction, instead of taking the delay and telling you the effective pan amount.  I usually seem to enjoy figuring out math functions to match data more than any sane person would, but I don't have the raw data handy at the moment.  :-)

Interestingly, I had this idea in my head for years that you get a more "extreme" and somewhat disembodied  stereo panning effect by negative the off-side channel in addition to the stuff you've discussed.  Actually, your circuit will do that, also, if you go extreme with the delay amount, but not in an expected/useful way.  I don't know where I came up with that idea, though.  I can't think of a physical justification for it.  :-/

--
Keith W. Blackwell



HassPanner.ABox2

Keith Blackwell

unread,
Jul 5, 2019, 10:25:28 PM7/5/19
to analog-box
I wrote:
> but I don't have the raw data handy at the moment.

Duh, after a few more seconds of thought, I realized it was trivially right in front of me.  Here is the converted HaansPanner using P input , and the Jambot33 also modified to use it (in this case, I put the lead panner on an LFO, so the switch to go back to original isn't really intended to match anymore).
--
Keith W. Blackwell

HassPannerP.ABox2
jambot_33_2019-07-05kwb.ABox2

Catalin C.

unread,
Jul 6, 2019, 12:12:25 PM7/6/19
to Analog Box
Thank you, Mr. Blackwell.
Before further discussing these interesting options you've shown, I have to correct myself in some very important aspects.
I was candid in stating the reasoning I had in mind when deciding to build the control after reading Eargle's text. But, there is no physical justification for that reasoning, actually. It was an eureka moment alright, but an artistic more than a scientific eureka...

But last night has proved to be a good advisor. Shortly after posting I asked myself: what was I actually thinking?
The theory on the ITD is good, but how do you actually correlate with ILD?!
We're talking sound transmission in air, therefore we're talking sound attenuation in air (distance damping). It obeys certain laws and gives us certain measurements.
Basically, I thought: "There is no way for a delay of 5 ms to give an attenuation of 10 dB." 5 ms means you move the source 0.3 m (or 1ft) away from you.
So I reached Sengpiel's website, on the page about this matter.


In short:

The sound pressure level in dB without the given distance to the sound
 source is really useless
- The sound level decreases by 6 dB (half) every time the distance from the source to the listener doubles.

The last statement gives us the numerical reference.
Therefore I need to make an important note on my corrected Haas & Pan:

The distance from the listener to their stereo is assumed to be 1.5 m (~5 ft)*. As an example, you induce a delay to the right channel corresponding to double this distance (so 3 m, ~9.8 ft). As the speed of sound in air is ~340 m/s, the delay is ~8.96 ms=396 sam. And at this value you get the right channel attenuated to -6 dB and so a pan of 50% L.

(*I''ve wanted to make it 2 m, but then the pan wouldn't have worked up to 100%.)

I've adjusted the coefficient to make it work as above. Now the input knobs work up to ~788 samples, after that the channel is muted. But hey, AFAIK nobody makes Haas effect with >17 ms delay, it's not even useful!
Now check the updated mod to Jambot-33, same pan values - it gives a more subtle, perhaps even realistic, spatialization. As it should! :-)
I apologize for my mistakes. My goal remains to give the community virtual equipment that works, hope I've come closer to that.
Mr. Blackwell, I've also reworked the equation in your block with the pan input and I'm posting the circuit used by me as a "workbench", you can see what I did both to my version and your mod and check the values.

On Saturday, 6 July 2019 04:20:21 UTC+3, Keith W Blackwell wrote:
Interestingly, I had this idea in my head for years that you get a more "extreme" and somewhat disembodied  stereo panning effect by negative the off-side channel in addition to the stuff you've discussed.  Actually, your circuit will do that, also, if you go extreme with the delay amount, but not in an expected/useful way.  I don't know where I came up with that idea, though.  I can't think of a physical justification for it.  :-/

Negative, as in phase flip? I was playing with that in ABox back in 2011, a simple VST that allowed to invert the phase of any of the channels while delaying it with a specified value. Pretty hollow sounding, I recall...
Anyways, I value the ideas you've given. I will upload my updated block, as well as the one with pan input, to my Drive.
The tremolo LFO idea also occured to me these days, we'll see if I can develop it a little more.
Thinking again of Eargle's notes... You feed the same signal to both stereo channels, so a mono signal. But, if you delay this signal in any channel with 5 ms, you'll need to lower the gain in the other with 10 dB to make it sound like mono again! That's less than half of the initial level!
Our ears work in mysterious ways...

Jam on,

Catalin
jambot_33_2019-07-06.ABox2
Test_Haas.ABox2

Keith Blackwell

unread,
Jul 6, 2019, 4:04:46 PM7/6/19
to analog-box
> Negative, as in phase flip?

Yes.  I believe the idea is that it can (if done well)  create a bit of cancellation at the off-side ear even when listening through loudspeakers, allowing approximation of the kinds of reduced levels required to achieve positions far wider than the angles to the two stereo loudspeakers.  It should also be lower in volume and a bit filtered to match what is otherwise reaching the off-side ear from the on-side speaker.  Then of course you can add back in another signal intended to simulate what would normally reach the off-side ear, delayed and filtered even more.  But each of those then become part of what is intended to go only to the off-side ear but which will also be heard by the on-side ear (because the listening is done with loudspeakers), so you have to apply the same technique for those added signals for the on-side channel in the same way, etc.  In the end, it must just be very difficult to get decent positioning with loudspeakers.

Headphones are another story, of course, and there you can use HRTF for binaural positioning (a good approximation of that for Analog Box that isn't too compute intensive would be nice to have, but I can't do it).  I still don't think it should ever make sense (in terms of physical modelling) than *any* positioning should result in no sound whatsoever in the off-side ear/channel.  So it might make more sense to have the gain reduction for the off-side channel just asymptotically approach some non-zero minimum level (with the most extreme filtering) for the most extreme position.

But whatever research you refer to, I assume it has merit, but it doesn't seem to follow any reasonable physical model or justification, any more than phase inversion would.  The amount of delay between the two ears shouldn't be much different from that corresponding to the distance between them, from that point of view (certainly kept under about half a millisecond or 22 samples).  Makes you wonder if the perceptions we get are complex auditory illusions created by some comb-filtering or something.  Way outta my expertise.

--
Keith W. Blackwell

Catalin C.

unread,
Jul 6, 2019, 4:11:35 PM7/6/19
to Analog Box
Errata:


On Saturday, 6 July 2019 19:12:25 UTC+3, Catalin C. wrote:
5 ms means you move the source 0.3 m (or 1ft) away from you.
 
Actually it would be 1.7 m (~5.6 ft).

The distance from the listener to their stereo is assumed to be 1.5 m (~5 ft)*. As an example, you induce a delay to the right channel corresponding to double this distance (so 3 m, ~9.8 ft). As the speed of sound in air is ~340 m/s, the delay is ~8.96 ms=396 sam. And at this value you get the right channel attenuated to -6 dB and so a pan of 50% L.

All that would be fine, except that I should have taken the relative distance as calculation base, so 1.5 m. For this value, we have a delay of ~4.4 ms=194.5 sam, and I've tweaked the coefficient once again to get the pan @50% and -6 dB gain. Also, while the rounded integer is fed to the delay, the precise initial value is used for panning. Again, the endless knobs work well for live tweaking.
 
Also

(*I''ve wanted to make it 2 m, but then the pan wouldn't have worked up to 100%.)
 
It would have worked now, but forget it... most people sit in front of a table with their desktop/laptop/etc and 2 small speakers, so a ballpark value of 1.5 m would work just fine. Now the usable delay is limited to ~388 samples, that's 8.8 ms... again, it's probably realistic, as I don't know yet any human being with head the size of a volleyball. :-) So, here are the new files:
jambot_33_2019-07-06-var2.ABox2
Test_Haas-var2.ABox2

Keith Blackwell

unread,
Jul 6, 2019, 5:07:27 PM7/6/19
to analog-box
I don't think actual distance to speakers is relevant in any way for positioning -- only the relative distance from a speaker to one ear versus the other, for each side.  Assuming a listener is in the sweet spot, it's really only the angle of width that matters inasmuch as it can affect the delay amount required to compensate one speaker's output from the other.  The two ears are, generally, a fixed distance apart, which ranges from 0 for a source directly in front or behind up to whatever the effective distance by delay might be for a 90-degree position to one side.  So I'm not following why you're dealing with speaker distance.
--
Keith W. Blackwell

Catalin C.

unread,
Jul 6, 2019, 5:10:22 PM7/6/19
to Analog Box


On Saturday, 6 July 2019 23:04:46 UTC+3, Keith W Blackwell wrote:
> Negative, as in phase flip?

Yes.  I believe the idea is that it can (if done well)  create a bit of cancellation at the off-side ear even when listening through loudspeakers, allowing approximation of the kinds of reduced levels required to achieve positions far wider than the angles to the two stereo loudspeakers.  It should also be lower in volume and a bit filtered to match what is otherwise reaching the off-side ear from the on-side speaker.  Then of course you can add back in another signal intended to simulate what would normally reach the off-side ear, delayed and filtered even more.  But each of those then become part of what is intended to go only to the off-side ear but which will also be heard by the on-side ear (because the listening is done with loudspeakers), so you have to apply the same technique for those added signals for the on-side channel in the same way, etc.  In the end, it must just be very difficult to get decent positioning with loudspeakers.

That would be something close to Ambisonics (or ambiophonics, the scientific concept)... yes, it is fairly similar!
There is literature on that, a scientific society is focused on it:


I liked the concept because it frees you from the sweet spot's tyranny - it becomes a... sweet line, perpendicular to the speakers' line.
 
Headphones are another story, of course, and there you can use HRTF for binaural positioning (a good approximation of that for Analog Box that isn't too compute intensive would be nice to have, but I can't do it).  I still don't think it should ever make sense (in terms of physical modelling) than *any* positioning should result in no sound whatsoever in the off-side ear/channel.  So it might make more sense to have the gain reduction for the off-side channel just asymptotically approach some non-zero minimum level (with the most extreme filtering) for the most extreme position.
 
 Just what I've been complaining about: no proper fading (or rolloff) curve, because we lack information and maths is complicated.
All ve have is one correlation. Everything else is variable.
 
But whatever research you refer to, I assume it has merit, but it doesn't seem to follow any reasonable physical model or justification, any more than phase inversion would.  The amount of delay between the two ears shouldn't be much different from that corresponding to the distance between them, from that point of view (certainly kept under about half a millisecond or 22 samples).  Makes you wonder if the perceptions we get are complex auditory illusions created by some comb-filtering or something.  Way outta my expertise.
 
Right on. That recursive cross-talk cancellation algorithm referred to at Ambiophonics and with both software and hardware implementations uses delays of up to 400us or so. It is indeed complicated because those comb filters need to be fine-tuned and this is probably left at the user's latitude, as I've noticed in using a VST plugin from hotto.de, you adjust the micro-delay, some control akin to a low-pass filter's cutoff (the algorithm gives some sort of noise) and something related to stereo field width... can't remember well now.

I said:

 as I don't know yet any human being with head the size of a volleyball. :-)

As in beach ball or whatever... really big.

HRTF is awesome and all that, but we could make do with simpler stuff that works both on loudspeakers and headphones. Not physically accurate, a bit "stylized", but still, it takes you there. That's what I intended to get. Again, I expect further feedback on what I've just done, the tweaked circuits, and I don't lose hope. :-) Mr. Blackwell, thank you for the insight.



Catalin

Keith Blackwell

unread,
Jul 6, 2019, 5:43:30 PM7/6/19
to analog-box
Many times, I just throw stuff together based on an idea with no data to back it up, totally guessing, sometimes tuning a bit, sometimes not.  It's part of my undisciplined nature.  :-)
Example -- taking that panning circuit, adding the concepts we just discussed without any rigorous testing or data, just guessing, listening to some cheesy computer speakers, etc.
Still, you might find it to be an interesting step into a useful direction.  Or not.  Here it is.
--
Keith W. Blackwell

PannerP+.ABox2
Message has been deleted

Keith Blackwell

unread,
Jul 13, 2019, 11:59:38 PM7/13/19
to analog-box
Earlier, I babbled incoherently:
> you might find it to be an interesting step into a useful direction.  Or not.  Here it is.

But that panner did some weird and, in retrospect, unnecessary stuff in a complex way.  I'm putting a simpler one in this modified version of CK's modified version of jambot 33.  The musical trajectory is mostly the same, though I added an occasional switch to harmonic minor scale, added some tempo-timed delays, added another drum, changed the sound of most instruments, added a delayed fade-in and fade-out/in (sort of) upon changing x0 (the "something completely different" button), and made the lead sometimes slide to a more appropriate note at the end of its phrase.  And there is also an experiment with a layered hyperbolic tangent function -based waveshaping limiter, which isn't really needed for this particular circuit, but, oh well, there it is.  It's like, almost the exact same music, but different-sounding, you know.  Here it is.


--
Keith W. Blackwell

jambot_33_kwb20190713.ABox2

Keith Blackwell

unread,
Jul 14, 2019, 12:15:12 AM7/14/19
to analog-box
Oops, that second panner block still had an error that made it pan in the reverse of intended direction, so the effect on the lead was to basically make it stay centered (perceptually), defeating the purpose.
Try this one instead.  Oh, sure, it probably still has other mistakes/errors, as all my circuits do.  But that one issue was corrected here.

--
Keith W. Blackwell

jambot_33_kwb20190713fixed.ABox2

Catalin C.

unread,
Jul 14, 2019, 4:01:40 PM7/14/19
to Analog Box
That last message of mine was posted almost at the same time with Mr. Blackwell's, I wouldn't have gone further in defending my initial approach. Obviously we can't escape the fact that we, in sound design, deal with virtual sound sources than develop within the confines of the loudspeakers or headphones.
Following a fruitful discussion over mail, I will present my solution, but first I have to express my total surprise...

On Sunday, 14 July 2019 06:59:38 UTC+3, Keith W Blackwell wrote:
I'm putting a simpler one in this modified version of CK's modified version of jambot 33.  The musical trajectory is mostly the same, though I added an occasional switch to harmonic minor scale, added some tempo-timed delays, added another drum, changed the sound of most instruments, added a delayed fade-in and fade-out/in (sort of) upon changing x0 (the "something completely different" button), and made the lead sometimes slide to a more appropriate note at the end of its phrase.  And there is also an experiment with a layered hyperbolic tangent function -based waveshaping limiter, which isn't really needed for this particular circuit, but, oh well, there it is.  It's like, almost the exact same music, but different-sounding, you know.  Here it is.

Depeche Mode, anyone? Really, I find it strikingly similar, the synths' texture, the harmony. I've been a long time fan.
Also, good engineering. You've used the hyperpanning (which expands the stereo image beyond the speaker line, both to the left and right) that you've told me about on mail and it's very well done. Also I'm fascinated with that AllPass8Adjustable, it makes for a deep ambient space, right now I've muted everything but the drums and they play as I'm writing. (DM all the way!... Right, now back on topic)
I've A-B'ed the hyperpanners, they're not going over the top with the stereo spread. I can see adopting the solution myself as a good alternative to mine.
It seems to be that formula before the tanh limiter that creates the slooow fade in of the entire ensemble... very surprising effect, at first.
LE: yes we can manipulate the curve with the W input... and I envision also making a copy to be used as a fade out.
All in all, a great contribution. One day Mr. Turner will come back, I think he'd like it too.

Catalin C.

unread,
Jul 14, 2019, 9:12:34 PM7/14/19
to Analog Box
So here is my block, the result of my discussion with Mr. Blackwell. I started from his mod on that HaasPan, the one redesigned with the pan input, and eventually named it Binaural Pan. The name notwithstanding, it sounds good on loudspeakers because that's how it was developed. The designation "binaural" wants to be a simple hint to the fact that it uses both level and time differences (ILD and ITD). It should sound good on headphones as well because it doesn't employ signal cancellations.
It's very similar to his version which, again, is a very good alternative. Both of them constitute a development "fork", if you want.

Advantages: What does it bring, compared to the simple panning in ABox's mixer or demuxer?
First of all, a more natural signal fading curve. It is the "-3 dB pan law", which takes into account that positioning a real source to one side of the listener will sound not only quieter in the off-side ear, but also a little louder in the on-side ear, compared to it being presented straight ahead in front of the listener. This curve gives -3dB attenuation at center and is represented in the attached image obtained from the website samplecraze.com, the article about pan laws.
Mr. Blackwell's hyperpanner uses a similar curve, with a slightly different formula that's also designed for further tuning. He gave it to me in a few simplified variants from which I've chosen the one I've introduced, along with the new method which doesn't need demuxers for fading.

So that goes for the ILD. The ITD is still represented by the alternating delays and their formula which I've modified. At 92% pan there still is some audible signal off-side, at about -24 dB level, and the ITD is 29 samples (~658us), and that would be the maximum usable delay, a figure corresponding to scientifical research results on binaural hearing.

The result is a gently expanded stereo image, noticeable when A-B'ed. I think this effect is a little more pronounced than with Mr. Blackwell's block, it's the different pan curves, probably. It also depends on the program material.

I almost forgot: Inside there is a formula that hard limits the control signal  to the interval (-1,+1). This is so you can add to the slider a tremolo LFO and then hard pan the source, if you need that, without the danger of anomalies.

Limits: It doesn't translate too well to mono; depending on certain pan positions and, again, the sonic ingredients, sources panned starting with about 15% will sound a little quieter in mono than when panned as usually, without the micro-delay. Mr. Blackwell's control seems to deal better with it, as heard by me in that demo, and I recall the delay values being in the same order of magnitude as those I use.

I'll send it in a demo - again the #33 with that simple mod of mine. This time I've bussed the pan sliders so they control both variants, thus the A-B is complete, we can move the sources at will.
The separate block is already mirrored in the public repository on my Drive, under the \Controls subdirectory:


In short: We now have some cool stereo controls. I'm glad we've done it. Now it will be a little easier for anyone to assemble jambots.


Enjoy,


Catalin
levelPan-1030x732.gif
jambot_33_CK_binaural_pan_2019-07-14.ABox2

Keith Blackwell

unread,
Jul 14, 2019, 11:46:39 PM7/14/19
to analog-box
Thanks for your willingness to do some research and offer something to this forum, CK. 

Your use of [my] formula blocks in the panner (such that U and V are both given the pan input amount) is unexpected and, frankly, I haven't a clue what that ends up doing, since I originally intended those to be either a constant 0.25 or adjusted amounts to skew the resulting cosine curve.  That's what I'm doing in my latest panner block to get a hyper-pan, but then I decided to add in another W amount just to push the center gain level back up to the expected -3dB since my skewing adjustments (for hyper panning) had dropped it a bit.  I'm doing it with a triangle shape (how close to 0 the pan is), but since it's such a tiny amount being added back in, I figure no one will be able to notice that ugly triangle shape.  Anyway, I haven't analyzed how your use of U and V end up really working; I suspect it isn't really what you what or intend, but I could be wrong.  It is probably related to the faster pan away from center.

> All in all, a great contribution. One day Mr. Turner will come back, I think he'd like it too.


Glad you liked the changes to Jambot33... but I've already found some mistakes in my circuit that really need to be fixed to make it more listenable...

Defect #1:  The piano quantizers are fed by demuxers whose S input was connected to x0, but x0 is gradually changing from +1 to -1 or from -1 to +1 when you click the "something different" button, so I should have instead used the x1 signal, which is already instantly at the target value.  Since I messed that up, you can here out-of-rhythm piano notes moving up from low frequencies as the values get adjusted gradually from two alternative inputs.  Clearly that was a mistake.  More about x0 and x1 below.

Defect #2: The guitar is too loud ... find the knob under the guitar circuit's top display readout that says 59.372%, and reduce the amplitude-setting knob under that read-out from 50% to about 20% and it sounds much better, methinks. 

Defect #3: There is also too much feedback on the guitar delay, but you have to open that top "delay 5-6 a" box at the very top and change the bottom knob in there from the too-strong -75% or so over to more like -45% or so to be more reasonable.

> It seems to be that formula before the tanh limiter that creates the slooow fade in of the entire ensemble... very surprising effect, at first.

It's the stuff to the left of it:  the x1 resetting that little divide-by-1 counter which then sits at 0 output until the next r2 signal turns it on again -- that goes through an RC (whose T time input is set to 1/40 of the master clock tempo, b2) to allow it to slowly move from 0 to -1, and that value is squared (making it positive, not that it matters much) and that becomes a sort of master amplitude (the a input), and I have a knob there intended to get the whole shebang into a reasonable range (with all the summing certain to go over 100%).  Of course, the real timing of when the next r2 happens is not in any way tied to the moment you press the "something different" button, so it's kind of a hack to do it that way at all -- I think it's why the drums never completely fade out. 

And that rather dumb formula block is just a way to easily get crazy amounts of boost of the signal by pumping up the W value (w>0.8 or so is just ridiculously crazy gain) since it is going to be fed to tanh.  Cleaner sound demands turning the W fader all the way down to -1, or eliminating the limiters, which really aren't all that useful here anyway.  Without them you would just lower the constant multiplier knob before that block, which is currently set to about 61% since that was what seemed to avoid hitting the sound output device's overdrive indicator before I added the limiter, but I've since changed so much that it is probably no longer optimal.  You can also watch the limit indicator (volume readouts, from subtracting limited signal from original), and adjust until they show that the limiter isn't doing much of anything (maybe set the limiter threshold to a higher amount, like 95%, so they only affect that highest 5% and beyond anyway).  By the way, I used to often just use oscillator blocks with a Phase mode (P input) as a way to apply a sine curve shape as a form of saturation, but it of course doubles back and introduces unique high frequency harmonics that don't sound like anything real (for signals beyond unity), so I'm trying to force myself to move away from that bad habit, and my first attempt to enlist tanh here is a step in that direction.  :-)

That x1 signal is controlled by that "something different" button.  It's signal also goes through a slightly slower RC to get a new x0 signal (original circuit had x0 coming straight out of the button).  Note that when you first press PLAY, that RC has been initialized at 0 and has to rise to either +1 or -1, so I figured it was a convenient way to control some amplitudes, similar to the way that x1-reset counter does on the master amplitude (the counter was needed to introduce an initial delay to avoid nasty glitches from being audible, from all the delays).  But anything affecting frequencies to be played should be a clean switch, which means using x1 instead of x0 (thus the defect #1 above about the piano scales).

> I envision also making a copy to be used as a fade out.

Just resetting that initial counter block that feeds it should cause a fade-out (just don't retrigger it by r2 as is currently done).  In fact, if we had a "stop/play" button somewhere that could AND that with the r2 as the trigger of that counter.  So then if you pressed the button to make it stop, it should fade out and go away.  I think.  But turning it back on should, realistically, also reset all the clock timers.

BTW: the sweeping of the filter on the piano is kind of weird, certainly adding a "sound", but it can be adjusted to taste -- just be careful that the filter frequency never drops below 0 or you get R values > 1 by that formula block there and it howls at the moon like a werewolf or something.

This is the kind of nonsense I end up with every time I mess around with any of those jambots.  I'll mess around with them off and on for days.  Half of what I end up with is garbage, usually.  Sometimes it's an improvement, to my ears, but it probably takes 10 times as much CPU as Andy's original (and always elegant) circuit.

--
Keith W. Blackwell

Catalin C.

unread,
Jul 15, 2019, 5:36:53 PM7/15/19
to Analog Box
Your use of [my] formula blocks in the panner (such that U and V are both given the pan input amount) is unexpected and, frankly, I haven't a clue what that ends up doing, since I originally intended those to be either a constant 0.25 or adjusted amounts to skew the resulting cosine curve.

Just take another look at it, the pan control signal is bussed to x0 giving the a term and x1 is the one that feeds the 0.25 value to both U and V. Me and my use of busses... should've given them different letters.
And playing with those amounts is absolutely non-trivial. I'll leave mine like that for some time, they give values extremely close to the graph anyway.
 
Glad you liked the changes to Jambot33... but I've already found some mistakes in my circuit that really need to be fixed to make it more listenable...

Defect #1:  The piano quantizers are fed by demuxers whose S input was connected to x0, but x0 is gradually changing from +1 to -1 or from -1 to +1 when you click the "something different" button, so I should have instead used the x1 signal, which is already instantly at the target value.  Since I messed that up, you can here out-of-rhythm piano notes moving up from low frequencies as the values get adjusted gradually from two alternative inputs.  Clearly that was a mistake.  More about x0 and x1 below.

And I thought it was intentional :-) ... You see, there's this DM instrumental tune, "Jazz Thieves", with a fingered bass for rhythm and baseline, a weird evolving pad which appears hard left, then hard right and so on, and a seemingly insecure marimba lead. That pad thing seems out-of-rhythm at times, or maybe it's programmed to give a rubato of sorts, I don't have the patience for it right now. I think your mod reminded me of this creation, at least for the first audible bars.
 
Defect #3: There is also too much feedback on the guitar delay, but you have to open that top "delay 5-6 a" box at the very top and change the bottom knob in there from the too-strong -75% or so over to more like -45% or so to be more reasonable.

Oh, I didn't notice, it just seemed too... loud; besides, overall, it's quite "crowded" in there, clearly. Well, my name ain't Dave Pensado...
 
> It seems to be that formula before the tanh limiter that creates the slooow fade in of the entire ensemble... very surprising effect, at first.

It's the stuff to the left of it:  the x1 resetting that little divide-by-1 counter which then sits at 0 output until the next r2 signal turns it on again -- that goes through an RC (whose T time input is set to 1/40 of the master clock tempo, b2) to allow it to slowly move from 0 to -1, and that value is squared (making it positive, not that it matters much) and that becomes a sort of master amplitude (the a input), and I have a knob there intended to get the whole shebang into a reasonable range (with all the summing certain to go over 100%).  Of course, the real timing of when the next r2 happens is not in any way tied to the moment you press the "something different" button, so it's kind of a hack to do it that way at all -- I think it's why the drums never completely fade out. 

Aha. Maybe we'll have some short topic on creating fade-ins and -outs. Back in spring 2017 I made another mod of the #33, where I messed with the midi values, I guess I was trying to make it play in major all the time ('cause it was spring, right?), and manage to detune the instruments as a result, but I wanted so much to make the sound fade out, so I employed an envelope fashioned in a descending curve with 8 seconds time, it's that second image.
I'll have this mod run every now and then to solo the instruments and analyze them. If they have given me the aforementioned impression, then they're worth the interest. It all sounds very dramatic, maybe even cinematic, given that rhythm break.
Oh, I forgot about something else in this mod that equally impressed me: no sound clipping! That limiter is a keeper. 

It's my pleasure to share, and I don't forget I still need to learn.

Coming back soon,


Catalin
Binaural_Pan_new.png
j33_fadeout.png

Keith W Blackwell

unread,
Jul 16, 2019, 11:03:08 PM7/16/19
to Analog Box


On Monday, July 15, 2019 at 3:36:53 PM UTC-6, Catalin C. wrote:
Just take another look at it


Oh, duh!

Aha. Maybe we'll have some short topic on creating fade-ins and -outs.

The Keith_ChoirBot_5b circuit that I posted quite a while back had a control to start recording to a file with a fade-in, and then (upon toggling) a fade-out before stopping the recording.  It was on the far left side next to the output device and used a module, but I don't remember what all the point of its guts were.   I tried to run it on my mom's Windows 10 computer and it was doing well over 150% cpu (even past 300% some of the time) -- unlistenable.  I found I could cut out all sorts of wasteful and unnecessary sub-circuits and get it to just barely play, and with no loss of intended effects or musicality.  For example, all that reverb rigamarole could be replaced with the use of just a single EON block; the diffusion AP's after the strings were totally unnecessary when using heavy reverb anyway, and so on and so on.  That's a strong indictment of how much superfluous circuitry I accumulate in my jambots. :-(

--
Keith W. Blackwell
Reply all
Reply to author
Forward
0 new messages