The Tooba
 All Data Structures Namespaces Files Functions Variables Macros Pages
Macros | Functions
instr.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "teensy/teensy.ino"
Include dependency graph for instr.cpp:

Go to the source code of this file.

Macros

#define __ARDUINO   0
 
#define HIGH   1
 
#define LOW   0
 
#define ASSERT(cond)   assertion(cond, #cond)
 
#define _STEP   1.0594630943592953
 
#define _STEP2   (_STEP * _STEP)
 
#define _STEP4   (_STEP2 * _STEP2)
 
#define _A   (440.0 * 2 * VCO_MAX_VALUE / (4 * SAMPLING_RATE))
 
#define F(oct)   ((int) ((1 << oct) * _A / _STEP4))
 
#define Fsharp(oct)   ((int) ((1 << oct) * _A / _STEP2 / _STEP))
 
#define G(oct)   ((int) ((1 << oct) * _A / _STEP2))
 
#define Gsharp(oct)   ((int) ((1 << oct) * _A / _STEP))
 
#define A(oct)   ((int) ((1 << oct) * _A))
 
#define Bflat(oct)   ((int) ((1 << oct) * _A * _STEP))
 
#define B(oct)   ((int) ((1 << oct) * _A * _STEP2))
 
#define C(oct)   ((int) ((1 << oct) * _A * _STEP2 * _STEP))
 

Functions

void assertion (int cond, const char *strcond)
 
int main (void)
 

Macro Definition Documentation

#define __ARDUINO   0

Definition at line 11 of file instr.cpp.

#define _A   (440.0 * 2 * VCO_MAX_VALUE / (4 * SAMPLING_RATE))

Definition at line 24 of file instr.cpp.

#define _STEP   1.0594630943592953

Definition at line 20 of file instr.cpp.

#define _STEP2   (_STEP * _STEP)

Definition at line 21 of file instr.cpp.

#define _STEP4   (_STEP2 * _STEP2)

Definition at line 22 of file instr.cpp.

#define A (   oct)    ((int) ((1 << oct) * _A))

Definition at line 30 of file instr.cpp.

#define ASSERT (   cond)    assertion(cond, #cond)

Definition at line 16 of file instr.cpp.

Referenced by main().

#define B (   oct)    ((int) ((1 << oct) * _A * _STEP2))

Definition at line 32 of file instr.cpp.

#define Bflat (   oct)    ((int) ((1 << oct) * _A * _STEP))

Definition at line 31 of file instr.cpp.

#define C (   oct)    ((int) ((1 << oct) * _A * _STEP2 * _STEP))

Definition at line 33 of file instr.cpp.

#define F (   oct)    ((int) ((1 << oct) * _A / _STEP4))

Definition at line 26 of file instr.cpp.

#define Fsharp (   oct)    ((int) ((1 << oct) * _A / _STEP2 / _STEP))

Definition at line 27 of file instr.cpp.

#define G (   oct)    ((int) ((1 << oct) * _A / _STEP2))

Definition at line 28 of file instr.cpp.

#define Gsharp (   oct)    ((int) ((1 << oct) * _A / _STEP))

Definition at line 29 of file instr.cpp.

#define HIGH   1

Definition at line 13 of file instr.cpp.

Referenced by read_key(), and timer_interrupt().

#define LOW   0

Definition at line 14 of file instr.cpp.

Referenced by read_key(), setup(), and timer_interrupt().

Function Documentation

void assertion ( int  cond,
const char *  strcond 
)

Definition at line 35 of file instr.cpp.

int main ( void  )

Definition at line 43 of file instr.cpp.

Here is the call graph for this function: