"MuseScore" version 1.0 is not installed

• Apr 28, 2018 - 12:32

I have a small question. I start MuseSore with QT run, but if I open the Plugin menu there was the list of plugins like helloqml but I can´t open this plugin. Into the QT console was written . So my question I have to install something that this works?
Also, I create a own Plugin as a QML file, there I use :
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.3
import QtQuick.Window 2.2
import Qt.labs.folderlistmodel 2.1
import Qt.labs.settings 1.0
import MuseScore 1.0
import FileIO 1.0

Also for my Plugin the error MuseScore" version 1.0 is not installed came.

Attachment Size
constoloutput.txt 1.05 KB

Comments

In reply to by Jojo-Schmitz

Yes, I use the master branch, and with import MuseScore 3.0, and import FileIO 3.0 it works. Another question on my plugin a make the function to apply a selected note/tact. But there the error TypeError: Cannot read property 'length' of undefined. The File there is the function that I found by other Plugins developers, that access to the selected notes to change there the note's content or add something.
Do I have an external lib important so that he knows what length and the other commands are?.

Attachment Size
applyToNotesInSelection(func).txt 1.83 KB

In reply to by Sam009

The master branch is for people doing development on MuseScore itself. If you aren't developing MuseScore but instead are wanting to use it - including for the purpose of writing plugins - then you should be using the released version of MuseScore (2.2.1) rather than building it yourself.

In reply to by Marc Sabatella

I have now downloaded the 2.2.1 version, also there I have change by system environment '; the Path line, there I give the new Path to:
C:\Qt\5.9.3\mingw53_32\bin
C:\Qt\Tools\mingw530_32\bin
C:\Qt\Tools\mingw530_32\lib
C:\Qt\Tools\QtCreator\bin
C:\Program Files\CMake\cmake-3.10.3-win32-x86\bin
C:\Program Files\Jack
But now comes the Error "resfile.o Error" after 50% of build. On the site https://musescore.org/en/handbook/developers-handbook/compilation/compi…

1.Close QtCreator
2.Go to MuseScore repo
3.mingw32-make.exe -f Makefile.mingw debug
4.mingw32-make.exe -f Makefile.mingw installdebug
5.Open Qt creator and debug MuseScore

There is an explanation how to fix it, but I do not know what with the point 2,3 and 4 on it or how it goes? How to find the directory MuseScore repo?
Came the problem since I have also the master version?

In reply to by Sam009

There is no need to compile 2.2.1 yourself! Not if the only thing you want to do is to develop plugins.

But if you really want to, you'd need Qt 5.4 and the mingw 4.9.1 toolchain (and maybe better take the 2.3 branch)
Musecore repo is wherever you did put the sources from the git branch

In reply to by Jojo-Schmitz

I need the source code since I will make new tags that has the possibility to store String data on xml for a note. For example the name of the note and his sign. And also a must make a network connection to show some Picture or text. Since I must create a learning plugin tool.
If I use Qt 5.4 and the mingw 4.9.1 toolchain (and maybe better take the 2.3 branch) then the error resfile.o Error will solve?

In reply to by Sam009

If you could better explain what functionality you wish to achieve with your tool, we might be able to better advise you.
There should generally be no need at all to include the name of the note in xml at all, as it contains the actual MIDI pitch already, which holds both the base notename and octave information.
If your goal is to export a new XML format, then maybe, extra things will need exposure into the plugin framework; but in that case you might be better/easier off with simply maintaining your own branch/version of MuseScore that has your new format export included.

In reply to by jeetee

It is a kind of plugin, where the teacher can select a measure and say that it is a Do Majeur scale or Accord. This get store on the score file. (this is hiden only it can be seen by open the plugin interface)
Then the students can do the tasks with the notes of the teacher. When the students click the tact/ note and open the plugin, they will see an example of what this looks like, how it's being used, and an interent link to the Viedos.
That's why I have to add the new tags where you can annotate the note name, the sign, key, interval, but also theory name to the note.
That's why I have to put in the source code to create the new tags there.
Or is there a way to call the notes name, sign, key, theory. Or to store some string/text elemtents?

I have the design but the functionality don´t work.

Attachment Size
LearningTool.png 72.19 KB

In reply to by Sam009

Have a look at the code for https://musescore.org/en/project/add-comments-score. Using (set)metaTag you can store a string into the Score Properties.
In your case I would go then for a JSON-string of a list of measures/elements and their associated information. This allows you to create your own javascript/qml-based structures for the annotation information to use in your plugin without the need to change anything about MuseScore itself; as a bonus your plugin should work across all existing MuseScore 2.x versions.

In reply to by jeetee

Thanks I´m looking over this plugin.
Then I can save a Jason string with setMetaTag?
Can it then also make note.setMetaTag so that it is stored on the note / bar/tact. ?
As you can see on the picture"LearningTool.png", the teacher can select the texts with combobox and this should be saved.
Which one can call later. Can I then call the individual elements, into a Jason string. so if I am
notename: Do, Sign: #; Type: Majeur.Then I can call the element notename in the qml code, like note.color where you get the color back?

