For this project, I wanted to make a chord harmonizer that would compliment the input singers frequency to be able to create music live with only one person. This was inspired by my obsession with singing in harmony with other people, as well as the fascination with how different frequencies interact to make music.
Simple Arduino hardware setup, consisting of a button and a joystick with x and y locations and a click. The x and y positions are what determines the chord type, the joystick button holds the note that is input, and the button is the on/off switch.
The Arduino sketch takes each input value and sends it to PlugData. All data processing is done in the PlugData patch.
First, the [adc~] signal from the input is converted into a frequency using the [sigmund~] object. The abstraction [chord_dac] takes an input frequency and adds the chord notes on top.
Chord changes are determined by the x and y positions of the joystick. Values are input from the Arduino, and a 3x3 grid using logic greather than and less than ([>], [>=], [<], [<=]) and logic ands ([&& ]) objects is created to choose a chord type. The chord grid can be seen in the final product.
Additional frequencies are calculated using just intonation ratios, determined by the chord selected, as seen below.
Output signals are created using [cycle~], and summed to create the chord. Chords with 3 notes output 3 of the frequencies as seen above, and the same pattern follows for chords with 4 and 5 (allow4, allow5).
The displayed menu is shown on the left. It has the ability to control the parameters without the need for an Arduino connection. As well as chord types and joystick grid, it shows the on and off button (hardware button) and the hold chord button (joystick button) as toggles. The note name that is taken from the input signal and the held note name is displayed as well.
Originally working with MIDI (control rate), output sound had a major delay. Switched to working with frequencies and audio rate (~), the final product still produces a slight delay noticable when using.
Working with this new object had its challenges, including the sensitivity of the input signal and the rapid changing output frequency. Using various parameters, the final output utilizes this object well.
Since the patch plays a chord when it hears a sound, every sound louder than a certain threshold will produce an output sound. This is still a prevalent issue in the final product, though minimized when the singer is in a quiet room.
Equal Temperament frequencies (fundamental frequency x 2^(n/12)) causing beating in chords
Solution: switched to Just Intonation, calculating output frequencies using chord ratios
Plugdata sensitivities and what it could handle, program crashed when there was too many signals
Solution: limited the excess features (higher harmonics of input noise)
Improve:
Detection of singing vs. extra noise
Sensitivity of the single frequency
Hardware setup, new joystick that works in all cases
Implement:
Output sound with harmonics based on input sound
Match timbre of output sound to input
Ability or random factor to change the number of voices played
A melodic line function, outputting a counter melody based on the input signal and chord choice