Conv1D + LSTM model trained on Bach chorales, with a simple web UI to generate new sequences and export MIDI.
Music_Generation_Using_LSTM.ipynb— training and experimentation notebookbach_generation_conv1d_lstm.keras— trained model fileDataset/— chorale CSVs used for training/validationui/— lightweight HTML/CSS/JS UI + Python inference server
cd "ui"
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pipApple Silicon (M1/M2/M3):
python -m pip install numpy music21 tensorflow-macos tensorflow-metalIntel Mac:
python -m pip install numpy music21 tensorflowpython server.pyOpen http://localhost:8000 live https://music-generation-using-lstm-43wx.onrender.com
- Manual seed chords (8x4)
- Random seed generator
- CSV seed upload
- Piano‑roll visualization
- MIDI download
- In‑browser audio playback
- MIDI range is
36–81, with0as rest - Generates note‑by‑note, then reshaped into 4‑note chords
Open the notebook and run the cells in order:
jupyter notebook Music_Generation_Using_LSTM.ipynb