Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interest in "sound" output? #9

Open
bkuker opened this issue Jan 8, 2025 · 2 comments
Open

Interest in "sound" output? #9

bkuker opened this issue Jan 8, 2025 · 2 comments

Comments

@bkuker
Copy link

bkuker commented Jan 8, 2025

After seeing a G15 play music on a youtube channel I watch (https://www.youtube.com/watch?v=-HibkocVn1U&t=124s) I quickly hacked a similar sound output onto your emulator. It worked the first time - no surprise, your emulator is great!

Would you have any interest in a pull request if I were to take the time to clean it up?

@pkimpel
Copy link
Owner

pkimpel commented Jan 8, 2025

Bill - That's amazing! I also follow the Usagi channel and saw that video a couple of weeks ago, but never thought that playing music in my emulator would be feasible -- getting the bell to ring was all that I was brave enough to attempt.

I would definitely be receptive to a pull request for your music feature.

Thanks very much for your efforts in this direction. It's great to see someone else interested enough in the G-15 to actually try to extend retro-g15 -- it's kind of an obscure architecture.

@bkuker
Copy link
Author

bkuker commented Jan 8, 2025

Awesome, thanks!

The short version is that the WebAudio API lets you generate an arbitrary waveform in an buffer of floats and set it to play in a loop. The hardware hack to play those songs was just to connect the output of one or two lines' read amplifiers to the audio amplifier. In the emulator it's just a matter of translating a data line to an audio buffer.

The one shortcoming is that the audio is not synced perfectly to the word clock or the drum rotation, but it is perfectly fit for the music generation techniques that we've seen on the tape images we have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants