asb2m10 / dexed

DX7 FM multi plaform/multi format plugin
GNU General Public License v3.0
2.76k stars 240 forks source link

Persist more Dexed parameters in per-instance state #403

Open probonopd opened 7 months ago

probonopd commented 7 months ago

Trying to recreate TX816-style performances by combining multiple Dexed instances in the DAW, I am running into the issue that some of these parameters seemingly are only persisted across all instances of Dexed (in C:\Users\%USERNAME%\AppData\Roaming\DigitalSuburban\Dexed\Dexed.xml), whereas the TX816 requires some of these parameters to be different across the 8 tone generators:

  <VALUE name="normalizeDxVelocity" val="0"/>
  <VALUE name="pitchRange" val="0"/>
  <VALUE name="pitchRangeUp" val="0"/>
  <VALUE name="pitchRangeDn" val="1"/>
  <VALUE name="pitchStep" val="0"/>
  <VALUE name="sysexIn" val=""/>
  <VALUE name="sysexOut" val=""/>
  <VALUE name="sysexChl" val="0"/>
  <VALUE name="showKeyboard" val="1"/>
  <VALUE name="wheelMod" val="0 0 0 0"/>
  <VALUE name="footMod" val="0 0 0 0"/>
  <VALUE name="breathMod" val="0 0 0 0"/>
  <VALUE name="aftertouchMod" val="0 0 0 0"/>
  <VALUE name="engineType" val="1"/>
  <VALUE name="dpiScaleFactor" val="1.0"/>

Specifically:

Likely the missing ones would need to be added to DexedAudioProcessor::getStateInformation() before https://github.com/asb2m10/dexed/blob/b6cf2e9190e216387ad96f977284ebbef765b447/Source/PluginData.cpp#L331 for saving the per-instance state,

and to DexedAudioProcessor::setStateInformation() https://github.com/asb2m10/dexed/blob/b6cf2e9190e216387ad96f977284ebbef765b447/Source/PluginData.cpp#L411 for applying the per-instance state.

probonopd commented 7 months ago

My attempt at implementing this: https://github.com/probonopd/dexed/pull/1

Running into

dexed/Source/PluginData.cpp:332:57: error: ‘class Controllers’ has no member named ‘pitchRangeUp’

Apparently https://github.com/asb2m10/dexed/blob/master/Source/msfa/controllers.h needs to be changed but I don't know how.

Any help appreciated.

probonopd commented 6 months ago

The DX7II ACED (per-voice additional parameters) format (documented on page "Add-9" of the DX7II manual) contains, among other similar parameters, pbr = 2 # 0 .. 12 # Pitch bend range. So these things should clearly be possible to persist per voice if we want to have DX7II like configurability.

(It appears that some parameters defined in ACED cannot be configured in Dexed so far at all, though - which is partly covered by https://github.com/asb2m10/dexed/issues/165.)