Logo

ZLB



Blog


svn heaven

Thursday, November 19th, 2009

Hi

I just discovered this week that it takes about 4 commands to set up an svn repository on my mac. Now I wonder how I ever survived without it. No more zips with different versions of the code, all changes are logged with comments, I can go back to older versions of the code easilly and compare changes between any two revisions.

A guide to setting up a local svn here.

Xperimental Events Netherlands

Monday, November 16th, 2009

A google calendar with nice events going on in the netherlands is up in the web:

If you want to add events, drop me a mail and I’ll add you to the list.

hypocrisy

Thursday, November 12th, 2009

In what concerns the music distribution, we are living in an age of hypocrisy: people only take seriously labels that release albums in cd format, yet a large amount of people only want to listen to such cds in their computer, and buys the cds of their favorite artists only to arrive home and rip them to iTunes.
Releasing in cd format brings respectability, because, specially for the indies, it means effort, commitment and seriousness. Any loser in the net can upload some mp3 to some stupid web 2.0 website, but shelling out a couple of hundred euros to make a pressing, that’s a different business altogether. There is risk involved. Well, I don’t disagree with this, but wether people like it or not, we are moving to the web, and cds will be something of the past, so online-only labels need to start finding ways to increase confidence in the consumer, namely by taking it as seriously to release something online has they did to release something physically. Each single release has to have quality.
And the current indie labels that release only cds, they should start releasing in lossless with high quality pdfs of the artwork, that would go a long way to making people spend money online.

[edit]

Apparently it’s not only me that’s saying it, MC Hammer agrees:

”The CD is now the wax album and so it is a collector’s item for people who collect music and love to look at the liner notes and feel paper. I don’t know what would turn them on about having to go through that terrible exercise of trying to open the packaging - it’s unbelievable when you’re trying to open a CD, right? You need a box cutter … it’s a tough deal to get it open. And once you get it open … you go and upload it to your computer,” he says with a hearty laugh.

[/edit]

Apple Vs Stalin

Wednesday, November 11th, 2009

from tuaw:

The C64 emulator that was pulled from the App Store by Apple for leaving a BASIC interpreter intact has now returned, though we presume it’s minus the Apple-offending code.

In fact, the only thing it doesn’t have is an interpreter, but of course you know why that is by now: Apple doesn’t want anyone running code on their devices that they haven’t approved through the App Store.

Hum, no code but apple approved code, what does that remind me of ?… Ah, yes, it’s called censorship.  Why think too much about it, let’s just go along like happy lemmings into the brave new world of  touch enabled, good looking, well designed, proprietary, closed, totalitarian mobile platforms.

I mean there’s the debate between open-source (Linux) and closed source (OSX and Windows), but any of these, independently of the licensing gives you the freedom to develop and run whatever you want in your device without having to ask permission to anyone (except in the case of DRM).  Even the children eating Microsoft allows you to do this. But now, Apple seems to think THAT is too much freedom, and like the good old bolsheviks they want some “democratic centralism” . I really don’t like where this is going.

Perl poetry

Wednesday, November 11th, 2009
#!/usr/bin/perl
 
APPEAL:
 
listen (please, please);
 
open yourself, wide;
    join (you, me),
connect (us,together),
 
tell me.
 
do something if distressed;
 
    @dawn, dance;
    @evening, sing;
    read (books,$poems,stories) until peaceful;
    study if able;
 
    write me if-you-please;
 
sort your feelings, reset goals, seek (friends, family, anyone);
 
        do*not*die (like this)
        if sin abounds;
 
keys (hidden), open (locks, doors), tell secrets;
do not, I-beg-you, close them, yet.
 
                            accept (yourself, changes),
                            bind (grief, despair);
 
require truth, goodness if-you-will, each moment;
 
select (always), length(of-days)
 
# listen (a perl poem)
# Sharon Hopkins
# rev. June 19, 1995

Guide to making Audio only DVDs with open-source tools in GNU/Linux

Wednesday, November 11th, 2009

Due to an upcoming release involving a DVD I’ve had to figure out how to make a dvd from a couple of multichannel tracks. I’m using a mac and I wanted to use open-source tools. The road wasn’t that easy to travel, so I’m posting my findings for other travelers in the brave new world of Linux.

1 - You will need to use dvd-author and some other tools. I tried to install them in osx, but it was just to difficult, in the end I decided to just make a virtual machine in parallels and install ubuntu 9.10.

2 - After installing ubuntu, install dvd-author (from ubuntu software center) and aften (from synaptic).

3 - The files should be multi-channel interleaved wavs. If you have them as mono files, interleave them on osx with de-interleave or use sox.

4 - In dvds the files always need audio and video, so you need to have a background image. For pal these can ben 720×576 png files.

5 - Put the png files and the wav files in a folder in ubuntu. They should be named dvd1.png, dvd2.png and dvd1.wav, dvd2.wav, etc.

6 - Depending on how many tracks you have to make a dvd.xml file for dvdauthor like this:

?Download dvd.xml
<dvdauthor>
    <vmgm />
    <titleset>
        <titles>
            <pgc>
                <vob file="dvd1.mpg" />
                <vob file="dvd2.mpg" />
                <!- etc -->
            </pgc>
        </titles>
    </titleset>
</dvdauthor>

7 - Then run this script on that folder and wait (one hour or so in my machine)

?Download builddvd.sh
#!/bin/bash
# Miguel Negrão 2009
 
for file in `ls *.png` ; do
 
echo "File is $file"
# name without extension
name=${file%\.*}
# number of samples in audio file
SAMPLES=`sox --info -s "$name".wav`
echo "Number of samples is $SAMPLES"
# number of corresponding pal frames
PALFRAMES=`expr $SAMPLES '/' 1920`
echo "Number of pal frames is $PALFRAMES"
 
echo "converting to ac3"
aften -b 448 -smix 2 -dsur 1 -acmod 6 -lfe 0 -xbsi1 1 -dmixmod 2 -lorosmix 2 "$name".wav "$name".ac3
 
echo "making m2v from png"
pngtopnm "$file" | ppmtoy4m -F 25:1 -A 59:54 -I p -n "$PALFRAMES" -S 420mpeg2 -r  | mpeg2enc -a 2 -n p -f 8 -v 2 -o "$name".m2v
 
echo "muxing m2v and ac3"
mplex -f 8 -o "$name".mpg "$name".m2v "$name".ac3
 
done
 
echo "Creating DVD structure"
dvdauthor -o DVDFOLDER -x dvd.xml

8 - to make a dvd image in osx that is compatible with dvd players type in the terminal:

 
hdiutil makehybrid -udf -udf-volume-name MYDVD 
-o MY_DVD.iso DVDFOLDER

The piratebay is dead…

Tuesday, June 30th, 2009

It’s a sad day… the piratebay has sold out. What is difficult to understand is why they would try to present this as something positive when the new owner already said it will turn it into a “legal” filesharing site. It’s just sad…

What’s your stance on free will ?

Tuesday, June 2nd, 2009
  1. We have souls, but they’re a bunch of robots (strong AI).
  2. We have souls, but they’re a bunch of quantum robots.
  3. We don’t have souls, all is illusion.
  4. We have souls, but they do not respect the laws physics.

I’m currently divided between 1 and 2, but leaning towards nº1.

  To the question “How can something with free will (us) be made out of lots of things without free will (atoms, cells) ?” one can retort with “How can something alive (a cell) be made of lots of things which are not alive (atoms) ?”. Well the answer to the second case will hardly cause much problems for most people. Atoms through a process of evolution have entered into complex structures, the organization of which is what we call life. Well, Daniel Dennett argues that the same is true of free will: cells have entered into very complex structures the net result of which is the emergence of consciousness and free will. 

 The main question of determinism vs free will is: If the the future is totally determined by the past (determinism), then how can we decide to do anything, how can we be moral agents ?

   Now, the exact meaning of the future being determined by the past is a tricky concept. What it actually means is that should we think of time like the timeline of Cubase, if we bring the cursor to a previous point and press play the same events would happen again. In that sense our actions are determined, that is, if I would bring the cursor of time one year back in time I would do the exact same things I did. Since I accept determinism, I believe this conclusion is correct. But the point is that we can never bring the cursor back, and “conditions can never be the same”, therefore it is for all practical purposes irrelevant the fact that if the cursor went back we would do the same, because those decisions we’re in fact our decisions, and what we are is caused by millions of causes such as the physics that governs the universe, the evolution on our planet, the social and cultural place we we’re born, our particular experiences. So it’s true that we are the net result of those causes, but one of the net results of those causes is the fact that we have consciousness, and in the parlance of Dennett, the ability to avoid things. Therefore things are not inevitable, since we can avoid them, although they are determined nonetheless. This argument is somewhat mind boggling, and I’m still trying to grasp it entirely.

Emma Goldman on patriotism

Tuesday, June 2nd, 2009

Patriotism assumes that our globe is divided into little spots, each one surrounded by an iron gate. Those who have had the fortune of being born on some particular spot consider themselves nobler, better, grander, more intelligent than those living beings inhabiting any other spot. It is, therefore, the duty of everyone living on that chosen spot to fight, kill and die in the attempt to impose his superiority upon all the others. The inhabitants of the other spots reason in like manner, of course, with the result that from early infancy the mind of the child is provided with blood-curdling stories about the Germans, the French, the Italians, Russians, etc. When the child has reached manhood he is thoroughly saturated with the belief that he is chosen by the Lord himself to defend his country against the attack or invasion of any foreigner. It is for that purpose that we are clamoring for a greater army and navy, more battleships and ammunition…

An army and navy represent the people’s toys. To make them more attractive and acceptable, hundreds and thousands of dollars are being spent for the display of toys. That was the purpose of the American government in equipping a fleet and sending it along the Pacific coast, that every American citizen should be made to feel the pride and glory of the United States.

source

Dealing with multiple gui windows in supercollider

Friday, May 29th, 2009

Let’s say one has a data class MyCircle and a gui Class MyCircleGui which displays controls for this class.  The gui is constructed by calling aMyCircle.edit; 

MyCircle {

edit { ^MyCircleGui(this) }

}

Now, if I call  .edit again on a MyCircle I don’t want it to construct a new gui window if there is one already open: one must keep track of which windows are open. My solution to this problem was to have an IdentityDictionary as a class variable where I add the window of a MyCircleGui when the class is created and delete it when the window is closed.

MyCircle {

classvar <>instances;

*new{ |aMyCircle|

instances = instances ?? {IdentityDictionary.new};

if(instances.keys.includes(aMyCircle).not){

var view,window,flow;

window = Window(…)

// add guis to window here.

window.front;

window.onClose_{instances.removeAt(aMyCircle)}; instances.put(aMyCircle,window);

}

{ instances[aMyCircle].front }

}

*closeAll{

       instances.do{ |window| if(window.isClosed.not){window.close} }

}

edit { ^MyCircleGui(this) }

}

This takes care of the open windows, and if I want to close all the current open windows I just call MyCircleGui.closeAll.


info_at_friendlyvirus.org
sales_at_friendlyvirus.org
www.myspace.com/friendlyvirus/