flizzer_tracker.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #pragma once
  2. #include <notification/notification_messages.h>
  3. #include <stdio.h>
  4. #include <furi.h>
  5. #include <gui/gui.h>
  6. #include <input/input.h>
  7. #include <u8g2_glue.h>
  8. #include "flizzer_tracker_hal.h"
  9. #include "sound_engine/freqs.h"
  10. #include "sound_engine/sound_engine_filter.h"
  11. #include "sound_engine/sound_engine_defs.h"
  12. #include "tracker_engine/tracker_engine_defs.h"
  13. #define MIDDLE_C (12 * 4)
  14. #define MAX_NOTE (12 * 7 + 11)
  15. typedef enum
  16. {
  17. EventTypeInput,
  18. } EventType;
  19. typedef struct
  20. {
  21. EventType type;
  22. InputEvent input;
  23. uint32_t period;
  24. } FlizzerTrackerEvent;
  25. typedef enum
  26. {
  27. PATTERN_VIEW,
  28. INST_EDITOR_VIEW,
  29. EXPORT_WAV_VIEW,
  30. } TrackerMode;
  31. typedef enum
  32. {
  33. EDIT_PATTERN,
  34. EDIT_SEQUENCE,
  35. EDIT_SONGINFO,
  36. EDIT_INSTRUMENT,
  37. EDIT_PROGRAM,
  38. } TrackerFocus;
  39. typedef struct
  40. {
  41. NotificationApp* notification;
  42. FuriMessageQueue* event_queue;
  43. bool was_it_back_keypress;
  44. uint32_t current_time;
  45. uint32_t period;
  46. SoundEngine sound_engine;
  47. TrackerEngine tracker_engine;
  48. TrackerSong song;
  49. uint8_t selected_param;
  50. uint8_t mode, focus;
  51. uint8_t patternx, current_channel, current_digit, program_step, current_instrument, current_note;
  52. bool editing;
  53. bool was_editing;
  54. bool quit;
  55. } FlizzerTrackerApp;