Mosca

GUI-assisted authoring of dynamic 3D sound fields

Mosca

MoscaScreenshot

Join the chat at https://gitter.im/dev-mosca/community

note

Installing the ATK Kernels and Matrices is required, as well as the sc3-plugins version 3.10 or higher. For more Library options, you can install this HOA fork

DESCRIPTION

Mosca is a SuperCollider class for GUI-assisted production of sound fields with simulated moving or stationary sound sources. Input sources may be any combination of mono, stereo or B-format material and the signals may originate from file, from hardware inputs (physical or from other applications via Jack) or from SuperCollider's own synths. In the case of synth input, each is associated by the user with a particular source in the GUI and registered in a synth registry. This way, they are spatialised by the GUI and also receive data from the GUI pertaining to the source (eg. x, y and z coordinates or auxiliary fader data). Ambisonic Sound fields may be decoded using a variety of built-in decoders (including binaural), Faust Ugens created with the AmbiDecodertoolbox (see HOA decoding) or with external decoders such as Ambdec. Mosca has its own transport provided by the Automation quark for recording and playback of source data. This can be used independently or may be synchronised to a DAW using Midi Machine Control (MMC) messages. This function has been tested to work with Ardour and Jack. The integration of ossia-sclang also allows Mosca's individual parameters to be controled with the interactive sequencer ossia-score:: as well as any other application featuring OSCQuerry or plain OSC communication.

Sources

Mono and stereo sources may be spatialized with ugens from a selection of libraries (Ambitools, HoaLib, ADT, ATK, BF-FMH, Josh & VBAP) set indiviualy for each source. For B-format input signals, which are already ambisonically encoded, the available options for transformation the ATK and Abitools. The ATK is used to implement push transformations to manipulate the angular location of sources as well as to perform rotations of the source sound field and to manipulate its directivity. Ambitools is used to implement a beam formation technique. All sources are subject to high frequency attenuation with distance. For a better sensation of nearness, ATK implements a proximity effect, adding a bass boost to proximal sources among other phase effects to simulate wave curvature. To that same effect, the Ambitools encoder makes use of "Near Field Compensation". Generally, the differences between libraries can be summarised as follows:

| Libraries | specifics | |-----------|----------------------------------------| | Ambitools | most realistic but CPU demanding | | HoaLib | lightweight and neutral sounding | | ADT | lightweight and broad sounding | | SC-HOA | even lighter | | ATK | 1st order only but many options | | BF-FMH | 2nd order max | | Josh | 1st order granular effect | | VBAP | light and precise but less homogeneous |

note

The results of any particular spatialisation library are often dependant on the source material. ADT and ATK may be more suited to wide and deep immersive sounds where more focussed, narrow sounds may be better located by the listener with VBAP.

Reverberation

Reverberation is performed either using a B-format tail room impulse responses (RIRs) or by using reverberators crated with SuperCollider's AllpassC and FreeVerb ugens. With both options, two reverberation level controls are included in the GUI for setting close and distant levels. "Close" reverberation in this case is "global" and is audible by the listener from all directions when the source is close. As it is global, it's type is applied to the entire scene. "Distant" reverb on the other hand is "local" in scope and selected and applied on a per-source basis. It is processed by the individually selected spatialiser along with the dry signal. This effect predominates as the source becomes more distant. For ambisonic signals, the "Close" reverberation may be described as a "2nd order diffuse A-format reverberation". This technique produces reverberation weighted in the direction of sound events and involves conversion to and from A-format in order to apply the effect (ANDERSON). The encoded 2nd order ambisonic signal is converted to a 12-channel A-format signal and then either:

  • convolved with a B-format RIR which has been "upsampled" to 2nd order and converted to A-format impulse spectrum
  • passed through Freeverb or allpass ugens before being converted back to a 2nd order B-format diffuse signal

For non-ambisonic signals, spatialised with VBAP, a part of the original source signal is mixed with the W component of the B-format reverb input for an omnidirectional effect. These options are drawing from John Chowning's technique of applying "local" and "global" reverberation to sources (CHOWNING)

note

Please remember that this diffuse reverberation process, especially with large impulse responses, may require the user to increase the audio buffer size, thus adding more latency.

Additional Features

Additional features include a scalable Doppler Effect on moving sources, the looping of sources loaded or streamed from file and the adjustment of the virtual loudspeaker angle for stereo sources. Further, a "contraction" control enables crossfades between B-format signals and their raw W component. In the case B-format input signals the contraction changes the sound from having omnidirectional characteristics to becoming a focussed point source. When using the ATK in the case as mono or stereo input sources (the latter of which are treated as two mono sources with adjustable angle from one another) with the ATK, a de-contraction of the focussed source will render it omnidirectional.

Mosca supports methods for making "A-format inserts" on any source spatialised in the GUI. In this way, the user may write a filtering synth and apply it to the sound without disrupting the encoded spatial characteristics. Please see the guide for examples.

Additionally, Mosca v0.2 implements headtracking with the Arduino 9-axes Motion Shield and an appropriate Arduino board such as an Uno.

Simple Arduino Headtracker

Mosca may also run GUI-free and has a mechanism for coded control of the interface (Setup example in the guide.

Tips to install from scratch

If you are a linux user on a debian like distro, this script can help you build supercollider and it's plugins from source, and install atk kernels and matrices, among many other things.

For Mac or PC, first install git with a binary installer if you are not confortable with the comand line.

Secondly, install supercollider.

Start supercollider (scide), open the "Language" tab and click on "Quarks"

Find the "Mosca" quark in the list and select it, this is where you can find ou if git was installed corectly:
Check Supercollider's "Post window" for errors.
If evrything installs correctly, great ! continue on.
If the post window displays error messages, continue on and apply the Workaround.

Enter the folowing line in supercerllodier and evaluate it to open the extension folder. Platform.userExtensionDir.openOS

Download the sc3-Plugins and decompress them in the extension folder previously opened.

workaround (only if errors occured with quarks and git isn't properly installed)
Return to the extension folder previously opened to decompress the sc3-Plugins. Download the folowing repositories with these links:
Mosca
MathLib
Automation
atk-sc3
SignalBox
SphericalDesign
SC-HOA
OSSIA
Decompress all of them in the same extension directoy as the sc3-Plugins

Next, in the code editor of supercollider, recompile the Class Library wih the keyboard shortcut Ctl+Maj+L (on Mac use Command instead of Ctl) This is a very useful shortcut that alows you to fully reinitialize you session, I recomend remebering it !

Finaly, evaluate the folowing code to download the ATK kernels and matrices. ( Atk.downloadKernels; Atk.downloadMatrices; ) workaround (only if the download fails) the folowing code creates and opens the ATK support Directory. ATK Kernels and ATK Matrices both need to be downloaded and decompressed in this support Directory ( Atk.createUserSupportDir; Atk.openUserSupportDir; )

Acknowledgments

The class makes extensive use of the Ambisonic Toolkit (ATK) by Joseph Anderson as well as Florian Grond's SC-HOA, based on Ambitools by Pierre Lecompte, the faust version of the HoaLibrary by Pierre Guillot, the AmbiDecoderToolbox and sevral other supercollider pluggins for spatial renderding. Augmented controll has been granted by the integrating the Automation quark by Neels Hofmeyr and ossia-sclang, made possible by Pierre Cochard, Jean-Michaël Celerier and the OSSIA Team.

Many thanks to Joseph Anderson, Neels Hofmeyr and members of the SuperCollider list for their assistance and valuable suggestions.

References

ATKBaseDef
Project
Source file
Extension
Superclass:
SpatDef
ATKDef
Project
Source file
Extension
Superclass:
ATKBaseDef
ATKDfDef
Project
Source file
Extension
Superclass:
ATKBaseDef
ATKSpDef
Project
Source file
Extension
Superclass:
ATKBaseDef
AllPassDef
Extension
Superclass:
EffectDef
AutomationBase
Extension
Superclass:
AutomationProxy
Extension
Superclass:
AutomationBase
BFFMHDef
Project
Source file
Extension
Superclass:
FumaDef
ClearDef
Extension
Superclass:
EffectDef
ConvolutionDef
Extension
Superclass:
EffectDef
EffectDef
Extension
Superclass:
MoscaPlugin
FreeVerbDef
Extension
Superclass:
EffectDef
FumaDef
Project
Source file
Extension
Superclass:
SpatDef
HeadTracker
Project
Source file
Extension
Superclass:
HeadTrackerGPS
Project
Source file
Extension
Superclass:
HeadTracker
IrDef
Project
Source file
Extension
Superclass:
JOSHDef
Project
Source file
Extension
Superclass:
FumaDef
Mosca
Project
Source file
Extension
Superclass:
MoscaBase
MoscaEffects
Project
Source file
Extension
Superclass:
MoscaGUI
Project
Source file
Extension
Superclass:
MoscaPlugin
Project
Source file
Extension
Superclass:
MoscaRenderer
Project
Source file
Extension
Superclass:
MoscaSource[]
Project
Source file
Extension
Superclass:
MoscaSpatializer
Project
Source file
Extension
Superclass:
NonAmbiDef
Extension
Superclass:
SpatDef
OssiaAutomationCenter
Extension
Superclass:
OssiaAutomationCoordinates
Extension
Superclass:
OssiaAutomationProxy
Extension
Superclass:
AutomationBase
PozyxOSC
Project
Source file
Extension
Superclass:
RTKGPS
Project
Source file
Extension
Superclass:
HeadTrackerGPS
SpatDef
Project
Source file
Extension
Superclass:
MoscaPlugin
VBAPDef
Project
Source file
Extension
Superclass:
NonAmbiDef
v0.5.1
Date
2023-03-03
Git hash
31abbb4640891b35ae70df52782fc798e4e25c96
v0.5
Date
2022-12-06
Git hash
ecb2c51eb0676a37cd4aba7a90a0961344cbabe5
v0.4.5
Date
2021-03-29
Git hash
9c17764f483cc5f9dc3ac8f7ea74e8142b99ffc7
v0.4.4
Date
2021-03-21
Git hash
168ea6be1197af9722baea84dba9506e994993c0
v0.4
Date
2020-11-22
Git hash
689bc07d8f078c73c9fbdf7d92e950557b129dfa
v0.3
Date
2020-04-29
Git hash
5729771b98675cd4126643ffac1b6bf062fb600a
v0.21
Date
2018-02-15
Git hash
2ab2a5c884084ff5cbc4e0a8bfff374f50e77ca0
v0.2
Date
2018-02-12
Git hash
4e34413846cff03a22464f8548c68d35f745dbd0
v0.1
Date
2016-11-04
Git hash
56cee543940a7fe9a5921f141c619fda3d780c4a

Installation

Repository

URL

https://github.com/escuta/mosca

Since

2016-09-18

Last update

2024-05-02

Current version

v0.5.1

Quark info

url

http://github.com/escuta/mosca

name

Mosca

path

Mosca

since

2016

author

mott@escuta.org tibthejazzdude@gmail.com

summary

GUI-assisted authoring of dynamic 3D sound fields

version

0.5.1

copyright

Iain Mott and Thibaud Keller 2016-23

dependencies

['MathLib', 'Automation', 'atk-sc3', 'SC-HOA', 'OSSIA']

Possible dependcies

Automation

MathLib

MathLibTests

OSSIA

SC-HOA

atk-sc3

Possible dependants