move to sourceforge

Many of the fucking sound projects have been integrated with institute of algorhythmics and are now available through a sourceforge svn repository. This is great as users can now download current source and play with the apps.

I’m aware that some users don’t know how to use svn.  So here’s a tutorial on how to download and compile our browser for mac.

How to get, build and run our source:

  1. Install XCode from apple. The version you need depends on which OS you are running (3.2 for 10.6, 3.1 for 10.5, or 2.5 for 10.4.) It’s a free download, but its huge and can take an hour to get, but if you are interested in programming there’s no reason you shouldn’t.  Go to this page and click on the “Mac Dev Center” button.  You’ll need to register a free account with apple to download it.
  2. If you don’t have fink, install it.  fink is a command-line tool that lets you download programs from source and magically builds them.  It also provides the option to download binaries via apt-get.  Installation should take about 10 minutes.  Yes, I know 10 minutes today is like three hours in late 20th century time, but it will really help you get some awesome tools including dict.
  3. Install svn using fink.  svn is a source control tool that lets many users work on the same code
    files at once, while keeping track of changes and progress.  There are GUI versions of it (rapidsvn or versions,) but I prefer to use it via terminal.  Here’s how to get it:Open the terminal (in /Applications/Utilities folder) and type:

    sudo apt-get install svn

    You can also type “sudo fink install svn” to build it from source, which you may have to do if a binary is not available.

  4. Download the repository source. If you want to you can make and cd to a new directory. Then download the source (creates a new folder in the current directory which you can see by typing pwd)
     svn co https://algorhythmics.svn.sourceforge.net/svnroot/algorhythmics algorhythmics
  5. Now you can go back to the finder. Probably a new folder called algorhythmics exists in your home directory. Open it and open FuckingWebBrowser/FuckingWebBrowser.xcodeproj.
  6. Hit the build and go button or press command-R. The source then builds and then finally the program runs. If you want to tinker in the code you might be interested in a few files: FuckingAudioIO.cpp and FuckingSynth.h/cpp and its subclasses, which generate sound. If you are uneasy in c++ I recommend changing single number/parameter values and recompiling. If the program breaks after your change, simply revert back and try again.

Next, if you still want more fun, install dict using sudo fink install dict from the terminal. Now typing “dict artful” looks up through the net a bunch of meanings of the word and possibly save you from a silly word misuse that I sometimes still make. I like the tool because it’s really fast and light and I always have the terminal open.

Dict singing four versions of a popular sentence

Now you can open the project file NSSpeechSynthesizer.xcodeproj and build and run a singing recursive dictionary that uses dict to obliterate meaning and makes me wonder where it was in the first place.  It was hacked together from an apple speech example and is pretty crude. But one day I’ll get back to it and clean it up for a release.

There are likely to be problems for some people in this process. I will try to update troubleshooting as people post their issues. Until then happy hacking.

FuckingWebBrowser

FuckingWebBrowser sonification demo from Michael Takezo Chinen on Vimeo.

FuckingWebBrowser is a simple open-source WebKit based browser (for which there are hundereds of tutorials including many of annoying ones on youtube how to make in less than 2 minutes on a mac.) I added sonification, which converts the memory state into audio. The quality of sound is noise, but an overall structure is recognizable due to changes in the user interface (while the images load, while I mouse over/scroll, etc), which directly affect computer memory. From 5’30” on there is a special sneak preview of a tool codenamed FuckingFucker, which can attach to any process using its PID or BSD name and sonify a dissasembly of the process’s instructions at runtime (eg. and read the registers on the cpu). In this video FuckingFucker is attached to FuckingWebBrowser providing a double sonification.
FuckingFucker is still in development, and is a work in collaboration with Institute of Algorhythmics.

One can download the mac OS app or get the source of FuckingWebBrowser here. Of note, the related project, FuckingAudacity, is also up here. FuckingWebBrowser uses a simple portaudio callback to make sound. It has very little source code and can serve as a good example of how to recompile an open-source app into one that sonifies memory state. I intend to post a tutorial on exactly how to do this soon. A future release will also concern FuckingFucker, which provides the ability to sonify the runtime process of even closed-source apps.

FuckingAudacity video up

Audacity GUI performance from Michael Takezo Chinen on Vimeo.

Audacity is an open source sound editor. I modified the code so that the sound playback depends upon the physical memory state of the program. Because the memory is dependent upon the user interaction, the user interface (buttons, menus, etc) as well as the structure of user-driven processes (effects, importing files, etc) become a part of the sonification process. The noisy quality of the sound is due to the fact that chunks of uninitialized memory are continuously sent to the audio output.

This recording was done with a point and shoot camera, so the audio quality is not so good, but it gives you an idea of what I’m trying to do.

The program is called FuckingAudacity. How to go about building it and programs like this will be up shortly.  This basics of this process are quite simple and can be attached to other open source programs as well.  I will try to document this along with how to attach portaudio to a program if it doesn’t have sound i/o, allowing pretty much any c/c++ open source program to having fucking versions.

This process has actually been quite helpful for finding bugs (and fixing them,) because the performance aspect makes for more extreme use cases.  For example, I fixed a bug that existed in 1.3.10 where pressing play in a second project while another was already playing would cause the audio glitch and stop.  This process also has a healthy result  It is introducing me to more code, and thus more devel mailing lists/communities.   For example, I’ve also been playing with SuperCollider in a similar fashion.

If you are interested here a some related projects that I know of:

Shintaro Miyazaki’s work sonifies computer processes externally:

algoRHYTHMS everywhere Version 0.2 from Shintaro Miyazaki on Vimeo.

These two other projects were on slashdot:
http://www.codesounding.org/indexeng.html
http://cessu.blogspot.com/2008/09/have-you-listened-to-your-program-today.html

  It’s interesting that they attach sonification data to MIDI and some meter, which is a pretty specific sonification scheme.  One of them uses valgrind, which I am interested.  Unfortunately it doesn’t seem to work so well on my 5 year old computer for GUIs.  But I want to find a way to work with a debugger that allows hotfixing/live program analysis (e.g. the call stack) as an extra layer of performance.

Square Wave: busting your mind, not your speakers

I’ve before puzzled over what it would take to create an extended wave that looks like DC offset or low frequency square wave (not an actual impossible square wave with infinite harmonics, but just one that mostly looks squarish.)  This is a case where the input signal and the speaker cone(s) movement and the resulting air pressure wave can look quite different from each other.

Another common time that square waves comes up is when clipping happens in the amp/interface.  This is a known speaker killer, but maybe not in all cases as I originally thought.

Today I actually googled the topics and found the following decent discussions of them.
http://www.diyaudio.com/forums/multi-way/5699-cant-reproduce-square-wave.html

http://www.bcae1.com/2ltlpwr.htm

http://www.rocketroberts.com/techart/spkr.htm

The diyaudio thread is huge, with some interesting parts.  Here are the main points I liked:

  • If a speaker receives a DC, it will begin to move at a more or less constant speed proportional to the amount of voltage.  It will take a certain amount of time for the speaker cone to reach the maximum point it was designed for – which suggests that there are many square waves that will not result in blowing up your speakers.  These friendly square waves would then appear to be of relatively lower amplitude and/or higher frequency.  This is probably not so surprising, but now at least you might feel a little better about playing pan sonic at reasonable volumes.
  • There is a derivative (as in calculus) effect between the input signal to the speaker, the speaker cone, and the waveform produced in the air.   You put a square wave into s speaker.  The cone moves in a triangular fashion.  This creates a square wave in the air.  Of course it doesn’t really matter so much except for phase when dealing with sinusoids with their uncreative deriviation and integration laws.

Of course, there are many square waves that will blow your speakers up.

Next, I want to find out what the hell wind is.

Open Source Mac Screen Recorder

I’ve been doing more GUI based music stuff.  This is partially a response to the fact that I usually don’t enjoy performing tape music live.  Don’t get me wrong, I can enjoy a concert of tape music.  Most of my music is fixed media.  I’m not talking about seeing virtuosity or even expressing emotion.  But I really enjoy when I  see the person who made the music communicate that he actually believes in it during performance.  Some people can do this amazingly well with just a trackpad.  I’ve decided to work more with hacked GUIs because they are tied to the software processand also its like my way of getting back at them for driving me fucking crazy most of the time.

I’ve been working on the website, and I see that I have little of my GUI based music online.  But when it comes down to documenting these things on a mac, I couldn’t find a good free tool that does this.  I am amazed that this doesn’t exist, given the number of media/video/live-coding artists that work on mac.  I looked for this in the past, but just assumed that I wasn’t trying hard enough or I wasn’t using the right search terms (is it a screen recorder or an av capture tool?)  There are shareware programs and such that have crippled versions of their software for free.  But there are some options:

I’ve looked quite a bit by the way.  There is one freeware tool called “Capture Me” which does low frame-rate video capture, but only for a few seconds.  It is meant for single frame capture and actuallyl looks like a good starting point.  Also, it is labeled ‘open source’, but I can’t find the source code anywhere on the developer’s website, sourceforge, or google.  I’ve contacted the developer and will follow up if I get a reply, but he says due to a job change, he probably won’t get back to emails.

There is a tool for recording without audio on mac.  It’s called krut, and its in java.  It’s actually open source.  I’ll post some results on my g4 once I get to try it out.

I’m still thinking about putting together a really shitty, really free, really open source fast-capture audio video screen capture tool, because I need it and I’ve seen the demand.  If anyone is working on this, please get in contact with me.  I’ll help.  Otherwise I’m going to do it very quick and it’ll have bugs, but it’ll get the job done for now.   Fast-food software, if you will.  Maybe it’s a really hard problem that can’t be tackled.