-
Hi, In my use case, I would need to call for every note ID the toolkit method
Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
These functions are all meant to be as generic as possible. As a result, more than one call might be needed. Adding more data could be possible, but the problem is that your problem need this, but the next project will need that, and so on. However, you do not necessarily need to use the toolkit method to retrieve element attributes one by one. You can get them from the MEI data directly. If you are loading another format into Verovio, you can use |
Beta Was this translation helpful? Give feedback.
-
Thanks. I just checked and it is working to get the same data using mei. However, I wonder whether it make sense to provide a mass enabled function of getElementAttr? Therefore, something like this: string s = toolkit.getElementsAttr("xmlId1,xmlId2,xmlId3"); which returns a json like this: {
"xmlId1": {
"dur": "4",
"dur.ppq": "1",
"oct": "4",
"pname": "f"
},
"xmlId2": {
"dur": "4",
"dur.ppq": "1",
"oct": "4",
"pname": "f"
},
} |
Beta Was this translation helpful? Give feedback.
These functions are all meant to be as generic as possible. As a result, more than one call might be needed. Adding more data could be possible, but the problem is that your problem need this, but the next project will need that, and so on.
However, you do not necessarily need to use the toolkit method to retrieve element attributes one by one. You can get them from the MEI data directly. If you are loading another format into Verovio, you can use
getMEI
to obtain it in one go. That would be quite similar to have then in the timemap.