-
First, huge thanks to your great work! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The piano roll is rendered via an SVG element, so as soon as it's initialized, you should be able to add any additional graphical elements you want. You should be able to compute the x coordinate of your marker by taking its time in seconds and multiplying it by You can see how I added a grid as a background to the piano roll here (via pure CSS – I simply added a background gradient that repeats every 30 pixels). As far as loading the markers from the MIDI file: |
Beta Was this translation helpful? Give feedback.
The piano roll is rendered via an SVG element, so as soon as it's initialized, you should be able to add any additional graphical elements you want. You should be able to compute the x coordinate of your marker by taking its time in seconds and multiplying it by
pixelsPerTimeStep
, which is 30 by default.You can see how I added a grid as a background to the piano roll here (via pure CSS – I simply added a background gradient that repeats every 30 pixels).
As far as loading the markers from the MIDI file:
@magenta/music
loads only notes, control changes and some basic meta messages like tempo, but does not seem to load markers (see themidiToSequenceProto
function). So you would need to lo…