Posts: 1,877
Threads: 290
Joined: Sep 2014
Reputation:
32
When I import a new text or ChordPro file without any hint for a key MSP automatically sets "Keys" to "C". "Keys" should be empty (meaning "not specified") as it is the case for PDFs.
Posts: 13,363
Threads: 301
Joined: Apr 2012
Reputation:
235
02-04-2017, 05:11 AM
(This post was last modified: 02-04-2017, 05:11 AM by Zubersoft.)
My internal logic for transposing was changed to require a key (instead of potentially storing an invalid flag that meant no key existed). This eliminated a number of errors that were occurring in earlier versions of the software. I'm always going to detect a key using the "Detect Key By" method in the text file settings. It seems like what you are asking for here is a change in behavior. You are saying you don't want the key set in the song unless the key directive is used in the chord pro file to explicitly set a key. This means that a key wouldn't be set when using text files instead of chord pro files. If this is really a big deal for you, then I would need to add a new setting for chord pro files that basically says "Only populate key metadata from key tag" or something along those lines. You could also just turn this off under Text File Settings->Use Text Fields During Song Creation.
If people think it's better not to populate the keys field of the song using the detected starting key, and it's better to require an explicit tag in the file ("Key:" for text files and {key:} for chord pro files), then I can certainly make that change.
Mike
Posts: 1,877
Threads: 290
Joined: Sep 2014
Reputation:
32
Sorry if I was not clear enough. In this thread I'm only talking about filling the meta tag "Keys" when a ChordPro file is imported using "Import - Local File". It's not about the "Starting Key" for transposing.
To import a new ChordPro file I click "Import - Local File" and select the file. The dialog "Import Settings" is displayed.
If I specify "Keys:" - OK, we're done.
If "Keys:" is not specified in "Import Settings" MSP tries to detect the key from the file's content and writes it into "Keys". That's helpful and convenient.
If "Detect Key By" is successful its result is used - OK, fine.
If a "{key:}" tag is found, its content overwrites the result of "Detect Key By" and is used instead - OK, exactly as expected.
What I meant with "without any hint for a key" is the case when the file neither contains a "{key:}" tag nor a "[ ]" chord at all.
In that case the meta tag "Keys" should remain empty and NOT default to "C".
Not an important bug, really.
But I regularly import files containing just lyrics without chords and need to keep the information "key not specified (yet)"
Posts: 13,363
Threads: 301
Joined: Apr 2012
Reputation:
235
Okay, I can add a check that says if 0 chords were detected, then don't populate the song's metadata.