• Nem Talált Eredményt

Analysis in Max

In document Live electronics (Pldal 67-72)

synthesis and distortion), together with their controllable parameters and the possible routes between the sound generating units

Chapter 8. Pitch, Spectrum and Onset Detection

2.2. Analysis in Max

LEApp_08 (containing LEApp_08_01, LEApp_08_02, LEApp_08_03, and LEApp_08_04) is downloadable for Windows and Mac OS X platforms using the following links: LEApp_08 Windows, LEApp_08 Mac OS X.

LEApp_08_01 shows the instantaneous spectrum of a signal (see Figure 8.2.). The spectrum is displayed on the bottom of the screen. The upper and lower frequency limits can be set by the two number boxes at the respective ends of the spectrum. The two toggles set the scaling of the horizontal (frequency) and vertical (loudness) axes.

The large black display in the patch is a sonogram. The update interval can be set using the number box on the top; however, it is possible to stop updating the sonogram by pressing the 'Freeze' toggle.

Figure 8.2. The spectrum and sonogram of an incoming signal.

LEApp_08_02, depicted in Figure 8.3., presents a few simple attributes of timbre that can be deduced from the instantaneous spectrum. At the bottom, a spectrogram and a sonogram is shown. Three descriptors (both their instantaneous values and a running history of the last values) are displayed on the top right corner of the screen.

The displayed timbral dimensions are loudness, noisiness and brightness of the incoming sound (from the top to the bottom, respectively). The loudness gives us the average power of the signal in decibels; the noisiness expresses how harmonic or inharmonic the signal is (0% indicates fully harmonic sounds - e.g. a single sine wave - and 100% describes white noise); brightness shows the 'centre of mass' of the spectrum1 (the higher this value, the brighter the sound).

Figure 8.3. Simple spectral analysis tools in Max.

1A weighted average of the frequencies, where each frequency has a weight that is proportional to its amplitude. Also called spectral centroid.

59

LEApp_08_03 and LEApp_08_04 are two simple pattern matchers, depicted in Figures 8.5. and 8.4., respectively.

Both are based on incoming MIDI pitch and velocity information.

Figure 8.4. A MIDI-driven rhythmic pattern matcher in Max.

LEApp_08_03 detects rhythmic patterns. The program listens to the MIDI keyboard selected with the 'Select MIDI Input' menu. However, MIDI events can be imitated with the mouse (by clicking on the keys) as well as with the computer keyboard (for this, you need to turn 'Enable Computer Keyboard' on and press any alphanumeric key on the keyboard).

The program can operate in two modes. In 'Record' mode, you can record a new pattern: the sequence to recognise, containing up to 9 rhythmic values, can be set either with the dropdown lists (lists left blank are not taken into account) or by pressing the 'Record Pattern' button (only while in recording mode). In the latter case, you just need to play the pattern; the application will automatically quantise it and copy it into the row.

In 'Recognise' mode, the program computes the standard deviation between the durations of the last played notes and the pattern itself. Whenever the deviation is below the amount set by the number boxes at the bottom right, the 'Match' button will be triggered and the current 'Tempo' will be updated.

The pattern recording and matching algorithms are contained by the two subpatches, [p detectRhythmPattern] and [p matchRhythmPattern], respectively.

Figure 8.5. A MIDI-driven melodic pattern matcher in Max.

LEApp_08_04 detects motifs. As with the previous example, the program is controlled with incoming MIDI notes; to open a MIDI control panel similar to the one contained by LEApp_08_03, press the 'Open Keyboard Control' button.

This program also has two operational modes. In 'Record' mode, you can record a new pattern by turning on the toggle at the top left of the window (and turning it off when you finished playing the pattern). In 'Recognise' mode, this sequence will be recognised each time when you play it, even if you transpose it. In addition to recognising the pattern itself, this program reacts to the matches, too. Upon a successful detection, one of the 'reacting' modules will add a minor second to every subsequently played note until when the pattern is recognised again, in which case the effect turns off automatically. The other 'reacting' module will play a trill on the last note of the motif. Both modules can be completely disabled with the toggles above them.

3. Exercises

1. Observe the difference between pitched and percussive onset detection with le_08_01_integra.integra! Invent a melody containing both legato passages (keeping dynamics constant) and long-held notes with abruptly changing dynamics (keeping the pitch constant). Adjust the detection limits so that when you sing this melody twice, using pitched the first time and percussive detection second, you can catch every pitch change in the first and every dynamic change in the second time!

2. Categorize every sound sample in LEApp_08_02 according to the main characteristics of their loudness, noisiness and brightness! Pick three different samples and find sounds on your hard drive which have similar characteristics in terms of these three descriptors!

3. Record a simple rhythmic pattern with LEApp_08_03. Play a melody which contains this rhytmic sequence using different base durations (e.g. so that the pattern appears once in crotchets and the next time in quavers).

Explore the efficiency of detection using different deviation limits between 0 and 1! Find a deviation limit which creates an acceptable balance, alowing space for artistic freedom in terms of tempo fluctuations (e.g.

rallentando, accelerando etc.) without signaling too many 'false positives'.

4. Record a motif with LEApp_08_04 and play a melody which contains this motif, possibly with many different transpositions. Turn the patches [p reaction1] and [p reaction2] on (only one at a time) and explore how they react to your performance. Turn on both, and improvise a melody on your recorded motif!

61

5. Only for advanced students: explore the subpatches [p detectRhythmPattern] and [p matchRhythmPattern] in LEApp_08_03 and explain what exactly they do! Observe [p matchRhythmPattern] first, as that is much easier to understand than the other one.

Chapter 9. Capturing Sounds,

In document Live electronics (Pldal 67-72)