breakintoprogram / agon-vdp

Official AGON QUARK Firmware: ESP32 VDP
MIT License
76 stars 27 forks source link

Sound enhacements round up #54

Closed HeathenUK closed 1 year ago

HeathenUK commented 1 year ago

This is a mirror to a PR I have floating around (https://github.com/breakintoprogram/agon-vdp/pull/31) but for the sake of tracking I wanted to list out the improvements to sound functions I humbly think are worthwhile in what I personally would suggest is priority order:

  1. Infinite duration and non blocking notes (either as a separate function or where duration is 0 or -1 for the existing function).
  2. Functions to alter only the volume or frequency of an infinite note already playing, without needing to issue a full new ahdio command.
  3. PCM audio. FabGL can play back 16KHz 8bit signed PCM samples and I would suggest mirroring the approach you've taken to bitmaps, uploading PCM data to a specified 'slot' in PSRAM (which is plenty big and fast enough for this). This opens the door to off the shelf .WAV assets and generally brings audio into the late 80s and early 90s 😆 I have this so high because other than storing the PCM data playback isn't dependent on other audio code (there's a dedicated playsamples function) so it's almost zero effort.
  4. Specifying a non-default waveform. My PR repurposes the currently ignored waveform byte in the VDU command to specify the audio function being called, and adds a new further function if a non standard wavetype is desired, but that's by no means necessary!
  5. Very basic ADSR/FM sounds - I carried across the 'chiptune' fabgl example more or less unchanged for this, just integrated into the way vdp organises its channel loops.
snakebyte69 commented 1 year ago

All of these features in VDP would be nice https://youtu.be/RQtKFgU7OYI

HeathenUK commented 1 year ago

The list above and the PR are essentially the same capabilities in that video with the addition of ADSR/FM-lite sound.

breakintoprogram commented 1 year ago

Closing this as 'Won't Do' as it is a duplicate of #31

HeathenUK commented 1 year ago

Thanks, wasn't sure whether Issues or PRs were the preferred means of tracking and discussion so I picked both!