escutainfo [ a t ] gmail.com
Uncategorised
escutainfo [ arroba ] gmail.com
<!doctype html>Guide to Mosca | SuperCollider 3.12.2 Help
var scdoc_title = 'Guide to Mosca'; var scdoc_sc_version = '3.12.2';Guide to Mosca
A video tutorial for Mosca is available online
The user can set up a project directory with an "auto" subdirectory. A Folder containig room impulse resonses (RIRs) must also be provided for reverb convolutions. RIRs 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 RIRs and B-format recordings as well as other information and demos. Note that the RIR example is recorded at 48kHz
Basic Setup
Binaural
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
- Source index number ("Source 1" initially). you can change the selected source by right clicking on the background, openning or closing a drop down-menu. Once sources are placed around the center of the pannel, they can be selected again with a left click in their vicinity.
- HW-in. Toggle this to read audio from hardware inputs. The user must specify the number of channels and the staring bus (starting with zero) in the two fields beneath the toggle. Note this will override any loaded sound file. It is up to the user to manage the start busses for the various source. If for example source 1 is a 4 channel signal and starts on bus zero, a second stereo source must use a starting bus of 4 or higher.
- SC-in. Get audio in from a SuperCollider synth. The user needs to specify the number of channels in the GUI but does not need to specify the starting bus. Like HW-in, selecting SC-in for a particular source will disable any sound file that has been loaded. see the exemple below in Using Supercollider synths as inputs.
- load. Load a sound file for a given source.
- stream. Stream a sound file from disk for a given source.
- Loop. Loop the loaded soudfile file.
- audition. Use this button to audition a given source. Note that the transport also plays and cues sounds, the "audition" button should only be used to test sounds with the interface.
- Library. Drop-down menu for selecting spatializer Ugens. See Description/Sources in Mosca for more informations.
- Level. Adjust the source's level.
- Doppler amount. Adjust the source's doppler amount.
- Contraction. Allows the expension of the signal from spatially focussed to omnidirectional, mainly accomplished with cross-fades between B-format signals an their W component.
- Distant Reverb. Drop-down menu for selecting distant reverb types. see Description/Reverberation in Mosca for more informations.
- Dst. amount. If a Distant Reverb is selected, this controls the distant reverberation amount for the current source.
- Dst. room/delay. If "freeverb" is selected for Distant Reverb, this controls the local "room size" parameter. If "allpass" is selected, the value is applayed to the local delay time.
- Dst. damp/decay. If "freeverb" is selected for Distant Reverb, this controls the local"room dampenning" parameter. If "allpass" is selected, the value is applayed to the local decay speed.
- Close Reverb. Adjust the source's proximal reverberation amount.
- Angle. If the source is stereo, this controls the angle of the virtual speaker pair. The default is 1.05 radians (60 degrees).
- Rotate. If the source is 4 channel and above (B-format), this controls the rotation of the signal on the horizontal plane.
- Directivity. If the source is 4 channel and above (B-format) and the "ATK" Library is selected, this controls the directivity of the B-format signal (see ATK documentation)
- Spread / Diffuse. If the "ATK" Library is selected, these toggles allow the user to select two other methods to diffuse the signal omni-directionally. See "spread diffusion encoder" and "frequency spreading encoder" in FoaEncode
- Grain rate. If the "Josh" Library is selected, this controls the rate at which new grains are created (in Hz).
- Window size. If the "Josh" Library is selected, this controls The window size in seconds.
- Rand. win. If the "Josh" Library is selected, this controls a randomness factor for Window size.
see MonoGrainBF
Top Right
- show aux. Open and close an auxiliary controller window for a source. These sliders do not affect spatialisation, however the data produced is sent to any "registered" SuperCollider synth. After Initialising the GUI, see the exemple below in Using Supercollider synths as inputs.
- show data. Open or close a data window for all sources showing all parameters.
- show nodes. Show SuperCollider node tree.
- record audio. Records audio as a wav file to the project directory defined by the "projDir" class method. The number of channels recorded and the starting bus are defined by the "recchans" and "recbus" arguments respectively.
- blips. Check this box to include audible blips at the begining of the recording. This may be useful when post synchronising the recorded audio with footage taken on a video camera.
Right
- Z-axis. Manipulate the Z-axis of the current source.
Botom Left
- Automation transport. Includes a "play/stop" button, a return to start button, a record button and a "snapshot" button of current values. The Automation transport also contains a slider to move the "play head". Loaded sounds which are not looped will start at the beginning of the file, at "0" on the transport, and the transport fader may be used to advance through these sounds as well as advance through the recorded automations.
- save auto / load auto. Save/load to/from a chosen directory.
- Slave to MMC. Slave the transport to incoming Midi Machine Control data. This has been tested with Ardour and Jack on Linux.
- Loop. Loop the transport.
Botom Right
- Close Reverb. Drop-down menu for selecting close reverb types. see Description/Reverberation in Mosca for more informations.
- Cls. room/delay. If "freeverb" is selected for Close Reverb, this controls the global "room size" parameter. If "allpass" is selected, the value is applayed to the global delay time.
- Dst. damp/decay. If "freeverb" is selected for close Reverb, this controls the global "room dampenning" parameter. If "allpass" is selected, the value is applayed to the global decay speed.
- M. Master output level.
- X. Listener's position on the X axis in meters.
- Y. Listener's position on the Y axis in meters.
- Z. Listener's position on the Z axis in meters.
- H. Listener's orientation around the Z axis in radiants.
- P. Listener's orientation around the X axis in radiants.
- R. Listener's orientation around the Y axis in radiants.
Initialisation options
Binaural or Raw 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.
Runnig Mosca Without a GUI
Automation
- As a first step, run the first block of code above in these Examples to open a Mosca GUI.
- Record some Automation data and save to disk, taking note of the address.
- Edit the block of code below to include the correct paths for your saved Automation file.
- Run the code and use the commands below the block to control playback.
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 Ossia library reference for SuperCollider.
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.
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 decoders
The "IEM Plugin Suite" of VST3 plugins must be installed to run this example.
Effect Insert
link::Guide/guide-Mosca::
35mm black and white film photography by Iain Mott