The idea is that the string is store on one tact/ note and not on the whole score. Since the teacher can select more tacts to store the information, by the combobox. Then a new function will use this elements to put the correct information into the windows/menu of Example, Video and Theory. (on the picture the three categorie)

In reply to by Sam009

metaTags is score only; which is why I indicated you should store a reference to the element as well. But that shouldn't be an issue at all, because you can make the property a JSON-string of one javascript-object that holds all of the teachers notes.

You're starting with quite a big project here, so put some thought into how you're going to structure your information, which kind of information you'd like. Then figure out how to find each of those information elements and see what/if there is anything missing. Do feel free to ask more questions about where to find some items, but don't be afraid to look into source code of other plugins or simply try some stuff out as well.
At least have a look at the notenames plugin for info on how to detect the name of a note.

Also note that we don't provide Qt5Multimedia as part of the MuseScore installation, so showing video's in MuseScore directly isn't supported. You might get somewhere if you distribute that library as part of your plugin though (be aware to distribute it windows, linux and Mac then), but I don't know how much (if any) of that is available to QML.

In reply to by jeetee

Thanks for the help, Unfortunately I'm not an expert :( That's why I'm grateful for the help. I'm sorry if I ask too many questions.
The information I want to save is:
1. The name of the note: Do ....
2.If there is an interval, how is he a prime ... etc ..
3.The key, therefore, op Majeure or mineure
4. sign # ...
5. Theory like decresendo ...
6. The rhythm
7. URL´s if needed
But for 5, 6 and 7 it is possible to make only a string.

In the code how to create a Jason string since inside the code he make:
Component.onCompleted : {
if (curScore) {
var metrics = settings.metrics;
if (metrics) {
metrics = JSON.parse(metrics);
window.x = metrics.x;
window.y = metrics.y;
window.width = metrics.width;
window.height = metrics.height;
}
}
}
}
onClosing : {
if (curScore) {
var metrics = {
x : window.x,
y : window.y,
width : window.width,
height : window.height
}
curScore.setMetaTag("comments", abcText.text)
settings.metrics = JSON.stringify(metrics);
}
Qt.quit()
}

there i must make
var metrics = settings.metrics;
if (metrics) {
metrics = JSON.parse(metrics);
and
curScore.setMetaTag("comments", abcText.text)
settings.metrics = JSON.stringify(metrics);

In reply to by Sam009

Don't worry about asking questions. I find this an interesting project and approach; it's merely (for me personally at least) that I don't have the time available to fully guide and train you into how to program as well. It is quite an ambitious project, which definitely can work, but will be hard(er) without previous programming knowledge.

I referred to the other plugin only to show you that it is possible to store text (a string) into a score without the need to alter MuseScore. Then I made the link to JSON which is a way to turn any self-made javascript object into a string (thus making it possible to save it within a score using the method mentioned before).
QML allows you to write your own javascript functions and objects directly into the QML-sourcefile.
If you wish to learn more about javascript I've found https://developer.mozilla.org/en-US/docs/Web/JavaScript to be quite a good place to start. The language is rather web-oriented, and those parts then aren't always available in QML. But the generic use of functions and variables is the same.

As for the information you're looking for, given what I've currently understood about your needs:

  1. Store the tick and track of the element your note applies to (or even start-tick and end-tick for regions)
    Each segment (parent of chord, parent of note) is at a given time-position in the score (= the tick) and at a given voice of a given staff of a given instrument (= the track). Keeping track of those two items in your plugin will ensure you can always find the correct element back as long as they aren't moved (timewise) or deleted.

1. The name of the note: Do …
Doesn't have to be stored, can be deducted from its tpc (tonal pitch class) value. See the notenames plugin.

2. If there is an interval, how is he a prime… etc…
Are we talking about an interval between two consecutive notes? Or between two notes of a single chord?
Either way, its not required to store this into your own metadata, as you can get this information mostly by taking the difference between the tpc of the first note and the tpc of the second.

3.The key, therefore, op Majeure or mineure
Here musescore currently doesn't make any difference; It'll have to be provided by your 'teacher' and thus be a part of the information you store into your data.

4. sign # ...
I believe these to can be read as a property from the note, but I don't know from the top of my head how. If this is the only thing still holding you back, then I'll dive into the documentation to try and find out how it worked.

*5. Theory like decresendo… *
Theory is "just" text. It'll have to be entered by the teacher into an input field of your plugin, which you'll then of course will have to save as part of your datastructure

6. The rhythm
Each note has a 'length' property in ticks (1/4th note = 480 ticks). The only time that this length value doesn't give you the 'real' duration of a note is when it is part of a tuplet; there it'll reflect the notational duration of the note.
You might be able to detect it being part of a tuplet as I would expect the tick of the next ChordRest to not equal (current tick + length); but this is just me guessing.

7. URL´s if needed
Just plain text again, so you'll have to make sure these are stored as part of your data.

If I remember correctly, QML has a richtext element, which might support urls to become actual hyperlinks.

In reply to by jeetee

Yes it is an interesting project and also complicated :)
I think I will create several json array strings for each of the category one , then this will show up later the url,text imside the gray parts on the picture. The five category are "Add Accord" , "Add Gamme/scale", "Add Intervall" , "Add Ryhtmus" and "Add Theory" on the picture the small button. This button open new elements where the teacher select the content for this selected tact/note.
Inside the different Jason Arrays i make the content for a Accord. this was the name of a note, his sign (#) and which type (majeur, mineure)
Then after this I will store this Jason array on the note/tact. Is this possible to store such an array on the note / tact? by calling a function like color ().
Then, if this works I will call this Jason array string to put the content in the 3 categories (on the picture the blue title) from the plugin interface, when the user select the note/tact.

I think it's better to save everything in a JsonArray and call it later and show it in the plugin interface.
Since most of the text should be text you can save everything in a Jascon array.

Can / Should I upload the qml file during the progress? So that one can look over it in an emergency?

< 2. If there is an interval, how is he a prime… etc…
Are we talking about an interval between two consecutive notes? Or between two notes of a single chord?
Either way, its not required to store this into your own metadata, as you can get this information mostly by taking the difference between the tpc of the first note and the tpc of the second. >
Yes I mean the distance between two note example from Do to Fa is Second mineure.

3 to 7 must be a text form since this was a text or is not define into the code. so this i make as a JsonArray.

Or "better" to store on one tact one Jason string(and so it is not "important" to store a json array) Give it a function that has the possiblity to store a text/string on a note /tact? So it is "easyer" to get directly the corect information for a tact. So that this can show into the Plugin interface.

Attachment Size
LearningTool.png 72.19 KB

In reply to by Sam009

Again: you can't save metadata on a specific note as a method of that note; but that doesn't matter as you can save the tick and track of the note, see point 0 above.

The way you write about strings and arrays and JSON (no a there :) ) does however indicate that you still have a lot to catch up on plain JavaScript. Take your motivation and learn the basics of what you need, it'll save you a lot of frustration in the long run.

