private void ReadInstruments(Stream stream) { Instruments.Clear(); for (uint i = 0; i < numberOfSamples; i++) { MOD_Instrument inst = new MOD_Instrument(); Instruments.Add(inst); inst.ReadHeaderFromStream(stream, ref i); } DebugMes(InstrumentsToString()); }
protected override void ResetChannelInstrument(ModuleMixerChannel mc) { MOD_Instrument instrument = (MOD_Instrument)module.Instruments[(int)mc.instrumentIndex - 1]; mc.instrumentPosition = 2; mc.instrumentLength = instrument.length; mc.loopType = instrument.loopType; mc.instrumentLoopStart = instrument.repeatStart; mc.instrumentLoopEnd = instrument.repeatStop; mc.currentFineTune = instrument.fineTune; mc.vibratoCount = 0; mc.tremoloCount = 0; mc.arpeggioCount = 0; }