la-jarre-a-son / midi-jar

MIDI Jar is a tool box for musicians, learners, streamers, that want to route MIDI message between devices, and display a piano or chords while playing, and integrate it on a video or on a Twitch stream.
http://midi-jar.ljas.fr/
MIT License
87 stars 9 forks source link

Staff customization for MIDI guitar #5

Closed lgmusic closed 2 years ago

lgmusic commented 2 years ago

Hi, Rémi, congratulations for your great work! Everything is working fine here, WIndows 10. I teach both keyboard and guitar (online lessons and video recordings using OBS), and your software is a great solution for displaying the notes on the staff in real-time. I use Roland-A88 keyboard controller and Roland GI-20 as guitar MIDI interface. The problem is that guitar notation uses a single staff with treble clef, and the notes sound one octave lower than written. Can this feature be implemented, so you can switch between the keyboard grand staff and guitar treble clef single staff? It would be nice if the lower ledger lines could go as low as low D, for when you have to drop the low E 6th string down to D. Also, guitar notation demands a considerable amount of upper ledger lines. Thank you very much!

ArTiSTiX commented 2 years ago

Hello @lgmusic

Yes, this is a great idea to be able to customize the staff, being a Piano or another clef (bass or treble, or maybe something else).

Could you provide me some resources about Guitar notation (or even other instruments) so that i can learn more about the specifications ? Even hand drawn figures, or some paint mockups could be helpful.

Concerning the upper ledger lines, if i understand right, on guitar, all notes are shifted up in notation ? Like, a D6 on guitar (the highest note on a 6 string neck i suppose) would be noted like a D7 on piano ?

image

I think the whole range on piano is able to be rendered on the grand staff, so i don't see the issue with upper lines.

Would it be very annoying to not being able to switch between the staff configurations only in the settings page (like it is currently with the key signature ) ?

I will plan this feature for the next minor version, with a Circle of Fifth to change key more easily in the chord display module.

Thanks !

lgmusic commented 2 years ago

Thank you very much for your very quick reply, Rémi! Yes, both guitar and bass are octave transposing instruments. If you play on a piano any note written on a guitar or bass score it sounds one octave higher (because it uses a single staff, in order to avoid a ridiculous amount of lower ledger lines): Transposing correspondence No, it doesn't need to have a switch, as long as you could select the configuration in the beginning of a session (lesson, recording, etc...) Of course I'm very interested in collaborating with all input I can possibly offer regarding notation matters. Even through some chat or private messages, if needed. I have also some considerations regarding chord symbol notations. In my case, the ability to customize them is a must, according to the specific situation. I found an "abandoned" software which allows you to customize most symbols by editing a single txt file: Chord definitions

But I guess this could be the subject for another request. Thank you so much!

ArTiSTiX commented 2 years ago

@lgmusic OK, those are the perfect figures for me to correctly understand your needs.

I'll work on this asap.

--

Concerning the chords notation, this is mostly choices from https://github.com/tonaljs/tonal library that MIDI Jar depends on. I tweak it a bit, for displaying purpose and fixing some incoherences (like some chords being formatted as 'M6' while others where 'maj7'...).

Its dictionnary is kinda incomplete i think, i personally noticed a missing maj11 chord, and a lot of chords were not named. My knowledge of music is too limited to suggest changes atm (this is why i developed MIDI Jar, to learn).

You can find the dictionary here: https://github.com/tonaljs/tonal/blob/main/packages/chord-type/data.ts

As you can see, some chords have aliases, but there is no consistency in the order of the alias, so i cannot for instance choose to display all chords with +/-/Δ/°. But ideally i would like to allow choosing its preferred notation (displaying either maj9 or Δ9).

I'm thinking about improving tonal, but i'm focusing on new features in MIDI Jar first.

lgmusic commented 2 years ago

ArTiSTiX, thanks again. Chord naming is a complex and subjective matter. it involves a lot of inconsistent and sometimes discordant theories, and each chord in each composition should be a particular case, subject to many considerations and variables. Many chords are ambivalent in the context of the tonality. That's one of those things that differentiate art from science. Also, different countries name them differently. My country, Brazil, for instance, has a peculiar way to write chord symbols, which I like, but I ended up adopting the North-American way to make it more accessible to different people, and also not to struggle with notation software. But even in US there are many variations (maj7, Ma7, Δ, as you exemplified) and sometimes lots of misconceptions. I think that available programs still have a long way to develop in that sense (Chordie and Midiculous, for instance), and should maybe offer more customization. Sometimes all those aliases make it too confusing. Sometimes it's nice to have them, though. Being able to select when to show aliases, or sometimes not even showing certain chords at all would be a cool feature. If you are dealing with more basic harmony, for instance, you wouldn't want all those complex symbols appearing and confusing a student. Besides that there's the issue of enharmonics: both programs I mentioned display an E Major chord 1st inversion as E/Ab, so they are not yet able to tell that a Major Third in the bass should always be spelled as a Major Third, not as a Diminished Fourth. In short, I'm just saying that there's still a lot to develop in this area, and it would be a great improvement in music learning tools. I really appreciate your efforts and availability, Rémi. Keep up your great work! (Nice turntable and LP collection in your virtual music room, btw ;D)

ArTiSTiX commented 2 years ago

Hello @lgmusic

Sorry i took my time to release this feature.

You can now change staff transposition and choose the clef. I didn't want to do it specifically for guitar, so you can transpose by any semitones.

Note: only notes that can be transposed to a midi note will be written, it was easier for me to implement it that way. So if you play a C2 and transpose -4 octaves, you won't get any notes.

Also, i tried to do my best to position the staves so that the whole range of a piano can still be rendered, but this is prone to some overflowing. If this is an issue, don't hesitate to create an issue specifically for usecases where it happens, i would like to not create a bigger rendering surface for the staff notation, it will make the layout too complex to handle.