Forums > Javascript

Object(scriptname)

November 19, 2012 | 7:55 pm

Hello !!!!!!

im wondering if someone has a clue if there is a way :

to force JS to recognize objects at its inlets by their sript names .
lets say , ive got two knobs – their script names stands for "knob_one" , "knob_two" – connected to 0 inlet at JS object .
Can i recognize (inside JS) which knob was actually touched and get its value to process further ?


November 24, 2012 | 9:52 pm

Unfortunately not, you’d need to put a [prepend knob-one] before the [js] object so it calls a particular function. You could always look in to creating an abstraction that does this automatically and placing it inside a [bpatcher] but this is probably a lot more work than one simple [prepend]!


November 25, 2012 | 11:11 am

yes Luke , i just wanted to know how much lazy i can be . anyway, indexing every message this way (or [knob-one $1]) still remains quite elegant :)


Viewing 3 posts - 1 through 3 (of 3 total)