Is drive sound emulation possible?

Support and general discussion.
Post Reply
User avatar
Banjo
Posts: 16
Joined: Mon 03 Sep, 2018 3:14 pm
Contact:

Is drive sound emulation possible?

Post by Banjo »

Since I'm new to PCem, forgive me if this is commonly asked or indeed can be done and I just don't know it yet... but can we use "drive sounds" for floppy drives in PCem like you can in things like WinUAE (Amiga emulator)?

Until I started messing with PCem, I didn't think I'd ever want such a thing, but the nostalgic beeps of emulating an old XT now makes me really want to hear those grinding floppy drive sound effects too!

If it's not possible, fair enough, but I just wanted to ask as a quick search didn't show up a definitive answer that I could see

(I also miss the distinctive hum and shutdown whine of my old Amstrad 286's fan, but I expect fan noise is outside the scope of most peoples' emulation wishes!)
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Is drive sound emulation possible?

Post by SarahWalker »

This isn't currently implemented, but has been on my list for a while. Much of the infrastructure for floppy drive sound emulation is already present, I just haven't got round to finishing it off.
User avatar
xXLuckyXx
Posts: 66
Joined: Tue 06 Feb, 2018 3:52 pm

Re: Is drive sound emulation possible?

Post by xXLuckyXx »

Yeah. We already have that beep sound when a machine is turning on. Floppy sounds would be a great addition.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

<ponderousfeaturecreepbrainfart> For far additional immersion spackle we'd also need fan whirs, speed-modulated hard drive whirs and writes, monitor hums (based on emulated sync) and mechanical keyboard clacking (key press and release sounds with a pitch variance table for each key), and maybe some OpenAL EFX usage to spatialize and filter these sounds for 5.1 or binaurally or have it in a VR video backend driver through OpenGL 3.0 (which would need all of the parts modeled, no easy feat). Sadly no way to emulate the scent of a fresh computer though. </ponderousfeaturecreepbrainfart>


I don't have a good microphone though so sampling drive noises would be rather noisy. Can probably at least do the keyboard stuff. PCem asset production could be interesting.
Cheez
Posts: 86
Joined: Tue 19 Dec, 2017 4:08 am

Re: Is drive sound emulation possible?

Post by Cheez »

xXLuckyXx wrote: Sun 09 Sep, 2018 8:09 pm Yeah. We already have that beep sound when a machine is turning on. Floppy sounds would be a great addition.
But that's part of the machine. It's not an external noise.
leilei wrote: Mon 10 Sep, 2018 12:47 amspeed-modulated hard drive whirs and writes, monitor hums (based on emulated sync)
Let's be real here, i'd want these. Hell, for hard drives, go all the way. Emulate various classics. I got dozens of them, i'd just need a program to give them controlled activity patterns to get some useful sound effects.
User avatar
Banjo
Posts: 16
Joined: Mon 03 Sep, 2018 3:14 pm
Contact:

Re: Is drive sound emulation possible?

Post by Banjo »

I'd love all those sounds, but drive sounds are my only real "must have" for a nostalgic feel.

Getting various fan whines and hums would be awesome, but probably a lot of work for something that would (at least in my case) be drowned out by my real PC's fans, keyboard clacks, etc. anyway. Nothing sounds like that distinctive floppy "grind" though, as I've been reminded as I bought a new external USB FDD recently to image some old disks, and found the sound it makes both nerve-wracking ("is that disk corrupted?!") and deeply nostalgic. :)

I do long for the smell my old PCs used to make, though. Not sure if it's false memory, but I don't find new ones smell the same, though that's probably because the old ones were likely badly cooled or overheating and we didn't know it! My old Amstrad 286 had a scent I can still recall (and when it shut down, it gave a cute little whine that's not too dissimilar to ORAC's shutdown sound effect from Blake's 7). My most vivid memory of my 486/DX (which cost a small fortune, and I had to get a loan for it!) is the smell and ambient hum it gave off, too.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

this may or may not be something i'm working on


Some theories crossed my mind during sleep and thus, sound_stuff.c was born on Sep 16 2018

- reads 2 48khz 16bit mono raw PCM samples from roms/
- there's a very subtle speed variation with a sine on the whirr
- the write sound is just naively read from readflash as I haven't looked deep into the disc code to do it for real yet
- many iir filters are used, and a light reverb effect is applied. No OpenAL EFX involved
- sounds BAD when execution drops. this stuff probably needs a second thread and sound buffer
- i thought about doing floppy sounds since i couldn't find much of the 'ddnoise' stuff that wasn't hooked up as far as i can tell. I had my own ideas for that and i may/may not implement floppy sounds.
ChronicEel93
Posts: 22
Joined: Thu 29 Sep, 2016 7:17 pm

Re: Is drive sound emulation possible?

Post by ChronicEel93 »

I'm actually in love with where this thread is going. I'd recommend using a shorter sample for the clicking sounds, if it's too long (and it is) it can sound a bit weird when it clicks a lot. (sort of like when physics objects get stuck in the ground in Half Life). I'd also recommend toning down the reverb on the clicking, but that's just a personal preference! It sounds awesome, and I hope to see this become a feature.
shareware123
Posts: 8
Joined: Tue 22 May, 2018 8:23 pm

Re: Is drive sound emulation possible?

Post by shareware123 »

LOVE THIS!
User avatar
Banjo
Posts: 16
Joined: Mon 03 Sep, 2018 3:14 pm
Contact:

Re: Is drive sound emulation possible?

Post by Banjo »

leilei wrote: Tue 18 Sep, 2018 11:49 am this may or may not be something i'm working on


Some theories crossed my mind during sleep and thus, sound_stuff.c was born on Sep 16 2018

- reads 2 48khz 16bit mono raw PCM samples from roms/
- there's a very subtle speed variation with a sine on the whirr
- the write sound is just naively read from readflash as I haven't looked deep into the disc code to do it for real yet
- many iir filters are used, and a light reverb effect is applied. No OpenAL EFX involved
- sounds BAD when execution drops. this stuff probably needs a second thread and sound buffer
- i thought about doing floppy sounds since i couldn't find much of the 'ddnoise' stuff that wasn't hooked up as far as i can tell. I had my own ideas for that and i may/may not implement floppy sounds.
That's pretty darn awesome!

As I said, floppy drive sounds are my only "must have" but those HDD sounds and - even more so - that ambient noise are amazingly atmospheric and nostalgic!
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Is drive sound emulation possible?

Post by SarahWalker »

That's a noisy hard drive you have there. The speed variation sounds pretty good to me.

For floppy stuff, it might be (well, probably is) worth looking at what I did for B-em, of which you've already found vestigial references. Code is at https://github.com/stardot/b-em/blob/ma ... /ddnoise.c (using Allegro unfortunately), 3.5" samples at https://github.com/stardot/b-em/tree/master/ddnoise/35 - there are also 5.25" samples there but they're at too slow a step rate for PC stuff. The 3.5" samples were sampled from an Acorn Electron Plus 3 (Chinon F353 single-sided drive), but sound a lot like the drive in my original 486.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

I actually sampled a PD sample of a table saw and sampled an old keyboard (with heavy cleanup). My mics are too noisy to sample my real drives.

One idea for floppy sound I have would be playing sounds from different positions in a long floppy read sample according to what sector's read/written to. i'd have to record a bad diskette getting cloned for that

MAME does have floppy drive samples but they don't sound anything close to work with IMO.

Since the video, i've implemented just reading sounds from roms/whatevermachineromset/idle.pcm etc, i'd do a sounds/whatevermachineromset/ etc or sounds/reallyloudolddeskstar but that'd mean entering the Wx zone since i've never messed with Wx gui editing before and so far all of this stuff is in one new c file

(what's unmentioned but heard in the video is pc speaker echo/pan, which was an important learning step prior to making hdd noise)
BigAlUK
Posts: 40
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Is drive sound emulation possible?

Post by BigAlUK »

I'm tempted to suggest that you add the sound that a real drive makes when its bearings finally wear out.

Or the sound that old capacitors make when they finally burst and explode.

These sounds may be soon lost to humanity as the real machines we emulate finally bite the dust.

:)
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

Maybe the clang of an Orchid Voodoo......
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Is drive sound emulation possible?

Post by SarahWalker »

BigAlUK wrote: Sun 23 Sep, 2018 10:14 am I'm tempted to suggest that you add the sound that a real drive makes when its bearings finally wear out.

Or the sound that old capacitors make when they finally burst and explode.
Having had an old capacitor explode and hit me in the forehead recently, I suspect this has a high chance of triggering PTSD.
BigAlUK
Posts: 40
Joined: Mon 15 Feb, 2016 8:27 pm

Re: Is drive sound emulation possible?

Post by BigAlUK »

Yes - hurts, doesn't it.
I've been hit by a deep fried chip too :)
And it's the surprise that hurts the most
Followed by a sudden feeling of deep depression.
ChronicEel93
Posts: 22
Joined: Thu 29 Sep, 2016 7:17 pm

Re: Is drive sound emulation possible?

Post by ChronicEel93 »

Could possibly use contact mics to sample drive sounds? Could then mix them properly (simulated speakers for headphone users!!!) for maximum nostalgia! That would also probably be pretty hard.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

OK I've made floppy sounds now and i've done it this way:

- there's two samples used for the head moving, and 2 samples used for the step, and 2 sounds used for the motor (which right now only turns on when seek is called and loops 6 times then stops)
- fdc.c has a bunch of stuff_floppy_seek calls to make the simulated head move from track to track
- the head samples are tiny (~4kb) and get looped quickly and slowly changing in speed depending on where the head is. The volumes also variate (louder on one sample than the other depending on the direction moving)
- I sampled my floppy drive for sounds, that was noisy and a lot of the sound ended up cleaned out roughly, so it's missing all the necessary highs for a believable floppy drive.
- There's also an adgold_lowpass_iir on the samples depending on where the head is
- I hastily hacked in a delay to get the fdd to stop thinking until the head stops (it's the only way i could hear more of that boot seek to tune my head movement speed), unfortunately this is the wrong way to go about things as you can see the floppy access is really really slow in this video. I actually trimmed a minute of it out
- scandisk on a write-protected disk is intended to produce the rapid stepping noise (I had that in my recording as reference to see how fast it would be allowed)
- the code is a mess and does not yet handle multiple drives :D EDIT: now it does. yay structs


EDIT 2: I've recently attempted keyboard simulation and my first attempt (reading pcem_key, lookup table to have pans and pitches) have been bad so far. The arrows and the insert/pgup/etc keys seem to fire off way too many sounds)
szadycbr
Posts: 295
Joined: Mon 21 Nov, 2016 6:23 pm

Re: Is drive sound emulation possible?

Post by szadycbr »

Thank You leilei, this is very nice, maybe still need to be polished but really this drive sounds idea is very very cool and You have done great job. it all could disappear in near future, thanks to You and like minded people, hopefully it will be preserved. :)
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

I haven't been working on it since that video though, procrastinplanning on the CD-ROM sounds at the moment, and there's the GUI integration ideas. The hard drives could really use a mute button


and while i'm proud of how my floppy drive sounds are still, i'm not sure if it could be versatile enough to emulate a "Floppotron" as I haven't really ran much head seek exploiting stuff. I've only tuned it against the BIOS boot up seek.
User avatar
286-man
Posts: 2
Joined: Tue 02 Jun, 2020 10:29 am

Re: Is drive sound emulation possible?

Post by 286-man »

I have some CD-ROM sounds for You, leilei. I own a quad speed ATAPI CD-ROM drive named MITSUMI CRMC-FX400E. I'd be happy if this should be of any help to You. The CD-ROM sounds were taken by an old digital still camera about 4 years ago. There's some silent background noise in the recordings, where the desktop PSU is audible. Apologies, if the PSU noise is disturbing. I've made these mp3 sounds by ripping the original movies from my camera. Tell me, whether You need a cleaner sound recording, I believe the old CD-ROM drive is still in working state. I noticed, that other pieces of this FX400E model in my posession are 90% defunct now. I add sounds of SONY MP-F17W-86 3.5" 1.44MB FDD. Thanks a lot to You all for the PCem emulator! Here are the attachments.
Attachments
MOV05334_SONY FDD MPF17W86_copy dir.zip
(171.3 KiB) Downloaded 269 times
External MITSUMI FX400E on LPT port_screenshot w model string.TIF
External MITSUMI FX400E on LPT port_screenshot w model string.TIF (141.19 KiB) Viewed 14716 times
MOV05252_MITSUMI FX400E funnel scan.zip
(46.48 KiB) Downloaded 244 times
MOV05251_MITSUMI FX400E random scan.zip
(277.57 KiB) Downloaded 271 times
MOV05250_MITSUMI FX400E running a prog.zip
(368 KiB) Downloaded 241 times
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is drive sound emulation possible?

Post by leilei »

Sounds a little fast/high, though bringing it down -1.5 semitones makes it sound more familiar to the CRMC-FX400 :)
User avatar
286-man
Posts: 2
Joined: Tue 02 Jun, 2020 10:29 am

Re: Is drive sound emulation possible?

Post by 286-man »

You're absolutely right. I own FX400, FX400D and FX400G models as well. The FX400E and FX400G are probably still working. My FX400 does actually read CDs, but at running commands of various drive tests, it gets weird lockups. The testing software for DOS, that I used is called CD Disc Detective; CDquick; ScanCD; Seedee. However, the best program for testing is PC Doctor for DOS, which is sadly a paid version, so I cannot upload it :( I used these programs to make the drive perform the tests with noise that is heard on my recordings. If necessary, I can search the web again to find links to the testing software or I guess I'll upload it directly. I have the FX400E and FX400G drives at hand, but as for the FX400, I'd have to mount it internally into a spare PC. Concerning the internal drives, You can still use one utility included in the PowerIDE called PWRDIAG. My FX400E is external.
Attachments
seedee13.zip
(26.71 KiB) Downloaded 268 times
scncd102.zip
(39.82 KiB) Downloaded 271 times
CDQCK120.zip
(167.95 KiB) Downloaded 261 times
CD_DTCTV.ZIP
(96.38 KiB) Downloaded 244 times
devo343
Posts: 3
Joined: Sat 13 Feb, 2021 5:11 pm

Re: Is drive sound emulation possible?

Post by devo343 »

i know this is old but is there any update to this i find the audio aspect of a computer is really limiting on this emulator
Post Reply