preenfm Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: lokki on December 09, 2020, 01:29:07 PM

Title: [Added in v0.101] poly pressure
Post by: lokki on December 09, 2020, 01:29:07 PM
hi xavier,

this is for preenfm3:
would it be possible to add polyphonic aftertouch (a.k.a. polyphonic pressure) to the list of modulation sources? this would open up the synth considerably. if you are there i think it would be very nice to add some user-definable cc control as well. so let's say you define in global menu "control-x" = cc15, a user can then select cc15 in the mod matrix to modulate any parameter.

greetings
Title: Re: poly pressure
Post by: kravening on December 09, 2020, 07:30:30 PM
this is a planned feature yes! but i think you're gonna have to wait a little while.
Title: Re: poly pressure
Post by: lokki on December 09, 2020, 08:45:11 PM
Thanks , did xavier say something about it somewhere or are you planning to implement it?
Title: Re: poly pressure
Post by: Xavier on December 09, 2020, 09:33:50 PM
Thanks , did xavier say something about it somewhere or are you planning to implement it?

I don't think so, but i thought many times about both poly aftertouch, and customizable CC  ;)

Customizable CC would only allow a subset of CC because many of them are already assigned by the preenfm.

Definitely on my list.
Title: Re: poly pressure
Post by: lokki on December 09, 2020, 09:36:00 PM
yeah i understand about that. but think about it that way:

for perfomance and live usage the synth may have preprogrammed patches on it and one could disable cc control of the parameters in the menu. that would free up "all" cc messages to be choosen as sources for modulations.

poly aftertouch is just very nice because it allows modulation of individual notes in a polyphonic patch obviously :-)
Title: Re: poly pressure
Post by: lokki on December 09, 2020, 09:41:21 PM
actually now that i think about it :-) i had user CC implemented on a custom preenfm2 firmware back in the days...
Title: Re: poly pressure
Post by: kravening on December 09, 2020, 09:57:55 PM
Thanks , did xavier say something about it somewhere or are you planning to implement it?
I don't think so, but i thought many times about both poly aftertouch, and customizable CC  ;)

woops sorry haha, i was thinking of the micromonsta 2  :-X
Title: Re: poly pressure
Post by: lokki on December 17, 2020, 05:05:35 PM
I saw poly at in the mod matrix on 0.100z, but it does not work yet. should it? happy to test further in case it is needed...
Title: Re: poly pressure
Post by: Xavier on December 17, 2020, 06:37:11 PM
I saw poly at in the mod matrix on 0.100z, but it does not work yet. should it? happy to test further in case it is needed...

Yes 0.100z is derived from my WIP 0.101 ;)

What does not work ?
How can i try that ? Any polyAT soft keyboard ?
I can only simulate poly AT. It was working with my small test.
Title: Re: poly pressure
Post by: lokki on December 17, 2020, 08:47:04 PM
it just is not reacting to poly aftertouch if i set it in the mod matrix. i get no modulation. setting the same modulation to channel pressure it works.

how did you test? with puredata? i tested with puredata as well, and it is not working here.
will try again with my actual controller. the poly at is always bound to a specific note, so you have to take care of this in code as well, but i guess you are aware of that.

hmm, i don't know of any soft-keyboard that has poly-touch emulation.

Title: Re: poly pressure
Post by: lokki on December 17, 2020, 09:02:06 PM
i only took a quick look at the code (the poly handling) so might be totally off, but:

you have:

Code: [Select]
this->synth->getTimbre(timbres[tk])->setMatrixChannelPressureSource(midiEvent.value[0], INV127 * midiEvent.value[1]);
value[0] is the poly_at value and value[1] is the note it is associated with. with the channel pressure code as reference, did you maybe switch value[0] and value[1]?



Title: Re: poly pressure
Post by: Xavier on December 17, 2020, 09:04:47 PM
Code: [Select]
this->synth->getTimbre(timbres[tk])->setMatrixChannelPressureSource(midiEvent.value[0], INV127 * midiEvent.value[1]);value[0] is the poly_at value and value[1] is the note it is associated with. with the channel pressure code as reference, did you maybe switch value[0] and value[1]?

Yes that's the code.  :)
But what you describe is not what is written here :
https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message
Title: Re: poly pressure
Post by: lokki on December 17, 2020, 09:39:59 PM
you are right, i am wrong. i looked at the PureData implementation, where pressure is the first inlet, but looking at my controller code for teensy it becomes clear that indeed pressure is the second argument sent. hmm, so why does it not work. will try to find out :-)

how did you test?

Title: Re: poly pressure
Post by: Xavier on December 17, 2020, 09:47:39 PM
you are right, i am wrong. i looked at the PureData implementation, where pressure is the first inlet, but looking at my controller code for teensy it becomes clear that indeed pressure is the second argument sent. hmm, so why does it not work. will try to find out :-)
how did you test?

My 61SLmk3 can send After touch as PolyAfter on a single note that i specify.
So i used that and verified that the note i set was the only one to receive the Aftertouch info.
Title: Re: poly pressure
Post by: lokki on December 17, 2020, 09:57:51 PM
can i send you a puredata patch to test? (do you still have it installed?)

i am looking at your setMatrixChannelPressureSource function and can't see anything wrong. hmm.

Title: Re: poly pressure
Post by: Xavier on December 17, 2020, 10:13:23 PM
can i send you a puredata patch to test? (do you still have it installed?)

Yes please.
Title: Re: poly pressure
Post by: Xavier on December 18, 2020, 11:26:29 AM
OK i have it working.
The problem i fixed on the pfm3 was only in USB that filter out the polyAT data.
It should work with the version 0.100z you have through DIN5.

Puredata is nice but the version installed by default on Ubuntu 20.4 has a bug in the polytouchout  object :-\
It was sending channel Aftertouch instead of the polyphonic AT
It was fixed here :
https://github.com/pure-data/pure-data/commit/647c0291064416c415ed8dc6a01ae02ac94fdd0d
So i had to compile the latest version.

I modifed a little the patch you sent me to make an easy test.
In the matrix you can use:
PolyA   / 10.0 / O*Fq
an we can clearly hear the polyAT effects the frequency of only one note.

Thanks :)
Title: Re: poly pressure
Post by: lokki on December 18, 2020, 04:43:21 PM
Cool!

Funny, the PD bug was only on Linux, it worked all the time on OSX...

Title: Re: [Added in v0.101] poly pressure
Post by: lokki on December 20, 2020, 09:31:24 PM
it is indeed working fine on 0.101. nice!