commit 62427f2f461e9deb16d10f47a11d4015d146f852
parent fda5490bd4141e53047a01b5eda0ccfffae33166
Author: AdamPorcineFudgepuppy <>
Date: Tue, 4 Jun 2024 12:40:23 -0500
toly pools add cv values to knob, bump version and docs
Diffstat:
4 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG.MD b/CHANGELOG.MD
@@ -1,3 +1,8 @@
+# 2.1.7
+- Update build to use plugin build toolchain github actions image
+- Toly Pools v2 adds CV values to knob values as is the standard
+- Fix Toly Pools v2 crash when disconnecting input cable
+
# 2.1.1
Toly Pools
- Make a new module with new slug, Toly Pools v2 with better rotation options and behavior
diff --git a/doc/poly-utilities.md b/doc/poly-utilities.md
@@ -25,8 +25,8 @@ Sequentially output the individual channel voltages of a polyphonic signal. Con
* Display input channel count
* CV output of the input channel count (1 - 16 channels is linearly mapped to 0 - 10 volts)
-* Knob and CV for setting output channel count (0 - 10 volts linearly mapped to 1-16 output channels)
-* Knob and CV for rotating the polyphonic signal (0 - 10 volts sets rotation of 0-15 channels. For example: rotation of "1" will move input channel 2 -> output channel 1, input channel 3->output channel 2, ... input channel 16 -> output channel 1)
+* Knob and CV for setting output channel count (0 - 10 volts linearly mapped to 1-16 output channels). CV value is multiplied by 1.6 and added to knob value
+* Knob and CV for rotating the polyphonic signal (-10v thru +10v sets rotation of -16 to +16 channels. For example: rotation of "1" will move input channel 2 -> output channel 1, input channel 3->output channel 2, ... input channel 16 -> output channel 1). CV value is multiplied by 1.6 and added to knob value.
* The default output polyphony setting is "A": Automatic which will set the output polyphony equal to the input polyphony
* Different rotation modes via context menu:
- "Repeat Input Channels": If the output polyphony is set higher than input polyphony (channel count), the input channels will be repeated to fill the output
diff --git a/plugin.json b/plugin.json
@@ -1,6 +1,6 @@
{
"slug": "computerscare",
- "version": "2.1.6",
+ "version": "2.1.7",
"name": "computerscare",
"brand": "computerscare",
"author": "computerscare",
diff --git a/src/ComputerscareTolyPools-v2.cpp b/src/ComputerscareTolyPools-v2.cpp
@@ -24,13 +24,15 @@ rotate 4,clip 4
*/
-
-
struct ComputerscareTolyPoolsV2 : Module {
int counter = 83910;
int numOutputChannelsControlValue = 0;
int numOutputChannels = 1;
int rotation = 0;
+
+ int knobRotation=0;
+ int numChannelsKnob = 0;
+
int numInputChannels = 1;
int rotationModeEnum=0;
@@ -63,9 +65,9 @@ struct ComputerscareTolyPoolsV2 : Module {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
- configParam(ROTATE_KNOB, -16.f, 16.f, 0.f, "Rotate", " channels");
+ configParam(ROTATE_KNOB, -16.f, 16.f, 0.f, "Rotation Offset", " channels");
- configParam<AutoParamQuantity>(NUM_CHANNELS_KNOB, 0.f, 16.f, 0.f, "Number of Output Channels");
+ configParam<AutoParamQuantity>(NUM_CHANNELS_KNOB, 0.f, 16.f, 0.f, "Number of Output Channels Offset");
configInput(POLY_INPUT, "Main");
configInput(ROTATE_CV, "Rotation CV");
@@ -76,19 +78,28 @@ struct ComputerscareTolyPoolsV2 : Module {
}
void process(const ProcessArgs &args) override {
counter++;
+
+ int cvRotation = 0;
+ int cvOutputChannels = 0;
+
if (counter > 982) {
counter = 0;
- numOutputChannelsControlValue = params[NUM_CHANNELS_KNOB].getValue();
- rotation = params[ROTATE_KNOB].getValue();
+ numChannelsKnob = params[NUM_CHANNELS_KNOB].getValue();
+ knobRotation = (int) round(params[ROTATE_KNOB].getValue());
numInputChannels = inputs[POLY_INPUT].getChannels();
}
if (inputs[NUM_CHANNELS_CV].isConnected()) {
- numOutputChannelsControlValue = mapVoltageToChannelCount(inputs[NUM_CHANNELS_CV].getVoltage(0));
+ cvOutputChannels = (int) round(inputs[NUM_CHANNELS_CV].getVoltage(0)*1.6f);
}
if (inputs[ROTATE_CV].isConnected()) {
- rotation = mapVoltageToChannelCount(inputs[ROTATE_CV].getVoltage(0));
+ cvRotation = (int) round(inputs[ROTATE_CV].getVoltage(0) * 1.6f);
}
+ rotation = knobRotation+cvRotation;
+
+ numOutputChannelsControlValue = math::clamp(cvOutputChannels+numChannelsKnob,0,16);
+
+
if(numOutputChannelsControlValue == 0) {
numOutputChannels = numInputChannels;
} else {
@@ -116,7 +127,6 @@ struct ComputerscareTolyPoolsV2 : Module {
for (int i = 0; i < numOutputChannels; i++) {
outputs[POLY_OUTPUT].setVoltage(0.f, i);
}
- }
}
}