User Guide

8. Sound Description Interchange Format (SDIF)



The Sound Description Interchange Format (SDIF) is a standard for storing and sharing sounds in a variety of representations. Much more detail, including a full list of representations currently supported by SDIF, can be found at the SDIF Home Page. OSW currently supports a subset SDIF formats:

To load an SDIF file into your OSW patches, use the SDIFBuffer transform. This transform works much like SampleBuffer in that you can load a new file by double-clicking and have other transforms access the buffer by the name assigned to the tranform.

Once you have created an SDIFBuffer, you can double-click it to load an SDIF file into the buffer:

If you double-click on an SDIFBuffer after a file has been selected (i.e., because you just selected a file, or you opened a patch that contained a pre-loaded SDIFBuffe), you will be presented with a list of streams contained in the SDIF file:

In the above example, the SDIFBuffer has loaded three streams from a file. Each stream has an ID number and a type. Stream 0 is of type 1FQ0, indicating that it contains time-varying pitch (and amplitude) estimates. The second stream (1) is of type 1STF, and contains time-varying spectra (e.g., STFT or phase-vocoder representations). The final stream is of type 1TRC and contains a sinusoidal model. You can use the "Load New File..." button if you want to load a different file into the SDIFBuffer.

Now that we have loaded some SDIF streams, what can we do with them? You can access streams using one of the transforms sdif::ToPitch, sdif::ToSinusoids, or sdif::ToResonances to access streams of type 1FQ0, 1TRC/1HRM or 1RES, respectively. Using our earlier example, let's try to use the sinusoidal models from stream 2. Create a sdif::ToSinusoids transform and connect a MessageBox to its stream inlet:

Type the name of the SDIFBuffer followed by a forward slash and the stream ID, as illustrated above. Once you click the MessageBox button, the sdif::ToSinusoids transform will be able to access the stream. Note that SDIF stream names are like any other names in OSW, such as inlets, outlets, tables, etc. Thus, you could access SDIF streams from other patches using absolute path names (beginning with a '/') or relative path names from the current patch.

The output of sdif::ToSinusoids is a sinusoidal data type that can be connected to an AddSynth transform to perform additive synthesis, or one of several other transforms that modify sinusoidal models. The sdif::ToSinusoids transform also contains a time inlet, allowing you to control time (e.g., speed up or slow down the progression of the model) via a TimeMachine transform. See the help patch for AddSynth to see how you can control sinusoidal models in real time.

Refer to the help pages and help patches for sdif::ToPitch and sdif::ToResonances for more information on how to use these types of SDIF streams in OSW.


Open Sound World User Guide
© 2000-2004 Amar Chaudhary. All rights reserved.