Friday, November 20, 2009

A "timbre stretching" example in ChucK

As many of us, professional or hobbyist computer music aficionados, I adore Miller Puckette's freely available book on this science, "The Theory and Technique of Electronic Music". If you are more into the material, you may have noticed that the examples in this book are written (more accurately: "drawn") in Pd, or Pure Data, which is a graphical computer music synthesis environment.

I wanted to try the same concepts in my favourite music language, ChucK, which lead me to the conclusion that it's quite different to create the same concepts in these two environments.

So here's my take on "timbre stretching", which is an interesting approach to radically change a waveform without the use of filters or frequency modulation, whatever.

// "timbre stretching" in a ChucKist way
// by Hillaby

// the sinosc can be replaced by any waveform generator
// in this sample it's only used for one period
SinOsc osc => LiSa lisa => dac;

// modulator will modulate duty cycle
SinOsc modulator => blackhole;

/* in case you want to record it...
lisa => WvOut rec => blackhole;
"lisa.wav" => rec.wavFilename;
*/

// play around with these settings:
100.0 => float fr; // the base frequency
1.3 => modulator.freq; // modulator frequency (keep it low :))
5.0 => float modRate; // modulation rate, the minimum duty cycle will be 1 / (1+2*modRate), maximum: 1

// calculate period and set wave generator frequency
1::second / fr => dur period;
fr => osc.freq;

// record one period and unchuck wave generator
period => lisa.duration;
1 => lisa.record;
lisa.duration() => now;
0 => lisa.record;
osc =< lisa;

// play back recorded period
while (1) {
0::samp => lisa.playPos; // start at 0
1 => lisa.play;

// set rate, 1.0 when duty cycle is maximum
// and 1.0+modrate*2.0 when minimum
1.0 + modRate*(1.0+modulator.last()) => lisa.rate;

// wait until playback terminates (at specified rate)
lisa.duration()/lisa.rate() => now;
0 => lisa.play;

// wait until the "empty part" of the duty cycle passes
period - lisa.duration()/lisa.rate() => now;
}

Sunday, November 15, 2009

La Charanga Habanera in Slovenia!

OK, I have just come back from Vienna from the concert of Pupy y Los Que Son Son, and now I'm planning to travel to Slovenia at the end of this month, because David Calzado y La Charanga Habanera, one of my favourite Cuban bands will perform. The concert dates and places follow:
  • Wednesday, 25. November 2009 - Festivalna dvorana, Ljubljana, Slovenia
  • Thursday, 26. November 2009 - Festivalna dvorana Lent, Maribor, Slovenia
  • Friday, 27. November 2009 - Kresovanje, Sežana, Slovenia
Maribor is only 350 kms from Budapest, that seems to be the closest point of their European tour in autumn '09.

(For my Spanish-speaking friends: las fechas y los lugares de los conciertos en Eslovenia de La Charanga Habanera se pueden encontrar aquí arriba en la lista.)

Wednesday, July 8, 2009

Concerts (tour) - conciertos (gira)

Here's a list of the concerts I may be interested in:
  • 2009-07-29 - Verona, Italy: Orquesta Revé (Elio "Elito" Revé y su Charangón)
  • 2009-08-01 - Bled, Slovenia, Okarina Festival: Orquesta Revé (Elio "Elito" Revé y su Charangón)
  • 2009-08-01 - Milano, Italy, Latinoamericando: David Calzado y La Charanga Habanera
  • 2009-08-02 - Lonato di Garda, Italy: Orquesta Revé (Elio "Elito" Revé y su Charangón)
  • 2009-08-03 - Milano, Italy, Latinoamericando: Orquesta Revé (Elio "Elito" Revé y su Charangón)
  • 2009-08-05 - Milano, Italy, Latinoamericando: Calle 13
  • 2009-08-12 - Roma/Rome, Italy, Fiesta: Carlos Vives
  • 2009-08-14 - Roma/Rome, Italy, Fiesta: Orquesta Revé (Elio "Elito" Revé y su Charangón)
  • 2009-08-16 - Milano, Italy, Latinoamericando: Carlos Vives
(Elito Revé = Elio Revé Jr.)

Monday, June 8, 2009

Saturday, May 16, 2009

So Long, Unclefucker!

Has anybody realized how similar these two songs are?

South Park - Uncle Fucka, from 0:37:



ABBA - So Long, from 0:40:

Saturday, April 25, 2009

Addictophobia

I'm 31 years old, and have been drinking a bottle of wine daily for four years. I have been in constant fear of becoming an alcoholic. Now I realized that what bothered me the most wasn't the need to drink my first glass of wine in the evening, but that I thought I was going to be an alcoholic. I have a strong fear of becoming an addict, which is actually worse than it would be to become an addict. I call that addictophobia.

I like to drink, and if I think about my liver getting damaged through the years it's like thinking about four tyres that get worn while driving. If you want your tyres to stay intact, don't drive. If you like driving, then accept that your tyres get worn.

The only thing is that it's a lot easier to get four new tyres than getting a new liver.

And BTW, don't forget: don't drink and drive!

Friday, April 17, 2009

First steps towards live-coding

As you might know (e. g. hearing the notes the player on the left-hand side plays), I make music. I mainly use ChucK for this purpose, which is a quite simple but functional and well-designed programming language. However, there has been a big limitation in efficiency: I actually had to write down every single note and volume change, filter frequency sweep by my own hands as nasty old numbers in Java-like code. I hope that time has finally ended.

Today I succeeded to connect a very simple Java UI to ChucK via OSC messages (thanks to this post). Now I plan to write my own UI's ("instruments") in Java, generate OSC events with them and record them using the accurate timing built into ChucK. Then I'll use Ruby to generate ChucK code again from the events I recorded. So there goes feedback, too. I'll feel like a real pro... and it all cost nothing, only a little coding experience...