mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-01-11 08:02:57 +00:00
Format code according to conventions (#16322)
This commit is contained in:
@@ -54,9 +54,9 @@ typedef union {
|
||||
* "A musical tone is characterized by its duration, pitch, intensity (or loudness), and timbre (or quality)"
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t time_started; // timestamp the tone/note was started, system time runs with 1ms resolution -> 16bit timer overflows every ~64 seconds, long enough under normal circumstances; but might be too soon for long-duration notes when the note_tempo is set to a very low value
|
||||
float pitch; // aka frequency, in Hz
|
||||
uint16_t duration; // in ms, converted from the musical_notes.h unit which has 64parts to a beat, factoring in the current tempo in beats-per-minute
|
||||
uint16_t time_started; // timestamp the tone/note was started, system time runs with 1ms resolution -> 16bit timer overflows every ~64 seconds, long enough under normal circumstances; but might be too soon for long-duration notes when the note_tempo is set to a very low value
|
||||
float pitch; // aka frequency, in Hz
|
||||
uint16_t duration; // in ms, converted from the musical_notes.h unit which has 64parts to a beat, factoring in the current tempo in beats-per-minute
|
||||
// float intensity; // aka volume [0,1] TODO: not used at the moment; pwm drivers can't handle it
|
||||
// uint8_t timbre; // range: [0,100] TODO: this currently kept track of globally, should we do this per tone instead?
|
||||
} musical_tone_t;
|
||||
|
||||
Reference in New Issue
Block a user