How do you feel about this article? Help us to provide better content for you.
Thank you! Your feedback has been received.
There was a problem submitting your feedback, please try again later.
What do you think of this article?
In the previous part, we looked at both transporting the data stream into PURE DATA and also to trigger sounds based on the input, now we dive deeper into the world of PURE DATA.
Numbers and sounds
Numbers are a representation of conditions, in this case of air quality. At the same time they're difficult to understand - when is air quality good and when is it bad? Using sound properties allows us to understand air quality without explanations - what sounds pleasant to our ears represents good air quality and what's unpleasant - you guess it.
But what makes audio sound pleasant and unpleasant - there are different properties which we're going to use: signal-to-noise ratio, the relationship between frequencies, and harshness of sounds.
With the help of PURE DATA, it is easy to create generative music based on simple functions, such as sine. The generated soundtrack should be an ambient style music since this is easy to listen to in the background - soothing sounds in case the air quality is good. When it starts to get annoying, you know that it's time to open the windows and let some fresh air in.
Chords are the basis, they are changing when the air quality is getting worse and a certain threshold is reached. On top of this, a random melody with notes which fit the currently played chord. In addition, there is noise which gives an idea of how many particles are in the air. More particles, more noise. The size of the particles defines the frequency range of the noise - filtered by a band pass filter.
Heart Beat
The heart of the PURE DATA patch is responsible for providing the heart beat (speed that is) of the generative music.
From there, a bed of chords is generated. In the first iteration of this patch, two chords are being used. The sliders on top allow to change the overall speed, smooth chord transition time, chord duration and note duration.
Make some noise
On top of the chords, depending on the number of particles in the air, noise is added.
In addition to the sound bed, random notes are being played which accompany the chords. To ensure that they match the chords, a list of appropriate notes can be entered.
On the right side of the patch, there is a node which sends data via tcp. This will later on be picked up by the PYTHON program to synchronize the lights perfectly to the music - it needs to be in sync and represent what is being played. This also allows both an immersive experience but also gives accessibility for those with any degree of hearing loss.
In the next iteration, a special technique will be used in order to calculate the harmonic/disharmonic relationship between the notes based on incoming air quality data.