Unable to insert chords of correct duration using plugin framework

• Jul 24, 2015 - 23:09
Priority
P2 - Medium
Type
Plugins
Severity
S3 - Major
Status
active
Regression
No
Workaround
No
Project

Please read this forum thread for more information.

When one attempts to insert a chord using the following code, the result is a chord with no duration.

var n1      = newElement(Element.NOTE);
n1.pitch    = 60;       // C4 pitch
n1.tpc1     = 14;       // C tonal pitch class (non transposed)
n1.tpc2     = 14;       // C tonal pitch class (transposed)
c.add(n1);

var n2      = newElement(Element.NOTE);
n2.pitch    = 64;       // E4 pitch
n2.tpc1     = 18;
n2.tpc2     = 18;
c.add(n2);

var n3      = newElement(Element.NOTE);
n3.pitch    = 67;       // G4 pitch
n3.tpc1     = 15;
n3.tpc2     = 15;
c.add(n3);

Also, one cannot use multiple invocations of cursor.addNote to construct a chord as the method does not return a valid element or segment.


Comments