public void Init() { this.OrpheeFileExporter.ConvertTracksNoteMapToOrpheeNoteMessageList(this.OrpheeFile); this._orpheeNoteOnMessage = this.OrpheeTrack.OrpheeNoteMessageList[0]; this._orpheeNoteOffMessage = this.OrpheeTrack.OrpheeNoteMessageList[1]; using (this.Writer = new BinaryWriter(this.File.OpenStreamForWriteAsync().Result)) { foreach (var orpheeTrack in this.OrpheeFile.OrpheeTrackList) this.NoteMessageWriter.WriteNoteMessages(Writer, orpheeTrack.OrpheeNoteMessageList, (int)orpheeTrack.Channel, orpheeTrack.CurrentInstrument); } ReadNoteOnMessageFromFile(); }
private void InitExptectedMessages() { this._expectedFirstNoteOnMessage = new OrpheeNoteMessage() { Channel = 5, DeltaTime = 48, MessageCode = 0x90, Note = Note.C4, Velocity = 76 }; this._expectedSecondNoteOnMessage = new OrpheeNoteMessage() { Channel = 5, DeltaTime = 0, MessageCode = 0x90, Note = Note.C4, Velocity = 76, }; this._expectedFirstNoteOffMessage = new OrpheeNoteMessage() { Channel = 5, DeltaTime = 96, MessageCode = 0x80, Note = Note.C4, Velocity = 0 }; this._expectedSecondNoteOffMessage = new OrpheeNoteMessage() { Channel = 5, DeltaTime = 0, MessageCode = 0x80, Note = Note.C4, Velocity = 0, }; }
public void Init() { InitNoteMap(); InitExptectedMessages(); this._orpheeNoteMessageList = NoteMapManager.Instance.ConvertNoteMapToOrpheeMessageList(this.NoteMap, (int)Channel.Channel6, ref this._trackLength); this._orpheeFirstNoteOnMessage = this._orpheeNoteMessageList[2]; this._orpheeSecondNoteOnMessage = this._orpheeNoteMessageList[3]; this._orpheeFirstNoteOffMessage = this._orpheeNoteMessageList[4]; this._orpheeSecondNoteOffMessage = this._orpheeNoteMessageList[5]; }
public void Init() { this.NoteMap[0][9].Note = Note.C4; this.NoteMap[0][9].ColumnIndex = 9; this.NoteMap[0][9].LineIndex = 0; this.NoteMap[0][9].IsChecked = true; this._expectedNoteOnMessage = new OrpheeNoteMessage() { Channel = 4, DeltaTime = 384, MessageCode = 0x90, Note = Note.C4, Velocity = 76 }; this._expectedNoteOffMessage = new OrpheeNoteMessage() { Channel = 4, DeltaTime = 96, MessageCode = 0x80, Note = Note.C4, Velocity = 0, }; this._orpheeNoteMessageList = NoteMapManager.Instance.ConvertNoteMapToOrpheeMessageList(this.NoteMap, (int)Channel.Channel5, ref this._trackLength); this._orpheeNoteOnMessage = this._orpheeNoteMessageList[2]; this._orpheeNoteOffMessage = this._orpheeNoteMessageList[3]; }
public void Init() { this._expectedNoteOnMessage = new OrpheeNoteMessage() { Channel = 0, DeltaTime = 0, MessageCode = 0x90, Note = Note.C4, Velocity = 76 }; this._expectedNoteOffMessage = new OrpheeNoteMessage() { Channel = 0, DeltaTime = 96, MessageCode = 0x80, Note = Note.C4, Velocity = 0 }; this._orpheeNoteMessageList = NoteMapManager.Instance.ConvertNoteMapToOrpheeMessageList(this.NoteMap, (int)Channel.Channel1, ref this._trackLength); this._orpheeNoteOnMessage = this._orpheeNoteMessageList[0]; this._orpheeNoteOffMessage = this._orpheeNoteMessageList[1]; }