Painting Boids Update

Here is a preview of my application GUI!

There are now two modes the user can play in.

Mutation Mode:

  • User can change the mutation constant of the behavior or shape of the boid independently.
  • User can mark favorites (by right clicking). These will be used in canvas mode.
  • Color is also assigned by right clicking. The user can specify to colors, the boid generator will interpolate those two colors so that the resulting boids (within that group) have some variation in color among them.
  • The “No Paint Trail” option will allow the user to see the boids movement without them leaving a trail behind them.

applicationPreview

Canvas Mode:

  • All the boid groups marked as favorites can be seen interacting with each other on one canvas.
  • The colors used are the colors defined by the user in Mutation Mode.
  • Clicking on the canvas generates more boids and redefines the respawn point.

canvasMode

Here is a screenshot of the program with the “No Paint Trail” checked. I would like to change this so it displays a thicker stroke. It is hard to see the brushes on some iterations.

noPaintTrail

Here are a few outputs that I was able to produce with my program. =]

v06_colors1

v06_colors2

Generative Art Biologically-Inspired System

I am quite intrigued by flocking systems, and I thought it would be interesting to combine it with a genetic algorithm.

I was inspired by Casey Raes’ “Processing Compendium.” His final pieces are mesmerizing. I love the organic nature of his work. They feel alive; I can imagine their breath.

I decided to first start off with a flocking system. I used the Flocking example on Processing.org as a starting point.

Here are a few of my initial experiments. I essentially used a “brush” of various sizes and shapes to follow each boid. I also played around with border conditions.

01

02

03

04

05

06

07

Here is a video of the system in action:

Now where to go from here?

I have two main ideas:

(1) Genes would control the following parameters:
Brush appearance (length, angle of triangle, color)
Amplitude of forces applied to boid (collision avoidance, velocity matching, flock centering)

(2) Have the entire gene pool interact with each other in one painting.

I will be working on the first idea… then perhaps work towards allowing the user to pick multiple boid types to interact with each other.

NetLogo Exploration: Sunflower Biomorphs

The Sunflower Biomorphs example remained my favorite sample from the NetLogo library.

I decided I would add in another gene to define the petal’s shape. This did prove to be more difficult than I had anticipated, as I did not fully understand the syntax of the program. Where was the shape defined? After poking through the User Manual. I realized that this was because there is a default shape for each turtle, so it did not need to be explicitly defined within the program.

Here are some screenshots of the program after I added in a shape gene.

sunflowerBiomorphs_adj

sunflowerBiomorphs_adj2

Chance Based System Gallery (plus Video Sample!) and Final Thoughts

My ideal gallery presentation:

Imagine you walk into the first room of the exhibit. There are a few benches (comfortable of course) in front a huge screen. The following videos (along with all the pieces in the exhibit) are playing on loop.

You walk through an open door to the main exhibit. Prints of the final pieces are displayed in a grid pattern (like the previous post). Pieces with the same input artist are placed adjacent to each other in a row. Rows are then stacked up on top of each other to encourage comparison.

I didn’t get to talk about it much during class, but I definitely like thinking of each sound wave as a brush stroke made by the musical artist. If you refer to the previous post, there are some distinct characteristics between the output strokes across each artist. It would be interesting to further investigate more into the properties of sound waves. And what characteristics of the music correlate to the type, color, opacity, frequency of each brush stroke.

Here is some speculation about each artist and their image output (again, you may want to refer to the previous post).

The Avett Brothers: Lots of variation in color and brush stroke throughout duration of the song.
I feel this is very indicative to the progression in the music itself. I feel like The Avett Brothers have many crescendos in their music.

Kishi Bashi: Many white strokes. With highlights of blues, teals, purples, and yellows. Extremely wavy/stringy.
Absolutely makes me think of Kishi Bashi. He plays the violin and utilizes a loop pedal. (Amazing artist if you haven’t listened to him yet).

Nujabes: Boxy strokes. Bold colors. Black accent lines.
The most interesting thing about Nujabes is the boxy strokes. I have not encountered another artist with this pattern yet.

