Cellular Automidi – Audio App

Presenting my latest Flash Music Toy App Thing –

Cellular AutoMidi!

Cellular AutoMidi is a generative music app, making “music” based on a modified Cellular Automata algorithm.

It’s an AIR app –

YOU CAN DOWNLOAD IT HERE FOR FREE!


Check it out in action in the video below, first using Flash dynamic sounds, then using Flash Midi Server to control a synth –

Cellular AutoMidi – Generative Audio Flash AIR App from Lawrie Cape on Vimeo.

According to Wikipedia –

A cellular automaton is a discrete model studied in computability theory, mathematics, physics, complexity science, theoretical biology and microstructure modeling. It consists of a regular grid of cells, each in one of a finite number of states, such as “On” and “Off” . For each cell, a set of cells called its neighborhood is defined relative to the specified cell. An initial state (time t=0) is selected by assigning a state for each cell. A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood. For example, the rule might be that the cell is “On” in the next generation if exactly two of the cells in the neighborhood are “On” in the current generation, otherwise the cell is “Off” in the next generation. Typically, the rule for updating the state of cells is the same for each cell and does not change over time, and is applied to the whole grid simultaneously, though exceptions are known.

…..yep! Basically – each cell can be alive or dead. Once in a generation, each cell looks at it’s surrounding cells, and dies if it is lonely or overcrowded. If a dead cell has an optimum amount of neighbors, it will come to life! Each generation, all the cells which have come to life will sound a note. The notes are assigned based on the cell’s y position, and are all in the pentatonic scale.

There’s a few controls at the bottom which change how things work too.

  • Start/Stop – Starts/Stops the automation.
  • Load – Loads a pattern from the text box.
  • Export – Exports the current pattern to the clipboard. You can send it to friends, or save it for later, then load in with the load button.
  • Clear down – Stop and clear the current pattern.
  • Law Mode – An error when coding the cell rules gave this other odd mode.
  • Skip Audio – Just show the cell animations.
  • Sing Dead – Instead of singing the recently revived notes, sing for the recently deceased.
  • Note duration – Alter the system speed.

Also, along the top there are banks of preset systems. Click play to start a saved pattern, and click assign to assign the pattern currently displayed to that button. You can also trigger each pattern with the keyboard keys 1-8.

When you press Export, your pattern is automatically copied to the clipboard, so you can save it, or share it with people. Here’s a pattern I made – you can load it by pasting it into the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 ,1 ,1

HINT - When drawing patterns, symmetrical patterns seem to evolve nicely.

The app is fully compatible with Flash Midi Server (my Flash to MIDI audio interface app) – it checks to see if it is running when the app is launched. If it’s not, then it uses fancy Flash Player 10 dynamic audio! I’m hoping to roll this out to the Flash Midi Server class soon – so any app which tried to access the midi server and fails, will use the dynamic audio as a backup. I’ll keep you posted!

In case you missed it, you can download the app here – it weighs in at just 79kb including icons! The screenshot images above are 79k! If you don’t have Adobe Air installed, the link will prompt you to download that too.

DOWNLOAD IT HERE!

I’d love to hear what you think of it – and see any patterns you come up with, so please post them in the comments.
Have fun!
Law.

–By downloading the app, you are agreeing to the licence below —

Copyright (c) 2010, Lawrie Cape

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

35 thoughts on “Cellular Automidi – Audio App”

  1. Thanks Jeremy!
    Wow, I’ve not seen MORT before – really impressive. Is all the audio dynamically generated? I’ll have to have a proper play when I get some free time. Very cool.

  2. Thanks Lawrie!

    Yep, all the audio is code generated. I haven’t made the source available yet. I am working on an AS3 sound library. Once it gets to a good point, I’ll re-build the MORT using it and open it up.

  3. Awesome – I can’t wait to see how it develops.
    Currently this App and Flash Midi Server aren’t open source, but mainly just due to the lack of time to clean up and comment the source. Hopefully I’ll get round to it one day.
    Have you seen the siON sound library? I don’t know much about it, but this demo is pretty impressive – http://wonderfl.net/c/9Xx7

  4. Very, very cool. I was trying to make something like this work back in the late 80s with a Mac+ running LiSP.

  5. Really like the program. Very clever.

    I have a question regarding getting Automidi to trigger synths in Ableton.
    Basically …how can I do this?? …I had both programs open and was tryingto route the midi into Ableton but wasnt very successful.

    Its sounding by itself just a simple sine wave, which is nice for a while but can you point me in the right direction via getting it to trigger another device or DAW.

    Thanks again.

  6. Thanks Paul, glad you like it.
    To make sure the Midi Out is working, there’s a few things to check.
    First, the Midi Server App should be open before the Air app – and the Air app should say “Flash Midi Server connected” at the bottom, as in the screenshots above.

    Now the air app should be sending the midi data to the midi server. If it’s all working correctly, the white square in the top left of the midi server should flash orange whenever a note is recieved.

    You can then choose which midi device to send the notes out on, from the drop down menu in the server app. The default on Windows is “Microsoft Midi Mapper” – which will use the standard Windows keyboard midi device. There’s a similar default keyboard midi device on OSX too.

    To control a physical device – your USB Midi interface should show up in the server drop down, and if you select it, the signal will be sent through that device.

    To control a DAW – you need a virtual midi channel to send the signal over. There’s free software to do this – for example –
    MidiYoke for Win XP, LoopBe for Win 7, or you can set IAC settings on Mac – http://forum.ableton.com/viewtopic.php?f=1&t=88514&start=0

    Whichever option you choose, it should appear in the server app dropdown, which will send the signals through it when selected.

    The last thing to check is that in your DAW midi settings, you’ve allowed midi input on the selected channel.

    Hope that helps Paul.
    Cheers.
    Lawrie.

  7. Thanks Lawrie, both this and ‘Sonar’ app’s are fun and cool BUT having some compatibility issues? I initially tried both on my PPC laptop under OSX 10.4 and the MIDI server worked as expected and I set it to my IAC bus fine. So now I wanted to break out the big guns synth-wise so I tried running both on my Nehalem (Intel) 8 Core under OSX 10.5.8 and the Midi server’s routing window never appears so I can chose and MIDI out (IAC in this case) there…all other aspects of your AIR app’s seem correct (internal sounds work, server shows connected, etc) I just have no way to get MIDI out to any usable bus without that routing window?

  8. Thanks for letting me know Loopy. I had a few simlar sounding issues when I was packaging the server app, but I thought I’d fixed them. If you’re familiar with Processing, I can send you the source code, which should be able to run without any problems.
    I’ll have a look to see what else it could be causing it too.

  9. Cool Lawrie, thanks for reply ;-) I have Processing but sadly am not in any way ‘familiar’ with it. Is it just a matter of pasting the code into a Processing document or more involved?

    Other wise, I am bouncing the MIDI-only to Logic on my laptop and THEN exporting/importing that to other computer (into newer Logic) to play…not realtime but still get to check out some of the groovy possibilities with beasts like ‘Omnisphere’ :D

    I will check back in case you come up with anything…oh and I wanted to mention just in case…the Nehalem is a dual display system (two 24″ LED), sometimes app’s act funny but very few at this point, but thought I should mention it just in case ;-)

  10. Hi again Loopy. To get the Processing code to compile, you’ll need to download two extra libraries –

    ControlP5 –
    http://www.sojamo.de/libraries/controlP5/

    RWMidi –
    http://ruinwesen.com/support-files/rwmidi/documentation/RWMidi.html

    This post should explain where to put them on your system if you’re unsure –

    http://processing.org/discourse/yabb2/YaBB.pl?num=1269728211/9#9

    Then it should just be a case of opening and running the Processing file. I’ve uploaded it to Google Code here – http://code.google.com/p/flash-midi-server/downloads/list

    Hope that works for you.

  11. Hi,
    Nice app. Thanks for sharing. I played with it and with the flash server I was also able to use it together with Logic. Record as instrument or audio and give it an specific instrument or sample. You used a pentatonic scale. Is there a way to use another modality?

  12. Hi Karin.
    Glad to hear you liked the app – and got it all set up with Logic.
    At the minute, the pentatonic scale is hard coded into the app. What I’d want ideally, is a drop down, where you could select from a selection of different scales. My problem is that I can’t find a list of scales online, converted to Midi Number values. My music theory isn’t too great.

    If there’s a specific modality you’re hoping to use, let me know and I can publish you a version which uses that.

    And if anyone can help me find a set of scales formatted as Midi values, that would be awesome.

  13. I do not know anything about MIDi numbers, but I know about music theory. So a diatonic scale would be C-D-E-F-G-A-B. What I found online are the midi numbers that correspond with this scale: You hear C4 or ‘Middle C’ and the numbering starts with 60. So with the scale C major it would be: C (60) D(62) E(64) F(65) G(67) A(69) B(71) where you can see that between the E and F there is a half tone and the MIDI numbers follow in line. Where there is a whole tone between the C-D-E + F-G-A-B the number skips one Subsequently the distance between B and C at the end of the scale is a halve tone again and will become C(72).

    For the Note designation in accordance with octave name see this:
    http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name

    Maybe it is possible to ask Amit Pitaru, who is musician and created Sonic Wire Sculptor where he also gives the opportunity to select different modes.
    Hope this gives a bit of an insight.

  14. Here scales in Major:
    It depends on which octave you start for the midi numbers but C subcontrabass starts with 0
    I just gave an sample, but do not know if this are the numbers you need.

    Diatonic scales
    Major scales:
    C major
    G major
    D major
    A major
    E major
    B major
    Cis major

    Midi numbers starting with small= c-b

    C(48) D(50) E(52) F(53) G(55) A(57) B(59) C(60)

    G A B C D E Fis G

    D E Fis G A B Cis G

    A B Cis D E Fis Gis A

    E Fis Gis A B Cis Dis E

    B Cis Dis E Fis Gis Ais B

    Fis Gis Ais B Cis Dis Eis Fis

    Cis Dis Eis Fis Gis Ais Bis Cis

  15. Hi, I am having trouble with the Flash Midi Server. I downloaded it and it says it is connected, but I only hear piano notes, and it doesn’t have the nifty control panel as shown in the video. Is any other software used in the video? If so, where can I download it and how can I hook it up to the Cellular Automidi? In addition, I am not able to export anything. I am not sure where the clipboard is. What if there is a sequence I would like to send to someone to use in a track? Can any1 please help? Please bear with me; I am not tech savvy…. :((((

  16. Hi Dinaz,
    I’m not sure what’s happening on your system I’m afraid. When you run the FlashMidiServer app, that panel should pop up, letting you control the various options. It’s written in Processing, which i based on Java, so you could see if your Java is up to date at this link –
    http://java.com/en/download/installed.jsp

    When you click export, the app copies the current pattern to your system clipboard, so you should be able to paste it into an email or whatever you want just by pressing Control+V / edit + paste.

    Hope you get it working.

  17. Hi Lawrie,

    I installed the server and application but I’m having difficulties connecting it to FL Studio. Can you give me some guidelines on how to do this? Great app!

  18. Hi,
    I really like your project.
    i was really exited to try it out, then i saw you using it with fl studios to change the sounds (cause it simply sends midi signals, right?).
    Well, i was wondering how i could plug it in, into ableton live.
    Can u lend me a hand with that?

    keep up the good work!

  19. thanks allot, i will give it a shot!
    (i’ll let you know if it worked out for me)

  20. Hi Lawrie,
    well i tried to figure it out, but my knowledge about these things is really small. i downloaded those midi ports but nothing seems to communicate with ableton live. i’m trying this on a mac btw. any tips perhaps?

  21. when i try to select the port in the flashfile, i can’t really select it, or maybe it’s just how it works? you can’t really see, through which port u are sending the signals. thanks for the help anyway, very nice tool you made there btw and sorry for spamming your blog xD.

  22. Hi Sergej. Thanks for letting me know. I’ve recently moved to a new host and it hadn’t copied across properly. The links should work now. Cheers.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>