Skip to content

Instantly share code, notes, and snippets.

@DanielRamosAcosta
Created May 21, 2025 00:53
Show Gist options
  • Save DanielRamosAcosta/57f39fb9bc96ae4cfa2dfeb4db27804a to your computer and use it in GitHub Desktop.
Save DanielRamosAcosta/57f39fb9bc96ae4cfa2dfeb4db27804a to your computer and use it in GitHub Desktop.
THX Logo Theme
# _______ _______ __ __
# |__ _ |__ _| \ \ / /
# | | | | \ V /
# | | | | > <
# | | | | / /\ \
# |_| |_| /_/ \_\
#
# James A. Moorer
use_bpm 60
use_synth :dsaw
num_voices = 11
duration = 10.0
target_chord = [
:a6,
:d6,
:a5,
:d5,
:a4,
:d4,
:a3,
:d3,
:a2,
:d2,
:d1
]
in_thread do
num_voices.times do |i|
start_note = [:g3, :g4].choose
target_note = target_chord[i] + [0, 0.1, -0.1].choose
pan_val = rrand(-1, 1)
synth = play start_note,
sustain: duration + 3,
release: 3,
amp: 0.6,
pan: pan_val,
note_slide: duration - 3
in_thread do
control synth, note: rrand(40, 70)
sleep 1
control synth, note: rrand(30, 50)
sleep 1
control synth, note: target_note
end
sleep 0.1
end
end
sleep duration + 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment