@ircam/comote-helpers 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +45 -0
- package/README.md +53 -50
- package/package.json +2 -2
- package/qrcode.js +1 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Zip and release Max package on new version
|
|
2
|
+
|
|
3
|
+
name: CI
|
|
4
|
+
|
|
5
|
+
# Controls when the action will run.
|
|
6
|
+
on:
|
|
7
|
+
# Triggers the workflow on push or pull request events but only for the master branch
|
|
8
|
+
push:
|
|
9
|
+
# Sequence of patterns matched against refs/tags
|
|
10
|
+
tags:
|
|
11
|
+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
12
|
+
|
|
13
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
name: Upload Release Asset
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout code
|
|
22
|
+
uses: actions/checkout@v2
|
|
23
|
+
- name: Build project # This would actually build your project, using zip for an example artifact
|
|
24
|
+
run: |
|
|
25
|
+
(cd max && zip -r - CoMo.te) > CoMo.te.zip
|
|
26
|
+
- name: Create Release
|
|
27
|
+
id: create_release
|
|
28
|
+
uses: actions/create-release@v1
|
|
29
|
+
env:
|
|
30
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
with:
|
|
32
|
+
tag_name: ${{ github.ref }}
|
|
33
|
+
release_name: Release ${{ github.ref }}
|
|
34
|
+
draft: false
|
|
35
|
+
prerelease: false
|
|
36
|
+
- name: Upload Release Asset
|
|
37
|
+
id: upload-release-asset
|
|
38
|
+
uses: actions/upload-release-asset@v1
|
|
39
|
+
env:
|
|
40
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
41
|
+
with:
|
|
42
|
+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
43
|
+
asset_path: ./CoMo.te.zip
|
|
44
|
+
asset_name: CoMo.te.zip
|
|
45
|
+
asset_content_type: application/zip
|
package/README.md
CHANGED
|
@@ -1,39 +1,58 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `CoMo.te helpers`
|
|
2
2
|
|
|
3
3
|
> Javascript and Max/MSP utilities to create applications compatible with iPhone
|
|
4
|
-
> and Android `CoMo.te` application.
|
|
4
|
+
> and Android `CoMo.te` application, cf. [https://ismm-apps.ircam.fr/comote](https://ismm-apps.ircam.fr/comote).
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
The CoMo.te application (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.
|
|
8
|
+
|
|
9
|
+
CoMo.te is especially designed for the CoMo applications family that enables real-time interaction between gestures/movements and sounds. Nevertheless, the CoMo.te application can be used with any software that makes use of the OSC protocol.
|
|
10
|
+
|
|
11
|
+
Among the CoMo applications that make use of CoMo.te are CoMo-Vox to learn and train conducting gestures, and CoMo-Elements to interact collectively thought body movements with recorded sounds.
|
|
12
|
+
|
|
13
|
+
CoMo.te and the CoMo applications are software designed and developed by IRCAM in the Sound-Music-Movement-Interaction team (UMR STMS).
|
|
14
|
+
|
|
15
|
+
This repository provides utilities to help to generate the QRCode in the target application both for Max/MSP and Node.js.
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
|
|
6
19
|
## Table of Contents
|
|
7
20
|
|
|
8
21
|
<!-- toc -->
|
|
9
22
|
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
12
|
-
* [
|
|
13
|
-
* [
|
|
14
|
-
* [Typedefs](#typedefs)
|
|
15
|
-
* [getWifiInfos() ⇒ WiFiInfos \| null](#getwifiinfos-%E2%87%92-wifiinfos--null)
|
|
16
|
-
* [rawLink()](#rawlink)
|
|
17
|
-
* [terminal(config)](#terminalconfig)
|
|
18
|
-
* [dataURL(config)](#dataurlconfig)
|
|
19
|
-
* [WifiInfos : Object](#wifiinfos--object)
|
|
20
|
-
* [CoMoteConfig : Object](#comoteconfig--object)
|
|
21
|
-
* [CoMoteTarget : Object](#comotetarget--object)
|
|
23
|
+
- [Max/MSP](#maxmsp)
|
|
24
|
+
- [JS](#js)
|
|
25
|
+
* [Node.js](#nodejs)
|
|
26
|
+
* [API](#api)
|
|
22
27
|
- [License](#license)
|
|
23
28
|
|
|
24
29
|
<!-- tocstop -->
|
|
25
30
|
|
|
26
|
-
##
|
|
31
|
+
## Max/MSP
|
|
32
|
+
|
|
33
|
+
Download the Max abstraction (i.e. CoMo.te.zip) from the lastest release in the releases page: https://github.com/ircam-ismm/comote-helpers/releases
|
|
34
|
+
Unzip the package and copy the resulting directory in `~/Documents/Max 8/Packages`
|
|
35
|
+
|
|
36
|
+
For now, the package only provide abstraction `[comote.connect]` that allows you to generate a QRCode that can be
|
|
37
|
+
flashed within the CoMo.te application to configure the OSC stream.
|
|
38
|
+
|
|
39
|
+
You can find more informations in the Helper patch: `~/Document/Max 8/Packages/CoMo.te/extras/CoMo.te.maxpat`
|
|
40
|
+
|
|
41
|
+
This version requires Max 7.1 or higher.
|
|
42
|
+
|
|
43
|
+
## JS
|
|
44
|
+
|
|
45
|
+
### Node.js
|
|
27
46
|
|
|
28
47
|
```sh
|
|
29
48
|
npm install --save @ircam/comote-helpers
|
|
30
49
|
```
|
|
31
50
|
|
|
32
|
-
|
|
51
|
+
### API
|
|
33
52
|
|
|
34
53
|
<!-- api -->
|
|
35
54
|
|
|
36
|
-
|
|
55
|
+
#### Classes
|
|
37
56
|
|
|
38
57
|
<dl>
|
|
39
58
|
<dt><a href="#Server">Server</a></dt>
|
|
@@ -41,13 +60,9 @@ npm install --save @ircam/comote-helpers
|
|
|
41
60
|
</dd>
|
|
42
61
|
</dl>
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
#### Functions
|
|
45
64
|
|
|
46
65
|
<dl>
|
|
47
|
-
<dt><a href="#getWifiInfos">getWifiInfos()</a> ⇒ <code>WiFiInfos</code> | <code>null</code></dt>
|
|
48
|
-
<dd><p>Retrieve the SSID and related IP of the first WiFi connection found, return
|
|
49
|
-
<code>null</code> if no WiFi connection found.</p>
|
|
50
|
-
</dd>
|
|
51
66
|
<dt><a href="#rawLink">rawLink()</a></dt>
|
|
52
67
|
<dd><p>Return the link to be encoded in the QRCode accroding to given <code>CoMoteConfig</code></p>
|
|
53
68
|
</dd>
|
|
@@ -59,33 +74,24 @@ npm install --save @ircam/comote-helpers
|
|
|
59
74
|
</dd>
|
|
60
75
|
</dl>
|
|
61
76
|
|
|
62
|
-
|
|
77
|
+
#### Typedefs
|
|
63
78
|
|
|
64
79
|
<dl>
|
|
65
|
-
<dt><a href="#WifiInfos">WifiInfos</a> : <code>Object</code></dt>
|
|
66
|
-
<dd></dd>
|
|
67
80
|
<dt><a href="#CoMoteConfig">CoMoteConfig</a> : <code>Object</code></dt>
|
|
68
81
|
<dd></dd>
|
|
69
82
|
<dt><a href="#CoMoteTarget">CoMoteTarget</a> : <code>Object</code></dt>
|
|
70
83
|
<dd></dd>
|
|
71
84
|
</dl>
|
|
72
85
|
|
|
73
|
-
<a name="getWifiInfos"></a>
|
|
74
|
-
|
|
75
|
-
### getWifiInfos() ⇒ <code>WiFiInfos</code> \| <code>null</code>
|
|
76
|
-
Retrieve the SSID and related IP of the first WiFi connection found, return
|
|
77
|
-
`null` if no WiFi connection found.
|
|
78
|
-
|
|
79
|
-
**Kind**: global function
|
|
80
86
|
<a name="rawLink"></a>
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
#### rawLink()
|
|
83
89
|
Return the link to be encoded in the QRCode accroding to given `CoMoteConfig`
|
|
84
90
|
|
|
85
91
|
**Kind**: global function
|
|
86
92
|
<a name="terminal"></a>
|
|
87
93
|
|
|
88
|
-
|
|
94
|
+
#### terminal(config)
|
|
89
95
|
Create a qrcode to be logged in terminal according to given `CoMoteConfig``
|
|
90
96
|
|
|
91
97
|
**Kind**: global function
|
|
@@ -96,11 +102,11 @@ Create a qrcode to be logged in terminal according to given `CoMoteConfig``
|
|
|
96
102
|
|
|
97
103
|
**Example**
|
|
98
104
|
```js
|
|
99
|
-
console(CoMoteQRCode.terminal(config));
|
|
105
|
+
console(await CoMoteQRCode.terminal(config));
|
|
100
106
|
```
|
|
101
107
|
<a name="dataURL"></a>
|
|
102
108
|
|
|
103
|
-
|
|
109
|
+
#### dataURL(config)
|
|
104
110
|
Create a qrcode to be used as in Image source according to given `CoMoteConfig``
|
|
105
111
|
|
|
106
112
|
**Kind**: global function
|
|
@@ -111,22 +117,13 @@ Create a qrcode to be used as in Image source according to given `CoMoteConfig``
|
|
|
111
117
|
|
|
112
118
|
**Example**
|
|
113
119
|
```js
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
<a name="WifiInfos"></a>
|
|
117
|
-
|
|
118
|
-
### WifiInfos : <code>Object</code>
|
|
119
|
-
**Kind**: global typedef
|
|
120
|
-
**Properties**
|
|
121
|
-
|
|
122
|
-
| Name | Type | Description |
|
|
123
|
-
| --- | --- | --- |
|
|
124
|
-
| ssid | <code>number</code> | SSID of the WiFi connection |
|
|
125
|
-
| ip | <code>number</code> | Related IP (IPV4) |
|
|
120
|
+
const qrCode = await CoMoteQRCode.dataURL(config));
|
|
126
121
|
|
|
122
|
+
<img src="${qrCode}" />
|
|
123
|
+
```
|
|
127
124
|
<a name="CoMoteConfig"></a>
|
|
128
125
|
|
|
129
|
-
|
|
126
|
+
#### CoMoteConfig : <code>Object</code>
|
|
130
127
|
**Kind**: global typedef
|
|
131
128
|
**Properties**
|
|
132
129
|
|
|
@@ -139,7 +136,7 @@ Create a qrcode to be used as in Image source according to given `CoMoteConfig``
|
|
|
139
136
|
|
|
140
137
|
<a name="CoMoteTarget"></a>
|
|
141
138
|
|
|
142
|
-
|
|
139
|
+
#### CoMoteTarget : <code>Object</code>
|
|
143
140
|
**Kind**: global typedef
|
|
144
141
|
**Properties**
|
|
145
142
|
|
|
@@ -152,6 +149,12 @@ Create a qrcode to be used as in Image source according to given `CoMoteConfig``
|
|
|
152
149
|
|
|
153
150
|
<!-- apistop -->
|
|
154
151
|
|
|
152
|
+
## Credits
|
|
153
|
+
|
|
154
|
+
CoMo.te 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.
|
|
155
|
+
|
|
156
|
+
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.
|
|
157
|
+
|
|
155
158
|
## License
|
|
156
159
|
|
|
157
160
|
BSD-3-Clause
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ircam/comote-helpers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Server component & utilities for the CoMo.te application",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Benjamin.Matuszewski@ircam.fr",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"api": "jsdoc-to-readme --src src/server.js src/qrcode.js",
|
|
18
|
+
"api": "jsdoc-to-readme --src src/server.js src/qrcode.js --heading-depth 4",
|
|
19
19
|
"build": "npm run clean && babel src --out-dir .",
|
|
20
20
|
"clean": "rm -f server.js qrcode.js",
|
|
21
21
|
"dev": "npm run build && chokidar src -c \"npm run build\"",
|
package/qrcode.js
CHANGED