kordweb 0.6.1 → 0.7.0

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
@@ -19,24 +19,24 @@ A music theory binary and library for Rust / JS (via WASM) ([capability playgrou
19
19
  Windows:
20
20
 
21
21
  ```powershell
22
- iwr https://github.com/twitchax/kord/releases/latest/download/kord_x86_64-pc-windows-gnu.zip
23
- Expand-Archive kord_x86_64-pc-windows-gnu.zip -DestinationPath C:\Users\%USERNAME%\AppData\Local\Programs\kord
22
+ $ iwr https://github.com/twitchax/kord/releases/latest/download/kord_x86_64-pc-windows-gnu.zip
23
+ $ Expand-Archive kord_x86_64-pc-windows-gnu.zip -DestinationPath C:\Users\%USERNAME%\AppData\Local\Programs\kord
24
24
  ```
25
25
 
26
26
  Mac OS (Apple Silicon):
27
27
 
28
28
  ```bash
29
- curl -LO https://github.com/twitchax/kord/releases/latest/download/kord_aarch64-apple-darwin.zip
30
- unzip kord_aarch64-apple-darwin.zip -d /usr/local/bin
31
- chmod a+x /usr/local/bin/kord
29
+ $ curl -LO https://github.com/twitchax/kord/releases/latest/download/kord_aarch64-apple-darwin.zip
30
+ $ unzip kord_aarch64-apple-darwin.zip -d /usr/local/bin
31
+ $ chmod a+x /usr/local/bin/kord
32
32
  ```
33
33
 
34
34
  Linux:
35
35
 
36
36
  ```bash
37
- curl -LO https://github.com/twitchax/kord/releases/latest/download/kord_x86_64-unknown-linux-gnu.zip
38
- unzip kord_x86_64-unknown-linux-gnu.zip -d /usr/local/bin
39
- chmod a+x /usr/local/bin/kord
37
+ $ curl -LO https://github.com/twitchax/kord/releases/latest/download/kord_x86_64-unknown-linux-gnu.zip
38
+ $ unzip kord_x86_64-unknown-linux-gnu.zip -d /usr/local/bin
39
+ $ chmod a+x /usr/local/bin/kord
40
40
  ```
41
41
 
42
42
  Cargo:
@@ -51,6 +51,20 @@ NPM:
51
51
  $ npm install --save kordweb
52
52
  ```
53
53
 
54
+ ### Wasmer
55
+
56
+ This has a reduced capability set (no audio input / output), but works well for some of the core use cases.
57
+
58
+ ```bash
59
+ $ wasmer install twitchax/kord
60
+ ```
61
+
62
+ Alternatively, you can use `wasmer run`.
63
+
64
+ ```bash
65
+ $ wasmer run twitchax/kord -- describe Am7
66
+ ```
67
+
54
68
  ### Help Docs
55
69
 
56
70
  ```bash
package/klib.d.ts CHANGED
@@ -54,6 +54,59 @@ export enum KordModifier {
54
54
  Diminished = 11,
55
55
  }
56
56
  /**
57
+ * An enum representing the extension of a chord.
58
+ *
59
+ * Extensions are not really "special" in the sense that they do not change how the
60
+ * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
61
+ * and the chord is still interpreted as a major chord.
62
+ */
63
+ export enum KordExtension {
64
+ /**
65
+ * Sus2 extension.
66
+ */
67
+ Sus2 = 0,
68
+ /**
69
+ * Sus4 extension.
70
+ */
71
+ Sus4 = 1,
72
+ /**
73
+ * Flat 11 extension.
74
+ */
75
+ Flat11 = 2,
76
+ /**
77
+ * Flat 13 extension.
78
+ */
79
+ Flat13 = 3,
80
+ /**
81
+ * Sharp 13 extension.
82
+ */
83
+ Sharp13 = 4,
84
+ /**
85
+ * Add2 extension.
86
+ */
87
+ Add2 = 5,
88
+ /**
89
+ * Add4 extension.
90
+ */
91
+ Add4 = 6,
92
+ /**
93
+ * Add6 extension.
94
+ */
95
+ Add6 = 7,
96
+ /**
97
+ * Add9 extension.
98
+ */
99
+ Add9 = 8,
100
+ /**
101
+ * Add11 extension.
102
+ */
103
+ Add11 = 9,
104
+ /**
105
+ * Add13 extension.
106
+ */
107
+ Add13 = 10,
108
+ }
109
+ /**
57
110
  * An enum representing the interval between two notes.
58
111
  */
59
112
  export enum KordInterval {
@@ -251,59 +304,6 @@ export enum KordInterval {
251
304
  ThreePerfectOctavesAndMajorSeventh = 47,
252
305
  }
253
306
  /**
254
- * An enum representing the extension of a chord.
255
- *
256
- * Extensions are not really "special" in the sense that they do not change how the
257
- * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
258
- * and the chord is still interpreted as a major chord.
259
- */
260
- export enum KordExtension {
261
- /**
262
- * Sus2 extension.
263
- */
264
- Sus2 = 0,
265
- /**
266
- * Sus4 extension.
267
- */
268
- Sus4 = 1,
269
- /**
270
- * Flat 11 extension.
271
- */
272
- Flat11 = 2,
273
- /**
274
- * Flat 13 extension.
275
- */
276
- Flat13 = 3,
277
- /**
278
- * Sharp 13 extension.
279
- */
280
- Sharp13 = 4,
281
- /**
282
- * Add2 extension.
283
- */
284
- Add2 = 5,
285
- /**
286
- * Add4 extension.
287
- */
288
- Add4 = 6,
289
- /**
290
- * Add6 extension.
291
- */
292
- Add6 = 7,
293
- /**
294
- * Add9 extension.
295
- */
296
- Add9 = 8,
297
- /**
298
- * Add11 extension.
299
- */
300
- Add11 = 9,
301
- /**
302
- * Add13 extension.
303
- */
304
- Add13 = 10,
305
- }
306
- /**
307
307
  * The [`Chord`] wrapper.
308
308
  */
309
309
  export class KordChord {
@@ -614,22 +614,22 @@ export class KordNote {
614
614
  frequency(): number;
615
615
  /**
616
616
  * Adds the given interval to the [`Note`], producing a new [`Note`] instance.
617
- * @param {number} interval
617
+ * @param {KordInterval} interval
618
618
  * @returns {KordNote}
619
619
  */
620
- addInterval(interval: number): KordNote;
620
+ addInterval(interval: KordInterval): KordNote;
621
621
  /**
622
622
  * Subtracts the given interval from the [`Note`], producing a new [`Note`] instance.
623
- * @param {number} interval
623
+ * @param {KordInterval} interval
624
624
  * @returns {KordNote}
625
625
  */
626
- subInterval(interval: number): KordNote;
626
+ subInterval(interval: KordInterval): KordNote;
627
627
  /**
628
628
  * Computes the [`Interval`] distance between the [`Note`] and the given [`Note`].
629
629
  * @param {KordNote} other
630
- * @returns {number}
630
+ * @returns {KordInterval}
631
631
  */
632
- distanceTo(other: KordNote): number;
632
+ distanceTo(other: KordNote): KordInterval;
633
633
  /**
634
634
  * Returns the primary (first 13) harmonic series of the [`Note`].
635
635
  * @returns {Array<any>}