Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Chiptune tutorial by JorshTheHacker for Sonic Pi.
- use_bpm 120 #125 or 130 work better for some songs but 120 is a good number to start with.
- use_random_seed 86 #You may want to change this.
- melody = (ring :c4, :d4, :e4, :f4, :g4, :c5, :b5, :d5, :a5) #melody. This is the sequence of notes for the square (pulse) synth(s).
- cmelody = (ring :e4, :d4, :c4, :g4, :f4, :e4, :b4, :a4) #counter-melody. This is for the saw synth.
- bass = (ring :c3, :e3, :g3) #Bass notes. This ring is for the bass synth. Bass sounds should be constant and simple, so keep this between 3 and 5 notes.
- bass_synth = choose([:tri, :chipbass]) #You can change the seed (above) to modify this.)
- #timing tools:
- x = 0
- y = 0
- z = 0
- #actual sounds:
- with_fx :bitcrusher do
- live_loop :sq do
- synth :pulse, note: melody.tick, attack: 0.325, release: 0, bits: 4
- sleep 0.33
- x += 1
- if (x == 50)
- stop
- end
- end
- sleep 8
- live_loop :saw do
- synth :saw, note: cmelody.tick, attack: 0.25, release: 0, bits: 6
- sleep 0.265
- y += 1
- if (y == 60)
- stop
- end
- end
- sleep 16
- live_loop :bass do
- synth bass_synth, note: bass.tick, attack: 0.25, release: 0.25, bits: 4
- sleep 0.55
- z += 1
- if (z == 60)
- stop
- end
- end
- end
- #Add onto and modify this, and you should be good to go!
Add Comment
Please, Sign In to add comment