|
My Project
|
Lab 4 : FREERTOS Scheduling and multitasking. More...
#include <Arduino_FreeRTOS.h>#include <arduinoFFT.h>#include <queue.h>#include <stdio.h>Go to the source code of this file.
Macros | |
| #define | SPEAKERDDR DDRH |
| speaker ddr More... | |
| #define | TIMERPPR PRR1 |
| timer Power reduction register More... | |
| #define | LEDPORT PORTL |
| #define | LEDDDR DDRL |
| #define | SETLEDDDR LEDDDR |= BIT_2 |
| #define | SETLEDPORT LEDPORT |= BIT_2 |
| #define | CLEARLEDPORT LEDPORT &= !(BIT_2) |
| #define | SETSPEAKERDDR SPEAKERDDR |= BIT_3 |
| #define | BIT_0 1 |
| #define | BIT_1 1<<1 |
| #define | BIT_2 1<<2 |
| #define | BIT_3 1<<3 |
| #define | BIT_4 1<<4 |
| #define | BIT_5 1<<5 |
| #define | BIT_6 1<<6 |
| #define | BIT_7 1<<7 |
| #define | SEVENSEGPORT1 PORTA |
| #define | SEVENSEGDDR1 DDRA |
| #define | SEVENSEGPORT2 PORTC |
| #define | SEVENSEGDDR2 DDRC |
| #define | SETSEVSEGDDR1 SEVENSEGDDR1 |= BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0 |
| #define | SETSEVSEGDDR2 SEVENSEGDDR2 |= BIT_7 | BIT_6 | BIT_5 |
| #define | TIMERCOMPARE4A OCR4A |
| #define | TIMERCOMPARE3A OCR3A |
| #define | TIMER3VAL TCNT3 |
| #define | TIMER4_ON_BIT 1<<PRTIM4 |
| #define | TIMER3_ON_BIT 1<<PRTIM3 |
| #define | TIMER4ON TIMERPPR &= !(TIMER4_ON_BIT) |
| #define | TIMER3ON TIMERPPR &= !(TIMER3_ON_BIT) |
| #define | TIMER3OFF TIMERPPR |= (TIMER3_ON_BIT) |
| #define | TIMER4REGA TCCR4A |
| #define | TIMER4REGB TCCR4B |
| #define | TIMER3REGA TCCR3A |
| #define | TIMER3REGB TCCR3B |
| #define | WGM4_BIT_0 1<<WGM40 |
| #define | WGM4_BIT_1 1<<WGM41 |
| #define | WGM4_BIT_2 1<<WGM42 |
| #define | WGM4_BIT_3 1<<WGM43 |
| #define | WGM3_BIT_0 1<<WGM30 |
| #define | WGM3_BIT_1 1<<WGM31 |
| #define | WGM3_BIT_2 1<<WGM32 |
| #define | WGM3_BIT_3 1<<WGM33 |
| #define | PSCALE4_BIT_0 1<<CS40 |
| #define | PSCALE4_BIT_1 1<<CS41 |
| #define | PSCALE4_BIT_2 1<<CS42 |
| #define | PSCALE3_BIT_0 1<<CS30 |
| #define | PSCALE3_BIT_1 1<<CS31 |
| #define | PSCALE3_BIT_2 1<<CS32 |
| #define | SETTIMER4REGA TIMER4REGA |= WGM4_BIT_0 | WGM4_BIT_1 | COMPARE_MODE4 |
| #define | SETTIMER4REGB TIMER4REGB |= WGM4_BIT_2 | WGM4_BIT_3 | PSCALE4_BIT_0 |
| #define | SETTIMER3REGA TIMER3REGA |= WGM3_BIT_0 | WGM3_BIT_1 | COMPARE_MODE3 |
| #define | SETTIMER3REGB TIMER3REGB |= WGM3_BIT_2 | WGM3_BIT_3 | PSCALE3_BIT_0 |
| #define | CLOCKFREQ 16000000 |
| #define | TWO 2 |
| #define | THREE 3 |
| #define | TEN 10 |
| #define | HUNDRED 100 |
| #define | THOUSAND 1000 |
| #define | COMPARE_2000 16000 |
| #define | COMPARE_293 27304 |
| #define | COMPARE_329 24316 |
| #define | COMPARE_261 30651 |
| #define | COMPARE_130 61538 |
| #define | COMPARE_196 40816 |
| #define | COMPARE_NONE 0 |
| #define | COMPARE_1 62500 |
| #define | COMPARE_MODE4 1<<COM4A0 |
| #define | COMPARE_MODE3 1<<COM3A0 |
| #define | SIXSECINMILLIS 6000 |
| #define | FOURSECINMILLIS 4000 |
| #define | THREESECINMILLIS 3000 |
| #define | TWOSECINMILLIS 2000 |
| #define | SECINMILLIS 1000 |
| #define | HALFSECINMILLIS 500 |
| #define | QUARSECINMILLIS 250 |
| #define | THREEQUARSECINMILLIS 750 |
| #define | STATREG SREG |
| #define | STATREGINTON STATREG |= BIT_7 |
| #define | STATREGINTOFF STATREG &= !BIT_7 |
Variables | |
| int | i |
| iterators More... | |
| int | j |
| int | k |
| volatile byte | segbits [7] = {7, 0, 5, 3, 1, 6, 7} |
| volatile uint8_t * | segports [7] = {&PORTC, &PORTA, &PORTA, &PORTA, &PORTA, &PORTA, &PORTA} |
| volatile uint8_t * | segddrs [7] = {&DDRC, &DDRA, &DDRA, &DDRA, &DDRA, &DDRA, &DDRA} |
| uint8_t | digbits [4] = {5, 4, 2, 6} |
| volatile uint8_t * | digports [4] = {&PORTC, &PORTA, &PORTA, &PORTC} |
| volatile uint8_t * | digddrs [4] = {&DDRC, &DDRA, &DDRA, &DDRC} |
| #define | ROTARYPORT LEDPORT |
| #define | clkIN 52 |
| #define | dtIN 50 |
| int | currentStateClk |
| int | previousStateClk |
| int | carPosition = 3 |
| int | lastRow = B00000000 |
| #define | TIMER3INTREG TIMSK3 |
| #define | TIMER3INTBIT 1<<OCIE3A |
| #define | TIMER3INTVEC TIMER3_COMPA_vect |
| #define | TIMER3INTON TIMER3INTREG |= TIMER3INTBIT |
| #define | TIMER3INTOFF TIMER3INTREG &= !TIMER3INTBIT |
| #define | OP_DECODEMODE 8 |
| #define | OP_SCANLIMIT 10 |
| #define | OP_SHUTDOWN 11 |
| #define | OP_DISPLAYTEST 14 |
| #define | OP_INTENSITY 10 |
| #define | DIN 42 |
| #define | CS 44 |
| #define | CLK 46 |
| #define | ROWS 8 |
| #define | COLS 8 |
| #define | CLEARROW 0b00000000 |
| #define | ROUNDERR 0.47 |
| byte | spidata [16] |
| void | spiTransfer (volatile byte row, volatile byte data) |
| #define | ULONG_MAX 0xFFFFFFFFUL |
| arduinoFFT | FFT = arduinoFFT() |
| const uint16_t | samples = 256 |
| int | pseudoArray [samples] |
| const double | signalFrequency = 1000 |
| const double | samplingFrequency = 5000 |
| double | vReal [samples] |
| double | vImag [samples] |
| #define | leds0 B11000011 |
| int | leds [8] = {leds0, leds0, leds0, leds0, leds0, leds0, leds0, leds0} |
| uint8_t | objects [9] |
| #define | NOTE_B0 31 |
| #define | NOTE_C1 33 |
| #define | NOTE_CS1 35 |
| #define | NOTE_D1 37 |
| #define | NOTE_DS1 39 |
| #define | NOTE_E1 41 |
| #define | NOTE_F1 44 |
| #define | NOTE_FS1 46 |
| #define | NOTE_G1 49 |
| #define | NOTE_GS1 52 |
| #define | NOTE_A1 55 |
| #define | NOTE_AS1 58 |
| #define | NOTE_B1 62 |
| #define | NOTE_C2 65 |
| #define | NOTE_CS2 69 |
| #define | NOTE_D2 73 |
| #define | NOTE_DS2 78 |
| #define | NOTE_E2 82 |
| #define | NOTE_F2 87 |
| #define | NOTE_FS2 93 |
| #define | NOTE_G2 98 |
| #define | NOTE_GS2 104 |
| #define | NOTE_A2 110 |
| #define | NOTE_AS2 117 |
| #define | NOTE_B2 123 |
| #define | NOTE_C3 131 |
| #define | NOTE_CS3 139 |
| #define | NOTE_D3 147 |
| #define | NOTE_DS3 156 |
| #define | NOTE_E3 165 |
| #define | NOTE_F3 175 |
| #define | NOTE_FS3 185 |
| #define | NOTE_G3 196 |
| #define | NOTE_GS3 208 |
| #define | NOTE_A3 220 |
| #define | NOTE_AS3 233 |
| #define | NOTE_B3 247 |
| #define | NOTE_C4 262 |
| #define | NOTE_CS4 277 |
| #define | NOTE_D4 294 |
| #define | NOTE_DS4 311 |
| #define | NOTE_E4 330 |
| #define | NOTE_F4 349 |
| #define | NOTE_FS4 370 |
| #define | NOTE_G4 392 |
| #define | NOTE_GS4 415 |
| #define | NOTE_A4 440 |
| #define | NOTE_AS4 466 |
| #define | NOTE_B4 494 |
| #define | NOTE_C5 523 |
| #define | NOTE_CS5 554 |
| #define | NOTE_D5 587 |
| #define | NOTE_DS5 622 |
| #define | NOTE_E5 659 |
| #define | NOTE_F5 698 |
| #define | NOTE_FS5 740 |
| #define | NOTE_G5 784 |
| #define | NOTE_GS5 831 |
| #define | NOTE_A5 880 |
| #define | NOTE_AS5 932 |
| #define | NOTE_B5 988 |
| #define | NOTE_C6 1047 |
| #define | NOTE_CS6 1109 |
| #define | NOTE_D6 1175 |
| #define | NOTE_DS6 1245 |
| #define | NOTE_E6 1319 |
| #define | NOTE_F6 1397 |
| #define | NOTE_FS6 1480 |
| #define | NOTE_G6 1568 |
| #define | NOTE_GS6 1661 |
| #define | NOTE_A6 1760 |
| #define | NOTE_AS6 1865 |
| #define | NOTE_B6 1976 |
| #define | NOTE_C7 2093 |
| #define | NOTE_CS7 2217 |
| #define | NOTE_D7 2349 |
| #define | NOTE_DS7 2489 |
| #define | NOTE_E7 2637 |
| #define | NOTE_F7 2794 |
| #define | NOTE_FS7 2960 |
| #define | NOTE_G7 3136 |
| #define | NOTE_GS7 3322 |
| #define | NOTE_A7 3520 |
| #define | NOTE_AS7 3729 |
| #define | NOTE_B7 3951 |
| #define | NOTE_C8 4186 |
| #define | NOTE_CS8 4435 |
| #define | NOTE_D8 4699 |
| #define | NOTE_DS8 4978 |
| int | melody [] |
| int | tempo [] |
| int | underworld_melody [] |
| int | underworld_tempo [] |
| int | thisNote = 0 |
| int | thisNoteEnd = 0 |
| TaskHandle_t | RT1handle |
| TaskHandle_t | RT2handle |
| TaskHandle_t | RT3handle |
| TaskHandle_t | RT3p0handle |
| TaskHandle_t | RT3p1handle |
| TaskHandle_t | RT4handle |
| TaskHandle_t | Task_Counterhandle |
| TaskHandle_t | playDrivingGamehandle |
| TaskHandle_t | readRotaryEncoderhandle |
| TaskHandle_t | setLedshandle |
| TaskHandle_t | setLedhandle |
| TaskHandle_t | playMusichandle |
| TaskHandle_t | readButtonshandle |
| TaskHandle_t | RTtaskshandle |
| TaskHandle_t | restarthandle |
| TaskHandle_t | playMusicEndhandle |
| void | RT1 (void *pvParameters) |
| void | RT2 (void *pvParameters) |
| void | RT3 (void *pvParameters) |
| void | RT4 (void *pvParameters) |
| void | Task_Counter (void *pvParameters) |
| void | useEncoderWithMatrix (void **pvParameters) |
| void | readRotaryEncoder (void **pvParameters) |
| void | setLed (void **pvParameters) |
| void | crash (void **pvParameters) |
Lab 4 : FREERTOS Scheduling and multitasking.
This is the defines for our lab4.
| #define BIT_0 1 |
bitmasks for leds on port L and speaker port H and 7 seg
| #define BIT_1 1<<1 |
| #define BIT_2 1<<2 |
| #define BIT_3 1<<3 |
| #define BIT_4 1<<4 |
| #define BIT_5 1<<5 |
| #define BIT_6 1<<6 |
| #define BIT_7 1<<7 |
| #define CLEARROW 0b00000000 |
| #define CLK 46 |
| #define clkIN 52 |
| #define CLOCKFREQ 16000000 |
for compare count and speaker
| #define COLS 8 |
| #define COMPARE_1 62500 |
| #define COMPARE_130 61538 |
| #define COMPARE_196 40816 |
| #define COMPARE_2000 16000 |
| #define COMPARE_261 30651 |
| #define COMPARE_293 27304 |
| #define COMPARE_329 24316 |
| #define COMPARE_MODE3 1<<COM3A0 |
| #define COMPARE_MODE4 1<<COM4A0 |
| #define COMPARE_NONE 0 |
| #define CS 44 |
| #define DIN 42 |
| #define dtIN 50 |
| #define FOURSECINMILLIS 4000 |
| #define HALFSECINMILLIS 500 |
| #define HUNDRED 100 |
| #define LEDDDR DDRL |
| #define LEDPORT PORTL |
led pin outputs
| #define leds0 B11000011 |
For game matrix
| #define NOTE_A1 55 |
| #define NOTE_A2 110 |
| #define NOTE_A3 220 |
| #define NOTE_A4 440 |
| #define NOTE_A5 880 |
| #define NOTE_A6 1760 |
| #define NOTE_A7 3520 |
| #define NOTE_AS1 58 |
| #define NOTE_AS2 117 |
| #define NOTE_AS3 233 |
| #define NOTE_AS4 466 |
| #define NOTE_AS5 932 |
| #define NOTE_AS6 1865 |
| #define NOTE_AS7 3729 |
| #define NOTE_B0 31 |
For playing music - medlody and temp given by Linonel Tellem Youtube Arduino Tutorial 3 Edited by Connor Lowe and Leonard Dul to suit our game implementation
| #define NOTE_B1 62 |
| #define NOTE_B2 123 |
| #define NOTE_B3 247 |
| #define NOTE_B4 494 |
| #define NOTE_B5 988 |
| #define NOTE_B6 1976 |
| #define NOTE_B7 3951 |
| #define NOTE_C1 33 |
| #define NOTE_C2 65 |
| #define NOTE_C3 131 |
| #define NOTE_C4 262 |
| #define NOTE_C5 523 |
| #define NOTE_C6 1047 |
| #define NOTE_C7 2093 |
| #define NOTE_C8 4186 |
| #define NOTE_CS1 35 |
| #define NOTE_CS2 69 |
| #define NOTE_CS3 139 |
| #define NOTE_CS4 277 |
| #define NOTE_CS5 554 |
| #define NOTE_CS6 1109 |
| #define NOTE_CS7 2217 |
| #define NOTE_CS8 4435 |
| #define NOTE_D1 37 |
| #define NOTE_D2 73 |
| #define NOTE_D3 147 |
| #define NOTE_D4 294 |
| #define NOTE_D5 587 |
| #define NOTE_D6 1175 |
| #define NOTE_D7 2349 |
| #define NOTE_D8 4699 |
| #define NOTE_DS1 39 |
| #define NOTE_DS2 78 |
| #define NOTE_DS3 156 |
| #define NOTE_DS4 311 |
| #define NOTE_DS5 622 |
| #define NOTE_DS6 1245 |
| #define NOTE_DS7 2489 |
| #define NOTE_DS8 4978 |
| #define NOTE_E1 41 |
| #define NOTE_E2 82 |
| #define NOTE_E3 165 |
| #define NOTE_E4 330 |
| #define NOTE_E5 659 |
| #define NOTE_E6 1319 |
| #define NOTE_E7 2637 |
| #define NOTE_F1 44 |
| #define NOTE_F2 87 |
| #define NOTE_F3 175 |
| #define NOTE_F4 349 |
| #define NOTE_F5 698 |
| #define NOTE_F6 1397 |
| #define NOTE_F7 2794 |
| #define NOTE_FS1 46 |
| #define NOTE_FS2 93 |
| #define NOTE_FS3 185 |
| #define NOTE_FS4 370 |
| #define NOTE_FS5 740 |
| #define NOTE_FS6 1480 |
| #define NOTE_FS7 2960 |
| #define NOTE_G1 49 |
| #define NOTE_G2 98 |
| #define NOTE_G3 196 |
| #define NOTE_G4 392 |
| #define NOTE_G5 784 |
| #define NOTE_G6 1568 |
| #define NOTE_G7 3136 |
| #define NOTE_GS1 52 |
| #define NOTE_GS2 104 |
| #define NOTE_GS3 208 |
| #define NOTE_GS4 415 |
| #define NOTE_GS5 831 |
| #define NOTE_GS6 1661 |
| #define NOTE_GS7 3322 |
| #define OP_DECODEMODE 8 |
| #define OP_DISPLAYTEST 14 |
| #define OP_INTENSITY 10 |
| #define OP_SCANLIMIT 10 |
| #define OP_SHUTDOWN 11 |
| #define PSCALE3_BIT_0 1<<CS30 |
| #define PSCALE3_BIT_1 1<<CS31 |
| #define PSCALE3_BIT_2 1<<CS32 |
| #define PSCALE4_BIT_0 1<<CS40 |
for prescaler
| #define PSCALE4_BIT_1 1<<CS41 |
| #define PSCALE4_BIT_2 1<<CS42 |
| #define QUARSECINMILLIS 250 |
| #define ROTARYPORT LEDPORT |
rotary encoder inputs
| #define ROUNDERR 0.47 |
| #define ROWS 8 |
| #define SECINMILLIS 1000 |
| #define SETSEVSEGDDR2 SEVENSEGDDR2 |= BIT_7 | BIT_6 | BIT_5 |
| #define SETSPEAKERDDR SPEAKERDDR |= BIT_3 |
| #define SETTIMER3REGA TIMER3REGA |= WGM3_BIT_0 | WGM3_BIT_1 | COMPARE_MODE3 |
| #define SETTIMER3REGB TIMER3REGB |= WGM3_BIT_2 | WGM3_BIT_3 | PSCALE3_BIT_0 |
| #define SETTIMER4REGA TIMER4REGA |= WGM4_BIT_0 | WGM4_BIT_1 | COMPARE_MODE4 |
set timer definitions
| #define SETTIMER4REGB TIMER4REGB |= WGM4_BIT_2 | WGM4_BIT_3 | PSCALE4_BIT_0 |
| #define SEVENSEGDDR1 DDRA |
| #define SEVENSEGDDR2 DDRC |
| #define SEVENSEGPORT1 PORTA |
seven seg outputs
| #define SEVENSEGPORT2 PORTC |
| #define SIXSECINMILLIS 6000 |
timing constants
| #define SPEAKERDDR DDRH |
speaker ddr
| #define STATREG SREG |
FOR INTERRUPT status register
| #define TEN 10 |
| #define THOUSAND 1000 |
| #define THREE 3 |
| #define THREEQUARSECINMILLIS 750 |
| #define THREESECINMILLIS 3000 |
| #define TIMER3_ON_BIT 1<<PRTIM3 |
| #define TIMER3INTBIT 1<<OCIE3A |
| #define TIMER3INTOFF TIMER3INTREG &= !TIMER3INTBIT |
| #define TIMER3INTON TIMER3INTREG |= TIMER3INTBIT |
| #define TIMER3INTREG TIMSK3 |
interrupt timer on
| #define TIMER3INTVEC TIMER3_COMPA_vect |
| #define TIMER3OFF TIMERPPR |= (TIMER3_ON_BIT) |
| #define TIMER3ON TIMERPPR &= !(TIMER3_ON_BIT) |
| #define TIMER3REGA TCCR3A |
| #define TIMER3REGB TCCR3B |
| #define TIMER3VAL TCNT3 |
| #define TIMER4_ON_BIT 1<<PRTIM4 |
timer on bit
| #define TIMER4ON TIMERPPR &= !(TIMER4_ON_BIT) |
| #define TIMER4REGA TCCR4A |
timer register
| #define TIMER4REGB TCCR4B |
| #define TIMERCOMPARE3A OCR3A |
| #define TIMERCOMPARE4A OCR4A |
timer compare register
| #define TIMERPPR PRR1 |
timer Power reduction register
| #define TWO 2 |
| #define TWOSECINMILLIS 2000 |
| #define ULONG_MAX 0xFFFFFFFFUL |
| #define WGM3_BIT_0 1<<WGM30 |
| #define WGM3_BIT_1 1<<WGM31 |
| #define WGM3_BIT_2 1<<WGM32 |
| #define WGM3_BIT_3 1<<WGM33 |
| #define WGM4_BIT_0 1<<WGM40 |
waveform generation
| #define WGM4_BIT_1 1<<WGM41 |
| #define WGM4_BIT_2 1<<WGM42 |
| #define WGM4_BIT_3 1<<WGM43 |
| void crash | ( | void ** | pvParameters | ) |
| void readRotaryEncoder | ( | void ** | pvParameters | ) |
| void RT1 | ( | void * | pvParameters | ) |
RT1(void *p) This funciton blinks an on board led on for 1000ms then off for 200ms.
| void RT2 | ( | void * | pvParameters | ) |
RT2(void *p) This funciton plays the 5 note tune from close encounters of the third kind for 2 seconds, then rests for 1.5 seconds, then repeats.
After repeating 2 times, the tune stops.
| void RT3 | ( | void * | pvParameters | ) |
RT3(void *p) This funciton computes a 256 sample FFT 5 times and reports the average time back on the serial line in milliseconds.
| void RT4 | ( | void * | pvParameters | ) |
RT4(void *p) This funciton computes a 256 sample FFT reports back to RT4 when done.
| void setLed | ( | void ** | pvParameters | ) |
| void spiTransfer | ( | volatile byte | opcode, |
| volatile byte | data | ||
| ) |
for LED matrix driving game spiTransfer(volatile byte opcode, volatile byte data) Given code for writing data to led matrix with spi protocol.
| void Task_Counter | ( | void * | pvParameters | ) |
for Task Counter - display driving time Task_Counter(void *pvParameters) Counts for seconds driving.
| void useEncoderWithMatrix | ( | void ** | pvParameters | ) |
| int carPosition = 3 |
| int currentStateClk |
| uint8_t digbits[4] = {5, 4, 2, 6} |
| volatile uint8_t* digddrs[4] = {&DDRC, &DDRA, &DDRA, &DDRC} |
| volatile uint8_t* digports[4] = {&PORTC, &PORTA, &PORTA, &PORTC} |
| arduinoFFT FFT = arduinoFFT() |
For FFT
| int i |
iterators
| int j |
| int k |
| int lastRow = B00000000 |
| int melody[] |
| uint8_t objects[9] |
| TaskHandle_t playDrivingGamehandle |
| TaskHandle_t playMusicEndhandle |
| TaskHandle_t playMusichandle |
| int previousStateClk |
| int pseudoArray[samples] |
| TaskHandle_t readButtonshandle |
| TaskHandle_t readRotaryEncoderhandle |
| TaskHandle_t restarthandle |
| TaskHandle_t RT1handle |
for FREERTOS scheduling
| TaskHandle_t RT2handle |
| TaskHandle_t RT3handle |
| TaskHandle_t RT3p0handle |
| TaskHandle_t RT3p1handle |
| TaskHandle_t RT4handle |
| TaskHandle_t RTtaskshandle |
| const uint16_t samples = 256 |
| const double samplingFrequency = 5000 |
| volatile byte segbits[7] = {7, 0, 5, 3, 1, 6, 7} |
for 4 digit seven seg
| volatile uint8_t* segddrs[7] = {&DDRC, &DDRA, &DDRA, &DDRA, &DDRA, &DDRA, &DDRA} |
| volatile uint8_t* segports[7] = {&PORTC, &PORTA, &PORTA, &PORTA, &PORTA, &PORTA, &PORTA} |
| TaskHandle_t setLedhandle |
| TaskHandle_t setLedshandle |
| const double signalFrequency = 1000 |
| byte spidata[16] |
for matrix spi
| TaskHandle_t Task_Counterhandle |
| int tempo[] |
| int thisNote = 0 |
| int thisNoteEnd = 0 |
| int underworld_melody[] |
| int underworld_tempo[] |
| double vImag[samples] |
| double vReal[samples] |