示例#1
0
        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);
        }
示例#2
0
 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);
     }
 }
示例#3
0
 public void StartNote(NoteSequenceCollection.Note seqNote)
 {
     sf2Synth.NoteOn(seqNote.channel, seqNote.note, seqNote.velocity);
 }
示例#4
0
 public void AddBackgroundNote(NoteSequenceCollection.Note seqNote)
 {
     pendingBackgroundNoteSet.AddItem(seqNote);
 }
示例#5
0
 public void StopNote(NoteSequenceCollection.Note seqNote)
 {
     sf2Synth.NoteOff(seqNote.channel, seqNote.note, 0);
 }