pitch and wave buttons work
This commit is contained in:
parent
290962bf8c
commit
a12bbfbda7
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
Peacock-8 VA polysynth
|
||||||
|
|
||||||
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
|
|
||||||
|
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"
|
#include "artwork.hpp"
|
||||||
|
|
||||||
static const char temp1[] = {
|
static const char temp1[] = {
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,8 @@ void Module::run(Voice* voice) {
|
||||||
float p1 = pitchTable[semi], p2 = pitchTable[semi + 1];
|
float p1 = pitchTable[semi], p2 = pitchTable[semi + 1];
|
||||||
int16_t px = ((p2 - p1) * frac + p1);
|
int16_t px = ((p2 - p1) * frac + p1);
|
||||||
|
|
||||||
|
px <<= (patchRam.switch1 & 0x03);
|
||||||
|
|
||||||
v->omega = px / 192000.0f; // fixme use proper scaler
|
v->omega = px / 192000.0f; // fixme use proper scaler
|
||||||
|
|
||||||
// per voice we need to calculate the key follow amount and envelope amount
|
// per voice we need to calculate the key follow amount and envelope amount
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,20 @@
|
||||||
|
/*
|
||||||
|
Peacock-8 VA polysynth
|
||||||
|
|
||||||
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
|
|
||||||
|
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"
|
#include "artwork.hpp"
|
||||||
static const char tempOrngUp[] = {
|
static const char tempOrngUp[] = {
|
||||||
"jF#\377\213].\377\230e\062\377\223b\061\377\230e\062\377\224c\061\377\226d\061"
|
"jF#\377\213].\377\230e\062\377\223b\061\377\230e\062\377\224c\061\377\226d\061"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,20 @@
|
||||||
|
/*
|
||||||
|
Peacock-8 VA polysynth
|
||||||
|
|
||||||
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
|
|
||||||
|
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"
|
#include "artwork.hpp"
|
||||||
|
|
||||||
static const char tempLedOn[] = {
|
static const char tempLedOn[] = {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,20 @@
|
||||||
|
/*
|
||||||
|
Peacock-8 VA polysynth
|
||||||
|
|
||||||
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
|
|
||||||
|
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"
|
#include "artwork.hpp"
|
||||||
static const char temporng[] = {
|
static const char temporng[] = {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,21 @@
|
||||||
/* GIMP RGBA C-Source image dump (slideswitch.c) */
|
|
||||||
/*
|
/*
|
||||||
static const struct {
|
Peacock-8 VA polysynth
|
||||||
guint width;
|
|
||||||
guint height;
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
guint bytes_per_pixel;
|
|
||||||
guint8 pixel_data[23 * 24 * 4 + 1];
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
} gimp_image = {
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
23, 24, 4,
|
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"
|
#include "artwork.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,20 @@
|
||||||
|
/*
|
||||||
|
Peacock-8 VA polysynth
|
||||||
|
|
||||||
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
|
|
||||||
|
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"
|
#include "ui.hpp"
|
||||||
|
|
||||||
|
|
@ -161,7 +178,7 @@ DistrhoUIPeacock::DistrhoUIPeacock() : UI(Art::backgroundWidth, Art::backgroundH
|
||||||
xBtnCh2->setAbsolutePos(644, 293);
|
xBtnCh2->setAbsolutePos(644, 293);
|
||||||
xBtnCh2->setId(btnCh2);
|
xBtnCh2->setId(btnCh2);
|
||||||
xBtnCh2->setCallback(this);
|
xBtnCh2->setCallback(this);
|
||||||
//programLoaded(0);
|
// programLoaded(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DistrhoUIPeacock::~DistrhoUIPeacock() {
|
DistrhoUIPeacock::~DistrhoUIPeacock() {
|
||||||
|
|
@ -172,7 +189,7 @@ void DistrhoUIPeacock::programLoaded(uint32_t index) {
|
||||||
printf("programLoaded\n");
|
printf("programLoaded\n");
|
||||||
xSliderLFORate->setValue(63);
|
xSliderLFORate->setValue(63);
|
||||||
xSliderLFODelay->setValue(94);
|
xSliderLFODelay->setValue(94);
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
void DistrhoUIPeacock::parameterChanged(uint32_t index, float value) {
|
void DistrhoUIPeacock::parameterChanged(uint32_t index, float value) {
|
||||||
printf("Parameter has changed\n");
|
printf("Parameter has changed\n");
|
||||||
|
|
@ -266,7 +283,7 @@ void DistrhoUIPeacock::imageSliderDragFinished(ImageSlider* slider) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUIPeacock::imageSliderValueChanged(ImageSlider* slider, float value) {
|
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);
|
setParameterValue(slider->getId(), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -277,20 +294,25 @@ void DistrhoUIPeacock::imageButtonClicked(ImageButton* imgBtn, int) {
|
||||||
case btn16:
|
case btn16:
|
||||||
sw1 &= 0xf8;
|
sw1 &= 0xf8;
|
||||||
sw1 |= 0x01;
|
sw1 |= 0x01;
|
||||||
|
setParameterValue(pVCORange, 0);
|
||||||
break;
|
break;
|
||||||
case btn8:
|
case btn8:
|
||||||
sw1 &= 0xf8;
|
sw1 &= 0xf8;
|
||||||
sw1 |= 0x02;
|
sw1 |= 0x02;
|
||||||
|
setParameterValue(pVCORange, 1);
|
||||||
break;
|
break;
|
||||||
case btn4:
|
case btn4:
|
||||||
sw1 &= 0xf8;
|
sw1 &= 0xf8;
|
||||||
sw1 |= 0x04;
|
sw1 |= 0x04;
|
||||||
|
setParameterValue(pVCORange, 2);
|
||||||
break;
|
break;
|
||||||
case btnPls:
|
case btnPls:
|
||||||
sw1 ^= 0x08;
|
sw1 ^= 0x08;
|
||||||
|
setParameterValue(pSqr, (sw1 & 0x08) ? 1.0f : 0.0f);
|
||||||
break;
|
break;
|
||||||
case btnSaw:
|
case btnSaw:
|
||||||
sw1 ^= 0x10;
|
sw1 ^= 0x10;
|
||||||
|
setParameterValue(pSaw, (sw1 & 0x10) ? 1.0f : 0.0f);
|
||||||
break;
|
break;
|
||||||
case btnCh0:
|
case btnCh0:
|
||||||
sw1 = (sw1 & 0x1f) | 0x20;
|
sw1 = (sw1 & 0x1f) | 0x20;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
Peacock-8 VA polysynth
|
||||||
|
|
||||||
|
Copyright 2025 Gordon JC Pearce <gordonjcp@gjcp.net>
|
||||||
|
|
||||||
|
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
|
#ifndef _UI_HPP
|
||||||
#define _UI_HPP
|
#define _UI_HPP
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue