public void AddInstrument(RiffChunkListIns_ ins_List, List <WaveformBase> aWaveformList) { int tuning = 0; for (int i = 0; i < ins_List.lartListList.Count; i++) { RiffChunkListLart lartList = ( RiffChunkListLart )ins_List.lartListList[i]; RiffChunkArt1 art1Chunk = lartList.art1Body; tuning = art1Chunk.tuning; } int instrument = ( int )ins_List.inshChunk.midiLocal.instrument; for (int i = 0; i < ins_List.lrgnListList.Count; i++) { RiffChunkListLrgn lrgnList = ( RiffChunkListLrgn )ins_List.lrgnListList[i]; if (instrumentArray[instrument] == null) { instrumentArray[instrument] = new InstrumentDls(lrgnList, aWaveformList, tuning); } else { InstrumentDls lInstrumentDls = ( InstrumentDls )instrumentArray[instrument]; lInstrumentDls.AddSoundfont(lrgnList, aWaveformList, tuning); } } }
public void AddSoundfont(RiffChunkListLrgn aLrgnList, List <WaveformBase> aWaveformList, int aTuning) { for (int l = 0; l < aLrgnList.rgn_ListList.Count; l++) { RiffChunkListRgn_ rgn_List = ( RiffChunkListRgn_ )aLrgnList.rgn_ListList[l]; AddSoundfont(new SoundfontDls(rgn_List, aWaveformList, aTuning)); } for (int l = 0; l < aLrgnList.rgn2ListList.Count; l++) { RiffChunkListRgn2 rgn2List = ( RiffChunkListRgn2 )aLrgnList.rgn2ListList[l]; AddSoundfont(new SoundfontDls(rgn2List, aWaveformList, aTuning)); } }
public InstrumentDls(RiffChunkListLrgn aLrgnList, List <WaveformBase> aWaveformList, int aTuning) : base() { AddSoundfont(aLrgnList, aWaveformList, aTuning); }