summaryrefslogtreecommitdiff
path: root/client/lib/output.js
blob: e67b4d4d8e9679bb8ec1022bf8f6585eed1d52d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Tone from "tone";

let output = null;

export function getOutput() {
  if (!output) output = makeOutput();
  return output;
}

function makeOutput() {
  const compressor = new Tone.Compressor(-30, 3);
  const gain = new Tone.Gain(0.3);
  compressor.connect(gain);
  gain.toMaster();

  return compressor;
}