CMMR 2023 Audio Examples


This page hosts audio examples for the paper Algorithms for Roughness Control Using Frequency Shifting and Attenuation of Partials in Audio

Frequency bashing and amplitude whacking on sinusoids



Two sine tones are played, a louder tone with frequency 440 Hz and quieter tone with frequency 470 Hz. The chart above shows the new frequency of the quieter tone after frequency bashing. When bashing for consonance, the frequency is moved to 445.5 Hz, which achieves the lowest roughness in the allowable range of movement (in this case, 0.05 to 0.4 of a Bark). When bashing for dissonance, the frequency is moved to 466.1 Hz. In the case of hard bashing, the frequency is moved to a fixed delta from the louder tone regardless of roughness value (in this case, the delta is 3 Hz). The examples can be heard below in the order of: vanilla, bashed for consonance, bashed for dissonance, hard bashed to 3 Hz difference. 


Two sine tones are played, a louder tone with frequency 910 Hz and a quieter with frequency 880 Hz. The examples can be heard below in the order of: vanilla, bashed for consonance, bashed for dissonance, hard bashed to 3 Hz difference. Note that the beating frequency is different for the first two examples than above due to the difference in critical bandwidth, but identical in the hard bashed example. (Caveat: the graphic below demonstrates what would happen if the 910 Hz tone is quieter, but in this case the 880 Hz tone is quieter and therefore has its frequency changed).



Returning to the 440 Hz and 470 Hz tones, now the amplitudes are whacked for consonace at 0% (vanilla), 33%, 66% and 100% rates. At 100%, the new amplitudes of the sine tones are set so that power is preserved from the original signal and the louder tone theoretically masks the quieter tone; however, due to imperfections in the masking model, some roughness is still heard. The figure above shows the new levels for both tones in decibels. 


The same procedure is repeated for the 880 Hz and 910 Hz tones. The figure above shows the new level for both tones in decibels. Note that the quieter tone must be reduced 1-2 dB more than the previous example due to the steeper slope of the masking curve when the masked tone is lower in frequency.  


Differences between frequency bashing and tuning

Below, a Major 7 chord is played using sawtooth waves in equal temperament tuning. One approach to reduce roughness in the chord is to frequency bash, which removes regions that contribute auditory roughness but does not retune notes. Another approach is to retune notes using just intonation so that partials match in frequency. These three examples are shown below; in the middle, frequency bashing is a subtler change that maintains the essence of the original, while retuning (right) is a more noticable change.


The difference signal between the vanilla and frequency bashed versions can be heard below, which can be helpful for critically listening for the differences between versions.



Dissonance can be increased by frequency bashing for increased roughness, which creates a different sensation than retuning. An example of increasing roughness can be heard below.



Other audio examples

An equal temperament minor chord: vanilla (left), filtered for consonance (middle) and the difference signal (right). Filtering consists of finding pairs of frequencies that contribute roughness and filtering the quieter tone out completely instead of changing its parameter. This can be useful when there are only a few partials contributing roughness.


A horn line of three players: vanilla (left), amplitude whacked for consonance (middle) and the difference signal (right). This example also demonstrates using the analysis to selectively apply crossfades so that signals are left unchanged when no roughness is present (see Code below).


A major chord with slightly detuned notes: vanilla (left), frequency bashed for consonace (middle) and the difference signal (right).


A chord from a vocal chorale: vanilla (left) and bashed for dissonance (right). The effect is exaggerated but could be used for musical effect.


A major chord in equal temperament: vanilla (left), hard bashed at 3 Hz (middle) and with a tremolo effect (right). This example shows that hard bashing can be used to create a frequency dependent tremolo, as opposed to the traditional tremolo that effects the entire signal.


Trumpets play a dissonant chord: vanilla (left), whacked for consonance (middle) and the difference signal (right). The whacked signal produces an odd sensation where the listener experiences the dissonance in tonality but a majority of the prominent rough beating is removed. In other words, the sound becomes musically dissonant and sensorily consonant.


Frequency bashing and amplitude whacking in Max/MSP

The two videos below demonstrate the basher and whacker objects in Max/MSP. These objects work on incoming parameters and can adjust parameters at control-rate, although the lack of information about future parameters makes them more prone to artifacts than the offline objects that examine the parameters of sinusoids over their lifetime.

The first video demonstrates the basher and whacker objects over two drones, one inharmonic and the other harmonic. Parameters are changed to make the drones contain more or less auditory roughness by changing either the frequency or amplitude of nearby partials.


The second video demonstrates the whacker object over a sinusoidal reconstruction of a horn line featuring three horn players. The analysis was done offline using the SPEAR software package and the analysis parameters are used to recreate the audio in an additive synthesizer. Parameters are adjusted before the additive synthesis module.



Code


All relevant code is available on Github.

For offline roughness control of audio files, there is a dependency on MTG's sms-tools which is not yet installable as a Python package. As such, the code is available on this fork of the sms-tools repository.

For real-time roughness control of sinusoidal parameters in Max/MSP, code is available in this repository. It is currently required to build from scratch using the max-sdk, although objects may be released later for download directly through Max.