A mesmerizing terminal-based music visualizer that generates complex, colorful patterns using mathematical functions and trigonometric waves.
- Complex Mathematical Patterns: Creates intricate designs using sine, cosine, and harmonic functions
- Colorful ASCII Art: 13 vibrant colors that cycle through the patterns
- Smooth Animation: Fluid motion with adjustable speed
- Responsive Design: Automatically adapts to terminal window size
- Lightweight Implementation: Pure Python with minimal dependencies
- Python 3.x
- Colorama library (install with
pip install colorama)
# Clone the repository
git clone https://github.com/yourusername/ascii-music-visualizer.git
cd ascii-music-visualizer
# Install dependencies
pip install coloramaRun the visualizer:
pytermviz.pyPress Ctrl+C to exit the visualizer.
The visualizer generates patterns using complex mathematical combinations:
- Wave Components: Multiple sine and cosine waves with different frequencies
- Harmonic Mixing: Combines waves with different amplitudes and phases
- Positional Math: Uses x,y coordinates and distance from center
- Color Mapping: Maps pattern values to vibrant terminal colors
Modify the time.sleep() value in main():
time.sleep(0.05) # Lower = faster, higher = slowerAdjust the mathematical combinations in create_pattern() function.
Works best in:
- Windows Terminal
- Linux terminals (gnome-terminal, konsole, etc.)
- macOS Terminal
- VS Code Integrated Terminal
- Ctrl+C: Exit the visualizer gracefully
- Resize Window: Automatically adjusts to new terminal dimensions
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
Created with ❤️ for ASCII art enthusiasts and music visualizer fans
Note: For best results, use a terminal with 256-color support and proper ANSI color rendering.
