@@ -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