diff --git a/plugin/artwork.cpp b/plugin/artwork.cpp index 5686078..b400cb4 100644 --- a/plugin/artwork.cpp +++ b/plugin/artwork.cpp @@ -1,3 +1,21 @@ +/* + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + #include "artwork.hpp" static const char temp1[] = { diff --git a/plugin/module.cpp b/plugin/module.cpp index 24e6efc..7b2a0a2 100644 --- a/plugin/module.cpp +++ b/plugin/module.cpp @@ -81,6 +81,8 @@ void Module::run(Voice* voice) { float p1 = pitchTable[semi], p2 = pitchTable[semi + 1]; int16_t px = ((p2 - p1) * frac + p1); + px <<= (patchRam.switch1 & 0x03); + v->omega = px / 192000.0f; // fixme use proper scaler // per voice we need to calculate the key follow amount and envelope amount diff --git a/plugin/orangebutton.cpp b/plugin/orangebutton.cpp index 640b81c..7168675 100644 --- a/plugin/orangebutton.cpp +++ b/plugin/orangebutton.cpp @@ -1,3 +1,20 @@ +/* + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ #include "artwork.hpp" static const char tempOrngUp[] = { "jF#\377\213].\377\230e\062\377\223b\061\377\230e\062\377\224c\061\377\226d\061" diff --git a/plugin/panel.cpp b/plugin/panel.cpp index ea39d3e..506cfc6 100644 --- a/plugin/panel.cpp +++ b/plugin/panel.cpp @@ -1,3 +1,20 @@ +/* + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ #include "artwork.hpp" static const char tempLedOn[] = { diff --git a/plugin/slider.cpp b/plugin/slider.cpp index 6750ead..16e2d07 100644 --- a/plugin/slider.cpp +++ b/plugin/slider.cpp @@ -1,3 +1,20 @@ +/* + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ #include "artwork.hpp" static const char temporng[] = { diff --git a/plugin/slideswitch.cpp b/plugin/slideswitch.cpp index 2f41179..04efd92 100644 --- a/plugin/slideswitch.cpp +++ b/plugin/slideswitch.cpp @@ -1,13 +1,21 @@ -/* GIMP RGBA C-Source image dump (slideswitch.c) */ /* -static const struct { - guint width; - guint height; - guint bytes_per_pixel; - guint8 pixel_data[23 * 24 * 4 + 1]; -} gimp_image = { - 23, 24, 4, + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include "artwork.hpp" diff --git a/plugin/ui.cpp b/plugin/ui.cpp index 6ab69e9..eb61d6a 100644 --- a/plugin/ui.cpp +++ b/plugin/ui.cpp @@ -1,3 +1,20 @@ +/* + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ #include "ui.hpp" @@ -161,7 +178,7 @@ DistrhoUIPeacock::DistrhoUIPeacock() : UI(Art::backgroundWidth, Art::backgroundH xBtnCh2->setAbsolutePos(644, 293); xBtnCh2->setId(btnCh2); xBtnCh2->setCallback(this); - //programLoaded(0); + // programLoaded(0); } DistrhoUIPeacock::~DistrhoUIPeacock() { @@ -172,7 +189,7 @@ void DistrhoUIPeacock::programLoaded(uint32_t index) { printf("programLoaded\n"); xSliderLFORate->setValue(63); xSliderLFODelay->setValue(94); - + }*/ void DistrhoUIPeacock::parameterChanged(uint32_t index, float value) { printf("Parameter has changed\n"); @@ -266,7 +283,7 @@ void DistrhoUIPeacock::imageSliderDragFinished(ImageSlider* slider) { } void DistrhoUIPeacock::imageSliderValueChanged(ImageSlider* slider, float value) { - printf("setting %d to %f\n", slider->getId(), value); + // printf("setting %d to %f\n", slider->getId(), value); setParameterValue(slider->getId(), value); } @@ -277,20 +294,25 @@ void DistrhoUIPeacock::imageButtonClicked(ImageButton* imgBtn, int) { case btn16: sw1 &= 0xf8; sw1 |= 0x01; + setParameterValue(pVCORange, 0); break; case btn8: sw1 &= 0xf8; sw1 |= 0x02; + setParameterValue(pVCORange, 1); break; case btn4: sw1 &= 0xf8; sw1 |= 0x04; + setParameterValue(pVCORange, 2); break; case btnPls: sw1 ^= 0x08; + setParameterValue(pSqr, (sw1 & 0x08) ? 1.0f : 0.0f); break; case btnSaw: sw1 ^= 0x10; + setParameterValue(pSaw, (sw1 & 0x10) ? 1.0f : 0.0f); break; case btnCh0: sw1 = (sw1 & 0x1f) | 0x20; diff --git a/plugin/ui.hpp b/plugin/ui.hpp index 621812a..8cef38c 100644 --- a/plugin/ui.hpp +++ b/plugin/ui.hpp @@ -1,3 +1,21 @@ +/* + Peacock-8 VA polysynth + + Copyright 2025 Gordon JC Pearce + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + #ifndef _UI_HPP #define _UI_HPP