**Another Day, Another Oscillator**

Got an interesting variant running yesterday, nothing super new but the specific take and arrangement are:

I've struggled with the modularity of my oscillator code, and this is the most practical and efficient arrangement of the subroutines so far.

At top is the sine unit, just a phase accumulator, PM (phase modulation) input, and polynomial-based sine calculation, 22 cycles.

In the middle is the PM unit, which instantiates a sine unit, cross mixes a 1/2 scaled version of the sine with a squared and offset version of the sine, and then comb filters the result. The squaring doubles the frequency, the offset removes the offset from squaring. I found the offset to be troublesome to leave in, indeed I believe it caused me to previously abandon this route prematurely. There is some favoring of the "all" harmonics path via the "odd" control, and some interaction with it and the "harm" control, but I think I can live with it. This takes 35 cycles.

At bottom is the full-blown oscillator, incorporating a PM unit and another sine unit. The PM output is modulated by the operating frequency (through a polynomial, to prevent aliasing) and the harmonic level. The external PM input is cross mixed with the PM output, and this forms the PM input into the PM unit. The oscillator PM output is the PM input to the sine unit, which gives us our audio. The PM unit frequency is multiplied by 2, then multiplied by [0.25:1) hmul, giving a range of [0.5:2) or +/-1 octave. Total is 81 cycles.

Above shows the frequency offsets and audio mixing. Oscillator 0 and 1 can be additively offset from each other (to give a steady beat between them regardless of pitch), and the internal PM units can be shifted together +/-1 octave via hmul off of the offsets. This combination gives a lot of swirly / harsh sounds. Oscillator 2 can be entirely offset +/-1 octave, as can it's PM unit from this with a separate hmul control knob. Osc 0 & 1 are mixed with a fixed 0.5:0.5 ratio, and cross mixed with Osc 2 via a knob.

Above shows the interconnection of the oscillator PM I/O. Tried a bunch of configurations, this one seems the most useful. Breaking the loop somewhere can give mellower results when cranked up, but in the end the difference wasn't enough for me to want to include it. It's also somewhat problematic breaking the PM loop and still having the knobs remain functional through all possible settings (particularly the osc 0 & 1 and osc 2 cross mix).

The more "normal" knobs are on the first UI page, with all the "crazy" offsets and such on the second page. This is 6 operator FM, maybe 9 if you count the squaring operation (there are a total of 9 sine waves "in play"). I don't think anyone can accuse the D-Lev of not being able to do buzz-saw / spacey sounds! You need 3 oscillators to sound fairly complex, anything over that is heading into mush territory.

**[EDIT]**

Some further progress with the new oscillator, and with the noise pulsing code:

- Fixed the odd knob harmonic droop @ center.

- Touched up the fm knob harmonic droop @ center also.

- Noise puls knob now [-63:63], where neg values use NCO + PM.

- Doubled noise puls knob range: 48dB => 96dB.

- Moved osc noise pulse code over to thread 4.