Sampler
class Instrument ↳ extends Instrument<SamplerOptions>
Pass in an object which maps the note’s pitch or midi value to the url, then you can trigger the attack and release of that note like other instruments. By automatically repitching the samples, it is possible to play pitches which were not explicitly included which can save loading time.
For sample or buffer playback where repitching is not necessary, use Player.
const sampler = new Tone.Sampler({
urls: {
A1: "A1.mp3",
A2: "A2.mp3",
},
baseUrl: "https://tonejs.github.io/audio/casio/",
onload: () => {
sampler.triggerAttackRelease(["C1", "E1", "G1", "B1"], 0.5);
}
}).toDestination();Constructor
Section titled “Constructor”new Sampler(samples?: SamplesMap, onload?: () => void, baseUrl?: string)Parameters
-
samples
SamplesMapoptionalAn object of samples mapping either Midi Note Numbers or Scientific Pitch Notation to the url of that sample.
-
onload
() => voidoptionalThe callback to invoke when all of the samples are loaded.
-
baseUrl
stringoptionalThe root URL of all of the samples, which is prepended to all the URLs.
new Sampler(samples?: SamplesMap, options?: Partial<Omit<SamplerOptions, "urls">>)Parameters
-
samples
SamplesMapoptionalAn object of samples mapping either Midi Note Numbers or Scientific Pitch Notation to the url of that sample.
-
options
Partial<Omit<SamplerOptions, "urls">>optionalThe remaining options associated with the sampler
new Sampler(options?: Partial<SamplerOptions>)Parameters
- options
Partial<SamplerOptions>optional
Properties
Section titled “Properties”attack
Section titled “attack”attack: TimeThe envelope applied to the beginning of the sample.
Range: 0 to 1
curve: OneShotSourceCurveThe shape of the attack/release curve. Either “linear” or “exponential”
output
Section titled “output”↳ inherited from Instrument
output: OutputNodeThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
release
Section titled “release”release: TimeThe envelope applied to the end of the envelope.
Range: 0 to 1
volume
Section titled “volume”↳ inherited from Instrument
volume: Param<"decibels">The volume of the output in decibels.
const amSynth = new Tone.AMSynth().toDestination();
amSynth.volume.value = -6;
amSynth.triggerAttackRelease("G#3", 0.2);Methods
Section titled “Methods”add(note: 0 | 2 | 4 | 8 | 16 | 32 | 64 | 3 | 1 | 5 | 6 | 7 | 9 | 10 | 11 | "C0" | "C2" | "C4" | "C8" | "C-4" | "C3" | "C-3" | "C-2" | "C1" | "C-1" | "C5" | "C6" | "C7" | "C9" | "C10" | "C11" | "Cbb0" | "Cbb2" | "Cbb4" | "Cbb8" | "Cbb-4" | "Cbb3" | "Cbb-3" | "Cbb-2" | "Cbb1" | "Cbb-1" | "Cbb5" | "Cbb6" | "Cbb7" | "Cbb9" | "Cbb10" | "Cbb11" | "Cb0" | "Cb2" | "Cb4" | "Cb8" | "Cb-4" | "Cb3" | "Cb-3" | "Cb-2" | "Cb1" | "Cb-1" | "Cb5" | "Cb6" | "Cb7" | "Cb9" | "Cb10" | "Cb11" | "C#0" | "C#2" | "C#4" | "C#8" | "C#-4" | "C#3" | "C#-3" | "C#-2" | "C#1" | "C#-1" | "C#5" | "C#6" | "C#7" | "C#9" | "C#10" | "C#11" | "Cx0" | "Cx2" | "Cx4" | "Cx8" | "Cx-4" | "Cx3" | "Cx-3" | "Cx-2" | "Cx1" | "Cx-1" | "Cx5" | "Cx6" | "Cx7" | "Cx9" | "Cx10" | "Cx11" | "D0" | "D2" | "D4" | "D8" | "D-4" | "D3" | "D-3" | "D-2" | "D1" | "D-1" | "D5" | "D6" | "D7" | "D9" | "D10" | "D11" | "Dbb0" | "Dbb2" | "Dbb4" | "Dbb8" | "Dbb-4" | "Dbb3" | "Dbb-3" | "Dbb-2" | "Dbb1" | "Dbb-1" | "Dbb5" | "Dbb6" | "Dbb7" | "Dbb9" | "Dbb10" | "Dbb11" | "Db0" | "Db2" | "Db4" | "Db8" | "Db-4" | "Db3" | "Db-3" | "Db-2" | "Db1" | "Db-1" | "Db5" | "Db6" | "Db7" | "Db9" | "Db10" | "Db11" | "D#0" | "D#2" | "D#4" | "D#8" | "D#-4" | "D#3" | "D#-3" | "D#-2" | "D#1" | "D#-1" | "D#5" | "D#6" | "D#7" | "D#9" | "D#10" | "D#11" | "Dx0" | "Dx2" | "Dx4" | "Dx8" | "Dx-4" | "Dx3" | "Dx-3" | "Dx-2" | "Dx1" | "Dx-1" | "Dx5" | "Dx6" | "Dx7" | "Dx9" | "Dx10" | "Dx11" | "E0" | "E2" | "E4" | "E8" | "E-4" | "E3" | "E-3" | "E-2" | "E1" | "E-1" | "E5" | "E6" | "E7" | "E9" | "E10" | "E11" | "Ebb0" | "Ebb2" | "Ebb4" | "Ebb8" | "Ebb-4" | "Ebb3" | "Ebb-3" | "Ebb-2" | "Ebb1" | "Ebb-1" | "Ebb5" | "Ebb6" | "Ebb7" | "Ebb9" | "Ebb10" | "Ebb11" | "Eb0" | "Eb2" | "Eb4" | "Eb8" | "Eb-4" | "Eb3" | "Eb-3" | "Eb-2" | "Eb1" | "Eb-1" | "Eb5" | "Eb6" | "Eb7" | "Eb9" | "Eb10" | "Eb11" | "E#0" | "E#2" | "E#4" | "E#8" | "E#-4" | "E#3" | "E#-3" | "E#-2" | "E#1" | "E#-1" | "E#5" | "E#6" | "E#7" | "E#9" | "E#10" | "E#11" | "Ex0" | "Ex2" | "Ex4" | "Ex8" | "Ex-4" | "Ex3" | "Ex-3" | "Ex-2" | "Ex1" | "Ex-1" | "Ex5" | "Ex6" | "Ex7" | "Ex9" | "Ex10" | "Ex11" | "F0" | "F2" | "F4" | "F8" | "F-4" | "F3" | "F-3" | "F-2" | "F1" | "F-1" | "F5" | "F6" | "F7" | "F9" | "F10" | "F11" | "Fbb0" | "Fbb2" | "Fbb4" | "Fbb8" | "Fbb-4" | "Fbb3" | "Fbb-3" | "Fbb-2" | "Fbb1" | "Fbb-1" | "Fbb5" | "Fbb6" | "Fbb7" | "Fbb9" | "Fbb10" | "Fbb11" | "Fb0" | "Fb2" | "Fb4" | "Fb8" | "Fb-4" | "Fb3" | "Fb-3" | "Fb-2" | "Fb1" | "Fb-1" | "Fb5" | "Fb6" | "Fb7" | "Fb9" | "Fb10" | "Fb11" | "F#0" | "F#2" | "F#4" | "F#8" | "F#-4" | "F#3" | "F#-3" | "F#-2" | "F#1" | "F#-1" | "F#5" | "F#6" | "F#7" | "F#9" | "F#10" | "F#11" | "Fx0" | "Fx2" | "Fx4" | "Fx8" | "Fx-4" | "Fx3" | "Fx-3" | "Fx-2" | "Fx1" | "Fx-1" | "Fx5" | "Fx6" | "Fx7" | "Fx9" | "Fx10" | "Fx11" | "G0" | "G2" | "G4" | "G8" | "G-4" | "G3" | "G-3" | "G-2" | "G1" | "G-1" | "G5" | "G6" | "G7" | "G9" | "G10" | "G11" | "Gbb0" | "Gbb2" | "Gbb4" | "Gbb8" | "Gbb-4" | "Gbb3" | "Gbb-3" | "Gbb-2" | "Gbb1" | "Gbb-1" | "Gbb5" | "Gbb6" | "Gbb7" | "Gbb9" | "Gbb10" | "Gbb11" | "Gb0" | "Gb2" | "Gb4" | "Gb8" | "Gb-4" | "Gb3" | "Gb-3" | "Gb-2" | "Gb1" | "Gb-1" | "Gb5" | "Gb6" | "Gb7" | "Gb9" | "Gb10" | "Gb11" | "G#0" | "G#2" | "G#4" | "G#8" | "G#-4" | "G#3" | "G#-3" | "G#-2" | "G#1" | "G#-1" | "G#5" | "G#6" | "G#7" | "G#9" | "G#10" | "G#11" | "Gx0" | "Gx2" | "Gx4" | "Gx8" | "Gx-4" | "Gx3" | "Gx-3" | "Gx-2" | "Gx1" | "Gx-1" | "Gx5" | "Gx6" | "Gx7" | "Gx9" | "Gx10" | "Gx11" | "A0" | "A2" | "A4" | "A8" | "A-4" | "A3" | "A-3" | "A-2" | "A1" | "A-1" | "A5" | "A6" | "A7" | "A9" | "A10" | "A11" | "Abb0" | "Abb2" | "Abb4" | "Abb8" | "Abb-4" | "Abb3" | "Abb-3" | "Abb-2" | "Abb1" | "Abb-1" | "Abb5" | "Abb6" | "Abb7" | "Abb9" | "Abb10" | "Abb11" | "Ab0" | "Ab2" | "Ab4" | "Ab8" | "Ab-4" | "Ab3" | "Ab-3" | "Ab-2" | "Ab1" | "Ab-1" | "Ab5" | "Ab6" | "Ab7" | "Ab9" | "Ab10" | "Ab11" | "A#0" | "A#2" | "A#4" | "A#8" | "A#-4" | "A#3" | "A#-3" | "A#-2" | "A#1" | "A#-1" | "A#5" | "A#6" | "A#7" | "A#9" | "A#10" | "A#11" | "Ax0" | "Ax2" | "Ax4" | "Ax8" | "Ax-4" | "Ax3" | "Ax-3" | "Ax-2" | "Ax1" | "Ax-1" | "Ax5" | "Ax6" | "Ax7" | "Ax9" | "Ax10" | "Ax11" | "B0" | "B2" | "B4" | "B8" | "B-4" | "B3" | "B-3" | "B-2" | "B1" | "B-1" | "B5" | "B6" | "B7" | "B9" | "B10" | "B11" | "Bbb0" | "Bbb2" | "Bbb4" | "Bbb8" | "Bbb-4" | "Bbb3" | "Bbb-3" | "Bbb-2" | "Bbb1" | "Bbb-1" | "Bbb5" | "Bbb6" | "Bbb7" | "Bbb9" | "Bbb10" | "Bbb11" | "Bb0" | "Bb2" | "Bb4" | "Bb8" | "Bb-4" | "Bb3" | "Bb-3" | "Bb-2" | "Bb1" | "Bb-1" | "Bb5" | "Bb6" | "Bb7" | "Bb9" | "Bb10" | "Bb11" | "B#0" | "B#2" | "B#4" | "B#8" | "B#-4" | "B#3" | "B#-3" | "B#-2" | "B#1" | "B#-1" | "B#5" | "B#6" | "B#7" | "B#9" | "B#10" | "B#11" | "Bx0" | "Bx2" | "Bx4" | "Bx8" | "Bx-4" | "Bx3" | "Bx-3" | "Bx-2" | "Bx1" | "Bx-1" | "Bx5" | "Bx6" | "Bx7" | "Bx9" | "Bx10" | "Bx11" | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127, url: string | ToneAudioBuffer | AudioBuffer, callback?: () => void): thisAdd a note to the sampler.
Parameters
-
note
0 | 2 | 4 | 8 | 16 | 32 | 64 | 3 | 1 | 5 | 6 | 7 | 9 | 10 | 11 | "C0" | "C2" | "C4" | "C8" | "C-4" | "C3" | "C-3" | "C-2" | "C1" | "C-1" | "C5" | "C6" | "C7" | "C9" | "C10" | "C11" | "Cbb0" | "Cbb2" | "Cbb4" | "Cbb8" | "Cbb-4" | "Cbb3" | "Cbb-3" | "Cbb-2" | "Cbb1" | "Cbb-1" | "Cbb5" | "Cbb6" | "Cbb7" | "Cbb9" | "Cbb10" | "Cbb11" | "Cb0" | "Cb2" | "Cb4" | "Cb8" | "Cb-4" | "Cb3" | "Cb-3" | "Cb-2" | "Cb1" | "Cb-1" | "Cb5" | "Cb6" | "Cb7" | "Cb9" | "Cb10" | "Cb11" | "C#0" | "C#2" | "C#4" | "C#8" | "C#-4" | "C#3" | "C#-3" | "C#-2" | "C#1" | "C#-1" | "C#5" | "C#6" | "C#7" | "C#9" | "C#10" | "C#11" | "Cx0" | "Cx2" | "Cx4" | "Cx8" | "Cx-4" | "Cx3" | "Cx-3" | "Cx-2" | "Cx1" | "Cx-1" | "Cx5" | "Cx6" | "Cx7" | "Cx9" | "Cx10" | "Cx11" | "D0" | "D2" | "D4" | "D8" | "D-4" | "D3" | "D-3" | "D-2" | "D1" | "D-1" | "D5" | "D6" | "D7" | "D9" | "D10" | "D11" | "Dbb0" | "Dbb2" | "Dbb4" | "Dbb8" | "Dbb-4" | "Dbb3" | "Dbb-3" | "Dbb-2" | "Dbb1" | "Dbb-1" | "Dbb5" | "Dbb6" | "Dbb7" | "Dbb9" | "Dbb10" | "Dbb11" | "Db0" | "Db2" | "Db4" | "Db8" | "Db-4" | "Db3" | "Db-3" | "Db-2" | "Db1" | "Db-1" | "Db5" | "Db6" | "Db7" | "Db9" | "Db10" | "Db11" | "D#0" | "D#2" | "D#4" | "D#8" | "D#-4" | "D#3" | "D#-3" | "D#-2" | "D#1" | "D#-1" | "D#5" | "D#6" | "D#7" | "D#9" | "D#10" | "D#11" | "Dx0" | "Dx2" | "Dx4" | "Dx8" | "Dx-4" | "Dx3" | "Dx-3" | "Dx-2" | "Dx1" | "Dx-1" | "Dx5" | "Dx6" | "Dx7" | "Dx9" | "Dx10" | "Dx11" | "E0" | "E2" | "E4" | "E8" | "E-4" | "E3" | "E-3" | "E-2" | "E1" | "E-1" | "E5" | "E6" | "E7" | "E9" | "E10" | "E11" | "Ebb0" | "Ebb2" | "Ebb4" | "Ebb8" | "Ebb-4" | "Ebb3" | "Ebb-3" | "Ebb-2" | "Ebb1" | "Ebb-1" | "Ebb5" | "Ebb6" | "Ebb7" | "Ebb9" | "Ebb10" | "Ebb11" | "Eb0" | "Eb2" | "Eb4" | "Eb8" | "Eb-4" | "Eb3" | "Eb-3" | "Eb-2" | "Eb1" | "Eb-1" | "Eb5" | "Eb6" | "Eb7" | "Eb9" | "Eb10" | "Eb11" | "E#0" | "E#2" | "E#4" | "E#8" | "E#-4" | "E#3" | "E#-3" | "E#-2" | "E#1" | "E#-1" | "E#5" | "E#6" | "E#7" | "E#9" | "E#10" | "E#11" | "Ex0" | "Ex2" | "Ex4" | "Ex8" | "Ex-4" | "Ex3" | "Ex-3" | "Ex-2" | "Ex1" | "Ex-1" | "Ex5" | "Ex6" | "Ex7" | "Ex9" | "Ex10" | "Ex11" | "F0" | "F2" | "F4" | "F8" | "F-4" | "F3" | "F-3" | "F-2" | "F1" | "F-1" | "F5" | "F6" | "F7" | "F9" | "F10" | "F11" | "Fbb0" | "Fbb2" | "Fbb4" | "Fbb8" | "Fbb-4" | "Fbb3" | "Fbb-3" | "Fbb-2" | "Fbb1" | "Fbb-1" | "Fbb5" | "Fbb6" | "Fbb7" | "Fbb9" | "Fbb10" | "Fbb11" | "Fb0" | "Fb2" | "Fb4" | "Fb8" | "Fb-4" | "Fb3" | "Fb-3" | "Fb-2" | "Fb1" | "Fb-1" | "Fb5" | "Fb6" | "Fb7" | "Fb9" | "Fb10" | "Fb11" | "F#0" | "F#2" | "F#4" | "F#8" | "F#-4" | "F#3" | "F#-3" | "F#-2" | "F#1" | "F#-1" | "F#5" | "F#6" | "F#7" | "F#9" | "F#10" | "F#11" | "Fx0" | "Fx2" | "Fx4" | "Fx8" | "Fx-4" | "Fx3" | "Fx-3" | "Fx-2" | "Fx1" | "Fx-1" | "Fx5" | "Fx6" | "Fx7" | "Fx9" | "Fx10" | "Fx11" | "G0" | "G2" | "G4" | "G8" | "G-4" | "G3" | "G-3" | "G-2" | "G1" | "G-1" | "G5" | "G6" | "G7" | "G9" | "G10" | "G11" | "Gbb0" | "Gbb2" | "Gbb4" | "Gbb8" | "Gbb-4" | "Gbb3" | "Gbb-3" | "Gbb-2" | "Gbb1" | "Gbb-1" | "Gbb5" | "Gbb6" | "Gbb7" | "Gbb9" | "Gbb10" | "Gbb11" | "Gb0" | "Gb2" | "Gb4" | "Gb8" | "Gb-4" | "Gb3" | "Gb-3" | "Gb-2" | "Gb1" | "Gb-1" | "Gb5" | "Gb6" | "Gb7" | "Gb9" | "Gb10" | "Gb11" | "G#0" | "G#2" | "G#4" | "G#8" | "G#-4" | "G#3" | "G#-3" | "G#-2" | "G#1" | "G#-1" | "G#5" | "G#6" | "G#7" | "G#9" | "G#10" | "G#11" | "Gx0" | "Gx2" | "Gx4" | "Gx8" | "Gx-4" | "Gx3" | "Gx-3" | "Gx-2" | "Gx1" | "Gx-1" | "Gx5" | "Gx6" | "Gx7" | "Gx9" | "Gx10" | "Gx11" | "A0" | "A2" | "A4" | "A8" | "A-4" | "A3" | "A-3" | "A-2" | "A1" | "A-1" | "A5" | "A6" | "A7" | "A9" | "A10" | "A11" | "Abb0" | "Abb2" | "Abb4" | "Abb8" | "Abb-4" | "Abb3" | "Abb-3" | "Abb-2" | "Abb1" | "Abb-1" | "Abb5" | "Abb6" | "Abb7" | "Abb9" | "Abb10" | "Abb11" | "Ab0" | "Ab2" | "Ab4" | "Ab8" | "Ab-4" | "Ab3" | "Ab-3" | "Ab-2" | "Ab1" | "Ab-1" | "Ab5" | "Ab6" | "Ab7" | "Ab9" | "Ab10" | "Ab11" | "A#0" | "A#2" | "A#4" | "A#8" | "A#-4" | "A#3" | "A#-3" | "A#-2" | "A#1" | "A#-1" | "A#5" | "A#6" | "A#7" | "A#9" | "A#10" | "A#11" | "Ax0" | "Ax2" | "Ax4" | "Ax8" | "Ax-4" | "Ax3" | "Ax-3" | "Ax-2" | "Ax1" | "Ax-1" | "Ax5" | "Ax6" | "Ax7" | "Ax9" | "Ax10" | "Ax11" | "B0" | "B2" | "B4" | "B8" | "B-4" | "B3" | "B-3" | "B-2" | "B1" | "B-1" | "B5" | "B6" | "B7" | "B9" | "B10" | "B11" | "Bbb0" | "Bbb2" | "Bbb4" | "Bbb8" | "Bbb-4" | "Bbb3" | "Bbb-3" | "Bbb-2" | "Bbb1" | "Bbb-1" | "Bbb5" | "Bbb6" | "Bbb7" | "Bbb9" | "Bbb10" | "Bbb11" | "Bb0" | "Bb2" | "Bb4" | "Bb8" | "Bb-4" | "Bb3" | "Bb-3" | "Bb-2" | "Bb1" | "Bb-1" | "Bb5" | "Bb6" | "Bb7" | "Bb9" | "Bb10" | "Bb11" | "B#0" | "B#2" | "B#4" | "B#8" | "B#-4" | "B#3" | "B#-3" | "B#-2" | "B#1" | "B#-1" | "B#5" | "B#6" | "B#7" | "B#9" | "B#10" | "B#11" | "Bx0" | "Bx2" | "Bx4" | "Bx8" | "Bx-4" | "Bx3" | "Bx-3" | "Bx-2" | "Bx1" | "Bx-1" | "Bx5" | "Bx6" | "Bx7" | "Bx9" | "Bx10" | "Bx11" | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127The buffer’s pitch.
-
url
string | ToneAudioBuffer | AudioBufferEither the url of the buffer, or a buffer which will be added with the given name.
-
callback
() => voidoptionalThe callback to invoke when the url is loaded.
Returns this
releaseAll()
Section titled “releaseAll()”releaseAll(time?: Time): thisRelease all currently active notes.
Parameters
-
time
TimeoptionalWhen to release the notes.
Returns this
sync()
Section titled “sync()”sync(): thisSync the instrument to the Transport. All subsequent calls of triggerAttack and triggerRelease will be scheduled along the transport.
const fmSynth = new Tone.FMSynth().toDestination();
fmSynth.volume.value = -6;
fmSynth.sync();
// schedule 3 notes when the transport first starts
fmSynth.triggerAttackRelease("C4", "8n", 0);
fmSynth.triggerAttackRelease("E4", "8n", "8n");
fmSynth.triggerAttackRelease("G4", "8n", "4n");
// start the transport to hear the notes
Tone.Transport.start();Returns this
triggerAttackRelease()
Section titled “triggerAttackRelease()”triggerAttackRelease(notes: Frequency | Frequency[], duration: Time | Time[], time?: Time, velocity?: number): thisInvoke the attack phase, then after the duration, invoke the release.
Parameters
Returns this
unsync()
Section titled “unsync()”↳ inherited from Instrument
unsync(): thisUnsync the instrument from the Transport
Returns this
getDefaults()
Section titled “getDefaults()”static
getDefaults(): SamplerOptionsReturns all of the default options belonging to the class.
Returns SamplerOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()