A Web Audio framework for making interactive music in the browser.
oscillator.frequency = 200
when it should be oscillator.frequency.value = 200
.Tone.Master.mute = true
.harmonicity
is a signal-rate value for all instruments.toFrequency
accepts notes by name (i.e. "C4"
)setPitch
in sampler -> setNote
this
to allow for chaining. i.e. player.toMaster().start(2)
.units
to Signal class which allows signals to be set in terms of Tone.Time, Tone.Frequency, Numbers, or Decibels.player.setVolume(-10)
is now player.volume.value = -10
.
To ramp the volume use either player.volume.linearRampToValueNow(-10, "4n")
, or the new rampTo
method which automaically selects the ramp (linear|exponential) based on the type of data.BREAKING CHANGES:
The API has been changed consistently to use .attribute
for getting and setting instead of getAttribute
and setAttribute
methods. The reasoning for this is twofold: firstly, Tone.Signal attributes were previously limited in their scheduling capabilities when set through a setter function. For exactly, it was not possible to do a setValueAtTime on the bpm
of the Transport. Secondly, the new EcmaScript 5 getter/setter approach resembles the Web Audio API much more closely, which will make intermixing the two APIs even easier.
If you're using Sublime Text, one way to transition from the old API to the new one is with a regex find/replace:
find Tone.Transport.setBpm\((\d+)\)
and replace it with Tone.Transport.bpm.value = $1
.
Or if setBpm was being invoked with a rampTime:
find Tone.Transport.setBpm\((\d+)\, (\d+)\)
and replace it with Tone.Transport.bpm.rampTo($1, $2)
.
Lots of changes under the hood in the Signal classes. Plus a few new effects and synthesizers.
Core Change:
Signal Processing:
Effects:
Synths:
this is only the beginning...