Three more pieces for Sonic Pi

having spent much of the last week immersed in coding php+mysql for a website, I needed to chill out, and the outcome was these three pieces.
The first is very rhythmic (they knew how to do that in the 15th Century!)
The second has intricate interplay between the parts, and the third is very soothing to listen to with your eyes closed.

Links to the code contained in the description below each piece. (Click SoundCloud top right of each pane if you want these)

2 Likes

Thanks for sharing.

Can I ask how you do the transcription? Is it by hand, or do you have technological help?

Most of these pieces start life as existing midi files, which I load into MuseScore (now at version 3). There I create separate part files, and manipulate them to meet certain strict criteria, so that they may then be converted by a Processing Script to Sonic Pi format. Each part is converted separately, and then they are pasted into a text editor to be recombined. At that state, I add synths to be used, reverb, pan and volume settings to suite. The files are generally too long for a buffer, so I run them using the run_file command in Sonic Pi.
EDIT I also sometimes replace the built in play code added by the conversion script, and put in a single defined function used for all the parts, rather than seperate play code for each section. Certain percussive synths also require amendments to the default sustain and release times, and individula part transpose data has to be added, eg for a Horn in F, as MuseScore will export the actual written notes.

A link to the series fo three articles I wrote describing and developing the process is here

I have used this so often now that I find it quite quick to do. In this last set, I also copied the drum part from channel 10 and pasted it into an instrument part. I then simply used the presence of a note (alwasy the same one) to tirgger a sample instead of playing the note, thus producing the poercussion part.

If you use midi files at all I can highly recommend MuseScore3.1 which is free

2 Likes

Thanks. I have a Java class to read MIDI files and expose their contents to … enquiry … that I need to finish for other purposes. I’m wondering about dumping MIDI as a Sonic Pi program that can play the MIDI based on your format. If I did that, then doing a ‘me, too’ classical music Sonic Pi program similar to yours would be an interesting experiment. And, it would prompt me to complete the class and fix any bugs, etc.

Essentially the processing script works on a MusicXML file exported from MuseScore.

1 Like

I found this more difficult than I expected. Instead of including variable BPMs in the Sonic Pi, I run the whole piece at ‘120bpm’ but then adjust the amount that notes last for (and when they play) to get the actual tempo. This makes my format much less user friendly than Robin’s format. However, my format sleeps before a note is played, and this can be a sleep of zero, meaning that polyphonic tracks can be played.

To make this work, I needed code that could work out the absolute time of any event, and this relies on both that event’s tick count but also all previous tempo changes. I do have code that does this, but need to see more testing to see if it works on all combinations of notes and tempo changes.

This is a piece Novus miles sequitur, a hymn on the death of Thomas a Beckett, composed in the early 13th century generated from a MIDI file obtained from: Standing Stones.com

