Skip to content

Instantly share code, notes, and snippets.

@mbutz
Created June 27, 2017 16:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbutz/0d8cc88da04abb2d563f6b806fa248fa to your computer and use it in GitHub Desktop.
Save mbutz/0d8cc88da04abb2d563f6b806fa248fa to your computer and use it in GitHub Desktop.
# See https://www.youtube.com/watch?v=gm11KxJyYCA for a video example
use_bpm 120
# 8-beat loop to synchronize live_loops and
# to know, when recording will start which is:
# after every completed 8-beats, see :drums for
# knowing, when 8 beats are over ...
live_loop :metro do
sleep 8
end
# uncomment if you want to record incoming sound
# if uncommented it will start recording any time you evaluate
uncomment do
in_thread sync: :metro do
with_fx :record, buffer: buffer[:recording, 8] do
live_audio :testing
end
end
end
# replay recorded 8-beat-phrase
live_loop :replay, sync: :metro do
sample buffer[:recording], amp: 1.5
sleep 8
end
# just some live loop with music
# in this case used to keep track of 8-beat-pattern
live_loop :drums, sync: :metro do
sample :loop_amen, beat_stretch: 8, amp: 1.0
sleep 8
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment