Commit graph

3115 commits

Author SHA1 Message Date
Yotam Mann
ad9dd643a6 fixing envelope example 2020-09-15 08:22:16 -04:00
Yotam Mann
ada9646ed7 starting Transport in Part docs
fixes #736
2020-09-09 08:51:36 -04:00
Yotam Mann
0ac1da5aa1 correctly offset phase for each oscillator
fixes #733
2020-09-07 22:14:58 -04:00
Yotam Mann
dca2e4fd2b removing unnecessary category 2020-09-07 09:12:36 -04:00
Yotam Mann
f6f164ac6d
Merge pull request #732 from marcelblum/docs-fix3
adding @category definitions for docs, fixing some typos/mistakes alo…
2020-09-07 09:10:12 -04:00
Yotam Mann
89bdaa59ec
Merge pull request #722 from Astray-git/fix/instrument_sync
fix: Instrument sync
2020-09-07 09:08:22 -04:00
Jouni Airaksinen
d5c8a25a08 Add test for duplicate events 2020-09-07 14:14:53 +03:00
Jouni Airaksinen
b5f582ee1a Reverse Emitter off callback loop for correct removal of duplicate events 2020-09-07 14:06:24 +03:00
Marcel Blum
3715149b8b un-categorizing some internal-use-only classes so they don't surface to the docs 2020-09-02 18:01:49 -04:00
Marcel Blum
0e2b5b942d adding @category definitions for docs, fixing some typos/mistakes along the way 2020-09-02 16:53:38 -04:00
Marcel Blum
5949b77e0e docs example bugfixes, typo corrections, minor additions for clarity, legacy link update 2020-09-02 00:07:45 -04:00
Astray-git
75f591a40a fix: should set _sync in this.sync 2020-08-26 16:58:14 +08:00
Yotam Mann
826a51d594 clearing the 'implicitEnd' event off the timeline
fixes #711
2020-08-22 10:13:32 -04:00
Yotam Mann
ed8bb4ddcf updating omnioscillator options 2020-08-06 12:58:02 -07:00
Yotam Mann
a58f326e41 better examples in comments 2020-08-03 18:21:17 -07:00
Yotam Mann
a25fd28328 removing toFixed since output might be array 2020-07-26 14:06:00 -07:00
Yotam Mann
6b5daa7d07 using new way to handle offline tests 2020-07-26 13:55:06 -07:00
Yotam Mann
542e8913c6 Merge branch 'master' into dev 2020-07-26 13:54:49 -07:00
Yotam Mann
d357feec24 channelCount as an input option
fixes #704
2020-07-25 18:27:50 -07:00
Jack Anderson
998592fa3e OneShotSource uses requestIdleCallback if avail
- This optimization allows the browser to tell Tone a more opportune
  time to garbage collect during onended on OneShotSource. Otherwise, the 1
  second timeout can trigger at an inopportune time.
2020-07-20 17:43:50 -07:00
Yotam Mann
e673387cbb fixing example links 2020-07-20 11:11:00 -07:00
Yotam Mann
f20d19beed updating example 2020-07-19 13:48:48 -07:00
Yotam Mann
acc23128c1 updating example links 2020-07-19 13:22:47 -07:00
Yotam Mann
5771eb4383 removing RecursiveOmit (never used)
addresses #700
2020-07-19 12:23:18 -07:00
Yotam Mann
a78fba072a make sure the defaults belong to the template 2020-07-19 12:04:03 -07:00
Yotam Mann
37c9f638de clamp the overlap range 2020-07-19 10:16:30 -07:00
Yotam Mann
6337227155 updating example using Array instead of Float32Array 2020-07-19 10:12:39 -07:00
Yotam Mann
e40cb97e43 including MonoSynth in PolySynth types 2020-07-19 10:12:26 -07:00
Yotam Mann
94c3844fe2 fixing example 2020-07-18 21:13:41 -07:00
Yotam Mann
f05775b964 correcting example 2020-07-18 17:47:07 -07:00
Yotam Mann
a9f99e8fb3 corrected fft example 2020-07-18 17:21:24 -07:00
Yotam Mann
742a965d33 fixing example 2020-07-18 10:41:36 -07:00
Yotam Mann
50d03787de correcting example 2020-07-18 08:30:00 -07:00
Yotam Mann
007cdc5a66 fixing typos and adding examples 2020-06-25 08:26:50 -07:00
Yotam Mann
1b23c84e08 adding deprecated Destination name
will reduce errors in upgrading
2020-06-25 08:26:38 -07:00
Yotam Mann
4435329b03 feat: sampler no longer quantizes to nearest semitone but can work between pitches
fixes #447
2020-06-17 17:15:56 -04:00
Yotam Mann
de95b27af0 don't clear the activeVoices array when releasing all
actives voices will be cleared on it's own

fixes #676
2020-06-17 14:08:25 -04:00
Yotam Mann
127a62da5a making example more descriptive 2020-06-17 10:31:26 -04:00
Yotam Mann
c7ac90f2f7 fixing test 2020-06-16 23:27:05 -04:00
Yotam Mann
dbed4d27fe adding note recommending Reverb over FeedbackCombFilter-based classes 2020-06-16 23:15:06 -04:00
Yotam Mann
08aa0f5419 adding getters for global singletons
addresses #679
2020-06-16 23:14:34 -04:00
Yotam Mann
69bc2bbb57 linting 2020-06-16 23:14:19 -04:00
Jack Anderson
73ba8c1138 export new BiquadFilter 2020-06-08 15:01:01 -07:00
Yotam Mann
50a888c8c0 start the source only if the transport is already past the given start time
fixes #525
2020-06-07 23:18:33 -04:00
Yotam Mann
22cecdc281 feat: adding ability to get the frequency at the FFT index
`getFrequencyOfIndex`
2020-06-07 20:46:01 -04:00
Yotam Mann
d72580cd48 removing unused variable 2020-06-07 20:42:34 -04:00
Yotam Mann
75617d341f feat: adding BiquadFilter
Simplified Filter class without the "rolloff" param

closes #686
2020-06-07 20:17:18 -04:00
Yotam Mann
fdb306bfce changed sound url 2020-06-07 20:14:58 -04:00
Yotam Mann
6ed48a9f96 updating examples 2020-06-07 20:14:48 -04:00
Yotam Mann
353ed3f28c adding more docs and examples 2020-05-26 21:09:32 -04:00
Yotam Mann
9d8bc5fe06 setting params as k-rate
gives much better performance

addresses #672
2020-05-26 21:09:10 -04:00
Yotam Mann
dd10bfa4b5 trying out 'as const' 2020-05-18 21:13:44 -04:00
Yotam Mann
23af858ef2 updating doc links 2020-05-18 21:13:22 -04:00
Yotam Mann
510a08df4e Revert "feat: Sampler can be loaded with ToneAudioBuffers"
This reverts commit 368a7f43cb.
2020-05-12 22:57:13 -04:00
Yotam Mann
ba8e82b1ca feat: latencyHint is now set in constructor
BREAK: the latencyHint can only be set in the constructor, no longer settable after construction

addresses #658
2020-05-12 12:31:17 -04:00
Yotam Mann
368a7f43cb feat: Sampler can be loaded with ToneAudioBuffers 2020-05-11 15:37:14 -04:00
Yotam Mann
51106320b5 converting worklets back into strings
fixes #663
2020-05-07 09:23:48 -04:00
Yotam Mann
f0926193c4 render the amplitude offline 2020-05-06 22:11:07 -04:00
Yotam Mann
9864a79a25 start the gain 2020-05-06 22:10:35 -04:00
Yotam Mann
c4e4b61d93 grainSize should be grainSize property not the elapsed time
fixes #665
2020-05-03 12:13:11 -04:00
Yotam Mann
72857fbbcc don't warn on sync'ed start 2020-05-01 17:58:23 -04:00
Yotam Mann
8656f37eff updating Envelope examples 2020-04-29 23:44:01 -04:00
Yotam Mann
12f0d5b332 adding some more examples 2020-04-29 23:34:01 -04:00
Yotam Mann
4ac5c22220 more examples 2020-04-29 18:12:52 -04:00
Yotam Mann
13de3a0ac1 more examples 2020-04-29 17:15:12 -04:00
Yotam Mann
c419a4c1ac moving ToneAudioWorklet to 'worklet' folder
removing tests. typescript + testing elsewhere provides better coverage
2020-04-29 16:59:26 -04:00
Yotam Mann
c2d6eb4a7f fixing tests
everything is delayed by 1 more sample
2020-04-29 16:55:09 -04:00
Yotam Mann
8bc4deec2b feat: updating the way that AudioWorkletProcessors are handled
They each get their own .worklet.ts file which enables some typescript checking
2020-04-29 16:38:58 -04:00
Yotam Mann
e5c6d606c6 some more examples 2020-04-29 14:54:35 -04:00
Yotam Mann
dffe6ac151 showing more of the waveform 2020-04-29 14:41:09 -04:00
Yotam Mann
cde3e53761 updating examples 2020-04-29 14:40:59 -04:00
Yotam Mann
bebdfac5cf filling out some more examples 2020-04-29 10:06:18 -04:00
Yotam Mann
bcf7547808 better pan example 2020-04-27 00:35:46 -04:00
Yotam Mann
7429604d3d ability to pass in channelCount
addresses #609
2020-04-26 18:07:31 -04:00
Yotam Mann
1686236d3f offline example 2020-04-26 18:04:51 -04:00
Yotam Mann
939c08417c adding some more examples 2020-04-26 18:03:40 -04:00
Yotam Mann
5ddfce9df7 updating polyfill recomendation
#655
2020-04-26 18:02:18 -04:00
Yotam Mann
7167fa3a81
Merge pull request #655 from sanderwapstra/mediarecorder-polyfill
Changes to make Recorder work with polyfill
2020-04-26 17:59:54 -04:00
Sander Wapstra
c7aed6199f Use addEventListener for start and stop 2020-04-26 21:38:14 +02:00
Yotam Mann
dbc3db6692 fixing issue where input might be undefined 2020-04-21 22:11:31 -04:00
Yotam Mann
379e464618 updated examples 2020-04-16 23:32:39 -04:00
Yotam Mann
8b62ceddac additional examples 2020-04-16 23:32:31 -04:00
Yotam Mann
15d5584f97 fixing example 2020-04-16 23:32:10 -04:00
Yotam Mann
0771798aac adding more examples 2020-04-16 23:08:21 -04:00
Yotam Mann
66bbf4fbaf skipping test for now 2020-04-16 23:01:08 -04:00
Yotam Mann
f17249691d feat: updating all examples
now in the form Tone.Something instead of using `import { Something } from "tone"`. It makes the example runner on the docs page work much faster
2020-04-16 22:24:18 -04:00
Yotam Mann
e4156eec8d linting 2020-04-16 21:46:55 -04:00
Yotam Mann
9f5ed8ef2e testing synced player source 2020-04-16 21:45:51 -04:00
Yotam Mann
f28c4b4a84 exports std-audio-context's isSupported method 2020-04-16 14:44:48 -04:00
Yotam Mann
93884b8e3a removing unused variable 2020-04-15 00:17:02 -04:00
Yotam Mann
f3d651272c skipping test in firefox 2020-04-14 23:54:22 -04:00
Yotam Mann
7f9cda9db0 guarding against floating point issue where offset is very close to 1
fixes #645
2020-04-14 23:46:08 -04:00
Yotam Mann
0f47174272 increasing duration of test
was failing in FF
2020-04-14 23:44:37 -04:00
Yotam Mann
5afe6c8dee updated example 2020-04-14 23:22:56 -04:00
Yotam Mann
697460203a closing context after using 2020-04-14 22:13:33 -04:00
Yotam Mann
6f8a94bc3a exporting Recorder 2020-04-14 22:10:01 -04:00
Yotam Mann
e14fa4eae1 linting 2020-04-14 22:09:44 -04:00
Yotam Mann
e4e409550d feat: adding Recorder for capturing streams
Uses the Media Recorder API to record a media stream
closes #644
2020-04-14 22:03:47 -04:00
Yotam Mann
989abb9697 setting parameters as readonly 2020-04-14 22:01:00 -04:00
Yotam Mann
b217fc45ac adding createMediaStreamDestination 2020-04-14 21:06:21 -04:00
Yotam Mann
43a696ddb2 Merge branch 'pr/643' into dev 2020-04-13 23:23:04 -04:00
Yotam Mann
165569cefd updating tests for slightly different oscillator sound 2020-04-13 23:13:28 -04:00
Yotam Mann
3e8120baa2 interface for PulseOscillator to set the carrier type in PWMOscillator 2020-04-13 22:40:53 -04:00
Powerlated
0636c28517
Use Triangle instead of Sawtooth for PulseOscillator source
Using Sawtooth for the source wave produces an inaccurate tone at pulse widths other than 50% (0). The fix is to use a Triangle wave for the source.
2020-04-12 15:21:57 -04:00
Yotam Mann
b090617c9b removing old tests 2020-04-10 09:13:58 -04:00
Yotam Mann
f317b97d89 testing that slice can also extend the duration 2020-04-08 10:02:33 -04:00
Yotam Mann
8b734d9755 Clock callback returns seconds 2020-04-07 21:52:07 -04:00
James Pettit
169d6d7f09
Add dotted notes to the Subdivision type.
Reading 30e14cf729/Tone/core/type/Time.ts (L76) it looks like dotted notes can be returned, and in fact when I try it I can get a dotted note but the Typescript compiler complains that the return value cannot exist when used in a switch statement, so I think this is just an accidental omission.
2020-04-05 13:08:04 +08:00
Yotam Mann
627cb3cd45 adding some more simple examples 2020-03-21 21:58:48 -04:00
Yotam Mann
4a0aa07af7 testing if loaded can be created in the same block before adding downloads 2020-03-17 22:46:27 -04:00
Yotam Mann
85f70621ef loaded promise allows for downloads to be added while 'loaded' is awaiting 2020-03-17 22:45:59 -04:00
Jacob Smith
7ec07954ae
Fixing bounds in TickSource test 2020-03-17 17:17:50 -03:00
Yotam Mann
8b58824d75 waiting for all download promises to resolve 2020-03-15 21:54:36 -04:00
Yotam Mann
09943840c4 fixing race condition where loaded was not yet set to true when promise is resolved 2020-03-11 11:41:33 -04:00
Yotam Mann
a9b2f05d6a linting 2020-03-08 12:10:39 -04:00
Erich Loftis
785c3bc5dc
Update PatternGenerator.test.ts 2020-03-01 23:53:57 -06:00
Erich Loftis
744698f71e
Update PatternGenerator.ts 2020-03-01 23:11:27 -06:00
Yotam Mann
17ad337c1c get maxChannelCount 2020-03-01 22:03:37 -05:00
Yotam Mann
52bf3414a4 fix: reconnecting convolver after creating new one when setting buffer
fixes #616
2020-02-26 18:26:18 -05:00
Yotam Mann
bdd66ef8ba cleaning up code a little 2020-02-26 17:18:08 -05:00
Yotam Mann
7adda98875 perf: optimizing forEachAtTime to iterate over a smaller range
fixes #618
2020-02-26 16:54:35 -05:00
Yotam Mann
1539d88ef3 fix: Remove download promise when completed
fixes #620
2020-02-26 16:05:47 -05:00
Yotam Mann
e68fe68e4c bug: cancel next event with very short attacks as well
fixes #614
2020-02-02 21:57:23 -05:00
Yotam Mann
e15194821b perf: don't schedule curve when there is no decay necessary. 2020-02-02 21:55:47 -05:00
Yotam Mann
5d1b29f4b3 feat: changed the name Buffer, Buffers and BufferSource so that it doesnt conflict with native naming
Buffer -> ToneAudioBuffer
Buffers -> ToneAudioBuffers
BufferSource -> ToneBufferSource
2020-02-02 11:41:24 -05:00
Yotam Mann
d966735bd9 feat: option to pass in the number of input channels to Panner
fixes #609
2020-01-30 18:22:36 -05:00
Yotam Mann
7236600182 feat: adding onerror to Sampler
fixes #605
2020-01-30 16:42:32 -05:00
Yotam Mann
766ef638d3 making sure that the onerror returns the error 2020-01-30 16:15:28 -05:00
Yotam Mann
bb6a6fdef6 feat: adding onerror to ToneAudioBuffers and Players 2020-01-30 14:25:06 -05:00
Yotam Mann
dc53f9272b feat: adding onerror to GrainPlayer when url can't load 2020-01-29 23:37:36 -05:00
Yotam Mann
0bc28e742a using url instead of buffer makes it more consistent with other url loading APIs
feat: adding onerror to ToneBufferSource and Player
2020-01-29 23:34:05 -05:00
Yotam Mann
88dae77c90 removing 'Connect.ts' and updating dependencies
was a pass through and caused other problems of redefining the variable
2020-01-08 14:12:11 -05:00
Yotam Mann
40e5d7d046 fixing path 2020-01-05 18:34:22 -05:00
Yotam Mann
b86aaede46 updating relative path 2020-01-05 17:59:29 -05:00
Yotam Mann
7eb1eaf625 setting range limits 2019-12-30 18:49:55 -05:00
Yotam Mann
3526b9c42c Adding note about performance with recent upgrade
closes #571
2019-12-30 18:46:35 -05:00
Yotam Mann
266576b44f recieve returns 'this' 2019-12-30 18:30:00 -05:00
Yotam Mann
3df7942908 keeping the loopStart/End within range 2019-12-24 00:17:25 -05:00
Yotam Mann
9853f44e8c test setting reverb values 2019-12-23 23:58:40 -05:00
Yotam Mann
c82a2aafb0 updating synth options
fixes scenario where "custom" is passed in
2019-12-23 23:00:27 -05:00
Yotam Mann
a90669d87e invoking callback slight further in the future 2019-12-23 19:17:06 -05:00
Yotam Mann
a7f1ad36a4 updating sequence description to account for greater depth 2019-12-22 11:07:57 -05:00
Yotam Mann
0f9c14575d return the progress computed by the internal part 2019-12-22 01:31:27 -05:00
Yotam Mann
bbef5f5dec fixing edge case where computed offset is equal to the duration of the buffer
sets it to 0 in this case.
2019-12-22 00:38:21 -05:00
Yotam Mann
4e1b385a48 fixing typos 2019-12-22 00:37:51 -05:00
Yotam Mann
dd73c2128c importing listener when panner is imported 2019-12-21 22:07:05 -05:00
Yotam Mann
015e4c7a30 correcting default value 2019-12-21 22:06:40 -05:00
Yotam Mann
ed5f7876c2 fixing typo 2019-12-21 22:05:31 -05:00
Yotam Mann
24fe9acc18 using standardized-audio-context in tests 2019-12-21 22:05:24 -05:00
Yotam Mann
7391cf6d3c wrapping native AudioListener with Listener 2019-12-21 21:01:45 -05:00
Yotam Mann
f1cda064b5 only set the player as stopped when it's still scheduled as playing
addresses #594
2019-12-21 15:27:10 -05:00
Yotam Mann
e077f1810b export panner3D 2019-12-21 14:32:00 -05:00
Yotam Mann
7606a5d28b updating test name 2019-12-19 17:13:14 -05:00
Yotam Mann
daae4aef7c ensure start is not scheduled twice at the same time
subsequent start times must be greater than the previous time

