personalizedConfig static method
Generate a personalized binaural beat config from the footprint.
The carrier is the user's resonance. The beat frequency targets the EEG band that the user's spectral centroid suggests they need:
- High centroid (bright voice, likely stressed) → alpha 10 Hz (calm)
- Low centroid (dark voice, likely tired) → beta 18 Hz (alert)
- Mid centroid (balanced) → theta 6 Hz (meditative)
Implementation
static BinauralConfig personalizedConfig(HarmonicFootprint footprint) {
final carrier = footprint.resonanceHz;
final centroid = footprint.spectralCentroidAvg;
double beatHz;
String targetState;
if (centroid > 2000) {
// Bright/tense voice → calm down with alpha
beatHz = 10.0;
targetState = 'alpha';
} else if (centroid < 800) {
// Dark/tired voice → energize with beta
beatHz = 18.0;
targetState = 'beta';
} else {
// Balanced → meditative theta
beatHz = 6.0;
targetState = 'theta';
}
return BinauralConfig(
carrierHz: carrier.clamp(80.0, 2500.0),
beatHz: beatHz,
targetState: targetState,
);
}