rukano

music, technology, and more…

Live coding practice

with one comment

I haven’t posted anything in the last weeks, so here’s some live coding practice I did this night trying some new stuff I saw on the SC users list. Basically nothing new, but it makes the workflow easier when playing with Pbind or similar with SynthDefs but also in the ProxySpace. Basically the PatternStreamPlayer has to be somewhere in the NodeProxy chain but it has to be played externally:

~node = Pbind();
~node.play

Maybe like that it will set the outputs to the right buses? Anyway, using

~node = Pbind().play

didn’t worked (well it worked, but one can’t route the signal of that pattern player to other nodes or filter it via ProxyChain. Anyway, here is the result. I forgot to turn on the History, so you’ll have to conform with the result only.

EDIT:  I also uploaded a second part a little bit more “beaty”. Hope you like it.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

March 12th, 2010 at 3:50 am

SuperCollider doesn’t rock… it Jazz!

without comments

Of course SuperCollider rocks. But it does also jazzes. Patterns aren’t the newest thing in SuperCollider, but one of the most practicals (of course for pattern based music). Also the MIDI type for the patterns isn’t also new, but I’m just amazed how easy you can make just the music and let a host take care of the sampling, sounds, effects, etc… In this case I started with GarageBand, with a piano sound playing fifths over 4 octaves with some variations, it sounded quite minimalist but also quite ‘ligetian’ (or ligetic, or ligetish… whatever) and I liked it. I tried to improve this with other instruments but it’s hard to route different MIDI devices and channels in GarageBand (if it’s even possible). So I took Logic Studio 9 and selected the channels and turned on the “Auto demix by channel if multitrack recording” in the ‘recording’ section of the project settings. So here’s a little test with a banjo, a piano, an e-piano, a double bass and a drum kit. Those are played by 7 patterns from SuperCollider (3 patterns are separated to control the drum set more independently, but they go all to the same midi channel) and there’s a global scale defining the scale for all the patterns (except the drum patters, those are by midi note and not by scale degree). So here’s the result and here’s the code.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

November 21st, 2009 at 8:14 pm

Posted in Uncategorized

Livecoding with live sampling

with 2 comments

I was jamming with some friends yesterday and exploring some sound until I got to play and record buffers live and use them as sound material. Of course this isn’t new, but I was very impressed by the easy of use for a live environment. One could just sing the degree which one want’s and that’s it. The sound material is also more interesting than the easy standard sound I usually use and well, the rhytmic can be complemented from within SC. Anyway, just wanted to share this file because I liked the sound of it. The code is in my GIT repository, but sadly not as a History file, so you just get the final result and not the whole process.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

November 7th, 2009 at 8:55 pm

SuperCollider on Twitter (or how I learned to love the sc-tweets)

without comments

Just a quick one.
Dan Stowell curated an album made out of compositions that aren’t longer than 140 charactes in SuperCollider code (sc140). The pieces aren’t only great, the code is pretty ingenious. A lot of recursions, syntax shortcuts and tricks to generate a great sound or piece. The album and code are free to download and view, but if you want more of these tweet that didn’t make it to the album,there are lots of code snippets that are also really good. One can find them on twitter by #sc or #supercollider or searching for ‘play{‘ or ‘.play‘. There’s a Yahoo Pipe to facilitate this search, but not all the ‘sc-tweets‘ are there. Another library of sc tweets is the swiki. Great stuff, great sounds, nice code, nice ideas… just digg into it. If you are into SuperCollider, there’s a lot one can learn from these pieces.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

November 2nd, 2009 at 1:09 am

Posted in programming

Tagged with , , , ,

Controlling a QuartzComposer Composition in a Cocoa App

without comments

There is a way to set controllers directly from within Interface Builder to the published inputs of a Quartz Composition (QCView in the IB). This is nice, if you just want to do an animation that you control from the GUI elements. I’m working on an animation controlled within the program, and I really need to get to those published inputs to send the decisions made in the application.
This little solution may not be world changing, but I’ve searched for this little piece of code for a couple of minutes. so just as a reminder:

IBOutlet QCView * qcAnimation;

[qcAnimation setValue: (id) forInputKey: @"myKey"];


Yes… so easy! but Why it isn’t in the documentation? Well it is, but it won’t appear on the QCView or QCComposition or the quick help if you need. So, how to search for this kind of methods very quick? I found it was nicer to take a look at the header files than the documentation. If one goes to the QCView header it says:

@interface QCView : NSView <QCCompositionRenderer>

This means it inherits from NSView and uses the QCCompositionRenderer a protocol… meaning that you use the QCCompositionRenderer interface (methods). The is normally one is redirected to QCComposition or QCRenderer… so no idea how to get to the values… at least it was like that for me. I know it’s not a big deal, and a lot of people would have found this in seconds (if not just easy trying set… and autocompletation) but anyway… this may help some beginners and spare them some time looking for useful methods.
  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

October 16th, 2009 at 12:27 pm

Tricky Random Numbers in a Range

without comments

I’m working on a learn project to know more about Objective C, the Cocoa Framework and just for fun. I think only from the praxis I’ll be able to solve little problems that one does not have in the Theory.

Yesterday was the problem: how can I generate random numbers? and this within a range? well for the C/C++ people this wouldn’t be a problem. In fact one can use the same  functions as in C/C++ but I thought there would be a more ‘cocoay’ version for that, like:

[NSNumber randomIntFrom:(int)a to:(int)b ];

Well, there is not such a thing. However, I knew I was able with a tutorial I made a couple of months ago, that random numbers was possible and with a very easy way, rather than calling random() or rand() an dividing and scaling, etc… I looked at an old ScreenSaver Tutorial and I found the answer there. I still was a little bit ‘disappointed’ there wasn’t like an NSValue or NSNumber that does this job, but well, the ScreenSaver framework has a fix for that…


#import <ScreenSaver/ScreenSaver.h>

SSRandomIntBetween(0, 100);

SSRandomFloatBetween(0.0, 1.0);


Well that was the kind of easy function I was looking for, but I couldn’t expect it to be in the ScreenSaver Framework!

Anyway it’s just a C function call that looks like this:


static __inline__ int SSRandomIntBetween(int a, int b)

{

int range = b – a < 0 ? b – a – 1 : b – a + 1;

int value = (int)(range * ((float) random() / (float) RAND_MAX));

return value == range ? a : a + value;

}


I think I’ll stay with the ScreenSaver solution, even if it isn’t beautiful to call a ScreenSaver function in your app, but well… it’s a lot more understandable and they made a much better and elegant solution than my first try. I guess one could copy also the code in that function and make it your own… but the ScreenSaver Framework has everybody so… why not use it? At least for little projects should do the job.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

October 12th, 2009 at 11:02 am

Posted in programming

Tagged with , , , ,

Live Coding practice and testing

with 3 comments

Trying to improve my live coding skills. I still code too slow, but I’m quite happy with the results.  Specially this one, I thought it was kind of nice to use audio in for faster changing sounds without having to rewrite the whole function. Here the History log. If interested you can look at the date and search for the other two or three tests I was doing. I was mostly trying to understand the UGenPatterns and other stuff. Sadly my NPdef and NPxdef still won’t work and nobody in the list actually has time to resolve the problem. I tried already myself but I donÄt get a result changing methods and so on. I hope it’ll work again soon, because I loved that not having to “.asSynthDef(name:\bla).store” the Node function every time I changed the source to control this from a lang-sided Pattern. For the moment to remake this behavior I relay on Tdef’s and Demand UGens, but the last ones won’t synchronize as easy and comfortable as the Patterns and Tasks.

Anyway, History & Git are showing to be are really easy way to publish the code to the repository and from there to my site. Audio examples are going to be more selective due to the space and uploading times.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

September 27th, 2009 at 3:07 am

Live Coding History Uploads

without comments

Hi, I wrote a couple of action into menu items for my SuperCollider and now I can publish my exercises with 2-3 clicks! I’m pushing all this logged session into the live code folder in my SC code GitHub repository. So if you are interested… I’m not yet publishing the music, maybe I’ll modify all the process so I can start History and the recording and so on, but there’s still the disk space problem. The audio files are too big and my server is not that big to support daily 20-40 MB… so… I was thinking about the possibility of using one of those music hosting sites like SoundCloud or something like that, but that would be for the future. For the moment I’ll be happy to be able to record the history and publish it from SuperCollider and that easy. If you are interested in the menu items, you can see the code here but probably you’ll have to modify it, and don’t forget, this should be in the startup file so you have these items in your menu every time you start SuperCollider.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

September 26th, 2009 at 1:58 pm

Projection-mapped mansion

without comments

I found this on the Make: Online feed and the YouTube video Thumbnail was interesting enough. I’ve seen this kind of public art spectacles. I mean, on a minor scale (fireworks) but also other videos and installation using the façade of a building as a projection plain. This works greatly when the artist really uses the potential of the window shadows and the embedded texture of the building. I was quite ‘flashed’ by this video because it used all the thing’s I’ve seen (from Tetris projection to building destruction). It’s quite well done and the people seemed to liked it. I don’t know if the sound is live and what is between the cuts, but anyway I found this really interesting.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

September 16th, 2009 at 5:44 pm

Posted in video

Tagged with , ,

Music is the time of numbers [nx001_LiveCode]

without comments

I mentioned already in the last post the work nx001_LiveCode by Miquel Parera. I couldn’t resist and write about this work a little bit longer because every time I hear this I can’t believe it’s just improvised code. Besides the music, the openness of this project is also amazing. The code is readable, created with the History class in SuperCollider and the samples also downloadable. There is nothing left one can wish for, except maybe more artwork or videos ;-)

I also think using FreeSound.org as an open platform for these free samples and Google documents for the code is a great idea to use this open services to share all this with the word. I started a few days ago also a kind of tool to facilitate the recording and publishing of live coding sessions. When I try to practice at home, sometimes one is too lazy or one can forget to turn on the History or the Server was turned on for recording but maybe one forget to click again to start the recording…. Also the recordings managing is tedious, and linking it with the History document is not a big deal, but hey, if one is going to be doing this more often, why not automate this? I think that won’t be the biggest problem. I could maybe rely on the engine of a friends tool to manage recordings (basic editing, compressing and mailing) and just add the history linking and instead of mailing, publishing to an FTP address in a directory with the current date. I mean, one can do all this manually, but I thought computer were also for facilitating and speeding up this kind of repetitive tasks.

So as I said it’s just an idea. I haven’t started it already, because maybe I’ll wait for the “RecordingManager” (don’t worry π I’m not trying to stress you) and take it as a model. It’s a very nice job, even if it’s still unpublished.

Anyway, I can just recommend this work and see and hear what live coding is and take advantage of this ‘openness’ and see and try to understand how it was done.

  • Twitter
  • Facebook
  • Google Reader
  • Share/Bookmark

Written by rukano

September 13th, 2009 at 12:09 pm