/// <summary> /// /// </summary> /// <param name="parentModule"></param> /// <param name="noteOnEvent"></param> /// <param name="programNumber"></param> /// <param name="slot"></param> public C140Sound(C140 parentModule, C140SoundManager manager, TimbreBase timbre, int tindex, TaggedNoteOnEvent noteOnEvent, int slot, byte timbreIndex) : base(parentModule, manager, timbre, tindex, noteOnEvent, slot) { this.parentModule = parentModule; this.timbreIndex = timbreIndex; this.timbre = (C140Timbre)timbre; lastSoundType = this.timbre.SoundType; if (lastSoundType == SoundType.INST) { baseFreq = this.timbre.BaseFreqency; sampleRate = this.timbre.SampleRate; loopPoint = this.timbre.LoopPoint; loopEn = this.timbre.LoopEnable; } /* * else if (lastSoundType == SoundType.DRUM) * { * var pct = (C140PcmTimbre)parentModule.DrumSoundTable.PcmTimbres[noteOnEvent.NoteNumber]; * baseFreq = pct.BaseFreqency; * sampleRate = pct.SampleRate; * loopPoint = pct.LoopPoint; * loopEn = pct.LoopEnable; * }*/ }
/// <summary> /// /// </summary> /// <param name="parent"></param> public C140SoundManager(C140 parent) : base(parent) { this.parentModule = parent; }