Slaapliedje (Lullaby)

I’d like to share a song I made, based on the first line of an a cappella Mongolian Lullaby. Please let me know what you think.

Here is the SoundCloud link:

Slaapliedje on SoundCloud

The original song by Urna Chahar-Tuchi can be found here: https://www.youtube.com/watch?v=d8kv_syHuYA

This song took me 7 months. I learned a lot about micro tonality, improved my “musical ear” and it truly was a journey. A lullaby has special meaning for me as I have a sleep disorder impacting my sleep quality, I can’t take the medication that would help me as it gave me really bad side effects, my previous song (also Sonic Pi) was in part about that. So this is not your typical lullaby :wink:

The technical bits:

Created 90% in Sonic Pi, some editing on samples and sounds in Audacity and Ardour. The vocal harmonies were done with Melodyne. Recorded and mixed in Ardour were I added a few effects as well.

The original song does not use our regulars 12-tone system, some of the notes are in between the “piano notes”. The past half year I’ve been navigating half sharps and half flats, this is the closest I got notation:

buuvei-zin1

I added harmonies by using 31-EDO tuning but sticking mostly to the key of G in Orwel-9 tuning (with A=440), this maps almost perfectly to the notes Urna is singing.

Trying out some chords:

freqs = [27.5, 28.122, 28.758, 29.408, 30.073, 30.753, 31.448, 32.159, 32.887, 33.63, 34.391, 35.168, 35.963, 36.777, 37.608, 38.459, 39.328, 40.217, 41.127, 42.057, 43.008, 43.98, 44.975, 45.991, 47.031, 48.095, 49.182, 50.294, 51.432, 52.595, 53.784, 55.0, 56.244, 57.515, 58.816, 60.146, 61.506, 62.897, 64.319, 65.773, 67.26, 68.781, 70.336, 71.927, 73.553, 75.216, 76.917, 78.656, 80.435, 82.253, 84.113, 86.015, 87.96, 89.949, 91.983, 94.063, 96.19, 98.365, 100.589, 102.863, 105.189, 107.568, 110.0, 112.487, 115.031, 117.632, 120.292, 123.012, 125.793, 128.637, 131.546, 134.521, 137.562, 140.673, 143.853, 147.106, 150.433, 153.834, 157.312, 160.869, 164.507, 168.227, 172.031, 175.92, 179.898, 183.966, 188.126, 192.38, 196.729, 201.178, 205.727, 210.379, 215.135, 220.0, 224.975, 230.062, 235.264, 240.583, 246.023, 251.586, 257.275, 263.092, 269.041, 275.124, 281.345, 287.707, 294.212, 300.865, 307.668, 314.625, 321.739, 329.014, 336.453, 344.061, 351.841, 359.796, 367.932, 376.251, 384.759, 393.459, 402.356, 411.453, 420.757, 430.271, 440.0, 449.949, 460.123, 470.527, 481.166, 492.046, 503.172, 514.55, 526.184, 538.082, 550.249, 562.691, 575.414, 588.425, 601.73, 615.336, 629.25, 643.478, 658.028, 672.907, 688.122, 703.682, 719.593, 735.864, 752.503, 769.518, 786.918, 804.711, 822.907, 841.514, 860.542, 880.0, 899.898, 920.246, 941.054, 962.333, 984.092, 1006.344, 1029.099, 1052.368, 1076.164, 1100.498, 1125.381, 1150.828, 1176.85, 1203.46, 1230.672, 1258.499, 1286.956, 1316.056, 1345.814, 1376.244, 1407.363, 1439.186, 1471.728, 1505.006, 1539.036, 1573.836, 1609.423, 1645.814, 1683.028, 1721.084, 1760.0, 1799.796, 1840.492, 1882.108, 1924.665, 1968.185, 2012.688, 2058.198, 2104.737, 2152.328, 2200.995, 2250.763, 2301.656, 2353.7, 2406.92, 2461.344, 2516.999, 2573.912, 2632.111, 2691.627, 2752.489, 2814.727, 2878.372, 2943.456, 3010.011, 3078.072, 3147.672, 3218.845, 3291.628, 3366.056, 3442.168, 3520.0, 3599.592, 3680.984, 3764.217, 3849.331, 3936.37, 4025.377, 4116.396, 4209.474, 4304.656, 4401.991, 4501.526, 4603.312, 4707.399, 4813.84, 4922.688, 5033.997, 5147.823, 5264.223, 5383.255, 5504.978, 5629.453, 5756.743, 5886.911, 6020.023, 6156.144, 6295.344, 6437.69, 6583.256, 6732.113, 6884.335, 7040.0, 7199.185, 7361.968, 7528.433, 7698.662, 7872.74, 8050.753, 8232.793, 8418.948, 8609.312, 8803.981, 9003.052, 9206.624, 9414.799, 9627.681, 9845.377, 10067.995, 10295.647, 10528.446, 10766.509, 11009.955, 11258.906, 11513.486, 11773.823, 12040.046, 12312.289, 12590.687, 12875.381, 13166.511, 13464.225, 13768.671, 14080.0]
# G3 op 119
set :offset, 119 # we start in the key of G

