Last active
November 3, 2021 06:13
-
-
Save TuxedoCat619/f72973a884390c9bce2346f46b83bf46 to your computer and use it in GitHub Desktop.
SPHERES - SONIC PI CODE
This file contains 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
# Coded by SonicPit | |
# | |
# Taken from "Beats basteln wie die Großen" | |
# c't 13/2017 | |
# Note: requires a powerful machine to run smoothly. | |
use_bpm 50 | |
# CHORD CONTROL | |
# This part provides two rings called "chord_high" and "chord_low". | |
# They always contain the "permitted" notes in order that everything will be in tune. | |
# You can use them in other live loops to select notes. | |
chord_1 = chord :c4, :maj9, num_octaves: 3 | |
chord_2 = chord :es4, :maj9, num_octaves: 3 | |
chord_3 = chord :b3, :maj9, num_octaves: 3 | |
chord_4 = chord :d4, :maj9, num_octaves: 3 | |
chord_low_1 = chord :c2, :maj9 | |
chord_low_2 = chord :es2, :maj9 | |
chord_low_3 = chord :b1, :maj9 | |
chord_low_4 = chord :d2, :maj9 | |
chord_high = chord_1 | |
chord_low = chord_low_1 | |
live_loop :chord_selector, delay: -0.5 do | |
chord_high = (knit(chord_1, 2, chord_2, 2, chord_3, 4,chord_4, 4)).tick | |
chord_low = (knit(chord_low_1, 2, chord_low_2, 2, chord_low_3, 4, chord_low_4, 4)).look | |
sleep 8 | |
end | |
# SPHERES | |
define :chord_player do |the_chord| | |
use_synth :blade | |
the_chord.each do |note| | |
play note, attack: rand(4), release: rand(6..8), cutoff: rand(50..85), vibrato_rate: rand(0.01..2), amp: 0.55 | |
end | |
end | |
with_fx :reverb, room: 0.99, mix: 0.7 do | |
live_loop :chord_loop do | |
chord_player chord_high.pick(6) | |
chord_player chord_low.take(3) | |
sleep 8 | |
end | |
end | |
# Coded by Pit Noack | |
# supported by | |
# Alexander Degraf | |
# Astrid Hagenguth | |
# Enrico Mercaldi | |
# http://www.maschinennah.de/ | |
# [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://twitter.com/iamnotsonicpi