2024-08-19 22:43:24 +10:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "tone.hpp"
|
2024-08-31 16:31:19 +10:00
|
|
|
#include "util.hpp"
|
2024-08-19 22:43:24 +10:00
|
|
|
|
|
|
|
namespace tones {
|
|
|
|
|
2024-08-25 13:55:43 +10:00
|
|
|
inline Tone all[32];
|
2024-08-31 16:31:19 +10:00
|
|
|
inline uint8_t lookup[size(all)];
|
|
|
|
inline uint8_t rlookup[size(all)];
|
2024-08-19 22:43:24 +10:00
|
|
|
inline int active;
|
|
|
|
|
2024-08-25 16:53:23 +10:00
|
|
|
void init();
|
2024-10-03 02:27:58 +10:00
|
|
|
void set(uint8_t index, uint16_t frequency, float amplitude, Tone::Type mode);
|
2024-08-19 22:43:24 +10:00
|
|
|
void clear_all();
|
2024-08-25 16:53:23 +10:00
|
|
|
void recalc();
|
2024-08-19 22:43:24 +10:00
|
|
|
}
|
|
|
|
|