I am totally a non-musical person and I have no idea how to find a solution for this. I have a simple CSS animation that I want to fire via Javascript the moment a thunder (peak of the sound bar) is detected in the audio playing in the background.
CSS Animation:
<style>
div {
width: 100px;
height: 100px;
background: red;
position: relative;
animation: mymove 5s 1 ease-in-out;
}
@keyframes mymove {
from {top: 0px;}
to {top: 200px;}
}
</style>
<div></div>
<script>
window.onload = function() {
new Audio("./070115-glorious-early-morning-t-storm-19045.mp3").play();
};
</script>
Audio Track: https://pixabay.com/sound-effects/070115-glorious-early-morning-t-storm-19045/
Thank you!
I have found many guides with javascript regarding audio sync, but they all relate to creating audio bars for the whole range of sounds, while I just want for one particular one.