Emiliana Torrini: Mostly vertical strokes. Lots of white, with highlights of pink and yellow.
She probably produced the most consistent outputs. The songs on her album Fisherman’s Woman do mostly consist of soft gentle beats, so I feel like these images are very suiting.

Snoop Dogg: Distinct vertical bands of color (mainly blue, green, red, and yellow). Very jagged strokes.
This is probably due to the rhythmic variation throughout the song. Also, the loops used to make the beats can come from a variety of selections.

ZZ Top: Lots of pink, purple, and red! Strokes/colors are pretty even throughout the song.
These selections of songs have a steady rhythm and tonality, which could probably explain the consistency of strokes.

I had a lot of fun working on this project. I would love to continue further exploration later down the line (potentially for my final project for generative art). =]

Chance Based System Final (as of now)

The following changes were made to my final system:
– Alpha of the stroke is based on the level of the soundwave. The louder the soundwave, the more opaque the stroke.
– Strokes are no longer drawn back and forth from top to bottom. I decided to draw the waves consistently from top to bottom. That way the repetition in sound waves is more noticeable as the line are draw parallel to each other. This increases the chance of bands forming.
– Boundary conditions are now handled as a wrap around. Before, there was an issue of a wave being stuck on the side for some time, before a wave of greater amplitude pushed it out of the corner. Now the waves are able to travel more freely.
– I was also have an issue of a line forming at the top of the image (this was more prominent in some songs more than others). This was an issue due an error in the definition of my starting point.
– The maximum amplitude of the mid and high frequency bands are now influencing the color by adding some variation.

Chance Based System, Iteration X, The Avett Brothers, "Go to Sleep"
The Avett Brothers: “Go to Sleep”
Chance Based System, Iteration X, Kishi Bashi, "Manchester"
Kishi Bashi: “Manchester”
Chance Based System, Iteration X, Nujabes, "Feather"
Nujabes: “Feather”
Chance Based System, Iteration X, Emiliana Torrini, "Heartstopper"
Emiliana Torrini: “Heartstopper”
Snoop Dogg, "Ain't No Fun"
Snoop Dogg: “Ain’t No Fun”
Chance Based System, Iteration X, ZZ Top, "Gimme All Your Lovin'"
ZZ Top: “Gimme All Your Lovin'”
Chance Based System, Iteration X, The Avett Brothers, “Paranoia in B Flat Major”
“Paranoia in B Flat Major”
Chance Based System, Iteration X, Kishi Bashi, "I am the Antichrist to You"
“I am the Antichrist to You”
Chance Based System, Iteration X, Nujabes, "Flowers"
“Flowers”
Chance Based System, Iteration X, Emiliana Torrini, "Nothing Brings Me Down"
“Nothing Brings Me Down”
Chance Based System, Iteration X, Snoop Dogg, "Gin and Juice"
“Gin and Juice”
Chance Based System, Iteration X, ZZ Top, "Legs"
“Legs”
Chance Based System, Iteration X, The Avett Brothers, "Shame"
“Shame”
Chance Based System, Iteration X, Kishi Bashi, "It All Began with a Burst"
“It All Began with a Burst”
Chance Based System, Iteration X, Nujabes, "Luv Part III"
“Luv Part III”
Chance Based System, Iteration X, Emiliana Torrini, "Sunny Road"
“Sunny Road”
Chance Based System, Iteration X, Snoop Dogg, "Who Am I"
“Who Am I”
Chance Based System, Iteration X, ZZ Top, "Shar Dressed Man"
“Sharp Dressed Man”

Struggles with Mid and High Frequency Bands

First attempts with mid and high frequency bands went poorly. I had ran through a selection of songs to gather data on maximum values for the low, mid, and high sections of bands so that I could normalize each band value from 0 to 255. However, I was getting strange results where there was hardly any variance in the stroke’s color.

