How do I access a note or a segment propriety without a function, such as Key or all the notes played on a segment?

• Jun 25, 2019 - 00:03

Comments

This is quite a vague question.
If the item you need is a property, then call it by the property dot syntax, which from the ECMAScript POV isn't a function call.

To get all notes in a segment, you can use the elementAt() function on the segment to get the root element in each track. Verify whether the element is a Chord and if so, access it's notes property. If you want to figure out if it's playing, make sure that it doesn't have a custom velocity of 0 and that the play property is true.
Note that this only captures the notes that start playback on that segment. If you want to figure out playing notes, you'll have to look backwards and compare tick positions for possible already sounding notes.

Do you still have an unanswered question? Please log in first to post your question.