musescore-xen-tuner icon indicating copy to clipboard operation
musescore-xen-tuner copied to clipboard

Musescore 4 problems

Open ethernetsellout opened this issue 2 years ago • 13 comments

Error after running MS4 w/ xen-tuner: musescore-xen-tuner-master/xen tuner.qml:247: ReferenceError: Ms is not defined The line of code: Fns.init(Accidental, NoteType, SymId, Element, Ms, fileIO, Qt.resolvedUrl("."), curScore); It seems that Ms is only used in this function to access Ms.CHORD. Other MS4 plugins use Element.CHORD. Indeed, after replacing Ms with Element, the plugin & keyboard shortcuts seem to work, but there's a couple issues:

  • No GUI
  • Moving notes up and down works, but it keeps attaching natural symbols to the note over and over again.

Logs before and after making that change: before.log after.log

ethernetsellout avatar Feb 20 '23 07:02 ethernetsellout

Thanks for helping me test it on MS4. Sadly, the logs in MS4 doesn't contain log outputs created by the plugin itself, so it's hard to figure out what is going on, so I can only fix it by guessing.

Apart from the Ms.CHORD issue you've mentioned, I'm trying out these changes:

  • Use pluginType: 'dialog' instead of 'dock': I'm guessing dock type plugins are broken in MS4.
  • Use AccidentalType instead of Accidental when in MS4: I'm following Enum names based off plugins/api/apitypes.h

Do let me know if it works for MS 4

euwbah avatar Feb 20 '23 17:02 euwbah

Now the GUI is appearing, but changing to AccidentalType is causing reference errors. Nothing aside from the GUI is working.

Also unfortunately there appears to be no way to access the plugin logs, I tried running MuseScore 4 via the command line & they removed the 'plugin script debugger' option.

MuseScore_230220_133941.log

ethernetsellout avatar Feb 20 '23 21:02 ethernetsellout

Thanks. I've changed some things, could you help me try again?

euwbah avatar Feb 21 '23 09:02 euwbah

There were errors where it was trying to open C:/Program Files/MuseScore 4//plugins/musescore-xen-tuner-master/Xen Tuner/tunings/default.txt even though the tunings folder is in musescore-xen-tuner-master. I moved it there, and moving up and down works again with major issues:

ethernetsellout avatar Feb 21 '23 21:02 ethernetsellout

I've just pushed the fixes regarding the incorrect file path, though I still can't figure out what is causing the extra natural accidentals.

Are the natural symbols Accidentals or Symbols? (An accidental will have the 'Accidental' section named in the inspector).

Do the extra natural accidentals only occur on notes without accidentals, or do all notes have an extra natural accidental attached?

What happens when you press up/down? Could you try again after clearing the tuning cache?

Could you do a screen recording of the behaviour you're describing?

Thanks!

euwbah avatar Feb 22 '23 08:02 euwbah

Sure.

I cleared the tuning cache before this video.

https://user-images.githubusercontent.com/70680796/220572488-76194417-2895-49b7-9cc7-55fae202a86a.mp4

ethernetsellout avatar Feb 22 '23 09:02 ethernetsellout

Ah i see... this is looking bad, and very difficult to debug without the proper log output. Judging from the video, the issue happens somewhere between the attaching of the new accidentals and the removal of unnecessary/extra accidentals, probably due to something being deprecated/renamed in MS4 api.

Just double checking - did you clear the original up/down shortcuts? Remove MuseScore default shortcuts

euwbah avatar Feb 22 '23 09:02 euwbah

Yes I cleared the up/down shortcuts

ethernetsellout avatar Feb 22 '23 09:02 ethernetsellout

I've managed to compile MS 4.1.0-dev from source and got it running on my system. I'll figure out a way to get the plugin working using 4.1 :)

euwbah avatar Feb 22 '23 11:02 euwbah

hopefully you'll get it working

defaultuserQ avatar Sep 25 '23 12:09 defaultuserQ

@euwbah I commented about the problem on "retuning doesn't work on notes with microntonal accidentals" in another issue page, and I found the reason for it. After thinking it through, I think this issue page is more suitable for discussing this, since it's a MS4 related problem in general.

Basically MS4 supports microtonal accidental playback, but it's under 24edo assumption. https://github.com/musescore/MuseScore/issues/21391#issuecomment-1935257968 So if I want to retune these notes to 31 edo with this plugin, it will fail miserably. Until MS actually support the various tuning systems (which would be a distant future), we need to first counter the 24 edo assumed playback, before adding the tuning values on top.

TL;DR: Basically the same tuning cent values in MS3 are now "incorrect" in MS4.

EaryChow avatar Feb 09 '24 09:02 EaryChow

For people looking for a temp solution before the author here fixes things.

Use the pitch up/down plugin from this old repo here (since the up and down pitch in this new plugin doesn't seem to work for me): https://github.com/euwbah/musescore-microtonal-edo-plugin/tree/v4-dev

And use Keenan Pepper's tuning plugin from here: https://github.com/keenanpepper/musescore-xentuner

Only problem is Keenan Pepper's tuning pluggin doesn't have many tuning files in there. It works for me trying to do 31edo though. The ones in KP's seem to have compensated for MS4's 24edo assumption already.

EaryChow avatar Feb 22 '24 14:02 EaryChow

I tried to use this with latest MuseScore Studio 4.4.1 and what I got was only unnamed plugins that won't run. I would love to have this working with MuseScore 4. Until then, I'm stuck on MuseScore 3.

EDIT: I'm going to try 4.3, the 4.4 broke plugins and they need updating. I hope this can get updated to Qt6 for compatibility (or make a version for that or whatever is appropriate). See https://musescore.org/en/node/367897 and https://musescore.org/en/node/337468

UPDATE: I was able to see the name in 4.3 but when I run "Start Xen Tuner" nothing happens. I see no indication it is running, and pitch-up and pitch-down aren't working.

So, it looks like this needs both the Qt6 updates and other changes to be MS4 compatible.

FWIW, Keenan's plugin is no solution for me, I care about the notation flexibility not just playback.

I'm happy to keep testing and helping as I can.

wolftune avatar Sep 11 '24 17:09 wolftune