Skip to content

Commit 90ca2db

Browse files
committed
Initial v2 Conversion
Initial conversion from v1 to v2 Rack.
1 parent 16676ea commit 90ca2db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+8361
-1482
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SHELL:=/bin/bash -O extglob
44
RACK_DIR ?= ../..
55

66
#FLAGS += -w
7-
7+
88
# Add .cpp and .c files to the build
99
SOURCES = \
1010
$(wildcard lib/oscpack/ip/*.cpp) \
@@ -16,7 +16,8 @@ SOURCES = \
1616
# Static libraries are fine.
1717
include $(RACK_DIR)/arch.mk
1818

19-
ifeq ($(ARCH), win)
19+
MACHINE = $(shell $(CC) -dumpmachine)
20+
ifneq (, $(findstring mingw, $(MACHINE)))
2021
SOURCES += $(wildcard lib/oscpack/ip/win32/*.cpp)
2122
LDFLAGS += -lws2_32 -lwinmm
2223
LDFLAGS += -L$(RACK_DIR)/dep/lib #-lglew32 -lglfw3dll
@@ -25,6 +26,7 @@ else
2526
SOURCES += $(wildcard lib/oscpack/ip/posix/*.cpp)
2627
endif
2728

29+
2830
DISTRIBUTABLES += $(wildcard LICENSE*) res \
2931
pd other
3032
# ^ add our other folders (supplementary files)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# trowaSoft-VCV
2-
![trowaSoft Modules for VCV Rack](http://www.geekasaurusrex.net/image.axd?picture=2018%2f6%2f0.6.3_screenshot.png "trowaSoft Modules for VCV Rack")
2+
![trowaSoft Modules for VCV Rack](https://geekasaurusrex.azurewebsites.net/image.axd?picture=2018%2f6%2f0.6.3_screenshot.png "trowaSoft Modules for VCV Rack")
33

44
trowaSoft Modules plugin for [VCV Rack](https://github.com/VCVRack/Rack) v0.5.x, v0.6.x, v1.x.
55
The current pack includes [trigSeq & trigSeq64](#trigseq--trigseq64), [voltSeq](#voltseq), [multiWave](#multiwave), [multiScope](#multiscope), [cvOSCcv](#cvosccv), and [cvOSC & OSCcv](#cvosccv-expansion-modules).

plugin.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"slug": "trowaSoft",
33
"name": "trowaSoft",
4-
"version": "1.0.3",
4+
"version": "2.0.4",
55
"license": "BSD-3-Clause",
66
"author": "j4s0n-c",
77
"authorEmail": "",
@@ -19,7 +19,7 @@
1919
"Sequencer",
2020
"External"
2121
]
22-
},
22+
},
2323
{
2424
"slug": "trigSeq64",
2525
"name": "trigSeq64",
@@ -38,6 +38,15 @@
3838
"External"
3939
]
4040
},
41+
{
42+
"slug": "multiSeq64",
43+
"name": "multiSeq64",
44+
"description": "64-step trigger/variable voltage/note sequencer with a built-in Open Sound Control (OSC) interface. Basically, trigSeq and voltSeq combined into one.",
45+
"tags": [
46+
"Sequencer",
47+
"External"
48+
]
49+
},
4150
{
4251
"slug": "multiWave",
4352
"name": "multiWave",
Lines changed: 78 additions & 0 deletions
Loading

res/multiSeq.svg

Lines changed: 208 additions & 0 deletions
Loading

src/Module_multiOscillator.cpp

Lines changed: 89 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ multiOscillator::multiOscillator(int numOscillators, int numOscillatorOutputs) :
374374
const char* outputParamUnits[outputNumParamVals] = { "", " N/A", "°", "%", "" };
375375

376376

377+
int inputId = InputIds::OSC_INPUT_START;
378+
int outputId = OutputIds::OSC_OUTPUT_START;
377379
for (int i = 0; i < numOscillators; i++)
378380
{
379381
//--------------------------
@@ -399,17 +401,98 @@ multiOscillator::multiOscillator(int numOscillators, int numOscillatorOutputs) :
399401
configParam<TS_ParamQuantityEnum>(bParamId, /*min*/ outputParamVals[0][0], /*max*/ outputParamVals[0][1], /*def*/ outputParamVals[0][2],
400402
/*label*/ outputParamLabels[0], /*unit*/ outputParamUnits[0], /*displayBase*/ outputParamVals[0][3], /*displayMult*/ outputParamVals[0][4], /*displayOffset*/ outputParamVals[0][5]);
401403
dynamic_cast<TS_ParamQuantityEnum*>(this->paramQuantities[bParamId])->valMult = 1;
404+
dynamic_cast<TS_ParamQuantityEnum*>(this->paramQuantities[bParamId])->snapEnabled = true;
402405
for (int w = 0; w < WaveFormType::NUM_WAVEFORMS; w++)
403406
{
404407
dynamic_cast<TS_ParamQuantityEnum*>(this->paramQuantities[bParamId])->addToEnumMap(w, WaveFormAbbr[w]);
405408
}
406409

