Open NTxC opened 4 months ago
So excellent i love this idea and feature :) Thanks a lot
Okay, I haven't examined the code yet but by the example it looks like:
Is that a correct assessment of the behaviour?
system/drivesound
Is "drivesound" some existing library or product? Does it apply to more than just Hatari?
Supplied sounds are of an Epson SMD-480L disk drive from a YouTube video by Stefan Lindberg
Do these have permission for redistribution, or are we expecting the user to download and supply their own to make this feature work? Maybe I could provide some built in synthesized approximations if these are not licensable.
Ideally we could embed a default set of samples and the user would not have to supply anything.
Conversion of sample rates
I think a simple bilinear resampling should be sufficient here, and the default samples at 48k should be enough. If the user wishes to use a different samplerate and wants better resampling they can override the default samples.
- A compressor/limiter instead of simple clipping of the result of sample addition to prevent overflows/underflows.
I don't think we should construct an unnatural audio processing chain like this. If the problem is overflow, it can be solved more simply with an option to reduce the overall volume, of both Hatari's sound and the floppy sound.
Okay, I haven't examined the code yet but by the example it looks like:
- play a startup sound when the motor turns on
- play looping motor sound while the motor remains on
- play a click for 1 track seek
- play a seek forward/back sound for multi-track seek
Is that a correct assessment of the behaviour?
Yes. It's also important to highlight that the seek fwd/back sounds aren't always played from the beginning; the starting point of playback is based on the current position of the drive's head.
system/drivesound
Is "drivesound" some existing library or product?
It is not - in this case it's just a folder name based on the branding of the patch. Perhaps it would be better to choose a directory like system/hatarib/drivesound
instead.
Does it apply to more than just Hatari?
A few years ago I implemented a similar patch use in Steem SSE, but I never released it to the public, so I guess it doesn't in the end.
Supplied sounds are of an Epson SMD-480L disk drive from a YouTube video by Stefan Lindberg
Do these have permission for redistribution, or are we expecting the user to download and supply their own to make this feature work? Maybe I could provide some built in synthesized approximations if these are not licensable.
Ideally we could embed a default set of samples and the user would not have to supply anything.
The author of the original video with the recording of the drive sounds granted me full permission for redistribution (you can verify it in the comment section), so we can embed the samples from my .zip archive directly in the hatariB repository.
Conversion of sample rates
I think a simple bilinear resampling should be sufficient here, and the default samples at 48k should be enough. If the user wishes to use a different samplerate and wants better resampling they can override the default samples.
Good idea, I'm all for it.
- A compressor/limiter instead of simple clipping of the result of sample addition to prevent overflows/underflows.
I don't think we should construct an unnatural audio processing chain like this. If the problem is overflow, it can be solved more simply with an option to reduce the overall volume, of both Hatari's sound and the floppy sound.
You're right, volume control should be sufficient to solve the problem.
Also, I noticed that sometimes when a drive sound is stopped it emits an audible short "click" which I presume comes from the possibility that the sound did not end at a zero-crossing, sort-of like a recording with a DC offset when it finishes playback.
I added a Github Actions CI build to this branch, in case anyone would like to try it.
Builds can be found here: https://github.com/bbbradsmith/hatariB/actions/workflows/build-ntxc-drivesound.yml
The builds are currently red because RPi fails, but there are valid Windows and Ubuntu builds inside.
(Otherwise, I haven't forgotten this, it's just taken time to get to.)
References for investigation:
Here's my little contribution to this amazing project.
NTxC's DriveSound v0.9
Experience the authentic Atari ST floppy disk drive sounds as your favorite games/programs are loading in your hatariB libretro core! Check out the demo here: https://www.youtube.com/watch?v=1di2z2WGTbs
Download: NTxCs_DriveSound_v0.9.zip
In the attached archive are:
code/
, this repo's files modified/created to introduce this neat feature into hatariB (every change is marked with#ifdef __DRIVESOUND__
),system/
, the sounds themselves. The sounds need to be placed insystem/drivesound
in the main RetroArch directory.Supplied sounds are of an Epson SMD-480L disk drive from a YouTube video by Stefan Lindberg, linked here: https://www.youtube.com/watch?v=X_JCWWHKXIc
A unique feature of this patch is that there are two separate seeking sounds: one for backward seeking and one for forward seeking. This adds a lot to the authenticity of the experience.
What can be improved/added:
system/drivesound/drive_<name>_<rate>.wav
files for each of the core's supported sample rates. Files need to be mono, 16-bit signed PCM.