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

Use channel pressure as aftertouch #170

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

jfrey-xx
Copy link

@jfrey-xx jfrey-xx commented Dec 1, 2017

Hello,

I have a M-Audio Code keyboard that can do aftertouch but not per key, as others might do. It sends one value for a whole channel, and this information is not taken into account in Helm. It seems to relate to #20 and #77.

After a bit of digging, JUCE differentiates aftertouch from "channel pressure", which my keyboard does. Here is a proposal for helm to read them both. The patch is not ideal because it would be probably better to add another modulation in the GUI, dedicated to channel pressure. I did not dare modifying the interface, however it should be trivial (except for the screen space) to add a "pressure" modulation; I tried to keep setAftertouch() separated from setPressure() as long as possible in the code.

I changed the init value of aftertouch from "velocity" -- unnecessary and even odd in my case -- to "0" (as aftertouch occurs after the key is pressed).

I changed some code within mopo, I guess it should be backported.

The code might become a bit cumbersome around the arpeggiator because I created separate structures to hold info about channel and pressure. Note that with these commits the aftertouch data is finally passed to the arpeggiator, which did not seem to be the case before (i.e. the aftertouch would not have any effect with the arpeggiator enabled). In the future I guess there should be a proper structure to hold all the info about a note / channel, that would help for example with #158.

Working on Linux (Ubuntu x64 16.04), with the standalone version as well as with the LV2 and VST plugins (using Ardour 5.11), although I did not test how everything holds when various channels are involved.

Thanks for this great piece of software, I am a total beginner when it comes to music, and beside the nice sounds that Helm can produce, it is a very neat tool to play with and learn how synthesizer works. It is because I found nothing as good as Helm so far that I was particularly frustrated not to be able to use all functionalities of my keyboard. Hope that this patch can help :)

@jfrey-xx
Copy link
Author

Hello,

Don't hesitate to ask if I can help to integrate that faster. And don't hesitate to comment if you think that I did it wrong ;)

@kjyv
Copy link

kjyv commented Jan 8, 2018

I've tried it and it seems to work fine with my channel pressure keyboard (after a minor fix). Don't know if it also works properly when used with a polyphonic aftertouch capable keyboard though.

The change I made was in voice_handler.cpp:347 and arpeggiator.cpp:211
MOPO_ASSERT(channel >= 0 && channel <= mopo::NUM_MIDI_CHANNELS);
(channel can be 0, so channel >= 1 failed)

@jfrey-xx
Copy link
Author

jfrey-xx commented Jan 9, 2018

I wonder as well how it would go with polyphonic aftertouch, I'd say that the channel aftertouch would "take over", but I don't have a device to test -- I'd love to, though. Updated my fork, thanks for your feedback :)

@mtytel
Copy link
Owner

mtytel commented Jan 9, 2018

Thanks for doing this! I'll set aside some time to look at it tomorrow.

@f3flight
Copy link

f3flight commented Dec 22, 2018

Hey guys, is this still not in implemented? I see 756e767 in master but that seems to be just a small portion of changes proposed here... I have a LinnStrument and really want channel pressure working...
edit: tested @kjyv 's repo, it works there. The only thing missing is making all presets use this by default or via some easy switch, as it's not convenient to set it up every time a preset is changed, esp. because it's relative to current value, i.e. I have to first move volume to 0 and then assign both velocity and aftertouch to volume with a value of 1 (or less or more). Similar problem with bend range. Maybe add override button(s) for this in settings, not sure... And of course merging with this @mtytel 's repo.

@saphtea
Copy link

saphtea commented Jan 18, 2019

Hey guys! I just started using Helm and am enamored by how you handle keyboard based modulation, but aftertouch is a huge missing key for me right now as mine also does all channel aftertouch. Hoping to see this merged through, really loving the software so far it's making it incredibly easy and powerful to make responsive and dynamic instruments, I think aftertouch would be the icing on top to this. Anyways, LGTM, hoping to see it in a new build soon!

@zeknife
Copy link

zeknife commented May 18, 2021

Need this

vmsh0 added a commit to vmsh0/helm that referenced this pull request Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants