Comments (4)
@telephon
I've figure a kind of a dirty way to achive this
if (msg[0].asString=="/d_recv", {
msg[1].size.postln;
msg[1].postln;
h = File("~/test.scsynthdef".absolutePath, "wb");
h.write(msg[1]);
h.close();
SynthDescLib.global.read("~/test.scsynthdef".absolutePath);
});
write to a file and then use SynthDescLib
I'll close the issue then. Thanks so much Julian!
from superdirt.
You are welcome!
Your analysis is correct: you need to register the SynthDef in the SynthDescLib (what normally happens when you call add
).
A good solution is to use the Utopia network music library (https://github.com/muellmusik/Utopia):
Quarks.install("Utopia");
The documentation is still mostly absent. You could try the following setup (on both computers):
(
~win = Window("We share everything").front;
~win.layout = VLayout.new.add(~listView = ListView.new);
~addrBook = AddrBook.new;
// to get updates, just add a dependant
~addrBook.addDependant({|addrBook, what, who|
{~listView.items = addrBook.peers.collectAs({|peer|
peer.name ++ " | " ++ peer.addr.ip ++ " | " ++ if(peer.online, "online", "offline");
}, Array)}.defer;
});
~addrBook.addMe; // will automatically add you using your user name
//~addrBook.addMe(\myNameOrWhatever); // or specify one
~hail = Hail(~addrBook);
~srelay = SynthDescRelay(~addrBook);
);
If that doesn't work, you could also hack something much simpler. But the above will give you a lot of useful things.
from superdirt.
@telephon
Thanks so much for the great guide!
Actually we already some system orking here but kind of stuck at sharing synth, we have something like this client running on both of our sc
OSCdef.newMatching(
/d_recv,
{|msg, time, addr, recvPort|
msg.postln;
s.listSendMsg(msg);
})
and we just sync synth by Synth(\test, {}).doSend(~hub)
, where ~hub
is a simple server that forward many osc here..
so for d_recv
, we have this Int8Array
of this synthdef we don't know how to add to the SynthDescLib
Not sure if I'm explain clear enough.
Will look at the Utopia source maybe that will help
from superdirt.
Yes, you can of course send the byte array to the scsynth, but your def is missing on the sclang side. There are many ways to send this info, but the best solution I think is in Utopia.
from superdirt.
Related Issues (20)
- SuperDirt WASM?
- `arp` step patterns not working HOT 3
- Start SuperDirt on a server other than default s HOT 1
- startup code works with 1.7.2, fails with 1.7.3 HOT 5
- module arguments default to 0 instead of default value given in SynthDef HOT 6
- NRPN fails to send value 0 for CC 38
- Q: How do default arguments in the SynthDefs SuperDirt use work? HOT 3
- delay stops working sometimes HOT 4
- amp parameter scaling HOT 3
- playing samples in tune using pitch metadata HOT 2
- unit "s" unexpected behavior HOT 1
- How to add a custom DirtEventType for MIDI over OSC HOT 10
- Supercollider 3.13.0-rc1 / SuperDirt 1.7.3 - High Cpu Usage At Idle - macOS HOT 17
- SuperDirt does not recognize SynthDef variants HOT 2
- superchip is way out of tune HOT 2
- cut groups break on simultaneous events HOT 29
- Should we send RPN Null after NRPN? HOT 4
- d3 onwards not sounding HOT 1
- Lazy Sample Loading doesn't find any samples (Windows 11/SuperCollider 3.12.1) HOT 3
- Effect "dj-filter" should be inactive when value is 0.5 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superdirt.