04-23-2024, 01:24 AM
I think some ChordPro enhancements are already in progress, so my apologies if this is already amongst them (or covered elsewhere).
Would it be possible to specify an instrument/user type, which then gets used when interpreting conditional directives in ChordPro songs?
Rationale
I currently prepare ChordPro songs that get processed to create PDF songbooks for multiple instruments from the same source songs, so several songs include instrument-specific directives, mostly for tabs or ABC notation. I also import the same ChordPro files into MSP, so I can use features like ad hoc transposition.
Currently, content of conditional directives seem to be treated as song/lyric text, which means the song displays with a) tabs for all instruments and b) tabs in proportional font, rather than monospaced, so they're not very useful!
ABC source code also gets displayed if I've got a {start_of_abc-keyboard} directive. This isn't a request to interpret ABC notation, simply to not display it if the instrument isn't a keyboard.
I know I can get ChordPro to process the original songs and create, say, guitar versions specifically for MSP, but I'd ideally like to be able to use the same body of songs without further modification, so they would still be useful for all instruments, meaning I can switch instrument (and setting) but still use the same tablet and songs.
Possible implementation
It probably needs a global setting for instrument or user type, which could potentially include ChordPro standard instrument names like guitar and ukulele, but it's probably useful to also allow free text, to serve other instruments (e.g. I also provide some ukulele_g tabs, for DGBE tuning), or ad hoc user types.
I don't know if there's any merit in also making it a per-song text file display setting. I can't think of a use case where that might be useful.
MSP would then handle and display directives with a condition that matches that setting, and ignore directives with conditions that don't match it.
I think it might be useful if it's a real-time feature, rather than part of the import process, so the instrument/user can be changed after the songs are in the MSP database. For instance, guitar player lends tablet to ukulele player: it's easy just to change the instrument, and the existing songs make sense for the new instrument.
Ideally, the feature would also recognise negative conditions (! suffix), so something like {start_of_tab-keyboard!} would get displayed if instrument is guitar.
Would it be possible to specify an instrument/user type, which then gets used when interpreting conditional directives in ChordPro songs?
Rationale
I currently prepare ChordPro songs that get processed to create PDF songbooks for multiple instruments from the same source songs, so several songs include instrument-specific directives, mostly for tabs or ABC notation. I also import the same ChordPro files into MSP, so I can use features like ad hoc transposition.
Currently, content of conditional directives seem to be treated as song/lyric text, which means the song displays with a) tabs for all instruments and b) tabs in proportional font, rather than monospaced, so they're not very useful!
ABC source code also gets displayed if I've got a {start_of_abc-keyboard} directive. This isn't a request to interpret ABC notation, simply to not display it if the instrument isn't a keyboard.
I know I can get ChordPro to process the original songs and create, say, guitar versions specifically for MSP, but I'd ideally like to be able to use the same body of songs without further modification, so they would still be useful for all instruments, meaning I can switch instrument (and setting) but still use the same tablet and songs.
Possible implementation
It probably needs a global setting for instrument or user type, which could potentially include ChordPro standard instrument names like guitar and ukulele, but it's probably useful to also allow free text, to serve other instruments (e.g. I also provide some ukulele_g tabs, for DGBE tuning), or ad hoc user types.
I don't know if there's any merit in also making it a per-song text file display setting. I can't think of a use case where that might be useful.
MSP would then handle and display directives with a condition that matches that setting, and ignore directives with conditions that don't match it.
I think it might be useful if it's a real-time feature, rather than part of the import process, so the instrument/user can be changed after the songs are in the MSP database. For instance, guitar player lends tablet to ukulele player: it's easy just to change the instrument, and the existing songs make sense for the new instrument.
Ideally, the feature would also recognise negative conditions (! suffix), so something like {start_of_tab-keyboard!} would get displayed if instrument is guitar.