MAX/MSP - GUITAR SETUP
Max/MSP: computer & guitar setup
Materials used:

We divide the setup into two phases: input signal and output signal. The goal will be to monitor the tonal quality, the sound performance ratio (avoiding feedback), and a reasonable latency between input and output.

Input signal

Let’s start by analyzing the frequency range from the open strings: 6th = 82.41, 5th = 110.0, 4th = 146.8, 3rd = 196, 2nd = 246.9, 1st = 329.6. Moving to the instrument’s maximum extension, we reach a maximum frequency of 987.77 (B4). Thus, we can consider a range of 3 octaves plus a fifth, similar to string instruments such as the cello and viola.

Positions and frequency ranges:
1st position: from E 82.41 hz to A 440 hz (interval of 18°)
5th position: from A 110 hz to C 554.36 hz (interval of 18°)
8th position: from D 146.2 hz to G 783.99 hz (interval of 18°)
Then we need to consider the sound amplitude. As we know, we cannot have absolute values like frequencies. The values of sound intensity (dB) must be understood in the context of actual perception. The goal is to achieve an optimal gain for the input signal.

The envelope and attack transients show some characteristics of the guitar’s sound intensity. ADSR are the parameters that best help us understand the differences at various positions/frequencies. The sustain is the critical point of the instrument’s extension in the high frequencies range. While the sound is fairly constant in the 1st and 5th positions, from the 8th position onwards, there is a gradual shortening of the sound after the initial attack: decay, sustain, release.

Before understanding how Max/MSP can analyze the situation, let’s introduce our acoustic transducer. Consider the dpa 4099 microphone, designed to capture the sound of the guitar in a live performance setting. As is known, the higher the quality of the microphone, the greater the feedback between the microphone and speakers. The dpa 4099 has a range of 80 - 15,000 hz, and thus it comes with a specific low-frequency cut. Additionally, the dpa is a supercardioid microphone with a segment capsule, which makes its pickup area quite unique. The control of feedback and sound quality are the primary objectives.

- Feedback: first of all, apply a frequency cut at 75 hz (this is a feature of most mixers, including the Mackie 1642 model). Establish the optimal gain value, visually and acoustically, between the microphone and channel. Some mixers display the level in dB (remember that every 6 dB the level doubles). Position the microphone. While measuring the sound pressure near the bridge can be functional, the tonal response is not always ideal. With the dpa 4099, it is possible to achieve a good pressure-to-tonal quality ratio in the upper part of the soundboard, carefully adjusting the proximity effect.

- EQ: equalization is the fundamental system for interfacing with the instrument. As we have seen, the frequency range of the guitar is quite low. The first thing to do is to listen with headphones. A good rule is not to emphasize the 6th and 5th strings, which are already bright in the Contreras and Wilcox guitars. Our first choice will be to balance the mid-range (ranging from 100 to 8 kHz) and treble (12 kHz). The EQ of the mids is a key parameter for preserving the guitar’s tonal quality, avoiding that annoying metallic sound typical of piezoelectric pickups. Our choice is to emphasize the 300 hz range. Therefore, we focus on the 5th position, especially on the first strings, where the sound remains very close to the natural one.

Synthesis (clock hands):

  • Gain: 13
  • Hi 12 kHz: 11
  • M 300 hz: 14
  • Low 80 hz: 11

Output signal

The output signal is the result of a series of analog and digital processes performed by the computer. The audio interface is the first device linked to the signal. The first value we pay attention to is the sampling rate. As known from Nyquist's theorem, we must have at least double the audible frequencies, which correspond, for the treble, to 40,000 hz, then standardized to 44,100 hz (this means that the computer reads a sample every 0.0000227 seconds).

In the A/D and D/A conversion chain, this means intense processing, alleviated by the buffer, a small memory cache processed by the CPU. In multitasking audio I/O (ASIO and CoreAudio), the system and driver (ASIO for PC and AudioCore for Mac) must reconnect. All of this contributes to a fundamental value for live performance: latency.

Let’s return to the tonal characteristics of the guitar sound and the envelope. Unlike the frequency range, where the guitar can be placed between the viola and the cello, the envelope curve - especially the attack process, where it goes from 0 to maximum amplitude - is very similar to that of the piano and percussion instruments. This requires very short processing times, very close to 3 ms.

Devices that affect latency are: a) audio interface sampling rate;
b) buffer size;
c) RAM size, CPU speed, audio drivers, placement of the audio interface;
d) signal paths.

If it is possible to achieve times lower than 3 ms, it is practically impossible to maintain them in complex compositions and with constant signal usage. The risk is hearing audio spikes or causing crashes. Therefore, a key principle for optimizing latency is the balance between buffer size and sampling rate. For example, if we choose a buffer of 256 samples and a sampling rate of 44,100 or 48,000, we get a difference of about 0.5 ms with a limited CPU energy consumption.

We must also consider tonal quality. Max/MSP has a DSP where you can adjust the signal vector size level. First, consider the composition being performed, assess the CPU load, and then reduce the value.

Synthesis

  • sr 48000
  • I/O vector size 256
  • Signal vector size 64
  • Theoretical latency (without patch upload) 5.3 ms

Controls with Max/MSP

The two models presented represent some of the possibilities that Max/MSP offers for analyzing signals.

In the first example (input signal), 3 MSP objects are used specifically for signal analysis: levelmeter~, scope~, spectrogram~. All these objects have specific features and modes of operation. Regarding the levelmeter~, we have introduced gradual steps based on 10 units. This object, modeled after the analog VU meters, is calibrated this way to make the range of action more visible. Following is the oscilloscope (scope~) that tracks the waveform produced by the instrument. While the levelmeter~ is calibrated to measure dB (RMS), this object, like the spectrogram, has relative values determined by the video pixel setting.

This is an application by Tristan Jehan on a historical object introduced by Miller Puckette in the late 90s, fiddle~. In this case, the frequency and amplitude parameters are highlighted, starting from 0. Despite the object’s accuracy, the data shows tiny variations due to the complex data flow it refers to.

The object’s amplitude is relatively proportional to the brightness of the soundwave.

The second example (output signal) shows a setup that attempts to analyze the final result of the amplified sound.

At this stage, we use other Max/MSP objects such as metro, delay~, and analyze~. We will also use a polyphonic~ object in the setup that allows for the production of polyphonic sounds in real time, all under the command of a particular control like a footswitch or pedal.