@grame/faust-web-component 0.2.4 → 0.2.6

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/README.md CHANGED
@@ -22,6 +22,8 @@ This will generate `dist/faust-web-component.js`, which you can use with a `<scr
22
22
 
23
23
  ## Example Usage
24
24
 
25
+ The editor and widget components can be used with the following HTML syntax:
26
+
25
27
  ```html
26
28
  <p><em>Here's an embedded editor!</em></p>
27
29
 
@@ -51,9 +53,30 @@ process = no.noise : fi.resonlp(ctFreq,q,gain)*t <: dm.zita_light;
51
53
  <script src="faust-web-component.js"></script>
52
54
  ```
53
55
 
56
+ ### Polyphonic mode
57
+
58
+ The `declare options "[midi:on][nvoices:n]";` [coding convention](https://faustdoc.grame.fr/manual/midi/#configuring-and-activating-polyphony) can be used in the DSP code to activate MIDI and polyphonic mode, so for instance:
59
+
60
+ ```html
61
+ <faust-widget>
62
+ <!--
63
+ import("stdfaust.lib");
64
+ declare options "[midi:on][nvoices:16]";
65
+
66
+ process = pm.clarinet_ui_MIDI <: _,_;
67
+
68
+ effect = dm.freeverb_demo;
69
+ -->
70
+ </faust-widget>
71
+
72
+ <script src="faust-web-component.js"></script>
73
+ ```
74
+
75
+ to get a polyphonic clarinet instrument with 16 voices and a global reverb effect.
76
+
54
77
  ## NPM package
55
78
 
56
- A [npm package](https://www.npmjs.com/package/@grame/faust-web-component) can be used with the CDN link: https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.2.3/dist/faust-web-component.js (possibly update the version number).
79
+ A [npm package](https://www.npmjs.com/package/@grame/faust-web-component) can be used with the CDN link: https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.2.6/dist/faust-web-component.js (possibly update the version number).
57
80
 
58
81
  Here is an HTML example using this model:
59
82
 
@@ -72,7 +95,7 @@ process = vgroup("Oscillator", os.osc(freq1) * vol, os.osc(freq2) * vol);
72
95
  -->
73
96
  </faust-editor>
74
97
 
75
- <script src="https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.2.3/dist/faust-web-component.js"></script>
98
+ <script src="https://cdn.jsdelivr.net/npm/@grame/faust-web-component@0.2.6/dist/faust-web-component.js"></script>
76
99
  ```
77
100
 
78
101
  ## Demo
@@ -81,7 +104,8 @@ A concrete use-case can be seen in the this [updated version](https://ijc8.me/fa
81
104
 
82
105
  ## TODO
83
106
 
84
- Several steps needs to be done before official release:
107
+ Possible improvements:
85
108
 
86
109
  - audio input via file (including some stock signals)
110
+
87
111
  - greater configurability via HTML attributes