Practice Run (Intellijel Metropolis Style sequencing)

I made a practice live stream yesterday.

You’ll find the Video here: https://youtu.be/Jcv5W3RXDzc

In this practice I play with a coded sequencer, which is inspired by the Intellijel Metropolis Sequencer Module for Eurorack Synths.
I find it interesting how many ideas one can get just by watching tutorials or reviews on Eurorack modules. A lot of these Ideas are very easily reproducable in code with nice outcomes.

Here I play with seqence lengths, different pulse counts, slides and different modes (hold, repeat, tick) per step.

Enjoy

4 Likes

Lovely work - I really enjoyed listening to it :slight_smile:

1 Like

Indeed. Any chance of the code, somewhere, please?

Eli…

Great! Love it.

(incidentally, I have no idea whether I had already managed to spot it in the past and then forgot about it, or hadn’t even noticed it until now - but I spotted a typo in the Sonic Pi docs thanks to your video! :laughing: :+1:)

Here is the final code:

live_loop :clock1 do
  sleep 1
end

live_loop :clock4 do
  sync :clock1
  sleep 4
end

live_loop :clock8 do
  sync :clock4
  sleep 8
end

live_loop :bass, sync: :clock4 do
  use_synth :tech_saws
  with_fx(:reverb, room: 0.6, mix: 0.4, damp: 0.5) do
    n = note knit(:a2, 16, :c3, 16, :e2, 16, :g2, 16).tick
    play :a2, release: 4
    sleep 4
  end
end

def update_filter
  return unless $filter
  control $filter, cutoff: cosr(100, 20, 0.125), res: cosr(0.8, 0.1, 0.25)
end

live_loop :filter do
  update_filter
  sleep 0.125
end

live_loop :melody, sync: :clock4 do
  use_synth :prophet
  seq = cur_scale(num_octaves: [1, 2].choose)
  steps = 32
  pulse_counts = ring(1)
  types = ring(:hold, :tick, :repeat).shuffle
  slides = bools(0)
  dur = 0.125
  
  seeds = ring(10376, 10081978, 1081978, 131976, 2052008, 29122009)
  $current_seed = seeds.tick(:s) if tick(:seeds) % 2 == 0
  
  with_random_seed $current_seed do
    seq = seq.pick steps
    pulse_counts = ring(1, 2).pick steps
    slides = bools(0).pick steps
    types = types.pick steps
  end
  
  with_fx :level, amp: 1.0 do
    with_fx(:reverb, room: 1, mix: 0.6, damp: 0.5) do
      with_fx :rlpf, mix: 1 do |filter|
        $filter = filter
        norm_seq = seq.take steps
        norm_pulses = pulse_counts.take steps
        norm_types = types.take steps
        norm_slides = slides.take steps
        s = play norm_seq[0], amp: 0, sustain: dur * norm_pulses.to_a.sum, release: dur
        steps.times do
          idx = tick
          current_note = norm_seq[idx]
          pulse_count = norm_pulses[idx]
          type = norm_types[idx]
          is_slide = norm_slides[idx + 1]
          case type
          when :repeat
            pulse_count.times do
              control s, amp: 1, note: current_note
              sleep dur / 2
              control s, amp: 0
              sleep dur / 2
            end
          when :hold
            control s, amp: 1, note: current_note
            sleep pulse_count * dur
            control s, amp: 0
          when :tick
            control s, amp: 1, note: current_note
            sleep dur / 2
            control s, amp: 0
            sleep (pulse_count * dur) - (dur / 2)
          when :sleep
            control s, amp: 0
            sleep pulse_count * dur
          end
          
          if is_slide then
            control s, note_slide: dur / 2
          else
            control s, note_slide: 0
          end
        end
      end
    end
  end
end

live_loop :loop, sync: :clock8 do
  sample :loop_safari, beat_stretch: 8, amp: 4
  sleep 8
end

live_loop :d, sync: :clock8 do
  sample :bd_haus, amp: 2 if spread(4, 16).tick
  sample :drum_cymbal_pedal, amp: 1.5 if spread(5, 16).tick
  sample :drum_snare_soft, amp: 1 if spread(11, 16).look
  sleep 0.125
end
2 Likes