407-
for (int paramId = 1; paramId < outputNumParamVals; paramId++)
410+
for (int paramId = 1; paramId < outputNumParamVals - 1; paramId++)
408411
{
409412
configParam( /*id*/ bParamId + paramId, /*min*/ outputParamVals[paramId][0], /*max*/ outputParamVals[paramId][1], /*def*/ outputParamVals[paramId][2],
410413
/*label*/ outputParamLabels[paramId], /*unit*/ outputParamUnits[paramId], /*displayBase*/ outputParamVals[paramId][3], /*displayMult*/ outputParamVals[paramId][4], /*displayOffset*/ outputParamVals[paramId][5]);
411414
}
415+
416+
// Dig/Ring
417+
configButton(bParamId + outputNumParamVals - 1, "Dig/Ring");
412418
} // end loop through an oscillator's output
419+
420+
//----------------------------------
421+
// * Initialize Inputs & Outputs *
422+
//----------------------------------
423+
// OSCILLATOR 1 ::::::::::::::::::::::::::::::::::::::::::::
424+
std::string prefix = "Osc[" + std::to_string(i + 1) + "] ";
425+
//TS_Oscillator
426+
// // A_V: Amplitude (Volts). [Voltage Range: +/-12 V]
427+
// OSCWF_AMPLITUDE_INPUT,
428+
// // f_Hz: Frequency (Hz). [Voltage Range: +/- 10V]
429+
// OSCWF_FREQUENCY_INPUT,
430+
// // Phi_degrees: Phase Shift (degrees) [0-360]. [Voltage Range: +/- 10V]
431+
// OSCWF_PHASE_SHIFT_INPUT,
432+
// // y0_V : Offset (Volts). [Voltage Range: +/- 10V]
433+
// OSCWF_OFFSET_INPUT,
434+
// // Sync/Restart waveform.
435+
// OSCWF_SYNC_INPUT,
436+
// // Frequency Modulator Input
437+
// OSCWF_FM_INPUT,
438+
configInput(inputId++, prefix + "Amplitude"); // 2
439+
configInput(inputId++, prefix + "Frequency"); // 3
440+
configInput(inputId++, prefix + "Phase Shift"); // 4
441+
configInput(inputId++, prefix + "Offset"); // 5
442+
configInput(inputId++, prefix + "Sync"); // 6
443+
configInput(inputId++, prefix + "Frequency Mod"); // 7
444+
445+
// // Any time sync happens or oscillator is at 0 phase.
446+
// OSCWF_SYNC_OUTPUT,
447+
configOutput(outputId++, prefix + "Sync"); // 2
448+
449+
// OUTPUT X1 ::::::::::::::::::::::::::::::::::::::::::::::::
450+
prefix = "Osc[" + std::to_string(i + 1) + "] X1 ";
451+
//TS_OscillatorOutput::BaseInputIds
452+
// // Oscillator type (SIN, SQU, TRI, SAW). [Voltage Range: +/- 5V].
453+
// OUT_OSC_TYPE_INPUT,
454+
// // Secondary input (i.e. Pulse width for Rectangle, Ramp slope sign for Saw).
455+
// OUT_AUX_INPUT,
456+
// // Phi_degrees: Phase Shift (degrees) [-360 to 360]. [Voltage Range: +/- 10V]
457+
// OUT_PHASE_SHIFT_INPUT,
458+
// // Amplitude modulation
459+
// OUT_AM_INPUT,
460+
configInput(inputId++, prefix + "Waveform Type"); // 8
461+
configInput(inputId++, prefix + "Auxillary"); // 9
462+
configInput(inputId++, prefix + "Phase Shift"); // 10
463+
configInput(inputId++, prefix + "Amplitude Mod"); // 11
464+
465+
// // Raw output.
466+
// OUT_RAW_SIGNAL,
467+
// // After amplitude modulation.
468+
// OUT_MULTIPLIED_SIGNAL,
469+
configOutput(outputId++, prefix + "Raw"); // 3
470+
configOutput(outputId++, prefix + "Mod"); // 4
471+
472+
// OUTPUT Y2 ::::::::::::::::::::::::::::::::::::::::::::::::
473+
prefix = "Osc[" + std::to_string(i + 1) + "] Y2 ";
474+
//TS_OscillatorOutput::BaseInputIds
475+
// // Oscillator type (SIN, SQU, TRI, SAW). [Voltage Range: +/- 5V].
476+
// OUT_OSC_TYPE_INPUT,
477+
// // Secondary input (i.e. Pulse width for Rectangle, Ramp slope sign for Saw).
478+
// OUT_AUX_INPUT,
479+
// // Phi_degrees: Phase Shift (degrees) [-360 to 360]. [Voltage Range: +/- 10V]
480+
// OUT_PHASE_SHIFT_INPUT,
481+
// // Amplitude modulation
482+
// OUT_AM_INPUT,
483+
configInput(inputId++, prefix + "Waveform Type"); // 12
484+
configInput(inputId++, prefix + "Auxillary"); // 13
485+
configInput(inputId++, prefix + "Phase Shift"); // 14
486+
configInput(inputId++, prefix + "Amplitude Mod"); // 15
487+
488+
489+
// // Raw output.
490+
// OUT_RAW_SIGNAL,
491+
// // After amplitude modulation.
492+
// OUT_MULTIPLIED_SIGNAL,
493+
configOutput(outputId++, prefix + "Raw"); // 5
494+
configOutput(outputId++, prefix + "Mod"); // 6
495+
413496
} // end loop through oscillators
414497

