STS Sandcastle Yamaha OPL3 PM Oscillator
  • This is a emulation of the Yamaha OPL3 four operator PM synthesis module as used in the Akemie's Castle eurorack module. This version offers a single voice. It has 4 selectable algorithms with various combinations of phase modulation and additive synthesis. Each operator has a level control, 8 selectable waveforms and a frequency multiplier of 0.5, 1-10, 12, and 15 (the 0.5 multiplier displays 0). There is a feedback control that provides feedback for the first operator in each path. Thanks to @viilis for the original idea and @RobertSyrett for the name and encouragement. You guys are the best!
    Screen Shot 2018-02-01 at 4.37.17 PM.png
    3256 x 2128 - 713K
    STS Sandcastle V1.1.audulus
    201K
  • Great! A nice little FM playground.
  • Interesting choice of multipliers in that chip.
  • I don't know why they left out 11 and 13. The waveforms are actually generated by a wavetable so maybe it was some limitation of the indexing rate.
  • And why did they leave out 1:sqrt(2) ? That's how you make bell sounds! @stschoen, This is super cool. I am inspired.
  • I derive the multiplied frequencies from the original phasor using a mod statement. Off the top of my head I think that I might be able to use the same approach for non-integer multipliers. I’ll have to do some experimenting.
  • @stschoen, could you talk me through your thought process for designing the switch for the algorithms? It looks really elegant, but trying to reverse engineer it for some alternate algo's I'm finding myself losing the thread.
  • Each operator module has a phasor input, a phase modulation input and a waveform output. The phase modulation input of each module is connected to a mux that selects the source for the modulation. So for algorithm one, the module 2 phase input is fed from 1’s output, 3 from 2, etc.. Module 1 is never fed from another module so it has no mux attached. It is always at the start of a chain so it has its phase input connected to its output through a feedback loop. If the module is leading the chain like 3 is in algorithm 2, its output is also connected through a feedback loop via the mux to its phase input. There is another mux that selects the source for the output. For A1 the output is 4, for A2 it’s 2+4 etc.. The select knob is connected to the select inputs on all the muxes. There are 4 unused slots on the muxes so you could add some additional algorithms by connecting them up and changing the range on the knob. It was pretty clear until I added the feedback loops. The mux feeding 2 is to the right of module 1, the mux feeding 3 is to the right of 2 etc. I should really do some better labeling and clean up the wires a bit.
  • Awesome, I think that explains it pretty well :)
  • I've re-arranged the internals to make the unit a little clearer. I realized that, in this design, the phase modulation for operators 2, 3 and 4 is either connected to the previous operator or has internal feedback and operator 1 always has feedback. I combined the multiplier and feedback with the operator and made a gate to select either the PM input or internal feedback. That allowed me to get rid of the three muxes I used for routing. Now one demux drives the display and switches the gates on each operator. A mux still switches the combination of outputs. I also added some explanatory text to the design. Hope this is a bit easier to follow. The UI and operation is unchanged.
    STS Sandcastle V1.2.audulus
    234K
    Screen Shot 2018-02-02 at 11.48.50 AM.png
    3010 x 2014 - 1008K
  • Nice, the cascaded signal paths is definitely easier to track.
  • I modified the multiplier logic to allow for multipliers from 0.1 to 15 in 0.1 increments. I also built a version that uses 4 phasors and allows an arbitrary multiplier for each operator. It's not significantly more CPU intensive but, because the phase relationship between the oscillators is arbitrary, you can get phase cancellation between the chains when they are added. This makes the sound vary considerably and I haven't come up with a satisfactory solution as yet. I guess I need some kind of automatic sync. Suggestions are welcome.
    STS Sandcastle V2.0.audulus
    361K
  • for the sync, you can just have a sync input that goes to all the phasors. Then, when patching, you can just send a very intermittent gate to the Sandcastle to keep it kosher.
  • @stschoen Did you mean for the m/10 to be connected to the mult input – otherwise it's quite a range!

    Playing around with it a bit I think I prefer a straight 1–16 multiplier, or is that being boring? The 0.1 increments (when reduced/10) do add some nice grit on the inbetween steps though – perhaps a way of reintroducing some of the noisiness of the original module (see Mylar's video at around 5 min.) in a different way?
    STS Sandcastle V2.0:10.audulus
    362K
  • @Rudiger I noticed that too, I think the integer ratios are pretty important for the carrier operators but you can get more flavor with the fractional numbers. Also, have you tried dialing the amplitude of your envelops way back? You can get some movement in the overtones without things getting too crunchy.
  • I added an external sync to the multi-phasor version and also added a toggle for each operator to force it to a unity multiplier. When the toggle is engaged the operator syncs to the un-phasemodulated operator 4.
    Screen Shot 2018-02-02 at 4.55.49 PM.png
    2246 x 1732 - 509K
    STS Sandcastle V3.0.audulus
    247K
  • @Rudiger, in order to obtain the 0.1 multipliers I divide the input frequency by ten before feeding it to the phasor. The actual multipliers range from 1 to 150, but because the phasor is running at 1/10 the desired frequency the effective multipliers are from 0.1 to 15.
  • @STS Yes – just in the V.2.0 example above the division by ten was only going to the display and not to the phasor.

    The smooth dial of your latest example is also interesting. But then there's also something nice (and useful!) with the stepped increments. Difficult choice.
  • @stschoen Aah, OK – I see what you mean. I'd somehow overlooked that. If you take a higher input frequency, then sound-wise, from 0 to 0.8 gives you an octave in V2.0. That's what had me confused.
  • Fooling around with version 3. Definitely a wide range of sounds.
    STS Sandcastle V3.0 demo.audulus
    993K
  • After playing with all three variants I think I like version 2 the best. You can get some pretty funky sounds from the operators in version 3, but version 2 has fine enough steps to get some dirt but it's still easy to get musical harmonics locked in. I cleaned it up bit and put some trimmers in to cut back the level when an operator is modulating another and reduced the feedback level so you'll have a bit more fine tuning.

    04:20 PM - Minor change to the "saw" waveform to make it less curved.
    STS Sandcastle V2.2.audulus
    207K
  • @stschoen I agree with the preference for version 2.

    For what it's worth here are my micro tweaks of what was version 2.0. I added a button switch as I find it quite nice to cycle through the algorithms in that way and the multipliers are also divided by 10. I think I prefer the pitch range that way actually. And the noisiness.

    STS Sandcastle V2.0r.audulus
    374K
  • I agree that a button is a better way to switch algorithms, but the knob can easily be modulated. Although you can link triggers to a MIDI note it’s not very convenient if you are playing a keyboard. The knobs respond to CC messages which works a bit better for me. One the great things about Audulus is the ability to customize patches to suit your preferences.
  • Fun with version 2.2.
    Screen Shot 2018-02-06 at 11.58.25 AM.png
    2174 x 1674 - 1M
    STS Sandcastle V2.2 demo.audulus
    1M
  • Wouldn't run on my iPad so I simplified it some for the iPad.
    STS Sandcastle V2.2 demo iPad.audulus
    1M
  • Fun to play around exploring the Sandcastle timbres a little. Here’s the same demo patch taken in a slightly different direction.
    STS Sandcastle V2.2r demo iPad.audulus
    1M
  • (How did we ever manage without the Turing Machine?)
  • @rudiger we used runglers back in my day!
  • @RobertSyrett In my mind I somehow think of the Turing Machine for generating notes and the Rungler for generating (chaotic) wave(form)s. I realize that that's not entirely correct, but those seem to be two slightly different directions/use cases.
  • Totally! They are both shift registers but it's all about what speed they are running at and how you quantize the output.