Exercise: Write a Looping Bassline

Write a Looping Bassline


Exercise instructions

Write a looping bassline

Create a loop for the bassline in a buffer with a drum beat

  • You can also use the example drumbeat below, but remember to make it your own!

  • Change the sound with use_synth

  • Use the play command and start with a two note bass line

  • Use notes from the second and third octave (36-60)

  • Use at least one option to shape the note

  • Think about how the bass fits with your drum beat

  • Save your code

Don't spend more than 20 minutes on the exercise


#Template for your bassline
#Remember to hack it!!!
use_bpm 120
#Bass and Snare
live_loop :drums do
  sample :drum_bass_hard
  sleep 1
  sample :drum_snare_hard
  sleep 1
  sample :drum_bass_hard
  sleep 0.5
  sample :drum_bass_hard
  sleep 0.5
  sample :drum_snare_hard
  sleep 1
end
#Try to figure out the hats by playing with them!
live_loop :hihat do
  4.times do
    sample :drum_cymbal_closed, amp: 0.5
    sleep 0.5
  end 
  4.times do
    sample :drum_cymbal_closed, amp: 0.5
    sleep 0.25
  end
  sample :drum_cymbal_closed, amp: 0.5
  sleep 0.5
  sample :drum_cymbal_pedal, amp: 0.33
  sleep 0.5
end