Skip to content

Instantly share code, notes, and snippets.

@fxi
Created December 16, 2022 20:19
Show Gist options
  • Save fxi/119c909266b8436a4771bff0ea25aaf9 to your computer and use it in GitHub Desktop.
Save fxi/119c909266b8436a4771bff0ea25aaf9 to your computer and use it in GitHub Desktop.
ChatGPT generated song
use_bpm 30
define :chorda do |root, type|
case type
when "major"
[root, root+4, root+7]
when "minor"
[root, root+3, root+7]
end
end
define :play_chorda do |root, type|
play_pattern_timed chorda(root, type), 0.5
end
live_loop :chords do
use_synth :piano
with_fx :reverb, room: 0.5 do
play_chorda :c3, "minor"
play_chorda :f3, "minor"
play_chorda :c3, "minor"
play_chorda :g3, "major"
end
end
live_loop :melody do
use_synth :sine
with_fx :reverb, room: 0.5 do
play_pattern_timed [:c4, :f4, :c4, :g4, :c5, :f4, :c4, :e4], 0.25
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment