Skip to content

Instantly share code, notes, and snippets.

@Kanabanarama
Last active January 20, 2025 22:34
Show Gist options
  • Save Kanabanarama/35a1e04fd09008f2a26cd82379a9af16 to your computer and use it in GitHub Desktop.
Save Kanabanarama/35a1e04fd09008f2a26cd82379a9af16 to your computer and use it in GitHub Desktop.
Sonic Pi: Play all synths
synths = [
:bass_foundation, :bass_highend, :beep, :blade, :bnoise, :chipbass, :chiplead,
:chipnoise, :cnoise, :dark_ambience, :dpulse, :dsaw, :dtri, :dull_bell,
:fm, :gabberkick, :gnoise, :growl, :hollow, :hoover, :kalimba, :mod_beep,
:mod_dsaw, :mod_fm, :mod_pulse, :mod_saw, :mod_sine, :mod_tri, :noise,
:organ_tonewheel, :piano, :pluck, :pnoise, :pretty_bell, :prophet, :pulse,
:saw, :sc808_bassdrum, :sc808_clap, :sc808_hihat, :sc808_closed_hihat,
:sc808_congahi, :sc808_congalo, :sc808_congamid, :sc808_cowbell, :sc808_cymbal,
:sc808_maracas, :sc808_open_hihat, :sc808_rimshot, :sc808_snare, :sc808_tomhi,
:sc808_tomlo, :sc808_tommid, :sine, :sound_in, :sound_in_stereo, :square,
:subpulse, :supersaw, :tb303, :tech_saws, :tri, :zawa
]
synths.each do |synth|
use_synth synth
puts "Playing with synth: #{synth}"
play :e4, release: 0.5 # Play note E4 for 0.5 seconds
sleep 1 # Pause for 1 second between synths
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment