OpenMusic workshop @CNMAT

September 13-14-15, 2013
CNMAT, Center for New Music and Audio Technologies, UC Berkeley.

Downloads and installation

Download and install the current OM version (6.6.2) from Ircam ForumNet website.

I recommend participants to create a ForumNet account (it's free) before the workshop and email me your user name. Subscribed participants will be granted access for the external IRCAM-licenced tools we may use during the workshop.
⇒ Once you have a Forumnet account you can also subscribe to the OpenMusic users group.
⇒ You can also subscribe (even non-Forum members) to the OM mailing list to get support, advices and share your experience and problems with the OM user community and developers.

For Mac users:

  • If this is your first installation, you will need to install MidiShare. MidiShare is the library used by OM to manage MIDI data and rendering.
    Depending on your OS configuration, Midishare 1.92 may be required instead of 1.93 (latest).
  • You mant want to be an OM pioneer use the new 6.6.3 update, or a beta release of OM 6.7 (several OM versions can coexist on your computer).
    They are both temporarily available for download HERE (Mac versions only).

Getting help and support

If you wish to explore OM by yourself, you may find help at the following different places:

  • The online user manual (also accessible in OM from the Help menu) is a relatively complete documentation about all features and programming concepts of the OM environment.
    Note that this manual does not include external libraries ⇒ check this page out for the libraries.
  • The function and class reference is accessible in OM from the Help menu and provides a basic documentation of all referenced objects and functions. Type 'd' in an OM patch to access directly the reference page corresponding to a selected box.
  • In patch and other OM editors, the Editor command keys in the help menu (also accessible with 'H' keyboard shortcut), can be a useful reminder of the principal actions and shortcuts.
  • See the Common Lisp specs. and reference for the Lisp tools and functions.
  • Check/ask questions to the OM mailing list and/or the ForumNet OpenMusic disciussion group.

Hints / Panic

Errors in OM can be raised by mistakes in your patches or Lisp code or bugs of the environment. OM tries to handle an report errors as much as possible, but can fail in certain situations (external library crashes, memory issues, etc.)

  • A system Terminal pop-up is not necessarily dangerous. It happens when an error was not "catched" correctly in OM and can be useful to track the origin of this error. Try to type :b to know more/report the error, or :top to return to the top level and get the control back on the OM user interface. Do not forget to save your work. Consider a fresh restart.
  • When a box can not draw anymore because of a wrong input and a message errors appears every time you click or redisplay: hide the "miniview", by selecting the window and typing upper case 'M' (show/hide all front window miniviews). Delete the box and create a new one, just to be sure..
  • When an evaluation seems never to end (Listener printing "Running" forever): Try to abort the process (Listener window, menu Lisp/Abort or CMD+'A').

[ day 1 (9/13) ]

  • Getting ready: Installation, sound tests, etc.
  • Basics of the environment: the main OM windows and concepts: workspace, packages, documents, preferences…
  • Patching basics: creating and evaluating a visual program
  • Introduction to basic OM objects: note, chord, chord-seq, BPF
  • Score and BPF editors
  • Evaluation modes: lock, eval once (local state), lambda (higher-order functions)
  • Using the basic OM functions to create musical data (om-random, om-scale, om-sample, om+, om-round, x→dx/dx→x, etc.)
  • Iterations: mapcar
  • Iterations: omloop
  • Interpolations
  • Abstractions: local (red) / global (blue)

Patches we've created during this session

Basic visual program including note, chord, chord-seq, multi-seq objects; om-random, dx→x and use of box states…

Download the patch: cnmat-patch-1.omp
Using (rescaleing, resampling…) BPFs (break point functions)

Download the patch: cnmat-bpf-1.omp
Definition of a simple abstraction and application in iterative processes using MAPCAR or OMLOOP.

Download the patch: cnmat-bpf-iterations.omp
.. more advanced use of MAPCAR and of lambda functions as tests/keys in higher-order functions.
See also the OM User Manual for more details on higher-order functions in OM

Download the patch: cnmat-mapcar-2.omp
… and how to access list elements, display in BPFs, use BPF-Libs, extend to chord interpolation.

Download the patch: cnmat-interpolation.omp

[ day 2 (9/14) ]

Main topics covered

  • Voices and rhythic trees, quantification
  • Curves and "spatial" objects: BPC, 3DC…
  • Sounds
  • Install / load external libraries [⇒ see also in the OM User Manual]


Voices and Rhythm Trees

Download the patch: voice.omp

More about rhythm trees HERE.
voice/chord-seq conversions, quantification

Download the patch: quantification.omp


⇒ In this practical examples we implemented a solution using OMLoop, to generate a sequence out of randomly selected intervals, that would remain in a given pitch range.

Download the patch: ex-random-intervals.omp


Sound montage, mixing and processing.

- Sound processing boxes: sound-seq, sound-cut, sound-save.
- How to instantiate a sound from a pathname, select from pathnames in your file system…

Download the patch: sound.omp
An example of audio iteration.

In this second patch we embedded the audio functions in an iterative patch (omloop) which selects a random position in the file and cuts a small extract (sound-cut), repeats this process a number of times, and appends the extracts into a single sound (sound-seq). In order to implement this loop, we used the accum box instead of the collect, so as not to collect the extracts into a list, but defined our own "collection" procedure using sound-seq. We also implemented an alternative solution using collect and the reduce Lisp function.

Download the patch: sound-loop.omp

2D/3D objects

New objects for the manipulation of curves and trajectories: BPC, 3DC, 3D-trajectory.

Examples of algorithmic generation of trajectories, coordinate-system conversions.

The BPC-lib and 3DC-lib objects allow to collect lists of BPCs or 3DCs.

Download the patch: curves-1.omp.
Rotation of a 3DC and application in an iterative process (mapcar).

Download the patch: curves-2.omp

[ day 3 (9/15) ]

Sound analysis, processing, synthesis... using the Ircam Forum libraries

Download the libraries on the ForumNet website (subscription required – granted for free to the workshop participants).
Import the libraries tutorial patch from the Help/Import Tutorials menu of the Workspace window.

Understanding the SDIF will be useful here..
⇒ Read more on the SDIF format and use in OM in the online user manual. ⇒ See the SDIF documentation, standard types, etc.

We will create SDIF files using the sound analysis libraries, but you can also generate them and import them for other software, such as:

  • AudioSculpt (ForumNet subscription required).
  • Spear (by M. Klingbeil) – alternative software and GUI for phase vocoder analysis.

Here are some example files you may use in the following patches (put the files in your in-files folder as set in the preferences, or anywhere on your computer):

⇒ See also the documentation of SuperVP and PM2 analyses in AudioSculpt (apply to OM-SuperVP and OM-pm2 operators).

SDIF Files / Sound analyses using OM-SuperVP and OM-pm2

Analysing a sound file and reading the contents of and SDIF file in OM.
Instanciate SDIFFile objects, understand and inspect the contents, read and extract the data with GetSDIFData, SDIF→BPF, etc.

Fundamental frequency estimation.

Download the patch: sound-analysis-1-f0.omp
Formants analysis

Example of a more complex description and deeper exploration of the SDIF data.

Download the patch: sound-analysis-2-formants.omp
Partial tracking analysis.

How to read, convert and process the partial tracking files created by OM-pm2, AudioSculpt or Spear.

Download the patch: sound-analysis-3-partial-tracking.omp
Transient detection, markers, 'chord-seq' analyses.

Download the patch: sound-analysis-4-markers-cseq.omp

Advanced sound processing (OM-SuperVP)

Overview of the sound processing tools in OM-SuperVP.

Review of some of the different treatments available for supervp-processing (transposition, time-stretching,…) and different ways of setting the parameters (constant, continuous, etc.)

Download the patch: supervp-processing.omp
Analysis/synthesis, batch processing.

In this patch we started from the 'remove-pitch' example from the OM-SuperVP library tutorials and added additional treatments on the transposition.
We then embedded the whole patch in an iteration (mapcar) performed on a list of mirror pitches.

Download the patch: sound-processing-iteration.omp

Practice with OM-SuperVP...

During this session we have tried to implement a kind of "auto-tuner" process, that would correct the pitch of a sound to the closest intonation of a given scale. In theory, the solution is actually pretty simple !

The following visual program approximates a pitch to the closest tempered division of the octave (approx-m), and returns the difference with the original pitch, that is, the required transposition to reach this approximated pitch:
We can therefore apply it in a patch similar to the previous one (inspired from the "remove-pitch" example).
⇒ Download the patch: auto-tune.omp

You can test this patch with simple sounds (e.g. a frequency-modulated sine) and check that the frequency is now fixed to the pitches in the specified approximation (try out this patch to synthesize the initial sound using OMChroma and OM-SuperVP, for instance).
With "real" sounds (e.g. with quick pitch variations), the result may not sound so good : a real, good solution may actually require more advanced and case specific settings/processing.


OM-Spat and the SPAT-MATRIX object allow to represent spatial scenes.
Every component (column of the matrix) represents one source and its different spatial parameters.

The spatial scene can be rendered to a multichannel audio file with spat-synth, or saved as an SDIF file.
Room parameters can also be specified in the SPAT-ROOM objects, that can be attached to the different sources.

Download the patch: om-spat.omp

Note: similar matrices to the SPAT-MATRIX are also used for controlling sound synthesis processes in other libraries, such as OMChroma and OMPrisma, or OM-Chant. They are all subclasses of a standard OM object called class-array.
You can load the SDIF file generated by OM-Spat in the Spat-SDIF-Player application (MacOS only – see inside your OM-Spat library folder) to stream its contents via OSC/SpatDIF messages.

[more on the SpatDIF format]
The OSC/SpatDIF messages can be received for instance in Max using udpreceive (set the port to th Spat-SDIF-Player output port). The Ircam Spat 4 includes a spatdif-to-spat utility to convert SpatDIF to Spat messages.

bresson/cnmat/om-workshop-2013.txt · Dernière modification: 2017/10/02 15:00 par Jean Bresson