Crystal clean PCM 8bit samples on the poor PSG

Página 2/10
1 | | 3 | 4 | 5 | 6 | 7

Por dvik

Prophet (2200)

Imagen del dvik

01-01-2006, 23:06

Yeah, I remember we talked about having a more dynamic model than just a static table but iirc we didn't get any better results back then. I remember you talked about Viterbi back then too (dont think it was tested though) so I figured your new algorithm is doing something different. If you send a test version I'll try it both in emus and on real MSXes.

My email is: daniel AT vik DOT cc

Do you have any guess on how sensitive it is to timing, i.e. is it good enough if the average frequency is 8kHz or does each individual sample need to be spaced exactly 1/8000 seconds? The reason why I wonder this is if it would be possible to use it in a demo like waves.

Another thing that would be very cool is to write a mod player using this engine. Not sure if its possible but it would be fun to give it a try.

Por ARTRAG

Enlighted (6339)

Imagen del ARTRAG

01-01-2006, 23:22

Package sent!

Por dvik

Prophet (2200)

Imagen del dvik

01-01-2006, 23:27

Great! Thanks Smile

Por ARTRAG

Enlighted (6339)

Imagen del ARTRAG

01-01-2006, 23:31

The algorithm has a heavy encoding part to be performed with a PC and a light z80 player
that uses RLE and does playback at 8KHz.

Actually unrolling the replayer in 8 branches, you can get on statistic basis "a lot" of spare time without
the need to jitter the sample time.
I was thinking to use the spare time for implementing a better encoding, now the principal problem is the data size.

Each sample needs 3*4 levels, without encoding you get an expansion of 1,5 times (encoding PCM at 8bit).
My RLE implementation is poor, unique values waste a full byte (instead of a nibble), so in average the compression
can be 1.2-1.6 (Yes even worst than without enconding)

This is the reason why i am working to a system for trading quality and higher compression (on the basis of a tunable parameter).

Now the quality ranges from 42dB to 36dB of SNR
while the encoding ratio wrt the original file can vary. If you start from 8bit PCM in the worst
case the RLE expand the result to 1.5 -1.6 times.
(consistent with the fact I encode PSG levels (3x4bit levels) and with the fact that my RLE implementation is very poor.)

With the new solution I am working on, acting on an optimization parameter, I can reduce the SNR increasing the compression.
In this case you can get also a reduction of the size having a final ratio of 0.8 or 0.9 and a
lower SNR of about 35dB.

Por dvik

Prophet (2200)

Imagen del dvik

02-01-2006, 03:25

Wow, the sample quality is really chrystal clear. Very impressive ! Can't wait to do some more testing.

Por ARTRAG

Enlighted (6339)

Imagen del ARTRAG

02-01-2006, 18:48

The "crystal clear" quality can vary a lot depending on the .wav you consider.

Here follow some open iusses :

1) better lossless encoding:
Is it possible to improve the RLE using the statistically avalable cpu time ?
Look at the "best compression algorithm" forum http://www.msx.org/forumtopic5672.html

2) trade off between quality and size:
I am experimennting a solution that works fine, but what it the "optimal" implementation ?

3) samplig frequency:
Actually the PCM decoder can work up to 24kHz using 4bit per sample
(the trik is x=y and dt1=dt2=dt3=1/3 => Fs=3*8kHz); the problem is that the quality
drops drammatically (SNR below 20dB).
Is it possible to find some optimal strategy for rising the samplig frequency without
loosing SNR (Fs = 11025Hz or Fs 22059) ?

About the mod player, AFAIK the problem is that I cannot mix the samples, while the MOD
player whould ask for multiple sampes played at the same time.

Only sample by sample solutions can work, but the quality is "standard", i.e. no guarranttes
on PSG spikes during sample transitions.

Por gargamel

Expert (101)

Imagen del gargamel

02-01-2006, 20:12

This sounds very interesting, please send me a copy.

Por dvik

Prophet (2200)

Imagen del dvik

03-01-2006, 03:56

I've been playing with the encoder and player and done some tests on my MSXes and the result is really good.

I sampled my Philips vg8020 playing a little tune: http://www.bluemsx.com/vg8020psg.mp3

What do you think, not too bad huh? ARTRAG has done an excellent job doing an encoder that works this well.

Por snout

Ascended (15187)

Imagen del snout

03-01-2006, 04:03

off: nice version of ca plane pour moi ^_^

Por ARTRAG

Enlighted (6339)

Imagen del ARTRAG

03-01-2006, 07:53

gargamel
something is online but in order to realease the pcmecc in C++ we need some testing

Página 2/10
1 | | 3 | 4 | 5 | 6 | 7