Interactive Frequency Trainer
Interactive Frequency Trainer
An educational ear training tool using Strudel live coding for mixing and mastering practice
Overview
This tool generates random frequencies using different waveforms to help develop critical listening skills for audio engineering, mixing, and mastering. Built with Strudel for live coding audio synthesis.
Controls
Waveform Selection
- Sine Wave: Pure tone, great for frequency identification
- Square Wave: Harmonically rich, good for timbre training
- Sample Waves: Real-world audio examples
Frequency Ranges
- Sub Bass: 20-60 Hz
- Bass: 60-250 Hz
- Low Mids: 250-500 Hz
- Mids: 500-2000 Hz
- High Mids: 2000-4000 Hz
- Treble: 4000-20000 Hz
Interactive Strudel Code
javascript// Strudel Ear Training Generator // Live coding environment for frequency training // Basic setup await initStrudel(); // Frequency ranges for training const freqRanges = { subBass: [20, 60], bass: [60, 250], lowMids: [250, 500], mids: [500, 2000], highMids: [2000, 4000], treble: [4000, 20000] }; // Waveform types const waveforms = ['sine', 'square', 'sawtooth', 'triangle']; // Generate random frequency in range function randomFreq(range) { const [min, max] = freqRanges[range]; return Math.floor(Math.random() * (max - min) + min); } // Generate random waveform function randomWaveform() { return waveforms[Math.floor(Math.random() * waveforms.length)]; } // Main training pattern let currentFreq = 440; let currentWave = 'sine'; // Interactive controls const controls = { newFrequency: () => { currentFreq = randomFreq('mids'); console.log(`New frequency: ${currentFreq}Hz`); }, newWaveform: () => { currentWave = randomWaveform(); console.log(`New waveform: ${currentWave}`); }, newChallenge: () => { const ranges = Object.keys(freqRanges); const randomRange = ranges[Math.floor(Math.random() * ranges.length)]; currentFreq = randomFreq(randomRange); currentWave = randomWaveform(); console.log(`Challenge: ${currentFreq}Hz ${currentWave} wave`); } }; // Basic Strudel pattern const earTrainer = () => { return sound(currentWave) .freq(currentFreq) .gain(0.3) .attack(0.1) .release(0.5); }; // Start the trainer earTrainer().play();
Training Exercises
Exercise 1: Frequency Identification
- Click "New Challenge" to generate a random frequency
- Listen to the tone
- Try to identify the frequency range
- Check your answer
Exercise 2: Waveform Recognition
- Generate tones with different waveforms
- Train your ear to distinguish between sine, square, and sawtooth waves
- Notice the harmonic content differences
Exercise 3: Critical Band Training
- Generate two close frequencies
- Practice identifying beating and masking effects
- Develop sensitivity to small frequency differences
Usage Notes
- Use headphones or quality monitors for accurate frequency response
- Start with wider frequency ranges and gradually narrow them down
- Practice regularly in short sessions (10-15 minutes)
- Take breaks to prevent ear fatigue
Next Steps
- Add visual frequency analyzer
- Implement A/B testing features
- Add preset frequency challenges
- Create progress tracking
- Add harmonics and complex waveforms
Built with Strudel live coding environment