Chance Based System, Iteration VII, Nujabes, "Feather"
Chance Based System, Iteration VII, Nujabes, “Feather”
Chance Based System, Iteration VII, Hospitality, "Eight Avenue"
Chance Based System, Iteration VII, Hospitality, “Eight Avenue”
Chance Based System, Iteration VII, Ella Fitzgerald, "Lullaby of Birdland"
Chance Based System, Iteration VII, Ella Fitzgerald, “Lullaby of Birdland”

After I stepped away from my program for a while, I came back to realize a simple error. For data collection, I had set to look for the max value of each band (low, mid, and high) for the duration of the entire song. However, I forgot to reset this value for each wave drawn when ready for the actual generative art process. Thus, the color stroke would change only if the current max value exceeded the previous max value. Totally makes sense how towards the end of the song, the image would flatten into one color!

Unfortunately, even after this error was fixed, I was still unhappy with the results across songs.

Chance Based System, Iteration VIII, Hospitality, "Eight Avenue"
Chance Based System, Iteration VIII, Hospitality, “Eight Avenue”
Chance Based System, Iteration VIII, Snoop Dogg, "Gin and Juice"
Chance Based System, Iteration VIII, Snoop Dogg, “Gin and Juice”
Chance Based System, Iteration VIII, Kishi Bashi, "Manchester"
Chance Based System, Iteration VIII, Kishi Bashi, “Manchester”
Chance Based System, Iteration VIII, ZZ Top, "Sharp Dressed Man"
Chance Based System, Iteration VIII, ZZ Top, “Sharp Dressed Man”

I was very unhappy with these results. Colors ended up much too dark. And there wasn’t a whole lot of variation across songs.  At this point I decided to see what kind of results I could get out of the HSV color space.

Chance Based System, Iteration IX, Hospitality, "Eight Avenue"
Chance Based System, Iteration IX, Hospitality, “Eight Avenue”

Although the colors looked very interesting together, I came across the same problem. There was not a whole lot of variation across songs. I accidentally overwrote some images, so Hospitality’s “Eight Avenue” is currently the only image output from this system. I will add another example once I finish with my update.

Ultimately, after fighting my system over a period of a few days, I realized that I was quite happy with my original color algorithm. So I went back to my old system, and decided to fine tune that for my final display.

Chance Based System Post-Critique Thoughts

So, I had my In-Progress Critique in class today for my music input chance based system. I thought I’d organize my thoughts/goals for the upcoming week.

  • Color Algorithm:
    Definitely going through with my plan to normalize the amplitudes of each frequency band, and pull my RBG channel values from the low, mid, and high frequency bands. In order to properly normalize each band, I think I will need to  find the maximum amplitude of each band across all songs I plan to use in my final piece.
  • Opacity Algorithm:
    I had been using the average amplitude of the low frequencies. Instead, I would also like to utilize the normalized bands. Perhaps using the average amplitude across the entire spectrum, or maybe a summation of amplitudes of the low, mid, and high band.
  • Behavior Pattern Investigation:
    Phil pointed out to me that thing he found most interesting about each piece is the vertical bands of color that appear. Although I feel like this is mainly due to serendipity of the pattern of consecutive beats in the song and the wavelengths having a small amplitude (thus less vertical movement), I feel this is worth further investigation. Also, it would be good to be able to reason why certain behavior appears.
  • Final Presentation:
    I really liked the idea of having a bunch of still images, as well as a video demonstrating the program as it draws in real time along to the song.
    As my main goal was to demonstrate a visual difference between different artists, it would be good to select approximately five artists of different genres. And in order to demonstrate consistency, I would use three songs from each artist.
    I’m having some difficulty choosing genres/artists, but right now I’m leaning towards indie (Kishi Bashi), hip-hop/jazz (Nujabes), rap (Snoop Dog), folk (The Avett Brothers), and rock (ZZ Top). That being said, I have a lot of favorite artists and wide taste in music, so don’t be surprised if these change. I definitely want to keep it to three songs per artist though!

All in all! I am really happy with my progress so far, and I am excited to see what comes!

Chance Based System: More Songs!

So for the sake of tomorrow’s critique (and my own curiosity and enthusiasm), I have run a diverse selection of songs through my program! Here are a few of my favorites. I will admit I got a little overzealous. I have also included a link to each image’s input song in the caption if you are unfamiliar with the song.

Chance Based System, Iteration VI, Nujabes, “Feather”

 

Chance Based System, Iteration VI, Pink Martini, "Hey Eugene"
Chance Based System, Iteration VI, Pink Martini, “Hey Eugene”

 

Chance Based System, Iteration VI, The Fugees, "Killing Me Softly"
Chance Based System, Iteration VI, The Fugees, “Killing Me Softly”

 

Chance Based System, Iteration VI, ZZ Top, "Sharp Dressed Man"
Chance Based System, Iteration VI, ZZ Top, “Sharp Dressed Man”

 

Chance Based System, Iteration VI, The Avett Brothers, "Paranoia in B Flat Major"
Chance Based System, Iteration VI, The Avett Brothers, “Paranoia in B Flat Major”

 

Chance Based System, Iteration VI, Hospitality, Eight Avenue
Chance Based System, Iteration VI, Hospitality, Eight Avenue

 

Chance Based System, Iteration VI, Emiliana Torrini
Chance Based System, Iteration VI, Emiliana Torrini, Heartstopper

Chance Based System with Colors!

More progress made today!

So I’ve been playing around with values from a forward FFT of the music data.

Here is my first attempt with calculating the colors from the FFT. Red is dependent on the amplitude of the first frequency band, green on the second, and blue on the third. The first three bands are the lowest frequencies, and thus generally have the greatest amplitudes. Although the colors were nice, everything was leaning heavy on the bluer side.

Chance Based System, Iteration III, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration III, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration III, Kishi Bashi, "Manchester"
Chance Based System, Iteration III, Kishi Bashi, “Manchester”

I realized that this was because the values for the RG channels were completely getting out of bounds. I adjusted the values with a scalar constant. The results were much much too dark and almost eerie:

Chance Based System, Iteration IV, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration IV, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration IV, Kishi Bashi, "Manchester"
Chance Based System, Iteration IV, Kishi Bashi, “Manchester”

I ended up fixing this by inverting the color of the stroke. Much better!

Chance Based System, Iteration V, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration V, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration V, Kishi Bashi, "Manchester"
Chance Based System, Iteration V, Kishi Bashi, “Manchester”

Alright, now at this point, the line opacity was at a constant 0.5. I decided to play with this value as well, making it proportional to the average amplitude of the frequency in the spectrum. I am very pleased with how this is turning out. I feel like the images actually capture their respective song quite well. I included two other output images of Ella Fitzgerald’s “Lullaby of Birdland” and Snoop Dogg’s “Gin and Juice” for additional contrast. I am excited that the differences in the song can also be seen visually through my system.

Chance Based System, Iteration VI, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration VI, Gorillaz, “Feel Good Inc”
Chance Based System, Iteration VI, Kishi Bashi, "Manchester"
Chance Based System, Iteration VI, Kishi Bashi, “Manchester”
Chance Based System, Iteration VI, Snoop Dogg, "Gin and Juice"
Chance Based System, Iteration VI, Snoop Dogg, “Gin and Juice”
Chance Based System, Iteration VI, Ella Fitzgerald, "Lullaby of Birdland"
Chance Based System, Iteration VI, Ella Fitzgerald, “Lullaby of Birdland”

Thinking about differences actually led me to think about similarities. I decided to test this out by pulling two more songs off of Kishi Bashi’s album “151A” to see how they would compare. I have included the “Manchester” image again for reference.

Chance Based System, Iteration VI, Kishi Bashi, "Manchester"
Chance Based System, Iteration VI, Kishi Bashi, “Manchester”
Kishi Bashi, "I am the Antichrist to You"
Chance Based System, Iteration VI, Kishi Bashi, “I am the Antichrist to You”
Kishi Bashi, "It All Began With a Burst"
Chance Based System, Iteration VI, Kishi Bashi, “It All Began With a Burst”