mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-04-30 09:45:35 +00:00
Fixed menu and sound output
This commit is contained in:
parent
ab58175b6f
commit
e4987c2322
@ -10,7 +10,7 @@ NoiseDroplet::NoiseDroplet(DaisyPatch* m_patch,
|
|||||||
void NoiseDroplet::Control() {}
|
void NoiseDroplet::Control() {}
|
||||||
|
|
||||||
void NoiseDroplet::Process(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size) {
|
void NoiseDroplet::Process(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size) {
|
||||||
for (size_t i = 0; i < size; i += 2) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
float sig = noise.Process();
|
float sig = noise.Process();
|
||||||
for (size_t chn = GetChannelMin(); chn < GetChannelMax(); chn++) {
|
for (size_t chn = GetChannelMin(); chn < GetChannelMax(); chn++) {
|
||||||
out[chn][i] = sig;
|
out[chn][i] = sig;
|
||||||
|
@ -53,7 +53,7 @@ void VCODroplet::Process(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer
|
|||||||
|
|
||||||
Patch()->ProcessAnalogControls();
|
Patch()->ProcessAnalogControls();
|
||||||
|
|
||||||
for (size_t i = 0; i < size; i += 2) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
// Read Knobs
|
// Read Knobs
|
||||||
freq = mtof(freqctrl.Process() + finectrl.Process());
|
freq = mtof(freqctrl.Process() + finectrl.Process());
|
||||||
if (GetState() == DropletState::kFull) {
|
if (GetState() == DropletState::kFull) {
|
||||||
|
10
src/menu.cpp
10
src/menu.cpp
@ -5,9 +5,9 @@ Menu::Menu(DaisyPatch* m_patch,
|
|||||||
DropletManager* m_manager) {
|
DropletManager* m_manager) {
|
||||||
patch = m_patch;
|
patch = m_patch;
|
||||||
state = m_state;
|
state = m_state;
|
||||||
state = m_state;
|
manager = m_manager;
|
||||||
}
|
}
|
||||||
const std::string MENU_ITEMS[] = {"TEST",
|
const std::string MENU_ITEMS[] = {"Split",
|
||||||
"Change",
|
"Change",
|
||||||
"VCO",
|
"VCO",
|
||||||
"Noise"};
|
"Noise"};
|
||||||
@ -16,10 +16,9 @@ const int MAX_CHAR_LENGTH = 15;
|
|||||||
const int MENU_X[] = {0, 5, 10, 5, 0};
|
const int MENU_X[] = {0, 5, 10, 5, 0};
|
||||||
const int MENU_Y[] = {0, 11, 22, 41, 52};
|
const int MENU_Y[] = {0, 11, 22, 41, 52};
|
||||||
int selectedMenuItem = 0;
|
int selectedMenuItem = 0;
|
||||||
bool inMenu = false;
|
|
||||||
|
|
||||||
bool Menu::InMenu() {
|
bool Menu::InMenu() {
|
||||||
return inMenu;
|
return this->inMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetInMenu(bool menuState) {
|
void Menu::SetInMenu(bool menuState) {
|
||||||
@ -35,11 +34,12 @@ void Menu::FilterMenuSelection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string Menu::FilterMenuText(int position) {
|
std::string Menu::FilterMenuText(int position) {
|
||||||
|
//return std::to_string(position);
|
||||||
if (position >= MENU_SIZE || position < 0) {
|
if (position >= MENU_SIZE || position < 0) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
if (ConvertState(position) == MenuState::kSplit) {
|
if (ConvertState(position) == MenuState::kSplit) {
|
||||||
if (!manager->GetSplitMode()) {
|
if (manager->GetSplitMode()) {
|
||||||
return "Merge";
|
return "Merge";
|
||||||
} else {
|
} else {
|
||||||
return "Split";
|
return "Split";
|
||||||
|
@ -17,6 +17,7 @@ class Menu {
|
|||||||
DaisyPatch* patch;
|
DaisyPatch* patch;
|
||||||
DropletManager* manager;
|
DropletManager* manager;
|
||||||
DropletState state;
|
DropletState state;
|
||||||
|
bool inMenu = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Converts a number to the related menu state.
|
* Converts a number to the related menu state.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user