Sound comparison (CTRL-G) real Elk and 4 emulators

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
Post Reply
User avatar
0xC0DE
Posts: 290
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Sound comparison (CTRL-G) real Elk and 4 emulators

Post by 0xC0DE » Thu Apr 11, 2019 7:19 pm

Can you hear the difference?

Real Electron, waveform as output by the speaker is not a simple square wave:

real.png
Listen:
real.zip
(421.28 KiB) Downloaded 16 times

Electroniq (my own Electron emulator), square wave:

electroniq.png
Listen:
electroniq.zip
(359.71 KiB) Downloaded 11 times

Electrem, square wave:

electrem.png
Listen:
electrem.zip
(381.56 KiB) Downloaded 9 times

Elkulator, square wave, but sounds slightly lower than the other emulators and the real Electron:

elkulator.png
Listen:
elkulator.zip
(356.47 KiB) Downloaded 9 times

MAME, square wave:

mame.png
Listen:
mame.zip
(380.69 KiB) Downloaded 9 times

So, to my ears, most emulators sound pretty close to the real Elk. Except for Elkulator which sounds slightly lower. And the waveform of a real Elk is definitely not square so it produces a 'richer' sound.
0xC0DE
:idea: Follow me on Twitter :idea: Visit my YouTube channel featuring my demos for Acorn Electron and BBC Micro

User avatar
SarahWalker
Posts: 1190
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by SarahWalker » Thu Apr 11, 2019 8:06 pm

The non-squarewaveness of the real machine should be a combination of filtering, noise/interference and poor frequency response of the cheap speaker.

User avatar
Richard Russell
Posts: 897
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by Richard Russell » Thu Apr 11, 2019 9:52 pm

0xC0DE wrote:
Thu Apr 11, 2019 7:19 pm
And the waveform of a real Elk is definitely not square so it produces a 'richer' sound.
Whilst that may well be true, it's perhaps worth noting that the waveform being very different doesn't imply that the sound will be different. For example these two waveforms should sound identical, because they differ only in the phase of the harmonics, and the ear isn't sensitive to phase:

fourier.png

User avatar
Rich Talbot-Watkins
Posts: 1530
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by Rich Talbot-Watkins » Fri Apr 12, 2019 9:39 am

Richard Russell wrote:
Thu Apr 11, 2019 9:52 pm
Whilst that may well be true, it's perhaps worth noting that the waveform being very different doesn't imply that the sound will be different. For example these two waveforms should sound identical, because they differ only in the phase of the harmonics, and the ear isn't sensitive to phase:
Yes! This is something that is not often appreciated! Here are a couple of examples in WolframAlpha to demonstrate the point.

Odd harmonics at same phase
Odd harmonics at different phases

User avatar
Rich Talbot-Watkins
Posts: 1530
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by Rich Talbot-Watkins » Fri Apr 12, 2019 1:19 pm

Here's a spectrum analysis of the real one and ElectrEm's, for comparison:

Real
real.png
ElectrEm
electrem.png
Both dominant in odd harmonics, as per a pure square wave, but the real one is somehow more filtered. Not sure why the even harmonics in ElectrEm's waveform are so dominant, when it looks so convincingly like a square wave. Might be to do with the window function I used, although the actual output from the speaker (as opposed to the input to it) will introduce artefacts as well.
Last edited by Rich Talbot-Watkins on Fri Apr 12, 2019 1:20 pm, edited 1 time in total.

User avatar
Richard Russell
Posts: 897
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by Richard Russell » Fri Apr 12, 2019 2:52 pm

Rich Talbot-Watkins wrote:
Fri Apr 12, 2019 1:19 pm
Might be to do with the window function I used.
[pedant]There's no such thing as a 'Hanning' window! A 'Hann' window yes, but calling it 'Hanning' for its similarity with 'Hamming' is not to be encouraged.[/pedant]
Last edited by Richard Russell on Fri Apr 12, 2019 2:55 pm, edited 2 times in total.

ThomasHarte
Posts: 475
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by ThomasHarte » Sun Apr 21, 2019 3:11 am

Using no science whatsoever, I played about with the filtering options I can apply in Clock Signal for free and subjectively thought that applying a 7kHz lowpass filter sounded most similar? Heavily subject to prejudices about nice round numbers, of course. It's attached.
Attachments
Electron 7kHz.wav.zip
(10.04 KiB) Downloaded 6 times
Last edited by ThomasHarte on Sun Apr 21, 2019 3:12 am, edited 1 time in total.

User avatar
0xC0DE
Posts: 290
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by 0xC0DE » Mon Apr 22, 2019 10:35 am

No science involved here either, and no audio expert either :mrgreen:
To be honest it sounds just a tiny bit too high. I can see the difference in wave lengths when comparing all the sounds in Audacity.
And the waveform is odd(?), no negative values. Have no idea if that really matters.

clk.png
0xC0DE
:idea: Follow me on Twitter :idea: Visit my YouTube channel featuring my demos for Acorn Electron and BBC Micro

User avatar
Richard Russell
Posts: 897
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by Richard Russell » Mon Apr 22, 2019 10:53 am

0xC0DE wrote:
Mon Apr 22, 2019 10:35 am
no negative values. Have no idea if that really matters.
Adding a DC offset, i.e. a component at zero frequency, isn't going to affect the acoustic spectrum or the subjective sound. But it may not be good for your loudspeaker, if it gets that far.

ThomasHarte
Posts: 475
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Sound comparison (CTRL-G) real Elk and 4 emulators

Post by ThomasHarte » Wed Apr 24, 2019 1:39 am

Richard Russell wrote:
Mon Apr 22, 2019 10:53 am
0xC0DE wrote:
Mon Apr 22, 2019 10:35 am
no negative values. Have no idea if that really matters.
Adding a DC offset, i.e. a component at zero frequency, isn't going to affect the acoustic spectrum or the subjective sound. But it may not be good for your loudspeaker, if it gets that far.
You mean were the one program in charge of the entire machine? On the Mac and in the Linux distribution that I tried, it seemed that the mixer treats all individual application streams as signed, with 0 as the resting level. So if an emulator were to output anything other than the centre value when attempting to be silent then it would be contributing a DC offset to the entire system. Clock Signal attempts to be a good citizen, so it maps the Electron's no-output level to the operating system's no-output level.

Otherwise: when I get a chance to be a bit more rigorous about it, I'll try to find more suitable value for filtering. Or I could chuck a few other numbers in and see what happens. I'm torn.

Post Reply