Logo

ZLB



Perl poetry

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

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…

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 ?

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

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

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.

fooling heaven

May 27th, 2009

The Yanomamö are a tribal people that live in the rain forest of the Amazon. They have a complicated mythology, with concepts of heaven and hell somewhat similar to christians. When a yonomamo dies he goes to  a place similar to purgatory  where he is asked if he was a good yanomamo, if he answer yes then he goes to heaven which consists of vilage similar to the one they leave in in this world, otherwise he goes to hell which consists of fire and the usual grim stuff. 

  An anthropologist once asked a yonomamo if he wasn’t worried of going to hell. He answered that it didn’t worry him the least, because when the moment came after dying he would simply lie and say he was a good yanomamo, thus entering heaven. If only christians would learn from the yanomamo…

“Those who are not afraid to die go to the front!”

May 27th, 2009

Quote of anonymous protester in Burma in 2007, as seen in BurmaVJ.

ambisonics in reaper

May 27th, 2009

A nice guide on how to setup an ambisonics based project in reaper. Btw, reaper 3, which supports multichannel is just out.

Juǀʼhoansi - an affluent and egalitarian society ?

May 27th, 2009

   The Juǀʼhoansi are a nomadic people living in the kalahari desert. Their society model is a band, with no permanent authority figures and without role specialization. The only divide is terms of taks is between women and man, women gatherers (which amount to 70% of the calorie intake of the group) and men hunt. In the Juǀʼhoansi there is no hunger, it takes about 2 hours to collect enough food to last for one week. Another interesting fact is that when hunters return with the meat, and since the meat is a valuable item for the band, people don’t show any gratitude towards the hunters and instead claim that the meat is not good enough or not in sufficient quantity. This is to put the hunters in their place, and avoid that they gain a higher role in society.

   Marshal Sahlins, author of the “original affluent society” theory argues that hunter-gatherers societies were affluent, and the switch to agriculture did not bring more affluence, it actually brought less affluence. So why would humans change to a new type of society which brings less resources to the people ? It is argued that it was because in order to have leadership it was needed to have sedentary people, and that therefore this change was because of political motives. It wasn’t more advanced societies that needed political leadership in order to appear, but it was leaders that needed a higher density of static population to be able to ascertain their authority. Archeological evidence demonstrates that early agriculture societies had worse health then hunter-gatherers, thus disproving the long held hypothesis that agriculture was adapted because it provided much more food with less work.


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