# Audio Feedback

> Train your braking technique using real-time audio tones that indicate how accurately you match the target curve.

Audio feedback allows you to train your braking technique without constantly looking at the screen. Real-time tones indicate how well you're matching the target brake curve, helping you develop muscle memory through sound.

## How It Works

### The Concept

Audio feedback uses pitch to communicate your brake accuracy:

- **Perfect pitch** (center tone) - You're matching the target exactly
- **Higher pitch** - You're applying too much pressure
- **Lower pitch** - You're not applying enough pressure

This creates an intuitive "tuning" experience where you adjust your brake pressure to keep the tone centered.

### Why Use Audio Feedback?

Training with audio provides unique benefits:

- **Eyes on the road** - Focus on visual references while training
- **Faster learning** - Audio feedback is processed more quickly than visual
- **Muscle memory** - Develop feel through sound association
- **Realistic practice** - More like actual driving where you feel the pedal

## Setting Up Audio Feedback

### Enabling Audio

Turn on audio feedback:

1. Go to **Settings > Audio**
2. Enable **Audio Feedback**
3. Set your preferred volume
4. Test the sound with the preview button

### First Use Requirement

Due to browser security, audio requires user interaction:

1. Click anywhere in the app to enable audio context
2. The first exercise will prompt for audio permission
3. Once enabled, audio works for all exercises

### Volume Configuration

Adjust audio levels:

| Setting | Description |
|---------|-------------|
| Master Volume | Overall audio level (0-100%) |
| Feedback Volume | Audio feedback specific volume |
| Mute Toggle | Quick on/off without changing settings |

## Audio Feedback Modes

### Continuous Tone

The default mode - a continuous tone that changes pitch:

- Steady tone plays during brake application
- Pitch shifts based on accuracy
- Smooth transitions between pitches
- Most intuitive for learning

### Pulse Mode

Rhythmic pulses instead of continuous tone:

- Pulses when you're within tolerance
- No sound when outside tolerance
- Faster pulses mean better accuracy
- Good for advanced training

### Success/Error Sounds

Discrete sound effects:

- Play specific sounds for good/bad performance
- Less distracting than continuous tones
- Good for focused practice sessions

## Customizing Audio Feedback

### Pitch Range

Adjust the frequency range:

- **Base Frequency** - Center tone pitch (default: 440Hz)
- **Pitch Range** - How much pitch varies (default: 200Hz)
- **Response Speed** - How quickly pitch changes

### Sensitivity

Control how responsive the audio is:

- **High Sensitivity** - Small errors cause noticeable pitch changes
- **Low Sensitivity** - More forgiving, only major errors change pitch
- **Tolerance-Based** - Pitch only changes outside tolerance zone

### Sound Characteristics

Fine-tune the tone:

- **Wave Form** - Sine (smooth), Square (harsh), Triangle (soft)
- **Attack** - How quickly the tone starts
- **Release** - How quickly the tone fades

## During Exercises

### Using Audio Feedback

When practicing with audio:

1. Start the exercise
2. Listen for the center pitch as you brake
3. Adjust pressure to keep pitch steady
4. Use the tone changes as instant feedback

### Interpreting the Sound

What different sounds mean:

| Sound | Meaning | Action |
|-------|---------|--------|
| Center pitch | Perfect | Maintain pressure |
| Rising pitch | Too much pressure | Ease off slightly |
| Falling pitch | Too little pressure | Apply more brake |
| No sound | Outside active zone | Wait for next zone |

### Combining with Visual

For best results, combine audio and visual feedback:

1. Use visual to understand the target shape
2. Use audio to fine-tune your accuracy
3. Gradually reduce visual reliance
4. Eventually practice with audio only

## Tips for Effective Audio Training

### Learning Phase

When first using audio feedback:

- Start with lower sensitivity
- Practice with visual feedback alongside
- Focus on recognizing the center pitch
- Don't worry about perfect scores initially

### Intermediate Phase

As you become comfortable:

- Increase sensitivity for more precise feedback
- Try exercises with eyes closed briefly
- Focus on maintaining steady pitch
- Work on smooth pitch transitions

### Advanced Phase

For experienced users:

- Use high sensitivity settings
- Practice entire corners with audio only
- Focus on subtle pitch variations
- Train for specific corner types

### Best Practices

- **Use headphones** for clearer audio and better immersion
- **Set appropriate volume** - loud enough to hear clearly, not fatiguing
- **Quiet environment** helps you focus on subtle pitch changes
- **Regular breaks** prevent audio fatigue

## Accessibility Considerations

### Hearing Differences

If you have difficulty with audio feedback:

- Increase pitch range for more obvious differences
- Use pulse mode instead of continuous tones
- Combine with visual feedback
- Try different wave forms for clarity

### Alternative Feedback

If audio doesn't work for you:

- Visual-only mode is fully featured
- Haptic feedback (if your device supports it)
- Color-coded visual indicators

## Troubleshooting

### No Sound

**Check audio permissions:**
- Click in the app to enable audio context
- Check browser audio permissions
- Ensure the site isn't muted

**Check settings:**
- Verify audio feedback is enabled
- Check volume isn't at 0%
- Test with the preview button

### Distorted Sound

**Audio crackling or popping:**
- Try a different browser (Chrome works best)
- Close other audio-using applications
- Reduce other browser tabs

**Inconsistent pitch:**
- Check for pedal calibration issues
- Reduce audio sensitivity
- Ensure smooth pedal input

### Audio Delay

**Pitch changes feel delayed:**
- Use Chrome for lowest latency
- Close other demanding applications
- Check system audio settings

## Technical Notes

### Browser Compatibility

Audio feedback uses the Web Audio API:

| Browser | Support |
|---------|---------|
| Chrome | Excellent |
| Firefox | Good |
| Edge | Excellent |
| Safari | Good (requires user gesture) |

### System Requirements

- Audio output device (speakers or headphones)
- Modern browser with Web Audio API support
- Sufficient CPU for real-time audio processing