# testen akkoordenprogressie

define :speel do |notes_to_play, duration|
  for n in notes_to_play do
    note = hz_to_midi(freqs[get[:offset] + n])
    puts n, note
    play note, sustain: duration, attack: 0, release: 0, amp: 0.6
  end
  sleep duration
end

live_loop :chords do
  use_synth :sine
  speel [-33, -2,  4, 18], 2.328 + 0.579                 # Gb Gb Ad D
  speel [-31,  0,  7, 18], 2.148 + 0.218 + 0.417 + 0.178 # G  G  A# D
  speel [-23,  0,  8, 18], 2.391 + 0.442 + 0.223 + 0.333 # Bb G  Bb D
  speel [-12,  0,  8, 21], 3.408 + 0.247 + 0.348         # D+ G  Bb Eb
  speel [-30,  1, 11, 19], 4                             # G+ G+ B+ D+
  sleep 2
end

live_loop :melody do
  use_synth :saw
  sleep         2.328
  speel [18],   0.579 # D
  speel [0],    2.148 # G
  sleep         0.218
  speel [19],   0.417 # D+
  speel [14],   0.178 # C+
  speel [8],    2.391 # Bb
  sleep         0.442
  speel [16],   0.223 # Db
  speel [26],   0.333 # F
  speel [21],   3.408 # Eb
  speel [38],   0.247 # A#
  speel [36],   0.348 # A
  speel [32],   4     # G+
  sleep 2
end

Some techniques I used in my song:

The intro: bass beat and drone. Change the sample rate and bits in live loop :bass to get the same break down effect as in my song:

# Deel A1 - intro

freqs = [27.5, 28.122, 28.758, 29.408, 30.073, 30.753, 31.448, 32.159, 32.887, 33.63, 34.391, 35.168, 35.963, 36.777, 37.608, 38.459, 39.328, 40.217, 41.127, 42.057, 43.008, 43.98, 44.975, 45.991, 47.031, 48.095, 49.182, 50.294, 51.432, 52.595, 53.784, 55.0, 56.244, 57.515, 58.816, 60.146, 61.506, 62.897, 64.319, 65.773, 67.26, 68.781, 70.336, 71.927, 73.553, 75.216, 76.917, 78.656, 80.435, 82.253, 84.113, 86.015, 87.96, 89.949, 91.983, 94.063, 96.19, 98.365, 100.589, 102.863, 105.189, 107.568, 110.0, 112.487, 115.031, 117.632, 120.292, 123.012, 125.793, 128.637, 131.546, 134.521, 137.562, 140.673, 143.853, 147.106, 150.433, 153.834, 157.312, 160.869, 164.507, 168.227, 172.031, 175.92, 179.898, 183.966, 188.126, 192.38, 196.729, 201.178, 205.727, 210.379, 215.135, 220.0, 224.975, 230.062, 235.264, 240.583, 246.023, 251.586, 257.275, 263.092, 269.041, 275.124, 281.345, 287.707, 294.212, 300.865, 307.668, 314.625, 321.739, 329.014, 336.453, 344.061, 351.841, 359.796, 367.932, 376.251, 384.759, 393.459, 402.356, 411.453, 420.757, 430.271, 440.0, 449.949, 460.123, 470.527, 481.166, 492.046, 503.172, 514.55, 526.184, 538.082, 550.249, 562.691, 575.414, 588.425, 601.73, 615.336, 629.25, 643.478, 658.028, 672.907, 688.122, 703.682, 719.593, 735.864, 752.503, 769.518, 786.918, 804.711, 822.907, 841.514, 860.542, 880.0, 899.898, 920.246, 941.054, 962.333, 984.092, 1006.344, 1029.099, 1052.368, 1076.164, 1100.498, 1125.381, 1150.828, 1176.85, 1203.46, 1230.672, 1258.499, 1286.956, 1316.056, 1345.814, 1376.244, 1407.363, 1439.186, 1471.728, 1505.006, 1539.036, 1573.836, 1609.423, 1645.814, 1683.028, 1721.084, 1760.0, 1799.796, 1840.492, 1882.108, 1924.665, 1968.185, 2012.688, 2058.198, 2104.737, 2152.328, 2200.995, 2250.763, 2301.656, 2353.7, 2406.92, 2461.344, 2516.999, 2573.912, 2632.111, 2691.627, 2752.489, 2814.727, 2878.372, 2943.456, 3010.011, 3078.072, 3147.672, 3218.845, 3291.628, 3366.056, 3442.168, 3520.0, 3599.592, 3680.984, 3764.217, 3849.331, 3936.37, 4025.377, 4116.396, 4209.474, 4304.656, 4401.991, 4501.526, 4603.312, 4707.399, 4813.84, 4922.688, 5033.997, 5147.823, 5264.223, 5383.255, 5504.978, 5629.453, 5756.743, 5886.911, 6020.023, 6156.144, 6295.344, 6437.69, 6583.256, 6732.113, 6884.335, 7040.0, 7199.185, 7361.968, 7528.433, 7698.662, 7872.74, 8050.753, 8232.793, 8418.948, 8609.312, 8803.981, 9003.052, 9206.624, 9414.799, 9627.681, 9845.377, 10067.995, 10295.647, 10528.446, 10766.509, 11009.955, 11258.906, 11513.486, 11773.823, 12040.046, 12312.289, 12590.687, 12875.381, 13166.511, 13464.225, 13768.671, 14080.0]
# G3 op 119
set :offset, 119 # we start in the key of G

define :speel do |notes_to_play, duration|
  for n in notes_to_play do
    note = hz_to_midi(freqs[get[:offset] + n] + [-0.5,0.5].choose) - 24
    puts n, note
    play note, sustain: duration, attack: 4, release: 4, amp: 0.4, pan: rrand(-0.8,0.8)
  end
end

with_fx :sound_out_stereo, output: 3 do
  notes = [-2,-2,-2,18]
  live_loop :bass do
    with_fx :bitcrusher, sample_rate: 10000, bits: 8, cutoff: 130 do |b| # start with 10k and 8, go to 100 (or even lower) and 1
      use_synth :bass_foundation
      notes = [[0,0,0,18],[-2,-2,-2,18]].tick if one_in(10)
      puts notes
      2.times do
        length = [1,1,1,2].choose
        note = notes.choose
        speel([note], length * 4)
        sleep length / 2.0
      end
    end
  end
end

with_fx :sound_out_stereo, output: 5 do
  live_loop :beat do
    sync :bass
    #stop
    sample :bd_boom
  end
end

Noise to chords. Use a band pass filter on white noise to let it evolve into a pitch. Add some automation to make it sound interesting. This has a very airy dream like vibe that I absolutely love.

freqs = [27.5, 28.122, 28.758, 29.408, 30.073, 30.753, 31.448, 32.159, 32.887, 33.63, 34.391, 35.168, 35.963, 36.777, 37.608, 38.459, 39.328, 40.217, 41.127, 42.057, 43.008, 43.98, 44.975, 45.991, 47.031, 48.095, 49.182, 50.294, 51.432, 52.595, 53.784, 55.0, 56.244, 57.515, 58.816, 60.146, 61.506, 62.897, 64.319, 65.773, 67.26, 68.781, 70.336, 71.927, 73.553, 75.216, 76.917, 78.656, 80.435, 82.253, 84.113, 86.015, 87.96, 89.949, 91.983, 94.063, 96.19, 98.365, 100.589, 102.863, 105.189, 107.568, 110.0, 112.487, 115.031, 117.632, 120.292, 123.012, 125.793, 128.637, 131.546, 134.521, 137.562, 140.673, 143.853, 147.106, 150.433, 153.834, 157.312, 160.869, 164.507, 168.227, 172.031, 175.92, 179.898, 183.966, 188.126, 192.38, 196.729, 201.178, 205.727, 210.379, 215.135, 220.0, 224.975, 230.062, 235.264, 240.583, 246.023, 251.586, 257.275, 263.092, 269.041, 275.124, 281.345, 287.707, 294.212, 300.865, 307.668, 314.625, 321.739, 329.014, 336.453, 344.061, 351.841, 359.796, 367.932, 376.251, 384.759, 393.459, 402.356, 411.453, 420.757, 430.271, 440.0, 449.949, 460.123, 470.527, 481.166, 492.046, 503.172, 514.55, 526.184, 538.082, 550.249, 562.691, 575.414, 588.425, 601.73, 615.336, 629.25, 643.478, 658.028, 672.907, 688.122, 703.682, 719.593, 735.864, 752.503, 769.518, 786.918, 804.711, 822.907, 841.514, 860.542, 880.0, 899.898, 920.246, 941.054, 962.333, 984.092, 1006.344, 1029.099, 1052.368, 1076.164, 1100.498, 1125.381, 1150.828, 1176.85, 1203.46, 1230.672, 1258.499, 1286.956, 1316.056, 1345.814, 1376.244, 1407.363, 1439.186, 1471.728, 1505.006, 1539.036, 1573.836, 1609.423, 1645.814, 1683.028, 1721.084, 1760.0, 1799.796, 1840.492, 1882.108, 1924.665, 1968.185, 2012.688, 2058.198, 2104.737, 2152.328, 2200.995, 2250.763, 2301.656, 2353.7, 2406.92, 2461.344, 2516.999, 2573.912, 2632.111, 2691.627, 2752.489, 2814.727, 2878.372, 2943.456, 3010.011, 3078.072, 3147.672, 3218.845, 3291.628, 3366.056, 3442.168, 3520.0, 3599.592, 3680.984, 3764.217, 3849.331, 3936.37, 4025.377, 4116.396, 4209.474, 4304.656, 4401.991, 4501.526, 4603.312, 4707.399, 4813.84, 4922.688, 5033.997, 5147.823, 5264.223, 5383.255, 5504.978, 5629.453, 5756.743, 5886.911, 6020.023, 6156.144, 6295.344, 6437.69, 6583.256, 6732.113, 6884.335, 7040.0, 7199.185, 7361.968, 7528.433, 7698.662, 7872.74, 8050.753, 8232.793, 8418.948, 8609.312, 8803.981, 9003.052, 9206.624, 9414.799, 9627.681, 9845.377, 10067.995, 10295.647, 10528.446, 10766.509, 11009.955, 11258.906, 11513.486, 11773.823, 12040.046, 12312.289, 12590.687, 12875.381, 13166.511, 13464.225, 13768.671, 14080.0]
# G3 op 119
set :offset, 119 # we start in the key of G

define :noise_to_note do |note_to_play|
  note = hz_to_midi(freqs[get[:offset] + note_to_play])
  puts(note)
  with_fx :bpf, centre: note , res: 0.9999, res_slide: 10, mix: 0.9, res_slide_shape: 7, mix_slide_shape: 1, mix_slide: 25 do |f|
    use_synth :noise
    amp = 1
    if note_to_play > 32
      amp = 0.5
    end
    if note_to_play < 0
      amp = 2
    end
    pan = rrand(0.5,1)
    wide_pan = [pan * -1, pan]
    n = play note, attack: 1, sustain: 160, amp: amp, pan: rrand(-0.7, 0.7), pan_slide: 5
    control n, pan: 0
    sleep 10
    control n, pan: wide_pan.choose
    control f, res: 0.995, mix: 1
    sleep 15
    control n, pan: 0
    50.times do
      amp = amp + 0.1
      control n, amp: amp
      sleep 4.0/10
    end
    control n, pan: wide_pan.choose
    20.times do
      sleep 5
      control n, pan: rrand(-1, 1)
      control f, res: rrand(0.99, 1)
    end
  end
end

live_loop :subsubbass do
  noise_to_note(-62) #sol
  stop
end
live_loop :subbass do
  noise_to_note(-31) #sol
  stop
end
live_loop :bass do
  noise_to_note(0) #sol
  stop
end
live_loop :tenor do
  noise_to_note(11) #si+
  stop
end
live_loop :alto do
  noise_to_note(18) #re
  stop
end
live_loop :soprano do
  noise_to_note(31) # sol
  stop
end
live_loop :soprano2 do
  noise_to_note(62) #sol
  stop
end

#noten uit eerste zin maar heel hoog
live_loop :re do
  noise_to_note(31 + 18)
  stop
end
live_loop :sib do
  noise_to_note(8) # klinkt best goed met de 11 (si+)
  stop
end
live_loop :sib2 do
  noise_to_note(31 + 8)
  stop
end
live_loop :mib do
  noise_to_note(31 + 21)
  stop
end

Ear candy, the melody distorted, sliced to pieces and with a ping pong effect:

freqs = [27.5, 28.122, 28.758, 29.408, 30.073, 30.753, 31.448, 32.159, 32.887, 33.63, 34.391, 35.168, 35.963, 36.777, 37.608, 38.459, 39.328, 40.217, 41.127, 42.057, 43.008, 43.98, 44.975, 45.991, 47.031, 48.095, 49.182, 50.294, 51.432, 52.595, 53.784, 55.0, 56.244, 57.515, 58.816, 60.146, 61.506, 62.897, 64.319, 65.773, 67.26, 68.781, 70.336, 71.927, 73.553, 75.216, 76.917, 78.656, 80.435, 82.253, 84.113, 86.015, 87.96, 89.949, 91.983, 94.063, 96.19, 98.365, 100.589, 102.863, 105.189, 107.568, 110.0, 112.487, 115.031, 117.632, 120.292, 123.012, 125.793, 128.637, 131.546, 134.521, 137.562, 140.673, 143.853, 147.106, 150.433, 153.834, 157.312, 160.869, 164.507, 168.227, 172.031, 175.92, 179.898, 183.966, 188.126, 192.38, 196.729, 201.178, 205.727, 210.379, 215.135, 220.0, 224.975, 230.062, 235.264, 240.583, 246.023, 251.586, 257.275, 263.092, 269.041, 275.124, 281.345, 287.707, 294.212, 300.865, 307.668, 314.625, 321.739, 329.014, 336.453, 344.061, 351.841, 359.796, 367.932, 376.251, 384.759, 393.459, 402.356, 411.453, 420.757, 430.271, 440.0, 449.949, 460.123, 470.527, 481.166, 492.046, 503.172, 514.55, 526.184, 538.082, 550.249, 562.691, 575.414, 588.425, 601.73, 615.336, 629.25, 643.478, 658.028, 672.907, 688.122, 703.682, 719.593, 735.864, 752.503, 769.518, 786.918, 804.711, 822.907, 841.514, 860.542, 880.0, 899.898, 920.246, 941.054, 962.333, 984.092, 1006.344, 1029.099, 1052.368, 1076.164, 1100.498, 1125.381, 1150.828, 1176.85, 1203.46, 1230.672, 1258.499, 1286.956, 1316.056, 1345.814, 1376.244, 1407.363, 1439.186, 1471.728, 1505.006, 1539.036, 1573.836, 1609.423, 1645.814, 1683.028, 1721.084, 1760.0, 1799.796, 1840.492, 1882.108, 1924.665, 1968.185, 2012.688, 2058.198, 2104.737, 2152.328, 2200.995, 2250.763, 2301.656, 2353.7, 2406.92, 2461.344, 2516.999, 2573.912, 2632.111, 2691.627, 2752.489, 2814.727, 2878.372, 2943.456, 3010.011, 3078.072, 3147.672, 3218.845, 3291.628, 3366.056, 3442.168, 3520.0, 3599.592, 3680.984, 3764.217, 3849.331, 3936.37, 4025.377, 4116.396, 4209.474, 4304.656, 4401.991, 4501.526, 4603.312, 4707.399, 4813.84, 4922.688, 5033.997, 5147.823, 5264.223, 5383.255, 5504.978, 5629.453, 5756.743, 5886.911, 6020.023, 6156.144, 6295.344, 6437.69, 6583.256, 6732.113, 6884.335, 7040.0, 7199.185, 7361.968, 7528.433, 7698.662, 7872.74, 8050.753, 8232.793, 8418.948, 8609.312, 8803.981, 9003.052, 9206.624, 9414.799, 9627.681, 9845.377, 10067.995, 10295.647, 10528.446, 10766.509, 11009.955, 11258.906, 11513.486, 11773.823, 12040.046, 12312.289, 12590.687, 12875.381, 13166.511, 13464.225, 13768.671, 14080.0]
# G3 op 119
set :offset, 119 # we start in the key of G

define :speel do |notes_to_play, duration|
  for n in notes_to_play do
    note = hz_to_midi(freqs[get[:offset] + n]) + 12
    puts n, note
    play note, sustain: duration, attack: 0.05, release: 0.1, amp: 0.6, pan: rrand(-0.8,0.8)
  end
  sleep duration
end

with_fx :ping_pong do
  with_fx :distortion, distort: 0.8 do
    with_fx :slicer, phase: 0.125, probability: 0.1 do
      live_loop :melody do
        use_synth :saw
        speel [18],   0.579 # D
        speel [0],    2.148 # G
        sleep         0.218
        speel [19],   0.417 # D+
        speel [14],   0.178 # C+
        speel [8],    2.391 # Bb
        sleep         0.442
        speel [16],   0.223 # Db
        speel [26],   0.333 # F
        speel [21],   3.408 # Eb
        speel [38],   0.247 # A#
        speel [36],   0.348 # A
        speel [32],   4     # G+
      end
    end
  end
end

Sonic Pi is actually quite capable of pitch shifting, here I play the voice at half speed, dropping an octave, but then the pitch_shift pulls it back up an octave. First it sounded like crap but adding pitch_dis: 0.04 fixed it.

You’ll need the sample but the forum does not allow me to upload wav files.

with_fx :reverb, room: 0.9 do
    with_fx :pitch_shift, pitch: 12, pitch_dis: 0.04 do
      live_loop :buuvei do
        buuvei = "/home/roel//31-edo-buvei/buuvei-m1-4.wav"
        sample buuvei, rate: 0.5, amp: 2
        stop
      end
    end
  end

The ticking middle part, this lacks effects and in the song it’s layered with chords and effects but this was the basis for it:

freqs = [27.5, 28.122, 28.758, 29.408, 30.073, 30.753, 31.448, 32.159, 32.887, 33.63, 34.391, 35.168, 35.963, 36.777, 37.608, 38.459, 39.328, 40.217, 41.127, 42.057, 43.008, 43.98, 44.975, 45.991, 47.031, 48.095, 49.182, 50.294, 51.432, 52.595, 53.784, 55.0, 56.244, 57.515, 58.816, 60.146, 61.506, 62.897, 64.319, 65.773, 67.26, 68.781, 70.336, 71.927, 73.553, 75.216, 76.917, 78.656, 80.435, 82.253, 84.113, 86.015, 87.96, 89.949, 91.983, 94.063, 96.19, 98.365, 100.589, 102.863, 105.189, 107.568, 110.0, 112.487, 115.031, 117.632, 120.292, 123.012, 125.793, 128.637, 131.546, 134.521, 137.562, 140.673, 143.853, 147.106, 150.433, 153.834, 157.312, 160.869, 164.507, 168.227, 172.031, 175.92, 179.898, 183.966, 188.126, 192.38, 196.729, 201.178, 205.727, 210.379, 215.135, 220.0, 224.975, 230.062, 235.264, 240.583, 246.023, 251.586, 257.275, 263.092, 269.041, 275.124, 281.345, 287.707, 294.212, 300.865, 307.668, 314.625, 321.739, 329.014, 336.453, 344.061, 351.841, 359.796, 367.932, 376.251, 384.759, 393.459, 402.356, 411.453, 420.757, 430.271, 440.0, 449.949, 460.123, 470.527, 481.166, 492.046, 503.172, 514.55, 526.184, 538.082, 550.249, 562.691, 575.414, 588.425, 601.73, 615.336, 629.25, 643.478, 658.028, 672.907, 688.122, 703.682, 719.593, 735.864, 752.503, 769.518, 786.918, 804.711, 822.907, 841.514, 860.542, 880.0, 899.898, 920.246, 941.054, 962.333, 984.092, 1006.344, 1029.099, 1052.368, 1076.164, 1100.498, 1125.381, 1150.828, 1176.85, 1203.46, 1230.672, 1258.499, 1286.956, 1316.056, 1345.814, 1376.244, 1407.363, 1439.186, 1471.728, 1505.006, 1539.036, 1573.836, 1609.423, 1645.814, 1683.028, 1721.084, 1760.0, 1799.796, 1840.492, 1882.108, 1924.665, 1968.185, 2012.688, 2058.198, 2104.737, 2152.328, 2200.995, 2250.763, 2301.656, 2353.7, 2406.92, 2461.344, 2516.999, 2573.912, 2632.111, 2691.627, 2752.489, 2814.727, 2878.372, 2943.456, 3010.011, 3078.072, 3147.672, 3218.845, 3291.628, 3366.056, 3442.168, 3520.0, 3599.592, 3680.984, 3764.217, 3849.331, 3936.37, 4025.377, 4116.396, 4209.474, 4304.656, 4401.991, 4501.526, 4603.312, 4707.399, 4813.84, 4922.688, 5033.997, 5147.823, 5264.223, 5383.255, 5504.978, 5629.453, 5756.743, 5886.911, 6020.023, 6156.144, 6295.344, 6437.69, 6583.256, 6732.113, 6884.335, 7040.0, 7199.185, 7361.968, 7528.433, 7698.662, 7872.74, 8050.753, 8232.793, 8418.948, 8609.312, 8803.981, 9003.052, 9206.624, 9414.799, 9627.681, 9845.377, 10067.995, 10295.647, 10528.446, 10766.509, 11009.955, 11258.906, 11513.486, 11773.823, 12040.046, 12312.289, 12590.687, 12875.381, 13166.511, 13464.225, 13768.671, 14080.0]
# G3 op 119
set :offset, 119 # we start in the key of G

define :get_midi do |note|
  midi_note = hz_to_midi(freqs[get[:offset] + note])
  return midi_note
end

live_loop :basic_beat do
  cue :start7tellen
  2.times do
    cue :maatvan2
    sample :perc_bell, beat_stretch: 0.35
    sleep 0.5
    sample :perc_bell, beat_stretch: 0.15, amp: 0.5
    sleep 0.5
  end
  cue :maatvan3
  sample :perc_bell, beat_stretch: 0.3
  sleep 0.5
  sample :perc_bell, beat_stretch: 0.2, amp: 0.5
  sleep 0.5
  sample :perc_bell, beat_stretch: 0.25, amp: 0.4
  sleep 0.5
end

live_loop :ritme3tegen2 do
  sync :maatvan2
  3.times do
    sample :perc_bell, amp: 0.4, beat_stretch: 0.2
    sleep 1.0 / 3
  end
  sleep -0.2
end

live_loop :ritme5tegen3 do
  sync :maatvan3
  5.times do
    sample :perc_bell, amp: 0.4, beat_stretch: 0.2
    sleep 1.5 / 5
  end
  sleep -0.2
end

live_loop :ritme11tegen7 do
  sync :start7tellen
  use_synth :saw
  n1 = get_midi(31)
  n2 = get_midi(0)
  n3 = get_midi(18)
  n4 = get_midi(14)
  n5 = get_midi(8)
  n6 = get_midi(26)
  n7 = get_midi(21)
  with_fx :reverb, room: 0.99, damp: 0.3, mix: 0.6 do
    11.times do
      play [n1,n2,n3,n4,n5,n6,n7].pick + [0,31,62].pick, amp: 0.06, pan: rrand(-1,1), attack: 0.01, sustain: 0.05, decay: 0, release: 0.05 if one_in(1)
      sleep 3.5 / 11
    end
  end
  sleep -0.2
end

live_loop :lange_noot do
  sync :start7tellen
  use_synth :supersaw
  with_fx :reverb, room: 0.99, damp: 0.2, mix: 0.8 do
    n = [0, 0, 0, 8, 14, 21, 26, 31].choose
    puts(n)
    play get_midi(n), amp: 0.04, attack: 1, sustain: 0, release: 9, pan: rrand(-0.7,0.7) if one_in(2)
  end
end

If you have questions about the song or a sound in particular I’ll do my best to answer :slightly_smiling_face:

Please let me know what you think, I need feedback to learn and improve :wink:

6 Likes

Wow! This is spellbinding, I absolutely love it. Your explanation of creative approaches is very enlightening too. Much to explore here.

Congratulations on completing your goal.

PD-Pi

2 Likes

It sounds like a bad trip in a good way. TBH nearly everything you wrote about it went over my head, but it`s horrifyingly beautiful and inspiring for what is creatively possible with sonic pi.

2 Likes

@brendanmac @Musilliterate thanks for the kind words!

This is intriguing on several levels.
First, I just love the sound of it. It’s hypnotic and compelling.
And you used several techniques that never would have occurred to me. Using pitch_stretch to make sounds shorter and percussive was a cool idea. And resonating the bandpass filter to generate tones is another cool idea.
And it seems like you used a separate script for multiple channels. Did you render each one, then mix them in the daw? It never occurred to me to work that way.
Thanks for sparking some new ideas!

1 Like

Thanks for your reaction!

I used multiple scripts that I combined in a DAW, in my case Ardour. By using the sound_out_stereo you can separate output to multiple stereo tracks in one go, I’m on Linux so I do that as explained here: 5.1 audio output? - #5 by R2L

This song uses a steady 60 bpm pulse all over so my scripts all use 60 bpm and then I know I can sync them, sometimes I output a sample every beat on a separate output channel so I can easily align everything in Ardour.

Some sounds were created with Sonic Pi but then reversed or stretched in Audacity and used again as samples in Sonic Pi. This could have been done all in Sonic Pi but in Audacity it’s easier to cut exactly where you want because you can see the waveform.

There are things that are possible in Sonic Pi but not very convenient, like automating effects over long periods of time. This requires quite some boiler plate code if you are not live coding and I want it to be the same every time so then I play the tracks in Sonic Pi, record them in Ardour and then put a filter with automation on it in Ardour. So it was not a quest to do everything in Sonic Pi, I could have done more but for some things there are better tools, especially if you are not live coding.

I feel there is definitely more to get out of Sonic Pi than what I did so far, it has some unique possibilities that I hope to use in the future.

Again, if there is anything specific you hear or see in my code I’ll be happy to explain.

Yes, I agree about things being possible but not convenient.
I just posted a library of methods to make coding more convenient, including lfos and envelopes for any slideable parameter. It’s called YummyFillings.rb, and there are a ton of tools in there to simplify things that are (imho) needlessly complex in sonic pi.
I’m on Windows, so I’m sure it’s much harder for me to route multiple outputs to multiple tracks in my daw. If I ever jump ship from studio one (the daw I use), I think I’ll make the leap to linux and reaper. I miss linux, it’s so much more logical and flexible.

Here is one way to get it to work on Windows: Would this be possible to do?

I do agree on these things being easier on Linux.

I found this mesmerising, gorgeous moods and textures. Also interesting to see your code and learn from it. I had a play with the slicer-phaser-pingpong section to listen to the elements, thanks for sharing.

1 Like