chordToNote.. but generating specific voicings

• Dec 4, 2017 - 17:50

Thinking about modifying chordToNote for my own use.

I haven't written a plugin before, so just a curious where the best documentation of the API lives and which plugins might offer the best examples of:

  1. Modifying the frequency of a note (for example, moving a note up or down an octave).
  2. Changing the Clef, in a Grand Staff, that a note is on (Taking a Chord from the Treble clef to Bass)

Comments

Figured out number one.. still trying to figure out "2"

It is "sort of" listed as a todo in the original (chordToNote) source -> //todo create in new staff though I think the intention is probably to create the entire chord in a separate staff . But I'm hoping there is a way to uniquely identify bass vs treble in a grand staff.

In reply to by jeetee

Thanks.. I think I understand what you're saying.

So if I have a single staff (perhaps a voice) and a second grand staff above it, will I have 3 staves total, with tracks 1 - 12 so that staff:voice matching will be like I have shown below?

Staff Track Voice
1 1 1
1 2 2
1 3 3
1 4 4

2 5 1
2 6 2
2 7 3
2 8 4

3 9 1
3 10 2
3 11 3
3 12 4

In reply to by Marc Sabatella

Right. So in the first image, I set cursor.voice=3, and the voice appears as voice $ on the Trumpet Staff.

However, when I set cursor.voice=4, the first measure gets a note in the first voice of the Treble clef of the grand staff (which is what I expect). But the 2nd, 3rd, and 4th measure get notes in the first voice of the Bass clef of the grand staff.

So I don't understand why, when cursor is = 4, that all the notes I create aren't in the Treble clef.

In reply to by akinsgre

Hard to say without seeing the code, but it sure looks you are incrementing the track number in each measure. Notice the first measure shows the note being added in track 4 (first voice of second staff) but the next measure actually shows it being added in track 5 (second voice of second staff). I can see this because of the rest that appears for the first voice. I'm guessing the next measure is actually track 6, and the next track 7.

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