Sunvox Live Coding ?

Multi-platform modular music creation studio
Post Reply
justin
Posts: 38
Joined: Thu Jan 14, 2016 9:01 pm

Sunvox Live Coding ?

Post by justin »

Hi,

I'm interested in using Sunvox for live coding.

Something like Sonic Pi (http://sonic-pi.net) which uses SuperCollider as the underlying engine. Problem is that I don't like the Sonic Pi/SuperCollider sounds very much; think Sunvox sounds much much better; but then not mad keen on the Sunvox UI; would like to play with an algorithmic approach.

SuperCollider/Sonic Pi do this via OSC, which Sunvox doesn't support (yet). However Sunvox has an API, which is reasonably easy to play with via Python -

https://gist.github.com/jhw/58b828bbe2f ... 070fc4d20b

I'm not planning to start a Sonic Pi competitor here, just do a few experiments. I could imagine having a simple HTTP server embedding Sunvox; having a client which sends blocks of algo code to the server; have the server execute the Python code blocks and convert them to Sunvox events; and have the server finally push those events to Sunvox.

I'm not sure how to do a 'live loop' and in particular integrate it with the timeline; but could imagine creating new timeline blocks on the fly for each time period, copying the last one and modifying it as per any new code blocks come in; so create some kind of 'infinite timeline', create the illusion of a live loop.

@nightradio: does this sounds feasible ? Any major obstacles with respect to the Sunvox design I should know about in advance ? Any thoughts / ideas ?

Also: if I start a Slack channel for interested devs to discuss the above does anyone object ?

Thank you -
zeffii
Posts: 32
Joined: Sun Apr 05, 2015 2:05 pm

Re: Sunvox Live Coding ?

Post by zeffii »

yes please.

glad to see i'm not the only one wishing for a different UI for sunvox (or at least a few very specific additions). (it's not that I haven't tried.. https://github.com/zeffii/sunvox_tunes/ ... ter/techno )
jph_wacheski
Posts: 34
Joined: Sat Mar 07, 2015 6:06 pm
Contact:

Re: Sunvox Live Coding ?

Post by jph_wacheski »

interesting,. I have been using Sunvox as a sound/music engine for most of my game dev,.
https://jph_wacheski.itch.io/

I suppose you can "live code" though ZGameEditor as the editor has live preview,. also giving the ability to live code integrated 3d visuals.

I have a few algorithmic bits in some games,. also some unreleased tool type stuff that never seems to "finnished",.
User avatar
queries
Posts: 316
Joined: Tue May 10, 2016 9:51 pm

Re: Sunvox Live Coding ?

Post by queries »

I've made some additions to https://github.com/metrasynth/sunvox-dll-python that might be useful for live work.

- Multiprocess support; spawn several SunVox DLL instances and control from a master process.

- Buffered output support; convenient API around the DLL's sv_audio_callback function.

I am not sure of the resolution just yet, but it's important to note that using buffered output and a sufficiently small buffer size, we may be able to have finer-grained control over the timing of events sent to multiple SunVox engines, may be able to stack multiple notes and effects atop each other on the same tick, and all sorts of fun stuff.

Using numpy makes it pretty easy to mix the output of two buffered processes together. "output = buf1 + buf2" :-)

I haven't done any higher-resolution tests to see how deep this can go, but I have verified that it's possible at least at a very coarse level (buffer size of 2 seconds).

See also viewtopic.php?f=16&t=4073&p=14272#p14272 for experiments with Jupyter Notebook.
User avatar
queries
Posts: 316
Joined: Tue May 10, 2016 9:51 pm

Re: Sunvox Live Coding ?

Post by queries »

Thanks zeffii for this set of material. Love the styles you're developing... listening to deepkick_07 as a test of a command line rendering tool. SunVox DLL handily accepted a 192000 sample rate... I don't have an interface that supports higher than 48000 yet but I thought I'd try it, and it sounds delightful. :-)

Code: Select all

python -m sunvox.tools.export --channels=2 --freq=192000 deepkick_07.sunvox
What kind of performance tools have you envisioned? I'd love to do what I can to help. I'm trying to find fun ways to push the SunVox DLL to its maximum potential. :Yahoo!:
zeffii
Posts: 32
Joined: Sun Apr 05, 2015 2:05 pm

Re: Sunvox Live Coding ?

Post by zeffii »

i'm a python head so anything that can be interfaced that way would be cool.

- add machines and wire them up
- set params for anymachine
- set loop-points of samplers
- constructing patterns
- cloning patterns (linked duplicates (shallow copy), but also the option to make a deepcopy)
- constructing sequences of patterns

i don't expect to need to be able to have strongly timed messaging event, just something like 'on the next tick trigger this pattern'
zeffii
Posts: 32
Joined: Sun Apr 05, 2015 2:05 pm

Re: Sunvox Live Coding ?

Post by zeffii »

let's continue partial discussion on your issue tracker ?
https://github.com/metrasynth/sunvox-dll-python
User avatar
queries
Posts: 316
Joined: Tue May 10, 2016 9:51 pm

Re: Sunvox Live Coding ?

Post by queries »

Here's a very short demo of some of the first noises made with "s4ils" (pronounced "sails"), a live coding system I'm building for SunVox.

https://www.youtube.com/watch?v=_M1EZZp ... e=youtu.be

Stay tuned!
User avatar
queries
Posts: 316
Joined: Tue May 10, 2016 9:51 pm

Re: Sunvox Live Coding ?

Post by queries »

I've added Python generator support to s4ils. So now we can use ASCII art to lay down a backbeat! And who knows what else you could do with generators...

https://www.youtube.com/watch?v=XKix-N6 ... e=youtu.be

At this point I'm going to let it settle for several days and focus on API design refinement, code cleanup, documentation, and making it slightly easier to install a "version 0.1" of this tool. I don't want to get burned out with a side project. :)
mrev
Posts: 46
Joined: Mon May 28, 2012 6:24 am

Re: Sunvox Live Coding ?

Post by mrev »

Hey Queries just wanted to say thanks for working on this excited to see where it will lead
Post Reply