"music" in Xenon meteors noise

Probably the most technical forum around. It does not have to be coding related, or assembly code only. Just talk about how you can use the AY chip to do cool sounding things :)
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: "music" in Xenon meteors noise

Post by Godzil »

I think it should be fairly easy to test, with enough sample to found the way the random is generated, just configure the channel to random, let it play for a long time and store the waveform, then convert that waveform for each output level, and with time you will get a repetition, and from that point, just find the math that produce the sequence.

It is probably what they have done in the link you put (I haven't checked them yet)
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: "music" in Xenon meteors noise

Post by Xeron »

Oricutron also has accurate AY noise (or should ;-) )
User avatar
Symoon
Archivist
Posts: 2301
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: "music" in Xenon meteors noise

Post by Symoon »

Xeron wrote:Oricutron also has accurate AY noise (or should ;-) )
I can't hear the "bells" with Oricutron on the Xenon-1 meteors screen though; maybe an embryo of it when I apply some noise reduction but nothing obvious as in the samples I posted.
I mean the sound is perfect, but might not have the original mistakes? ;)
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: "music" in Xenon meteors noise

Post by Godzil »

Obviously an emulator will miss the analog part (filter & so on) that are not impossible to emulate but really time consuming to get something accurate..
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: "music" in Xenon meteors noise

Post by ThomH »

Godzil wrote:Obviously an emulator will miss the analog part (filter & so on) that are not impossible to emulate but really time consuming to get something accurate..
Mine has a filter; it creates a wave at the chip's clock rate then performs a windowing filter to reduce it to your computer's sampling rate. But if there's a post-AY filter on the board then I haven't noticed it yet. Any idea what there real response range is? I can throw it in.
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: "music" in Xenon meteors noise

Post by Godzil »

ThomH wrote:
Godzil wrote:Obviously an emulator will miss the analog part (filter & so on) that are not impossible to emulate but really time consuming to get something accurate..
Mine has a filter; it creates a wave at the chip's clock rate then performs a windowing filter to reduce it to your computer's sampling rate. But if there's a post-AY filter on the board then I haven't noticed it yet. Any idea what there real response range is? I can throw it in.
There are at least a RC filter on the output.

Do you apply filter to mimic the real life way the signal is generated? Because it's not juste setting the voltage to a specific level, it's a bit more complexe in reality (due to a lot of factors)
This paper is interesting (but really hardcore if you are not a mad math person.. :D): https://ccrma.stanford.edu/~stilti/papers/blit.pdf
I had some other documentation if I find them I will share them :)
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: "music" in Xenon meteors noise

Post by ThomH »

Godzil wrote:
ThomH wrote:
Godzil wrote:Obviously an emulator will miss the analog part (filter & so on) that are not impossible to emulate but really time consuming to get something accurate..
Mine has a filter; it creates a wave at the chip's clock rate then performs a windowing filter to reduce it to your computer's sampling rate. But if there's a post-AY filter on the board then I haven't noticed it yet. Any idea what there real response range is? I can throw it in.
There are at least a RC filter on the output.

Do you apply filter to mimic the real life way the signal is generated? Because it's not juste setting the voltage to a specific level, it's a bit more complexe in reality (due to a lot of factors)
This paper is interesting (but really hardcore if you are not a mad math person.. :D): https://ccrma.stanford.edu/~stilti/papers/blit.pdf
I had some other documentation if I find them I will share them :)
I do not, because I currently lack the knowledge. Sampling at the original rate and then filtering down is more about not just throwing away any of the information I'm definitely sure of than an attempt to be electrically accurate. And also because you need to do similar stuff over on the video side to decode composite video so, if you've decided you're doing that, why not use the same code in two places? I'll definitely see what sense I can make, if any, of the linked paper.

I still can't match Oricutron for overall compatibility though. So possibly I'm making a mistake on sweating these details.

EDIT: I've got a Kaiser Bessel windowing filter implemented, for the curious. The pure C++ does it with scalars, but Mac builds use a Mac-specific framework to offload the work onto your CPU's SIMD instructions, for the audio side. Video's on the GPU.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: "music" in Xenon meteors noise

Post by ThomH »

For the record, an example of my emulator's current attempt at AY playback is here and attached in lossless form — it's the opening of Barbitoric (with disk access gaps). The windowing filtering gives some very non-square wave forms such as the below, based on some real maths, so hopefully I'm already doing okay. Always room for improvement though, of course.
Screen Shot 2017-01-10 at 20.46.46.png
EDIT: to save anybody else saying it, comparing that to a Youtube recording of unspecified provenance (i.e. real hardware or emulator, but it probably doesn't matter), I'm off key. I must either have my AY clock rate wrong or be doing something stupid like shifting the tone dividers incorrectly. I'll need to look into that. The rule is still that if you're looking for an emulator that's, you know, good at running the original platform software, go with Oricutron. Done. The value of being better at resampling a wave is limited if the original wave is wrong.
Attachments
Barbitoric beginning.wav.zip
(1.9 MiB) Downloaded 493 times
Post Reply