ninjakiwi @STEPHANVS
I don't think it really matters which way chords are stored in the database. The important thing is that the user sees the correct chord on the display.
The beta currently doesn't store a key for the song... We need to know the key to display the correct chord notation.
The beta has two transpose functions built in. There is one written in python which is used to transpose all the chords in the editor, and one written in javascript used on the stage view.
As for what needs implementing over what's already built-in:
Add interface to let the user specify the key for a song (in the song editor). We can save the key in the "key" attribute in the OpenLyrics format.Add the song key to the http api (so the stage view knows what key a song is in)Program/copy your chord formatting stuff to the javascript stage view so it runs after chords are transposed.There are multiple chord notations that OpenLP supports. I've only ever used english, but you seem to use a different one (you have "H"...), and there's another couple of "weird" ones. I'm not sure if they have the same sharp/flat/neutral overlap, but it's something to keep in mind.
-- Note about how lyrics are stored --
A basic overview of how lyrics are handled:
ChordPro-ish <-> OpenLyrics (xml) -> Stage view (json)
OpenLyrics is the stored format, it's converted to the chordpro-ish format for editing inside OpenLP and saved back to the OpenLyrics format. For stage views it's sent via the api as json (see format here).
@ninjakiwi I totally agree with having the correct chord on display is what matters the most.
I would suggest having only one transposing motor. I don't know if python is capable of executing javascript functions, if it can, the js code could be used in both instances as requesting the already transposed chord view would put load on OpenLP unnecessarily.
ChordPro already supports inline keychange, see here. As it turns out, OpenLyrics - being xml - would prefer an area based property, even though linearity would depend on the interpreting client. Discussion is already ongoing.
OpenLP might handle/export the songs in OpenLyrics in memory, but it does not store them in pure OpenLyrics. If it would, song storage would be possible on a file level (along with theme, media would to be stored in a zip), imagine an .openlpsong or .olps format, that could be copied, shared, synced(!) along a PowerPoint-like databaseless OpenLP!