AaronDavidNewman / Smoosic

A music notation editor written in javascript
Other
98 stars 14 forks source link

Multi Voice; Dynamics #31

Closed rkr1209 closed 3 years ago

rkr1209 commented 3 years ago

reproduce issue:

issue does not appear when adding dynamics to V2 (or lowest voice)

{
 "message": "TypeError: undefined is not an object (evaluating 'this.noteToVexMap[smoNote.attrs.id].getAbsoluteX')",
 "stack": "_renderNoteGlyph@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:12723:46\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:12747:30\nforEach@[native code]\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:12746:20\nforEach@[native code]\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:12742:32\nforEach@[native code]\nrenderDynamics@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:12740:33\nrender@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:13023:28\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:13352:20\nforEach@[native code]\nrenderMeasure@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:13350:30\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:15936:29\nforEach@[native code]\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:15935:25\nforEach@[native code]\n_replaceMeasures@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:15931:26\nrender@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:15963:34\nrender@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:16361:21\nhandleRedrawTimer@https://aarondavidnewman.github.io/Smoosic/release/smoosic.js:16334:18\nhttps://aarondavidnewman.github.io/Smoosic/release/smoosic.js:16351:26",
 "lastOperation": "add dynamic",
 "scoreString": "Could not serialize score. undefined is not an object (evaluating 'this.score.serialize')"
}
AaronDavidNewman commented 3 years ago

confirmed, thanks. I am in the midst of some heavy text-related edits right now and will fix it when I am in a position to commit them.

AaronDavidNewman commented 3 years ago

rkr1209 this should be fixed, please confirm when you have a chance. Thanks!

rkr1209 commented 3 years ago

Hi Aaron! yes, now the Dynamics can be placed for the voices, but the position seems to be incorrect.

Attached screenshot: V1, "mf" and "f" added to the first note; position at the end of the bar. V1, "sfz" added to the fifth note; position at the end of the line.

Of course it can be re-positioned with the offset in the dialog, but it's a bit strange anyway :-) Maybe you can check this if you find some time.

issue31dynamicsposition

AaronDavidNewman commented 3 years ago

I was using the wrong coordinates. Please try now.

rkr1209 commented 3 years ago

perfect! Thanks.