415498
//--------------------------
@@ -609,16 +692,17 @@ void multiOscillator::process(const ProcessArgs &args)
609692
// Change the built-in param quantity labels for the 'Aux' based on waveform type:
610693
if (lastType != theOscillator->outputWaveforms[i].waveFormType || setParameterConfigs)
611694
{
695+
// [Rack v2] label is not member of ParamQuantity anymore... Is it 'name'?
612696
switch (theOscillator->outputWaveforms[i].waveFormType)
613697
{
614-
case WAVEFORM_SAW:
615-
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->label = std::string("Slope");
698+
case WAVEFORM_SAW:
699+
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->name = std::string("Slope");
616700
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->unit = std::string("");
617701
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->displayMultiplier = 2.f/TROWA_MOSC_KNOB_AUX_MAX_V;
618702
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->displayOffset = -1.0f; // -1 to 1
619703
break;
620704
case WAVEFORM_SQR:
621-
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->label = std::string("Pulse Width");
705+
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->name = std::string("Pulse Width");
622706
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->unit = std::string("%");
623707
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->displayMultiplier = 100.f/TROWA_MOSC_KNOB_AUX_MAX_V;
624708
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->displayOffset = 0.0f; // 0 to 100
@@ -627,7 +711,7 @@ void multiOscillator::process(const ProcessArgs &args)
627711
case WAVEFORM_TRI:
628712
default:
629713
// No AUX
630-
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->label = std::string("Aux");
714+
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->name = std::string("Aux");
631715
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->unit = std::string(" N/A");
632716
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->displayMultiplier = 100.f/TROWA_MOSC_KNOB_AUX_MAX_V;
633717
this->paramQuantities[baseParamId + TS_OscillatorOutput::BaseParamIds::OUT_AUX_PARAM]->displayOffset = 0.0f; // 0 to 100, doesn't really matter

0 commit comments

Comments
 (0)