salvador-pena / addMetronomePart

5 stars 2 forks source link

Issues with the plugin plus possible modifications #7

Open MRT-CH opened 4 days ago

MRT-CH commented 4 days ago

I found the following issues with the plugin a) line 37 showd error in MS 3.6 plugin - editor ( typeof(quit)==='undefined' ? Qt.quit : quit )() 37:-1: TypeError: undefined is not a function

b) isMetro ist not supported by MUS 3.6 curScore.parts[idx].isMetro = true

c) the constuct do { ... } }while( c.prev() && c.nextMeasure() ) apparently gets misaligned with meassure boundries. Did not find why in several hours Test score attached in ZIP I tried a different strategy to add notes and test for end-of score. Tested with 3.6.2 and 4.4.3 with several score containing frequent time-sig changes.

Plugin also allows to use special patterns for time-sig like 5/4 and 6/4 or 9/8 qml also attached in ZIP. Feel free to use , modify , share

Background - I use Musescore frequently to generate practise tracks for choirs with voice highlighted. For pop and jazz with lots of off-beats and syncopation the metronom track in the audio helps singers to stay with the beat. br Michael
MetronomTest.ZIP

MRT-CH commented 4 days ago

Now found the cause for measure misalinement

a) this will use an new instance of timesig every time through the loop while the cursor advances for( var i=1; i <= c.measure.timesigActual.numerator; i++ ) { ...

b) always use the same numerator of the timesig when entering the measure
var num = c.measure.timesigActual.numerator for( var i=1; i <= num; i++ ) { ...