@SC2Sbot - SuperCollider2SoundBot
https://twitter.com/SC2Sbot
At the beginning of the pandemic I was thinking about how to create distributed performance spaces within the internet. I coded a Twitter bot to which one can send a SynthDef and the bot will reply with a rendered video with the matching audio.
Recently I decided to re-activate this bot and make it a bit more secure [but please don’t push…], therefore introducing:
Check out e.g. this tweet: https://twitter.com/SC2Sbot/status/1529205360669646851
Simply write a tweet to the bot (like @SC2Sbot <my synthdef>
) and the bot should reply with a 30 sec video within a minute.
The code will be put into {<your code>}.play
, so something like SinOsc.ar
is alreday valid.
Some other restrictions:
- Simply Ugens/SynthDefs, no sclang code such as Pbind or a routine (primary for security, but also due server constrains)
- No literal arrays (
#[1, 2, 3]
) as this would clash with hashtags - maybe we can fix this if there is interest
The source code is hosted at GitHub and I am happy about contributions, feedback, improvements etc and would love to hear some tweets from you!
This is still in Beta and I hope the bot does not crash, so please do not be sad if the bot did not reply. It will also not reply in case you have submitted non-executable sclang code.
6 Likes
cool project : )
and works for me: https://twitter.com/SC2Sbot/status/1529414072353136641
two suggestions:
-
the description is a bit misleading (or even technically wrong?), i feel: instead of “Send a UGen …” it should be “Send a Synth function …”
-
there is a rich tradition around sctweets … if you (additionally) accepted complete play{..}
syntax(*), then your bot could render any sctweet!
thanks for this!
eddi
(*) edit: i should clarify, i mean i would like to submit an sctweet like this, too:
fork{loop{play{Splay.ar({Formlet.ar(Crackle.ar(2,0.1),77.rand.midicps,0.0001)*LFGauss.ar(9,1/4,0,0,3)}!3)};2.wait;}};
i guess you could make your life easier if you just required that the submissions be executable in SC, rather than offering the service of wrapping the submission in play{..}
1 Like
Thanks for your tweet and recommendations. I’ll try to get play{}
running but this is a bit more difficult because I run SuperCollider on hardware that does not have a soundcard and within a docker container and can therefore not use live synthesis but need to rely on NRT [the problem is that Jack has problems with RT priority in docker, pipewire works a bit better but its really wonky as well]. I would appreciate some support or help if someone has some suggestions on how to do this 
Also we would need a queue in this case so we do not record on tweet over the other but this is not too hard to implement.
Thanks for the hint with the description, I updated it 
Edit: Or maybe its possible to make NRT accepting the suggested format? Right now I convert the code in this manner sc-twitter-bot/blueprint.sc at main · capital-G/sc-twitter-bot · GitHub where $synth_def
is the code that was submitted.