spessasynth_core 1.0.9 → 1.0.10
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 +2 -1
- package/package.json +1 -1
- package/spessasynth_core/sequencer/sequencer.js +13 -0
package/README.md
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
A SoundFont2 synthesizer library, made for use with node.js.
|
|
3
3
|
A fork of [SpessaSynth](https://github.com/spessasus/SpessaSynth).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[Jump to documentation](#api-reference)
|
|
6
6
|
|
|
7
|
+
`npm install --save spessasynth_core`
|
|
7
8
|
|
|
8
9
|
> Looking for a browser version? Try [SpessaSynth](https://github.com/spessasus/SpessaSynth).
|
|
9
10
|
|
package/package.json
CHANGED
|
@@ -90,6 +90,10 @@ class Sequencer
|
|
|
90
90
|
this.currentTime = time;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* The current playback time, in seconds
|
|
95
|
+
* @return {number}
|
|
96
|
+
*/
|
|
93
97
|
get currentTime()
|
|
94
98
|
{
|
|
95
99
|
// return the paused time if it's set to something other than undefined
|
|
@@ -148,6 +152,15 @@ class Sequencer
|
|
|
148
152
|
this.synth.stopAllChannels();
|
|
149
153
|
}
|
|
150
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Total track length, in seconds.
|
|
157
|
+
* @return {number}
|
|
158
|
+
*/
|
|
159
|
+
get duration()
|
|
160
|
+
{
|
|
161
|
+
return this.midiData.duration;
|
|
162
|
+
}
|
|
163
|
+
|
|
151
164
|
_resetTimers()
|
|
152
165
|
{
|
|
153
166
|
this.playedTime = 0
|