Song: Monkey See Monkey Doo-Doo

EDIT:
I’ve finished the song! Special thanks to @hitsware for the help back there in the forum suggesting a HPF to tame the low ends.

For this song I used an external sequencer to send MIDI information to Sonic Pi which then either triggered samples and instruments, or carried out code routines. I also made use of the live_audio to layer some of the Sonic Pi sounds with the sequencer’s built-in sounds. For post-processing I detuned the song down 7 semitones from the original draft, then I mastered the song.


This is sounding really interesting so far but it’s really made me sleepy listening on repeat for the past few hours while building it up.

I think I might try to restructure the loop into a song with more of a build-up. Maybe some of the glitchier sounds could be offset a bit from the main pattern too so it’s not so rigid.

2 Likes

hi @Doffu

i do like the first tune, the ambiance even if the title is quite far from the mood of your music, but why not !

Just to know, the main sound comes from VCV Rack right for the Savepoint tune ?
Cheers

Thanks.

Yeah the main audio is coming from my sequencer as live_audio. Then I also have the MIDI coming from the sequencer into Sonic Pi to either trigger samples or play some synths inside Sonic Pi. So I’d say the sequencer is providing half the sound and Sonic Pi, the other half.

1 Like

Here I can actually share my code… I just had to get to my computer.

This code won’t really do much for anyone out of the box because it’s pulling samples from folders on my desktop and also was connected to the specific MIDI sequencer I was using. However, if you change the file directories to your own sample folders and change the sync’s to connect to your own MIDI device then you may be able to make use of it. At the very least it might show someone an idea of how to get their own MIDI device and live audio rigged up.

use_bpm 120

drumPook = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Sample Packs/Pook/Kick/"
drumLegoClap = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Sample Packs/Lego Drums/CLAPS/"
aolLoop = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Ravancloak/" #[0-2]
aolY = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Polybius/" #[0-2]
aolVox2 = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Volca Glitch/" #[0-2]
aolVox8 = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Let Go Jeeshan A/"
riserGhost = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Sample Packs/Ghosthack - Cinematic Trailer SFX/One Shots/Risers/"

# AUTOMATION
lfo0 = (line 90, 130, inclusive: true, steps: 32).mirror
lfo_pan = (line -0.7, 0.3, inclusive: true, steps: 32).mirror
lfo1 = (line 0.8, 0.99, inclusive: true, steps: 64).mirror
lfo2 = (line 120, 60, inclusive: true, steps: 4).mirror
lfo3 = (line 30, 130, inclusive: true, steps: 64).mirror
lfo4 = (line 0.5, 0.7, inclusive: true, steps: 16).mirror
lfo5 = (line 0.3, 0.99, inclusive: true, steps: 2).mirror

##| Sync MIDI clock:
live_loop :midi_clock do
  midi_clock_beat
  sleep 1
end

with_fx :hpf, cutoff: 26 do
  ##| Play audio stream from external sequencer
  live_audio :foo, stereo: true, input: 1
  
  live_loop :pan_ticker do
    use_real_time
    note, velocity = sync "/midi:minilogue_midi_in:5/note_on"
    puts tick
    if(velocity == 1)
      with_fx :rbpf, centre: lfo0.look, res: lfo1.look do
        sample aolVox2, 1, rate: 1, onset: 7, release: 0.1, pan: lfo_pan.look
      end
    end
  end
  
  live_loop :drums do
    use_real_time
    note, velocity = sync "/midi:minilogue_midi_in:4/note_on"
    puts tick
    if(velocity >= 1)
      if(note == 35)
        sample drumPook, 7, rate: 1, pan: -0.02, amp: 1
      end
      if(note == 39)
        sample drumLegoClap, 40, rate: 2, pan: 0.1, amp: 0.57
      end
    end
  end
  
  live_loop :sweep do
    use_real_time
    note, velocity = sync "/midi:minilogue_midi_in:6/note_on"
    puts tick
    if(velocity >= 1)
      sample riserGhost, 13, rate: 2, pan: -0.42, amp: 0.11, beat_stretch: 16, start: 0, finish: 1, release: 0.1
    end
  end
  
  live_loop :whistle do
    use_real_time
    note, velocity = sync "/midi:minilogue_midi_in:2/note_on"
    if(velocity >= 1)
      if(note == 52)
        sample aolY, 4, rate: 1, onset: 0, release: 0.1
      end
      if(note == 53)
        sample aolLoop, 4, rate: 1, onset: 3, release: 1
      end
      if(note == 54)
        sample aolVox8, 5, rate: 1, onset: 1, release: 1
      end
    end
  end
  
  live_loop :midi_qy70_3 do
    use_real_time
    note, velocity = sync "/midi:minilogue_midi_in:16/note_on"
    if(velocity >= 1)
      sample aolVox8, 7, rate: 1, release: 1, beat_stretch: 2
    end
  end
  
  live_loop :midi_qy170_4 do
    with_fx :level, amp: 0.8 do
      use_real_time
      note, velocity = sync "/midi:minilogue_midi_in:13/note_on"
      if(velocity == 96)
        with_fx :slicer, phase: 0.75 do
          puts tick
          synth :beep, note: note+24, amp: lfo4.look, env_curve: 7, attack: 4, pan: choose([-0.5, -0.7, 0.5])
        end
      end
    end
  end
  
  live_loop :midi_qy70_5 do
    use_real_time
    puts tick
    note, velocity = sync "/midi:minilogue_midi_in:13/note_on"
    if(velocity == 95)
      synth :blade, note: note, amp: (velocity / 127.0)*0.6, cutoff: 130, attack: 0.05, pan: 0.25
    end
    if(velocity == 94)
      with_fx :bitcrusher do
        synth :blade, note: note+12, amp: velocity / 127.0, cutoff: 50, attack: 0.05, pan: 0.5
      end
    end
    if(velocity == 93)
      with_fx :bitcrusher do
        synth :blade, note: note+24, amp: velocity / 127.0, cutoff: 66, attack: 0.05, pan: -0.75
      end
    end
  end
  
end


1 Like

thanks for sharing

This code is for the second tune or the first one ?

the conditions on velocity values intrigues me :slight_smile: not sure i will be able to adjust a velocity to 93 or 94 or 95 when i press a key on a midi controler. Or maybe, this value is set by a software but it seems it comes right from your Korg minilogue synth.

thanks for any feedbacks

First, you can ignore the part that says “/midi:minilogue_midi_in…”. I’m actually using a QY70 MIDI Sequencer. The reason it says Minilogue is because I don’t have the correct cables to send MIDI data directly to my computer from the QY70. So, as a workaround, I’ve fed it through my Minilogue because it has a USB output that can interface with my computer. The Minilogue is doing nothing asides from passing the MIDI data to my computer and passing the BPM information from the computer to my QY70 Sequencer.

This code is for the song titled “Monkey See Monkey Doo-Doo.” I don’t have the code for the first version of the song since I kept building it up into the final version. Note: the BPM is showing 120 because I recorded the session at 120 BPM and then slowed it down in post-processing.

The only differences from the first version should be these things that I added:

  • HPF FX on the entire code
  • Drums live_loop - this listens for incoming MIDI channel 5, at a velocity >=1 and plays either a kick or a clap sample depending on which incoming note is being played by the sequencer.
  • Pan Ticker live_loop - this listens for incoming MIDI channel 5, at a velocity of 1 and plays a ticking sample.
  • Sweep live_loop - this listens for incoming MIDI channel 6, and plays a riser/sweeping sample leading into the drops.
  • Whistle live_loop - this listens for incoming MIDI channel 2, and plays some glitchy samples based on the incoming note value.

The conditions on the velocity values work because each of my instruments set up on the QY70 Sequencer was programmed to have a value of 93, 94, or 95. While these velocities are pretty much indistinguishable for a person to hear, they can still be distinguished by the code in Sonic Pi. This was just a sneaky way of making my instrument’s audio sound like they’re playing at constant velocity while Sonic Pi interprets them as unique velocities and triggers sound samples. In this way, I could take a constant velocity track, tweak the velocities slightly, and build more complex sample layering patterns on top of them.

For things like the drum sound, the code just checks if the velocity is >= 1. On my sequencer, I have drum MIDI being sent with a velocity of 1, which can’t be heard as audio because the velocity is so low. But Sonic Pi still sees these velocities and triggers the appropriate drum samples at full volume.

You’re right. On a MIDI keyboard, you wouldn’t be able to consistently play notes at such a precise velocity. But if your keyboard has a step/pattern sequencer, it should allow you to individually edit the note velocities like this. That’s the advantage of using a MIDI sequencer. There are maybe some ways around this, like coding every single sample trigger on a different MIDI channel. I just didn’t do that because it seemed cumbersome for my setup and my sequencer is very old and has finite memory.

Ty for this long and clear answer :+1:

Yeah, no worries. Hope it helped you out.