Roland Alpha Juno-2 pwm sawtooth

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Gordonjcp wrote: Wed Jan 08, 2025 10:15 pm I had a bit of a think about it, and after poking away at some code I came up with a rough proof-of-concept oscillator plugin that demonstrates what I said about counters and AND gates making up the guts of the Alpha Juno's DCOs.
This is really neat!

I'm guessing though that you could just use this code to generate wavetable frames for the oscillator shapes? Would there be any reason over that to generate and play them on the fly like you're doing here?

Guessing also that playing them on the fly would also require PolyBLEP to combat the aliasing.

Post

JustinJ wrote: Thu Jan 09, 2025 5:33 pm
Gordonjcp wrote: Wed Jan 08, 2025 10:15 pm I had a bit of a think about it, and after poking away at some code I came up with a rough proof-of-concept oscillator plugin that demonstrates what I said about counters and AND gates making up the guts of the Alpha Juno's DCOs.
This is really neat!

I'm guessing though that you could just use this code to generate wavetable frames for the oscillator shapes? Would there be any reason over that to generate and play them on the fly like you're doing here?

Guessing also that playing them on the fly would also require PolyBLEP to combat the aliasing.
Thanks :-) It was fun to write!

I suppose you could generate wavetables with it but you'd have trouble with the PWM ones - you'd have to generate them "on the fly" every time you adjusted the settings and you'd need something that'd play them as loops. You'd probably need to multisample heavily otherwise you'd end up with the PWM rate jumping about wildly, and crossfading between multisamples would give some odd effects with two different PWM rates mixed! You'd probably get some really good rich pads doing that.

PolyBLEPs would be a good way to antialias it, I just didn't bother because I was more interested in seeing if my guess about the AND gates made sense. The neat thing about PolyBLEPs is that if you have a bunch of waveforms in sync and in exact octaves you only need to compute for the highest-pitched waveform - they all change in the same point between samples. This is where I'd like mystran to wade in, but if you have a sawtooth osc and you want to add a squarewave sub osc, the BLEP when the saw resets will be in the right place to antialias the sub osc too, as long as you pay attention to phase. I guess what I'm trying to say is, if you generated BLEPs only when the "oct+3" square flipped you could apply those to everything except the PWM gate, which would need its own PolyBLEP because it is not at the same pitch as the square - as the PWM moves it's either increasing or decreasing in pitch and the PolyBLEP needs adjusted to suit.

Post

Gordonjcp wrote: Thu Jan 09, 2025 7:28 pm This is where I'd like mystran to wade in, but if you have a sawtooth osc and you want to add a squarewave sub osc, the BLEP when the saw resets will be in the right place to antialias the sub osc too, as long as you pay attention to phase.
You don't really need to pay attention to phase if you generate square sub-oscillators the same as you would in hardware: whenever the oscillator resets, increment a counter. The least significant bit is one square one octave down and each higher bit is one additional octave down from the previous.

That said, with the "pwm sawtooth" waveforms, in addition to the 1st order BLEPs for the actual jumps, you also need 2nd order BLEPs for the slope changes as the "cut" parts of the PWM waveform are flat.

Post

Gordonjcp wrote: Thu Jan 09, 2025 7:28 pm I suppose you could generate wavetables with it but you'd have trouble with the PWM ones - you'd have to generate them "on the fly" every time you adjusted the settings and you'd need something that'd play them as loops. You'd probably need to multisample heavily otherwise you'd end up with the PWM rate jumping about wildly, and crossfading between multisamples would give some odd effects with two different PWM rates mixed! You'd probably get some really good rich pads doing that.
It's veering off the intended application I think, but following it through using wavetables you'd sacrifice audio rate modulation (of PWM) and dynamically regenerate and anti-alias every 64 samples or so using FFT->IFFT. Crossfading over 64 samples between two different pulse waves means you get an interpolating increase on one side of the pulse and a decrease on the other depending - IMHO you don't really hear it...although I'd have to try it again and really listen. Giving up audio rate is probably fine as if you're modulating the PW with an LFO there's a good chance that LFO isn't that fast. I mean, it's called an Low Frequency Oscillator for something right? :wink:

I don't have a Juno-60 at hand, closest I've got is Diva which seems to closely model this oscillator. Not all the sawtooth combos use PWM...is that right?

Post

JustinJ wrote: Thu Jan 09, 2025 10:15 pm I don't have a Juno-60 at hand, closest I've got is Diva which seems to closely model this oscillator. Not all the sawtooth combos use PWM...is that right?
That's correct.

It's been 14 years since we did our analysis though, but I think to remember that we concluded that the "comby" waveforms are made differently than Saw PWM. They use bits from the divide down counting register, which do not move or change shape. Likewise, The sub oscillator is derived from higher bits of the same register IIRC, in the various combinations.

I'll be damned if we got this wrong, but I'd also be happy to reexamine our Alpha Juno 2 in that respect, if I find the time... (currently busy in trade show prep)

Post

Sendy wrote: Thu Sep 11, 2014 3:34 pm The octave higher pulse is amplitude modulated, not ring modulated. When the pulse is high, the original sawtooth is let through; when it's low, the waveform goes low. Sometimes this is called "combing" a waveform as you're inserting regular holes in it (not to be confused with combing in the spectral domain, i.e. with a comb filter). The lines are straight and hence it's easier to see without the highpass filtering.

You can make this family of waveforms with any synth with sync (to phase lock the oscillators), two oscillators, ring modulation and a mixer (to make AM out of RM).

EDIT: May as well trot this out again :hihi:

Image

These waves were made in the freeware TAL Noisemaker, but any decent synth will do the job. DIVA also emulates these waves with it's DCO oscillator section. (Well, at least, the combed saw, a la Alpha Juno)

Can you expand on what you meant by this:

You can make this family of waveforms with any synth with sync (to phase lock the oscillators), two oscillators, ring modulation and a mixer (to make AM out of RM).

Thanks!

Post

JoeLowery215 wrote: Sun Mar 23, 2025 8:29 pm
Sendy wrote: Thu Sep 11, 2014 3:34 pm You can make this family of waveforms with any synth with sync (to phase lock the oscillators), two oscillators, ring modulation and a mixer (to make AM out of RM).
Can you expand on what you meant by this?

Thanks!
There are a lot of nuances at play including exact phase offsets and such for accuracy. You also will absolutely require a high quality 2x oversample and anti-aliasing filter on the quadratic (AM/ringmod/multiplication) itself to avoid insane amounts of aliasing.

Suffice it to say that if you can reproduce the primitive shapes such as pulses at exact frequency multiples, then, hypothetically at least "in theory" you can reproduce the ideal result by combining those shapes.

In reality though the circuit doesn't work that way at all. Any digital system includes a variety of high-frequency effects associated with slew rates and propagation delays. In the Juno synthesizers and many relatives this leads to a comb-filter-like reduction in brightness between oscillators and waveforms even from the same or synced oscillators. So just because we can create an idealized version that mimics things somewhat, that isn't 100%.

In terms of wavetables things can be much easier. So long as we can compute the idealized shapes as precisely as we want, the entirety of the error of content output from those wavetables will be based upon the oscillator's methods alone. The wavetables themselves will represent a precise frequency/phase spectrum and can reproduce any arbitrary shape or spectrum with that many "bins". Still though that's aiming for the ideal and not for an authentic reproduction.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post Reply

Return to “DSP and Plugin Development”