monome / crow

Crow speaks and listens and remembers bits of text. A scriptable USB-CV-II machine
GNU General Public License v3.0
162 stars 34 forks source link

query calls currently registered stream_handler, not default stream #463

Closed trentgill closed 2 years ago

trentgill commented 2 years ago

@dndrks this should solve the issue in the norns .query request: https://github.com/monome/norns/issues/1555

issue is that the new norns handling doesn't use the old 'named' convention (eg. ^^stream) but instead allocates a dynamic name under the hood. the change was made such that future API changes on crow wouldn't require a co-edit to the norns system (ie. it would 'just work').

dndrks commented 2 years ago

raaaad, thanks @trentgill ! what do you think about bundling a new crow update for this and the other rad bits you've deployed since last july?

trentgill commented 2 years ago

i'm honestly not sure if it's working correctly atm. i merged a bunch of changes that i think may have introduced some instability in the system (and more liklihood for crashes after using a large script for a while). if folks have some time to run some tests & general usage then i'd be confident pushing it out -- i just don't have the cycles right now to handle a situation where the update causes issues for a bunch of people.

in the meantime, this particular issue can be solved by adding the following lines to a norns script:

crow.send("input[1].query = function() stream_handler(1, input[1].volts) end")
crow.send("input[2].query = function() stream_handler(2, input[2].volts) end")

(untested).