I am trying to implement transposing instrument import of capella files. I think I almost finished with that (I will soon submit a PR), but I found something strange in the tpc implementation. The capella import is using function "setTpcFromPitch" to set tpc1 and tpc2, but I found that this function in some corner cases gives a "wrong" value for tpc2. This can be seen also when inserting a grace note, which uses the same function to evaluate tpcs. Example: - score for F Horn with written key signature Db major (actual key signature Gb major) - create a natural E in the fourth space [i.e. type E (possible ctrl+up/down to correct the octave) and then up arrow]. Its parameters, as shown in the debugger are: pitch: 69 epitch: 76 tpc1: 17 tpc2: 18 line: 1 - Exit note-edit mode, select the natural E and double-click "acciaccatura". Here is the strange behavior: we would expect a natural E acciaccatura, but we obtain a flat F acciaccatura. Its parameters, from the debugger, are: pitch: 69 epitch: 76 tpc1: 17 tpc2: 6 line: 0 Now, if you play with up and down arrow a few times, you obtain natural E with parameters: pitch: 69 epitch: 76 tpc1: 17 tpc2: 18 line: 1 and flat F with parameters: pitch: 69 epitch: 76 tpc1: 5 tpc2: 6 line: 0 As you can see, the result from "setTpcFromPitch" is different. Is it a bug of that fuction or am I missing the behavior of tpcs? Moreover, should the "key" be transposed in one of the call to "pitch2tpc" inside the "setTpcFromPitch" function (the first one, with " - transposition()" probably)? By the way, what do these parameters (tpc1 and tpc2) represent? I understood that they are related to transposition and note spelling, but I can't understand the fine details.
Thank you very much for your help. Ciao, ABL -- View this message in context: http://dev-list.musescore.org/TPC1-TPC2-tp7579075.html Sent from the MuseScore Developer mailing list archive at Nabble.com. ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Mscore-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mscore-developer
