SOUND ILLUSTRATION of the different motives of five engines driven with Arduino

I try to illustrate with sounds the general movement of my artistic installation. Maybe there is easier way to do it with Max/msp but if someone can help with Processing, let’s try!

For the moment, I can just play one synthesized sound or just one sample. Not to at the same time.

Here the link.

Briefly, I run five motors "at the same speed » and they are out of phase in different ways. Here is one:

At first they all turn in phase at 50 rpm. After a certain number of turns, all the motors are out of phase with each other with a gap that increases with time. When the gap exceeds 90 °, 1/4 turn, the speed of each motor increases while keeping the gap between the motors constant. Then when the gap between each motor is 180 °, a 1/2 turn, all engines seem synchronized in phase and speed.

Then we come back to the beginning, the speed is decelerating and the gap is equal to zero and starts to increase again.

To succeed in shifting the motors, there are permanent adjustments of the speed of each motor so that their relative position (the phase difference) is equidistant.

My program in Arduino allows me to have several informations in real time:

The position of each motor: from 0 to 359 °.

So with a subtraction in Processing, I could have the gap between each engine.

The speed of each motor: between 45 and 55 rpm

My first idea to illustrate this movement is to do some kind of serial music

Trigger a sound at 440hz, or a sample, with a pitch of 440hz, for example, every time each motor does exactly one trick. Processing receives the info 0 as soon as the Arduino program sends the information 0.

We would have at the beginning five times the same note or sound that would be triggered exactly at the same time.

Then as the gap between the motors gets bigger, the sounds of each motor and therefore of each track, are triggered with always a little more time shift (since they arrive at position 0 with a phase difference which increases )

Then to vary the pleasures, it would be necessary that as soon as the difference between the motors exceeds a threshold of 15 °, it would be necessary that the frequency ratio between each track is equivalent to an interval of one semitone.

To calculate, the frequency Fi of each track where n is the interval in semitone since a frequency of origin F0=440hZ, the A3, it is necessary to apply this formula:

Fi = F0 * 2 ^ n / 12

So in Processing, as soon as it receives the info> 15, which means that the program knows that the difference between the motors is 15 ° then, we replace the n of this formula by 0, 1, 2, 3, 4.

F0 = 440 * 2 ^ 0/12; F1 = 440 * 2 ^ 1/12; F2 = 440 * 2 ^ 2/12; F3 = 440 * 2 ^ 3/12; F4 = 440 * 2 ^ 4/12;

Now the notes, in addition to triggering with time shift, are different in pitch.

The notes played should be the A, A #, B, B#,C in the third octave.

Then when the gap between the motors is 30 °, the interval between two sounds should be two-half tone or one tone. So, we would have to replace n with 0,2,4,6,8. So for the 5 tracks we have:

F0 = 440 * 2 ^ 0/12; F1 = 440 * 2 ^ 2/12; F2 = 440 * 2 ^ 4/12; F3 = 440 * 2 ^ 6/12; F4 = 440 * 2 ^ 8/12

Then when the gap between the motors is 45 °, it would take a tone and a half, so we replace n by 0, 3, 6, 9, 10.

And so on for the gap between each motor of 60, 75. That is to say for 60 replace n by 0, 4, 8, 12, 16 and for 75 by 0, 5, 10, 15, 20.

For 75 ° of difference between each engine, the fifth track F4 plays an F5

Then at 90 °, it is decided to transpose all the notes in F5. That is, the value of n for the five tracks F0, F1, F2, F3, F4 is equal to 20.

And as soon as the gap goes to 15 °, when it reaches 105 °, there is a semitone between each track.

For 105 ° -> F0: n = 20, F1: n = 19, F2: n = 18, F3: n = 16, F4: n = 16

At 120 °, the interval between each track is two half ton, so

F0: n = 20, F1: n = 18, F2: n = 16, F3: n = 14, F4: n = 12

At 135 °, the interval between each track is three half ton, so

F0: n = 20, F1: n = 17, F2: n = 15, F3: n = 12, F4: n = 9

At 150 °, the interval between each track is four half ton, so

F0: n = 20, F1: n = 16, F2: n = 12, F3: n = 8, F4: n = 4

At 175 °, the interval between each track is four half ton, so

F0: n = 20, F1: n = 15, F2: n = 10, F3: n = 5, F4: n = 0

And when the gap reach at 180°, we have come back to the set of the begin, as is the gap should be at 0°.

Later, I think I will have to play with filter the parameters of position and speed of each motor.

Thanks for your attention for your help.

Did you have a question? I saw a very long project description, but not a problem or question. Are you stuck on something specific? Or are you just sharing this concept?

It’s a project guidance that’s I’m looking for to find the best way to trigger synthetic sound or sample on 5 tracks and changing their pitch with datas from an Arduino.
I would like to know if it exists a program, or a soft made with Processing as SpectralHarp that I could change to appropriate for my installation.
Thanks Jeremy

I’d recommend trying the minim library.

You can feed your Arduino data straight into the pitch of multiple generators, or perhaps if you have a clip that plays a note you could play it with a Sampler and shape it with pitch shifting.

You could also drive things with OSC rather than serial if you want to swith from Arduino to pi based sensing. Lots of options.

Yes to begin my project, I would like to manage to set the pitch of multiple generators of sound. And later what do you think about Max/msp? Would it be easier to select, change, filter sound in real time while datas come from from Arduino or /and Processing? Because there are lot of patch existing in Max/msp, and I don’t know if in Processing there is a lot of soft all ready done to that kind of stuff…

Well, both are possible. Minim has generators (“gens”) for this, and you can make five. Max/MSP is also designed for this at its core–if you are already familiar with it, you could use it. Many use OSCP5 to send messages from Processing to Max.

1 Like