Final project

I am satisfied with how my sound sequencer turned out. I set upon creating something that the user would like to play around with and get a little lost doing for a little while and I wanted it to make it easy for anyone to spend a little time doing something small and ending up with something that sounds very pleasant. I was inspired by the google audio code project, and the appeal of audio visualizations.  However, it is not perfect, and I don’t think I achieved that goal of having it feel completely seamless.

There are quite a few problems with the way it works right now. One, the code is set up so that the program loops through all the circles many times in the draw loop, and there are many circles to generate in the visualizations, and because of all these for loops, the sketch lags when there are too many notes. This is problematic because the user is restricted on how many notes he should be playing at a given time. However, I personally like to think of it as a good thing in the sense that if the user is restricted to using few notes, it might inspire a little more creativity. Despite that, it doesn’t aid in a seamless experience for the user to do whatever he or she wants.

Another problem of the sketch is due to the way Processing handles time. Because the draw has a framerate, the milliseconds function only refreshes every frame. This causes the program to be inaccurate and create an inconsistency in the spacing between notes that the user can easily notice it. Although the inconsistency is up to low amount of milliseconds, the ear is very sensitive, and it can pick up on these things and take the user out of the experience. This is something I struggled with dealing with in my program, because time management is so integral to my project. I had to learn how to be clever with handling the coloumns of the notes and use a variable capturing the last millisecond measurement and find the difference.

However, what I do have now are circles falling down from the top of the program, and their position representing their relative frequency. I chose the color pallete to turn it more pastel and playful, and due to the way I ordered the FFT bands, it looks like a nice ice cream cone falling. The visualizations are something I definitely improved upon from my presentations on Friday. I gave the visualizations more meaning for the user. I also added a tempo setting, which the user can have a lot of fun and creativity with.

Documentation

https://github.com/ra2353/Creative-Coding-S18/tree/master/Soundcircles

Final project part 1

For my final project I want to work with sound. I want to create a room that sets up the perfect ambiance for the user to make music. There would be a picture of a room, and on the back wall, there would consist of multiple panels. Each panel will be a grid of squares, and the squares will represent the pitch of a note, the higher squares representing the higher pitches and lower squares representing lower pitches. There wpils be multiple customizable panels, each representing a particular instrument. As time progresses, the squares will appear highlighted or emphasized in a pleasing way. I really want to make this room very customizable and comfortable so the general user can get lost in this place creating music. The user would be able to add or remove panels, change their sizes, and change the tempo. The images lighting will also change depending on the characteristics of the music. For this project, I will use the minim library for audio manipulation and analysis. I will rely on classes for the panels and Dom elements to control other various things about what’s on screen and how it’s displayed. I wanted to use box2d to see how physics would work with music, but I didn’t think I would be able to do particularly well using either , so I decided I wanted to put all my efforts into one single library that fits more with what appeals to me. One interesting thing I want to do to increase immersion is to alter panning based on where the user has placed the panel. This can be done by the pan methods in minim.

Final Inspiration

For my final, I definitely want to do something related to sound and music. A little more specifically, I want to make a sketch where the user can draw shapes which will produce sounds depending on various aspects of the shape.  The shapes might be able to interact with each other, and that will create sound as well. I love the idea of combining drawing and music, and I definitely want to explore this further in my project. The website I took inspiration from affords the user the ability to create patterns which repeat, and can combine to make something musical. The user can choose notes and type of notes, but I am not sure I want to include this in my project due to complexity, but ideally I will. I really want to make something that anyone can get lost in and maybe even make something that sounds like a fully-fleshed out song. For this I might have to use sound libraries and libraries for drawing elements, perhaps mapping characteristics to particular frequencies and timbres.

 

http://scribble.audio/

Processing Library

I would love to work on Loom. Loom is patterns linked to audiovisuals in some sort of way. As a kid, I’ve always been interested in websites that link patterns to sound. There was a website I visited that turned squares that you make white on a canvas, and each square would produce a sound and it would play sequentially as the canvas progresses towards the right. It was so simple, but It was very easy to get lost in. I want people to associate music with geometry. Music is very mathematical, but we enjoy the math subconsciously. Our brain makes sense of these patterns and systems into effortless flows and rhythms that sound pleasing to us. It would be amazing If I could visualize sound in an interesting and time-grabbing way.

