I'm trying to build a self-writting music note website by using a audio pitch detector library from https://github.com/cwilso/pitchdetect. To do this, I am modifying the given library to save the sound of the music note into a variable so that I can use it for my project. The given library can only give the music note pitch in real-time audio and so when it goes back to being silent, the music pitch becomes null. After many hours of analyzing the library, I believe I need to find a way to save the window.requestAnimationFrame into a variable to then turn it into a note for a music sheet. But I am having difficulty saving the ongoing audio data in a variable text form and was wondering if anyone can help me.