Commit graph

58 commits

Author SHA1 Message Date
tambien
610b847f4d fixing docs 2019-01-27 17:14:04 -05:00
tambien
ed71d8141b amd to es6 import/export
no longer using AMD (require.js) style imports, and beginning to move to es6 "import/export" statements everywhere.
2019-01-27 13:05:20 -05:00
tambien
3d1202043a all modules are relative paths
simplifies deep references to individual files
2018-08-26 22:29:17 -04:00
tambien
4e772baab9 updating time docs
fixes #348
2018-05-17 11:44:22 -04:00
timothyboie
ab87d37426 Time miscalculation fix (#343)
Times being converted to BarsBeatsSixteenths have the potential to miscalculate due to an extended floating point number within the function.

Example of error:
https://jsfiddle.net/timboie/1vztuhz1/

Fix validation:
https://jsfiddle.net/timboie/6e7d31t3/

Any further testing is appreciated

Fixes #342
2018-05-15 10:10:10 -04:00
Joe Lepper
92a7bab0b4 fix Tone.Midi examples (#337) 2018-04-26 10:31:26 -04:00
Yotam Mann
39d5898738 Time classes take Object notation as well
replacement for deprecated expression notation
2018-04-25 10:51:36 -04:00
Yotam Mann
a5503e02d2 linting 2018-03-05 12:25:33 -05:00
Yotam Mann
a80ae0656b Tone.isDefined replaces !Tone.isUndef 2018-03-05 11:32:08 -05:00
Yotam Mann
169ee8e7db updating jsdocs private unit field 2018-01-30 13:00:50 -05:00
Yotam Mann
dded291a25 linting 2018-01-02 10:37:27 -05:00
Yotam Mann
1879f59d7a updating regex 2017-12-29 13:13:46 -05:00
Yotam Mann
83ec5d3288 transpose and harmonize Midi notes 2017-12-27 17:29:26 -05:00
Yotam Mann
4d8812ee02 transpose and harmonize a Tone.Frequency
fixes #219
2017-12-27 17:29:10 -05:00
Yotam Mann
be8027549a use 'this.now()' instead of Tone.now() 2017-12-27 11:51:50 -05:00
Yotam Mann
7bf39fc7c5 using Math.log2 instead of dividing by Math.LN2 2017-12-18 10:45:25 -05:00
Yotam Mann
3ea44d3af6 linting 2017-12-17 14:49:26 -05:00
Yotam Mann
d4afe1e6ee Tone.Midi is primitive type for Midi notes 2017-12-17 14:48:25 -05:00
Yotam Mann
2138d2c26f adding toMidi() 2017-12-17 14:48:08 -05:00
Yotam Mann
456dd7ceb3 making midi<->freq conversions static 2017-12-17 14:47:51 -05:00
Yotam Mann
77d352450f moving basic conversions to TimeBase 2017-12-17 14:44:36 -05:00
Yotam Mann
e55b1e9dc1 toNotation() returns closest notation representation 2017-12-17 13:26:21 -05:00
Yotam Mann
cee2d3da3a TransportTime returns seconds instead of Ticks
introducing Ticks for tick representation
2017-12-17 13:24:34 -05:00
Yotam Mann
32374fe27a constructor can take another type and convert it to target type 2017-12-17 13:23:31 -05:00
Yotam Mann
ade2778082 Tone.Ticks extends TransportTime 2017-12-17 13:17:46 -05:00
Yotam Mann
ac6af1cf56 simplifying TimeBase classes. No longer evaluate expressions 2017-12-16 14:31:09 -05:00
Yotam Mann
4316530b16 linting 2017-10-26 16:03:00 -04:00
Yotam Mann
c58fad41f0 linting 2017-10-26 15:26:04 -04:00
Yotam Mann
cb2a982c39 linting 2017-10-21 19:02:46 -04:00
Jack Anderson
5b491a5379 Round Time#toTicks (#256)
* failing test for toTicks() float issue

* round (not floor) to nearest tick
2017-09-17 12:35:32 -04:00
Yotam Mann
6937466554 fixed rounding error when converting frequency to midi 2017-08-26 15:39:09 -04:00
Yotam Mann
8110d38bd6 master->dev 2017-08-22 11:57:40 -04:00
Yotam Mann
982e31c099 adding Gain typedef 2017-08-22 11:44:12 -04:00
Jack Anderson
1fb225383e no insignificant zeroes in barsBeatsSixteenths (#250)
* no insignificant zeroes in barsBeatsSixteenths

- fixes #246

* restore bpm to orig val in trailing zero test
2017-08-08 10:54:47 -04:00
Yotam Mann
066eb207ad updating Time copy
[skip ci]
2017-07-27 18:02:21 -04:00
Yotam Mann
b927395825 making defaultArg static 2017-04-30 15:03:49 -04:00
Yotam Mann
f7b7600ac9 fixing jsdoc errors
[skip ci]
2017-04-30 11:16:35 -04:00
Yotam Mann
4bda177b83 gainToDb, dbToGain, intervalToFrequencyRatio now static functions 2017-04-26 23:21:26 -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
d037c28d6f eval -> valueOf
thanks for the suggestion @JackCA
fixes #205
2017-03-12 21:31:23 -04:00
Yotam Mann
83a019c987 moving context dependency from Transport to Type 2017-02-28 19:01:09 -05:00
Yotam Mann
823d6efc16 linting 2016-11-06 19:41:00 -05:00
Yotam Mann
3b6c15ff5b clarifying code using toType() 2016-09-20 18:54:36 -04:00
Yotam Mann
26f7676ef5 frequency has a toFrequency
seems a little redundant, but it’s clearer.
2016-09-20 18:35:49 -04:00
Yotam Mann
75773eb0f2 binary expressions use the same constructor 2016-09-20 18:27:10 -04:00
Yotam Mann
3b32641d77 corrected toSeconds
didn’t take into account if it was now-relative
2016-09-20 18:25:39 -04:00
Yotam Mann
0856efe50f added toSeconds method
no longer relies on the inherited method
2016-09-20 18:25:06 -04:00
Yotam Mann
8982688f9e can now pass in Infinity or other valid numbers 2016-09-18 20:03:04 -04:00
Yotam Mann
f115b4cdf5 clone/copy methods of Time/TimeBase 2016-09-18 19:41:25 -04:00
Yotam Mann
f751bba814 can convert to Milliseconds 2016-08-18 11:41:04 -04:00