Utility functions. 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, python scripts for converting or generating sound tables, and assorted meta-programming utils.
Files | |
file | char2mozzi.py |
A script for converting raw 8 bit sound data files to wavetables for Mozzi. | |
Classes | |
struct | IntegerType< BYTES > |
Provides appropriate integer types that can bit the given number of bytes on this platform (at most 64). More... | |
struct | Int2Type< I > |
Enables you to instantiate a template based on an integer value. More... | |
Functions | |
void | setPin13Out () |
Set digital pin 13 to output for testing timing with an oscilloscope. | |
void | setPin13High () |
Set pin 13 high for testing timing with an oscilloscope. | |
void | setPin13Low () |
Set pin 13 low for testing timing with an oscilloscope. | |
constexpr uint8_t | trailingZerosConst (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. More... | |
struct IntegerType |
Provides appropriate integer types that can bit the given number of bytes on this platform (at most 64).
Definition at line 20 of file IntegerType.h.
Public Types | |
typedef IntegerType<(BYTES< 8) ?(BYTES+1) :8 >::unsigned_type | unsigned_type |
typedef IntegerType<(BYTES< 8) ?(BYTES+1) :8 >::signed_type | signed_type |
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 } |
|
constexpr |
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 |
Definition at line 73 of file mozzi_utils.h.