Guide to Mosca:
Filter:
Mosca/Guide (extension) | Libraries > Ambisonic Toolkit | Libraries > HOA

Guide to Mosca
ExtensionExtension

Usagae exemples for Mosca

A video tutorial for Mosca is available online

The user can set up a project directory with an "auto" subdirectory. A Folder containig ambisonic impulse resonses (IRs) must also be provided for reverb convolutions. IRs should have the first 100 or 120ms silenced to act as "tail" reverberator. For convenience, please download the "moscaproject.zip" file on the Mosca page which contains the file structure, example IRs and B-format recordings as well as other information and demos. Note that the IR example is recorded at 48kHz

Basic Setup

1st Order Binaural

NOTE: For higher orders see the BinauraDecoder.vst section below

Speaker Array

The initialisation example below is intended for rendering on the 19.2 Dome at Le SCRIME (University of Bordeaux, France) with the 2nd order "internal" decoder. This speaker setup allows for 3rd order ambisonic with a custom ADT decoder (commented out). Speaker coefficients are given in the following format for 3-dimensional loudspeaker arrays with units in degrees and metres: [AZIMUTH, ELEVATION, RADIUS]. The elevation coefficient should be omitted for 2-dimensional arrays: [AZIMUTH, RADIUS]. See the AmbiDecoderToolbox tutorial for further information as well as Mosca for information on the decoder argument.

GUI components

Top left

see MonoGrainBF

Top Right

Right

Botom Left

Botom Right

Initialisation options

Raw or Binaural output

The exemple below offers different rendering and output options. The raw output setup is comented out, to enable it instead of binaural, simply switch the comments between the "o.numOutputBusChannels" the "~decoder", the "~order" and the "setup" variables. "raw format" and "raw output" are ignored if a decoder is provided so thy do not need to be comented to initialize binaural rendering.

Coded control

An instance of the Mosca GUI and its sources may be controlled by SuperCollider code using the functions defined in the class MoscaBase. Similarly, Mosca parameters may be used to modulate synths. See the file MoscaBase.sc in the source for the available options.

The following example shows the control of the Cartesian coordinates of source 1 with the setCartesian function.

Embed SuperCollider synth in a Mosca source

A single SuperCollider synth may be embedded in a Mosca source and receive source-specific and global data from the Mosca GUI.

Running Mosca Without a GUI

Automation

OSSIA

With or without the GUI, once the Mosca's root node has been exposed through an OSSIA_Device, all parameters are accessible from OSSIA/score or any other application able to communicate through OSC or OSCQuerry. See OssiaReference.

For simple OSC communication, you can learn all of mosca's parameters easealy by creating and naming OSC device in OSSIA/score (keep deffault ports and adresses), then right clicking on the device and selecting the "learning" mode. you can then start mosca with a deffault OSSIA_Device and runnig the "~myOssiaDevice.exposeOSC()" method. All parameters should then appear in score's "learning" window.

NOTE: The ".exposeOSC()" method will send all messages to the OSC device for learning. it can be called before, during or after Mosca's initialisation. Regardless, it is only relevant if score is in OSC learning mode, or if the parameters have already been learned.

If no OSSIA_Device was passed to Mosca as the "parentOssiaNode" argument (above example), on will be created internaly. It can then be accessed and exposed wih the

method. Simply make sure to enable "learning" in OSSIA/score before running it.

Serial devices & head tracking

The Arduino and 9-Axes Motion Shield and supporting Arduino board such as the Uno (tested) should be placed on top of the headphones with the USB socket of the Arduino directed to the left of the user. In this orientation the USB cable can run down left-hand side of headphones together with audio lead. Use the Arduino project files in the directory "arduinoHeadTrack" in the git sources to configure the Arduino and shield. See https://www.arduino.cc for more information on the Arduino.

When using Mosca with a head-tracker, it is useful to access the serial device with a persistant name. To do this on Debian/Ubuntu Linux, first get information about an attached device with a line such as:

udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)

Search for the block of data that contains reference to the Arduino and take note of the values for idVendor and idProduct. Then create a file /etc/udev/rules.d/10-local.rules and add contents such as the following (edit this line and above to your needs):

ACTION=="add", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", MODE:="0666", SYMLINK+="head_tracker"

To load this without rebooting, type: sudo udevadm control --reload-rules

Then disconnect and reconnect your device. In the above example it can be accessed at /dev/head_tracker for example.

Using IEM ambisonic "BinauralDecoder.vst3"

The "IEM Plugin Suite" of VST3 plugins must be installed to run this example as well as VSTPlugin.

Using IEM ambisonic "SimpleDecoder.vst3"

NOTE: Testing! Functionality not yet confirmed with loudspeaker array. Seems to be working.

Effect Insert

NOTE: work in progress (currently retired)