Sound enhacements round up
Closed this issue · 4 comments
HeathenUK commented
This is a mirror to a PR I have floating around (#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:
- Infinite duration and non blocking notes (either as a separate function or where duration is 0 or -1 for the existing function).
- Functions to alter only the volume or frequency of an infinite note already playing, without needing to issue a full new ahdio command.
- 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.
- 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!
- 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
All of these features in VDP would be nice
https://youtu.be/RQtKFgU7OYI
HeathenUK commented
The list above and the PR are essentially the same capabilities in that video with the addition of ADSR/FM-lite sound.
breakintoprogram commented
Closing this as 'Won't Do' as it is a duplicate of #31
HeathenUK commented
Thanks, wasn't sure whether Issues or PRs were the preferred means of tracking and discussion so I picked both!