private void AddUsedDrumTrackPattern(List <IDrumPattern> patterns, ParameterNames.CombiParameterName bankName, ParameterNames.CombiParameterName numberName) { IParameter paramBank = GetParam(bankName); if (paramBank != null) { IDrumPatternBank bank = (IDrumPatternBank)PcgRoot.DrumPatternBanks.GetBankWithPcgId((int)(paramBank.Value)); if (bank != null) { IParameter paramNumber = GetParam(numberName); if (paramNumber != null) { if (paramNumber.Value < bank.Patches.Count) { patterns.Add(bank.Patches[paramNumber.Value]); } else { // Index is not reset for user bank, continue counting in next bank (assuming there are 2: Preset, User) IBanks banks = (IBanks)bank.Parent; int value = paramNumber.Value - bank.CountPatches; bank = (IDrumPatternBank)banks[banks.IndexOfBank(bank) + 1]; if (value < bank.CountWritablePatches) { patterns.Add((IDrumPattern)bank.Patches[value]); } } } } } }
private void AddUsedDramTrackPattern(List <IDrumPattern> patterns, ParameterNames.ProgramParameterName bankName, ParameterNames.ProgramParameterName numberName) { IParameter paramBank = GetParam(bankName); if (paramBank != null) { IDrumPatternBank bank = (IDrumPatternBank)PcgRoot.DrumPatternBanks.GetBankWithPcgId((int)(paramBank.Value)); IParameter paramNumber = GetParam(numberName); if (paramNumber != null) { //MK patterns.Add(bank.Patches[paramNumber.Value]); } } }