Facebook Twitter Music RSS

Weeklybeats 2016 was a 52 week long music project in which artists composed and publicly released 1 song a week for the entire year. Enjoy this archive of over 3,700 music compositions by over 260 artists.
Sign up or Login to give feedback or chat up on the forums.

WeeklyBeats.com / Music / chiefthomson's music / a sonic pi moment 001

a sonic pi moment 001

By chiefthomson on November 13, 2016 5:52 pm

as the title might give away, I discovered Sonic Pi... after a crash course in Ruby and some tutorials, this is my very first song in code... good code moments y'all

This submission is licensed by author under CC Attribution Noncommercial No Derivative Works (BY-NC-ND)

  • Play
  • Download
November 14, 2016 8:06 am

this is pretty cool, never seen sonic pi before. You gonna share the code?

November 17, 2016 10:12 pm

there you go mate. have fun wink

use_bpm 123

live_loop :melody do
  use_synth :pulse
  with_fx :distortion, distort: 0.4 do
    with_fx :reverb, room: 0.8 do
      with_fx :band_eq, freq: 90, db: 1 do
        play chord([52,56,48,59].choose, [:m6,:m9].choose), invert: rrand_i(0,2), amp: 1, release: 2, cutoff: rrand(80,110)
      end
    end
  end
  sleep [1.5,2].choose
end

live_loop :sphere, sync: :melody do
  sample :ambi_haunted_hum, amp: 1.5, attack: 1, pitch: [-1,1,3].choose
  sleep 8
end

live_loop :echo_fx, sync: :melody do
  with_fx :echo, decay: 16, phase: 0.62, max_phase: 8 do
    sample :perc_swash, pan: rrand(-0.6,0.6), amp: 0.5
  end
  sleep 21
end

live_loop :kick, sync: :melody do
  sample :bd_gas, amp: 5
  sleep 1
end

live_loop :snare, sync: :melody do
  sleep 1
  with_fx :reverb, room: 0.8, mix: 0.35 do
    sample :sn_dolf, decay: 0.2, decay_level: 0
  end
  sleep 1
end

hihat = "C:/temp/spi/CC2_Hat_06.wav"

live_loop :hihat, sync: :melody do
  sample hihat, pan: rrand(-0.6,0.6), amp: rrand(0.7,1.2)
  sleep 0.25
end

live_loop :bassline, sync: :melody do
  use_synth :dtri
  nuotti = scale(:a1, :minor_pentatonic).choose
  with_fx :echo do
    play nuotti, cutoff: rrand(10, 130), release: 0.1, amp: 1.8, release: 0.9, cutoff: 60
  end
  sleep [1,1.5,2].choose
end

You need to login to leave a comment.
Login Sign-up