@@ -43,8 +43,8 @@ int SynthController::vco1Octave() const { return m_synth ? m_synth->vco1Octave()
4343void SynthController::setVco1Octave (int oct) { if (m_synth) { m_synth->setVco1Octave (oct); emit vco1OctaveChanged (); } }
4444int SynthController::vco1Pitch () const { return m_synth ? m_synth->vco1Pitch () : 0 ; }
4545void SynthController::setVco1Pitch (int p) { if (m_synth) { m_synth->setVco1Pitch (p); emit vco1PitchChanged (); } }
46- int SynthController::vco1Shape () const { return m_synth ? static_cast <int >(std::round (m_synth->vco1Shape () * 100 .0f )) : 0 ; }
47- void SynthController::setVco1Shape (int s) { if (m_synth) { m_synth->setVco1Shape (s / 100 .0f ); emit vco1ShapeChanged (); } }
46+ int SynthController::vco1Shape () const { return m_synth ? static_cast <int >(std::round (m_synth->vco1Shape () * 1000 .0f )) : 0 ; }
47+ void SynthController::setVco1Shape (int s) { if (m_synth) { m_synth->setVco1Shape (s / 1000 .0f ); emit vco1ShapeChanged (); } }
4848bool SynthController::vco1Sync () const { return m_synth ? m_synth->vco1Sync () : false ; }
4949void SynthController::setVco1Sync (bool s) { if (m_synth) { m_synth->setVco1Sync (s); emit vco1SyncChanged (); } }
5050
@@ -55,54 +55,54 @@ int SynthController::vco2Octave() const { return m_synth ? m_synth->vco2Octave()
5555void SynthController::setVco2Octave (int oct) { if (m_synth) { m_synth->setVco2Octave (oct); emit vco2OctaveChanged (); } }
5656int SynthController::vco2Pitch () const { return m_synth ? m_synth->vco2Pitch () : 0 ; }
5757void SynthController::setVco2Pitch (int p) { if (m_synth) { m_synth->setVco2Pitch (p); emit vco2PitchChanged (); } }
58- int SynthController::vco2Shape () const { return m_synth ? static_cast <int >(std::round (m_synth->vco2Shape () * 100 .0f )) : 0 ; }
59- void SynthController::setVco2Shape (int s) { if (m_synth) { m_synth->setVco2Shape (s / 100 .0f ); emit vco2ShapeChanged (); } }
58+ int SynthController::vco2Shape () const { return m_synth ? static_cast <int >(std::round (m_synth->vco2Shape () * 1000 .0f )) : 0 ; }
59+ void SynthController::setVco2Shape (int s) { if (m_synth) { m_synth->setVco2Shape (s / 1000 .0f ); emit vco2ShapeChanged (); } }
6060bool SynthController::vco2Sync () const { return m_synth ? m_synth->vco2Sync () : false ; }
6161void SynthController::setVco2Sync (bool s) { if (m_synth) { m_synth->setVco2Sync (s); emit vco2SyncChanged (); } }
6262
6363// Multi Engine
6464int SynthController::multiType () const { return m_synth ? static_cast <int >(m_synth->multiType ()) : 0 ; }
6565void SynthController::setMultiType (int type) { if (m_synth) { m_synth->setMultiType (static_cast <MultiEngine::Type>(type)); emit multiTypeChanged (); } }
66- int SynthController::multiShape () const { return m_synth ? static_cast <int >(std::round (m_synth->multiShape () * 100 .0f )) : 0 ; }
67- void SynthController::setMultiShape (int s) { if (m_synth) { m_synth->setMultiShape (s / 100 .0f ); emit multiShapeChanged (); } }
68- int SynthController::multiLevel () const { return m_synth ? static_cast <int >(std::round (m_synth->multiLevel () * 100 .0f )) : 0 ; }
69- void SynthController::setMultiLevel (int lvl) { if (m_synth) { m_synth->setMultiLevel (lvl / 100 .0f ); emit multiLevelChanged (); } }
70- int SynthController::multiKeyTrack () const { return m_synth ? static_cast <int >(std::round (m_synth->multiKeyTrack () * 100 .0f )) : 0 ; }
71- void SynthController::setMultiKeyTrack (int t) { if (m_synth) { m_synth->setMultiKeyTrack (t / 100 .0f ); emit multiKeyTrackChanged (); } }
66+ int SynthController::multiShape () const { return m_synth ? static_cast <int >(std::round (m_synth->multiShape () * 1000 .0f )) : 0 ; }
67+ void SynthController::setMultiShape (int s) { if (m_synth) { m_synth->setMultiShape (s / 1000 .0f ); emit multiShapeChanged (); } }
68+ int SynthController::multiLevel () const { return m_synth ? static_cast <int >(std::round (m_synth->multiLevel () * 1000 .0f )) : 0 ; }
69+ void SynthController::setMultiLevel (int lvl) { if (m_synth) { m_synth->setMultiLevel (lvl / 1000 .0f ); emit multiLevelChanged (); } }
70+ int SynthController::multiKeyTrack () const { return m_synth ? static_cast <int >(std::round (m_synth->multiKeyTrack () * 1000 .0f )) : 0 ; }
71+ void SynthController::setMultiKeyTrack (int t) { if (m_synth) { m_synth->setMultiKeyTrack (t / 1000 .0f ); emit multiKeyTrackChanged (); } }
7272
7373// Mixer
74- int SynthController::mixVco1 () const { return m_synth ? static_cast <int >(std::round (m_synth->mixVco1 () * 100 .0f )) : 0 ; }
75- void SynthController::setMixVco1 (int lvl) { if (m_synth) { m_synth->setMixVco1 (lvl / 100 .0f ); emit mixVco1Changed (); } }
76- int SynthController::mixVco2 () const { return m_synth ? static_cast <int >(std::round (m_synth->mixVco2 () * 100 .0f )) : 0 ; }
77- void SynthController::setMixVco2 (int lvl) { if (m_synth) { m_synth->setMixVco2 (lvl / 100 .0f ); emit mixVco2Changed (); } }
74+ int SynthController::mixVco1 () const { return m_synth ? static_cast <int >(std::round (m_synth->mixVco1 () * 1000 .0f )) : 0 ; }
75+ void SynthController::setMixVco1 (int lvl) { if (m_synth) { m_synth->setMixVco1 (lvl / 1000 .0f ); emit mixVco1Changed (); } }
76+ int SynthController::mixVco2 () const { return m_synth ? static_cast <int >(std::round (m_synth->mixVco2 () * 1000 .0f )) : 0 ; }
77+ void SynthController::setMixVco2 (int lvl) { if (m_synth) { m_synth->setMixVco2 (lvl / 1000 .0f ); emit mixVco2Changed (); } }
7878
7979// Filter
80- int SynthController::lpfCutoff () const { return m_synth ? static_cast <int >(std::round (m_synth->lpfCutoff () * 100 .0f )) : 0 ; }
81- void SynthController::setLpfCutoff (int c) { if (m_synth) { m_synth->setLpfCutoff (c / 100 .0f ); emit lpfCutoffChanged (); } }
82- int SynthController::lpfResonance () const { return m_synth ? static_cast <int >(std::round (m_synth->lpfResonance () * 100 .0f )) : 0 ; }
83- void SynthController::setLpfResonance (int r) { if (m_synth) { m_synth->setLpfResonance (r / 100 .0f ); emit lpfResonanceChanged (); } }
84- int SynthController::hpfCutoff () const { return m_synth ? static_cast <int >(std::round (m_synth->hpfCutoff () * 100 .0f )) : 0 ; }
85- void SynthController::setHpfCutoff (int c) { if (m_synth) { m_synth->setHpfCutoff (c / 100 .0f ); emit hpfCutoffChanged (); } }
86- int SynthController::filterKeyTrack () const { return m_synth ? static_cast <int >(std::round (m_synth->filterKeyTrack () * 100 .0f )) : 0 ; }
87- void SynthController::setFilterKeyTrack (int t) { if (m_synth) { m_synth->setFilterKeyTrack (t / 100 .0f ); emit filterKeyTrackChanged (); } }
80+ int SynthController::lpfCutoff () const { return m_synth ? static_cast <int >(std::round (m_synth->lpfCutoff () * 1000 .0f )) : 0 ; }
81+ void SynthController::setLpfCutoff (int c) { if (m_synth) { m_synth->setLpfCutoff (c / 1000 .0f ); emit lpfCutoffChanged (); } }
82+ int SynthController::lpfResonance () const { return m_synth ? static_cast <int >(std::round (m_synth->lpfResonance () * 1000 .0f )) : 0 ; }
83+ void SynthController::setLpfResonance (int r) { if (m_synth) { m_synth->setLpfResonance (r / 1000 .0f ); emit lpfResonanceChanged (); } }
84+ int SynthController::hpfCutoff () const { return m_synth ? static_cast <int >(std::round (m_synth->hpfCutoff () * 1000 .0f )) : 0 ; }
85+ void SynthController::setHpfCutoff (int c) { if (m_synth) { m_synth->setHpfCutoff (c / 1000 .0f ); emit hpfCutoffChanged (); } }
86+ int SynthController::filterKeyTrack () const { return m_synth ? static_cast <int >(std::round (m_synth->filterKeyTrack () * 1000 .0f )) : 0 ; }
87+ void SynthController::setFilterKeyTrack (int t) { if (m_synth) { m_synth->setFilterKeyTrack (t / 1000 .0f ); emit filterKeyTrackChanged (); } }
8888
8989// Amp EG
90- int SynthController::ampAttack () const { return m_synth ? static_cast <int >(std::round (m_synth->ampAttack () * 100 .0f )) : 0 ; }
91- void SynthController::setAmpAttack (int a) { if (m_synth) { m_synth->setAmpAttack (a / 100 .0f ); emit ampAttackChanged (); } }
92- int SynthController::ampDecay () const { return m_synth ? static_cast <int >(std::round (m_synth->ampDecay () * 100 .0f )) : 0 ; }
93- void SynthController::setAmpDecay (int d) { if (m_synth) { m_synth->setAmpDecay (d / 100 .0f ); emit ampDecayChanged (); } }
94- int SynthController::ampSustain () const { return m_synth ? static_cast <int >(std::round (m_synth->ampSustain () * 100 .0f )) : 0 ; }
95- void SynthController::setAmpSustain (int s) { if (m_synth) { m_synth->setAmpSustain (s / 100 .0f ); emit ampSustainChanged (); } }
96- int SynthController::ampRelease () const { return m_synth ? static_cast <int >(std::round (m_synth->ampRelease () * 100 .0f )) : 0 ; }
97- void SynthController::setAmpRelease (int r) { if (m_synth) { m_synth->setAmpRelease (r / 100 .0f ); emit ampReleaseChanged (); } }
90+ int SynthController::ampAttack () const { return m_synth ? static_cast <int >(std::round (m_synth->ampAttack () * 1000 .0f )) : 0 ; }
91+ void SynthController::setAmpAttack (int a) { if (m_synth) { m_synth->setAmpAttack (a / 1000 .0f ); emit ampAttackChanged (); } }
92+ int SynthController::ampDecay () const { return m_synth ? static_cast <int >(std::round (m_synth->ampDecay () * 1000 .0f )) : 0 ; }
93+ void SynthController::setAmpDecay (int d) { if (m_synth) { m_synth->setAmpDecay (d / 1000 .0f ); emit ampDecayChanged (); } }
94+ int SynthController::ampSustain () const { return m_synth ? static_cast <int >(std::round (m_synth->ampSustain () * 1000 .0f )) : 0 ; }
95+ void SynthController::setAmpSustain (int s) { if (m_synth) { m_synth->setAmpSustain (s / 1000 .0f ); emit ampSustainChanged (); } }
96+ int SynthController::ampRelease () const { return m_synth ? static_cast <int >(std::round (m_synth->ampRelease () * 1000 .0f )) : 0 ; }
97+ void SynthController::setAmpRelease (int r) { if (m_synth) { m_synth->setAmpRelease (r / 1000 .0f ); emit ampReleaseChanged (); } }
9898
9999// Mod EG
100- int SynthController::modAttack () const { return m_synth ? static_cast <int >(std::round (m_synth->modAttack () * 100 .0f )) : 0 ; }
101- void SynthController::setModAttack (int a) { if (m_synth) { m_synth->setModAttack (a / 100 .0f ); emit modAttackChanged (); } }
102- int SynthController::modDecay () const { return m_synth ? static_cast <int >(std::round (m_synth->modDecay () * 100 .0f )) : 0 ; }
103- void SynthController::setModDecay (int d) { if (m_synth) { m_synth->setModDecay (d / 100 .0f ); emit modDecayChanged (); } }
104- int SynthController::modInt () const { return m_synth ? static_cast <int >(std::round (m_synth->modInt () * 100 .0f )) : 0 ; }
105- void SynthController::setModInt (int i) { if (m_synth) { m_synth->setModInt (i / 100 .0f ); emit modIntChanged (); } }
100+ int SynthController::modAttack () const { return m_synth ? static_cast <int >(std::round (m_synth->modAttack () * 1000 .0f )) : 0 ; }
101+ void SynthController::setModAttack (int a) { if (m_synth) { m_synth->setModAttack (a / 1000 .0f ); emit modAttackChanged (); } }
102+ int SynthController::modDecay () const { return m_synth ? static_cast <int >(std::round (m_synth->modDecay () * 1000 .0f )) : 0 ; }
103+ void SynthController::setModDecay (int d) { if (m_synth) { m_synth->setModDecay (d / 1000 .0f ); emit modDecayChanged (); } }
104+ int SynthController::modInt () const { return m_synth ? static_cast <int >(std::round (m_synth->modInt () * 1000 .0f )) : 0 ; }
105+ void SynthController::setModInt (int i) { if (m_synth) { m_synth->setModInt (i / 1000 .0f ); emit modIntChanged (); } }
106106int SynthController::modTarget () const { return m_synth ? static_cast <int >(m_synth->modTarget ()) : 0 ; }
107107void SynthController::setModTarget (int t) { if (m_synth) { m_synth->setModTarget (static_cast <SynthDevice::ModTarget>(t)); emit modTargetChanged (); } }
108108
@@ -111,32 +111,32 @@ int SynthController::lfoWaveform() const { return m_synth ? static_cast<int>(m_s
111111void SynthController::setLfoWaveform (int wave) { if (m_synth) { m_synth->setLfoWaveform (static_cast <LFO::Waveform>(wave)); emit lfoWaveformChanged (); } }
112112int SynthController::lfoMode () const { return m_synth ? static_cast <int >(m_synth->lfoMode ()) : 0 ; }
113113void SynthController::setLfoMode (int mode) { if (m_synth) { m_synth->setLfoMode (static_cast <LFO::Mode>(mode)); emit lfoModeChanged (); } }
114- int SynthController::lfoRate () const { return m_synth ? static_cast <int >(std::round (m_synth->lfoRate () * 100 .0f )) : 0 ; }
115- void SynthController::setLfoRate (int rate) { if (m_synth) { m_synth->setLfoRate (rate / 100 .0f ); emit lfoRateChanged (); } }
116- int SynthController::lfoInt () const { return m_synth ? static_cast <int >(std::round (m_synth->lfoInt () * 100 .0f )) : 0 ; }
117- void SynthController::setLfoInt (int intensity) { if (m_synth) { m_synth->setLfoInt (intensity / 100 .0f ); emit lfoIntChanged (); } }
114+ int SynthController::lfoRate () const { return m_synth ? static_cast <int >(std::round (m_synth->lfoRate () * 1000 .0f )) : 0 ; }
115+ void SynthController::setLfoRate (int rate) { if (m_synth) { m_synth->setLfoRate (rate / 1000 .0f ); emit lfoRateChanged (); } }
116+ int SynthController::lfoInt () const { return m_synth ? static_cast <int >(std::round (m_synth->lfoInt () * 1000 .0f )) : 0 ; }
117+ void SynthController::setLfoInt (int intensity) { if (m_synth) { m_synth->setLfoInt (intensity / 1000 .0f ); emit lfoIntChanged (); } }
118118int SynthController::lfoTarget () const { return m_synth ? static_cast <int >(m_synth->lfoTarget ()) : 0 ; }
119119void SynthController::setLfoTarget (int target) { if (m_synth) { m_synth->setLfoTarget (static_cast <SynthDevice::LfoTarget>(target)); emit lfoTargetChanged (); } }
120120
121121// Global
122122int SynthController::voiceMode () const { return m_synth ? static_cast <int >(m_synth->voiceMode ()) : 0 ; }
123123void SynthController::setVoiceMode (int m) { if (m_synth) { m_synth->setVoiceMode (static_cast <SynthDevice::VoiceMode>(m)); emit voiceModeChanged (); } }
124- int SynthController::voiceDepth () const { return m_synth ? static_cast <int >(std::round (m_synth->voiceDepth () * 100 .0f )) : 0 ; }
125- void SynthController::setVoiceDepth (int d) { if (m_synth) { m_synth->setVoiceDepth (d / 100 .0f ); emit voiceDepthChanged (); } }
126- int SynthController::portamento () const { return m_synth ? static_cast <int >(std::round (m_synth->portamento () * 100 .0f )) : 0 ; }
127- void SynthController::setPortamento (int p) { if (m_synth) { m_synth->setPortamento (p / 100 .0f ); emit portamentoChanged (); } }
128- int SynthController::panSpread () const { return m_synth ? static_cast <int >(std::round (m_synth->panSpread () * 100 .0f )) : 0 ; }
129- void SynthController::setPanSpread (int s) { if (m_synth) { m_synth->setPanSpread (s / 100 .0f ); emit panSpreadChanged (); } }
130- int SynthController::masterPan () const { return m_synth ? static_cast <int >(std::round (m_synth->masterPan () * 100 .0f )) : 0 ; }
131- void SynthController::setMasterPan (int p) { if (m_synth) { m_synth->setMasterPan (p / 100 .0f ); emit masterPanChanged (); } }
132- int SynthController::masterVolume () const { return m_synth ? static_cast <int >(std::round (m_synth->masterVolume () * 100 .0f )) : 0 ; }
133- void SynthController::setMasterVolume (int v) { if (m_synth) { m_synth->setMasterVolume (v / 100 .0f ); emit masterVolumeChanged (); } }
124+ int SynthController::voiceDepth () const { return m_synth ? static_cast <int >(std::round (m_synth->voiceDepth () * 1000 .0f )) : 0 ; }
125+ void SynthController::setVoiceDepth (int d) { if (m_synth) { m_synth->setVoiceDepth (d / 1000 .0f ); emit voiceDepthChanged (); } }
126+ int SynthController::portamento () const { return m_synth ? static_cast <int >(std::round (m_synth->portamento () * 1000 .0f )) : 0 ; }
127+ void SynthController::setPortamento (int p) { if (m_synth) { m_synth->setPortamento (p / 1000 .0f ); emit portamentoChanged (); } }
128+ int SynthController::panSpread () const { return m_synth ? static_cast <int >(std::round (m_synth->panSpread () * 1000 .0f )) : 0 ; }
129+ void SynthController::setPanSpread (int s) { if (m_synth) { m_synth->setPanSpread (s / 1000 .0f ); emit panSpreadChanged (); } }
130+ int SynthController::masterPan () const { return m_synth ? static_cast <int >(std::round (m_synth->masterPan () * 1000 .0f )) : 0 ; }
131+ void SynthController::setMasterPan (int p) { if (m_synth) { m_synth->setMasterPan (p / 1000 .0f ); emit masterPanChanged (); } }
132+ int SynthController::masterVolume () const { return m_synth ? static_cast <int >(std::round (m_synth->masterVolume () * 1000 .0f )) : 0 ; }
133+ void SynthController::setMasterVolume (int v) { if (m_synth) { m_synth->setMasterVolume (v / 1000 .0f ); emit masterVolumeChanged (); } }
134134
135135uint32_t SynthController::sampleRate () const { return m_synth ? m_synth->sampleRate () : static_cast <uint32_t >(Constants::defaultSampleRate ()); }
136136
137137float SynthController::cutoffToHz (float cutoff) const
138138{
139- return Utils::Dsp::cutoffToHz (cutoff / 100 .0f , static_cast <float >(sampleRate ()));
139+ return Utils::Dsp::cutoffToHz (cutoff / 1000 .0f , static_cast <float >(sampleRate ()));
140140}
141141
142142QStringList SynthController::presetNames () const
@@ -156,16 +156,16 @@ int SynthController::delayType() const { return m_synth ? static_cast<int>(m_syn
156156void SynthController::setDelayType (int type) { if (m_synth) { m_synth->setDelayType (static_cast <DelayEffect::Type>(type)); emit delayTypeChanged (); } }
157157int SynthController::delayTime () const { return m_synth ? static_cast <int >(std::round (m_synth->delayTime () * 1000 .0f )) : 0 ; }
158158void SynthController::setDelayTime (int time) { if (m_synth) { m_synth->setDelayTime (time / 1000 .0f ); emit delayTimeChanged (); } }
159- int SynthController::delayFeedback () const { return m_synth ? static_cast <int >(std::round (m_synth->delayFeedback () * 100 .0f )) : 0 ; }
160- void SynthController::setDelayFeedback (int fb) { if (m_synth) { m_synth->setDelayFeedback (fb / 100 .0f ); emit delayFeedbackChanged (); } }
161- int SynthController::delayDepth () const { return m_synth ? static_cast <int >(std::round (m_synth->delayDepth () * 100 .0f )) : 0 ; }
162- void SynthController::setDelayDepth (int d) { if (m_synth) { m_synth->setDelayDepth (d / 100 .0f ); emit delayDepthChanged (); } }
163- int SynthController::delayMix () const { return m_synth ? static_cast <int >(std::round (m_synth->delayMix () * 100 .0f )) : 0 ; }
164- void SynthController::setDelayMix (int mix) { if (m_synth) { m_synth->setDelayMix (mix / 100 .0f ); emit delayMixChanged (); } }
159+ int SynthController::delayFeedback () const { return m_synth ? static_cast <int >(std::round (m_synth->delayFeedback () * 1000 .0f )) : 0 ; }
160+ void SynthController::setDelayFeedback (int fb) { if (m_synth) { m_synth->setDelayFeedback (fb / 1000 .0f ); emit delayFeedbackChanged (); } }
161+ int SynthController::delayDepth () const { return m_synth ? static_cast <int >(std::round (m_synth->delayDepth () * 1000 .0f )) : 0 ; }
162+ void SynthController::setDelayDepth (int d) { if (m_synth) { m_synth->setDelayDepth (d / 1000 .0f ); emit delayDepthChanged (); } }
163+ int SynthController::delayMix () const { return m_synth ? static_cast <int >(std::round (m_synth->delayMix () * 1000 .0f )) : 0 ; }
164+ void SynthController::setDelayMix (int mix) { if (m_synth) { m_synth->setDelayMix (mix / 1000 .0f ); emit delayMixChanged (); } }
165165bool SynthController::delaySync () const { return m_synth ? m_synth->delaySync () : false ; }
166166void SynthController::setDelaySync (bool sync) { if (m_synth) { m_synth->setDelaySync (sync); emit delaySyncChanged (); } }
167- int SynthController::delaySyncDivision () const { return m_synth ? static_cast <int >(std::round (m_synth->delaySyncDivision () * 100 .0f )) : 0 ; }
168- void SynthController::setDelaySyncDivision (int div) { if (m_synth) { m_synth->setDelaySyncDivision (div / 100 .0f ); emit delaySyncDivisionChanged (); } }
167+ int SynthController::delaySyncDivision () const { return m_synth ? static_cast <int >(std::round (m_synth->delaySyncDivision () * 1000 .0f )) : 0 ; }
168+ void SynthController::setDelaySyncDivision (int div) { if (m_synth) { m_synth->setDelaySyncDivision (div / 1000 .0f ); emit delaySyncDivisionChanged (); } }
169169
170170void SynthController::initialize () {}
171171void SynthController::reset () { if (m_synth) m_synth->reset (); requestSettings (); }
0 commit comments