Fixed menu and sound output

This commit is contained in:
Christian Colglazier 2021-10-24 20:00:25 -04:00
parent ab58175b6f
commit e4987c2322
4 changed files with 8 additions and 7 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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";

View File

@ -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.