torch2424 / wasmboy

Game Boy / Game Boy Color Emulator Library, 🎮written for WebAssembly using AssemblyScript. 🚀Demos built with Preact and Svelte. ⚛️
https://wasmboy.app/
GNU General Public License v3.0
1.39k stars 65 forks source link

Allow Audio Debugging #217

Closed torch2424 closed 5 years ago

torch2424 commented 5 years ago

Would be cool to do things like inspect each individual channel, and record audio on each channel.

Would also be nice to show live wave forms and all of that. Would be great for the debugger rebuild see #168

torch2424 commented 5 years ago

Here are some good recording libraries:

https://github.com/higuma/web-audio-recorder-js/blob/master/lib/WebAudioRecorder.js https://github.com/mattdiamond/Recorderjs/blob/master/src/recorder.js

Though it seems that they just get the PCM samples, and just append them to a buffer, and save that. Which we could do ourselves with the Lib callback functions.

torch2424 commented 5 years ago

Here are some great tests on the GB APU https://github.com/LIJI32/SameSuite/tree/master/apu

Would be great to see what they are testing, and how we can visualize this.

torch2424 commented 5 years ago

Some useful tools for audio debugging (Thanks for the suggestions DevEd and beware, and anyone else on the awesome-gbdev discord):

Other random notes:

torch2424 commented 5 years ago

Some resources for visualizing audio:

https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Visualizations_with_Web_Audio_API https://noisehack.com/build-music-visualizer-web-audio-api/ https://webaudioapi.com/samples/visualizer/ https://github.com/borismus/webaudioapi.com/tree/master/content/posts/visualizer

I also remember seeing a gameboy demo of someone playing zelda with audio levels, but I cant find it 😢

FOUND IT: https://codepen.io/gregh/post/recreating-legendary-8-bit-games-music-with-web-audio-api

torch2424 commented 5 years ago

Moved the volume envelopes into it's own issue. As I don't personally see that as that important currently.