use_bpm 120
with_fx :reverb, room: 0.6,mix: 0.7 do
  # Track 1
  in_thread do
    use_synth :saw
    pan = -1.0
    # Number of notes = 82
    notes1 = [:d4, :c4, :b3, :a3, :d3, :e3, :e3, :e3, :fs3, :g3, :a3, :a3, :fs3, :d3, :d3, :g3, :b3, :a3, :fs3, :a3, :b3, :c4, :d4, :b3, :a3, :g3, :a3, :c4, :d4, :c4, :b3, :c4, :a3, :d3, :d3, :e3, :c3, :d3, :e3, :fs3, :d3, :c3, :e3, :fs3, :g3, :g3, :e3, :g3, :fs3, :g3, :e3, :c3, :d3, :e3, :a3, :a3, :g3, :c4, :b3, :a3, :fs3, :d3, :e3, :d3, :g3, :b3, :a3, :fs3, :a3, :g3, :fs3, :e3, :c3, :d3, :e3, :b3, :a3, :g3, :e3, :fs3, :g3, :a3]
    amps1 = [0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63]
    sustains1 = [1.92, 0.48, 0.48, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 2.88, 1.92, 1.92, 0.48, 0.48, 1.92, 0.96, 0.96, 0.96, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 0.96, 0.96, 0.96, 1.92, 1.92, 0.96, 1.92, 0.96, 0.96, 0.96, 0.96, 1.92, 1.92, 0.48, 0.48, 1.92, 0.96, 1.92, 0.96, 1.92, 1.92, 0.96, 1.92, 0.48, 0.48, 2.88, 1.92, 1.92, 0.48, 0.48, 1.92, 0.96, 1.92, 0.96, 1.92, 1.92, 0.48, 0.48, 1.92, 0.96, 1.92, 0.96, 1.92, 0.48, 0.48, 1.92, 1.92, 0.48, 0.48, 1.92, 0.48, 0.48, 3.6]
    sleeps1 = [0.0, 2.4, 0.6000000000000001, 0.6000000000000001, 2.4, 1.2000000000000002, 2.3999999999999995, 1.200000000000001, 2.3999999999999986, 1.200000000000001, 2.4000000000000004, 1.1999999999999993, 2.3999999999999986, 1.2000000000000028, 3.599999999999998, 3.6000000000000014, 2.3999999999999986, 0.6000000000000014, 0.5999999999999979, 2.3999999999999986, 1.2000000000000028, 1.2000000000000028, 1.1999999999999957, 1.2000000000000028, 2.3999999999999986, 1.2000000000000028, 2.3999999999999986, 1.1999999999999957, 2.4000000000000057, 1.1999999999999957, 1.2000000000000028, 1.1999999999999957, 1.2000000000000028, 3.6000000000000014, 2.3999999999999986, 1.2000000000000028, 2.3999999999999986, 1.1999999999999957, 1.2000000000000028, 1.2000000000000028, 1.2000000000000028, 3.5999999999999943, 2.4000000000000057, 0.5999999999999943, 0.5999999999999943, 2.4000000000000057, 1.2000000000000028, 2.3999999999999915, 1.2000000000000028, 3.6000000000000085, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 0.5999999999999943, 0.5999999999999943, 3.6000000000000085, 3.5999999999999943, 2.4000000000000057, 0.5999999999999943, 0.6000000000000085, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 1.1999999999999886, 3.6000000000000085, 2.3999999999999915, 0.6000000000000085, 0.5999999999999943, 2.4000000000000057, 1.2000000000000028, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 0.5999999999999943, 0.5999999999999943, 3.5999999999999943, 2.4000000000000057, 0.5999999999999943, 0.6000000000000227, 2.3999999999999773, 0.6000000000000227, 0.5999999999999943]
    (notes1.length-1).times do |i|
      sleep sleeps1[i]
      play notes1[i], sustain: sustains1[i], pan: pan, amp: amps1[i]
    end
  end
  # Track 2
  in_thread do
    use_synth :pulse
    pan = 1.0
    # Number of notes = 75
    notes2 = [:d3, :fs3, :a3, :a3, :b3, :a3, :g3, :fs3, :e3, :fs3, :g3, :fs3, :d3, :fs3, :a3, :a3, :g3, :e3, :fs3, :d3, :c3, :d3, :e3, :fs3, :g3, :e3, :fs3, :d3, :c3, :d3, :a3, :a3, :b3, :c4, :d4, :c4, :b3, :a3, :c4, :b3, :g3, :g3, :b3, :a3, :g3, :fs3, :g3, :g3, :g3, :fs3, :e3, :d3, :d3, :d3, :g3, :fs3, :d3, :fs3, :a3, :g3, :a3, :g3, :e3, :fs3, :d3, :c3, :d3, :e3, :g3, :e3, :e3, :g3, :fs3, :e3, :d3]
    amps2 = [0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63]
    sustains2 = [1.92, 0.96, 1.92, 0.96, 0.96, 0.96, 0.48, 0.48, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 2.88, 1.92, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 2.88, 1.92, 1.92, 0.96, 1.92, 0.96, 0.96, 0.96, 0.96, 1.92, 1.92, 0.96, 1.92, 0.96, 0.96, 0.96, 0.96, 1.92, 1.92, 0.96, 1.92, 0.48, 0.48, 1.92, 0.96, 1.92, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 0.96, 1.92, 1.92, 0.96, 1.92, 0.96, 3.6]
    sleeps2 = [0.0, 2.4, 1.2000000000000002, 2.4, 1.2000000000000002, 1.2000000000000002, 1.1999999999999993, 0.5999999999999996, 0.6000000000000014, 2.3999999999999986, 1.200000000000001, 2.4000000000000004, 1.1999999999999993, 2.3999999999999986, 1.2000000000000028, 3.599999999999998, 3.6000000000000014, 2.3999999999999986, 1.1999999999999993, 2.3999999999999986, 1.2000000000000028, 2.3999999999999986, 1.2000000000000028, 2.3999999999999986, 1.2000000000000028, 2.3999999999999986, 1.1999999999999957, 2.4000000000000057, 1.1999999999999957, 3.6000000000000014, 3.6000000000000014, 2.3999999999999986, 1.2000000000000028, 2.3999999999999986, 1.1999999999999957, 1.2000000000000028, 1.2000000000000028, 1.2000000000000028, 3.5999999999999943, 2.4000000000000057, 1.1999999999999886, 2.4000000000000057, 1.2000000000000028, 1.2000000000000028, 1.1999999999999886, 1.2000000000000028, 3.6000000000000085, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 0.5999999999999943, 0.5999999999999943, 2.4000000000000057, 1.2000000000000028, 3.5999999999999943, 2.4000000000000057, 1.2000000000000028, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 1.1999999999999886, 3.6000000000000085, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 1.2000000000000028, 2.3999999999999915, 1.2000000000000028, 2.4000000000000057, 1.1999999999999886, 3.5999999999999943, 2.4000000000000057, 1.200000000000017, 2.3999999999999773, 1.200000000000017]
    (notes2.length-1).times do |i|
      sleep sleeps2[i]
      play notes2[i], sustain: sustains2[i], pan: pan, amp: amps2[i]
    end
  end
