More detailed note detection settings

This commit is contained in:
2026-01-01 19:45:16 +01:00
parent a785d188e9
commit d8602e0bd8
5 changed files with 84 additions and 32 deletions

View File

@@ -3,4 +3,23 @@
*/
// How long (in ms) a note must be held to be accepted as correct
export const NOTE_MATCH_THRESHOLD_MS = 100;
// How long (in ms) a note must be held to be accepted as correct
export const NOTE_MATCH_THRESHOLD_MS = 50;
// Microphone Sensitivity Configuration
// Sensitivity Scale: 0.0 (Low) to 1.0 (High)
// Linear mapping to dB thresholds
export const MIC_SENSITIVITY_DB_RANGE = {
min: -10, // 0.0 Sensitivity: Loudest input required (e.g. loud singing/instrument)
max: -100 // 1.0 Sensitivity: Quietest input accepted (mic floor)
};
export const MIC_DEFAULT_SENSITIVITY = 0.75; // Bias towards high sensitivity for ease of use
// Audio Constraints for getUserMedia
// Disabled processing is generally better for musical pitch detection
export const AUDIO_CONSTRAINTS = {
echoCancellation: false,
noiseSuppression: false,
autoGainControl: false,
};