Chapters 10 and 11

These chapters have really made me reconsider how I approach coding in Processing. If I had first approached what I wanted to do step-by-step and simplifying it, I would have an easier time laying out my code. The way I went along my midterm is simply work with conceptions floating around my head and trying to code off of that. However, upon reflection, there were many times that I was stuck because I did not know how to approach a problem. Other times, I would have progress accomplishing a certain task until I realize that the way I was going about doing it would not work out later on, then I have to scrap the work and try the other method. If I had laid out my idea, wrote pseudo-code, I would have a much clearer understanding of what code would work. I would have saved a lot of time. This goes for the debugging section too. I rarely used println, and I realize I could’ve to really see what was going wrong. I wholly agree with getting someone else involved. When I went to a tutor to look at my code when it wasn’t working, simply the process of me explaining it to him made me realize where I could be going wrong.

Midterm part 2

I initially set out to do a fully dynamic aquarium where the sharks would interact with the fishes. I wanted the sharks to be able to rotate around the fish as it tries to capture it, and when it does, it’ll get bigger, as if it had actually eaten it. This is something I was struggling with.  So I had the shark simply swim by the fish. However, I did achieve a fully dynamic system regarding the fish themselves. Before it would simply move in a constant linear fashion, but now it looks much more natural.

The fish are nicely coloured and they bounce back naturally. What I was struggling with for a long time is having the shark class and the fish class separate, which wouldn’t work because I wanted to local variables in each with each other. What I didn’t understand was why sometimes the program would work and sometimes it wouldn’t. I couldn’t for the life of me figure out what was wrong with the code.

Since I gained a deeper understanding of how classes work from this, I would have made an interaction between the fish and the shark. What I was trying to do was have the shark move freely while the fish try to move away in a random speed. This function is in my code, but I couldn’t figure out how to make it work.

Otherwise, it is a pleasing generative  visual of fishes in an aquarium setting.

Midterm 1

For my midterm, I want to create a mini ecosystem relating to sharks and fishes. The sharks would be able to eat the fishes, and its body parts would be affected by multiple things such as the amount of fishes it ate and the various kinds of fish it ate. If the shark eats harmful fish accidentally, it would get sick and die. I want the overall piece to act like a game but also as an art piece demonstrating relationships between animals. The final piece would have graphic effects such as blood stains, and the fish would move in a cyclical pattern flowing through the water, while the shark would move randomly trying to eat its prey. People would first generate how many fish they would want there to be on the screen, and then when they’re done, they can wreak havoc by creating a shark with a keypress.  I want to use the colors of underwater, make fishes relatively colorful, and the shark grey.  The composition would look like an aquarium turned into a war zone.

I will rely heavily on classes. The sharks would definitely need their own class so the body parts can be properties in processing and altered when fish are “eaten”.  I will also rely on my skills on animating to make a dynamic aquarium, so the fish can look and feel alive. I need to learn about optimal mathematical relationships and more knowledge about how to use classes properly.

I drew some inspiration from a relatively recent viewing of blue planet, so I am now more fascinated by the ocean life. It might be seen as ironic that I would want to create a scenario where death of fishes is optimal after watching this documentary, but it’s more about showing how fishes can evolve to protect themselves in nature. Hopefully, I can implement more species into this aquarium sketch.

 

Research Project – The Library of Babel

Imagine a library. A pretty big library. An infinite library. A library containing all books ever created, will be created, is being created, the works of Shakespeare, the perfect biography of your life,  the same biography but all instances of your name have a single letter off. Each book consists of a random collection of 25 characters, (22 letters, ) as such, most books are completely gibberish. However, it also contains every relevant, enlightening book that can ever exist, such as the book detailing the meaning of the universe and the answers to questions you’ve been searching for your whole life. This is the foundation of the Library of Babel. The library of Babel is a concept created in a short story by Jorge Luis Borges, an Argentinian author.  The library is the universe, and it consists of hexagonal rooms, twenty bookshelves, five to each.   In just a few pages, Borges manages to paint a vivid concept with vast philosophical and scientific implications. Somewhere in the library there exists the cure for cancer, and the book right beside it would have absolutely nothing in value. The librarians in this library, as you might imagine, are generally depressed, knowing they have pretty much no chance of finding something so beautiful and useful for their lives. Want to throw out the book consisting of complete gibberish? You would be a Purifier according to Borges, a sect of people in this library destroying any book not of value. Your goal is to find the Crimson hexagon, the all-powerful magical collection of books. You would also want to find the man who read these books, the “Man of the book”, and absorb his wisdom and knowledge.

In the website https://libraryofbabel.info/, a Brooklyn author self-learned programming to create a virtual library of babel. In it, you can peruse through the library yourself or search for any combination of 3200 characters, the size of each page.  I can find what I had just wrote here verbatim, as shown below.

 

 

The search functionality adds a new dimension to the frustration the people living in the library of Babel go through. The allure of the library is the chance of finding relevant, enlightening, important information by chance, not knowing what exactly you are looking for but finding it after the fact. Searching particular texts in the library ingrains it in your mind that what you are looking for is somewhere in there, you just don’t know what it is.

The website does not create text on the fly, for that would be pointless to the concept behind the library. It also does not store every possible combination of text(29^3200) somewhere on a disk. (Note: Although that number is not literally infinite, it is so large that it might as well be infinite according to human perception) According to the author of the website, it uses a pseudo-random number generating algorithm to produce the books in a seemingly random distribution. That is, the algorithm makes it so every page is in a specific, particular spot in the library and it will always be there, but there won’t be any observable pattern browsing through them. The typical RNG of our programming languages uses the computer system time as an input as a “seed”. So in theory, the random number would have no relationship to one another because the generator would consistently take in new inputs. This website uses the location of the book, the hexagon, wall, shelf, volume, the coordinates of the book as the input to this generator. The search function is the inverse of this algorithm, where the user would enter in the “output” and be given the seed of the text.  The exact location of the text is shown below, and you can find the page yourself if you searched for the seed.

The library can certainly serve as a metaphor for life. It is a representation of the nature of information as assortments of letters to communicate meaning to ourselves and others, how we make sense of the universe and our existence.  In the Library, all the rooms are the same structure, and no one page is intrinsically more significant than the next. Who separates an English word from utter nonsense? Us! We prescribe meaning to one and not the other. If the universe is conceptualized as infinite as the library, we live in the crimson hexagon that we call Earth. This seemingly perfect arrangement of elements constituting everything we know about life, must then surely exist somewhere in the universe, amidst all the gibberish of planets with formulas that don’t support life. From a biological perspective, the library can contain the human genome, but usually nucleotide sequences for nothing. There are many more ways for something to not exist than exist. It is also comparable to our search for meaning within the vast randomness of the universe. In the library, just like life, we can never practically learn all there is to know about everything, at best we can hope for partial slices of knowledge.

Animation assignment

For my animation, I wanted to use realistic physics based on knowledge I learned taking my physics class, so I created an arc.  At first, I used frameCount and frameRate to incorporate them into the equations, but it wasn’t working right. The ball’s movement was highly irregular and bounced back and forth quickly, and I learned that that was because the frameRate is not constant. I then realized I could simply create a new variable called time and change the “Time” manually by using increments.  It was definitely confusing visualizing these equations this way, but It was fine after some time experimenting. One thing I had trouble with was having the “cannon” look more like a cannon by using a rotated rectangle jutting out of the sphere. For the life of me I could not understand why the rotate was not working the way I wanted to. So I simply left it as a circle.

Week 2 Interaction (Ahmed & Allen)

The square was relatively the easiest part of this assignment. We were successfully able to implement it rotating according to the x and y coordinates of the mouse and speed it up accordingly. We were also successful in changing the colors every time the mouse is pressed. The ellipse brought the most issues. The difference between what was going on in processing and what was going on in open processing was confusing, but the open processing did what I originally wanted to do anyways. It was hard for me to wrap my head around how draw and mouse pressed worked at first, but I soon realized mouse pressed is an event and draw is a continuous function.  The translate function was hard to figure out at first, partly due to how weird the location of the (0,0) coordinate is to us. Since it was in the draw, it continuously translated whatever was on the screen, and we wanted to figure out how it can be used for only a particular element. Overall though, we were successful in using the material taught in class and implementing two different types of interactions.