Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New to Sonic Pi #541

Closed
helgeras opened this issue Jun 16, 2015 · 11 comments
Closed

New to Sonic Pi #541

helgeras opened this issue Jun 16, 2015 · 11 comments

Comments

@helgeras
Copy link

In my younger days i spend ten years to learn play the piano, - gave up learning because i do not have the talent.

Recently i bought a Raspberry Pi 2-B, and found the amazing Sonic Pi v2.5 program.
Began to learn coding and coded some of the music i tried to play many years ago, suddently i could play Bach, Pachelbel, Mozart, et cetera.

But i found, there are limitations in the Sonic Pi.
When coding Scott Joplins 'The Entertainer', Sonic Pi would not play more than the first 75 bars, about 1 minute, 15 seconds of the score, therefore i have to code the rest in another workspace.

  1. Is it possible, in new versions, to make the program able to accept longer codings?
  2. When i press 'Run', Sonic Pi starts from the very beginning of the Workspace, i would like a function that start playing from a certain line number.

Great thanks to Sam Aaron and the team who build this program.

Here is the codes:

# The Entertainer - Scott Joplin
# page 1-2-3 bars 1-54
use_bpm 40
use_synth_defaults  attack: 0.001, decay: 0.1, sustain: 0.1, release: 0.2, attack_level: 1, sustain_level: 0.7
use_synth :saw

#left hand
in_thread do
  #bar1
  play_chord [:D5,:D6]
  sleep 0.125
  play_chord [:E5,:E6]
  sleep 0.125
  play_chord [:C5,:C6]
  sleep 0.125
  play_chord [:A,:A5]
  sleep 0.25
  play_chord [:B,:B5]
  sleep 0.125
  play_chord [:G,:G5]
  sleep 0.25
  #2
  play_chord [:D,:D5]
  sleep 0.125
  play_chord [:E,:E5]
  sleep 0.125
  play_chord [:C,:C5]
  sleep 0.125
  play_chord [:A3,:A]
  sleep 0.25
  play_chord [:B3,:B]
  sleep 0.125
  play_chord [:G3,:G]
  sleep 0.25
  #3
  play_chord [:D3,:D]
  sleep 0.125
  play_chord [:E3,:E]
  sleep 0.125
  play_chord [:C3,:C]
  sleep 0.125
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:B2,:B3]
  sleep 0.125
  play_chord [:A2,:A3]
  sleep 0.125
  play_chord [:Ab2,:Ab3]
  sleep 0.125
  #4
  play_chord [:G2,:G3]
  sleep 0.5
  use_synth_defaults  decay: 0.4, sustain: 0.01, release: 0.01, attack_level: 2, sustain_level: 0.7
  play_chord [:G1,:G2,:G,:B,:D5,:G5]
  sleep 0.25
  play_chord [:G3,:B3]
end
use_synth_defaults  attack: 0.001, decay: 0.1, sustain: 0.1, release: 0.2, attack_level: 1, sustain_level: 0.7
#right hand
sleep 3.75
play_pattern_timed [:D,:Ds],[0.125]
$end
#left hand
in_thread do
  #5
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:Bb,:C]
  sleep 0.25
  #6
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:A3,:C]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:G3,:C]
  sleep 0.25
  #7
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #8
  play :C3
  sleep 0.25
  play_chord [:C3,:E3,:C]
  sleep 0.25
  play_chord [:C3,:E3,:C]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #9
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:Bb,:C]
  sleep 0.25
  #10
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:A3,:C]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:Eb2,:A3,]
  sleep 0.25
  #11
  play_chord [:D2,:D3]
  sleep 0.25
  play_chord [:D3,:Fs3,:A3,:C]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:Fs3,:A3,:C]
  sleep 0.25
  #12
  play_chord [:G3,:B3]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:B2,:B3,]
  sleep 0.25
  #13
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:Bb,:C]
  sleep 0.25
  #14
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:A3,:C]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:G3,:C]
  sleep 0.25
  #15
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #16
  play :C
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.5
  #17
  play_chord [:C3,:C]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play_chord [:Bb2,:Bb3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #18
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play_chord [:Ab2,:Ab3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  #19
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #20
  play_chord [:C3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:C2,:C3]
  sleep 0.5

end

#Right hand #5
play_pattern_timed [:E,:C5,:E,:C5,:E,:C5],[0.125,0.25,0.125,0.25,0.125,0.75]
#6
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.125
play_chord [:Ds5,:Fs5,:Ds6]
sleep 0.125
#7
play_chord [:E5,:G5,:E6]
sleep 0.125
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D5]
sleep 0.125
play_chord [:E5,:G5,:E6]
sleep 0.25
play_chord [:B,:D5,:B5]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.25
#8
play_chord [:C5,:E5,:C6]
sleep 0.75
play_pattern_timed [:D,:Ds],[0.125]
#9-10
play_pattern_timed [:E,:C5,:E,:C5,:E,:C5],[0.125,0.25,0.125,0.25,0.125,0.875]
play_chord [:A,:C5,:A5]
sleep 0.125
play_chord [:G,:C5,:G5]
sleep 0.125
#11
play_chord [:Fs,:C5,:Fs5]
sleep 0.125
play_chord [:A,:A5]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:E5,:E6]
sleep 0.25
play_chord [:D5,:D6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:A,:A5]
sleep 0.125
#12
play_chord [:D5,:F5,:D6]
sleep 0.75
play_pattern_timed [:D,:Ds],[0.125]
#13-14
play_pattern_timed [:E,:C5,:E,:C5,:E,:C5],[0.125,0.25,0.125,0.25,0.125,0.75]
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.125
play_chord [:Ds5,:Fs5,:Ds6]
sleep 0.125
#15
play_chord [:E5,:G5,:E6]
sleep 0.125
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D5]
sleep 0.125
play_chord [:E5,:G5,:E6]
sleep 0.25
play_chord [:B,:D5,:B5]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.25
#16
play_chord [:C5,:E5,:C6]
sleep 0.75
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D6]
sleep 0.125
#17
play_chord [:E5,:E6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D5]
sleep 0.125
play_chord [:E5,:E6]
sleep 0.25
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
#18
play_chord [:E5,:E6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D5]
sleep 0.125
play_chord [:E5,:E6]
sleep 0.25
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
#19
play_chord [:E5,:G5,:E6]
sleep 0.125
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D5]
sleep 0.125
play_chord [:E5,:G5,:E6]
sleep 0.25
play_chord [:B,:D5,:B5]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.25
#20(21)
play_chord [:C5,:E5,:C6]
sleep 0.625
play_chord [:E,:C5,:E5]
sleep 0.125
play_chord [:F,:D5,:F5]
sleep 0.125
play_chord [:Fs,:Ds5,:Fs5]
sleep 0.125

#left hand 22
in_thread do
  play_chord [:C2,:C3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #23
  play :C3
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #24
  play :F2
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:Ab3,:C,:E]
  sleep 0.25
  #25
  play :E3
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #26
  play :C3
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #27
  play :C3
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :E3
  sleep 0.25
  play :Eb3
  sleep 0.25
  #28
  play :D3
  sleep 0.25
  play_chord [:G3,:B3,:D]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:F3,:C,:D]
  sleep 0.25
  #29
  play_chord [:G3,:B3,:D]
  sleep 0.25
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:D2,:D3]
  sleep 0.25
  #30
  play_chord [:C2,:C3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play:G2
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #31
  play :C3
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play:G2
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #32
  play :F2
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:Ab3,:C,:D]
  sleep 0.25
  #33
  play :E3
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :C3
  sleep 0.25
  play_chord [:Ab3,:C,:E]
  sleep 0.25
  #34
  play_chord [:F3,:A3,:C,:F]
  sleep 0.25
  play_chord [:F3,:A3,:C,:F]
  sleep 0.25
  play_chord [:Fs3,:A3,:Cs,:D]
  sleep 0.25
  play_chord [:Fs3,:A3,:Cs,:D]
  sleep 0.25
  #35
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  #36
  play_chord [:D3,:C]
  sleep 0.25
  play_chord [:D3,:A3]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #-37
  #38
  play_chord [:C3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:C2,:C3]
  sleep 0.25
end

#right
#22=39
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:A,:E5,:A5]
sleep 0.125
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:E,:C5,:E5]
sleep 0.125
play_chord [:F,:D5,:F5]
sleep 0.125
play_chord [:Fs,:Ds5,:Fs5]
sleep 0.125
#23=40
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:A,:E5,:A5]
sleep 0.125
play_chord [:G,:E5,:G5]
sleep 0.25
play_pattern_timed [:E5,:C5,:G],[0.125]
#24=41
play_pattern_timed [:A,:B,:C5,:D5,:E5,:D5,:C5,:D5],[0.125]
#25=42
play_pattern_timed [:G,:E5,:F5,:G5,:A5,:G5,:E5,:F5],[0.125]
#26=43
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:A,:E5,:A5]
sleep 0.125
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:E,:C5,:E5]
sleep 0.125
play_chord [:F,:D5,:F5]
sleep 0.125
play_chord [:Fs,:Ds5,:Fs5]
sleep 0.125
#27=44
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:A,:E5,:A5]
sleep 0.125
play_chord [:G,:E5,:G5]
sleep 0.25
play_pattern_timed [:G5,:A5,:As5],[0.125]
#28=45
play_chord [:D5,:G5,:B5]
sleep 0.125
play_chord [:D5,:G5,:B5]
sleep 0.25
play_chord [:C5,:Fs5,:B5]
sleep 0.25
play :A5
sleep 0.125
play_chord [:C5,:Fs5]
sleep 0.125
play :D5
#29=46
sleep 0.125
play_chord [:B,:G5]
sleep 0.625
play_chord [:E,:C5,:E5]
sleep 0.125
play_chord [:F,:D5,:F5]
sleep 0.125
play_chord [:Fs,:Ds5,:Fs5]
sleep 0.125
#30=47
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:A,:E5,:A5]
sleep 0.125
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:E,:C5,:E5]
sleep 0.125
play_chord [:F,:D5,:F5]
sleep 0.125
play_chord [:Fs,:Ds5,:Fs5]
sleep 0.125
#31=48
play_chord [:G,:E5,:G5]
sleep 0.25
play_chord [:A,:E5,:A5]
sleep 0.125
play_chord [:G,:E5,:G5]
sleep 0.25
play_pattern_timed [:E5,:C5,:G],[0.125]
#32=49
play_pattern_timed [:A,:B,:C5,:D5,:E5,:D5,:C5,:D5],[0.125]
#33=50
play :C5
sleep 0.625
play_pattern_timed [:G,:Fs,:G],[0.125]
#34-35=51-52
play_pattern_timed [:C5,:A,:C5],[0.25,0.125,0.25]
play_pattern_timed [:A,:C5,:A,:G,:C5,:E5],[0.125]
play :G5
sleep 0.25
play_pattern_timed [:E5,:C5,:G],[0.125]
#36=53
play_chord [:Fs,:A]
sleep 0.25
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:F,:E5]
sleep 0.125
play_chord [:F,:D5]
sleep 0.25
play_chord [:E,:C5]
sleep 0.125
#54
play_chord [:E,:C5]
sleep 0.75
play_pattern_timed [:D,:Ds],[0.125]
$end

#left hand
in_thread do
  #5=55
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:Bb,:C]
  sleep 0.25
  #6=56
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:A3,:C]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:G3,:C]
  sleep 0.25
  #7=57
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #8=58
  play :C3
  sleep 0.25
  play_chord [:C3,:E3,:C]
  sleep 0.25
  play_chord [:C3,:E3,:C]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #9=59
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:Bb,:C]
  sleep 0.25
  #10=60
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:A3,:C]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:Eb2,:A3,]
  sleep 0.25
  #11=61
  play_chord [:D2,:D3]
  sleep 0.25
  play_chord [:D3,:Fs3,:A3,:C]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:Fs3,:A3,:C]
  sleep 0.25
  #12=62
  play_chord [:G3,:B3]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:B2,:B3,]
  sleep 0.25
  #13=63
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:Bb,:C]
  sleep 0.25
  #14=64
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:A3,:C]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:G3,:C]
  sleep 0.25
  #15=65
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #16=66
  play :C
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.5
  #17=67
  play_chord [:C3,:C]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play_chord [:Bb2,:Bb3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #18=68
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play_chord [:Ab2,:Ab3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  #19= 69
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #20=70
  play_chord [:C3,:G3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:C2,:C3]
  sleep 0.5

end

#Right hand #5=39
play_pattern_timed [:E,:C5,:E,:C5,:E,:C5],[0.125,0.25,0.125,0.25,0.125,0.75]
#6=40
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.125
play_chord [:Ds5,:Fs5,:Ds6]
sleep 0.125
#7=41
play_chord [:E5,:G5,:E6]
sleep 0.125
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D5]
sleep 0.125
play_chord [:E5,:G5,:E6]
sleep 0.25
play_chord [:B,:D5,:B5]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.25
#8=42
play_chord [:C5,:E5,:C6]
sleep 0.75
play_pattern_timed [:D,:Ds],[0.125]
#9-10=43-44
play_pattern_timed [:E,:C5,:E,:C5,:E,:C5],[0.125,0.25,0.125,0.25,0.125,0.875]
play_chord [:A,:C5,:A5]
sleep 0.125
play_chord [:G,:C5,:G5]
sleep 0.125
#11=45
play_chord [:Fs,:C5,:Fs5]
sleep 0.125
play_chord [:A,:A5]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:E5,:E6]
sleep 0.25
play_chord [:D5,:D6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:A,:A5]
sleep 0.125
#12=46
play_chord [:D5,:F5,:D6]
sleep 0.75
play_pattern_timed [:D,:Ds],[0.125]
#13-14=47-48
play_pattern_timed [:E,:C5,:E,:C5,:E,:C5],[0.125,0.25,0.125,0.25,0.125,0.75]
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.125
play_chord [:Ds5,:Fs5,:Ds6]
sleep 0.125
#15=49
play_chord [:E5,:G5,:E6]
sleep 0.125
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D5]
sleep 0.125
play_chord [:E5,:G5,:E6]
sleep 0.25
play_chord [:B,:D5,:B5]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.25
#16=50
play_chord [:C5,:E5,:C6]
sleep 0.75
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D6]
sleep 0.125
#17=51
play_chord [:E5,:E6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D5]
sleep 0.125
play_chord [:E5,:E6]
sleep 0.25
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
#18=52
play_chord [:E5,:E6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D5]
sleep 0.125
play_chord [:E5,:E6]
sleep 0.25
play_chord [:C5,:C6]
sleep 0.125
play_chord [:D5,:D6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
#19=53
play_chord [:E5,:G5,:E6]
sleep 0.125
play_chord [:C5,:E5,:C6]
sleep 0.125
play_chord [:D5,:F5,:D5]
sleep 0.125
play_chord [:E5,:G5,:E6]
sleep 0.25
play_chord [:B,:D5,:B5]
sleep 0.125
play_chord [:D5,:F5,:D6]
sleep 0.25
#54
play_chord [:C5,:E5,:C6]
sleep 0.5
play_chord [:C5,:E5,:C6]
sleep 0.25
$end
$end
_______

 # The Entertainer - Scott Joplin
# page3-4 bars 55-92

use_bpm 40
use_synth_defaults  attack: 0.001, decay: 0.1, sustain: 0.1, release: 0.2, attack_level: 1, sustain_level: 0.7
use_synth :saw

#left hand
in_thread do
  # F dur
  #55
  play :F2
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :C3
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  #56
  play :B2
  sleep 0.25
  play_chord [:B3,:D,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:B3,:D,:F]
  sleep 0.25
  #57
  play :D2
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  #58
  play :G2
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  #59
  play_chord [:B2,:B3]
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:Gs2,:Gs3]
  sleep 0.25
  #60
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  #61
  play :E3
  sleep 0.25
  play_chord [:B3,:D,:E]
  sleep 0.25
  play :Gs3
  sleep 0.25
  play_chord [:B3,:D,:E]
  sleep 0.25
  #62
  play_chord [:A3,:C,:E]
  sleep 0.5
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :C3
  sleep 0.25
  #63
  play :F2
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :C3
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  #64
  play :Bb2
  sleep 0.25
  play_chord [:Bb3,:D,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:Bb3,:D,:F]
  sleep 0.25
  #65
  play :D2
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  #66
  play_chord [:Bb2,:Bb3]
  sleep 0.25
  play_chord [:Bb3,:D]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:Bb3,:D]
  sleep 0.25
  #67
  play :B2
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:Gs2,:Gs3]
  sleep 0.25
  #68
  play_chord [:A2,:A3]
  sleep 0.125
  play_chord [:F2,:F3]
  sleep 0.125
  play_chord [:E2,:E3]
  sleep 0.125
  play_chord [:D2,:D3]
  sleep 0.125
  play_chord [:Db2,:Db3]
  sleep 0.5
  #69
  play_chord [:C2,:C3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play_chord [:C3, :C]
  sleep 0.25
  play_chord [:C2, :C3]
  sleep 0.25
  #(-70) 71
  play_chord [:F2, :F3]
  sleep 0.5
  play_chord [:F1, :F2]
  sleep 0.5
end
#right hand F dur
#bar55
play_chord [:F5,:A5]
sleep 0.125
play :Gs
sleep 0.125
play_chord [:F5,:A5]
sleep 0.25
play_chord [:F5,:A5,:C6]
sleep 0.25
#56
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:A5,:D6,:F6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:Bb,:A,:Bb,:C5,:D5],[0.125,0.125,0.125,0.125,0.25]
#57
play_chord [:D5,:F5]
sleep 0.125
play :E5
sleep 0.125
play_chord [:D5,:F5]
sleep 0.5
play_chord [:D5,:F5,:A5]
sleep 0.25
#58
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:D5,:G5,:D6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:G,:Fs,:G,:A,:Bb,:G5],[0.125,0.125,0.125,0.125,0.25,0.25]
#59
play_pattern_timed [:D5,:G5,:D5,:G5,:D5],[0.25,0.125,0.25,0.125,0.25,]
#60
play_pattern_timed [:C5,:F5],[0.5]
#61
play_pattern_timed [:E5,:Gs5,:B5,:E6,:D6,:B5,:C6],[0.125,0.125,0.125,0.25,0.125,0.125,0.125]
#62
play_pattern_timed [:A5,:Bb5],[0.5]
#63
play_chord [:F5,:A5]
sleep 0.125
play :Gs
sleep 0.125
play_chord [:F5,:A5]
sleep 0.25
play_chord [:F5,:A5,:C6]
sleep 0.25
#56=64
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:A5,:D6,:F6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:Bb,:A,:Bb,:C5,:D5],[0.125,0.125,0.125,0.125,0.25]
#57=65
play_chord [:D5,:F5]
sleep 0.125
play :E5
sleep 0.125
play_chord [:D5,:F5]
sleep 0.5
play_chord [:D5,:F5,:A5]
sleep 0.25
#58=66
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:D5,:G5,:D6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:G,:Fs,:G,:A,:Bb,:G5],[0.125,0.125,0.125,0.125,0.25,0.25]
#59=67
play_pattern_timed [:D5,:G5,:D5,:G5,:D5],[0.25,0.125,0.25,0.125,0.25,]
#68
play :C5
sleep 0.5
play_chord [:Gs,:B,:F5]
sleep 0.375
play :F5
sleep 0.125
#69
play_chord [:A,:C5,:A5]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.25
play_chord [:Bb,:G5]
sleep 0.125
play :C5
play_chord [:Bb,:D5]
sleep 0.375
play :E5
sleep 0.125
#(-70) 71
play_chord [:A,:F5]
sleep 0.5
play_chord [:F5,:A5,:C6,:F6]
sleep 0.5
$end

# The Entertainer - page 4 bars 72-92
use_bpm 40
use_synth_defaults  attack: 0.001, decay: 0.1, sustain: 0.1, release: 0.2, attack_level: 1, sustain_level: 0.7
use_synth :saw
# left
in_thread do
  #34=72
  play_chord [:F3,:A3,:C,:F]
  sleep 0.25
  play_chord [:F3,:A3,:C,:F]
  sleep 0.25
  play_chord [:Fs3,:A3,:Cs,:D]
  sleep 0.25
  play_chord [:Fs3,:A3,:Cs,:D]
  sleep 0.25
  #35=73
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  #36=74
  play_chord [:D3,:C]
  sleep 0.25
  play_chord [:D3,:A3]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #75
  play_chord [:C3,:C]
  sleep 0.5
  play_chord [:C2,:C3]
  sleep 0.5
end
# right
#34-35=72-73
play_pattern_timed [:C5,:A,:C5],[0.25,0.125,0.25]
play_pattern_timed [:A,:C5,:A,:G,:C5,:E5],[0.125]
play :G5
sleep 0.25
play_pattern_timed [:E5,:C5,:G],[0.125]
#36=74
play_chord [:Fs,:A]
sleep 0.25
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:F,:E5]
sleep 0.125
play_chord [:F,:D5]
sleep 0.25
play_chord [:E,:C5]
sleep 0.625
#75
play_chord [:C5,:E,:G5,:C6]
sleep 0.5
$end
# left 76
in_thread do
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #77
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #78
  play :C3
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  #79
  play :C3
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  #80
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  play :B2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #81
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #82
  play_chord [:Ds3,:Fs3,:C]
  sleep 0.25
  play_chord [:Ds3,:Fs3,:C]
  sleep 0.5
  play_chord [:Ds3,:Fs3,:C]
  sleep 0.25
  #83
  play_chord [:Ds3,:Fs3,:C]
  sleep 1
  #84
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #85
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #86
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  #87
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  #88
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:D2,:D3]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:F2,:F3]
  sleep 0.25
  #89
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play_chord [:Fs3,:C,:D]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #90
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:D2,:D3]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:B2,:B3]
  sleep 0.25
  #(-91) 92
  play_chord [:C3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:C2,:C3]
  sleep 0.5
end
# Right 76
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.375
#77
play :A
sleep 0.125
play_chord [:F,:D5]
sleep 0.125
play_pattern_timed [:A,:C5,:D5,:C5,:A],[0.125]
#78
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.375
#79
play :C
sleep 0.125
play_chord [:G,:E5]
sleep 0.125
play_pattern_timed [:C5,:D5,:E5,:D5,:C5],[0.125]
#80
play_chord [:B,:D5]
sleep 0.25
play_chord [:As,:Cs5]
sleep 0.125
play_chord [:B,:D5]
sleep 0.25
play_chord [:As,:Cs5]
sleep 0.125
play_chord [:B,:D5]
sleep 0.375
#81
play :F5
sleep 0.125
play_chord [:B,:A5]
sleep 0.125
play_pattern_timed [:F5,:G5,:A5,:G5,:F5],[0.125]
#82
play_chord [:C5,:C6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.5
play_chord [:C5,:A5]
sleep 0.25
#83
play_chord [:C5,:G5]
sleep 0.25
play_chord [:E,:G]
sleep 0.125
play_chord [:E,:G]
sleep 0.125
play_chord [:E,:G]
sleep 0.25
play_chord [:E,:G]
sleep 0.25
#84
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.375
#77=85
play :A
sleep 0.125
play_chord [:F,:D5]
sleep 0.125
play_pattern_timed [:A,:C5,:D5,:C5,:A],[0.125]
#78=86
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.375
#79=87
play :C
sleep 0.125
play_chord [:G,:E5]
sleep 0.125
play_pattern_timed [:C5,:D5,:E5,:D5,:C5],[0.125]
#88
play_pattern_timed [:A,:Gs,:A],[0.125]
play_chord [:A,:G5]
sleep 0.25
play_chord [:A,:F5]
sleep 0.25
play_chord [:A,:C5]
sleep 0.125
#89
play_chord [:G,:E5]
sleep 0.125
play_pattern_timed [:Ds5,:E5],[0.125]
play :A5
sleep 0.25
play_pattern_timed [:C6,:G5,:E5],[0.125]
#90
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:F,:B,:E5]
sleep 0.125
play_chord [:F,:B,:D5]
sleep 0.25
play_chord [:E,:G,:C5]
sleep 0.125
#(-91) 92
play_chord [:E,:G,:C5]
sleep 0.5
play_chord [:C5,:E,:G5,:C6]
sleep 0.5

$end
$end

_________


 # The Entertainer - Scott Joplin
# page3-4 bars 55-92

use_bpm 40
use_synth_defaults  attack: 0.001, decay: 0.1, sustain: 0.1, release: 0.2, attack_level: 1, sustain_level: 0.7
use_synth :saw

#left hand
in_thread do
  # F dur
  #55
  play :F2
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :C3
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  #56
  play :B2
  sleep 0.25
  play_chord [:B3,:D,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:B3,:D,:F]
  sleep 0.25
  #57
  play :D2
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  #58
  play :G2
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  #59
  play_chord [:B2,:B3]
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:Gs2,:Gs3]
  sleep 0.25
  #60
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  #61
  play :E3
  sleep 0.25
  play_chord [:B3,:D,:E]
  sleep 0.25
  play :Gs3
  sleep 0.25
  play_chord [:B3,:D,:E]
  sleep 0.25
  #62
  play_chord [:A3,:C,:E]
  sleep 0.5
  play_chord [:G3,:C,:E]
  sleep 0.25
  play :C3
  sleep 0.25
  #63
  play :F2
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play :C3
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  #64
  play :Bb2
  sleep 0.25
  play_chord [:Bb3,:D,:F]
  sleep 0.25
  play :F3
  sleep 0.25
  play_chord [:Bb3,:D,:F]
  sleep 0.25
  #65
  play :D2
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:A3,:D,:F]
  sleep 0.25
  #66
  play_chord [:Bb2,:Bb3]
  sleep 0.25
  play_chord [:Bb3,:D]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:Bb3,:D]
  sleep 0.25
  #67
  play :B2
  sleep 0.25
  play_chord [:B3,:D]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:Gs2,:Gs3]
  sleep 0.25
  #68
  play_chord [:A2,:A3]
  sleep 0.125
  play_chord [:F2,:F3]
  sleep 0.125
  play_chord [:E2,:E3]
  sleep 0.125
  play_chord [:D2,:D3]
  sleep 0.125
  play_chord [:Db2,:Db3]
  sleep 0.5
  #69
  play_chord [:C2,:C3]
  sleep 0.25
  play_chord [:A3,:C,:F]
  sleep 0.25
  play_chord [:C3, :C]
  sleep 0.25
  play_chord [:C2, :C3]
  sleep 0.25
  #(-70) 71
  play_chord [:F2, :F3]
  sleep 0.5
  play_chord [:F1, :F2]
  sleep 0.5
end
#right hand F dur
#bar55
play_chord [:F5,:A5]
sleep 0.125
play :Gs
sleep 0.125
play_chord [:F5,:A5]
sleep 0.25
play_chord [:F5,:A5,:C6]
sleep 0.25
#56
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:A5,:D6,:F6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:Bb,:A,:Bb,:C5,:D5],[0.125,0.125,0.125,0.125,0.25]
#57
play_chord [:D5,:F5]
sleep 0.125
play :E5
sleep 0.125
play_chord [:D5,:F5]
sleep 0.5
play_chord [:D5,:F5,:A5]
sleep 0.25
#58
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:D5,:G5,:D6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:G,:Fs,:G,:A,:Bb,:G5],[0.125,0.125,0.125,0.125,0.25,0.25]
#59
play_pattern_timed [:D5,:G5,:D5,:G5,:D5],[0.25,0.125,0.25,0.125,0.25,]
#60
play_pattern_timed [:C5,:F5],[0.5]
#61
play_pattern_timed [:E5,:Gs5,:B5,:E6,:D6,:B5,:C6],[0.125,0.125,0.125,0.25,0.125,0.125,0.125]
#62
play_pattern_timed [:A5,:Bb5],[0.5]
#63
play_chord [:F5,:A5]
sleep 0.125
play :Gs
sleep 0.125
play_chord [:F5,:A5]
sleep 0.25
play_chord [:F5,:A5,:C6]
sleep 0.25
#56=64
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:A5,:D6,:F6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:Bb,:A,:Bb,:C5,:D5],[0.125,0.125,0.125,0.125,0.25]
#57=65
play_chord [:D5,:F5]
sleep 0.125
play :E5
sleep 0.125
play_chord [:D5,:F5]
sleep 0.5
play_chord [:D5,:F5,:A5]
sleep 0.25
#58=66
use_synth_defaults  decay: 0.8, sustain: 0.1, release: 0.2
play_chord [:D5,:G5,:D6]
sleep 0.25
use_synth_defaults  decay: 0.1, sustain: 0.1, release: 0.2
play_pattern_timed [:G,:Fs,:G,:A,:Bb,:G5],[0.125,0.125,0.125,0.125,0.25,0.25]
#59=67
play_pattern_timed [:D5,:G5,:D5,:G5,:D5],[0.25,0.125,0.25,0.125,0.25,]
#68
play :C5
sleep 0.5
play_chord [:Gs,:B,:F5]
sleep 0.375
play :F5
sleep 0.125
#69
play_chord [:A,:C5,:A5]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.25
play_chord [:Bb,:G5]
sleep 0.125
play :C5
play_chord [:Bb,:D5]
sleep 0.375
play :E5
sleep 0.125
#(-70) 71
play_chord [:A,:F5]
sleep 0.5
play_chord [:F5,:A5,:C6,:F6]
sleep 0.5
$end

# The Entertainer - page 4 bars 72-92
use_bpm 40
use_synth_defaults  attack: 0.001, decay: 0.1, sustain: 0.1, release: 0.2, attack_level: 1, sustain_level: 0.7
use_synth :saw
# left
in_thread do
  #34=72
  play_chord [:F3,:A3,:C,:F]
  sleep 0.25
  play_chord [:F3,:A3,:C,:F]
  sleep 0.25
  play_chord [:Fs3,:A3,:Cs,:D]
  sleep 0.25
  play_chord [:Fs3,:A3,:Cs,:D]
  sleep 0.25
  #35=73
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  play_chord [:G3,:A3,:C]
  sleep 0.25
  #36=74
  play_chord [:D3,:C]
  sleep 0.25
  play_chord [:D3,:A3]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  play_chord [:G3,:B3]
  sleep 0.25
  #75
  play_chord [:C3,:C]
  sleep 0.5
  play_chord [:C2,:C3]
  sleep 0.5
end
# right
#34-35=72-73
play_pattern_timed [:C5,:A,:C5],[0.25,0.125,0.25]
play_pattern_timed [:A,:C5,:A,:G,:C5,:E5],[0.125]
play :G5
sleep 0.25
play_pattern_timed [:E5,:C5,:G],[0.125]
#36=74
play_chord [:Fs,:A]
sleep 0.25
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:F,:E5]
sleep 0.125
play_chord [:F,:D5]
sleep 0.25
play_chord [:E,:C5]
sleep 0.625
#75
play_chord [:C5,:E,:G5,:C6]
sleep 0.5
$end
# left 76
in_thread do
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #77
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #78
  play :C3
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  #79
  play :C3
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3]
  sleep 0.25
  #80
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  play :B2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #81
  play :G2
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  play :D3
  sleep 0.25
  play_chord [:F3,:G3,:B3]
  sleep 0.25
  #82
  play_chord [:Ds3,:Fs3,:C]
  sleep 0.25
  play_chord [:Ds3,:Fs3,:C]
  sleep 0.5
  play_chord [:Ds3,:Fs3,:C]
  sleep 0.25
  #83
  play_chord [:Ds3,:Fs3,:C]
  sleep 1
  #84
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #85
  play :F2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  play :A2
  sleep 0.25
  play_chord [:F3,:A3]
  sleep 0.25
  #86
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  #87
  play :C3
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  play :G2
  sleep 0.25
  play_chord [:E3,:G3,:C]
  sleep 0.25
  #88
  play_chord [:F2,:F3]
  sleep 0.25
  play_chord [:D2,:D3]
  sleep 0.25
  play_chord [:E2,:E3]
  sleep 0.25
  play_chord [:F2,:F3]
  sleep 0.25
  #89
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  play_chord [:Fs3,:C,:D]
  sleep 0.25
  play_chord [:G3,:C,:E]
  sleep 0.25
  #90
  play_chord [:A2,:A3]
  sleep 0.25
  play_chord [:D2,:D3]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:B2,:B3]
  sleep 0.25
  #(-91) 92
  play_chord [:C3,:C]
  sleep 0.25
  play_chord [:G2,:G3]
  sleep 0.25
  play_chord [:C2,:C3]
  sleep 0.5
end
# Right 76
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.375
#77
play :A
sleep 0.125
play_chord [:F,:D5]
sleep 0.125
play_pattern_timed [:A,:C5,:D5,:C5,:A],[0.125]
#78
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.375
#79
play :C
sleep 0.125
play_chord [:G,:E5]
sleep 0.125
play_pattern_timed [:C5,:D5,:E5,:D5,:C5],[0.125]
#80
play_chord [:B,:D5]
sleep 0.25
play_chord [:As,:Cs5]
sleep 0.125
play_chord [:B,:D5]
sleep 0.25
play_chord [:As,:Cs5]
sleep 0.125
play_chord [:B,:D5]
sleep 0.375
#81
play :F5
sleep 0.125
play_chord [:B,:A5]
sleep 0.125
play_pattern_timed [:F5,:G5,:A5,:G5,:F5],[0.125]
#82
play_chord [:C5,:C6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.125
play_chord [:C5,:C6]
sleep 0.5
play_chord [:C5,:A5]
sleep 0.25
#83
play_chord [:C5,:G5]
sleep 0.25
play_chord [:E,:G]
sleep 0.125
play_chord [:E,:G]
sleep 0.125
play_chord [:E,:G]
sleep 0.25
play_chord [:E,:G]
sleep 0.25
#84
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.25
play_chord [:Cs,:E]
sleep 0.125
play_chord [:D,:F]
sleep 0.375
#77=85
play :A
sleep 0.125
play_chord [:F,:D5]
sleep 0.125
play_pattern_timed [:A,:C5,:D5,:C5,:A],[0.125]
#78=86
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.25
play_chord [:Ds,:Fs]
sleep 0.125
play_chord [:E,:G]
sleep 0.375
#79=87
play :C
sleep 0.125
play_chord [:G,:E5]
sleep 0.125
play_pattern_timed [:C5,:D5,:E5,:D5,:C5],[0.125]
#88
play_pattern_timed [:A,:Gs,:A],[0.125]
play_chord [:A,:G5]
sleep 0.25
play_chord [:A,:F5]
sleep 0.25
play_chord [:A,:C5]
sleep 0.125
#89
play_chord [:G,:E5]
sleep 0.125
play_pattern_timed [:Ds5,:E5],[0.125]
play :A5
sleep 0.25
play_pattern_timed [:C6,:G5,:E5],[0.125]
#90
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:Fs,:C5]
sleep 0.25
play_chord [:F,:B,:E5]
sleep 0.125
play_chord [:F,:B,:D5]
sleep 0.25
play_chord [:E,:G,:C5]
sleep 0.125
#(-91) 92
play_chord [:E,:G,:C5]
sleep 0.5
play_chord [:C5,:E,:G5,:C6]
sleep 0.5

$end
$end
@rbnpi
Copy link
Contributor

rbnpi commented Jun 16, 2015

Hi there
This is a known problem with SP. it occurs because of size limitations connected with using UDP to communicate between the server and scsynth. A solution using TCP comes exists but has some issues and has not been adopted yet. Hopefully it will be included soon to solve this problem. You can try it out by changing the line protocol = UDP;
In main window.cpp to protocol = TCP; and building your own copy of SP.
You should then be able to put all of the entertainer in one workspace.

@helgeras
Copy link
Author

Hi rbnpi

Thanks for reply, but what do i really have to do?

@rbnpi
Copy link
Contributor

rbnpi commented Jun 18, 2015

Well you need to set up your own copy of SP. On a Raspberry Pi
open a terminal window and type git clone https://github.com/samaaron/sonic-pi.git
This will download the code into a folder sonic_pi
The follow the installation details in the file INSTALL.md inside the top level of that folder.
I wrote an article https://rbnrpi.wordpress.com/project-list/sonic-pi-accessing-the-cutting-edge/ which details the process. It was written last January but should still essentially be correct.

Once you have this working and can run your own local version of SP ver 2.6dev you can alter it to use TCP instead of UDP.
find the file mainwindow.cpp in the folder sonic-pi/app/gui/qt and alter the line
protocol = UDP;
(currently line 103) to read
protocol =TCP;
save the file and rebuild SP. (you only need to use ~/sonic-pi/app/gui/qt/rp-build-app as the extensions will not have changed).
You should then be able to run this new version and use long source files.

The alternative is to use two workspaces as you are currently doing. You can however link them together using cue :secondpart at the end of the first workspace and sync :secondpart at the beginning of the second workspace. Run the second workspace, then the first one and they will play one after the other without a break.

Using TCP cures the problem. It is not included by default yet as it creates some other issues, although I don't think these will affect the files you are running. Hopefully these other issues will be addressed and it will be added before too long, but not many people use very large files so it is not a number 1 priority.

Note you can add the modified version of SP and it can coexist with the built in one.

@helgeras
Copy link
Author

Robin Newman

Thanks a lot, I will try the alternative method, because i still await
connection to internet

Kind regards
Helge Rasmussen

2015-06-19 2:51 GMT+07:00 Robin Newman [email protected]:

Well you need to set up your own copy of SP. On a Raspberry Pi
open a terminal window and type git clone
https://github.com/samaaron/sonic-pi.git
This will download the code into a folder sonic_pi
The follow the installation details in the file INSTALL.md inside the top
level of that folder.
I wrote an article
https://rbnrpi.wordpress.com/project-list/sonic-pi-accessing-the-cutting-edge/
which details the process. It was written last January but should still
essentially be correct.

Once you have this working and can run your own local version of SP ver
2.6dev you can alter it to use TCP instead of UDP.
find the file mainwindow.cpp in the folder sonic-pi/app/gui/qt and alter
the line
protocol = UDP;
(currently line 103) to read
protocol =TCP;
save the file and rebuild SP. (you only need to use
~/sonic-pi/app/gui/qt/rp-build-app as the extensions will not have changed).
You should then be able to run this new version and use long source files.

The alternative is to use two workspaces as you are currently doing. You
can however link them together using cue :secondpart at the end of the
first workspace and sync :secondpart at the beginning of the second
workspace. Run the second workspace, then the first one and they will play
one after the other without a break.

Using TCP cures the problem. It is not included by default yet as it
creates some other issues, although I don't think these will affect the
files you are running. Hopefully these other issues will be addressed and
it will be added before too long, but not many people use very large files
so it is not a number 1 priority.


Reply to this email directly or view it on GitHub
#541 (comment).

@helgeras
Copy link
Author

Tried 'cue :secondpart' and 'sync :secondpart' - It works perfect!
Thanks for the tip.

Kind regards
Helge Rasmussen

2015-06-19 10:17 GMT+07:00 Helge Rasmussen [email protected]:

Robin Newman

Thanks a lot, I will try the alternative method, because i still await
connection to internet

Kind regards
Helge Rasmussen

2015-06-19 2:51 GMT+07:00 Robin Newman [email protected]:

Well you need to set up your own copy of SP. On a Raspberry Pi
open a terminal window and type git clone
https://github.com/samaaron/sonic-pi.git
This will download the code into a folder sonic_pi
The follow the installation details in the file INSTALL.md inside the top
level of that folder.
I wrote an article
https://rbnrpi.wordpress.com/project-list/sonic-pi-accessing-the-cutting-edge/
which details the process. It was written last January but should still
essentially be correct.

Once you have this working and can run your own local version of SP ver
2.6dev you can alter it to use TCP instead of UDP.
find the file mainwindow.cpp in the folder sonic-pi/app/gui/qt and alter
the line
protocol = UDP;
(currently line 103) to read
protocol =TCP;
save the file and rebuild SP. (you only need to use
~/sonic-pi/app/gui/qt/rp-build-app as the extensions will not have changed).
You should then be able to run this new version and use long source files.

The alternative is to use two workspaces as you are currently doing. You
can however link them together using cue :secondpart at the end of the
first workspace and sync :secondpart at the beginning of the second
workspace. Run the second workspace, then the first one and they will play
one after the other without a break.

Using TCP cures the problem. It is not included by default yet as it
creates some other issues, although I don't think these will affect the
files you are running. Hopefully these other issues will be addressed and
it will be added before too long, but not many people use very large files
so it is not a number 1 priority.


Reply to this email directly or view it on GitHub
#541 (comment).

@claremacrae
Copy link
Contributor

This ticket could be closed - no further action is requested.

@pierredewilde
Copy link
Contributor

Hi,

I am trying to test TCP protocol:

$ app/server/bin/sonic-pi-server.rb -t
Sonic Pi server booting...
Using protocol: tcp
app/server/bin/sonic-pi-server.rb:49:in `<main>': uninitialized constant SonicPi::OSC::TCPClient (NameError)
Did you mean?  TCPSocket

I've successfully built last version of Sonic Pi (v2.10 dev).

Thanks,
Pierre

@samaaron
Copy link
Collaborator

samaaron commented Mar 5, 2016

Hi @pierredewilde - unfortunately the TCP stuff isn't finished at this stage and therefore won't work without further dev time. Apologies.

@pierredewilde
Copy link
Contributor

Hi Sam,

OK, don't worry. I just wanted to test a long script (~2000 lines). It
seems to be limited to max 528 lines with UDP on MacOSX. I'll split it into
several buffers linked with sync.

Thanks,
Pierre

On Sat, Mar 5, 2016 at 11:26 PM, Sam Aaron [email protected] wrote:

Hi @pierredewilde https://github.com/pierredewilde - unfortunately the
TCP stuff isn't finished at this stage and therefore won't work without
further dev time. Apologies.


Reply to this email directly or view it on GitHub
#541 (comment).

@samaaron
Copy link
Collaborator

samaaron commented Mar 5, 2016

Yes, unfortunately this is a limitation of our current approach :-(

@samaaron
Copy link
Collaborator

@helgeras - thanks for sharing your composition! In the future, a lot more people would be able to enjoy your code if you posted it to our forums over on https://in-thread.sonic-pi.net :-)

Hope you're still having fun with Sonic Pi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants