abudaan / heartbeat

a javascript MIDI/Audio sequencer for your browser
http://abudaan.github.io/heartbeat/
121 stars 20 forks source link

Can't 'addPartAt' for empty parts #6

Closed TimVen closed 9 years ago

TimVen commented 9 years ago

Using the function 'addPartAt' with an empty part causes the part always to start at position 0 regardless of the ticks sent.

We use this feature when a user creates a new part to start adding notes to. ie. Dragging a 'new part' icon to the position in the sequence where an editor opens allowing notes to be added at that bar.

If I try the same code with a note pre populated into the part it works. This is part of my current workaround.

Workaround

create a NEW part with a note * HB workaround currentTrack.addPartAt(part, ['ticks', partPosition]); update Song remove all part events * HB workaround part is in correct position