basic patch support

This commit is contained in:
Gordon JC Pearce 2024-09-10 14:57:56 +01:00
parent 210401d6ed
commit 788b94993a
6 changed files with 262 additions and 11 deletions

View File

@ -27,7 +27,7 @@
#define DISTRHO_PLUGIN_IS_SYNTH 1 #define DISTRHO_PLUGIN_IS_SYNTH 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1 #define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_WANT_PROGRAMS 0 #define DISTRHO_PLUGIN_WANT_PROGRAMS 1
enum Parameters { enum Parameters {
paramProg, paramProg,

View File

@ -18,9 +18,11 @@
#include "chassis.hpp" #include "chassis.hpp"
#include "patches.hpp"
START_NAMESPACE_DISTRHO START_NAMESPACE_DISTRHO
Chassis::Chassis() : Plugin(parameterCount, 0, 0), sampleRate(getSampleRate()) { // one parameter, no programs, no states Chassis::Chassis() : Plugin(parameterCount, 128, 0), sampleRate(getSampleRate()) { // one parameter, no programs, no states
} }
// Initialisation functions // Initialisation functions
@ -33,12 +35,50 @@ void Chassis::initAudioPort(bool input, uint32_t index, AudioPort &port) {
if (!input && index == 1) port.name = "Right Out"; if (!input && index == 1) port.name = "Right Out";
} }
void Chassis::initProgramName(uint32_t index, String &programName) {
programName = patchName[index & 0x7f].c_str();
}
void Chassis::loadProgram(uint32_t index) {
uint8_t paramOrder[16] = {
paramLFORate,
paramLFODelay,
paramVCOLFO,
paramPWMLFO,
paramNoise,
paramVCFFreq,
paramVCFReso,
paramVCFEnv,
paramVCFLFO,
paramVCFKey,
paramVCALevel,
paramAttack,
paramDecay,
paramSustain,
paramRelease,
paramSub};
for (uint i = 0; i < 16; i++) {
setParameterValue(paramOrder[i], (float)patchData[index][i]);
}
setParameterValue(paramVCORange, patchData[index][16] & 0x07);
setParameterValue(paramSaw, (patchData[index][16] & 0x10) ? 127.0f : 0.0f);
setParameterValue(paramSqr, (patchData[index][16] & 0x08) ? 127.0f : 0.0f);
// FIXME chorus switch settings
setParameterValue(paramPWMMode, (patchData[index][17] & 0x01) ? 127.0f : 0.0f);
setParameterValue(paramVCFMode, (patchData[index][17] & 0x02) ? 127.0f : 0.0f);
setParameterValue(paramEnvGate, (patchData[index][17] & 0x04) ? 127.0f : 0.0f);
setParameterValue(paramHPF, (patchData[index][17] & 0x18) >> 3);
}
// Processing functions // Processing functions
void Chassis::activate() { void Chassis::activate() {
// calculate filter coefficients and stuff // calculate filter coefficients and stuff
printf("called activate()\n"); printf("called activate()\n");
// printf("p = %s", patchName[0].c_str());
for (uint8_t i = 0; i < 104; i++) { for (uint8_t i = 0; i < 104; i++) {
s.pitchCV[i] = (440.0f * powf(2, (i - 49) / 12.0f)) / sampleRate; s.pitchCV[i] = (440.0f * powf(2, (i - 49) / 12.0f)) / sampleRate;
} }
@ -117,7 +157,6 @@ void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEv
bzero(outputs[0], sizeof(float) * frames); bzero(outputs[0], sizeof(float) * frames);
bzero(outputs[1], sizeof(float) * frames); bzero(outputs[1], sizeof(float) * frames);
// get any of the last block's worth of MIDI out of the way // get any of the last block's worth of MIDI out of the way
lastEvent = 0; lastEvent = 0;
doMidi(midiEvents, midiEventCount, s.blockLeft); doMidi(midiEvents, midiEventCount, s.blockLeft);
@ -147,7 +186,7 @@ void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEv
// printf("voice %d note = %02x ff71 = %04x\n",i, s.voice[i].note, s.voice[i].ff71 ); // printf("voice %d note = %02x ff71 = %04x\n",i, s.voice[i].note, s.voice[i].ff71 );
s.voice[i].envelope(s); s.voice[i].envelope(s);
s.voice[i].calcFilter(s); s.voice[i].calcFilter(s);
//printf("voice %d vcf level = %04x\n", i, s.voice[i].vcfenv ); // printf("voice %d vcf level = %04x\n", i, s.voice[i].vcfenv );
} }
} }
@ -161,7 +200,6 @@ void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEv
s.voice[i].run(s, outputs[0] + framePos, sizeThisTime); s.voice[i].run(s, outputs[0] + framePos, sizeThisTime);
} }
framePos += sizeThisTime; framePos += sizeThisTime;
s.framesLeft -= sizeThisTime; s.framesLeft -= sizeThisTime;
s.blockLeft -= sizeThisTime; s.blockLeft -= sizeThisTime;

View File

