Sequence musical event with Web Audio API

143 Views Asked by At

I would like to sequence musical events with web audio, to do a simple musical piece. I'm just gettin started with web audio & I'm looking for tips or pointers in the right direction to be able to sequence simple events one after the other. I know how to make a playable synth with web audio but what i want is to make a small composition:

Example of what I mean by sequencing events (or making a composition):

1- at time 0 : 1 oscillator is paying a part that will end after 3 minutes. 2- after 1 minute another oscillator starts another part that will stop after 30 sec. 3- after 2 minutes an audio file starts (let's say a prerecorded bass)

How do we sequence (start & stop) different parts at a different time ?

I know how to make a synth with web audio but i would like to time events in a timeline. Where should I start ?

I guess my question is "what is the best way to trigger a function a certain amount of time after another one or when one is finished with Web Audio?"

thx!

0

There are 0 best solutions below