20#include "dsp/mic_velocity/velocity_map.h"
36[[nodiscard]]
bool active();
60[[nodiscard]] uint32_t
now();
83void startSpeakerCalibration();
89[[nodiscard]] int32_t lineOutDelayMs();
98void writeSettingsIfChanged();
Definition velocity_map.h:43
Definition mic_input.cpp:31
uint32_t now()
The mic's frame clock now, for stamping a press as it arrives.
Definition mic_velocity.cpp:263
bool probing()
For the audio engine's output: whether the speaker calibration's noise is playing,...
Definition mic_velocity.cpp:199
PressVelocity velocityForPress(int32_t x, int32_t y, uint32_t arrived)
A pad press that arrived at frame arrived (from now()). Call it again for the same press after a wait...
Definition mic_velocity.cpp:267
void settingsChanged()
enabled or curve was changed (setCalibration notes it itself)
Definition settings.cpp:118
bool enabled
Enabled in the settings.
Definition mic_velocity.cpp:31
bool active()
Definition mic_velocity.cpp:170
void stopSpeakerCalibration()
Back to IDLE, after a result or to cancel.
Definition mic_velocity.cpp:185
int32_t lineOutDelay
The delay to the speakers on the line outputs (decimated samples), -1 until they've been calibrated (...
Definition mic_velocity.cpp:32
SpeakerCalibration
Definition mic_velocity.h:82
float lastPressLevelDb()
The level (dB of full scale) the last press measured was at: its thump's, or the noise's if it had no...
Definition mic_velocity.cpp:221
void setCalibrating(bool calibrating)
The calibration screen is open: presses are measured whatever the settings, for their levels.
Definition mic_velocity.cpp:216
void noteActivity()
Any pad or button edge: the echo canceller stops learning for a moment, as the press may be thumping.
Definition mic_velocity.cpp:257
dsp::mic_velocity::VelocityCurve curve
How tap strength maps onto velocity (the settings).
Definition mic_velocity.cpp:33
bool calibrated()
The calibration presses are measured against, once there is one.
Definition mic_velocity.cpp:208
void readSettings()
Definition settings.cpp:122
void update()
Definition mic_velocity.cpp:236
bool retryDue()
After a wait: whether it's time to ask about the press again (0.5 ms on). Cheap enough for a schedule...
Definition mic_velocity.cpp:306
bool micAvailable()
Whether the internal mic can be used: nothing in the mic or line-in jacks (either switches it off).
Definition mic_velocity.cpp:212
How tap strength maps onto velocity (the settings).
Definition velocity_map.h:72
Definition mic_velocity.h:54
uint8_t velocity
Otherwise, the velocity to send the press with (1-127).
Definition mic_velocity.h:56
bool wait
The thump is still rising: hand the press back and ask again shortly.
Definition mic_velocity.h:55