Last active
November 23, 2025 17:51
-
-
Save nina-alin/e81f6601b089a2c833d4fccea5e41abb to your computer and use it in GitHub Desktop.
Rick Roll using Sonic PI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use_bpm 114 | |
| define :pattern_batterie do | |
| 4.times do | |
| sample :bd_haus, amp: 2 | |
| sleep 0.5 | |
| sample :sn_dolf, amp: 0.8 | |
| sleep 0.5 | |
| end | |
| end | |
| define :pattern_hihat do | |
| 8.times do | |
| sample :drum_cymbal_closed, amp: 0.4, rate: 1.2 | |
| sleep 0.5 | |
| end | |
| end | |
| define :pattern_basse do | |
| use_synth :fm | |
| use_synth_defaults release: 0.3, amp: 1.0, depth: 2, divisor: 1.5, cutoff: 90 | |
| [ :g2, :a2, :fs2, :b2 ].each do |note_base| | |
| play note_base | |
| sleep 0.75 | |
| play note_base | |
| sleep 0.25 | |
| play note_base | |
| sleep 0.5 | |
| play note_base | |
| sleep 0.5 | |
| end | |
| end | |
| define :pattern_melodie do | |
| use_synth :blade | |
| use_synth_defaults release: 0.2, amp: 1.5, vibrato_rate: 6, vibrato_depth: 0.15 | |
| play :a4; sleep 0.25 | |
| play :b4; sleep 0.25 | |
| play :d5; sleep 0.25 | |
| play :b4; sleep 0.25 | |
| play :fs5; sleep 0.5 | |
| play :fs5; sleep 0.5 | |
| play :e5; sleep 1.5 | |
| sleep 0.5 | |
| play :a4; sleep 0.25 | |
| play :b4; sleep 0.25 | |
| play :d5; sleep 0.25 | |
| play :b4; sleep 0.25 | |
| play :e5; sleep 0.5 | |
| play :e5; sleep 0.5 | |
| play :d5; sleep 0.25 | |
| play :cs5; sleep 0.25 | |
| play :b4; sleep 1.0 | |
| sleep 0.5 | |
| play :a4; sleep 0.25 | |
| play :b4; sleep 0.25 | |
| play :d5; sleep 0.25 | |
| play :b4; sleep 0.25 | |
| play :d5; sleep 0.5 | |
| play :e5; sleep 0.5 | |
| play :cs5; sleep 0.5 | |
| play :a4; sleep 0.5 | |
| play :a4; sleep 0.5 | |
| play :e5; sleep 0.5 | |
| play :d5; sleep 2.5 | |
| end | |
| live_loop :track_drums do | |
| pattern_batterie | |
| end | |
| live_loop :track_hihat do | |
| pattern_hihat | |
| end | |
| live_loop :track_bass do | |
| pattern_basse | |
| end | |
| live_loop :track_lead do | |
| pattern_melodie | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment