Access to copy content
Hello,
If you copy a selection in one score, can you access this selection from within a plugin in another score?
Thanks,
Luc.
Hello,
If you copy a selection in one score, can you access this selection from within a plugin in another score?
Thanks,
Luc.
Do you still have an unanswered question? Please log in first to post your question.
Comments
Duplicate of https://musescore.org/en/project/access-copy-content
In reply to Duplicate of https:/… by Jojo-Schmitz
Hi Jojo,
Yes and no, when searching previous posts, I landed on the plugin page and misread 'add plugin' with 'add topic'. So I created a project instead of a forum post. That was not my intention, and you can't reply to it. However, I don't see an option to remove the project. This forum topic should remain.
Thanks,
Luc.
In reply to Hi Jojo, Yes and no, when… by lucvdv
I see, I need to read properly ;-)
Yes you can: copy something in one score, focus on another score and run
curScore.startCmd()
cmd("paste")
curScore.endCmd()
I attach commands.txt, i.e. everything you can 'try' in the cmd statement
commands.txt
EDIT In MU3 there is also cmd("next-score"); but I doubt this will work in MU4
(and next-score keeps going: back to the first score if you don't stop it.)
In reply to Yes you can: copy something… by elsewhere
Thanks, elsewhere. That commands.txt file is really useful.
However, I wasn't looking to paste the copied content, though. I just want to look at the measures, notes, ... in the part that is copied, so have access to the copied content like you have to a score with curScore. Perhaps the structure is different making this impossible.
Thanks,
Luc.
In reply to Thanks, elsewhere. That… by lucvdv
You can read 'any' file from a plugin, but that won't tell you about the selection
var test = testFile.read();
console.log(test); // will print the file content
Is that what you want?
To parse the file you could look at my plugin
https://musescore.org/en/project/musicxml-parser
as a basis. Feel free to modify it to suit your needs