Skip to content

Instantly share code, notes, and snippets.

@aimxhaisse
Last active October 6, 2024 22:17
Show Gist options
  • Save aimxhaisse/a1872139fc52f03863faff6108a26a2a to your computer and use it in GitHub Desktop.
Save aimxhaisse/a1872139fc52f03863faff6108a26a2a to your computer and use it in GitHub Desktop.
Polynomial-C variation
# Based on Polynomial-C
use_bpm 138
chords = [
chord(:E4, :m, num_octaves: 2),
chord(:B4, :M, num_octaves: 2),
chord(:A4, :M, num_octaves: 2),
chord(:G4, :M, num_octaves: 2),
]
pattern = "12123-12123-123-".ring
define :mk_bassline do |c|
i = 0
seq = []
until i == pattern.length
note = pattern[i] == '-' ? 0 : c[pattern[i].to_i]
release = pattern[i + 1] == '-' ? 1 : 0.35
seq.push([note, release])
i += 1
end
return seq
end
live_loop :bass do
with_fx :ixi_techno, phase: 16, cutoff_min: :C6, cutoff_max: :C7, mix: 0.4 do
with_fx :reverb, room: 0.999, damp: 0.25 do
chords.each do |c|
with_fx :vowel do
synth :chiplead, note: c - 24, release: 16
end
synth :chipbass, attack: 1, note: c - 12, release: 16
2.times do
mk_bassline(c).each do |n|
if n[0] > 0 then
synth :tri, note: n[0], release: n[1] * 1.3, attack: 0.05, res: 0.99, amp: 0.35
synth :fm, note: n[0], release: n[1] * 1.3, attack: 0.05, res: 0.9, amp: 0.25
synth :tb303, note: n[0] - 12, release: n[1], attack: 0.3, res: 0.2, amp: 0.25
end
sleep 0.25
end
end
end
end
end
end
bd = false
live_loop :drums_h, sync: :bass do
8.times do
with_fx :hpf do
sample :loop_amen
end
if bd then
with_fx :lpf do
sample :loop_amen
end
sample :loop_amen
end
sleep 4
end
bd = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment