1 #include "mozzi_utils.h"
11 float f = (float)(v & -v);
12 return (*(uint32_t *)&f >> 23) - 0x7f;
19 unsigned int BPMtoMillis(
float bpm){
20 float seconds_per_beat = 60.f/bpm;
21 return (
unsigned int) (seconds_per_beat*1000);
long trailingZeros(const unsigned long v)
Given a power of 2, work out the number to shift right by to do a divide by the number, or shift left to multiply.