[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] mrmr



Thanks that’s it. I thought that with /mrmr I would get all messages with that prefix.  Indeed using the full string I can get the messages. 

mrmr also has a mode where the messages come in an array appearing has:
message: [ /mrmr slider horizontal 3 iPhone-de-Miguel-Negrao, 0.68199998140335 ]
but still doing OSCResponderNode(nil,/mrmr,{ print stuff action }).add doesn’t show anything... 

I’ll check your code.

thanks
Miguel 


A 2009/12/25, às 14:23, nonprivate escreveu:

hi, i think it's because the first item in the message is a single string:

"/mrmr/accelerometerZ/10/iPhone-de-Miguel-Negrao"

wheras the responder is set to respond to the string: "/mrmr"

you would idealy want all the elements in the first string to be seperate elements in an array or something similar, so you can do some if or case operations on it. but alas they are not!

i made an extension to OSCresponder recently to deal with this situation, i'm attaching the file, see if it helps you?
(if you set the response to "/mrmr" it should respond to any string with this in, and split the following elements up - although beware that any numbers in the string will still be strings after the split - if you know that an element in a certain position is a number then you can do something like "10".asInt i believe)
also my extension allows to set the responder to "/anything", and then any message will be responded to, which may also be useful (it's slightly nicer than setting thisProcess.recvOSCfunc directly)

<C2_OSCresponderExtensions.sc>

On 25 Dec 2009, at 14:28, Miguel Negrao wrote:

Having a bit of difficulty with an iphone 3gs, mrmr and sc. I’ve set the port to 57120 in the iphone. If I do 

(
thisProcess.recvOSCfunc = { |time, addr, msg| 
if(msg[0] != 'status.reply') {
"time: % sender: %\nmessage: %\n".postf(time, addr, msg); 
}  
}
);

I see all the messages comming in. E.g:

time: 881.128271648 sender: a NetAddr(192.168.1.105, 49195)
message: [ /mrmr/accelerometerZ/10/iPhone-de-Miguel-Negrao, 0.21299999952316 ]

But If I do :

o = OSCresponder.new(nil, "/mrmr", { arg time, resp, msg; [time,resp].postln; } ).add; // create the OSCresponder

nothing happens...  I’m a bit lost here, anyone care to help ?

thanks
Miguel Negrão



A 2009/04/08, às 08:10, kimm furt escreveu:

works allright here.
you can change the port/ip mrmr is sending to (prefs->server/port)
don't know how to find out if the lang uses udp/tcp...

best,
florian


Am 08.04.2009 um 07:29 schrieb scott lindroth:


I'm using mrmr on an iPod Touch.  Since mrmr only sends to port 1337, you can
use Osculator to reroute the message to port 57120.  Is there a better way?

Scott


Till Bovermann wrote:

Anyone ever tried to use mrmr[1] for iphone with sc?
I'm struggling with tcp-mode, currently… :-(


lg
Till

[1] http://poly.share.dj/projects/#mrmr
_______________________________________________
sc-users mailing list

info (subscription, etc.):
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/



--
View this message in context: http://www.nabble.com/mrmr-tp22334345p22943437.html
Sent from the Supercollider - User mailing list archive at Nabble.com.


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/