|
| bool | active () |
|
void | startSpeakerCalibration () |
|
void | stopSpeakerCalibration () |
| | Back to IDLE, after a result or to cancel.
|
|
SpeakerCalibration | speakerCalibration () |
|
int32_t | lineOutDelayMs () |
|
bool | probing () |
| | For the audio engine's output: whether the speaker calibration's noise is playing, and its next sample (q31).
|
|
int32_t | probeSample () |
|
bool | calibrated () |
| | The calibration presses are measured against, once there is one.
|
|
bool | micAvailable () |
| | Whether the internal mic can be used: nothing in the mic or line-in jacks (either switches it off).
|
|
void | setCalibrating (bool calibrating) |
| | The calibration screen is open: presses are measured whatever the settings, for their levels.
|
|
float | lastPressLevelDb () |
| | The level (dB of full scale) the last press measured was at: its thump's, or the noise's if it had none.
|
|
dsp::mic_velocity::Calibration const & | calibration () |
|
void | setCalibration (dsp::mic_velocity::Calibration const &newCalibration) |
| void | update () |
|
void | noteActivity () |
| | Any pad or button edge: the echo canceller stops learning for a moment, as the press may be thumping.
|
|
uint32_t | now () |
| | The mic's frame clock now, for stamping a press as it arrives.
|
|
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.
|
|
bool | retryDue () |
| | After a wait: whether it's time to ask about the press again (0.5 ms on). Cheap enough for a scheduler condition.
|
| void | readSettings () |
|
void | writeSettingsIfChanged () |
|
void | settingsChanged () |
| | enabled or curve was changed (setCalibration notes it itself)
|
Mic velocity: a pad press's velocity from the thump it makes in the internal mic.
While active, the mic (and, with the speaker on, what's sent to the speaker) runs continuously through the echo canceller and thump detector (dsp/mic_velocity). A press that plays notes at its velocity (keyboard view's pads, audition pads) is stamped with the frame it arrived at and queued (deluge.cpp); everything else goes on as usual. When it reaches the front its thump is usually already there: it starts a couple of ms before the press arrives. It then goes to the UI with the velocity it measured, so everything downstream (sounds, MIDI and CV out, recording, the arpeggiator) gets it as if the pads were velocity sensitive. If the thump is still rising, the press (and its release, if that's arrived too) waits for it, for up to 4 ms.
| void deluge::mic_velocity::readSettings |
( |
| ) |
|
The settings (enabled, curve, calibration), in SETTINGS/MicVelocity.XML: read at boot, and written when they've changed, from places the card can be written from (leaving the settings menu, finishing a calibration)