From f05e3be55f29fc15091247a0f24271c5c6302e6a Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 8 Aug 2025 16:35:04 +0200 Subject: [PATCH] Fixed code problems --- src/plug/JaySynthAudioProcessorEditor.cpp | 44 +++++++++++------------ src/plug/JaySynthAudioProcessorEditor.h | 4 +-- src/synth/voice.c | 35 +++++++++--------- 3 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/plug/JaySynthAudioProcessorEditor.cpp b/src/plug/JaySynthAudioProcessorEditor.cpp index 65fd569..0ca47da 100644 --- a/src/plug/JaySynthAudioProcessorEditor.cpp +++ b/src/plug/JaySynthAudioProcessorEditor.cpp @@ -726,24 +726,6 @@ JaySynthAudioProcessorEditor::JaySynthAudioProcessorEditor (JaySynthAudioProcess m_comboBox_vcf_type->addItem (TRANS("BPF"), 3); m_comboBox_vcf_type->addListener (this); - addAndMakeVisible (m_slider_lfo1_smooth = new Slider ("LFO 2 smooth")); - m_slider_lfo1_smooth->setTooltip (TRANS("LFO 2 smooth [%]")); - m_slider_lfo1_smooth->setRange (0, 1, 0); - m_slider_lfo1_smooth->setSliderStyle (Slider::RotaryVerticalDrag); - m_slider_lfo1_smooth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); - m_slider_lfo1_smooth->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff)); - m_slider_lfo1_smooth->setColour (Slider::rotarySliderOutlineColourId, Colour (0x66ffffff)); - m_slider_lfo1_smooth->addListener (this); - - addAndMakeVisible (m_label_lfo1_smooth = new Label ("LFO 2 smooth", - TRANS("value"))); - m_label_lfo1_smooth->setFont (Font (14.00f, Font::plain)); - m_label_lfo1_smooth->setJustificationType (Justification::centred); - m_label_lfo1_smooth->setEditable (true, true, false); - m_label_lfo1_smooth->setColour (TextEditor::textColourId, Colours::black); - m_label_lfo1_smooth->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); - m_label_lfo1_smooth->addListener (this); - addAndMakeVisible (m_slider_lfo0_smooth = new Slider ("LFO 1 smooth")); m_slider_lfo0_smooth->setTooltip (TRANS("LFO 1 smooth [%]")); m_slider_lfo0_smooth->setRange (0, 1, 0); @@ -762,6 +744,24 @@ JaySynthAudioProcessorEditor::JaySynthAudioProcessorEditor (JaySynthAudioProcess m_label_lfo0_smooth->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); m_label_lfo0_smooth->addListener (this); + addAndMakeVisible (m_slider_lfo1_smooth = new Slider ("LFO 2 smooth")); + m_slider_lfo1_smooth->setTooltip (TRANS("LFO 2 smooth [%]")); + m_slider_lfo1_smooth->setRange (0, 1, 0); + m_slider_lfo1_smooth->setSliderStyle (Slider::RotaryVerticalDrag); + m_slider_lfo1_smooth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); + m_slider_lfo1_smooth->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff)); + m_slider_lfo1_smooth->setColour (Slider::rotarySliderOutlineColourId, Colour (0x66ffffff)); + m_slider_lfo1_smooth->addListener (this); + + addAndMakeVisible (m_label_lfo1_smooth = new Label ("LFO 2 smooth", + TRANS("value"))); + m_label_lfo1_smooth->setFont (Font (14.00f, Font::plain)); + m_label_lfo1_smooth->setJustificationType (Justification::centred); + m_label_lfo1_smooth->setEditable (true, true, false); + m_label_lfo1_smooth->setColour (TextEditor::textColourId, Colours::black); + m_label_lfo1_smooth->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); + m_label_lfo1_smooth->addListener (this); + addAndMakeVisible (m_slider_lfo2_smooth = new Slider ("LFO 3 smooth")); m_slider_lfo2_smooth->setTooltip (TRANS("LFO 3 smooth [%]")); m_slider_lfo2_smooth->setRange (0, 1, 0); @@ -2497,10 +2497,10 @@ JaySynthAudioProcessorEditor::~JaySynthAudioProcessorEditor() m_label_synth_name = nullptr; m_label_synth_version = nullptr; m_comboBox_vcf_type = nullptr; - m_slider_lfo1_smooth = nullptr; - m_label_lfo1_smooth = nullptr; m_slider_lfo0_smooth = nullptr; m_label_lfo0_smooth = nullptr; + m_slider_lfo1_smooth = nullptr; + m_label_lfo1_smooth = nullptr; m_slider_lfo2_smooth = nullptr; m_label_lfo2_smooth = nullptr; m_slider_lfo3_smooth = nullptr; @@ -3535,10 +3535,10 @@ void JaySynthAudioProcessorEditor::resized() m_label_synth_name->setBounds (12, 662, 92, 24); m_label_synth_version->setBounds (978, 662, 132, 24); m_comboBox_vcf_type->setBounds (880, 74, 68, 16); - m_slider_lfo1_smooth->setBounds (506, 88, 36, 36); - m_label_lfo1_smooth->setBounds (498, 70, 52, 20); m_slider_lfo0_smooth->setBounds (392, 224, 36, 36); m_label_lfo0_smooth->setBounds (384, 206, 52, 20); + m_slider_lfo1_smooth->setBounds (506, 88, 36, 36); + m_label_lfo1_smooth->setBounds (498, 70, 52, 20); m_slider_lfo2_smooth->setBounds (392, 402, 36, 36); m_label_lfo2_smooth->setBounds (384, 384, 52, 20); m_slider_lfo3_smooth->setBounds (506, 402, 36, 36); diff --git a/src/plug/JaySynthAudioProcessorEditor.h b/src/plug/JaySynthAudioProcessorEditor.h index 1545f2a..5e8bc0f 100644 --- a/src/plug/JaySynthAudioProcessorEditor.h +++ b/src/plug/JaySynthAudioProcessorEditor.h @@ -177,10 +177,10 @@ private: ScopedPointer