Analysis and Resynthesis

Csound provides a number of tools for advanced types of synthesis. We don’t have space in this book to discuss all of them in detail, but we’ll take a quick look at one of them.

If you look at the manual pages for opcodes like pvoc and adsynt, you’ll discover that they need file analysis data in order to function. This analysis data is generated by Csound’s built-in utilities. If you click on the Utilities icon in the CsoundQt toolbar, you’ll find a dialog box (see Figure 7.3) with which you can run the cvanal, hetro, lpanal, pvanal, and atsa utilities. Each of these creates an analysis file that can be used with a different group of opcodes.

Figure 7.3 From the Utilities box in CsoundQt, you can run five different audio analysis routines. The right side of the window displays the manual page for the current routine, which you’ll want to consult while setting the parameters. These utilities can also be run from the command line, if desired.

image

The settings used with these utilities require some experimentation. The atsa utility has an especially daunting number of settings. In Csound 5.13, I was unable to get lpanal to work, no matter what settings I tried. (I’m told that lpanal is very old code and is something of a vestige.) However, pvanal works very well, and the results are musically versatile.

The pvanal utility generates a file for use with the pvoc opcode. This opcode gives you independent control over the speed and pitch of the sampled sound. A good source sound to experiment with might be a short sample—a few seconds—of a voice speaking a phrase. You can select the source file in the top field in the dialog box; CsoundQt will then fill the second field with the same filename, but with a .pvx extension.

Feel free to experiment with the values in this box. The manual notes, for example, that the frame size (-n, if you’re working from the command line) should be “larger than the longest pitch period of the sample.” However, a smaller value, such as 128, can produce some interesting gargling effects. With a value of 1024, which is the default in CsoundQt, pvoc can reproduce the original sound with only a slight smearing quality. Using pvoc can be simple or complex; here’s a simple example:


  isamplelength = 5.0
  kphas phasor 1/p3
  kphas = kphas * isamplelength
  ktransp init 1
  asig pvoc kphas, ktransp, “she_didnt.pvx”

This plays the source file once, at original pitch, during the duration of the note in the score. You could easily add a pitch envelope by generating the value of ktransp as the output of a linseg.

For producing abstract sounds, you may find that a more interesting approach is to ramp through the analysis file (via the first argument to pvoc) very slowly. With a vocal sample as the source audio, this technique can produce rich sheets of slowly evolving metallic tone. For instance, you might replace the code shown above with this:


  ioffset = p4
  kphas phasor 0.1
  kphas = kphas * 0.025 + ioffset
  ktransp init p5

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.141.115