Updated playground
This commit is contained in:
parent
4bf6f78a00
commit
972be000c8
1 changed files with 11 additions and 7 deletions
|
@ -13,13 +13,17 @@ setTimeout(async () => {
|
||||||
// d.resolve(null)
|
// d.resolve(null)
|
||||||
// })
|
// })
|
||||||
// await d.promise
|
// await d.promise
|
||||||
await sheet.sequence
|
const {gainNode, audioContext} = await sheet.sequence.attachAudio({
|
||||||
.attachAudio({
|
source: 'http://localhost:5000/audio.mp3',
|
||||||
source: 'http://localhost:5000/Kai%20Engel%20-%20Moonlight%20Reprise.mp3',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
console.log('ready')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const lowerGain = audioContext.createGain()
|
||||||
|
gainNode.disconnect()
|
||||||
|
gainNode.connect(lowerGain)
|
||||||
|
|
||||||
|
lowerGain.gain.setValueAtTime(0.01, audioContext.currentTime)
|
||||||
|
lowerGain.connect(audioContext.destination)
|
||||||
|
|
||||||
sheet.sequence.position = 11
|
sheet.sequence.position = 11
|
||||||
await sheet.sequence.play({
|
await sheet.sequence.play({
|
||||||
iterationCount: 4,
|
iterationCount: 4,
|
||||||
|
|
Loading…
Reference in a new issue