Is a .wav file player possible?

2

Sylveon 2024-11-20 23:23

Read the title :3


was8bit 2024-11-21 05:44 (Edited)

Nope.... sorry....

Some have ported midi files into lowres, but i cannot recall who they were...


SP4CEBAR 2024-11-21 11:32 (Edited)

I attempted to make an MP3 player once, but I soon realized that due to the many compression layers and the expensive official ISO document, it would be quite complicated. The hardest part is finding in-depth documentation. Once you have found a good one, it takes quite some studying to understand it and write a program that can read deeper and deeper into the file.
BTW "MPEG-1 Audio Layer 3" gives more accurate online search results than "MP3".
I still believe playing MP3 files is possible in NX!

I suspect WAV would be simpler to implement as it isn't as compressed, so if you want to attempt it, I'd say go for it!

To get the best audio quality out of NX you may be interested in this post of mine that describes a method to combine all NX's sounds to approach any other sound.

I think this MIDI player of mine is what was8bit referred to.


Sylveon 2024-11-21 13:36

I know how Wav files work


Sylveon 2024-11-21 13:36

:3


SP4CEBAR 2024-11-21 15:02 (Edited)

By the way, for any tool of mine that uses files I've been using this file to hex converter

To use it, deselect the option that says:

Use 0x and comma as separator (C-like)


Sylveon 2024-11-21 15:14

Ok


SP4CEBAR 2024-11-21 15:22 (Edited)

BTW, An easier method to approach any other sound using NX sounds would be to get the frequencies and intensities of the four highest peaks in the frequency domain and play those on NX's four voices as triangle waves (closest to sine wave we have)

However any method I described requires the audio to be in the frequency domain. The conversion from WAV-like audio samples to this format is commonly done using an FFT algorithm (fast), but it can also be done with a DFT algorithm (relatively easy).


Timo 2024-11-21 16:08

LowRes NX sound is similar to the SID chip of the C64.

It wasn’t made for playing custom waveforms either, but it was anyway possible by updating some values very quickly by the CPU.

In LowRes NX the values of the sound “chip” are only updated once per frame (60 Hz), so that is to slow to create hearable frequencies :(


Sylveon 2024-11-21 19:43

Ok :3


SP4CEBAR 2024-11-22 08:31

Although NX can't directly play custom waveforms, it can play multiple sounds at once which can be used to mimic sounds in the frequency domain


Log in to reply.