[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] A quick way to send the same Synthdef to many Servers
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-users] A quick way to send the same Synthdef to many Servers
- From: James Harkins <jamshark70@xxxxxxxxx>
- Date: Fri, 19 Jun 2009 18:06:28 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=GGzrPIXgqT3hYX799VJ0pYDZ2XgGRDk7jOL97QJXsSo=; b=Lzzo+XJNdfbvIM2FC9cq3C0GjbpGEYm6JGkywbjVeSeUJmrwiL0VORq8EeOXC8+el1 izfx8t4MA4jxX4ooX0vc7NmMjq7JCekJglpubVy9SKo3uv726TG9Q5u8UAXlgZGbujQ8 sc+qS6MTlxlwKOowXoNP3u5PZrppOUXoTBE64=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=NUTpeOIxiIz8E2Dm4km1hBidry3gwievTXE9aZdS8SY4k6QAKhmAMAPzJnZX6v/DMO A8EWMtopmEDxfuFyyUaKJxUWUWYgaCD7LQsJku2AAIE6IGvkdW+FsNK9AqoWmMIqoQUq sQDwLANGSLdx9DFTMMF63BU/ApVlQya2phtIU=
- In-reply-to: <C7D5DE51-F2FD-4FF9-BF0B-2D40F8995D53@xxxxxxxxx>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <8F8D063C-B513-4BE2-A613-6EE033EB69E2@xxxxxxxxx> <C7D5DE51-F2FD-4FF9-BF0B-2D40F8995D53@xxxxxxxxx>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
servers.do(SynthDef(...).send(_)) is a bit inefficient because it
rebuilds the graph and creates the binary stream for each server.
Faster (Tim Walters' suggestion -- this builds the graph just once):
~def = SynthDef(...);
~servers.do(~def.send(_));
But this is faster still. The above converts the synthdef to binary
repeatedly, once for each server. This way creates the binary stream
only once.
~def = SynthDef(...);
~defBinary = ~def.asBytes;
~servers.do(_.sendMsg(\d_recv, ~defBinary));
But making a SynthDef is fairly low-traffic, maybe not worth the
hackery to save just a few cpu cycles :)
hjh
--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
_______________________________________________
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/