mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-07-05 03:32:02 +00:00
Moved outputs size adjustments to droplets
This commit is contained in:
@ -10,8 +10,10 @@ void Droplet::UpdateState(DropletState m_state) {
|
||||
screen_min = 0;
|
||||
screen_max = SSD1309_WIDTH;
|
||||
if (state == DropletState::kLeft) {
|
||||
chn_max = 2;
|
||||
screen_max = SSD1309_WIDTH / 2;
|
||||
} else if (state == DropletState::kRight) {
|
||||
chn_min = 2;
|
||||
screen_min = SSD1309_WIDTH / 2;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,8 @@ class Droplet {
|
||||
const int kTitleHeight = 8;
|
||||
int screen_min;
|
||||
int screen_max;
|
||||
size_t chn_min = 0;
|
||||
size_t chn_max = 4;
|
||||
void DrawName(daisy::DaisyPatch*,
|
||||
std::string);
|
||||
void UpdateState(DropletState);
|
||||
|
@ -5,7 +5,6 @@ NoiseDroplet::NoiseDroplet(DaisyPatch* m_patch,
|
||||
DropletState m_state) {
|
||||
noise.Init();
|
||||
filter.Init();
|
||||
patch = m_patch;
|
||||
UpdateState(m_state);
|
||||
}
|
||||
|
||||
@ -14,13 +13,6 @@ void NoiseDroplet::Control() {}
|
||||
void NoiseDroplet::Process(float** in, float** out, size_t size) {
|
||||
for (size_t i = 0; i < size; i += 2) {
|
||||
float sig = noise.Process();
|
||||
size_t chn_min = 0;
|
||||
size_t chn_max = 4;
|
||||
if (state == DropletState::kLeft) {
|
||||
chn_max = 2;
|
||||
} else if (state == DropletState::kRight) {
|
||||
chn_min = 2;
|
||||
}
|
||||
for (size_t chn = chn_min; chn < chn_max; chn++) {
|
||||
out[chn][i] = sig;
|
||||
}
|
||||
|
Reference in New Issue
Block a user