OpenMusic

Visual Programming | Computer-Assisted Composition

Navigation : Previous | Next

SDIF Files in OM : The SDIFFile Object

SDIF files are handled in OM via the SDIFFILE object. SDIFFILE boxes (when correctly initialized) are attached to a file on the computer hard disk. Therefore the actual data is not intern in the OM patch but always remains in the external file.

SDIFFILE has one single input/output used to initialize the box or access the contents of the attached SDIF file.

—|—

SDIFFile Initialization

Default Initialization

If nothing is connected to the SDIFFILE box input, when it is evaluated, a file chooser dialog opens and allows to choose a file to load.

When initialized, the box miniview (press m) displays some general information about the contents of the SDIF file. Each line is a stream ID followed by a frame type signature and a list of contained matrix type signatures.

—|—

About the Structure of an SDIF File (Streams, Frames, Matrices…)

File Name

When the name of the box is visible (press n) the name of the file is displayed and updated at initializing the box.

After the SDIF file is loaded, you may want to lock the box (press b) in order to avoid reinitalizing it at next evaluations.

—|—

Pathname Initialization

The SDIFFILE box is more generally initialized with a file pathname, which can be connected to its input.

This pathname can be typed textually or come from another box or function.

About Pathnames in OM

Sound Analysis Results

Most of the sound analysis tools available in OM (generally part of external libraries such as OM-SuperVP or OM-pm2) write analysis results in SDIF files and just return the written file pathname.

These return values are therefore suitable for connection to the SDFFILE box.

Fundamental frequency analysis with pm2-f0 from the OM-pm2 library. The
result of analysis is a created SDIF file pathname, connected to the SDIFFILE
box.

Fundamental frequency analysis with pm2-f0 from the OM-pm2 library. The result of analysis is a created SDIF file pathname, connected to the SDIFFILE box.

—|—

File Contents

Like MIDI or AIFF, SDIF is a binary data format: the contents of an SDIF file can not be read or edited as a simple text but requires specific tools and conversions. A number of different tools are available in OM for this purpose, which will be presented in these SDIF manual pages.

It is however possible to convert an SDIF file to text in order to check the full exact contents of a file.

—|—

—|—

Here is an example of the text conversion of an SDIF file. We can already observe a number of information:

—|—

The SDIF Format

Reading SDIF File Data in OM

SDIFFile Editor

Once initialize and attached to a file , double click on the SDIFFILE box to open the SDIFFile editor.

The SDIFFile editor is divided in two main areas :

Selecting a matrix block allows to visualize details of its contents on the right-part of the editor.

More Information about the Structure of an SDIF File

The SDIFFile editor allows to inspect and visualize the contents of the SDIF file, but does not allow any modification or data edition.

An alternative editor for SDIF files : SDIF-Edit

SDIF-Edit is a program allowing to visualize and edit SDIF files in 3D.

It was used as the default editor for SDIFFile boxes in former versions of OM (< 6.4)

In OM 6.4 you can use SDIF-Edit instead of the default SDIF Editor installing a dedicated external library.

All information and downloads for SDIF-Edit available here : http://repmus.ircam.fr/sdifedit

References :

Contents :

Navigation : Previous | Next