Controlling groove~ via js

jhindsight's icon

Hi all - can anyone explain why this doesn't work? apologies for the screenshot but i can't workout how to embed a js file into copy compressed.

at the minute all i want to do is bang the js object and it sends out the messages for looping groove~. i'll obviously be able to build this up into something more useful but for now even this basic thing won't work - groove~ just carries on looping for the full length of the sample. no error messages in the max window.

Any ideas?

thanks
Matt

Screen-Shot-2016-03-02-at-13.33.40.png
png
jvkr's icon

Probably this works:

outlet(0, "setloop", start, end);

jhindsight's icon

hmmmn no, same issue. interestingly if you just pass out the numbers as a list and prepend setloop then it works so it must be an issue with the format of the 'setloop x y' message but ideally i'd like to do it straight from the js without the extra prepend.

Screen-Shot-2016-03-02-at-16.16.55.png
png
jhindsight's icon

you have to use a variable to build the text first then what comes out of the outlet is a list rather than a symbol

var outString = "setloop"
outlet(0, outString , start, end);

hopefully that'll be useful for someone else.