The challenge to creating something like this is determining the frequency of the incoming bass note. Audulus has a zero-crossing detector, but I don’t know if it would be fast enough to work. You would need to low-pass filter the bass input to isolate the fundamental pitch, then use the zero-crossing detector to get the frequency. An envelope follower on the input could generate the dynamics. Once you have a frequency and level you would drive a set of synth modules.
You might be able to run the pitch values from the zero-crossing through a low pass filter to smooth the signal and quantize the output to the chromatic scale.
Similarly you can lowpass the envelope follower to get the amplitude of the external signal but not the noise.
I’ve been running my u-Bass into Audulus doing exactly what you suggest. It works (kinda). I added an S&H node to hold the pitch value when the signal drops below threshold and some gain adjustment to get useable levels. One problem I haven’t gotten past is if you filter the pitch enough to remove most of the noise you get a bit of glide between notes. The pitch is a bit unstable as well. It does track reasonably well though. I used an FSK oscillator pitched up an octave as output for test purposes.
Bass synth.audulus (66.1 KB)
You could quantize the pitch output instead of filtering it, and remove a lot of the noise, but it would make slides a bit funky
I have a fretless acoustic bass.
You definitely wouldn’t want to quantize that (although it would make it easier to stay on pitch ).
@futureaztec that first one in the video sounds a lot like the “Bite” filter in the Chicago bass monosynth in Gadget. I would be interested in doing all of those, but I would also settle for finding the knowledge to build just one of those conversions, myself. Holy ! @stschoen @robertsyrett where do you guys learn this stuff??? It is incredible how much knowledge you are able to just spout off regarding so very many subjects that come up from myself and my peers so quickly after posting questions. You guys are like next level on this design and engineering stuff!
Yes. I should have been clear. Obviously just one of the settings on that pedal would be interesting. I think this is the strength of Audulus – being that it is modular, you can add and subtract features/algorithms. I have been swamped, so I haven’t even checked out the build above yet.
The big challenge here is accurately tracking the pitch of the bass. The sounds themselves are simple by comparison since they’re fairly standard sorts of bass synth patches. I think Audulus can do the sounds with a little tweaking, but tracking the frequency of an instrument input is more challenging. The zero crossing detector will output a fairly accurate frequency for a simple waveform, but it has a lot of trouble with the signal from an actual instrument. Easy to understand if you think about how it works. It simply counts the number of times that the input signal crosses zero over a short period of time. Divide the count by the length of time and you have a frequency. OK for a simple waveform but think about what happens when you play a note on the bass. Before the note you have some noise, so the zero-crossing detector outputs a series of random frequencies. Then there’s a starting transient, where you have not only the fundamental pitch but a rapidly changing set of higher harmonics plus some string noise etc. Then the note settles down to a slowly decaying signal both in timbre and volume until you’re back to noise again, or another note is played. In order to generate an output pitch you need to determine the fundamental frequency of the played note in a very short period of time or you will have anoticeable lag in the response. You also have to track the pitch of the note as it decays. The volume envelope is pretty straightforward fortunately.
I find the best way to develop something like this is one step at a time. I started by feeding the signal from my bass into the zero-crossing detector and looking at the result. First I needed some more gain on the bass signal to get a reasonable signal level. Boosting that helped the pitch output but was it still jumping all over the place. So next I added a low-pass filter in between the bass input and the zero-crossing detector. That helped quite a bit. I tried sending the output pitch into an oscillator and found that the pitch was still was too noisy to be useful so I added a low-pass filter to the output of the detector. Better, but if I lowered the filter cut-off enough to remove the noise, I got a noticeable slide between the notes. When the note decayed enough that the detector stopped working the oscillator pitch would go off the deep end. which caused problems when the next note was played because of the slide, so I added a S&H node that grabs the frequency as the signal level drops and holds it until the volume rises on the next note. BY this time I had something that would play the note that the bass played for the most part, but nowhere near as accurately as the pedal. To get closer I think you will need a more sophisticated way to track the incoming frequency than we have available in Audulus, at least at the moment. Some type of phase locked loop would be my guess.
Good to know. As I read through what you wrote I had my own ideas of how to approach those problems theoretically – in the sense that I do not program so they appear somewhat as logical problems with potentially simple solutions that are hard to see. But I trust that you would have probably already eliminated these approaches as having further difficulties.
What is it that makes a node what it is? Is it that a node is something @taylor programs in C, that makes particular tools available?
For the PLL approach, I guess you modulate the frequency then demodulate it? But since this needs to be done digitally it presents a lag challenge?
It makes me think of A.I., in terms of statistical approaches. So one could start of with some approximate success, say using a likelihood function, but then check the performance of the calculations against a proper record of the signal. The algorithm “practices,” or you run “practise,” and a corrective aspect adjusts based on running the same program 100,000 times or whatever.
Nodes are indeed written in C by @Taylor. Each node represents a series of calculations performed on the audio stream. When you build a patch, no matter how complex, under the hood it’s only a mesh of nodes and connecting wires. Modules are for our convince but are essentially ignored by the audio engine. The audio engine runs in a loop and each time through the loop it executes the code for each node to generate the output audio. Ultimately what we can construct in Audulus is limited by the nodes we have available. Fortunately @Taylor has provided us with an excellent set of basic components to process audio, however we do not have the capability to construct new nodes so there are some things that are difficult or impossible to do within Audulus. That doesn’t mean they can’t be done digitally, I’m sure the pedal is a completely digital unit.
A phase-locked loop (PLL) is an oscillator that will “lock onto” the frequency of an incoming periodic signal. They are used in many electronic circuits. For example an FM radio signal is a radio frequency carrier that is modulated by an audio signal. In order to unmodulate the FM carrier, it’s useful to have a local oscillator running at the same frequency as the carrier so a PLL circuit is used. When the radio is tuned to the station, the PLL locks on to the carrier frequency and the audio signal is decoded. They can certainly be constructed digitally but so far I’ve been unable to build a working version in Audulus. I’m not sure that’s how the pedal and similar devices work in any case, its just a guess. There are other ways you could approach the problem. A fast Fourier transform will separate a signal into its sine wave components. They are used to create the spectrum displays in many DAWs. Perhaps that’s how the pedal determines the fundamental pitch. It might be worth doing some additional research.
AI technology could certainly be applied to this problem. It’s an interesting idea. You '“teach” your pedal to accurately recognize your instrument.
FWIW, best-in-class pitch tracking doesn’t look at the fundamental but at higher-order harmonics instead which removes the latency associated with detecting pitch of low frequency notes.
You have a Kala U-bass?
Yeah, it’s a nice little instrument. I have a battery operated Roland bass cube that I use with it with 4 x 5” drivers.
The Roland also makes a nice portable synth amp. You can set it for flat response and it’s got pretty good bottom end for a small battery unit.
I’ve thought about getting one of those to use as my camping/outdoors bass, but have never actually played one. They sound really good for the size.
I’ve thought about the portable Roland amps for use with my modular eventually. Modular case is currently out of commission sadly while I redo the power unit on it
I have the MicroCube Bass RX. It runs on AA batteries and I use it with my UltraNova all the time. it runs for hours on a set of batteries. Really nice little amp. Even has reverb and chorus effects.