Tone.Master

↳ EXTENDS Tone
SINGLETON

A single master output which is connected to the AudioDestinationNode (aka your speakers). It provides useful conveniences such as the ability to set the volume and mute the entire application. It also gives you the ability to apply master effects to your application.

Like Tone.Transport, A single Tone.Master is created on initialization and you do not need to explicitly construct one.

CONSTRUCTOR

new Tone.Master ( )

DEFAULTS

{
volume : 0 ,
mute : false
}

EXAMPLE

//the audio will go from the oscillator to the speakers
oscillator.connect(Tone.Master);
//a convenience for connecting to the master output is also provided:
oscillator.toMaster();
//the above two examples are equivalent.

Members

.mute

boolean #

Mute the output.

EXAMPLE

//mute the output
Tone.Master.mute = true;
</>

.volume

Decibels #

The volume of the master output.

</>

Methods

.chain ( )

#
args...

All arguments will be connected in a row and the Master will be routed through it.

type: AudioNode or Tone
↪ returns Tone.Master

this

Add a master effects chain. NOTE: this will disconnect any nodes which were previously chained in the master effects chain.

EXAMPLE

//some overall compression to keep the levels in check
var masterCompressor = new Tone.Compressor({
	"threshold" : -6,
	"ratio" : 3,
	"attack" : 0.5,
	"release" : 0.1
});
//give a little boost to the lows
var lowBump = new Tone.Filter(200, "lowshelf");
//route everything through the filter
//and compressor before going to the speakers
Tone.Master.chain(lowBump, masterCompressor);
</>

.dispose ( )

#
↪ returns Tone.Master

this

Clean up

</>
docs generated Sep 15 2019