-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBanks.cpp
More file actions
118 lines (99 loc) · 3.01 KB
/
Copy pathBanks.cpp
File metadata and controls
118 lines (99 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Noise Plethora
// Copyright (c) 2021 Befaco / Jeremy Bernstein
// Open-source software
// Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
// See LICENSE.txt for the complete license text
#include "Banks.hpp"
#include "Banks_Def.hpp"
const Bank::BankElem Bank::defaultElem = {"", 1.0};
Bank::Bank() {
programs.fill(defaultElem);
}
Bank::Bank(const BankElem& p1, const BankElem& p2, const BankElem& p3,
const BankElem& p4, const BankElem& p5, const BankElem& p6,
const BankElem& p7, const BankElem& p8, const BankElem& p9,
const BankElem& p10)
: programs{p1, p2, p3, p4, p5, p6, p7, p8, p9, p10}
{ }
const char* Bank::getProgramName(int i) {
if (i >= 0 && i < programsPerBank) {
return programs[i].name.c_str();
}
return "";
}
float Bank::getProgramGain(int i) {
if (i >= 0 && i < programsPerBank) {
return programs[i].gain;
}
return 1.0;
}
int Bank::getSize() {
int size = 0;
for (auto it = programs.begin(); it != programs.end(); it++) {
if ((*it).name == "") {
break;
}
size++;
}
return size;
}
//test plugging
#include "P_TestPlugin.hpp"
//Bank A:
#include "P_radioOhNo.hpp"
#include "P_Rwalk_SineFMFlange.hpp"
#include "P_xModRingSqr.hpp"
#include "P_XModRingSine.hpp"
#include "P_CrossModRing.hpp"
#include "P_resonoise.hpp"
#include "P_grainGlitch.hpp"
#include "P_grainGlitchII.hpp"
#include "P_grainGlitchIII.hpp"
#include "P_basurilla.hpp"
//Bank B:
#include "P_clusterSaw.hpp"
#include "P_pwCluster.hpp"
#include "P_crCluster2.hpp"
#include "P_sineFMcluster.hpp"
#include "P_TriFMcluster.hpp"
#include "P_PrimeCluster.hpp"
#include "P_PrimeCnoise.hpp"
#include "P_FibonacciCluster.hpp"
#include "P_partialCluster.hpp"
#include "P_phasingCluster.hpp"
//Bank C:
#include "P_BasuraTotal.hpp"
#include "P_Atari.hpp"
#include "P_WalkingFilomena.hpp"
#include "P_S_H.hpp"
#include "P_arrayOnTheRocks.hpp"
#include "P_existencelsPain.hpp"
#include "P_whoKnows.hpp"
#include "P_satanWorkout.hpp"
#include "P_Rwalk_BitCrushPW.hpp"
#include "P_Rwalk_LFree.hpp"
//Maybe Later: (Unused or incomplet)
#include "P_Rwalk_SineFM.hpp"
#include "P_VarWave.hpp"
#include "P_RwalkVarWave.hpp"
#include "P_Rwalk_ModWave.hpp"
#include "P_Rwalk_WaveTwist.hpp"
#include "P_Rwalk_LBit.hpp"
#include "P_delayPonzo.hpp"
static const Bank bank1 BANKS_DEF_1; // Banks_Def.hpp
static const Bank bank2 BANKS_DEF_2;
static const Bank bank3 BANKS_DEF_3;
static const Bank bank4 BANKS_DEF_4;
static const Bank bank5 BANKS_DEF_5;
static std::array<Bank, numBanks> banks { bank1, bank2, bank3, bank4, bank5 };
// static const Bank bank6 BANKS_DEF_6;
// static const Bank bank7 BANKS_DEF_7;
// static const Bank bank8 BANKS_DEF_8;
// static const Bank bank9 BANKS_DEF_9;
// static const Bank bank10 BANKS_DEF_10;
// static std::array<Bank, programsPerBank> banks { bank1, bank2, bank3, bank4, bank5, bank6, bank7, bank8, bank9, bank10 };
Bank& getBankForIndex(int i) {
if (i < 0) i = 0;
if (i >= programsPerBank) i = (programsPerBank - 1);
return banks[i];
}