message: adding onsilence test
diff: @@ -3,6 +3,7 @@ import { Instrument } from "Tone/instrument/Instrument";
  import { connectTo } from "./Connect";
  import { Offline } from "./Offline";
  import { OutputAudio } from "./OutputAudio";
  +import { Monophonic } from "Tone/instrument/Monophonic";
  export function InstrumentTest(Constr, note, constrArg?, optionsIndex?): void {
  @@ -202,5 +203,20 @@ export function InstrumentTest(Constr, note, constrArg?, optionsIndex?): void {
  expect(buffer.getRmsAtTime(0.9)).to.be.closeTo(0, 0.1);
  });
  });
  +
  + it("invokes onsilence", (done) => {
  + Offline(() => {
  + const instance = new Constr(constrArg);
  + if (instance instanceof Monophonic) {
  + instance.triggerAttackRelease(note, 0.1, 0);
  + instance.onsilence = (voice) => {
  + expect(voice).to.equal(instance);
  + done();
  + };
  + } else {
  + done();
  + }
  + }, 3);
  + });
  });
  }
  