A Flask-based music sequencer inspired by Teenage Engineering's design aesthetic. Create beats and melodies on the go with a clean, grid-based interface.
- 16-step sequencer with visual grid interface
- Drum machine with 6 drum sounds (kick, snare, hi-hat, open hat, crash, clap)
- Synthesizer with 4 synth types (bass, lead, pad, pluck)
- Real-time audio synthesis using Web Audio API
- Save/Load sequences with persistent storage
- Mixer controls with individual volume levels
- Effects processing (reverb, delay, filter)
- Pattern management with multiple pattern slots
- Retro-futuristic UI inspired by Teenage Engineering
- Responsive design that works on desktop and mobile
- Python 3.7+
- Modern web browser with Web Audio API support
- Clone the repository:
git clone https://github.com/HyprPixl/music-machine.git
cd music-machine- Install dependencies:
pip install -r requirements.txt- Run the application:
python app.py- Open your browser and navigate to
http://localhost:5000
- Azure subscription
- Azure CLI (optional if deploying from GitHub Actions)
- Create an Azure App Service (Linux) with a Python runtime (e.g., 3.11)
requirements.txtincludesgunicornfor production serving.app.pyexposes a module-levelappfor WSGI (app:app).Procfiledefines the web command for Gunicorn.
- Deployment source: set to your GitHub repo (recommended) or local push.
- Startup command: leave blank (Oryx will detect Flask + run
gunicorn app:app).- Alternatively set:
gunicorn -w 2 -k gthread -b 0.0.0.0:$PORT app:app
- Alternatively set:
- App settings (Configuration → Application settings):
SECRET_KEY: set to a secure random stringFLASK_DEBUG:0(optional, defaults to off)
- Create an Azure publish profile on the Web App → Get publish profile.
- Add it to your repo secrets as
AZUREAPPSERVICE_PUBLISHPROFILE. - Use the Azure Web Apps Deploy action. Example workflow:
name: Deploy to Azure Web App
on:
push:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -r requirements.txt
- uses: azure/webapps-deploy@v3
with:
app-name: <YOUR_WEBAPP_NAME>
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }}
package: .After deployment, browse to the App Service URL. The app binds to 0.0.0.0 and reads the PORT provided by the platform.
- Click on the grid buttons to activate steps in your sequence
- Use different instrument tracks (drums and synths) to build your pattern
- Adjust BPM using the tempo control
- Press Play to hear your sequence
- Master Volume: Controls overall output level
- Section Volumes: Separate controls for drums and synths
- Effects: Add reverb, delay, and filtering to your sounds
- Click SAVE to open the sequence management dialog
- Enter a name for your sequence
- Click Save New to store your pattern
- Click LOAD to view saved sequences
- Click on any sequence to load it
The application follows a modular architecture designed for expandability:
app.py- Main application and routingblueprints/- Modular route handlersapi.py- REST API endpointssequencer.py- Sequencer-specific routes
models/- Data models and business logicsequence.py- Sequence managementinstruments.py- Instrument definitions
static/js/- JavaScript modulesaudio-engine.js- Web Audio API implementationsequencer.js- Sequencer logic and UIapp.js- Main application orchestration
static/css/- Stylingstyle.css- Complete UI styling with TE-inspired aesthetics
templates/- HTML templatesindex.html- Main interface template
The codebase is designed for easy expansion:
- Define new instrument types in
models/instruments.py - Add corresponding audio generation in
audio-engine.js - Update the UI rendering in
sequencer.js
- Implement effect processing in
audio-engine.js - Add UI controls in the HTML template
- Wire up the controls in
sequencer.js
- MIDI Support: Add Web MIDI API integration
- Recording: Implement audio recording functionality
- Collaboration: Add real-time collaboration features
- Sample Import: Allow users to upload custom samples
- Pattern Chaining: Create song arrangements from patterns
- Backend: Flask (Python)
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Audio: Web Audio API
- Storage: In-memory (easily extensible to database)
- Styling: Custom CSS with CSS Grid and Flexbox
- Chrome 66+
- Firefox 60+
- Safari 14.1+
- Edge 79+
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.