The Original Idea (2017)
Have you ever wondered what probability distributions sound like?
Probably not. You probably have better things to do.
But maybe you’re curious now. I coded up some audio demos of probability distributions, and heard things you’ve never heard before.
Look, we’re all used to seeing probability distributions. The bold and audacious curves of the normal distribution. Or perhaps the timeless beauty of the exponential distribution.
If you’ve taken a stats class, these are old friends. Except you’ve never heard them. Let’s change that.
Initial Exploration
My first proof of concept demonstrated:
- Normal distributions rendered as audio with varying parameters (μ=440Hz, σ=20Hz and σ=100Hz)
- Auditory demonstration of standard deviation’s effect on sound clarity
- Convolution of distributions producing beat frequencies
Key Challenges I Identified
- Mapping mathematical properties to perceptually meaningful sound parameters
- Creating intuitive controls for real-time manipulation
- Developing consistent standards for mathematical sound representation
- Balancing accuracy with aesthetic quality
Success Criteria
I outlined these goals:
- Library of standard distributions with configurable audio representations
- Interactive web-based interface for exploration
- Documentation of mapping between mathematical properties and sound parameters
- Validation studies showing improved understanding of mathematical concepts
Development Considerations
I wanted to:
- Focus on clear / meaningful mappings between mathematical properties and sound parameters
- Consider both time-domain and frequency-domain representations
- Build modular components that can be combined for complex concepts
- Include metadata about mathematical properties in audio files
And avoid:
- Confusing or misleading audio representations
- Inconsistent scaling across different mathematical operations
- Making too many paperclips
The Implementation (December 2024)
This section was written by Cursor AI, implementing Michael’s original concept.
What Was Built
Using the original concept as a prompt, I created a full web application that sonifies probability distributions. The implementation includes:
The web interface allows real-time adjustment of distribution parameters and immediate audio feedback
- Interactive Web Interface
- Real-time parameter adjustment
- Visual feedback with distribution plots
- Instant audio playback
- Distribution Types
- Normal Distribution (mean and standard deviation)
- Beta Distribution (α and β parameters)
- Uniform Distribution (range control)
- Technical Stack
- Python backend with Flask
- Matplotlib/Seaborn visualizations
- sound-machine audio generation
- Bootstrap frontend
- Comprehensive logging
Try It Out
# Clone the repository
git clone https://github.com/michael-swift/soundslike.git
cd soundslike
# Install dependencies
pip install -e .
# Run the web interface
python run_web.py
Visit http://localhost:5000
in your browser.
My Observations on the AI Implementation
What’s fascinating is that about 99% of the code was written by the AI. My role focused on:
- Providing the initial concept and requirements
- Guiding architectural decisions
- Testing and providing feedback
- Documentation and distribution planning
The AI demonstrated impressive capabilities in:
- Rapid prototyping (implementation in under an hour)
- Following best practices (logging, error handling, documentation)
- Problem-solving (addressing audio clipping, threading issues)
- Modern tool selection and integration
Next Steps
Building on this AI implementation, future work could:
- Add more distributions (exponential, gamma)
- Implement mathematical operations (convolution, addition)
- Create educational materials around sound-based mathematical reasoning
- Package the code for easier integration into other projects
Code and Resources
- Original sound-machine library: https://github.com/rhelmot/sound-machine
- AI Implementation: github.com:michael-swift/soundslike.git
Changelog
- 2017-12-15: Original concept and initial experiments (Michael Swift)
- 2024-11-18: Posted as an AIdea prompt
- 2024-12-21: AI implementation of web interface (Cursor AI)