How can the bass drum be set to a separate voice?

• May 18, 2021 - 19:30

How can I put the bass drum in a separate voice with it's stem direction down whereas the cymbal stem direction is up?

The following code snippet puts all the stems in the same direction:

lel_lbreak = newElement (Element.LAYOUT_BREAK);
lel_lbreak.layoutBreakType = LayoutBreak.LINE;

lel_cursor.setDuration(1,16);

// Newline every two measures
for (lj=1;lj<5;lj++)
{
if (lj % 2 == 0)
{
lel_lbreak.lel_score = curScore;
lel_cursor.add (lel_lbreak.clone ());
}

for (li=1;li&lt;17;li++)
{
 // HH stroke
 var lel_note = lel_cursor.addNote(42);

// Set BD and Snare simultaneous with current HH cymbal beat withut moving the cursor

// (like a chord)
if (li == 5 || li == 13) {lel_note = lel_cursor.addNote(38, true);} // Snare on 5 and 13
if (li == 1 || li == 3 || li == 9) {lel_note = lel_cursor.addNote(35, true);} // BD on 1,3, and 9
}
}


Comments

If I remember correctly a cursor object has a track and a voice property, so set that one correctly to add notes into that voice.

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