Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the volume knob, modulation, and pitch bend on MIDI controllers #9

Closed
probonopd opened this issue Feb 20, 2022 · 17 comments
Closed
Labels
enhancement New feature or request

Comments

@probonopd
Copy link
Owner

Support the volume knob on MIDI controllers.

(Once #8 is implemented I can say which MIDI message the volume knob sends.)

@dcoredump
Copy link
Contributor

Will do this with adding MIDI processing support for Synth_Dexed (see also #10, #11)

@probonopd
Copy link
Owner Author

The volume MIDI messages are B0 07 00 (knob all the way left) to B0 07 7F (knob all the way right).

@probonopd
Copy link
Owner Author

Likewise, B0 01 ... for modulation and E0 00 ... for Pitch Bend.

@probonopd probonopd changed the title Support the volume knob on MIDI controllers Support the volume knob, modulation, and pitch bend on MIDI controllers Mar 13, 2022
@rsta2
Copy link
Contributor

rsta2 commented Mar 14, 2022

I was so bold and implemented the volume control (using MIDI CC and via the UI) already in #47. ;) I also tried modulation (using Dexed::setModWheel()) and pitch bend (using setPitchbend()), but this didn't work. Or I wasn't able to "move the wheel" quick enough, because I can only simulate the MIDI messages by sending hex bytes manually. I also don't know, if it depends on the loaded voice, if these functions have an effect.

BTW. Pitch bend was already implemented, but I think this MIDI message has two parameter bytes (0xE0 LSB MSB), and the MSB is not considered yet.

@dcoredump
Copy link
Contributor

I was so bold and implemented the volume control (using MIDI CC and via the UI) already in #47. ;) I also tried modulation (using Dexed::setModWheel()) and pitch bend (using setPitchbend()), but this didn't work. Or I wasn't able to "move the wheel" quick enough, because I can only simulate the MIDI messages by sending hex bytes manually. I also don't know, if it depends on the loaded voice, if these functions have an effect.

ModWheel depends on the routing of the voices. Some voices don't have a target for the ModWheel.

BTW. Pitch bend was already implemented, but I think this MIDI message has two parameter bytes (0xE0 LSB MSB), and the MSB is not considered yet.

Yes, Pitchbend is 14 bit (LSB, MSB)!

@probonopd
Copy link
Owner Author

probonopd commented Mar 14, 2022

E0 00 ... for Pitch Bend

To be precise, E0 00 40 (normal pitch wirthout bending) all the way down to E0 00 00 and all the way up to E0 7F 7F

B0 01 ... for modulation

B0 01 00 to B0 01 7F

@rsta2
Copy link
Contributor

rsta2 commented Mar 14, 2022

@dcoredump Ah OK, I probably used a voice, which don't use the ModWheel. Thanks for info.

@probonopd This is something, I did wonder about today. When the zero pitch bend level is 0x4000 (I have seen this value too in some doc), then you have to subtract 0x4000 from the value before calling Dexed::setPitchbend(). But inside this function, it adds 0x2000 only to get back to the 0..16383 range. I don't understand this.

https://codeberg.org/dcoredump/Synth_Dexed/src/branch/master/src/dexed.cpp#L866

@probonopd
Copy link
Owner Author

@rsta2
Copy link
Contributor

rsta2 commented Mar 14, 2022

@probonopd Yes, this helps. The message 0xE0 0x00 0x40 is the zero level (0x4000). This is the value before shifting the MSB, after shifting it's 0x2000. This is because both value bytes are only 7 bits. Thanks!

@rsta2
Copy link
Contributor

rsta2 commented Mar 15, 2022

Here is a patch, which should implement Pitch Bend and Modulation CC. Unfortunately I do not have such controls, so I cannot test it.

pitch-bend-modulation.zip

@probonopd
Copy link
Owner Author

Thanks @rsta2, unfortunately it does not seem to have any audible effect.
@dcoredump can you reproduce this?

@rsta2
Copy link
Contributor

rsta2 commented Mar 15, 2022

@probonopd This was also my impression, when trying to fake a Pitch Bend and modulation by sending the MIDI bytes manually with a tool. I tried several voices. But I thought, that you need a real controller to test this.

@dcoredump
Copy link
Contributor

@dcoredump can you reproduce this?

Sorry, but I have no equipment which can send MIDI-CC right here - my master keyboard is in the rehearsal room...

@rsta2
Copy link
Contributor

rsta2 commented Mar 16, 2022

I was looking around in Synth_Dexed, and now Pitch Bend and Modulation does work (e.g. with the "BRASS 1" voice), when you apply the attached patch to the version from the pb-mod branch. There are two major things to do, that it works:

  • The controllers must be configured using Dexed::setPBController (range, step) and Dexed::setMWController (range, assign, mode). Pitch Bend range and step can be from 0 to 12. Modulation Wheel range can be 0 to 99, assign 0 to 7 and mode 0 to 2. Currently I don't know, if these values should be configurable in minidexed.ini or somewhere else?

  • Have to call Dexed::ControllersRefresh() after Dexed::setModWheel().

I tested it, by manually sending MIDI bytes, and there was definitely some reaction. But we have to find out more about the different configuration parameters.

pb-mod-2.zip

probonopd added a commit that referenced this issue Mar 17, 2022
@probonopd
Copy link
Owner Author

Pitch Bend and Modulation now do something audible. In fact, I think they "overreact" a bit (do more than intended).
But this is just a gut feeling at the moment.

I think ideally we should compare with a real DX7 and configure the controllers to do as much (or as little) modulation as the original. Unfortunately I don't have access to one. I wonder how the Dexed VST plugin is configured by default. Maybe we should use that configuration?

probonopd added a commit that referenced this issue Mar 17, 2022
@rsta2
Copy link
Contributor

rsta2 commented Mar 17, 2022

I installed Dexed on Windows. These controllers are switched off by default there. I guess we have to find out a setup by our self here. In the TX802 Manual on page 22 there is the description for the Pitch Bend parameters, on page 23 for Mod wheel.

@probonopd
Copy link
Owner Author

Volume knob, modulation, and pitch bend on MIDI controllers are working and tested successfully. In case some further tuning of parameters is needed, we can always open separate tickets.

Thanks @rsta2 for implementing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants