Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
Reproduce tones and white noise (simultaneously)

I'm working on an app that needs to reproduce 4 tones (each with different frequency and volume) and 1 white noise simultaneously (with its own volume). I am able to reproduce the 4 tones simultaneously, but the white noise is reproduce when the other 4 stop.

This is my snippet right now...

let frequencies = [
  {volume: 10, frequency: 500},
  {volume: 20, frequency: 2500},
  {volume: 30, frequency: 7500},
  {volume: 5, frequency: 9000},
]

async function play() {
  await Tone.start()

  frequencies.forEach((f) => {
    const synth = new Tone.Synth().toDestination()
    synth.volume.value = f.volume
    synth.triggerAttackRelease(f.frequency, 3);
  })

  addWhiteNoise();
}

function addWhiteNoise() {
  const noise = new Tone.Noise('white').start(Tone.now() + 1);
  noise.volume.value = -10

  const autoFilter = new Tone.AutoFilter({
    frequency: "200n",
    baseFrequency: 200,
    octaves: 8,
  }).toDestination().start()

  noise.connect(autoFilter)
  autoFilter.start()
}
<script src="https://unpkg.com/tone@14.7.77/build/Tone.js"></script>
<button onclick="play()">Play</button>

If you know of any library capable of what I describe in an easier way please let me know.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!