Skip to content

Instantly share code, notes, and snippets.

@OnixIsThePewterGod
Created February 16, 2020 02:19
Show Gist options
  • Save OnixIsThePewterGod/78b8063e11d010da87a89bf5ec8833c8 to your computer and use it in GitHub Desktop.
Save OnixIsThePewterGod/78b8063e11d010da87a89bf5ec8833c8 to your computer and use it in GitHub Desktop.
Easy acid in 40 lines or less
use_synth :tb303
cut = 0
define :acid do
n = (ring :e1, :e2, :e3).tick
play n, release: 0.125, cutoff: cut, res: 0.8, wave: 0
puts cut
sleep 0.125
end
define :acid2 do
for cut in (111).downto(0) do
acid
end
end
define :drums do
in_thread do
64.times do |b|
sample :bd_fat, amp: 20
16.times do
puts b
end
sleep 0.50
end
end
end
for cut in (range 1, 111) do
acid
if cut == 110 then
128.times do |a|
acid
if a == 8 then
drums
end
end
acid2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment