@@ -231,29 +231,25 @@ void NoteNumberRemaperByVelocityAudioProcessorEditor::resized()
231231}
232232
233233void NoteNumberRemaperByVelocityAudioProcessorEditor::sliderValueChanged (Slider* slider) {
234- auto currentValue = slider->getValue ();
235-
236234 if (slider == &hihatSlider)
237- audioProcessor.midiProcessor .hihatVelocity ->store (currentValue );
238- else if (slider == &crashLeftSlider)
239- audioProcessor.midiProcessor .crashLeftVelocity ->store (currentValue );
240- else if (slider == &crashRightSlider)
241- audioProcessor.midiProcessor .crashRightVelocity ->store (currentValue );
235+ audioProcessor.midiProcessor .hihatVelocity ->store (slider-> getValue () );
236+ if (slider == &crashLeftSlider)
237+ audioProcessor.midiProcessor .crashLeftVelocity ->store (slider-> getValue () );
238+ if (slider == &crashRightSlider)
239+ audioProcessor.midiProcessor .crashRightVelocity ->store (slider-> getValue () );
242240}
243241
244242void NoteNumberRemaperByVelocityAudioProcessorEditor::comboBoxChanged (ComboBox* cb) {
245- auto currentValue = cb->getSelectedIdAsValue ().getValue ();
246-
247243 if (cb == &hihatNoteInCB)
248- audioProcessor.midiProcessor .hihatNoteIn ->store (currentValue );
244+ audioProcessor.midiProcessor .hihatNoteIn ->store (cb-> getSelectedIdAsValue (). getValue () );
249245 if (cb == &hihatNoteOutCB)
250- audioProcessor.midiProcessor .hihatNoteOut ->store (currentValue );
246+ audioProcessor.midiProcessor .hihatNoteOut ->store (cb-> getSelectedIdAsValue (). getValue () );
251247 if (cb == &crashLeftNoteInCB)
252- audioProcessor.midiProcessor .crashLeftNoteIn ->store (currentValue );
248+ audioProcessor.midiProcessor .crashLeftNoteIn ->store (cb-> getSelectedIdAsValue (). getValue () );
253249 if (cb == &crashLeftNoteOutCB)
254- audioProcessor.midiProcessor .crashLeftNoteOut ->store (currentValue );
250+ audioProcessor.midiProcessor .crashLeftNoteOut ->store (cb-> getSelectedIdAsValue (). getValue () );
255251 if (cb == &crashRightNoteInCB)
256- audioProcessor.midiProcessor .crashRightNoteIn ->store (currentValue );
252+ audioProcessor.midiProcessor .crashRightNoteIn ->store (cb-> getSelectedIdAsValue (). getValue () );
257253 if (cb == &crashRightNoteOutCB)
258- audioProcessor.midiProcessor .crashRightNoteOut ->store (currentValue );
254+ audioProcessor.midiProcessor .crashRightNoteOut ->store (cb-> getSelectedIdAsValue (). getValue () );
259255}
0 commit comments