Skip to content

Commit df04911

Browse files
committed
Update midi file schema
1 parent f0d94c0 commit df04911

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ A small tool that visualizes music in two ways:
55
* Loading up several WAV files at once and rendering their waveforms
66
* Reading a MIDI file and rendering the note data
77

8-
The output is an MP4 file, which you'll need to mux with the original master audio.
8+
The output is an MP4 file, which you'll need to mux with the original master
9+
audio.
910

10-
I plan on using this for [my YouTube channel](https://youtube.com/TomboFry),
11+
I plan on using this for [my YouTube channel],
1112
where I upload chiptune music. I figured it would be a good visualisation tool,
1213
and different from my usual screen capture of FL Studio.
1314

1415
## Screenshots
1516

16-
I've uploaded [a full-song to YouTube using this software](https://www.youtube.com/watch?v=9mGbqnYR_UI), so you can see what the final output looks like!
17+
I've uploaded [a full-song to YouTube using this software], so you can see what
18+
the final output looks like!
1719

1820
### Waveform Output
1921

@@ -52,7 +54,8 @@ Options:
5254
Non-tonal channels or low frequency audio might look better displayed when
5355
this is turned off. Defaults to `true`
5456
* `video_file_out` is a path name to the video file that will be output.
55-
* `use_gradients` (optional) - each channel's background can display a colour that subtly fades from top to bottom. Defaults to `true`
57+
* `use_gradients` (optional) - each channel's background can display a colour
58+
that subtly fades from top to bottom. Defaults to `true`
5659

5760
```json
5861
{
@@ -72,18 +75,28 @@ Options:
7275

7376
* `midi_file` is a path name to a .MID file,
7477
* `video_file_out` is a path name to the video file that will be output.
75-
* `use_gradients` (optional) - each channel's background can display a colour that subtly fades from top to bottom. Defaults to `true`
76-
* `channels`, is an object, where each key is the name of a track within the MIDI file. Adding channels is optional, but will default the track to a black background and sort them in alphabetical order. Each sub-object contains the following properties:
77-
* `order` (optional) - a number which is zero or above, used to rearrange the channels that appear on screen
78-
* `visible` (optional) - hides the channel from the screen, if the MIDI contains extra channels you don't want to appear.
79-
* `colour` (optional) - contains the Red, Green, and Blue colour values (0 - 255). Defaults to black, ie. `[0, 0, 0]`
78+
* `use_gradients` (optional) - each channel's background can display a colour
79+
that subtly fades from top to bottom. Defaults to `true`
80+
* `lyrics_file` (optional) - a path to an [LRC file], which will be displayed at
81+
the bottom of the screen, along with the notes.
82+
* `channels`, is an object, where each key is the name of a track within the
83+
MIDI file. Adding channels is optional, but will default the track to a black
84+
background and sort them in alphabetical order. Each sub-object contains the
85+
following properties:
86+
* `order` (optional) - a number which is zero or above, used to rearrange the
87+
channels that appear on screen
88+
* `visible` (optional) - hides the channel from the screen, if the MIDI
89+
contains extra channels you don't want to appear.
90+
* `colour` (optional) - contains the Red, Green, and Blue colour values (0 -
91+
255). Defaults to black, ie. `[0, 0, 0]`
8092

8193
```json
8294
{
8395
"midi_file": "/path/to/song.mid",
8496
"duration_secs": 3,
8597
"video_file_out": "/path/to/output.mp4",
8698
"use_gradients": true,
99+
"lyrics_file": "./path/to/lyrics.lrc",
87100
"channels": {
88101
"Piano": {
89102
"colour": [ 107, 163, 66 ],
@@ -119,3 +132,7 @@ Options:
119132
"duration_secs": 5
120133
}
121134
```
135+
136+
[LRC file]: https://en.wikipedia.org/wiki/LRC_(file_format)
137+
[my YouTube channel]: https://youtube.com/TomboFry
138+
[a full-song to YouTube using this software]: https://www.youtube.com/watch?v=9mGbqnYR_UI

midi-schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
"use_gradients": {
5151
"type": "boolean",
5252
"default": false
53+
},
54+
"lyrics_file": {
55+
"type": "string"
5356
}
5457
},
5558
"required": [

0 commit comments

Comments
 (0)