The Tooba
 All Data Structures Namespaces Files Functions Variables Macros Pages
Macros | Functions | Variables
common.h File Reference
#include <stdint.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __STDINT   1
 
#define __ARDUINO   1
 
#define ASSERT(cond)   ((void*) 0)
 
#define NULL   0
 
#define SAMPLING_RATE   40000
 
#define DT   (1.0 / SAMPLING_RATE)
 
#define NUM_KEYS   16
 
#define NUM_VOICE_BITS   3
 
#define NUM_VOICES   (1 << NUM_VOICE_BITS)
 
#define THRESHOLD   12
 
#define KEYDOWN_COUNT   5
 

Functions

int32_t mult_signed (int32_t x, int32_t y)
 
int32_t mult_unsigned (uint32_t x, uint32_t y)
 
int32_t mult_unsigned_signed (uint32_t x, int32_t y)
 

Variables

Keykeyboard [NUM_KEYS]
 
Voice v [NUM_VOICES]
 

Macro Definition Documentation

#define __ARDUINO   1

Definition at line 16 of file common.h.

#define __STDINT   1

Definition at line 12 of file common.h.

#define ASSERT (   cond)    ((void*) 0)

Definition at line 20 of file common.h.

#define DT   (1.0 / SAMPLING_RATE)

Definition at line 28 of file common.h.

Referenced by ADSR::setA(), ADSR::setD(), ADSR::setR(), and setup().

#define KEYDOWN_COUNT   5

Definition at line 37 of file common.h.

Referenced by Key::check().

#define NULL   0

Definition at line 24 of file common.h.

Referenced by Key::check(), and Key::Key().

#define NUM_KEYS   16

Definition at line 30 of file common.h.

Referenced by Key::check(), loop(), and setup().

#define NUM_VOICE_BITS   3

Definition at line 31 of file common.h.

Referenced by get_12_bit_value().

#define NUM_VOICES   (1 << NUM_VOICE_BITS)

Definition at line 32 of file common.h.

Referenced by Key::check(), compute_sample(), get_12_bit_value(), main(), and setup().

#define SAMPLING_RATE   40000

Definition at line 27 of file common.h.

Referenced by main(), and Oscillator::setfreq().

#define THRESHOLD   12

Definition at line 35 of file common.h.

Referenced by Key::check().

Function Documentation

int32_t mult_signed ( int32_t  x,
int32_t  y 
)

Definition at line 3 of file common.cpp.

int32_t mult_unsigned ( uint32_t  x,
uint32_t  y 
)

Definition at line 8 of file common.cpp.

int32_t mult_unsigned_signed ( uint32_t  x,
int32_t  y 
)

Definition at line 13 of file common.cpp.

Referenced by Voice::output().

Here is the caller graph for this function:

Variable Documentation

Key* keyboard[NUM_KEYS]

Definition at line 7 of file stub.cpp.

Referenced by Key::check().

Definition at line 6 of file stub.cpp.

Referenced by Key::check(), and main().