[PD] [hid] button down press
hello all... first off, wow! i never took a look at pd before i needed to control hydrogen via usb gamepad today, but wow... awesome program, sorry to have looked over it for so long. that being said, many thanks to the community developers for making my computer audio tinkering 10x more fun! now... i just started using it today. my current flow for sending MIDI events via USB gamepad button downpresses is like this: [hid]---[route key][route btn_0][route 1][makenote] the second route object of course has more than one button (btn_0 through btn_11) with each output going through its own [route 1] (to only signal on the down press). needless to sat thats a lot of [route 1] objects... is there a way i can clean this code up? something along the lines of [route btn_0,1 btn_1,1 btn_2,1] etc hope i made myself clear... thanks much, tyler ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [hid] button down press
Hi Tyler, anything you are doing repetitively in Pd is a good candidate for putting in an abstraction with a $1 creation argument. You patch might contain: [hid]--[route key]--[send buttons] [buttons_ab btn_0][buttons_ab btn_1][buttons_ab btn_2] etc etc [receive notes]--[makenote] where [buttons_ab] is a separate file named buttons_ab.pd saved in same directory or someplace else in your PATH containing: [receive buttons]--[route $1]--[route 1]---[send notes] Catch my drift? Also, depending on what happens later, your [route 1] could also be a [select 1]. Have a look at the help file for [select] and see if it is more or less useful. Best! Derek On 4/11/10 10:42 AM, Tyler Leavitt wrote: now... i just started using it today. my current flow for sending MIDI events via USB gamepad button downpresses is like this: [hid]---[route key][route btn_0][route 1][makenote] the second route object of course has more than one button (btn_0 through btn_11) with each output going through its own [route 1] (to only signal on the down press). needless to sat thats a lot of [route 1] objects... is there a way i can clean this code up? something along the lines of [route btn_0,1 btn_1,1 btn_2,1] etc -- ::: derek holzer ::: http://macumbista.net ::: ---Oblique Strategy # 15: Ask your body ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [hid] button down press
hi Tyler, maybe [match] ? gr, Tim 2010/4/11 Tyler Leavitt thecryofl...@gmail.com hello all... first off, wow! i never took a look at pd before i needed to control hydrogen via usb gamepad today, but wow... awesome program, sorry to have looked over it for so long. that being said, many thanks to the community developers for making my computer audio tinkering 10x more fun! now... i just started using it today. my current flow for sending MIDI events via USB gamepad button downpresses is like this: [hid]---[route key][route btn_0][route 1][makenote] the second route object of course has more than one button (btn_0 through btn_11) with each output going through its own [route 1] (to only signal on the down press). needless to sat thats a lot of [route 1] objects... is there a way i can clean this code up? something along the lines of [route btn_0,1 btn_1,1 btn_2,1] etc hope i made myself clear... thanks much, tyler ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list