PSG samples

صفحة 8/15
1 | 2 | 3 | 4 | 5 | 6 | 7 | | 9 | 10 | 11 | 12 | 13

بواسطة Grauw

Ascended (10581)

صورة Grauw

03-06-2005, 19:51

WAV - PSG

00h - F,E,E
...
80h - 0,0,0
...
FFh - F,E,E
That is not possible. That way you would basically change a sin(x) wave into an abs(sin(x)) wave, which is a totally differrent sound.

~Grauw

p.s. I updated the MAP with my latest output table, that should pretty much be final.

بواسطة ARTRAG

Enlighted (6844)

صورة ARTRAG

03-06-2005, 19:53

Can you produce your table in oder to do a quick test?
Any idea about the uge noise we hear?
It has nothing to do with quantization I think.
Or my table is totally wrong
Or something is missing the the way PSG works

بواسطة Grauw

Ascended (10581)

صورة Grauw

03-06-2005, 19:58

It is here http://map.tni.nl/articles/psg_sample.php , at the bottom.

I can’t test it myself on an MSX... I’ll try it in an emulator though.

~Grauw

بواسطة [WYZ]

Champion (447)

صورة [WYZ]

03-06-2005, 20:13

Grauw's table sounds a little bit better, but still sound noise.Output volume is higher and mask the noise.

بواسطة ARTRAG

Enlighted (6844)

صورة ARTRAG

03-06-2005, 20:19

Also in my opinion Grauw's table sounds a little bit better
(On the emulation at least)
The strange thing is that is sounds lauder than mine, wher
in theory mine should be louder....
Moreover the granular noise is very bad also this case....

Probably the noise is due to the multiple out...
What about outputting the biggest volume value fist ?
This is a simple rule that can be esily implemented
at least the bigest value masks the successive refinements

بواسطة flyguille

Prophet (3028)

صورة flyguille

03-06-2005, 20:19

noice is also inserted by sampling in differents stages, you needs 3 differents output's commands for a sample!

a rule to work around this is

first OUTPUTING the channel's volume that will have less effect on the total volume taking in account the lasts values.

then outputing the rest of values.

how to know? if a given volume is passing from 12 to 13 it makes more difference thant 1 to 2 .

but actually doing that checks, delays the maximun rate sampling.

بواسطة ARTRAG

Enlighted (6844)

صورة ARTRAG

03-06-2005, 20:53

@Grauw
Your table ends at 1.5 not at 1.328 or whatever....

بواسطة dvik

Prophet (2200)

صورة dvik

03-06-2005, 21:43

Hi all,

I've been working on a similar linear 8-bit PSG sample player for the last couple of weeks.
I started with the same technique, using a static table (generated by a c program on my PC)
and then using the same (infact identical) code to play the samples.

I was a bit disappointed with the result since the S/N is quite high. As some of you mentioned
it should theoretically be about as low as for any other 8 bit PCM device. So I started to
play around with it a bit and found a couple of interesting things that probably will interest
you:

1. The first and probably most interesting finding is that the output volume of the PSG is not
as nice as you may think. Theoretically it is 2^-((15-n)/2) but I've done some measurements on
my FS-A1WSX and found that this is actually not the case. I used the following little basic
program to generate nice waves with increasing amplitudes, sampled them and analyzed it on a PC:

10 FORI=0TO15: PLAY"O8T40V"+MID$(STR$(I),2)+"A":NEXT:GOTO10

The result is in the table below (a scale from 0-100). Note that changing the frequency of the
tone doesn't make any difference. I'm pretty sure that if you run the same test on your MSXes
you will get other figures.

0: 0.00
1: 0.61
2: 0.78
3: 1.17
4: 1.59
5: 2.39
6: 3.28
7: 4.77
8: 7.58
9: 11.08
10: 16.53
11: 24.65
12: 33.68
13: 51.22
14: 71.62
15: 100.00

2. Another interesting finding with the same code is that each time the volume is changed, there
is a little click and if you look at the wave output you'll see that it spikes a bit.

3. I've tried quite a lot of different ways of generating the tables,
- Having the most significantvolume in channel 1, second most in channel 2,... as you've talked about.
- I also tried to make the change of each channel as small as possible, i.e trying to use values that
are as close to 50% volume as possible. The idea was to generate less spikes
I also tried some other ways but the result is pretty bad always.

4. The by far best result I got so far is by using an adaptive wave, where the sample data is
the values of each PSG channel. The wave data is created on a PC from the original wave but
instead of always using the same PSG combination for a certain volume I used an algorithm (not all
done yet) to minimize the noise between two consecutive samples. This means that the choosen PSG
values for a sample is dependent on the PSG values of the sample before.
By reducing the number of bits to 7, you get more combinations to choose from and the noise will
get down. Going down to 6 bits makes the noise even better but then you loose too much resolution.

Just some thoughts I have so far.

بواسطة flyguille

Prophet (3028)

صورة flyguille

03-06-2005, 22:06

exactly what i replied before in my only one reply

counts as noice the problem that you are sampling in three stages!

بواسطة Grauw

Ascended (10581)

صورة Grauw

03-06-2005, 22:16

@Grauw
Your table ends at 1.5 not at 1.328 or whatever....

Hey, yeah, that’s weird! I’ll check out why...

Daniel Vik: hmm, interesting... Let me know when you make progress. With regard to your table: yeah, I’d expect it to have those kind of deviations... it would’ve surprised me if the PSG were exactly as accurate as the formula.

~Grauw

صفحة 8/15
1 | 2 | 3 | 4 | 5 | 6 | 7 | | 9 | 10 | 11 | 12 | 13