From 37af76ebf923d92e6b401b0e21a289cc8b914bff Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 5 Nov 2021 13:28:45 -0400 Subject: [PATCH] Add VU meter lights to Audio2. --- res/Core/Audio2.svg | 297 ++++++++++++++++++++++---------------------- src/core/Audio.cpp | 13 ++ 2 files changed, 164 insertions(+), 146 deletions(-) diff --git a/res/Core/Audio2.svg b/res/Core/Audio2.svg index c6931dcc..f024e499 100644 --- a/res/Core/Audio2.svg +++ b/res/Core/Audio2.svg @@ -11,11 +11,11 @@ height="380" viewBox="0 0 75 380" version="1.1" - id="svg207" + id="svg135" sodipodi:docname="AUDIO.svg" inkscape:version="0.92.3 (2405546, 2018-03-11)"> + id="metadata139"> @@ -34,21 +34,21 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="867" - inkscape:window-height="480" - id="namedview209" + inkscape:window-width="1920" + inkscape:window-height="1017" + id="namedview137" showgrid="false" inkscape:zoom="0.62105263" inkscape:cx="37.5" inkscape:cy="190" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="0" - inkscape:current-layer="svg207" /> + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="svg135" /> + id="defs7"> + fill="url(#b5f06fb0-6467-499c-93cc-d9bc9c377fbf)" + id="rect9" /> - - - + id="rect12" /> + + id="g24"> + id="circle16" /> + id="path18" /> + id="line20" /> + id="line22" /> + id="g30"> + id="g43"> + id="path33" /> + id="path35" /> + id="path37" /> + id="path39" /> + id="path41" /> + id="g55"> + id="path45" /> + id="path47" /> + id="path49" /> + id="path51" /> + id="path53" /> + id="g65"> + id="path57" /> + id="path59" /> + id="path61" /> + id="path63" /> + id="g77"> + id="path67" /> + id="path69" /> + id="path71" /> + id="path73" /> + id="path75" /> + id="g89"> + id="path79" /> + id="path81" /> + id="path83" /> + id="path85" /> + id="path87" /> + id="g95"> + id="path91" /> + id="path93" /> + id="g101"> + id="path97" /> + id="path99" /> + id="g113"> + id="path103" /> + id="path105" /> + id="path107" /> + id="path109" /> + id="path111" /> diff --git a/src/core/Audio.cpp b/src/core/Audio.cpp index 1186f64d..5e327f0e 100644 --- a/src/core/Audio.cpp +++ b/src/core/Audio.cpp @@ -526,6 +526,19 @@ struct AudioWidget : ModuleWidget { addOutput(createOutputCentered(mm2px(Vec(7.285, 113.115)), module, TAudio::AUDIO_OUTPUTS + 0)); addOutput(createOutputCentered(mm2px(Vec(18.122, 113.115)), module, TAudio::AUDIO_OUTPUTS + 1)); + addChild(createLightCentered>(mm2px(Vec(6.691, 28.899)), module, TAudio::VU_LIGHTS + 6 * 0 + 0)); + addChild(createLightCentered>(mm2px(Vec(18.709, 28.899)), module, TAudio::VU_LIGHTS + 6 * 1 + 0)); + addChild(createLightCentered>(mm2px(Vec(6.691, 34.196)), module, TAudio::VU_LIGHTS + 6 * 0 + 1)); + addChild(createLightCentered>(mm2px(Vec(18.709, 34.196)), module, TAudio::VU_LIGHTS + 6 * 1 + 1)); + addChild(createLightCentered>(mm2px(Vec(6.691, 39.494)), module, TAudio::VU_LIGHTS + 6 * 0 + 2)); + addChild(createLightCentered>(mm2px(Vec(18.709, 39.494)), module, TAudio::VU_LIGHTS + 6 * 1 + 2)); + addChild(createLightCentered>(mm2px(Vec(6.691, 44.791)), module, TAudio::VU_LIGHTS + 6 * 0 + 3)); + addChild(createLightCentered>(mm2px(Vec(18.709, 44.791)), module, TAudio::VU_LIGHTS + 6 * 1 + 3)); + addChild(createLightCentered>(mm2px(Vec(6.691, 50.089)), module, TAudio::VU_LIGHTS + 6 * 0 + 4)); + addChild(createLightCentered>(mm2px(Vec(18.709, 50.089)), module, TAudio::VU_LIGHTS + 6 * 1 + 4)); + addChild(createLightCentered>(mm2px(Vec(6.691, 55.386)), module, TAudio::VU_LIGHTS + 6 * 0 + 5)); + addChild(createLightCentered>(mm2px(Vec(18.709, 55.386)), module, TAudio::VU_LIGHTS + 6 * 1 + 5)); + app::AudioDeviceWidget* audioWidget = createWidget(mm2px(Vec(0.0, 13.039))); audioWidget->box.size = mm2px(Vec(25.4, 47.726)); audioWidget->setAudioPort(module ? &module->port : NULL);