Computer keyboard as MIDI keyboard

tlb's icon

I'm trying to use my computer keyboard as a MIDI keyboard so that pressing "a" key triggers a C note.
I made the following patch, but notes are generated after releasing the key.
I know that it is because duration cannot be determined until releasing the key.
How can I make it sound during pressing the key?
I would not like to use custom externals.
I would like to make it only by standard Max/MSP objects.

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

Steven Miller's icon

On Nov 24, 2007, at 9:30 PM, tlb wrote:

>
> I'm trying to use my computer keyboard as a MIDI keyboard so that
> pressing "a" key triggers a C note.
> I made the following patch, but notes are generated after releasing
> the key.
> I know that it is because duration cannot be determined until
> releasing the key.
> How can I make it sound during pressing the key?
> I would not like to use custom externals.
> I would like to make it only by standard Max/MSP objects.
>
>

Try this.

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

----
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home
SFIFEM
Atrium Sound Space
OVOS
CMP

pencilina's icon

Hi,
Here's another option. Enjoy.
_b

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


tlb's icon

Thank you, smill and Bradford.
I tried both of the two patches and they work as I want.

Stefan Tiedje's icon

tlb schrieb:
> I'm trying to use my computer keyboard as a MIDI keyboard so that pressing "a" key triggers a C note.
> I made the following patch, but notes are generated after releasing the key.
> I know that it is because duration cannot be determined until releasing the key.
> How can I make it sound during pressing the key?
> I would not like to use custom externals.
> I would like to make it only by standard Max/MSP objects.

its thought too complicated (see patch below):

I have a fully blown Comidkey on the C74/share site. But beware, its not
updated correctly since Max 4.1. But you can have a look at how I did it
back then...

Unfortunately the keycodes on Mac OS X are not related to the hardware
anymore. They change if you change the keymap of your country. I haven't
found a satisfying solution to make make it crossplatform/crosskeymap...
Maybe I'll give it a shot next year... ;-)

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

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

tlb's icon

Thank you for another solution, Stefan.

Samuel Freeman's icon

this is how i do it:

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

On 26/11/2007, tlb wrote:
>
> Thank you for another solution, Stefan.
>
>

tlb's icon

Thank you for an elegant patch, samuel.

I think it would be a bit handier if you add an inlet to velocity number box like the following:

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