[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] preliminary fix for Server:dumpOSC
- To: sc-dev@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-dev] preliminary fix for Server:dumpOSC
- From: Dan Stowell <danstowell+sc3@xxxxxxxxx>
- Date: Thu, 31 Dec 2009 14:52:59 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=b7MDI9ReiEUh2yH54Z7N+2L3Iw9NLHE8byFiSjEYQcQ=; b=GPH7tbxQNNvh/wa1Fa+VkBLP1Rrr6OFLYapeGmJM5otgmL00sO7BJXTACU1iobv5Cb Rpv+UnyT6bqy3W/Crif6YMWYY9VoOakzzUvUvInpTiC6Bnd4pmta1pqDqyzHfKxUzAJt 9Swfi9gTLrK6F/s2oh3qMqcRDlr6C+dC2Xh+U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=mbwB83ZMbedi3pyMAn6y8C6mVikJS7n1fggP1nwsQ+efmcKxVbo/aqM1CCtOkzDi/q CHwB3jIJ6geQrzuZMYO2DN+/otBg7Q5qClnpLQUHfzKSg5lkIuvDigKFOzmfU4XxI9kC x1NbTcqUyKAv2I24pBw5pkIGky+ZqPYJzZEL4=
- In-reply-to: <p06230907c76242e123af@xxxxxxxxxxxxxx>
- List-id: SuperCollider developers mailing list <sc-devel.create.ucsb.edu>
- References: <p06230907c76242e123af@xxxxxxxxxxxxxx>
- Reply-to: sc-dev@xxxxxxxxxxxxxxxx
- Sender: owner-sc-dev@xxxxxxxxxxxxxxxx
Well this of course doesn't replicate the desired behaviour - if
messages arrive at scsynth from another machine or another app they
won't be shown; if messages fail to arrive from sclang they will still
be shown anyway. IMHO that's so different that there's quite a danger
of confusion by putting this under the same name.
Dan
2009/12/31 Julian Rohrhuber <rohrhuber@xxxxxxxxxxxxxx>:
> Since there is currently no fix for the broken dumpOSC in sc server app,
> I've implemented an sclang version that seems to work fine. Any objections?
>
> + // currently broken
> dumpOSC { arg code=1;
> /*
> 0 - turn dumping OFF.
> @@ -628,7 +630,15 @@
> dumpMode = code;
> this.sendMsg(\dumpOSC,code);
> }
> -
> +*/
> + dumpOSC { arg code=1;
> + if(code > 0) {
> + addr = DumpNetAddr.newFrom(addr);
> + } {
> + addr = addr.saveAddr;
> + }
> + }
> +
>
>
> ===================================================================
> ---
> /Volumes/data/sc/SuperCollider3/build/SCClassLibrary/Common/Control/NetAddr.sc
> (revision 9638)
> +++
> /Volumes/data/sc/SuperCollider3/build/SCClassLibrary/Common/Control/NetAddr.sc
> (working copy)
> @@ -252,3 +252,51 @@
> ^res
> }
> }
> +
> +DumpNetAddr : NetAddr {
> + var <>saveAddr;
> +
> + *newFrom { arg addr;
> + ^this.new(addr.hostname, addr.port).saveAddr_(addr);
> + }
> +
> + sendRaw { arg rawArray;
> + this.dump(nil, rawArray);
> + super.sendRaw(rawArray);
> + }
> +
> + sendMsg { arg ... args;
> + this.dump(nil, [args]);
> + super.sendMsg(*args);
> + }
> +
> + sendBundle { arg time ... args;
> + this.dump(time, args);
> + super.sendBundle(time, *args);
> + }
> +
> + dump { arg time, args;
> + var str, docStr, beats, beatsThisThread;
> + if(#['/status',
> '/quit'].includes(args.obtain(0).obtain(0).asSymbol))
> + { ^this };
> + // should get the beats outside the { }.defer block
> + beats = SystemClock.seconds;
> + beatsThisThread = thisThread.clock.tryPerform(\beats);
> + defer {
> + str = "latency %\tSystemClock logical time %\n
> thisThread logical time %\n"
> + .format(time, beats, beatsThisThread);
> + args.do { |msg|
> + str = str ++ Char.tab;
> + msg = msg.collect { arg el;
> + if(el.isKindOf(RawArray) and: {
> el.size > 15 })
> + { "data[%]".format(el.size)
> } { el };
> + };
> + str = str ++ msg.asCompileString ++ Char.nl;
> + };
> + str.postln;
> + str = str ++ Char.nl;
> + };
> + }
> +
> +}
> +
>
> --
>
>
>
>
>
> .
>
> _______________________________________________
> sc-dev mailing list
>
> info (subscription, etc.):
> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-dev/
> search: https://listarc.bham.ac.uk/lists/sc-dev/search/
>
--
http://www.mcld.co.uk
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/