public Instrument(BinaryReader reader) : this() { SynthMode = reader.ReadInt16BE(); SampleWaveNo = reader.ReadInt16BE(); Length = reader.ReadInt16BE(); Repeat = reader.ReadInt16BE(); reader.ReadBytes(8); Volume = reader.ReadInt16BE(); FineTuning = reader.ReadInt16BE(); Portamento = reader.ReadInt16BE(); VibDelay = reader.ReadInt16BE(); VibSpeed = reader.ReadInt16BE(); VibLevel = reader.ReadInt16BE(); AmfWave = reader.ReadInt16BE(); AmfDelay = reader.ReadInt16BE(); AmfLength = reader.ReadInt16BE(); AmfRepeat = reader.ReadInt16BE(); AdsrWave = reader.ReadInt16BE(); AdsrDelay = reader.ReadInt16BE(); AdsrLength = reader.ReadInt16BE(); AdsrRepeat = reader.ReadInt16BE(); SustainPt = reader.ReadInt16BE(); SustainVal = reader.ReadInt16BE(); reader.ReadBytes(16); EffectNumber = reader.ReadInt16BE(); Effect1 = reader.ReadInt16BE(); Effect2 = reader.ReadInt16BE(); Effect3 = reader.ReadInt16BE(); EffectDelay = reader.ReadInt16BE(); ArpegData = new Arpeggiato[3]; for(int i = 0; i < ArpegData.Length; i++) { ArpegData[i] = new Arpeggiato(reader); } Name = new string(reader.ReadChars(30)).Split(new[]{'\0'}, 2)[0]; }
public Instrument(BinaryReader reader) : this() { SynthMode = reader.ReadInt16BE(); SampleWaveNo = reader.ReadInt16BE(); Length = reader.ReadInt16BE(); Repeat = reader.ReadInt16BE(); reader.ReadBytes(8); Volume = reader.ReadInt16BE(); FineTuning = reader.ReadInt16BE(); Portamento = reader.ReadInt16BE(); VibDelay = reader.ReadInt16BE(); VibSpeed = reader.ReadInt16BE(); VibLevel = reader.ReadInt16BE(); AmfWave = reader.ReadInt16BE(); AmfDelay = reader.ReadInt16BE(); AmfLength = reader.ReadInt16BE(); AmfRepeat = reader.ReadInt16BE(); AdsrWave = reader.ReadInt16BE(); AdsrDelay = reader.ReadInt16BE(); AdsrLength = reader.ReadInt16BE(); AdsrRepeat = reader.ReadInt16BE(); SustainPt = reader.ReadInt16BE(); SustainVal = reader.ReadInt16BE(); reader.ReadBytes(16); EffectNumber = reader.ReadInt16BE(); Effect1 = reader.ReadInt16BE(); Effect2 = reader.ReadInt16BE(); Effect3 = reader.ReadInt16BE(); EffectDelay = reader.ReadInt16BE(); ArpegData = new Arpeggiato[3]; for (int i = 0; i < ArpegData.Length; i++) { ArpegData[i] = new Arpeggiato(reader); } Name = new string(reader.ReadChars(30)).Split(new[] { '\0' }, 2)[0]; }