Updated playground

This commit is contained in:
Aria Minaei 2021-10-01 10:53:48 +02:00
parent 4bf6f78a00
commit 972be000c8

View file

@ -13,13 +13,17 @@ setTimeout(async () => {
// d.resolve(null)
// })
// await d.promise
await sheet.sequence
.attachAudio({
source: 'http://localhost:5000/Kai%20Engel%20-%20Moonlight%20Reprise.mp3',
})
.then(() => {
console.log('ready')
const {gainNode, audioContext} = await sheet.sequence.attachAudio({
source: 'http://localhost:5000/audio.mp3',
})
const lowerGain = audioContext.createGain()
gainNode.disconnect()
gainNode.connect(lowerGain)
lowerGain.gain.setValueAtTime(0.01, audioContext.currentTime)
lowerGain.connect(audioContext.destination)
sheet.sequence.position = 11
await sheet.sequence.play({
iterationCount: 4,