+ /** Ratio between each note in an octave */\r
+ #define NOTE_OCTIVE_RATIO 1.05946\r
+ \r
+ /** Lowest valid MIDI pitch index */\r
+ #define BASE_PITCH_INDEX 21\r
+ \r
+ /** Maximum number of MIDI notes that can be played simultaneously */\r
+ #define MAX_SIMULTANEOUS_NOTES 3\r
+ \r
+ /** Number of samples in the virtual sample table (can be expanded to lower maximum frequency, but allow for\r
+ * more simultaneous notes due to the reduced amount of processing time needed when the samples are spaced out)\r
+ */\r
+ #define VIRTUAL_SAMPLE_TABLE_SIZE 512\r
+ \r
+ /** Sample table increments per period for the base MIDI note frequency */\r
+ #define BASE_INCREMENT (((F_CPU / VIRTUAL_SAMPLE_TABLE_SIZE / 2) / BASE_FREQUENCY))\r
+\r
+ /* Type Defines: */\r
+ typedef struct\r
+ {\r
+ uint8_t LRUAge;\r
+ uint8_t Pitch;\r
+ uint32_t TableIncrement;\r
+ uint32_t TablePosition;\r
+ } DDSNoteData; \r
+\r