@ -85,8 +85,8 @@ class Chassis : public Plugin {
void setParameterValue(uint32_t index, float value) override; void setParameterValue(uint32_t index, float value) override;
float getParameterValue(uint32_t index) const override; float getParameterValue(uint32_t index) const override;
// void initProgramName(uint32_t index, String &programName) override; void initProgramName(uint32_t index, String &programName) override;
// void loadProgram(uint32_t index) override; void loadProgram(uint32_t index) override;
// Processing // Processing
void activate() override; void activate() override;

View File

@ -72,7 +72,7 @@ void Chassis::initParameter(uint32_t index, Parameter &parameter) {
case paramPWMMode: case paramPWMMode:
parameter.hints = kParameterIsAutomatable | kParameterIsBoolean; parameter.hints = kParameterIsAutomatable | kParameterIsBoolean;
parameter.name = "LFO/Manual"; parameter.name = "PWM Mode";
parameter.symbol = "ch_pwmmode"; parameter.symbol = "ch_pwmmode";
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
parameter.ranges.max = 127.0f; parameter.ranges.max = 127.0f;
@ -227,7 +227,7 @@ void Chassis::initParameter(uint32_t index, Parameter &parameter) {
case paramEnvGate: case paramEnvGate:
parameter.hints = kParameterIsAutomatable | kParameterIsBoolean; parameter.hints = kParameterIsAutomatable | kParameterIsBoolean;
parameter.name = "Env / Gate"; parameter.name = "Env-Gate";
parameter.symbol = "ch_envgate"; parameter.symbol = "ch_envgate";
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
parameter.ranges.max = 127.0f; parameter.ranges.max = 127.0f;
@ -365,14 +365,62 @@ void Chassis::setParameterValue(uint32_t index, float value) {
float Chassis::getParameterValue(uint32_t index) const { float Chassis::getParameterValue(uint32_t index) const {
// printf("getparametervalue %d\n", index); // printf("getparametervalue %d\n", index);
switch (index) { switch (index) {
case paramLFORate:
return s.patchRam.lfoRate;
break;
case paramLFODelay:
return s.patchRam.lfoDelay;
break;
case paramVCORange:
// FIXME this needs to be better generally
return (s.patchRam.switch1 & 0x07) << 1;
break;
case paramVCOLFO:
return s.patchRam.vcoLfo;
break;
case paramPWMLFO:
return s.patchRam.pwmLfo * 1.27f;
break;
case paramPWMMode:
return (s.patchRam.switch2 & 0x01) ? 127.0f : 0.0f;
break;
case paramSaw: case paramSaw:
return (s.patchRam.switch1 & 0x10) ? 127.0f : 0.0f; return (s.patchRam.switch1 & 0x10) ? 127.0f : 0.0f;
break; break;
case paramSqr: case paramSqr:
return (s.patchRam.switch1 & 0x08) ? 127.0f : 0.0f; return (s.patchRam.switch1 & 0x08) ? 127.0f : 0.0f;
break; break;
case paramSub:
return s.patchRam.sub;
break;
case paramNoise:
return s.patchRam.noise;
break;
case paramHPF:
return (s.patchRam.switch2 & 0x18) >> 3;
break;
case paramVCFFreq:
return s.patchRam.vcfFreq;
break;
case paramVCFReso:
return s.patchRam.vcfReso;
break;
case paramVCFEnv:
return s.patchRam.vcfEnv;
break;
case paramVCFLFO:
return s.patchRam.vcfLfo;
break;
case paramVCFKey:
return s.patchRam.vcfKey;
break;
case paramVCFMode:
return (s.patchRam.switch2 & 0x02) ? 127.0f : 0.0f;
break;
case paramAttack: case paramAttack:
return s.patchRam.env_a; return s.patchRam.env_a;
break; break;
@ -385,6 +433,14 @@ float Chassis::getParameterValue(uint32_t index) const {
case paramRelease: case paramRelease:
return s.patchRam.env_r; return s.patchRam.env_r;
break; break;
case paramEnvGate:
return (s.patchRam.switch2 & 0x04) ? 127.0f : 0.0f;
break;
case paramVCALevel:
return s.patchRam.vca;
break;
} }
return 0; return 0;
} }

157
plugin/patches.hpp Normal file
View File

@ -0,0 +1,157 @@
#pragma once
#include <stdint.h>
#include <string>
#include "DistrhoPlugin.hpp"
const std::string patchName[] = {
"Brass Set 1", "Brass Swell", "Trumpet", "Flutes", "Moving Strings", "Brass & Strings", "Choir", "Piano I",
"Organ I", "Organ II", "Combo Organ", "Calliope", "Donald Pluck", "Celeste* (1 oct.up)", "Elect. Piano I",
"Elect. Piano II", "Clock Chimes* (1 oct. up)", "Steel Drums", "Xylophone", "Brass III", "Fanfare", "String III",
"Pizzicato", "High Strings", "Bass clarinet", "English Horn", "Brass Ensemble", "Guitar", "Koto", "Dark Pluck",
"Funky I", "Synth Bass I (unison)", "Lead I", "Lead II", "Lead III", "Funky II", "Synth Bass II", "Funky III",
"Thud Wah", "Going Up", "Piano II", "Clav", "Frontier Organ", "Snare Drum (unison)", "Tom Toms (unison)",
"Timpani (unison)", "Shaker", "Synth Pad", "Sweep I", "Pluck Sweep", "Repeater", "Sweep II", "Pluck Bell",
"Dark Synth Piano", "Sustainer", "Wah Release", "Gong (play low chords)", "Resonance Funk",
"Drum Booms* (1 oct. down)", "Dust Storm", "Rocket Men", "Hand Claps", "FX Sweep", "Caverns", "Strings",
"Violin", "Chorus Vibes", "Organ 1", "Harpsichord 1", "Recorder", "Perc. Pluck", "Noise Sweep", "Space Chimes",
"Nylon Guitar", "Orchestral Pad", "Bright Pluck", "Organ Bell", "Accordion", "FX Rise 1", "FX Rise 2", "Brass",
"Helicopter", "Lute", "Chorus Funk", "Tomita", "FX Sweep 1", "Sharp Reed", "Bass Pluck", "Resonant Rise",
"Harpsichord 2", "Dark Ensemble", "Contact Wah", "Noise Sweep 2", "Glassy Wah", "Phase Ensemble", "Chorused Bell",
"Clav", "Organ 2", "Bassoon", "Auto Release Noise Sweep", "Brass Ensemble", "Ethereal", "Chorus Bell 2",
"Blizzard", "E. Piano with Tremolo", "Clarinet", "Thunder", "Reedy Organ", "Flute / Horn", "Toy Rhodes",
"Surf's Up", "OW Bass", "Piccolo", "Melodic Taps", "Meow Brass", "Violin (high)", "High Bells", "Rolling Wah",
"Ping Bell", "Brassy Organ", "Low Dark Strings", "Piccolo Trumpet", "Cello", "High Strings", "Rocket Men",
"Forbidden Planet", "Froggy", "Owgan"};
const uint8_t patchData[128][18] = {
{0x14, 0x31, 0x00, 0x66, 0x00, 0x23, 0x0d, 0x3a, 0x00, 0x56, 0x6c, 0x03, 0x31, 0x2d, 0x20, 0x00, 0x51, 0x11},
{0x06, 0x30, 0x00, 0x38, 0x00, 0x2b, 0x11, 0x1a, 0x00, 0x54, 0x4b, 0x40, 0x76, 0x26, 0x25, 0x46, 0x52, 0x19},
{0x34, 0x2d, 0x08, 0x66, 0x00, 0x37, 0x22, 0x18, 0x01, 0x3b, 0x7f, 0x05, 0x42, 0x30, 0x10, 0x00, 0x32, 0x09},
{0x3c, 0x2b, 0x01, 0x00, 0x00, 0x37, 0x20, 0x0a, 0x0b, 0x29, 0x7f, 0x17, 0x51, 0x00, 0x12, 0x00, 0x32, 0x01},
{0x3f, 0x00, 0x00, 0x27, 0x00, 0x4d, 0x14, 0x04, 0x00, 0x6f, 0x22, 0x0d, 0x57, 0x58, 0x23, 0x0e, 0x1a, 0x10},
{0x23, 0x00, 0x00, 0x38, 0x00, 0x4c, 0x11, 0x04, 0x00, 0x29, 0x4e, 0x2c, 0x42, 0x35, 0x2c, 0x17, 0x49, 0x18},
{0x3b, 0x0e, 0x0d, 0x19, 0x00, 0x3b, 0x5e, 0x02, 0x00, 0x3e, 0x7f, 0x44, 0x0b, 0x7f, 0x30, 0x00, 0x4a, 0x09},
{0x14, 0x31, 0x00, 0x50, 0x00, 0x41, 0x0c, 0x0a, 0x00, 0x1b, 0x67, 0x00, 0x42, 0x00, 0x1e, 0x56, 0x2a, 0x11},
{0x36, 0x0f, 0x00, 0x35, 0x00, 0x2b, 0x4c, 0x0e, 0x01, 0x7f, 0x64, 0x00, 0x0a, 0x52, 0x00, 0x17, 0x29, 0x1c},
{0x2c, 0x0f, 0x00, 0x35, 0x00, 0x35, 0x4c, 0x0e, 0x01, 0x55, 0x4a, 0x00, 0x0a, 0x52, 0x00, 0x3a, 0x4a, 0x1c},
{0x4b, 0x15, 0x09, 0x39, 0x00, 0x3f, 0x46, 0x04, 0x00, 0x6d, 0x60, 0x00, 0x30, 0x2b, 0x2e, 0x3d, 0x2c, 0x0d},
{0x52, 0x28, 0x0b, 0x00, 0x00, 0x57, 0x1b, 0x11, 0x00, 0x38, 0x59, 0x07, 0x7f, 0x7f, 0x06, 0x30, 0x4a, 0x0b},
{0x4c, 0x15, 0x09, 0x39, 0x00, 0x49, 0x69, 0x0f, 0x00, 0x4e, 0x52, 0x02, 0x05, 0x2b, 0x0a, 0x7f, 0x2c, 0x07},
{0x1c, 0x00, 0x00, 0x00, 0x00, 0x21, 0x18, 0x36, 0x00, 0x26, 0x60, 0x00, 0x2c, 0x00, 0x51, 0x0f, 0x2c, 0x19},
{0x3b, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1f, 0x3d, 0x06, 0x23, 0x7f, 0x01, 0x55, 0x2b, 0x28, 0x00, 0x29, 0x01},
{0x00, 0x00, 0x00, 0x47, 0x00, 0x32, 0x45, 0x07, 0x00, 0x50, 0x66, 0x00, 0x44, 0x00, 0x16, 0x00, 0x49, 0x11},
{0x3b, 0x00, 0x00, 0x00, 0x16, 0x2c, 0x7f, 0x00, 0x00, 0x7f, 0x68, 0x00, 0x30, 0x00, 0x33, 0x7f, 0x44, 0x1b},
{0x21, 0x35, 0x00, 0x20, 0x09, 0x47, 0x2e, 0x1a, 0x00, 0x7f, 0x7f, 0x00, 0x1a, 0x00, 0x25, 0x21, 0x4a, 0x1b},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x18, 0x36, 0x00, 0x33, 0x7f, 0x00, 0x1d, 0x1d, 0x26, 0x0f, 0x2c, 0x19},
{0x34, 0x14, 0x00, 0x23, 0x00, 0x42, 0x18, 0x0b, 0x00, 0x0c, 0x7f, 0x3a, 0x64, 0x5e, 0x25, 0x16, 0x52, 0x19},
{0x2f, 0x00, 0x00, 0x46, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x43, 0x21, 0x48, 0x68, 0x4b, 0x31, 0x32, 0x59, 0x18},
{0x30, 0x1b, 0x00, 0x66, 0x00, 0x47, 0x0e, 0x00, 0x00, 0x54, 0x49, 0x3f, 0x1f, 0x7f, 0x2d, 0x00, 0x1a, 0x10},
{0x3c, 0x12, 0x00, 0x66, 0x00, 0x42, 0x02, 0x05, 0x00, 0x2a, 0x7f, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x5a, 0x00},
{0x3a, 0x0e, 0x00, 0x66, 0x00, 0x54, 0x08, 0x02, 0x00, 0x47, 0x4d, 0x12, 0x2c, 0x7f, 0x28, 0x00, 0x0c, 0x08},
{0x34, 0x2d, 0x08, 0x00, 0x00, 0x30, 0x24, 0x19, 0x08, 0x3a, 0x68, 0x0b, 0x4b, 0x00, 0x19, 0x00, 0x29, 0x11},
{0x2f, 0x2d, 0x09, 0x66, 0x00, 0x46, 0x30, 0x07, 0x00, 0x1b, 0x7f, 0x08, 0x51, 0x1a, 0x10, 0x00, 0x2a, 0x01},
{0x34, 0x2d, 0x00, 0x66, 0x00, 0x2e, 0x2c, 0x1d, 0x01, 0x3b, 0x67, 0x10, 0x67, 0x61, 0x22, 0x1f, 0x52, 0x11},
{0x56, 0x3a, 0x00, 0x41, 0x00, 0x0c, 0x0f, 0x47, 0x00, 0x1e, 0x60, 0x00, 0x34, 0x36, 0x1f, 0x00, 0x39, 0x11},
{0x5a, 0x1c, 0x00, 0x5e, 0x00, 0x28, 0x3a, 0x1d, 0x00, 0x4b, 0x7f, 0x00, 0x38, 0x00, 0x27, 0x02, 0x4a, 0x01},
{0x1f, 0x00, 0x00, 0x57, 0x00, 0x26, 0x3d, 0x1b, 0x00, 0x47, 0x5a, 0x00, 0x34, 0x0f, 0x3f, 0x61, 0x0a, 0x19},
{0x04, 0x00, 0x00, 0x49, 0x00, 0x1f, 0x17, 0x33, 0x00, 0x29, 0x47, 0x00, 0x1e, 0x24, 0x02, 0x40, 0x59, 0x1d},
{0x3a, 0x10, 0x01, 0x39, 0x32, 0x20, 0x00, 0x42, 0x00, 0x23, 0x4b, 0x00, 0x22, 0x00, 0x24, 0x66, 0x29, 0x19},
{0x48, 0x58, 0x12, 0x00, 0x00, 0x28, 0x61, 0x24, 0x00, 0x34, 0x63, 0x00, 0x2d, 0x49, 0x00, 0x00, 0x2a, 0x1d},
{0x18, 0x58, 0x00, 0x35, 0x00, 0x2d, 0x00, 0x2b, 0x00, 0x34, 0x38, 0x01, 0x17, 0x5b, 0x4b, 0x4f, 0x39, 0x14},
{0x56, 0x47, 0x15, 0x66, 0x00, 0x3c, 0x1f, 0x12, 0x01, 0x4c, 0x7f, 0x00, 0x42, 0x30, 0x0b, 0x00, 0x32, 0x15},
{0x04, 0x00, 0x00, 0x30, 0x00, 0x05, 0x17, 0x51, 0x00, 0x29, 0x64, 0x00, 0x1e, 0x27, 0x02, 0x39, 0x4a, 0x15},
{0x5a, 0x15, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x2f, 0x00, 0x00, 0x4e, 0x00, 0x25, 0x09, 0x16, 0x2d, 0x31, 0x1c},
{0x04, 0x00, 0x00, 0x09, 0x65, 0x26, 0x36, 0x2d, 0x00, 0x0a, 0x4f, 0x00, 0x18, 0x00, 0x02, 0x7f, 0x39, 0x1d},
{0x3e, 0x00, 0x00, 0x66, 0x08, 0x4e, 0x59, 0x22, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x66, 0x2d, 0x20, 0x1a, 0x1a},
{0x00, 0x00, 0x00, 0x64, 0x1c, 0x4f, 0x7f, 0x25, 0x00, 0x41, 0x4b, 0x00, 0x6c, 0x12, 0x7f, 0x00, 0x22, 0x13},
{0x01, 0x00, 0x00, 0x48, 0x00, 0x2f, 0x00, 0x27, 0x00, 0x05, 0x4e, 0x00, 0x62, 0x00, 0x20, 0x73, 0x2a, 0x10},
{0x42, 0x0f, 0x01, 0x66, 0x00, 0x07, 0x0b, 0x56, 0x02, 0x00, 0x78, 0x00, 0x27, 0x30, 0x0e, 0x00, 0x49, 0x15},
{0x4f, 0x0f, 0x03, 0x55, 0x00, 0x45, 0x36, 0x00, 0x00, 0x34, 0x7f, 0x00, 0x00, 0x7f, 0x00, 0x1d, 0x2a, 0x1c},
{0x34, 0x1b, 0x00, 0x00, 0x5b, 0x5e, 0x0b, 0x11, 0x00, 0x00, 0x65, 0x00, 0x19, 0x00, 0x1e, 0x40, 0x22, 0x11},
{0x3e, 0x10, 0x08, 0x00, 0x7f, 0x35, 0x04, 0x28, 0x00, 0x15, 0x65, 0x00, 0x1e, 0x0f, 0x28, 0x3a, 0x21, 0x18},
{0x00, 0x00, 0x00, 0x23, 0x7f, 0x19, 0x00, 0x36, 0x00, 0x18, 0x7f, 0x01, 0x38, 0x1a, 0x47, 0x2f, 0x21, 0x11},
{0x15, 0x47, 0x00, 0x3a, 0x7f, 0x59, 0x2d, 0x01, 0x11, 0x50, 0x7f, 0x0a, 0x09, 0x00, 0x00, 0x00, 0x22, 0x01},
{0x38, 0x00, 0x05, 0x2b, 0x00, 0x25, 0x00, 0x54, 0x00, 0x7f, 0x33, 0x00, 0x55, 0x4b, 0x3e, 0x25, 0x0a, 0x18},
{0x4e, 0x00, 0x00, 0x66, 0x1c, 0x73, 0x28, 0x43, 0x00, 0x00, 0x61, 0x00, 0x3f, 0x7f, 0x52, 0x2a, 0x0c, 0x12},
{0x44, 0x30, 0x00, 0x44, 0x00, 0x3c, 0x6f, 0x09, 0x06, 0x62, 0x2d, 0x00, 0x5b, 0x00, 0x4d, 0x7d, 0x1a, 0x08},
{0x4d, 0x14, 0x09, 0x65, 0x00, 0x61, 0x1e, 0x38, 0x00, 0x39, 0x57, 0x0e, 0x00, 0x29, 0x00, 0x2c, 0x4a, 0x17},
{0x58, 0x48, 0x0f, 0x61, 0x00, 0x42, 0x66, 0x44, 0x00, 0x46, 0x65, 0x00, 0x59, 0x35, 0x4e, 0x30, 0x4a, 0x19},
{0x33, 0x00, 0x05, 0x11, 0x00, 0x27, 0x00, 0x31, 0x00, 0x7f, 0x31, 0x00, 0x55, 0x4b, 0x35, 0x31, 0x0c, 0x18},
{0x7f, 0x00, 0x00, 0x00, 0x00, 0x38, 0x56, 0x06, 0x00, 0x47, 0x4f, 0x00, 0x2f, 0x00, 0x32, 0x7f, 0x1a, 0x1a},
{0x47, 0x00, 0x05, 0x2e, 0x00, 0x27, 0x00, 0x54, 0x00, 0x7f, 0x39, 0x00, 0x55, 0x4b, 0x46, 0x31, 0x2a, 0x18},
{0x59, 0x0e, 0x01, 0x19, 0x00, 0x48, 0x58, 0x13, 0x00, 0x42, 0x68, 0x00, 0x54, 0x00, 0x1d, 0x57, 0x0a, 0x13},
{0x7f, 0x00, 0x00, 0x66, 0x38, 0x46, 0x6b, 0x05, 0x00, 0x48, 0x5b, 0x03, 0x30, 0x7f, 0x62, 0x00, 0x49, 0x13},
{0x3b, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x7f, 0x2d, 0x00, 0x59, 0x7f, 0x00, 0x13, 0x00, 0x16, 0x00, 0x21, 0x11},
{0x00, 0x00, 0x00, 0x66, 0x7f, 0x2a, 0x00, 0x22, 0x00, 0x3a, 0x7f, 0x00, 0x24, 0x0f, 0x31, 0x2e, 0x21, 0x19},
{0x00, 0x00, 0x00, 0x00, 0x7f, 0x34, 0x55, 0x00, 0x2c, 0x5e, 0x7f, 0x58, 0x5b, 0x1c, 0x55, 0x00, 0x21, 0x11},
{0x08, 0x20, 0x00, 0x66, 0x61, 0x49, 0x72, 0x08, 0x00, 0x38, 0x7f, 0x00, 0x59, 0x7f, 0x68, 0x00, 0x24, 0x03},
{0x3b, 0x00, 0x00, 0x00, 0x7f, 0x11, 0x58, 0x36, 0x00, 0x37, 0x7f, 0x01, 0x0b, 0x00, 0x08, 0x00, 0x21, 0x05},
{0x7f, 0x41, 0x74, 0x66, 0x7f, 0x47, 0x2c, 0x53, 0x00, 0x5e, 0x7f, 0x00, 0x5e, 0x00, 0x70, 0x7f, 0x29, 0x12},
{0x00, 0x00, 0x00, 0x66, 0x7f, 0x44, 0x76, 0x00, 0x00, 0x45, 0x6b, 0x00, 0x0d, 0x26, 0x2f, 0x00, 0x21, 0x08},
{0x39, 0x2d, 0x00, 0x37, 0x00, 0x55, 0x00, 0x00, 0x00, 0x6c, 0x34, 0x3b, 0x20, 0x56, 0x28, 0x00, 0x1a, 0x18},
{0x42, 0x2d, 0x14, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x78, 0x6e, 0x2b, 0x2d, 0x39, 0x1a, 0x00, 0x32, 0x18},
{0x48, 0x2d, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x3b, 0x00, 0x17, 0x58, 0x00, 0x59, 0x2f, 0x4a, 0x00, 0x4a, 0x19},
{0x2d, 0x2a, 0x00, 0x49, 0x00, 0x3c, 0x48, 0x0e, 0x00, 0x7f, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x61, 0x0a, 0x1d},
{0x17, 0x00, 0x00, 0x36, 0x00, 0x7f, 0x7f, 0x5a, 0x00, 0x56, 0x7d, 0x00, 0x3c, 0x00, 0x1f, 0x23, 0x2c, 0x00},
{0x4e, 0x00, 0x00, 0x08, 0x00, 0x06, 0x00, 0x2e, 0x00, 0x7f, 0x7f, 0x05, 0x15, 0x7f, 0x1e, 0x00, 0x2a, 0x11},
{0x3e, 0x26, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x49, 0x41, 0x00, 0x10, 0x4e, 0x74, 0x00, 0x4a, 0x19},
{0x7f, 0x00, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x4d, 0x00, 0x68, 0x5c, 0x0e, 0x4e, 0x6c, 0x78, 0x00, 0x21, 0x18},
{0x63, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7f, 0x00, 0x00, 0x4a, 0x55, 0x00, 0x19, 0x00, 0x3c, 0x00, 0x4c, 0x18},
{0x48, 0x2d, 0x00, 0x1d, 0x00, 0x39, 0x00, 0x1a, 0x00, 0x19, 0x73, 0x00, 0x59, 0x00, 0x20, 0x00, 0x2a, 0x01},
{0x16, 0x2d, 0x00, 0x69, 0x00, 0x21, 0x00, 0x37, 0x00, 0x24, 0x00, 0x1d, 0x58, 0x32, 0x34, 0x7f, 0x1a, 0x18},
{0x00, 0x00, 0x00, 0x3a, 0x00, 0x39, 0x00, 0x28, 0x00, 0x56, 0x68, 0x00, 0x19, 0x2a, 0x2c, 0x00, 0x2a, 0x11},
{0x4e, 0x00, 0x06, 0x44, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x7f, 0x3e, 0x00, 0x00, 0x7f, 0x1a, 0x55, 0x5a, 0x19},
{0x00, 0x00, 0x00, 0x40, 0x00, 0x4d, 0x00, 0x0e, 0x00, 0x4a, 0x42, 0x08, 0x0b, 0x6e, 0x09, 0x50, 0x5a, 0x01},
{0x74, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x7f, 0x10, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x7f, 0x54, 0x00, 0x44, 0x1a},
{0x6c, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x7f, 0x50, 0x17, 0x7f, 0x00, 0x00, 0x7f, 0x33, 0x47, 0x00, 0x02, 0x1a},
{0x33, 0x7f, 0x00, 0x49, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x7f, 0x48, 0x03, 0x2c, 0x33, 0x0b, 0x00, 0x52, 0x1c},
{0x6a, 0x00, 0x00, 0x30, 0x00, 0x52, 0x05, 0x5d, 0x7f, 0x00, 0x48, 0x00, 0x00, 0x23, 0x4c, 0x7f, 0x0a, 0x1b},
{0x34, 0x00, 0x02, 0x69, 0x00, 0x1d, 0x00, 0x23, 0x00, 0x56, 0x7f, 0x00, 0x30, 0x22, 0x57, 0x00, 0x2a, 0x19},
{0x4d, 0x5e, 0x00, 0x49, 0x00, 0x2f, 0x22, 0x35, 0x00, 0x41, 0x2a, 0x00, 0x0b, 0x22, 0x00, 0x4f, 0x5a, 0x1d},
{0x4e, 0x00, 0x00, 0x69, 0x00, 0x31, 0x7d, 0x0f, 0x02, 0x7f, 0x39, 0x00, 0x0e, 0x4f, 0x00, 0x00, 0x24, 0x1f},
{0x7f, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x7f, 0x10, 0x4c, 0x40, 0x00, 0x00, 0x00, 0x7f, 0x55, 0x00, 0x44, 0x18},
{0x15, 0x00, 0x00, 0x49, 0x00, 0x21, 0x00, 0x35, 0x00, 0x41, 0x37, 0x02, 0x12, 0x70, 0x00, 0x00, 0x3c, 0x1c},
{0x00, 0x00, 0x00, 0x3c, 0x00, 0x25, 0x1d, 0x1c, 0x00, 0x2b, 0x5c, 0x00, 0x2a, 0x23, 0x00, 0x00, 0x39, 0x18},
{0x34, 0x00, 0x0f, 0x00, 0x00, 0x42, 0x6b, 0x1f, 0x00, 0x49, 0x3e, 0x00, 0x34, 0x27, 0x00, 0x00, 0x11, 0x1e},
{0x00, 0x00, 0x00, 0x69, 0x00, 0x7f, 0x5f, 0x00, 0x00, 0x7f, 0x6b, 0x00, 0x2d, 0x00, 0x00, 0x23, 0x3c, 0x11},
{0x00, 0x00, 0x00, 0x39, 0x00, 0x37, 0x00, 0x00, 0x00, 0x6b, 0x43, 0x15, 0x00, 0x7f, 0x23, 0x4b, 0x5a, 0x1b},
{0x4e, 0x00, 0x00, 0x51, 0x00, 0x3d, 0x65, 0x2e, 0x00, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x17},
{0x7f, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x53, 0x00, 0x68, 0x74, 0x7f, 0x4f, 0x1a, 0x53, 0x00, 0x44, 0x1a},
{0x00, 0x5e, 0x00, 0x1c, 0x00, 0x18, 0x22, 0x3d, 0x00, 0x41, 0x70, 0x06, 0x12, 0x32, 0x26, 0x00, 0x2a, 0x19},
{0x0b, 0x2d, 0x05, 0x69, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x7f, 0x63, 0x54, 0x2d, 0x39, 0x31, 0x00, 0x0a, 0x18},
{0x00, 0x0b, 0x00, 0x69, 0x00, 0x3b, 0x7f, 0x00, 0x00, 0x7f, 0x3e, 0x00, 0x3e, 0x00, 0x39, 0x65, 0x4c, 0x18},
{0x32, 0x0b, 0x00, 0x5b, 0x00, 0x20, 0x00, 0x3f, 0x00, 0x00, 0x6c, 0x00, 0x2b, 0x37, 0x00, 0x07, 0x29, 0x09},
{0x51, 0x00, 0x00, 0x68, 0x00, 0x36, 0x6a, 0x07, 0x00, 0x7f, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x1d},
{0x54, 0x26, 0x09, 0x5a, 0x00, 0x23, 0x00, 0x2b, 0x09, 0x62, 0x7f, 0x05, 0x7f, 0x6a, 0x02, 0x00, 0x29, 0x01},
{0x7f, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x7f, 0x00, 0x68, 0x6b, 0x00, 0x4f, 0x39, 0x53, 0x00, 0x44, 0x1a},
{0x19, 0x5e, 0x00, 0x49, 0x00, 0x2f, 0x22, 0x23, 0x00, 0x41, 0x27, 0x06, 0x44, 0x43, 0x26, 0x00, 0x5a, 0x18},
{0x45, 0x00, 0x00, 0x69, 0x00, 0x2f, 0x78, 0x00, 0x00, 0x7f, 0x3c, 0x5c, 0x32, 0x7f, 0x37, 0x3b, 0x1a, 0x18},
{0x48, 0x2d, 0x00, 0x1d, 0x00, 0x00, 0x66, 0x3e, 0x00, 0x5a, 0x1e, 0x00, 0x75, 0x00, 0x78, 0x00, 0x5a, 0x19},
{0x01, 0x00, 0x00, 0x69, 0x7f, 0x38, 0x59, 0x07, 0x26, 0x79, 0x7f, 0x4e, 0x62, 0x57, 0x4e, 0x00, 0x24, 0x00},
{0x2c, 0x00, 0x00, 0x15, 0x00, 0x16, 0x00, 0x23, 0x07, 0x6b, 0x67, 0x00, 0x41, 0x3c, 0x62, 0x7f, 0x2c, 0x10},
{0x45, 0x16, 0x09, 0x00, 0x00, 0x23, 0x00, 0x2b, 0x07, 0x62, 0x68, 0x05, 0x7f, 0x6a, 0x07, 0x00, 0x2a, 0x01},
{0x7f, 0x00, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x4d, 0x00, 0x68, 0x6b, 0x00, 0x16, 0x6c, 0x78, 0x00, 0x21, 0x18},
{0x23, 0x12, 0x00, 0x49, 0x00, 0x21, 0x00, 0x35, 0x00, 0x41, 0x45, 0x03, 0x2c, 0x6d, 0x00, 0x00, 0x2a, 0x1c},
{0x22, 0x00, 0x00, 0x3b, 0x00, 0x19, 0x00, 0x2a, 0x00, 0x41, 0x16, 0x15, 0x49, 0x47, 0x30, 0x00, 0x19, 0x18},
{0x1e, 0x2d, 0x7f, 0x00, 0x00, 0x3a, 0x7f, 0x00, 0x00, 0x7f, 0x6b, 0x00, 0x59, 0x00, 0x27, 0x00, 0x24, 0x00},
{0x01, 0x00, 0x00, 0x69, 0x7f, 0x54, 0x0b, 0x00, 0x31, 0x36, 0x4b, 0x21, 0x61, 0x7f, 0x79, 0x00, 0x24, 0x0a},
{0x32, 0x00, 0x00, 0x32, 0x00, 0x3f, 0x54, 0x41, 0x00, 0x7f, 0x46, 0x7f, 0x00, 0x6b, 0x00, 0x2f, 0x39, 0x1f},
{0x46, 0x1c, 0x00, 0x0e, 0x00, 0x04, 0x00, 0x3f, 0x10, 0x62, 0x57, 0x10, 0x67, 0x6a, 0x15, 0x00, 0x3c, 0x09},
{0x63, 0x00, 0x00, 0x00, 0x7f, 0x48, 0x70, 0x00, 0x00, 0x7f, 0x7f, 0x00, 0x18, 0x00, 0x18, 0x00, 0x41, 0x00},
{0x33, 0x7f, 0x00, 0x49, 0x00, 0x2d, 0x64, 0x23, 0x00, 0x41, 0x54, 0x04, 0x5a, 0x00, 0x1b, 0x00, 0x32, 0x1c},
{0x47, 0x2d, 0x16, 0x00, 0x00, 0x59, 0x00, 0x00, 0x03, 0x78, 0x55, 0x2b, 0x2d, 0x39, 0x1a, 0x00, 0x34, 0x18},
{0x1e, 0x2d, 0x7f, 0x00, 0x00, 0x4c, 0x7f, 0x00, 0x00, 0x7f, 0x6f, 0x00, 0x16, 0x34, 0x3b, 0x00, 0x24, 0x00},
{0x24, 0x00, 0x00, 0x69, 0x00, 0x3c, 0x09, 0x00, 0x7f, 0x00, 0x4d, 0x22, 0x37, 0x7f, 0x69, 0x00, 0x2a, 0x18},
{0x00, 0x0b, 0x00, 0x68, 0x00, 0x4c, 0x7f, 0x00, 0x00, 0x7f, 0x53, 0x00, 0x17, 0x17, 0x39, 0x00, 0x4c, 0x18},
{0x10, 0x00, 0x00, 0x44, 0x00, 0x08, 0x00, 0x57, 0x00, 0x34, 0x0e, 0x00, 0x24, 0x6d, 0x00, 0x38, 0x59, 0x18},
{0x15, 0x2d, 0x05, 0x51, 0x00, 0x47, 0x00, 0x00, 0x00, 0x67, 0x28, 0x53, 0x17, 0x6d, 0x2a, 0x00, 0x19, 0x18},
{0x33, 0x7f, 0x00, 0x49, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x7f, 0x61, 0x03, 0x2c, 0x33, 0x0b, 0x00, 0x32, 0x1c},
{0x39, 0x2d, 0x15, 0x00, 0x00, 0x4b, 0x00, 0x03, 0x01, 0x2d, 0x6d, 0x30, 0x41, 0x5a, 0x22, 0x00, 0x31, 0x18},
{0x50, 0x00, 0x0a, 0x46, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x47, 0x30, 0x1b, 0x39, 0x39, 0x29, 0x00, 0x1c, 0x18},
{0x6c, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x7f, 0x50, 0x3f, 0x7f, 0x00, 0x00, 0x7f, 0x33, 0x59, 0x00, 0x02, 0x1a},
{0x32, 0x0b, 0x00, 0x2c, 0x00, 0x1d, 0x04, 0x58, 0x05, 0x5f, 0x4f, 0x00, 0x30, 0x17, 0x2a, 0x09, 0x4c, 0x01},
{0x4e, 0x00, 0x00, 0x00, 0x00, 0x37, 0x7f, 0x2b, 0x00, 0x7f, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x29, 0x17},
{0x32, 0x00, 0x00, 0x2d, 0x00, 0x26, 0x54, 0x20, 0x00, 0x7f, 0x65, 0x00, 0x31, 0x37, 0x00, 0x38, 0x39, 0x19}};

View File

@ -329,7 +329,7 @@ h04ac: // pitch too high
void Voice::calcFilter(Synth &s) { void Voice::calcFilter(Synth &s) {
// 04d5 // 04d5
uint16_t a, bc, ea, hl, tos; uint16_t a, bc, ea, tos;
goto h04d5; goto h04d5;