uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
|
Lookup tables for the uMIDI firmware. More...
#include <stdint.h>
#include <avr/pgmspace.h>
Go to the source code of this file.
Functions | |
uint16_t | lookup_exp (uint8_t x) |
Looks up an exponential value in the corresponding table. More... | |
uint16_t | lookup_log (uint8_t x) |
Looks up the natural log value in the corresponding table. More... | |
uint16_t | lookup_sine (uint8_t x) |
Looks up a sine function value in the corresponding table. More... | |
Variables | |
const uint8_t | lookup_table_resolution |
Resolution (y-axis) of the lookup tables in bits. More... | |
const uint16_t | exp_table [] |
Lookup table for an exponential function. More... | |
const uint16_t | log_table [] |
Lookup table for the natural logaritm function. More... | |
const uint16_t | sine_table [] |
Lookup table for the sine function. More... | |
Lookup tables for the uMIDI firmware.
The tables are computed with the PERL script compute_lookup_tables.pl
, which generates the file lookup_tables.c from scratch. The lookup tables are declared globally and used in other modules, so this is not a stand-alone module but rather a component of those modules.
|
inline |
Looks up an exponential value in the corresponding table.
This inline function does not check array bounds!
x | index of the value in the table |
|
inline |
Looks up the natural log value in the corresponding table.
This inline function does not check array bounds!
x | index of the value in the table |
|
inline |
Looks up a sine function value in the corresponding table.
This inline function does not check array bounds!
x | index of the value in the table |
const uint16_t exp_table[] |
Lookup table for an exponential function.
const uint16_t log_table[] |
Lookup table for the natural logaritm function.
const uint8_t lookup_table_resolution |
Resolution (y-axis) of the lookup tables in bits.
const uint16_t sine_table[] |
Lookup table for the sine function.