g200kg / webaudio-pianoroll

Pianoroll GUI library for Web application / relevant to webaudio-controls
Apache License 2.0
92 stars 14 forks source link

`getMMLString()` followed by a `setMMLString()` incorrect when `octadj` is non default #2

Open abulka opened 2 years ago

abulka commented 2 years ago

The string created when you call getMMLString() when octadj is non default cannot be loaded back into the pianoroll without causing an octave jump in the results.

For example if I have

<webaudio-pianoroll id="sequencer" octadj="-2"></webaudio-pianoroll>

Ideally a s = getMMLString() followed by a setMMLString(s) should leave the pianoroll in the same state - but it does not.

So how to handle the situation where octadj="-2" or some value other than the default of -1 - do I need to hand adjust the MML string to compensate for the octadj?