fixes #594
2019-12-19 17:13:05 -05:00
Yotam Mann
fbf4345de4 removing debugging code 2019-12-18 18:03:11 -05:00
Yotam Mann
d22747cc69 Adding more range guards 2019-12-17 12:42:40 -05:00
Yotam Mann
32fa0f3eba values can be nested arrays of the generic type 2019-12-17 11:58:45 -05:00
Yotam Mann
ef52e20a1b updating comment 2019-12-17 11:57:02 -05:00
Yotam Mann
25eb6fce40 removing unused vars 2019-12-17 11:56:56 -05:00
Yotam Mann
abcb3bec5c removing out of range value 2019-12-17 11:38:43 -05:00
Yotam Mann
48284d78fb adding decorators which validate the input value range 2019-12-16 17:13:03 -05:00
Yotam Mann
2b0c2a64f1 values out of range throw an error
used to fail silently
2019-12-16 17:12:19 -05:00
Yotam Mann
fc84ec281b adding clamp function 2019-12-16 16:50:07 -05:00
Yotam Mann
51d06bd987 feat: Removing Ctrl classes
breaking changes: Removing CtrlInterpolate, CtrlRandom, CtrlMarkov.
2019-12-16 16:42:40 -05:00
Yotam Mann
389ccf8722 using assert instead of this.assert
removing this.assert from Tone.js classes
2019-12-16 15:58:31 -05:00
Yotam Mann
1255bc6766 feat: Meter can do multichannel analysis
pass in `channels` > 1 into constructor
2019-12-15 16:43:41 -05:00
Yotam Mann
d9a7520eb6 feat: Analyser can handle multiple channels
Can pass in `channels` into constructor which runs a separate analysis on each channel and returns the results as a Float32Array[].
2019-12-15 16:42:50 -05:00
Yotam Mann
6d0e17d3d2 adding the category 2019-12-15 16:02:29 -05:00
Yotam Mann
93fdb9c0f2 documenting output type 2019-12-15 16:02:19 -05:00
Yotam Mann
2625a134b6 feat: meter output can be normalRange in addition to decibels 2019-12-15 16:01:19 -05:00
Yotam Mann
ed93e677a9 setting minValue for harmonicity 2019-12-15 02:19:25 -05:00
Yotam Mann
caf58ffe0b throws error when set outside of range 2019-12-15 02:19:12 -05:00
Yotam Mann
f3022bbb35 not necessary to set frequency in constructor 2019-12-15 02:18:13 -05:00
Yotam Mann
192b749b85 Gain can also have min/max range 2019-12-14 17:27:54 -05:00
Yotam Mann
72d7f37509 removing unused variable 2019-12-14 17:07:13 -05:00
Yotam Mann
a2d5c3d634 adding the intial state at time 0 2019-12-14 16:11:56 -05:00
Yotam Mann
ef0aaec8ee Refactor source
adding `_restart` is an internal protected abstract method for all sources.
2019-12-14 16:09:24 -05:00
Yotam Mann
e709203656 Reverb decay should be at least 1ms 2019-12-14 12:34:44 -05:00
Yotam Mann
276af87a6d decay needs to be at least 1 sample long 2019-12-14 12:33:49 -05:00
Yotam Mann
267f1befc0 Simplifying Freeverb dispose 2019-12-14 11:53:12 -05:00
Yotam Mann
dedfe18ac2 open returns this
closes #589
2019-12-13 11:25:28 -05:00
Yotam Mann
f20fdce3a6 making paths relative 2019-12-11 10:35:01 -05:00
Yotam Mann
8eed7bd6ce adding range guards to reverb 2019-12-11 10:13:52 -05:00
Yotam Mann
fce95bea6e feat: clamp the values to the defined min/maxValue 2019-12-11 10:11:40 -05:00
Yotam Mann
61cfd3ab8c make sure that maxDelay is readonly 2019-12-10 23:34:12 -05:00
Yotam Mann
cf8965f921 fixing case where buffer is not set
previously would prefix "/"
2019-12-09 17:43:58 -05:00
Yotam Mann
409fb929af skipping isSilent test 2019-12-06 18:00:26 -05:00
Yotam Mann
d4f47b7cd8 removing unused vars 2019-12-06 17:29:06 -05:00
Yotam Mann
2295ce674e whoops: made it so it only funs one test 2019-12-06 17:23:02 -05:00
Yotam Mann
9f51cb5293 exporting BaseContext 2019-12-06 17:13:22 -05:00
Yotam Mann
c66f2d5e89 feat: ramps must be at least 1 sample long
otherwise just uses a setValueAtTime
2019-12-06 16:38:35 -05:00
Yotam Mann
8a508f2405 feat: Reverb generate is automatically called when decay or preDelay values are changed
`ready` promise resoves when reverb values have been updated.
2019-12-06 16:37:40 -05:00
Yotam Mann
8540c44459 needs to set detune outside of signal being overridden 2019-12-06 14:10:33 -05:00
Yotam Mann
660915680a feat: when the signal is overridden it should not schedule any change in values
fixes #585
2019-12-06 12:55:30 -05:00
Yotam Mann
e955846bb2 moving docs from #584 to typescript 2019-12-04 10:52:40 -05:00
Yotam Mann
b1c5a3c8c7 docs: fixing example 2019-11-22 15:46:46 -05:00
Yotam Mann
ba311dbe7b putting settings into constructor object
slight optimization over setting them all individually
2019-11-22 13:26:16 -05:00
Yotam Mann
0f8a282dfa fixing stereo widener 2019-11-22 13:25:50 -05:00
Yotam Mann
fef7bde5a5 rounding up the number of voices it keeps 2019-11-22 11:19:03 -05:00
Yotam Mann
c80f8a89f9 optimization: also storing the wave
turns out that the call to `createPeriodicWave` is the most expensive part.
2019-11-22 11:18:49 -05:00