building an ascii to midi AU plug

Rodrigo's icon

so ive been playing a bit with mainstage, and more specifically i
think im becoming hooked to some of the logic plugs(the epiano is
especially nice)

rax has been bought(again) and one if the new features is supposed to
be ascii control of midi functions

but im starting to think that i may just stay with maintage for live usage

as far as i know, mainstage doesnt do anything like that, and its
unlikely that itll be an added feature, since its more 'pro' than that

what i would like to do is to create an (AU) plugin (to work in
mainstage/rax) that will convert key messages into midi note messages,
with some sort of dropdown menu interface to make it more openly
usable

making that in max shouldnt be too difficult

however, i have no idea how to go about making something like that
into a plugin, or if it would even work (does 'key' work outside of
max, if the plugin/app is minimized), or if its possible to do so with
just max (do i need pluggo for this?)

i did a forum search, and a quick google search

i.m.klif's icon

i don't know anything about building plugins with max, but there is
other way to get the same functionality.

you should use hi object in max. unlike key object, hi doesn't care if
you app is in foreground or background. also, it takes commands only
from selected device.

select your numeric keyboard as hi input. map the keys. make the
system that triggers midi messages (you can make this easy or
complicated depending on your needs). send midi messages to IAC bus
(you create one in Audio MIDI setup application in you Utilities
folder. in Logic, select that IAC bus as MIDI input for remote
control.

i don't think you will be able to put this in a plugin, but you can
run it as small application in background.

if you need more help, i can look at your patch.

Roman Thilenius's icon

there is an object in maxmsp for key input and this also works in pluggo.

what needs to be considered is that plug-ins can only recieve keys when the host allows this.
logic, cubase, protools, no problem. but rax ..? no idea.

and of course you can only ue notess which the host does not need otherwise. usually people use combinations with alt and command, but not everyone.

you might also find out that a computer keyboard does not have note -off or velocity. :)

Rodrigo's icon

i had forgotten about the hi object completly

and i guess building a small standalone isnt a bigdeal

i just figured itd be nice/tidy to have it as an internal plug

ok, so i built a bit of the patch, i have 10 key/midi combos, right
now im just using noteout to get the functionality down

its working fine, the only problem is that when i put in the numeric
pad, it doesnt show up in hi at all, when i select menu, it only shows
the same ones it always does(no new usb pad),
key still picks up the usb pad numbers though

is there anything special you have to do to get an external(usb) input
device recognized by hi?

and if i understand the last part of your suggestion, if i create an
IAC bus in audiomidi setup, it should show up as a midiout choice in
max?

heres the patch:

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

