Slashdot Mirror


Live Nightclub Hacking

rjjm writes "Alex Mclean has written a stormin' article at perl.com on Hacking Perl In Nightclubs. Alex programmes live on stage to perform his music."

11 of 236 comments (clear)

  1. Re:white boy by simcop2387 · · Score: 4, Informative

    slashdot mangled this perl script, and the geek that i am, figured i'd make some music and fix it:)

    @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
    @p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q *=2) +=$f=!fork;map{$P=$P[$f^ord
    ($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[ P.]/&&
    close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q]; sleep rand(2)if/\S/;print

  2. There are better languages for this, like ChucK by Trepidity · · Score: 5, Informative

    ChucK is a "concurrent, on-the-fly audio programming language", designed from the ground up precisely for this application: live programming of generative music.

  3. Re:Alex performs live on stage to program his musi by zimpenfish · · Score: 2, Informative

    He writes code, live on stage, within an existing framework which interprets the code as he types it and that makes the music.

    So he performs his music by programming it live on stage. If that helps.

  4. Note... by electric_mind · · Score: 2, Informative

    ...that the article is all about the modules you can use to generate sounds from Perl (which isn't clear if you don't read it - the Nightclub + Perl Programming idea is way overemphazised in the original post...)

  5. Re:Unbelievable by yaxu · · Score: 4, Informative

    If I may comment as the author of the article... It's not that dangerous, to be honest. I make a change, then press ctrl-x, which re-interprets the code into a dummy 'package.' If that doesn't cause compile-time errors, then it interprets the code into the live 'package.' So all I have to worry about is run-time errors, which are pretty rare. As I'm generally running a lot of scripts at the same time, it doesn't matter if one of them drops out or goes mental. In fact, it usually sounds good. I just have to fix it, then break it again, then fix it again to make it sound intentional!

  6. Re:I Do Both, But Not Simultaneously by Greenisus · · Score: 2, Informative

    I occasionally use DJ-1800, which emulates multple CD players (I just got it, still testing the demo version before I buy it. The only extra feature I want is a brake, which MegaSeg has). There's also PCDJ, but I'm a Mac guy, so I don't mess with it much. I've even used iTunes and GarageBand. I also use "real" DJ gear, like turntables and CD players, but I'm an outcast (not to be confused with OutKast) among DJs I know because I actually prefer to use the computer.

  7. Re:Perl by Anonymous Coward · · Score: 5, Informative

    Incorrect.

    cogsci.princeton.edu -
    Program - a sequence of instructions that a computer can interpret and execute;

    The text file itself is only a script. The script + interpreter is a full program (also worth nothing that several people have whipped up programs that allows you to compile Perl scripts in to native binaries)

  8. Re:I like perl by jallen02 · · Score: 2, Informative

    Though, think about the thousands of little Perl scripts that do this and that, each one using some little syntax trick or another. The end result is that to REALLY understand all the scripts out there you have to basically learn all of the dialects of Perl. Its like learning several child languages that are all a part of this twisted parent language. It kills me to have to remember syntax rules like that.

    Compare that to almost any python script out there. The syntax is the same, the program can still "do it more than one way", but it does it with a more clear syntax that is easier to follow. I think the idea that there is more than one way to do it is true for just about any programming language. There are the preferred methods, but nothing is stopping you from coding your own library or method of performing this task or that.

    Its the same reason LISP is a great academic language but not a commercial success, even though it is so very powerful to those that can wield it. You can basically re-define the meaning of everything you see, and often its encouraged as you are basically writing source code that is the parse tree of the program! (I Know this isn't true for Perl, but it feels the same way, the language can be varied so much maintaining disparate and differeing scripts can be difficult). Data, oh thats all a part of the parse-tree/program. XML? Bah, the Lisp guys invented that with the S-Expression etc. ;)

    Now then, you could still use Perl with complete efficiency in a project that standardized on various language constructs, but you WOULD have to standardize or you would be in a maintenance and integration hell :)

    I just think its much better to have a powerful and easy to use language that doesn't introduce artificial hurdles like syntax constructs that can easily be more understandable in any other programming language. Anyway, I will stop prattling. I know that people who like Perl will stay using Perl because they did bother to learn all of the Arcane syntax and now they feel they should inflict their sick and twisted knowledge on the rest of the world ;););) (Just kidding).

    Jeremy

  9. Re:Alex performs live on stage to program his musi by andrew_0812 · · Score: 4, Informative

    No, if you would bother to RTFA, you would see that he is has written a multi-threadded text editor for writing perl. One thread is the editor, the other thread runs the code constantly. He writes perl code to generate musical patters. He has a system set up so that he can have multiple programmers working at the same time and it will all be in sync, you can even change the temp and all programs will sync up.

    I don't know about programming on stage, but the concept of synthesizing music in perl is quite interesting.

  10. Alex has been doing this for years by babbage · · Score: 4, Informative
    Alex McLean and Ade Ward have been performing live Perl music under the name Slub for several years now. Quoting from Alex's website:
    Behind the scenes, slub is a fairly idealistic project. We make music using entirely self-written software. Every aspect of slub composition and synthesis comes from our fingers. Many interoperating pieces of software work together to generate the music live, using a handmade client/server protocol. The software sampler/synth is written in C (by Ade), the server and synch code is in Perl (by me) and a whole slew of composition scripts and apps are written in Perl and RealBasic. The whole system is distributed across Ade's powerbook and my debian Linux laptop (we stopped short of writing our own operating system).

    Poke around and you can probably find MP3s of their music -- it's interesting stuff.

    In addition, the two of them have written some papers & software on the programmatic generation of art, whether that be music, graphic arts, software itself, etc:

    Much more of Ade's software is available from Signwave.co.uk.

  11. Re:Music and programming by vidarh · · Score: 2, Informative
    It is now the result of a script that is the result of a persons creativity. What difference does it make? What matters is the result, and the result will still depend on the composers ability to manipulate the music, whether that is done by playing directly on an instrument or modifying a program to change the way the program plays the instruments.

    Besides composition has always been highly rule based, and even classics like Mozart toyed with generative music. There's a lot of music out there that is clearly composed in ways that closely resemble many of the methods used by generative music systems today. Beethovens "Ecossaisen" for instance closely follow the structure of a Cantor fractal. Composing music IS about combining patterns much more than about combining individual notes.

    This page is a good overview of the fractal nature of composition.

    I'd agree with you that using a computer for generating the music for a live performance would be a cop out if the computer was programmed with the full score from the start, instead of being used as an instrument that allows automation of repetitive elements.

    Personally I see very little value in live performances of the actual music if the music is intended to just follow a score - what makes a live performance interesting to me is what goes into the presentation and/or any improvisation, not that someone demonstrates that they are capable of recreating the same tunes over and over in realtime.