Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: MIDI Output with encoded fingerings #34

Open
Cool-Joe opened this issue Jan 25, 2021 · 9 comments
Open

Enhancement: MIDI Output with encoded fingerings #34

Cool-Joe opened this issue Jan 25, 2021 · 9 comments

Comments

@Cool-Joe
Copy link

Cool-Joe commented Jan 25, 2021

Because MusicXML is nice for further editing, printing oder PDF output, but not ideal (and sometimes tricky or buggy) for automatic reading e.g. in player applications.
The idea is to provide an option to output the notes to a standard MIDI file with encoded fingerings. Music21 can output MIDI easily, however I do not know which features it supports.
Fingerings could be stored as text events or (what I would prefer) just use the channel information: You could easily store the fingering (1 - 10) as MIDI channel information (1 - 16), what would be ideal for further processing.

@PRamoneda
Copy link
Collaborator

Hi! I am Pedro master student at MTG (Barcelona).

Do you have some idea of how to implement this enhancement?

Maybe extending the functionality of music21 midi classes? https://github.com/cuthbertLab/music21/blob/7498a6ee3ec2592a097ac243d6042da3b85e8b3d/music21/converter/subConverters.py#L1019
https://github.com/cuthbertLab/music21/blob/7498a6ee3ec2592a097ac243d6042da3b85e8b3d/music21/pitch.py#L2447

@marcomusy
Copy link
Owner

Hola Pedro, to be perfectly honest I wouldn't know how to do it... maybe you can get help from the maintainers of music21, if they are interested in such a feature.
On the pianoplayer side it's surely far from perfect (especially for chords) and will need some improvements as soon as i find the spare time to do it :)

@Cool-Joe
Copy link
Author

Cool-Joe commented Mar 7, 2021

Maybe extending the functionality of music21 midi classes?

IMHO extending music21 isn't necessary as it already can output MIDI data. Instead the encoding of key fingerings as channel information would have to be implemented inside pianoplayer.

@PRamoneda
Copy link
Collaborator

ok yeah, I understand that. However, it's needed to create the fingers with the same duration (and then, the same resolution) as the music21 generated midi. Well, I think I can do that from pianoplayer! I will try to implement it in the following weeks :D

@PRamoneda
Copy link
Collaborator

what is beam?

@marcomusy
Copy link
Owner

it's the staff. Typically beam=0 is the right hand and beam=1 the left.

@PRamoneda
Copy link
Collaborator

PRamoneda commented Mar 8, 2021

Ok thank you so much @marcomusy! And a last question in the reader class. What is the purpose of sfasam variable.
here a direct link

sfasam = 0.05 # sfasa leggermente le note dell'accordo

I understand the meaning but not the purpose :)

@marcomusy
Copy link
Owner

the idea here is that notes in chords are never played really simultaneously, so the time of each note in the same chords is slightly modified to make them happen in a rapid sequence with time difference 0.05.

@MaximeHoude
Copy link

I'm late to the party, I can not really help, but I also agree with OP, this enhancement will be a great addition to the projet: it's exactly what I'm looking for. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants