Ejemplo n.º 1
0
 /**
  * Sets the selected instrument to extend mode.
  *
  * @param i The instrument that we are trying to set to extend.
  */
 private void toggleNoteExtension(InstrumentIndex i) {
   boolean[] ext = StateMachine.getNoteExtensions();
   ext[i.getChannel() - 1] = !ext[i.getChannel() - 1];
   changePortrait(i.getChannel() - 1, ext[i.getChannel() - 1]);
   int ex = theStaff.getSequence().getNoteExtensions();
   ex ^= (1 << (i.getChannel() - 1));
   theStaff.getSequence().setNoteExtensions(ex);
 }
Ejemplo n.º 2
0
 /** @param i The bitfield that we want to set the note extensions to. */
 public void setNoteExtension(int i) {
   boolean[] ext = StateMachine.getNoteExtensions();
   for (int j = 0; j < Values.NOTES_IN_A_LINE; j++) {
     if (!(ext[j] == ((i & (1 << j)) != 0))) {
       ext[j] = !ext[j];
       changePortrait(j, ext[j]);
     }
   }
 }