custom key signature

• Dec 28, 2011 - 08:21

I was poking around the code and say some custom stuff in key.{h,cpp}. A little googling later, I find musescore has custom key signatures. Very Nice!!

So I tried putting them in. But try as I might I could not manage. If I click 'add' I get the 5 staff lines. If I drag one of the symbols it wont go onto a staff line but stands alone (which is meaningless as a key signature).

So now my add key signature dialog has some newly added nonsense -- some empty staff lines and some sharp-flat etc signs without lines.

Wondered if this is some issue with my hand-compiled 1.1 so tried the system 1.0. In there when I open the keysignature dialog it immediately segfaults :-(


Comments

You should be able to create a key sig by drag and dropping several symbols on the 5 lines. Once done, you can press "Add" to add your new custom key signature to left panel. You can the drag and drop it to your scores.
If you have a 1.1 compiled, don't look back ;)

In reply to by [DELETED] 5

Ok thanks that worked ... kindof except that
1. The key signature does not respect the clef. I made a key signature with only 1 sharp, a G-sharp (not F-sharp as usual)
In the treble clef thats the second line. Putting it in the base clef the line remains the same so it becomes B-sharp!!
2. And it does not play the (new- signature) notes on playback
3. Finally what are all the funny characters (in the make new key signature dialog)? I know sharp and flat etc but there seem to be all kinds of different characters...
4. Is the svn version ahead in this matter?

In reply to by Rusi_

1 - Yes, it's only purely graphical.
2 - Yes. only graphical.
3 - There are quarter tones accidentals for arabic, persian, turkish and contemporary music.
4 - The trunk and the branch are not ahead on this matter AFAIK. The branch will not be changed to support anything new, it's just a maintenance branch. Any help to make it work better in trunk is welcome :)

In reply to by Rusi_

I will talk about the trunk now.

Check mscore/mscore/keyedit.cpp to see how the custom key signature are created.
Check mscore/libmscore/keysig.cpp to see how custom key signature are stored.

Regarding playback, when a keysig is inserted on a given score, a event is added in the keymap of the staff. According to this keymap, accidentals are changed for every note (See Score::updateAccidentals). They keymap is also used when the user insert a note.

In reply to by [DELETED] 5

Well I downloaded the trunk and compiled it.

And I find very strange behavior. The same file opened in 1.1 and 2.0 shows different notes; ie a d# in 1.1 becomes an e-flat in 2.0. Also 2.0's playback is irregular compared to 1.1

The file is attached if you want to try

[Yeah I know this is not germane to m original question. Just that if I poke around in the code I want to do it with working software and currently 1.1 is more working (for me) than 2.0]

Attachment Size
trembling.mscz 4.26 KB

Do you still have an unanswered question? Please log in first to post your question.