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

Audio Support #11

Closed
3 of 4 tasks
RobDavenport opened this issue Aug 2, 2022 · 4 comments
Closed
3 of 4 tasks

Audio Support #11

RobDavenport opened this issue Aug 2, 2022 · 4 comments
Labels
Console Related to the Console crate enhancement New feature or request help wanted Extra attention is needed

Comments

@RobDavenport
Copy link
Member

RobDavenport commented Aug 2, 2022

This issue is tracking the development of audio support in the console.

Currently, this include a few main action items:

  • Determine what audio methods we can support: samplers, FM synthesis, something else?
  • Add in audio playback to the console
  • Add sound & music editing to the editor: related issue
  • Inclusion of presets

There's a lot of different ways to produce audio. Simple wave forms like sin, square, saw, are ok but it doesn't really fit the goals of the project. I initially wanted to go with an FM synthesizer, a la audio-test but theres a few issues. One, I'm not even sure if my FM algorithm is correct. Unfortunately DSP is a bit out of my expertise but I did what I could. And Two, FM Synthesis is really hard to understand - even by professionals. Three, it's great for certain kinds of sounds, but not so great for percussion like drums and other SFX.

I think it does sound really cool, such as the old Sega Genesis/Megadrive and old DOS games which utilized these heavily, and really gives off this neo-retro vibe. I think we should support a FM synth at some point in the future, but not initially.

So the now proposal is to go with a sampler like the SNES. Let users import/load samples directly from disk and provide some framework to allow them to play different notes on the scale, play add different effects, and such. However I'm really not familiar with this kind of technology at all and don't even know where to start development on it.

Useful links about audio programming:
http://map.grauw.nl/resources/sound/yamaha_opl4.pdf
https://www.fit.vutbr.cz/~arnost/opl/opl3.html
http://jp.oplx.com/opl2.htm
https://doomwiki.org/wiki/OPL_emulation

@RobDavenport RobDavenport added enhancement New feature or request help wanted Extra attention is needed labels Aug 2, 2022
@RobDavenport RobDavenport pinned this issue Aug 2, 2022
@RobDavenport
Copy link
Member Author

Have started working on the audio crate here: https://github.com/gamercade-io/gamercade_audio

@RobDavenport
Copy link
Member Author

General update on audio: We are able to playback both FM synth sounds & wavetable (sample) in the previously mentioned crate, including defining a "song" to be played back across multiple channels

@RobDavenport
Copy link
Member Author

Another general update on audio: Have rewritten some of the audio internals to better match the emulator spec, so it's taking a bit longer before I can start integrating into the console & editor, but I believe this structure is better overall for how we should actually handle sound playback (as well as dealing with rollbacks over the network).

@RobDavenport RobDavenport added the Console Related to the Console crate label Aug 22, 2022
@RobDavenport RobDavenport mentioned this issue Aug 22, 2022
7 tasks
@RobDavenport
Copy link
Member Author

Going to close this since I'm tracking this via PR instead

@RobDavenport RobDavenport unpinned this issue Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Console Related to the Console crate enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant