Make note play for duration I'm pressing button

Sophie Stott's icon

Hello,

I'm sure this is really simple but it's taken me all day and I'm still no closer to a solution!

I've made a patch which generates chords in a particular key. I'm now trying to fuse it with another patch I've made connecting PS3 to Max. Basically, I want to press a button on the PS3 and then that plays the I, IV, V or VI chord in a particular key. I've got the chords playing no problem but can't work out how to make it so that the chords play for as long as I'm holding the button down. This is it currently, using makenote to set the velocity values. How canI make it so the button inputs the velocity/duration instead?

Thanks so much

PS chord maker.maxpat
Max Patch

Roman Thilenius's icon

without makenote...

Sophie Stott's icon

I have been trying without makenote but still to no avail. Sorry - I'm being really stupid, I know. So my ints get wired to the left input of noteout, but how can I make it so it only plays when the button is pressed? Thanks so much for any help

Roman Thilenius's icon

note off is like note on, but with velocity 0 ...

Sophie Stott's icon

Yeah I understand that, but I'm afraid I still can't work out how to get the notes to only play as long as my toggle is at 1... I've tried sustain but that doesn't seem to work. I've also tried writing 0 80 and 80 0 velocity messages that are triggered by the toggle. All help much appreciated

Sophie Stott's icon

Fixed using pack, unpack, flush and trigger!

Jakub  Hus's icon

Hey Sophie, I'm having the same issue as you did, could you please explain how did you sort it out in more detail?