home/ atoms/ sonic-pi-bpm-control

use_bpm sets the tempo so sleep, envelopes, and FX phases all scale accordingly

use_bpm N sets beats per minute for the current thread (default 60). All sleep durations, envelope times, and FX phase values scale accordingly: sleep 1 at BPM 120 lasts half a real second. beat_stretch: respects the current BPM. use_sample_bpm :sample_name sets the BPM to match a specific sample’s native tempo. BPM changes are thread-local; different live_loops can run at different tempos.

Examples

live_loop :break do use_bpm 170 sample :loop_amen, beat_stretch: 2 sleep 2 end

Assessment

Explain why sleep 1 at BPM 120 sounds twice as fast as at BPM 60. Change a live_loop’s BPM from 90 to 170 mid-performance and describe what happens.

“beat_stretch` opt works with the current BPM to make sure everything just works”
corpus · sonic-pi-built-in-tutorial · chunk 28