Skip to content

Instantly share code, notes, and snippets.

View kniknoo's full-sized avatar

Nicholas Rake kniknoo

View GitHub Profile
@kniknoo
kniknoo / nowayback.rb
Created January 10, 2017 01:04
Adonis' No Way Back for Sonic Pi
#No Way Back
#by Adonis
use_bpm 120
define :clap do
in_thread do
with_fx :rhpf, cutoff: 68, res: 0.4, amp: 0.6 do
use_synth_defaults res: 0.2, sustain: 0, sustain_level: 0.1, decay: 0.004, cutoff_decay: 0.004, cutoff_sustain_level: 0.4, decay_level: 1
synth :noise, release: 0.005, amp: 1, cutoff: rrand_i(100, 108)
@kniknoo
kniknoo / rubberdub.rb
Last active February 3, 2021 01:51
Rubber Dub for Sonic Pi
# Rubber Dub
# Coded by KniKnoo
use_bpm 75
use_debug false
use_random_seed 98736
define :sn_roll do #|length|
in_thread do
sn_amp = 0.05
@kniknoo
kniknoo / causticrainbow.rb
Created January 10, 2017 02:54
Caustic Rainbow for Sonic Pi
#CausticRainbow
#Coded by KniKnoo
use_bpm 70
use_random_seed 6
with_fx :gverb, mix: 0.7, room: 30, release: 3, amp: 0.4 do
with_fx :slicer, phase: 0.125, probability: 0.7, prob_pos: 0, wave: 0, seed: 4567, pulse_width: 0.75 do
with_fx :tanh, krunch: 7, mix: 0.4 do
live_loop :wanana do
with_fx :whammy, transpose: 1, deltime: 0.02, grainsize: 0.05, transpose_slide: 2 do |w|
@kniknoo
kniknoo / PenguinAcid.rb
Created January 10, 2017 03:22
Penguin Acid for Sonic Pi
#Penguin Acid
#Coded by KniKnoo
use_bpm 75
use_debug false
rndmst = 987
define :drumroll do |div|
vol = 0.9
with_fx :echo, phase: [0.06125, 0.125, 0.25, 0.375, 0.5, 0.75, 1].choose, decay: 1.5, mix: 0.25 do
div.times do
@kniknoo
kniknoo / commentreview.rb
Last active January 12, 2017 18:32
Review for Rainbow Class
#Comment what each of the sections do
#Don't forget you can press Ctrl - i to see the help for a command you have forgotten
#
use_bpm 55
#
with_fx :flanger do
#
live_loop :kick do
use_bpm 70
with_fx :compressor, pre_amp: 1.2, threshold: 0.4, slope_above: 0.75, slope_below: 1, amp: 0.9 do
live_loop :kicks do
sleep 1
loop do
sample :bd_klub
sleep 2.5
sample :bd_klub
sleep 1.5
@kniknoo
kniknoo / MaryHadALittleLamb.rb
Created August 31, 2017 04:11
Mary Had a Little Lamb Homework
#This is the beginning of Mary Had a Little Lamb.
#I'd like for you to try to finish the song
#There are four notes used in this song: :c4, :d4, :e4, and :g4
#The short notes are half notes, represented by sleeping for 0.5 beats
#The long notes at the end of each phrase are whole notes, represented by sleeping for 1 beat
# http://www.true-piano-lessons.com/images/MaryCtab.jpg.jpg
play :e4
sleep 0.5
play :d4
sleep 0.5
#This is Twinkle Twinkle Little Star
#It has two main parts, the "Twinkle Twinkle" part, and the "Up above the world so high" part.
#Put a block that loops twice around the "Up above the world so high" part
#Copy the remaining section and paste it after the end of the looping section
use_synth :piano
play 55
sleep 0.5
play 55
sleep 0.5
play 62
live_loop :kick do
use_sample_defaults amp: 0.7
cue :arpeg
sample :bd_klub
sleep 0.75
sample :bd_klub
sleep 0.25
sample :bd_klub
sleep 1
end
#Montford
#by KniKnoo
live_loop :bass do
sync :drum if one_in(6)
use_synth :tb303
use_synth_defaults amp: 0.3, res: 0.8, wave: 1, cutoff_attack: 0.03125
nlen = [0.125, 0.25, 0.5].choose
control amp: 0
notes = scale(:f1, :minor_pentatonic).choose
play notes, release: nlen * 1.125, cutoff: rrand(75, 110)