Sequencing analog synths with Sonic Pi

Hey,
I started to look into sequencing not only pitch but other modulation options on my Vermona Perfourmer synth, have a look:

There´s some issues, e. g. the values for filter cutoff don´t cover the range on the synth, but there´s one BIG issue here, which is the timing of the sequence which seems shuffled in a strange way when it should not.
Any hints are welcome :slight_smile:

1 Like

Interfacing with analog synths is my primary goal for SPI. I did a quick proof of concept before I started working on a more extended SPI project. I found that use_real_time helped a lot with timing in my live loops, so maybe you want to look into that.

1 Like

@blipson
Thanks! Could you post an example how you do the sequencing?

Here’s the proof-of-concept I made a few weeks ago to receive MIDI from an external 4-channel sequencer transmitting on channels 1, 2, 3, and 11. I direct those channels to SPI’s built-in piano.

live_loop :midi_piano1 do
  use_real_time
  sync "/midi:mioxl_din_5:1/note_on"
  synth :piano, note: ring(:d1, :e1, :f1).tick
end

live_loop :midi_piano2 do
  use_real_time
  sync "/midi:mioxl_din_5:2/note_on"
  synth :piano, note: ring(:d3, :e3, :f3).tick
end

with_fx :echo do
  live_loop :midi_piano3 do
    use_real_time
    sync "/midi:mioxl_din_5:3/note_on"
    synth :piano, note: ring(:d4, :e4, :f4).tick
  end
end

with_fx :reverb, mix: 0.9, room: 0.8 do
  live_loop :midi_piano11 do
    use_real_time
    sync "/midi:mioxl_din_5:11/note_on"
    synth :piano, note: ring(:d5, :e5, :f5).tick
  end
end

Here’s MIDI note on/off being sent to the MIDI in of a software sample player on the same computer:

live_loop :horn do
  midi_note_on :e2, velocity: 40, channel: 3
  sleep 0.5
  midi_note_off :e2, channel: 2
end

live_loop :bass do
  midi_note_on :e1, velocity: 50, channel: 3
  sleep 1
  midi_note_off :e1, channel: 3
end
1 Like

Thanks! The example for sending midi is essentially the same as in my code example. I will try this in different constellations to find out where timing problems might arise.

Oh, right, I see I only used use_real_time for my MIDI in example. I’ve done nothing with these beyond proving to myself that external synths are workable and making a program to work with them is worth doing. I’m maybe a few weeks from getting my program to a practical testing phase with external synths. It would be wonderful to discover that SPI’s onboard synths sound pretty much as good as my fancy expensive stuff, at least for live performance as opposed to from my studio monitors that blast high fidelity at me from point blank range.

2 Likes

I did not experience timing issues when sending midi to Ableton live, I guess I need to do some more tryouts with differing setups.
I´m slowly buying more hardware synths and do like them better than the internal Sonic Pi ones.

I guess that’s inevitable. What’s more, you can’t beat having direct access to all the knobs on a hardware synth while you’re sequencing it from SPI.

1 Like

This is very much my setup - although I do use the internal sounds from SPi too - it’s particularly good around playing samples and being a rhythm/groove/drum machine with infinite flexibility. Very nice. Lots of other good things too, like basslines where you maybe want simplicity, and little arpeggio lines and in-tempo warbles.

I definitely don’t use use_real_time in my loops, but rely on SPi’s great strength which is the scheduling model. This remaining issue is latency - and my answer here is, instead of trying for zero latency, instead to tweak the various settings so that the latency from any source, SPi or external is about the same.

I don’t tend to send out MIDI CCs, but definitely can do that. As you say, one of the nice things about external synths is being able to twiddle the knobs. One example where it’s good is with my Volca Fm, which notoriously doesn’t respond to midi note velocity, but you can modify it via CC.

You can also send out midi clock from Spi, and use a sequencer on the external synth, that can be nice.

1 Like