Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, February 16, 2007

Tested and approved: Csound is awesome



Adam Boulanger gave Aurelius Prochazka and I a three hours introductory tutorial on csound.

Csound is a programming language -originally witten in C, ref. its name- by Barry Vercoe at MIT Media Lab. Synthesized sounds that come out of csound are elegant and allow anyone with a computer to freely compose sounds. I prefer it to reason for its infinite personal potentials.

Composer Richard Boulanger edited the famous Csound book. BT on the other end revisited csound taught by Dr Boulanger for his Binary Universe album.

Saying that, all I can say is tested and approved and I can share some of the notes I took, as I think it can help anyone start with the Csound software and compose music.

  • Install the csound environment from sourceforge to install the CsoundLib framework.
  • If you have a mac, install Mac sound -for some reason Csound 5 did not work on my intel mac-
  • Open Mac Csound. Save the file that automatically opened.
  • Any name written in "blue" are called opcode, they are functions and clic " apple + ' " to have the help file of any of these opcode. The help file gives you the usual syntax and examples for each opcode.
  • A specific rate is defined with k, and a. The rest of the label can be anything descriptive, but the letter 'k' and 'a' will be understood by the system as the rate you want.
  • you can test out the following. Add to the orchestra window (orc)
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1
    instr 1
    kamp = 10000
    kcps = 220
    ifn = 1
    a1 oscil kamp, kcps, ifn
    out a1
    endin
  • add to the score window (sco)
    ; Table #1, a sine wave table with a small amount of data.
    f 1 0 4096 10 1

    ; Play Instrument #1, the basic oscillator, for
    ; two seconds. This should sound relatively rough.
    i 1 0 2

    e

  • If you press the icon, your piece will play back.

  • in the score window (sro) you wrote: "f 1 0 4096 10 1 "
    10 is the gene routine number. 4096, a power of two. it drastically changes the sound if 4096 becomes 8!
    In file:///Library/Frameworks/CsoundLib.framework/Versions/5.1/Resources/Manual/ScoreGenRef.html
    the gene routines are explained.

  • In the (sro) window you also wrote: "i 1 0 2"
    i: means instrument
    1: refered to the instrument 1 from the orchestra window
    0: start
    2: duration in seconds
    3: frequency

    (then you can add different instruments, that overlap in time or start at different times etc...)

  • Adam mentioned the indispensable opcodes to try out:
    . foscil (A basic frequency modulated oscillator.)
    . grain (Generates granular synthesis textures)
    . grain2 (Easy-to-use granular synthesis texture generator.)
    . soundin (Reads audio data from an external device or stream)
    . physical modeling instrument: pluck (Produces a naturally decaying plucked string or drum sound.)

  • Finally a good key ressource is the first chapter of the Csound book by Dr. Richard Boulanger, Introduction to Sound Design in Csound. It can be downloaded for free from MIT Press. Also the Csound web site community

    Good luck!

  • Monday, April 10, 2006

    Processing point of view

    I have tried processing by entering a few lines of script into the processing window.




    processing en essais

    For instance I wrote the following script:
    size(600, 600);
    background(50,50,50);
    for(int x=0; x<600; x="x+7){" y="0;" r =" (int)(40*(log(x)));" g =" (int)(30*(log(y)));" b =" (int)(r*g" gr =" (r"> 128){
    stroke(r, g, b);
    rect(r,g, 1, 8);
    }
    else{
    stroke(50,0,0);
    rect(x,y, 10, 91);
    }

    }
    }

    and processing has generated the following graphic:



    Rendez-vous creation
    has selected a few images I made with processing.

    In digital graphics

    Saturday, April 08, 2006

    Dynamic mappping of wireless network in real-time

    At GSD, I attended a talk by Carlo Ratti about research he directs at the SENSEable City lab. He presented iSPOTS, project that analyses how wireless technology is changing life at MIT. This research looks at superposing real time information --with the mapping of laptops or cell phones-- to understand the relation between activity and space . One application Carlo mentionned is to look at how tourists move in the city based on their nationality.

    The iSPOTS project aims at describing changes in living and working at MIT by mapping the dynamics of the wireless network in real-time. Thus, the complex and dispersed individual movement patterns that make up the daily life of the campus can be revealed, helping TO answer many questions: Which physical spaces are preferred for work in the MIT community? How could future physical planning of the campus suit the community's changing needs? Which location-based services would be most helpful for students and academics?



    This map shows how wireless Internet is used on the MIT campus in real-time.

    They have developped a script for people to locate themselves with precision on the campus and decide to share location with who they want. They are also developping the mobile-skype so they can use skype from their mobile phone.

  • research paper on How Wireless Technology is Changing Life on the MIT Campus

  • ispots web site



  • In urban planning