I have coded this part in spi as
notes = [:g3,:f,:e,:d,:g,:g,:g,:g]
durations = [0.5,0.5,0.5,0.5,0.5,0.5,0.75,0.25]
Is this correct?
This measure comes as part of Jingle Bells song.
I have coded this part in spi as
notes = [:g3,:f,:e,:d,:g,:g,:g,:g]
durations = [0.5,0.5,0.5,0.5,0.5,0.5,0.75,0.25]
Is this correct?
This measure comes as part of Jingle Bells song.
That looks about right - does it sound right to you?
Well done @vinodv ! You are ready now to code melodies like a pro .
But the interest of sonic pi is that you can easily check the result as mentioned by @ethancrawford by listening to it.
See you
use_bpm 90
notes = [:g3,:f,:e,:d,
:g,:g,:g,:g]
durations = [0.5,0.5,0.5,0.5,
0.5,0.5,0.75,0.25]
notes.count.times do
play notes.tick,
attack: 0,
sustain: (durations.look / 2),
decay: 0.125,
release: 0.25,
amp: (line 0.8, 1.5, steps: 8).look
sleep durations.look
end
Ring version
use_bpm 90
notes = ( ring :g3,:f,:e,:d,:g,:g,:g,:g)
durations = ( ring 0.5,0.5,0.5,0.5,0.5,0.5,0.75,0.25)
notes.length.times do
play notes.tick,
attack: 0,
sustain: (durations.look / 2),
decay: 0.125,
release: 0.25,
amp: (line 0.8, 1.5, steps: 8).look
sleep durations.look
end