Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phuang1024/pianoml
Use a transformer to compose music pieces.
https://github.com/phuang1024/pianoml
Last synced: about 2 months ago
JSON representation
Use a transformer to compose music pieces.
- Host: GitHub
- URL: https://github.com/phuang1024/pianoml
- Owner: phuang1024
- Created: 2023-04-09T06:59:53.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-16T19:32:36.000Z (10 months ago)
- Last Synced: 2024-03-17T02:40:37.322Z (10 months ago)
- Language: Python
- Size: 1.58 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Piano ML
Hackathon project by
[PeaceOfPi](https://github.com/PeaceOfPi),
[Sinha-Soumik](https://github.com/Sinha-Soumik),
[The-Senate-I-Am](https://github.com/The-Senate-I-Am),
and [phuang1024](https://github.com/phuang1024)## Running Locally
```bash
pip install -r requirements.txt
```### ML Server
The ML autocomplete program is run as a server separate from the GUI. (They could be run
from the same computer.)You also need to obtain a model. I have trained a model, which you can download at this link
https://drive.google.com/file/d/1zXGMuueuYocWr0hC9wyOJsqzEnHa8h3k/view?usp=share_link
```bash
cd ml# Save model to this file:
mkdir results
mv /path/to/model.pt results/model.ptpython server.py
```### GUI
```bash
cd gui
python main.py --ip ip_of_server
```## GUI Usage
The GUI is a basic MIDI recording system with a fixed length of 30 seconds.
Playing the piano is done via keyboard; use the keys `awsedftgyhujkolp;'`, which resemble
the keys on a piano. Use the keys `z` and `x` to move down and up octaves.Press the `Record` button and play a melody. Press the `Stop` button to end recording.
Press the `Autocomplete` button to query the ML program. The neural network will return
a completion after the last note you have recorded.