https://github.com/flyingfathead/moonlighter
Miniature beep-boop MIDI player for Python
https://github.com/flyingfathead/moonlighter
Last synced: 19 days ago
JSON representation
Miniature beep-boop MIDI player for Python
- Host: GitHub
- URL: https://github.com/flyingfathead/moonlighter
- Owner: FlyingFathead
- Created: 2023-11-26T21:23:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-27T15:06:03.000Z (over 2 years ago)
- Last Synced: 2025-02-28T12:07:06.115Z (over 1 year ago)
- Language: Python
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# moonlighter
Miniature beep-boop MIDI player for Python. Good for audio alerts, debugging and such!
## Usage
Single-line install for *nix + Git Bash (installs all required Python packages, downloads 'Moonlight Sonata' and plays all three movements of it):
```bash
git clone https://github.com/FlyingFathead/moonlighter/ && cd moonlighter && python moonlighter.py --deploy
```
## Slow deployment:
First, clone the repo with:
```bash
git clone https://github.com/FlyingFathead/moonlighter
```
then:
```bash
cd moonlighter
```
install the prerequisite `pip` packages:
```bash
pip install -U numpy sounddevice soundfile mido pydub requests
```
(`requests` is only used by `--deploy`, but it's a recommended module)
Play with your favorite midi file:
```bash
python moonlighter.py /path/to/your/midi/file.mid
```
## Other features
Dump the midi to mp3:
```bash
python moonlighter.py /path/to/your/midi/file.mid --dump output.mp3
```
Adjust the beeps and boops, a.k.a. note length (in seconds):
```bash
python moonlighter.py /path/to/your/midi/file.mid --notelength 0.1
```
_(adjusts the note length to 0.1 sec)_
# Changelog
- `v1.16` - bug fixes, all three movements
- `v1.08` - small bug fixes (mp3 export bug)
- `v1.07` - Note length adjustment with `--notelength` added
# Info
- by FlyingFathead (w/ ghostcode by ChaosWhisperer)
- https://github.com/FlyingFathead/moonlighter/