PicoWaveTracker/TrackerTypes.h
2026-02-18 14:50:03 +01:00

48 lines
805 B
C

#ifndef TRACKER_TYPES_H
#define TRACKER_TYPES_H
#include <stdint.h>
#include "config.h"
struct Step {
int8_t note; // MIDI Note (0-127), -1 for OFF
bool accent;
bool tie;
};
enum PlayMode {
MODE_MONO,
MODE_POLY
};
enum EditMode {
NAV_STEP,
NAV_TRACK,
EDIT_NOTE
};
enum UIState {
UI_TRACKER,
UI_MENU_MAIN,
UI_MENU_RANDOMIZE,
UI_MENU_SETUP,
UI_SETUP_CHANNEL_EDIT,
UI_EDIT_TEMPO,
UI_EDIT_FLAVOUR,
UI_SETUP_PLAYMODE_EDIT,
UI_RANDOMIZE_TRACK_EDIT
};
inline void sortArray(int arr[], int size) {
for (int i = 0; i < size - 1; i++) {
for (int j = 0; j < size - i - 1; j++) {
if (arr[j] > arr[j + 1]) {
int temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
}
#endif