Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Processing 2 Creative Coding Hotshot.pdf
Скачиваний:
10
Добавлен:
17.03.2016
Размер:
5.28 Mб
Скачать

The Disco Dance Floor

Mission Accomplished

In this project, we learned how to use the Minim framework to play MP3 files and how to access the sample data. We used the samples to generate a visualizer for the currently played sound. We used thefft class of the Minim framework to generate an equalizer visualizer.

In our second task, we wrote five classes that change a pattern consisting of an 8 x 8 grid of tiles. We used a timer thread that triggers the changes in three of the classes. We also added a visualizer that uses the sample data and the fft class to generate the pattern.

In the third task, we changed the draw() method and used the visuals we generated in the second task as a texture. We also added a playlist functionality. The playlist controls the sequence of played songs and also the sequence of our visualizers and how long they are shown.

In the final task of our mission, we merged our visualizer texture and the playlist classes to the stick figure dance company from Project 2, The Stick Figure Dance Company. We also added a new function to our draw() method to display the song title and the artist that we retrieved from the MP3 metadata.

82

Project 3

You Ready to go Gung HO? A Hotshot

Challenge

In this mission, we created some very cool sound visualizations and we replaced the boring gray dance floor from the last mission with an awesome blinking disco dance floor. But even a very awesome disco dance floor can be made better! Why don't you try to take it to the next level by implementing one of the following ideas:

ff ff ff ff

ff

Add some light-effects, a disco ball, or a stroboscope Add some firework effects using particles

Change the red tiles to color-changing ones

Connect some DMX-controlled lights and make the virtual dance floor control your real one too

Add cross-fading to the playlist

83

Project 4

Smilie-O-Mat

When we communicate over a text-based medium like SMS, Twitter, or chat, it's somewhat hard to convey how we are currently feeling. It would be much easier and accurate to use pictures instead of a 140-character description. Humans have a lifelong training in reading emotions on faces, so our next mission is to create a Smilie-O-Mat. This little program allows us to adjust certain facial parameters of a smiley and then post the image on Twitter.

Mission Briefing

Our mission is to create the Smilie-O-Mat; a program that allows the user to create a smiley face that reflects his or her emotional state and posts it on Twitter. We will make three parameters adjustable: the angle of the eyebrows, the color of the face, and the position of the mouth (which is changeable, from frowning to smiling and vice-versa).

To post the image on Twitter, we are going to use a Java library named Twitter4J; we will also learn how to authorize a Processing sketch to change the status of a Twitter user using the OAuth authentication framework.

Why Is It Awesome?

You're feeling greenish-yellow today, with a little smile and neutral eyebrows. Don't know how to express that in 140 characters? No problem; adjust the face of the Smilie-O-Mat and tweet it. Life can be so easy when you have the right tools.

Besides that, accessing the Twitter data stream and then posting to it is a very rich data source for visualization projects or interactive Processing sketches.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]