Utility functions. More...
Files | |
file | char2mozzi.py |
A script for converting raw 8 bit sound data files to wavetables for Mozzi. | |
Classes | |
struct | Int2Type< I > |
Enables you to instantiate a template based on an integer value. More... | |
Functions | |
unsigned int | BPMtoMillis (float bpm) |
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. More... | |
void | setPin13Out () |
Set digital pin 13 to output for testing timing with an oscilloscope. More... | |
void | setPin13High () |
Set pin 13 high for testing timing with an oscilloscope. More... | |
void | setPin13Low () |
Set pin 13 low for testing timing with an oscilloscope. More... | |
Utility functions.
Includes functions for debugging and profiling high frequency code with an oscilloscope when serial is too slow, some miscellaneous functions used internally by Mozzi, and python scripts for converting or generating sound tables.
struct Int2Type |
Enables you to instantiate a template based on an integer value.
For example, this is used in StateVariable.h to choose a different next() function for each kind of filter, LOWPASS, BANDPASS, HIGHPASS or NOTCH, which are simple integer values 0,1,2,3 provided to the StateVariable template on instantiation. Fantastic! It's in C++11, but not yet available in avr-gcc. See "c++ enable_if"
Public Types | |
enum | { value = I } |
unsigned int BPMtoMillis | ( | float | bpm | ) |
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.
a | power of 2, or any other number for that matter |
bpm | beats per minute |
Definition at line 33 of file mozzi_utils.cpp.
|
inline |
Set pin 13 high for testing timing with an oscilloscope.
Definition at line 39 of file mozzi_utils.h.
|
inline |
Set pin 13 low for testing timing with an oscilloscope.
Definition at line 52 of file mozzi_utils.h.
|
inline |
Set digital pin 13 to output for testing timing with an oscilloscope.
Definition at line 26 of file mozzi_utils.h.