Skip to content

ircam-ismm/comote-helpers

Repository files navigation

CoMote helpers

Javascript and Max/MSP utilities to create applications compatible with iPhone and Android CoMote application, cf. https://ismm-apps.ircam.fr/comote.

CoMote

The CoMote application (for iOS and Android) allows for streaming motion data (accelerometer, gyroscope) from the smartphone to desktop applications using either the OSC or WebSockets protocols. The network's setup is facilitated by the use of a QR code generated by the targeted remote application receiving the motion sensor data.

CoMote is especially designed for the CoMo applications family that enables real-time interaction between gestures/movements and sounds. Nevertheless, the CoMote application can be used with any software that makes use of the OSC protocol.

Among the CoMo applications that make use of CoMote are CoMo-Vox to learn and train conducting gestures, and CoMo-Elements to interact collectively thought body movements with recorded sounds.

CoMote and the CoMo applications are software designed and developed by IRCAM in the Sound-Music-Movement-Interaction team (UMR STMS).

This repository provides utilities to help to generate the QRCode in the target application both for Max/MSP and Node.js.

Table of Contents

Max/MSP

Download the Max abstraction (i.e. CoMote.zip) from the latest release in the releases page: https://github.com/ircam-ismm/comote-helpers/releases Unzip the package and copy the resulting directory in ~/Documents/Max 8/Packages

For now, the package only provide abstraction [comote.connect] that allows you to generate a QRCode that can be flashed within the CoMote application to configure the OSC stream.

You can find more information in the Helper patch: ~/Document/Max 8/Packages/CoMote/extras/CoMote.maxpat

This version requires Max 7.1 or higher.

JS

Node.js

npm install --save @ircam/comote-helpers

API

Classes

Server

Launch WebSocket and/or OSC server according to given CoMoteConfig object

Functions

rawLink()

Return the link to be encoded in the QRCode accroding to given CoMoteConfig

terminal(config)

Create a qrcode to be logged in terminal according to given `CoMoteConfig``

dataURL(config)

Create a qrcode to be used as in Image source according to given `CoMoteConfig``

Typedefs

CoMoteConfig : Object
CoMoteTarget : Object

rawLink()

Return the link to be encoded in the QRCode accroding to given CoMoteConfig

Kind: global function

terminal(config)

Create a qrcode to be logged in terminal according to given `CoMoteConfig``

Kind: global function

Param Type
config CoMoteConfig

Example

console(await CoMoteQRCode.terminal(config));

dataURL(config)

Create a qrcode to be used as in Image source according to given `CoMoteConfig``

Kind: global function

Param Type
config CoMoteConfig

Example

const qrCode = await CoMoteQRCode.dataURL(config);

<img src="${qrCode}" />

CoMoteConfig : Object

Kind: global typedef
Properties

Name Type Description
id String id of the client CoMote
interval Number period in ms of the sensors for the client CoMote
osc CoMoteTarget OSC configuration
ws CoMoteTarget WebSocket configuration

CoMoteTarget : Object

Kind: global typedef
Properties

Name Type Description
hostname String hostname or ip of the WebSocket or OSC server
port Number listening port of the of the WebSocket or OSC server
autostart Boolean enable streaming on CoMote application

Credits

CoMote is developed by Ircam and the Music and Sound Science and Technology Joint Research Unit (STMS), supported by Ircam, CNRS, the French Ministry of Culture and Sorbonne University.

Produced with the support of the French Ministry of Education, Youth and Sports (Edu-up system), the National Research Agency (ELEMENT project), and in partnership with Radio France.

License

BSD-3-Clause