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 =>;

// 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 =>;

// 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


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...

Wednesday, April 15, 2009

How to win a war

Look which side the Hungarians are on, and stand on the other side.

Saturday, April 11, 2009

ReverbNation song statistics revealed

OK, I have some songs at ReverbNation. You might as well listen to them using the player on the left. ReverbNation offers me the possibility to see how many people listened to my songs and what percent of each song they heard. Knowing this and the length of my songs, I can provide a "hall of fame" of Hillaby's songs:
  1. Let Me Live - 8,63 points
  2. Dubbancha - 8,43
  3. Seven Lives - 7,16
  4. Aka Cat - 6,85
  5. Moonshine Reggae - 6,81
  6. Xmas Dux Ska - 6,55
  7. At The Edge Of Hope - 5,52
  8. Skwabisk - 5,5
It's quite interesting that the most popular song title is 'Skwabisk', which means that's the title which attracted the most people, however, it couldn't grab people's attention: they switched away quite early.

The list above shows that my guitar solos were quite attractive: the first three have solos in them, while the other five haven't. I should practice more...

On programming languages

I read some articles about the dangers that C++ can have for an average programmer, and that we'd better go on and get Java or C# for our projects. Well, I can only agree that it's easier to write code in Java than in C++. But the quality of the product we have to release does not always depend on how easy it was to produce it.

I am the maintainer and team leader for a 300k+ loc. C++ project. If it works it's not because of the language, it's because of the tests we run. If it fails, it's not because of the language either, it's because of the tests we haven't run.

I don't believe that a software product will be more reliable just because it's written in a "higher-level" language. It's reliable and stable because almost all of its functionality has been tried or even stress-tested.

Sunday, April 5, 2009

tic tac toe

Menthol-flavoured foot finger.


An illness that goes away when you drink alcohol.


"How do you know that Punks Not Dead?"
"Because Dead Can Dance."