Is there a optimum bpm / sleep for a given tempo ?
( considering getting the cleanest possible output signal )
Say bpm_60 … sleep … 0.125 ( with attendant release et. al. )
bpm_120 … sleep … 0.25
bpm_240 … sleep … 0.50
ETC … Sometimes I get a hint of static , and would
like to declude it as much as possible …
Hi, apologies but I’m not quite sure what the question is here.
Firstly, tempo and bpm are equivalent concepts. They can both be adjusted for Sonic Pi either by calls to
use_bpm or by modifying the Link Metronome.
Changing the BPM/tempo will change the duration of sleep times as the units of sleep are beats. At a BPM/tempo of 60 beats per minute a call to
sleep 1 will sleep for 1 second. At a BPM/tempo of 120 beats per. minute a call to
sleep 1 will sleep for 0.5 seconds.
It is usually common to work with inverse powers of 2 for sleep times for western music:
When you say “hint of static” what do you mean? Can you share some code that exhibits this behaviour?
As usual , when one wants a flaw , it ’ s hard to find …
Closest I come to here is a little ’ pop ’ with PLUCK ,
but the settings may be able to cure that …
( I have never tried adjustment other than release and volume )
for c in 0..4
for x in 0..5
for y in 0..7
play hz_to_midi(5.5*scale[y]), release: sleep[x]
end; end; end