end

EDIT: I wonder if one thing that can be done with classical pieces in live coding is to start with a piece that just plays back the notes with basic sawtooth waves etc., but does so by calling functions. Then, as the piece is playing, the functions could be edited to change the instrument sounds and develop more sophisticated instruments in real time, making it more ‘live coding’.

EDIT: I replaced the previous version of this as I’d used a for loop which is undocumented in Sonic Pi. I used a .times loop instead.

Thanks for the link to the Standing Stones site. I liked some of the early music midi files there and this afternoon have converted three of them for Sonic Pi which you may be interested in.

As regards your thoughts on live_coding classical music it is an interesting subject. I guess the main problem is that you are usually playing several linear parts together, and that it is not easy to make changes, which you may want to apply to several parts at once.
I think what you can do is to make alterations to enveloping fx envelopes. I have done something like this some time ago using Sonic Pi as a midi -player applying fx wrappers to the audio produced, and also allowing a whole range of other parameters to be altered controlling the whole with a TouchOSC interface.

1 Like

What I thought of doing was to use defined functions to play the sounds. If the actual music is playing in one buffer, then I can have the functions in another buffer, and can reload them. All subsequently played notes will then use the new voice definition.

I gave this a quick trial, and it works. Except that I found out that while it works as a quick technology experiment, the mod_fm synth really isn’t suitable for early music. :grinning:

Thanks for the early music above. Off to play them now.

EDIT: The tri and filtered sawtooth sounds really sound much better :slight_smile: I’ve enjoyed these three examples very much.

When I tried doing another early music track, I fiddled things so that for three voices the :tri synth will be dead centre. But,I don’t think my more or less randomly chosen piece from that page suits the Sonic Pi treatment as well as yours does. But, here it is. Note that it’s too big for the GUI buffer, and I had to use run_file on it.

This is * Jusques à tant que je puisse veir by Charite.

use_bpm 120
with_fx :reverb, room: 0.6,mix: 0.7 do
	# Track 1
	in_thread do
		use_synth :saw
		pan = -1.0
		# Number of notes = 109
		notes1 = [:a4, :g4, :a4, :b4, :c5, :c5, :b4, :a4, :g4, :f4, :e4, :d4, :d4, :e4, :c4, :d4, :e4, :f4, :g4, :a4, :g4, :f4, :d4, :e4, :d4, :cs4, :d4, :a4, :a4, :c5, :as4, :a4, :g4, :f4, :e4, :b4, :a4, :a4, :gs4, :a4, :a4, :a4, :g4, :f4, :e4, :e4, :d4, :c4, :f4, :e4, :d4, :c4, :e4, :e4, :a3, :b3, :c4, :d4, :as3, :a3, :e4, :c4, :d4, :e4, :f4, :e4, :d4, :cs4, :d4, :a4, :a4, :c5, :as4, :a4, :a4, :g4, :e4, :c5, :as4, :a4, :g4, :f4, :f4, :e4, :f4, :d4, :f4, :a4, :b4, :c5, :b4, :b4, :a4, :a4, :g4, :a4, :as4, :a4, :f4, :d4, :e4, :f4, :f4, :e4, :d4, :d4, :cs4, :b3, :d4]
		amps1 = [0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63]
		sustains1 = [3.51, 1.48, 1.11, 0.37, 0.74, 1.48, 0.74, 1.48, 0.74, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.11, 0.37, 1.11, 0.37, 1.48, 1.11, 0.37, 0.74, 1.48, 1.48, 0.74, 2.22, 0.74, 1.48, 1.48, 1.48, 1.48, 1.48, 1.48, 0.74, 1.11, 0.37, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.48, 1.48, 1.48, 1.48, 0.74, 1.48, 0.74, 0.74, 0.74, 2.22, 0.74, 0.74, 0.74, 0.74, 0.74, 1.48, 0.74, 1.48, 1.11, 0.37, 0.74, 1.48, 0.74, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.11, 0.37, 0.74, 0.74, 1.48, 1.11, 0.37, 0.74, 1.11, 0.37, 0.74, 0.74, 0.37, 0.37, 2.22, 1.11, 0.37, 1.11, 0.37, 0.37, 0.37, 0.74, 1.11, 0.37, 0.74, 0.74, 1.48, 0.74, 0.37, 0.37, 0.74, 0.74, 0.74, 0.74, 0.74, 0.74, 4.43]
		sleeps1 = [0.0, 3.6923039999999996, 1.8461519999999996, 1.384614, 0.461538, 0.9230759999999991, 1.846152, 0.923076, 1.846152, 0.923076, 0.923076, 1.8461519999999982, 4.615380000000002, 0.9230759999999982, 1.846152, 1.846152, 1.3846139999999991, 0.4615380000000009, 1.3846139999999991, 0.4615380000000009, 1.846152, 1.3846139999999991, 0.46153799999999734, 0.9230760000000018, 1.8461520000000036, 1.8461519999999965, 0.9230760000000018, 4.615380000000002, 0.9230759999999947, 1.8461520000000036, 1.8461519999999965, 1.8461520000000036, 1.8461519999999965, 1.8461520000000036, 1.8461519999999965, 0.9230760000000018, 1.3846139999999991, 0.46153799999999734, 0.9230760000000018, 1.8461520000000036, 4.615379999999995, 0.9230759999999947, 1.8461520000000036, 1.8461520000000036, 1.8461520000000036, 1.8461519999999894, 1.8461520000000036, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 0.9230759999999947, 0.9230760000000089, 0.9230759999999947, 4.615380000000002, 0.9230759999999947, 0.9230760000000089, 0.9230759999999947, 0.9230759999999947, 0.9230760000000089, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 1.3846139999999991, 0.46153799999999023, 0.9230760000000089, 1.8461519999999894, 0.9230760000000089, 0.9230759999999947, 1.8461520000000036, 4.615380000000002, 0.9230759999999947, 1.8461520000000036, 1.8461520000000036, 1.3846139999999991, 0.46153799999999023, 0.9230760000000089, 0.9230759999999947, 1.8461520000000036, 1.3846139999999991, 0.46153800000000444, 0.9230759999999947, 1.3846139999999991, 0.46153800000000444, 0.9230759999999947, 0.9230759999999947, 0.46153800000000444, 0.46153800000000444, 3.692303999999993, 1.3846139999999991, 0.46153799999999023, 1.3846139999999991, 0.46153800000001866, 0.46153799999999023, 0.46153800000001866, 0.9230759999999805, 1.3846139999999991, 0.46153800000001866, 0.9230759999999805, 0.9230760000000089, 1.8461519999999894, 0.9230760000000089, 0.46153799999999023, 0.46153800000001866, 0.9230759999999805, 0.9230760000000089, 0.9230760000000089, 0.9230759999999805, 0.9230760000000089, 0.9230760000000089]
		(notes1.length-1).times do |i|
			sleep sleeps1[i]
			play notes1[i], sustain: sustains1[i], pan: pan, amp: amps1[i]
		end
	end
	# Track 2
	in_thread do
		use_synth :tri
		pan = 0.0
		# Number of notes = 88
		notes2 = [:d4, :c4, :a3, :e3, :f3, :c4, :b3, :g3, :f3, :d3, :d3, :a3, :d3, :d3, :a3, :e4, :b3, :c4, :d4, :c4, :a3, :b3, :a3, :gs3, :a3, :d4, :c4, :f4, :d4, :c4, :a3, :f3, :d3, :a3, :d3, :g3, :a3, :e3, :f3, :f3, :d3, :d3, :a3, :c4, :gs3, :a3, :c4, :b3, :a3, :b3, :g3, :f3, :d3, :a3, :d4, :c4, :b3, :a3, :b3, :a3, :gs3, :a3, :d3, :d3, :f3, :f3, :c3, :g3, :c3, :e4, :f4, :d4, :c4, :as3, :c4, :c4, :f3, :c3, :g3, :f3, :c4, :b3, :c4, :b3, :a3, :b3, :gs3, :a3]
		amps2 = [0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63]
		sustains2 = [1.48, 0.74, 0.74, 1.48, 1.48, 1.48, 0.74, 0.74, 1.48, 0.74, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.48, 3.51, 1.11, 0.37, 0.74, 1.48, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.48, 1.48, 0.74, 0.74, 1.48, 0.74, 0.74, 0.74, 0.74, 1.48, 2.22, 0.74, 3.51, 1.48, 1.48, 1.48, 1.48, 0.74, 1.48, 0.74, 1.48, 2.22, 0.74, 0.74, 1.48, 1.48, 0.74, 3.51, 1.48, 0.74, 1.48, 0.74, 1.48, 2.22, 0.74, 0.74, 1.48, 0.74, 0.74, 0.74, 3.51, 1.48, 0.74, 1.48, 0.74, 1.48, 2.22, 1.48, 1.48, 1.48, 1.48, 0.74, 3.32, 0.74, 0.74, 1.48, 0.74, 0.74, 0.74, 4.43]
		sleeps2 = [0.0, 1.8461519999999998, 0.9230759999999998, 0.923076, 1.8461519999999996, 1.846152, 1.8461519999999991, 0.923076, 0.923076, 1.846152, 0.923076, 0.923076, 1.8461519999999982, 4.615380000000002, 0.9230759999999982, 1.846152, 1.846152, 1.846152, 3.692304, 1.3846139999999991, 0.46153799999999734, 0.9230760000000018, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 4.615380000000002, 0.9230759999999947, 1.8461520000000036, 1.8461519999999965, 1.8461520000000036, 1.8461519999999965, 0.9230760000000018, 0.9230760000000018, 1.8461519999999965, 0.9230760000000018, 0.9230760000000018, 0.9230759999999947, 0.9230760000000018, 1.8461520000000036, 4.615379999999995, 0.9230759999999947, 3.692304000000007, 1.8461520000000036, 1.8461519999999894, 1.8461520000000036, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 4.615380000000002, 0.9230759999999947, 0.9230760000000089, 1.8461519999999894, 1.8461520000000036, 0.9230760000000089, 3.692303999999993, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 4.615380000000002, 0.9230759999999947, 0.9230759999999947, 1.8461520000000036, 0.9230760000000089, 0.9230759999999947, 0.9230759999999947, 3.692304000000007, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 3.692303999999993, 1.8461519999999894, 1.8461520000000178, 1.8461519999999894, 1.8461520000000178, 0.9230759999999805, 3.692304000000007, 0.9230760000000089, 0.9230759999999805, 1.8461520000000178, 0.9230759999999805, 0.9230760000000089, 0.9230760000000089]
		(notes2.length-1).times do |i|
			sleep sleeps2[i]
			play notes2[i], sustain: sustains2[i], pan: pan, amp: amps2[i]
		end
	end
	# Track 3
	in_thread do
		use_synth :pulse
		pan = 1.0
		# Number of notes = 76
		notes3 = [:d3, :a3, :a3, :b3, :a3, :gs3, :a3, :d4, :d4, :cs4, :d4, :d4, :c4, :a3, :g3, :f3, :f3, :f3, :g3, :f3, :e3, :d3, :d3, :f3, :g3, :a3, :d4, :c4, :d4, :c4, :b3, :a3, :a3, :d4, :d4, :a3, :b3, :a3, :g3, :g3, :f3, :e3, :e3, :f3, :g3, :a3, :f3, :e3, :d3, :g3, :f3, :e3, :d3, :d4, :d4, :a3, :g3, :c4, :a3, :g3, :as3, :a3, :g3, :f3, :f3, :a3, :b3, :c4, :as3, :a3, :g3, :f3, :g3, :f3, :e3, :d3]
		amps3 = [0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63, 0.63]
		sustains3 = [1.48, 0.74, 0.74, 1.48, 3.51, 1.48, 1.48, 0.74, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.48, 3.51, 1.48, 0.74, 1.48, 1.48, 0.74, 2.22, 0.74, 3.51, 1.48, 3.51, 1.48, 0.74, 1.48, 0.74, 1.48, 2.22, 0.74, 3.51, 1.48, 3.51, 1.48, 1.48, 0.74, 0.74, 1.48, 2.22, 0.74, 3.51, 1.48, 3.51, 0.74, 0.74, 1.48, 0.74, 0.74, 1.48, 2.22, 0.74, 1.48, 1.48, 1.48, 3.51, 1.48, 0.74, 1.48, 0.74, 1.48, 2.22, 1.48, 0.74, 0.74, 1.48, 1.48, 3.51, 1.48, 0.74, 1.48, 0.74, 1.48, 4.43]
		sleeps3 = [0.0, 1.8461519999999998, 0.9230759999999998, 0.923076, 1.8461519999999996, 3.692303999999999, 1.846152, 1.846152, 0.923076, 0.923076, 1.8461519999999982, 4.615380000000002, 0.9230759999999982, 1.846152, 1.846152, 1.846152, 3.692304, 1.8461519999999965, 0.9230760000000018, 1.8461520000000036, 1.8461519999999965, 0.9230760000000018, 4.615380000000002, 0.9230759999999947, 3.692304, 1.8461520000000036, 3.692304, 1.8461519999999965, 0.9230760000000018, 1.8461519999999965, 0.9230760000000018, 1.8461520000000036, 4.615379999999995, 0.9230759999999947, 3.692304000000007, 1.8461520000000036, 3.692303999999993, 1.8461520000000036, 1.8461520000000036, 0.9230759999999947, 0.9230759999999947, 1.8461520000000036, 4.615380000000002, 0.9230759999999947, 3.692304000000007, 1.8461520000000036, 3.692303999999993, 0.9230759999999947, 0.9230760000000089, 1.8461519999999894, 0.9230760000000089, 0.9230759999999947, 1.8461520000000036, 4.615380000000002, 0.9230759999999947, 1.8461520000000036, 1.8461520000000036, 1.8461519999999894, 3.692304000000007, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 0.9230759999999947, 1.8461520000000036, 3.692303999999993, 1.8461519999999894, 0.9230760000000089, 0.9230760000000089, 1.8461519999999894, 1.8461520000000178, 3.6923039999999787, 1.8461520000000178, 0.9230759999999805, 1.8461520000000178, 0.9230759999999805, 1.8461520000000178]
		(notes3.length-1).times do |i|
			sleep sleeps3[i]
			play notes3[i], sustain: sustains3[i], pan: pan, amp: amps3[i]
		end
	end
end