A GUI Front-end for Cellular Automata Generator

Written by on March 4, 2016 in LISP, Music, Programming with 0 Comments

In my last post, I explained how we can use Cellular Automata (CA) in Opusmodus to create music.

For today’s post, I wanted to build a simple UI to control the parameters used in the CA example. This posed a practical difficulty. Opusmodus does not yet provide a GUI library. Even Clozure CL, on which Opusmodus is based, does not seem to have an official and fully supported GUI library. I could, of course, build a separate GUI app in Swift using XCode, or implement one using Allegro CL on Mac and have the app talk to Opusmodus using TCP/IP.

I then remembered my RAD Studio 10 Seattle, and decided to use its multi-platform application capability to build the GUI driver app for OS X. It took me a few hours to build the GUI app in C++ and to refactor the Lisp code to accept parameters from the GUI app and then generate the music score.

Note that both the apps are running on my iMac, talking to each other via TCP/IP.

The following figure shows the GUI app with its various controls.

Opusmodus GUI Driver

Opusmodus GUI Driver

Clicking the Play button after setting the required parameters causes Opusmodus to create and play the score. Clicking Quit terminates the interaction and closes the GUI application.

Here is the screen image of the Opusmodus program.

CA Music Generator

CA Music Generator

You can download the program from here.

Tags: , ,

Subscribe

If you enjoyed this article, subscribe now to receive more just like it.

Subscribe via RSS Feed

Leave a Reply

Your email address will not be published.

Top