How to code this


#1

Hi,

I suggest this little exercice :smile:

Let’s say we want this structure to loop. What do you propose as solution ?

2018-12-11%2018_44_46-Sans%20titre_%20-%20Live%20Intro

I give you some code basic poor music but it will do the stuff

use_bpm 120

### DRUMS ###

live_loop :_drums do
  sample :drum_bass_hard
  sleep 1
  sample :drum_snare_soft
  sleep 1
  sample :drum_bass_hard
  sleep 0.5
  sample :drum_bass_hard
  sleep 0.5
  sample :drum_snare_soft
  sleep 1
end


live_loop :_hits_hats do
  6.times do
    sample :drum_cymbal_soft, amp:0.5 , rate: 1, compress:1
    sleep 0.5
  end
  sample :drum_cymbal_open, amp:0.5 , rate: 2
  sleep 0.5
  sample :drum_cymbal_open, amp:0.5 , rate: 2
  sleep 0.5
end



### BASS ###

live_loop :_bass_ do
  use_synth :saw
  use_synth_defaults attack: 0.1, delay: 0.1, sustain: 0.1, cutoff: 90, amp: 0.5
  play_pattern_timed [:c2, :c3, :e3, :e3],[1,1,1,1]
  
end


### RIFF ###

riff_01 = (ring :c2,:e3,:e2,:e2,:r,:c3,:r,:c3,
           :c2,:e3,:e2,:e2,:r,:r,:g3, :f3)

# pluck riff
live_loop :_riff_ do
  #stop
  use_synth :pluck
  use_synth_defaults amp: 0.8, attack: 0.0, attack_level: 0.5, sustain: 0.8, release: 0.25, cutoff: 80
  play_pattern_timed riff_01, 0.5
  
end

What are your proposals ?
Thanks !


#2

have a look at my answer for a similar question here