Serializer

• Jan 29, 2021 - 17:59

Hello,

the "serializer" plugin doesn't seem to work.

https://musescore.org/en/project/music-serializer

I select a melody, then I start the plugin but nothing happens.
I use MuseScore 3.6.1, Qt5 on Ubuntu 18.04.
What can this be due to?

Thanks,
m.


Comments

In reply to by Jojo-Schmitz

90:-1: TypeError: Property 'includes' of object 0,1,2,3,4,5,6,7,8,9,10,11 is not a function
90:-1: TypeError: Property 'includes' of object 0,1,2,3,4,5,6,7,8,9,10,11 is not a function
90:-1: TypeError: Property 'includes' of object 0,1,2,3,4,5,6,7,8,9,10,11 is not a function
Warning: file:///home/Documents/MuseScore3/Plugin/serializer_2.qml:90: TypeError: Property 'includes' of object 0,1,2,3,4,5,6,7,8,9,10,11 is not a function

In reply to by Jojo-Schmitz

Hello,

the code at line 90 is this:

if (note_list.includes(note.pitch%12)){

I downloaded Serializer plugin from here:

https://musescore.org/en/project/music-serializer

The downloaded file is called: serializer_2.qml (and not serializer.qml).
Again i tried to reload it into the plugin editor, run it , but always gives me the same errors:

90:-1: TypeError: Property 'includes' of object 0,1,2,3,4,5,6,7,8,9,10,11 is not a function
Warning: file:///home/Documents/MuseScore3/Plugin/serializer_2.qml:90: TypeError: Property 'includes' of object 0,1,2,3,4,5,6,7,8,9,10,11 is not a function

Thanks,
m.

In reply to by Jojo-Schmitz

Experiment with chatgpt:

The error message you provided indicates that there is an issue with the line of code that uses the includes function on the array object. The error occurs because the includes function is not available on a string that represents an array like "0,1,2,3,4,5,6,7,8,9,10,11". To fix this, you need to convert this string into an actual array.
Replace the following line of code:
if (note_list.includes(note.pitch%12)){
with:
if (note_list.indexOf(note.pitch % 12) !== -1) {
Explanation: The indexOf function returns the index of the specified element in the array, or -1 if the element is not found. This effectively achieves the same check as the includes function in this context.

It actually works .. (MS3)

Attachment Size
serializer.qml 10.98 KB

In reply to by graffesmusic

I've tried the revised plugins for MS 3 and 4 with no success. I've enabled the plugin from the menu, pull up the score, select the 12 notes in the range (one staff only), and nothing happens? How do you actually run the tool on the score? Hit enter?

Note: On very first try in MS 4, a window did pop up to set the pivot note (default is C), but that window didn't pop up on all subsequent tries, despite closing the program and reloading the plugins several times. It's like it's corrupting itself after loading it?

Can you provide step by step instructions? The demo picture shows the notes colored after they're serialized, but I see no instructions about how to actually run the tool.I do appreciate all your efforts and prompt responses!

Attachment Size
Step 1.pdf 177.71 KB
step 2.pdf 155.67 KB

In reply to by artoffugue333

The demo picture https://musescore.org/en/project/music-serializer
shows on the first line the original notes, and on the second line the output of the plugin (that would be 'serialized').
This is exactly what this plugin does.
I don't see any popup code in the plugin. There is no coloring.
Description of the plugin:
This plugin takes the notes of a melody and turns them into a tone row. It "serializes" the first twelve notes of the piece and then repeats that tone row throughout the rest of the piece.
(i am not the author of this plugin, nor have i any interest in serialized music - i just made it working - as is - for ms4)

In reply to by graffesmusic

Clarification: serializer.qml does NOT work for MS 3 or MS 4. But serializer_MS4.qml works for both. I was confused about what works for MS 3 because of the filename. I suggest the filename for serializer_MS4.qml be changed to drop _MS4 because it may confuse other dummies like me (I'm probably the only dummy, though;)
Thanks to everyone who worked on this. I really appreciate it!

Attachment Size
serializer_MS4.qml 11.25 KB
serializer.qml 10.88 KB

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