Five songs for testing transposition logic#1
Conversation
|
Hi Eric.. There are a few issues to work thru. Or questions.
Nothing looks to be a deal-breaker. Also, I just did some upgrades to the transpose script, now renamed lytranspose. |
|
Hi Harry, this is what I did this afternoon: If the Bb chart is in G, the C chart is in F. Is that the correct target key for these tunes?
There is a ly command that can transpose. ly "transpose c d" .ly -o '-transposed.ly' will do a folder full. My script uses a regex for that but maybe it would be cleaner to use ly? I could use that to start with a set of C charts and not have to fiddle with my script.
We have different versions of lilypond \version "2.18.0" vs 2.24.0.
We have the \transpose directive in different places. My script puts in in \score. That seems to work except in Shades of Folk. No idea why.
I've been labeling the instruments instrument = "Violin" on the C charts which becomes Bf, Ef or Bass in the transposed.
Nothing looks to be a deal-breaker. Also, I just did some upgrades to the transpose script, now renamed lytranspose.
|
|
My preference would be to convert everything to \relative which is not hard to do. Frescobaldi and the ly command can convert absolute to relative or the ly script can batch process so if you have a lot of those it would be a lot faster. There is a help page for how to use the lilypond helper scripts on mac. Or I can run it here. Or we can try your regex with an if (m/\relative/).{... .} Relative melodies have a \relative directive so it would be easy to distinguish from an absolute. For that matter, the script should be able to call the ly script if it detects an absolute chart, which would make it more universal. I have been shifting things down an octave for horn. Seems to more or less work. |
|
Turns out I can work with absolute notation, but in my one test (Your Shuster tune) relative gave a better result, at least on the Eb. You can see that on klezmer.app. There are 2 versions, Shuster.... and Shuster.... -relative. I added a block of code to detect absolute charts. Right now it does nothing but if it works I should be able to automatically convert to relative. I hadn't figured out yet how to always have the transpositions always land on a good part of the staff. Also if you are working with the app (are you)?, I had a lot of bugs to clean up. The fixed up version is up here now. |
|
That works (see Klezapp) pretty well. I had to fix position on clef for the bass part. (Relative makes that much easier... With one \music section If I can figure out a way to keep the transcriptions in the right place on the staff it won't matter. Open to ideas. |
|
I've made some progress on the Goldilocks octave problem. Lily has \displayMusic \myMusic and \displayLilyMusic \myMusic directives which output the notes in either a list with octave and note data or just a list of absolute notes. It works the same for absolute or relative notation. ly2midi.pl converts the \displaymusic list to midi and tries to determine if the transposition should go up down, or stay put. That part needs more work, but it's a start. Eventually I should be able to figure out a workable system without too many extra steps. |
Hi Harry, here are 5 songs to add to your library and test the transposition logic.
For Lerner's Freylach I added the rehearsal letters. If you look in klezmer.app not all parts currently have them.
The C part for the Kroilid song was generated from a Bb part by transposing it in Lilypond because it came from a Bb book.
Some of the other songs transpose up an octave because the note data was recorded too low.
Let me know any feedback about how you want these files created going forward.
Thanks, Eric