You're free to attach/share your qml file whenever you deem fit/want to. Just be aware that, because it is a big undertaking, it just might be that currently noone has the time to thoroughly help/walk you through it.

In reply to by jeetee

OK with i get the value of the note note.tpc, I means also if it is Do## or Do bb. (I´m not sure about this.)

But I don´t understand what you mean by " 7.just plain text again, so you'll have to make sure these are stored as part of your data." also for 5 .
where should I save this, because it is not possible to save this on a note. Or how you mean this.
Inside another Plugin I find this :
nhText = String.fromCharCode(code);
noteHead = newElement(Element.STAFF_TEXT);
noteHead.text = ""+nhText;
noteHead.userOff = Qt.point(0,0);
noteHead.pos = Qt.point(note.pos.x + wholeXOffset, note.pos.y + yOffset);
noteHead.color = noteHeadColor;
if (note.line < 10 && note.line > -2) {
note.visible = onStaffVisible;
}
else {
note.visible = offStaffVisible;
}
note.color = bgColor;
cursor.add(noteHead);
This plugin will save the notenames but i don´t understand what he make with noteHead = newElement(Element.STAFF_TEXT); and cursor.add(noteHead);
Is this a possibility to do?

Is it possible to send the code privately in an email, because I do not want to publish it yet.

In reply to by Sam009

OK with i get the value of the note note.tpc, I means also if it is Do## or Do bb. (I´m not sure about this.)
Neither am I, try it out and find out :)

where should I save this, because it is not possible to save this on a note.
Again: you should store this in your own data javascript-object (probably key->value based), which could very well hold the tick and track of the element the text applies to. And your custom object can be made into a string using JSON. This string can then be stored as a metaTag on the score

This plugin will save the notenames but i don´t understand what he make with […code…]
Then you should dive into learning how to read the built-in object documentation of the plugin creator. That plugin doesn't save the noteheads; it creates a staff text attached to each notehead and inserts it into the score; something you (very likely) will not want to do, as you don't want to change the actual score, but show the notes for it in your plugin.

Is it possible to send the code privately in an email, because I do not want to publish it yet.
Yes it is possible to send me the code privately, but as I've stated about two posts ago: I find this an interesting project and approach; it's merely (for me personally at least) that I don't have the time available to fully guide and train you into how to program as well. Which our conversation is definitely heading to…

In reply to by Jojo-Schmitz

I install the Qt 5.4 and the mingw 4.9.1 toolchain (and maybe better take the 2.3 branch), but the error resfile.o will came back. How I can fiy this?
And how i make this:
3.mingw32-make.exe -f Makefile.mingw debug
4.mingw32-make.exe -f Makefile.mingw installdebug
Inside the folder C:\Users\sam\MuseScore-2.3 that i dowload from git?

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