tambien
9178798993
computed duration can be longer than the buffer length
...
because of playback rate changes, the duration can be longer than the buffer duration.
fixes #375
2018-12-23 13:50:02 -05:00
tambien
3d1202043a
all modules are relative paths
...
simplifies deep references to individual files
2018-08-26 22:29:17 -04:00
Yotam Mann
405a841db0
stop method is beginning of fadeOut curve instead of end
...
simplifies code
fixes #328
2018-06-20 14:55:43 -04:00
Charles Holbrow
51ac1a2100
Sampler Instrument can play entire sample, even when pitch shifting down. ( #335 )
...
* Sampler instrument does not truncate playback when pitch shifting down
* `BufferSource.start` defaults to playing the entire buffer, respects `this.playbackRate`
Previously, the Buffer would truncate the sample when `playbackRage` is less than 1.
Within the `start` method, this commit also tightens the scope of `var computedDur`, so
that it is accessible only where it is used.
2018-04-25 14:27:50 -04:00
Yotam Mann
103f01bdc7
getState at time, does not throw error if already stopped
2018-03-05 22:25:12 -05:00
Yotam Mann
a80ae0656b
Tone.isDefined replaces !Tone.isUndef
2018-03-05 11:32:08 -05:00
Yotam Mann
3d0a8005b7
removing isPast warning
...
clutters up tests, rarely helpful for debugging
2018-03-01 14:38:40 -05:00
Yotam Mann
40530e3c16
'stop' is invoked on the last scheduled stop value
2018-03-01 14:02:11 -05:00
Yotam Mann
177130ec36
BufferSourceNode shim for OfflineAudioContext on iOS
...
addresses #237
2018-01-21 22:33:02 -05:00
Yotam Mann
87217d1ab4
does not invoke stop
from start
in case playbackRate changes
...
fixes #292
2018-01-17 13:18:51 -05:00
Yotam Mann
dded291a25
linting
2018-01-02 10:37:27 -05:00
Yotam Mann
8ed7a87b45
correcting spelling
2017-12-29 20:44:16 -05:00
Yotam Mann
5ba49351d9
additional safety flag for if the internal BufferSourceNode is actually started
...
checking if the offset < duration keeps safari from going into invalid
state
2017-12-28 18:43:53 -05:00
Yotam Mann
9400091609
modulus the offset by the duration in case the offset > duration
2017-10-25 23:05:30 -04:00
Yotam Mann
cb2a982c39
linting
2017-10-21 19:02:46 -04:00
Yotam Mann
6d38440379
using exponentialApproachValueAtTime
2017-09-20 19:04:49 -04:00
Yotam Mann
4abe8a78cf
stop the source to allow for garbage collection
2017-09-19 22:45:40 -04:00
Yotam Mann
39389e810c
warning if scheduling time is in the past
...
addresses #260
2017-09-15 17:50:12 -04:00
Yotam Mann
33e7bd0c13
adding "curve" to BufferSource fades
2017-09-13 18:30:43 -04:00
Yotam Mann
e6faa39dba
classes which generate or process sound extend Tone.AudioNode
2017-08-27 17:50:31 -04:00
Yotam Mann
2de449b74c
fadeOut is subtracted from end of the sample
...
instead of the stop time being the beginning of the fade out.
2017-06-19 15:03:10 -04:00
Yotam Mann
2328413a8f
stops playing if invoked with 'stop' at an earlier time
...
does not stop playing if `stop` is invoked with a later time
2017-05-28 21:20:17 -04:00
Yotam Mann
54b11df1dd
simplifying BufferSource playback offset > loopEnd logic
2017-05-23 09:30:17 -04:00
Yotam Mann
488299a822
Player uses BufferSource
2017-05-02 12:15:00 -04:00
Yotam Mann
fd25ee83e0
fixing linting errors
2017-05-01 19:00:31 -04:00
Yotam Mann
b760821234
BufferSource.buffer is a Tone.Buffer
2017-05-01 18:52:53 -04:00
Yotam Mann
a5a673f6ed
scheduling the stop time at buffer.duration - offset
2017-05-01 18:00:31 -04:00
Yotam Mann
61cad0f1fc
BufferSource uses context's setTimeout method for onended
...
removed source.stop method. stopping now relies entirely on the gain
node.
fixes #230
fixes #233
2017-05-01 17:46:51 -04:00
Yotam Mann
b927395825
making defaultArg static
2017-04-30 15:03:49 -04:00
Yotam Mann
edfa168713
moving to static type queries
...
i.e. this.isString -> Tone.isString
2017-04-26 00:24:19 -04:00
Yotam Mann
2030034494
sources to new defaults
api
...
and es6 classes prep
2017-04-26 00:00:01 -04:00
Yotam Mann
10431589d2
moving shims to their respective files
...
hopefully simplifies maintenance
2017-03-13 01:12:20 -04:00
Yotam Mann
b19a2b5622
using setTimeout to trigger the onended callback
2016-12-15 12:48:06 -05:00
Yotam Mann
e19e54b072
wrapping playbackRate in Tone.Param
2016-09-22 18:36:44 -04:00
Yotam Mann
a60328345e
using Tone.Gain everywhere instead of GainNode
2016-09-19 23:53:07 -04:00
Yotam Mann
6d0565387e
only schedule the stop in a valid state
...
the playbackState API has been deprecated, but the bug still is
implemented in Safari.
2016-08-11 23:58:48 -04:00
Yotam Mann
9a74728858
no longer throws error when no buffer is set
...
just doesn’t play instead
2016-08-09 01:14:52 -04:00
Yotam Mann
49c401e6d8
calling stop when duration is given.
...
making sure to assign _startTime using it.
2016-06-17 11:32:34 -04:00
Yotam Mann
89636d40ef
ramping from current gain value
2016-06-17 10:43:06 -04:00
Yotam Mann
c70ab5d07a
using fadeOut when duration is set
2016-06-16 17:30:46 -04:00
Yotam Mann
f1e6c154e0
using linear ramping instead (sounds pretty much the same)
...
also compensating for the fade time when there is a passed in
duration.
2016-06-14 23:48:25 -04:00
Yotam Mann
ac0851b4c8
ensure onended
callback is not invoked after disposing
2016-06-14 21:08:30 -04:00
Yotam Mann
1efc061ebd
explicitly stop the AudioBufferSource when duration is given
2016-06-14 20:43:26 -04:00
Yotam Mann
e0edb67a75
Wrapper around the basic AudioBufferSourceNode
2016-06-14 19:57:46 -04:00