asigalov61
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -58,7 +58,7 @@ And in its rhythm, our spirits glow.
|
|
58 |
pip install monsterpianotransformer
|
59 |
```
|
60 |
|
61 |
-
#### (Optional) [FluidSynth](https://github.com/FluidSynth/fluidsynth/wiki/Download) for MIDI to Audio
|
62 |
|
63 |
##### Ubuntu or Debian
|
64 |
|
@@ -471,6 +471,40 @@ mpt.tokens_to_midi(output_tokens)
|
|
471 |
|
472 |
***
|
473 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
## Dev and tests
|
475 |
|
476 |
### Loading
|
@@ -510,4 +544,4 @@ tex_output = mpt.generate_long(tex_model, input_tokens=[0], num_gen_tokens=32)
|
|
510 |
```
|
511 |
|
512 |
### Project Los Angeles
|
513 |
-
### Tegridy Code 2025
|
|
|
58 |
pip install monsterpianotransformer
|
59 |
```
|
60 |
|
61 |
+
#### (Optional) [FluidSynth](https://github.com/FluidSynth/fluidsynth/wiki/Download) for MIDI to Audio functionality
|
62 |
|
63 |
##### Ubuntu or Debian
|
64 |
|
|
|
471 |
|
472 |
***
|
473 |
|
474 |
+
## Manual input sequences
|
475 |
+
|
476 |
+
### Custom notes list to tokens, chords and pitches
|
477 |
+
|
478 |
+
```python
|
479 |
+
# You can manually create compatible input tokens sequence, chords list and pitches list
|
480 |
+
# from a simple notes list
|
481 |
+
|
482 |
+
# Import Monster Piano Transformer as mpt
|
483 |
+
import monsterpianotransformer as mpt
|
484 |
+
|
485 |
+
# Custom notes list should be in the following format:
|
486 |
+
# [delta start time (0-127), duration (1-127), MIDI pitch (1-127)), velocity (1-127)]
|
487 |
+
sample_notes_list = [
|
488 |
+
|
489 |
+
[0, 70, 84, 84], [0, 70, 72, 72], [0, 70, 72, 115], [0, 70, 67, 67], [0, 70, 64, 64],
|
490 |
+
[0, 70, 60, 60], [0, 70, 55, 55], [0, 70, 52, 52], [0, 70, 48, 48], [0, 70, 36, 40],
|
491 |
+
[0, 70, 24, 120], [82, 11, 79, 79], [0, 11, 67, 67], [0, 11, 67, 122], [0, 11, 64, 64],
|
492 |
+
[0, 11, 52, 52], [0, 11, 28, 116], [11, 23, 84, 84], [0, 23, 72, 72], [0, 23, 72, 115],
|
493 |
+
[0, 23, 67, 67], [0, 23, 60, 60], [0, 23, 55, 55], [0, 23, 52, 52], [0, 23, 48, 48],
|
494 |
+
[0, 23, 24, 120], [24, 17, 79, 79], [0, 17, 67, 67], [0, 17, 67, 122], [0, 17, 64, 64],
|
495 |
+
[0, 17, 60, 60], [0, 17, 55, 55], [0, 17, 52, 52], [0, 17, 48, 48], [0, 17, 24, 120],
|
496 |
+
[17, 5, 81, 81], [0, 5, 69, 69], [0, 5, 69, 124], [0, 5, 65, 65], [0, 5, 53, 53], [0, 5, 29, 115],
|
497 |
+
[6, 23, 83, 83], [0, 23, 71, 71], [0, 23, 71, 126], [0, 23, 67, 67], [0, 23, 59, 59],
|
498 |
+
[0, 23, 55, 55], [0, 23, 50, 50], [0, 23, 47, 47], [0, 23, 43, 43], [0, 23, 31, 113]
|
499 |
+
|
500 |
+
]
|
501 |
+
|
502 |
+
# Use notes_list_to_tokens_chords_pitches function to convert the notes list
|
503 |
+
tokens_seq, chords_list, pitches_list = mpt.notes_list_to_tokens_chords_pitches(sample_notes_list)
|
504 |
+
```
|
505 |
+
|
506 |
+
***
|
507 |
+
|
508 |
## Dev and tests
|
509 |
|
510 |
### Loading
|
|
|
544 |
```
|
545 |
|
546 |
### Project Los Angeles
|
547 |
+
### Tegridy Code 2025
|