SuperCollider

Learning SuperCollider patterns: legato, sustain and using pairs

Yesterday I had problems understanding why does a SynthDef and it’s Synth instance complain when it’s envelope duration is shorter than duration \dur. The following code will produce FAILURE IN SERVER /n_set Node 1067 not found complaints in the post window.

The sound will be generated fine, but the problem is that the doneAction and sustain value in Env.linen result in the Synth instance being freed before Pbind does it. So when Pbind does tries to free it, it’s already gone, it doesn’t exist anymore.

I asked nice SC people on SC FB group and the answer led me to understand that there’s a good use of\sustain parameter in Pbind, which deals with exactly that. So to properly control sustain time, an example shows how it can be done:

It seems like the most important part is that the SynthDef has a sustain argument. Pbind will calculate sustain from \dur so that it doesn’t even have to be defined in the Pbind.

There’s a nice thing used above, which I was looking for a while – how to defined note and it’s duration in pairs instead of on separate lines for each parameter: [\degree, \dur] and what follows is a list of pairs.

supercollider: easy beats with patterns

minor random bliss in two

Learning Patterns in SuperCollider, here’s a little lullaby:

 

SuperCollider Help in dark grey

In order to browse and use SuperCollider help system in inverted gray colours, there are two quick hacks:

  • modify internal Help system
  • style the help on doc.sccode.org using Stylish

To modify internal Help system find the file /usr/local/share/SuperCollider/HelpSource/scdoc.css and add at the bottom/end of the file:

If you use doc.sccode.org and a Stylish add-on in (for example) Firefox to custom-style pages, you can add a new style which is similar to the above:

IF3 Progress Report #1

With the summer-time, a working-time on my new audio-visual piece, Interface Fractures III, begun. It is now almost confirmed that the date of premiere showing at Slovenian Cinemateque (Slovenska Kinoteka) is most probably 15/september. Since the plan was that we spend some quality sun&salt time at Croatian coast I brough some machinery with me to vacation. It’s always fun to work in the summer heat!

Anyway, with this next episode in the series I want to upgrade technically a “little bit”, so I acquired a better graphic card (Nvidia GTX960) and a multi-touch screen monitor with fullHD 1080p resolution. Adding also a 120GB SSD drive I needed to reinstall operating system (UbuntuStudio 14.4.1), separately compiled drivers for Nvidia and the rest worked pretty much out of the box (after some apt-get-ing). Multi-touch is application-dependent and my idea (for many years now) is to write custom interfaces for live sound/music/noise and visual composition and improvisation.

More technicalities: I compiled Processing and SuperCollider, tried a multi-touch library in Processing (SMT) but it didn’t work. Filed an issue at their GitHub and went on with a version of SuperCollider that supports multi-touch (I was kindly pushed in the right direction by Scott Cazan, who added MT support to his own branch of SC on GitHub). After some basic testing I wrote a simple granulator with a GUI. I also tested a very basic idea of TABs-like interface. In Processing I’ve whet my appetite with an excercise that focused on off-screen rendering and blending two images together.

Processing: slice and blend screeshot

 

Continue reading

SuperCollider GUI – tabs proof of concept

These are very newbie baby steps in the construction of a something bigger, a powerful flexible interface for a touch-screen device. Novels are being written one word at the time, right?

The following is a snippet of code that I needed to write in order to test a TABs-like behaviour in SuperCollider QT GUI system. Essentially, I was curious if it’s possible to show and hide whole windows/areas of different widgets using a tabs-like paging system – something we’re all used to now from browsers, for example.

SC GUI TABs proof of concept anim gif

Granular synthesis in SC

This morning I started to work on a granular machine in SuperCollider. This is what I got so far:

Interface Fractures III: Silicon log #1

These days I started some work on a new chapter of my audio-visual series called “Interface Fractures”.

Bought a new graphic card – Nvidia-based GTX960.
Also a fullHD multitouch screen is here for exploitation in next couple of years.

SuperCollider for multitouch

Somebody (Scott Cazan) on the supercollider-users list mentioned a fork of SuperCollider with multitouch support (which will be included in main with 3.8 release). I cloned git fork from Cazan’s github, installed build dependencies, couple of twiddles, and compilation went through.

 

Continue reading

saturday supercolliding

Today I worked more on a piece of code that should get up basic functionality of SenseStage/DataNetwork. With some nice help from Marije I’m now this far in SuperCollider:

I still have (more and more) questions. It’s funny, as you progress in slowly becoming familiar with language things keep on popping out, questions that are most of the time in the form of “why this doesn’t work? it should work, but it doesn’t!”

For example, if i write “~variable” what exactly does it mean? It seems to be some kind of global variable, according to SC docs?