https://github.com/deric-w/nplayer
Python script wich plays notes stored in a json file with mpg123
https://github.com/deric-w/nplayer
music python3 sound
Last synced: about 1 year ago
JSON representation
Python script wich plays notes stored in a json file with mpg123
- Host: GitHub
- URL: https://github.com/deric-w/nplayer
- Owner: Deric-W
- License: mit
- Created: 2019-03-24T14:02:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T23:36:44.000Z (about 7 years ago)
- Last Synced: 2025-01-22T06:37:51.047Z (over 1 year ago)
- Topics: music, python3, sound
- Language: Python
- Size: 31.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nplayer
Python script wich plays notes stored in a json file with mpg123.
## How it works:
- the script is called with the file to play
- additional parameters: -d = debug mode, -p playerpath = set custom path to mpg123.
- the file is encoded in json and contains a header with the base (seconds/tact), tact (dezimal tact, like 4/4 = 1) and includes (list of packs wich will be used).
- the file also contains a notes section with the values sounds (list of files to play together from pack), types (list of note types like 1/4 = 4, 1/8 = 8), packs (list of packs of the sounds) and wait (if True, wait for notes to finish).
- Note: each value in sounds needs a value with the same index in types and packs.
## Packs:
- a Pack is a directory in `/packs/` with sounds and a pack.json
- the pack.json contains the samplerate and the file extension of the files in the directory.
- for examples take a look in "packs".