On 9/24/07, klif _ wrote:
> i don't know anything about building plugins with max, but there is
> other way to get the same functionality.
>
> you should use hi object in max. unlike key object, hi doesn't care if
> you app is in foreground or background. also, it takes commands only
> from selected device.
>
> select your numeric keyboard as hi input. map the keys. make the
> system that triggers midi messages (you can make this easy or
> complicated depending on your needs). send midi messages to IAC bus
> (you create one in Audio MIDI setup application in you Utilities
> folder. in Logic, select that IAC bus as MIDI input for remote
> control.
>
> i don't think you will be able to put this in a plugin, but you can
> run it as small application in background.
>
> if you need more help, i can look at your patch.
>

Rodrigo's icon

restarting max with the usb numkey pad plugged in solved the first
problem, i figured sending the menu command to hi would check
available hardware

On 9/24/07, Rodrigo Constanzo wrote:
> i had forgotten about the hi object completly
>
> and i guess building a small standalone isnt a bigdeal
>
> i just figured itd be nice/tidy to have it as an internal plug
>
> ok, so i built a bit of the patch, i have 10 key/midi combos, right
> now im just using noteout to get the functionality down
>
> its working fine, the only problem is that when i put in the numeric
> pad, it doesnt show up in hi at all, when i select menu, it only shows
> the same ones it always does(no new usb pad),
> key still picks up the usb pad numbers though
>
> is there anything special you have to do to get an external(usb) input
> device recognized by hi?
>
> and if i understand the last part of your suggestion, if i create an
> IAC bus in audiomidi setup, it should show up as a midiout choice in
> max?
>
> heres the patch:
>
> max v2;
> #N vpatcher 461 268 1275 783;
> #P window setfont "Sans Serif" 9.;
> #P hidden number 62 218 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 45 157 40 196617 key;
> #N vpreset 1;
> #X append 1 2 5 45 214 toggle int 1 ; 7 153 262 number int 0 ; 9 184
> 338 number int 50 ; 11 184 368 number int 60 ; 13 110 279 number int
> 1 ; 15 200 338 number int;
> #X append 1 2 52 ; 17 200 368 number int 61 ; 20 216 338 number int
> 53 ; 22 216 368 number int 62 ; 25 232 338 number int 55 ; 27 232
> 368 number int 63 ; 30 248 338;
> #X append 1 2 number int 57 ; 32 248 368 number int 64 ; 35 264 338
> number int 58 ; 37 264 368 number int 65 ; 40 280 338 number int 60
> ; 42 280 368 number int 66 ; 45 296 338;
> #X append 1 2 number int 62 ; 47 296 368 number int 67 ; 50 312 338
> number int 63 ; 52 312 368 number int 68 ; 55 328 338 number int 65
> ; 57 328 368 number int 69 ;;
> #P preset 334 130 28 18;
> #P hidden newex 290 343 29 196617 int;
> #P number 368 328 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 328 15 0;
> #P number 338 328 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 343 27 196617 sel;
> #P hidden newex 290 327 29 196617 int;
> #P number 368 312 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 312 15 0;
> #P number 338 312 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 327 27 196617 sel;
> #P hidden newex 290 311 29 196617 int;
> #P number 368 296 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 296 15 0;
> #P number 338 296 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 311 27 196617 sel;
> #P hidden newex 290 295 29 196617 int;
> #P number 368 280 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 280 15 0;
> #P number 338 280 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 295 27 196617 sel;
> #P hidden newex 290 279 29 196617 int;
> #P number 368 264 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 264 15 0;
> #P number 338 264 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 279 27 196617 sel;
> #P hidden newex 290 263 29 196617 int;
> #P number 368 248 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 248 15 0;
> #P number 338 248 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 263 27 196617 sel;
> #P hidden newex 290 247 29 196617 int;
> #P number 368 232 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 232 15 0;
> #P number 338 232 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 247 27 196617 sel;
> #P hidden newex 290 231 29 196617 int;
> #P number 368 216 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 216 15 0;
> #P number 338 216 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 231 27 196617 sel;
> #P hidden newex 290 215 29 196617 int;
> #P number 368 200 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 200 15 0;
> #P number 338 200 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 215 27 196617 sel;
> #P number 279 110 126 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 290 199 29 196617 int;
> #P number 368 184 31 9 0 0 4096 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P button 323 184 15 0;
> #P number 338 184 30 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P hidden newex 262 199 27 196617 sel;
> #P number 262 153 70 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 262 131 67 196617 / 10000000;
> #P toggle 214 45 15 0;
> #P newex 214 65 52 196617 metro 10;
> #P newex 214 109 58 196617 unpack 0 0;
> #P newex 214 87 191 196617 hi Apple Internal Keyboard / Trackpad 3;
> #P hidden newex 290 369 82 196617 makenote 127 1;
> #P hidden newex 290 393 43 196617 noteout;
> #P hidden connect 60 0 61 0;
> #P connect 5 0 4 0;
> #P connect 4 0 2 0;
> #P connect 2 0 3 0;
> #P connect 3 1 6 0;
> #P connect 6 0 7 0;
> #P hidden connect 7 0 8 0;
> #P hidden connect 7 0 14 0;
> #P hidden connect 7 0 19 0;
> #P hidden connect 7 0 24 0;
> #P hidden connect 7 0 29 0;
> #P hidden connect 7 0 34 0;
> #P hidden connect 7 0 39 0;
> #P hidden connect 7 0 44 0;
> #P hidden connect 7 0 49 0;
> #P hidden connect 7 0 54 0;
> #P fasten 3 1 13 0 267 128 275 128 275 108 284 108;
> #P hidden fasten 9 0 8 1 343 198 284 198;
> #P hidden fasten 15 0 14 1 343 214 284 214;
> #P hidden fasten 20 0 19 1 343 230 284 230;
> #P hidden fasten 25 0 24 1 343 246 284 246;
> #P hidden fasten 30 0 29 1 343 262 284 262;
> #P hidden fasten 35 0 34 1 343 278 284 278;
> #P hidden fasten 40 0 39 1 343 294 284 294;
> #P hidden fasten 45 0 44 1 343 310 284 310;
> #P hidden fasten 50 0 49 1 343 326 284 326;
> #P hidden fasten 55 0 54 1 343 342 284 342;
> #P hidden fasten 10 0 12 0 328 198 295 198;
> #P hidden fasten 16 0 18 0 328 214 295 214;
> #P hidden fasten 21 0 23 0 328 230 295 230;
> #P hidden fasten 26 0 28 0 328 246 295 246;
> #P hidden fasten 31 0 33 0 328 262 295 262;
> #P hidden fasten 36 0 38 0 328 278 295 278;
> #P hidden fasten 41 0 43 0 328 294 295 294;
> #P hidden fasten 46 0 48 0 328 310 295 310;
> #P hidden fasten 51 0 53 0 328 326 295 326;
> #P hidden fasten 56 0 58 0 328 342 295 342;
> #P hidden connect 58 0 1 0;
> #P hidden connect 53 0 1 0;
> #P hidden connect 48 0 1 0;
> #P hidden connect 43 0 1 0;
> #P hidden connect 38 0 1 0;
> #P hidden connect 28 0 1 0;
> #P hidden connect 33 0 1 0;
> #P hidden connect 23 0 1 0;
> #P hidden connect 18 0 1 0;
> #P hidden connect 12 0 1 0;
> #P hidden connect 1 0 0 0;
> #P hidden fasten 1 1 0 1 367 389 311 389;
> #P hidden fasten 11 0 12 1 373 198 314 198;
> #P hidden fasten 17 0 18 1 373 214 314 214;
> #P hidden fasten 22 0 23 1 373 230 314 230;
> #P hidden fasten 27 0 28 1 373 246 314 246;
> #P hidden fasten 32 0 33 1 373 262 314 262;
> #P hidden fasten 37 0 38 1 373 278 314 278;
> #P hidden fasten 42 0 43 1 373 294 314 294;
> #P hidden fasten 47 0 48 1 373 310 314 310;
> #P hidden fasten 52 0 53 1 373 326 314 326;
> #P hidden fasten 57 0 58 1 373 342 314 342;
> #P hidden fasten 8 0 10 0 267 216 320 216 320 182 328 182;
> #P hidden fasten 14 0 16 0 267 232 320 232 320 198 328 198;
> #P hidden fasten 19 0 21 0 267 248 320 248 320 214 328 214;
> #P hidden fasten 24 0 26 0 267 264 320 264 320 230 328 230;
> #P hidden fasten 29 0 31 0 267 280 320 280 320 246 328 246;
> #P hidden fasten 34 0 36 0 267 296 320 296 320 262 328 262;
> #P hidden fasten 39 0 41 0 267 312 320 312 320 278 328 278;
> #P hidden fasten 44 0 46 0 267 328 320 328 320 294 328 294;
> #P hidden fasten 49 0 51 0 267 344 320 344 320 310 328 310;
> #P hidden fasten 54 0 56 0 267 360 320 360 320 326 328 326;
> #P pop;
>
>
> On 9/24/07, klif _ wrote:
> > i don't know anything about building plugins with max, but there is
> > other way to get the same functionality.
> >
> > you should use hi object in max. unlike key object, hi doesn't care if
> > you app is in foreground or background. also, it takes commands only
> > from selected device.
> >
> > select your numeric keyboard as hi input. map the keys. make the
> > system that triggers midi messages (you can make this easy or
> > complicated depending on your needs). send midi messages to IAC bus
> > (you create one in Audio MIDI setup application in you Utilities
> > folder. in Logic, select that IAC bus as MIDI input for remote
> > control.
> >
> > i don't think you will be able to put this in a plugin, but you can
> > run it as small application in background.
> >
> > if you need more help, i can look at your patch.
> >
>

Stefan Tiedje's icon

Roman Thilenius schrieb:
> you might also find out that a computer keyboard does not have note
> -off or velocity. :)

My computer keyboard has no velocity, but definitely has key -off...

Stefan

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

Rodrigo's icon

you guys all got jipped on your keyboards,

my trusty 17" powerbook has backlit keys, with velocity, AND aftertouch!

on a more technical note, i got the patch where i want it, but i
really dont know how to setup the dummy midi driver/connection

do i just create a device in audio/midi setup and just name the
midiout port accordingly?

On 9/27/07, Stefan Tiedje wrote:
> Roman Thilenius schrieb:
> > you might also find out that a computer keyboard does not have note
> > -off or velocity. :)
>
> My computer keyboard has no velocity, but definitely has key -off...
>
> Stefan
>
> --
> Stefan Tiedje------------x-------
> --_____-----------|--------------
> --(_|_ ----|-----|-----()-------
> -- _|_)----|-----()--------------
> ----------()--------www.ccmix.com
>
>
>