Crystal clean PCM 8bit samples on the poor PSG

Страница 2/14
1 | | 3 | 4 | 5 | 6 | 7

By dvik

Prophet (2200)

Аватар пользователя 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.

By ARTRAG

Enlighted (6979)

Аватар пользователя ARTRAG

01-01-2006, 23:22

Package sent!

By dvik

Prophet (2200)

Аватар пользователя dvik

01-01-2006, 23:27

Great! Thanks Smile

By ARTRAG

Enlighted (6979)

Аватар пользователя 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.

By dvik

Prophet (2200)

Аватар пользователя dvik

02-01-2006, 03:25

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

By ARTRAG

Enlighted (6979)

Аватар пользователя 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.

By gargamel

Expert (101)

Аватар пользователя gargamel

02-01-2006, 20:12

This sounds very interesting, please send me a copy.

By dvik

Prophet (2200)

Аватар пользователя 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.

By snout

Ascended (15187)

Аватар пользователя snout

03-01-2006, 04:03

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

By ARTRAG

Enlighted (6979)

Аватар пользователя ARTRAG

03-01-2006, 07:53

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

Страница 2/14
1 | | 3 | 4 | 5 | 6 | 7