This project simulates a Nanoleaf-like display with dynamic, audio-reactive hexagon shapes. It uses Python with Pygame for graphics and NumPy for audio simulation.
main.py
: Entry point for the application.renderer.py
: Handles rendering of shapes and visual effects.audio_capture.py
: Manages audio input and processing.visual_effects.py
: Contains functions for applying visual effects based on audio input.config.py
: Configuration settings for the application.utils.py
: Utility functions used across the project.assets/
: Contains image assets used for textures.shapes/
: Stores shape data and images.
- Python 3.7 or higher
- pip (Python package installer)
- Homebrew (for macOS users)
If you're using macOS and don't have Homebrew installed, follow these steps:
-
Open Terminal.
-
Run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Follow the prompts to complete the installation.
- Clone or download this repository to your local machine.
- Open a terminal and navigate to the project directory.
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On macOS and Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
With the virtual environment activated, install the required packages:
pip install -r requirements.txt
- Ensure Python and pip are installed.
- Follow steps 2 to 4 above.
- Ensure Python and pip are installed.
- Follow steps 2 to 4 above.
To run the Nanoleaf Shape Generator:
-
Ensure your virtual environment is activated.
-
Run the following command:
python main.py
- Use the left and right arrow keys to cycle through different shapes.
- Press Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) to save the current shape as a PNG. Outputs to the project directory in /output.
If you encounter any issues with Pygame, try upgrading it:
pip install --upgrade pygame
For any other problems, please open an issue on the GitHub repository.
This project is licensed under the MIT License. You are free to fork, modify, and use it as you wish.
[Consider adding screenshots or a demo video here.]