How to change velocity to 0 on KSlider with key and keyup

Brian Effinger's icon

Hello,
Sorry if this has been asked before, I'm trying to make a patch where if I hold down a letter (such as C) it'll play a C chord for as long as I hold the button down, and then stop when I let go. I have the chord and note on functioning but I am at my end trying to figure out how to make the velocity change to 0 after the kslider. KSlider totally ignores my keyup toggle. Any help would be incredibly appreciated. Thank you!

CFGButtons1.mxf
application/octet-stream 320.21 KB

matt beckingham's icon

Try changing the display mode to Touchscreen in the kslider inspector. Should give a velocity 0 when you lift the key then.

Source Audio's icon

use flush message to kslider, it is sooo visible in the help file.

A look in the help file might also lead to much simpler chord
playing then in the patch you posted.

Brian Effinger's icon

@Matt - Hi Matt That didn't work for me but thank you for the suggestion.
@Source Audio - I've been doing this for a week so forgive me if I don't catch everything in the help file. I'm following along in a book and this was given to me as a challenge. I can't use things like flush or pack. I have to use key and keyup. Same with the chord stuff - it was showing how to use +
The problem I'm seeing is after my bang messages go into the Velocity input of KSlider, they aren't being transmitted through to the Noteout input.

matt beckingham's icon

would the 'makenote' object be any use?

Source Audio's icon

whateve challenge is , it should be helping to learn and not oposite.
As first it is totaly wrong to form note messages like that.
you need reliable pairs on note and velocity values.
sending flush on keyup is not allowed ?

Max Patch
Copy patch and select New From Clipboard in Max.


Roman Thilenius's icon


in case the use of a kslider was mandatory, too, the question is without question questionable.

if i was him amd i needed to use kslilder, i would use 3 keysliders, one for each note of the chord, that would make more sense.

ward de jager's icon
Afaik the make note automatically creates a note off after the duration length 
Here the keyslider is just used to input notes into the pak module 

Max Patch
Copy patch and select New From Clipboard in Max.