Block AddBlock(int lane, BlockType type, NoteSequenceCollection.Note note) { var block = blockContainer.CreateOrReuseItem(); block.lane = lane; block.isTentative = true; block.active = true; block.type = type; block.note = note; block.end = note.end; block.holdingFingerId = -1; return(block); }
public void PlayBackgroundNote(NoteSequenceCollection.Note seqNote) { //Debug.LogFormat("on {0} @ {1} ch {2}", seqNote.note, seqNote.velocity, seqNote.channel); // start background note sf2Synth.NoteOn(seqNote.channel, seqNote.note, seqNote.velocity); if (seqNote.end <= ticks) { // already overdue //Debug.LogFormat(" overdue"); sf2Synth.NoteOff(seqNote.channel, seqNote.note, 0); } else { activeBackgroundNoteSet.AddItem(seqNote); } }
public void StartNote(NoteSequenceCollection.Note seqNote) { sf2Synth.NoteOn(seqNote.channel, seqNote.note, seqNote.velocity); }
public void AddBackgroundNote(NoteSequenceCollection.Note seqNote) { pendingBackgroundNoteSet.AddItem(seqNote); }
public void StopNote(NoteSequenceCollection.Note seqNote) { sf2Synth.NoteOff(seqNote.channel, seqNote.note, 0); }