mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 16:17:58 +00:00
making time optional
This commit is contained in:
parent
bc0d83d4cf
commit
4c5e05d7ca
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ export class NoiseSynth extends Instrument<NoiseSynthOptions> {
|
|||
* @example
|
||||
* noiseSynth.triggerAttack();
|
||||
*/
|
||||
triggerAttack(time: Time, velocity: NormalRange = 1): this {
|
||||
triggerAttack(time?: Time, velocity: NormalRange = 1): this {
|
||||
time = this.toSeconds(time);
|
||||
// the envelopes
|
||||
this.envelope.triggerAttack(time, velocity);
|
||||
|
@ -94,7 +94,7 @@ export class NoiseSynth extends Instrument<NoiseSynthOptions> {
|
|||
/**
|
||||
* Start the release portion of the envelopes.
|
||||
*/
|
||||
triggerRelease(time: Time): this {
|
||||
triggerRelease(time?: Time): this {
|
||||
time = this.toSeconds(time);
|
||||
this.envelope.triggerRelease(time);
|
||||
this.noise.stop(time + this.toSeconds(this.envelope.release));
|
||||
|
|
Loading…
Reference in a new issue