PSG samples (Development MSX Fora)MSX Resource Center            
            
English Nederlands Espa�ol Portugu�s Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 69 gasten en 3 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - PSG samples

Ga naar pagina ( Vorige pagina 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Volgende pagina )
Schrijver

PSG samples

flyguille
msx master
Berichten: 1223
Geplaatst: 03 Juni 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
msx master
Berichten: 1737
Geplaatst: 03 Juni 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
ARTRAG
msx master
Berichten: 1737
Geplaatst: 03 Juni 2005, 20:53   
@Grauw
Your table ends at 1.5 not at 1.328 or whatever....
dvik
msx master
Berichten: 1339
Geplaatst: 03 Juni 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
msx master
Berichten: 1223
Geplaatst: 03 Juni 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
msx professional
Berichten: 1006
Geplaatst: 03 Juni 2005, 22:16   
Quote:

@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
dvik
msx master
Berichten: 1339
Geplaatst: 03 Juni 2005, 22:16   
The adaptive model I used is something similar to what you describe flyguille, i.e. to minimize the steps of two channels But the S/N ratio is still quite high and it can't be compensated for really. It all depends on how far from the wanted value you get when you change the most important PSG channel.
dvik
msx master
Berichten: 1339
Geplaatst: 03 Juni 2005, 22:19   
Grauw, I'm working on a MSX1 demo atm and I actually decided to go with the more noisy but less CPU intensive and memory requiering model similar to the one you are working on. The reason is of course to free up resources to do other things like nice graphics.

Hopefully I'll finish this demo this weekend and then I'll pick up the adaptive sample player and see what I can do.
Grauw
msx professional
Berichten: 1006
Geplaatst: 03 Juni 2005, 22:21   
Dvik, cool, I’m looking forward to it.

With regard to the noise, I haven’t heard it yet, but it can’t possibly be worse than e.g. Oh Shit!

Which I played quite a lot, btw.


~Grauw
dvik
msx master
Berichten: 1339
Geplaatst: 03 Juni 2005, 22:25   
It sounds at least 10 times better than Oh Shit. The S/N is not that much better but the dynamics in the sound is a lot better. The bass tones sounds close to Moonsound In fact the whole demo sounds like Moonsound if you'd put a lowpass filter around 6kHz and played in front of a jet engine.
dvik
msx master
Berichten: 1339
Geplaatst: 03 Juni 2005, 22:27   
I can try to post a beta of the demo tonight. I need to do some cleanup and fix the music but I think I can have something to show tonight.
Grauw
msx professional
Berichten: 1006
Geplaatst: 03 Juni 2005, 22:29   
ARTRAG: Ah, I see, I outputted the wrong values . I have put the real table online now.

However, the observation that it sounded better is interesting... Perhaps the noise is compensated for by higher output values?

[WYZ]: what if you try out this table (output range up to 2.0)?

DB 00,00,00, 01,00,00, 03,00,00, 03,01,00, 05,00,00, 05,01,00
DB 05,03,00, 05,03,01, 07,00,00, 07,01,00, 07,03,00, 06,05,02
DB 07,05,00, 07,05,01, 07,05,03, 07,06,02, 09,00,00, 09,01,00
DB 09,03,00, 09,03,01, 09,05,00, 09,05,01, 08,07,04, 09,06,02
DB 10,02,00, 10,02,01, 10,03,02, 09,08,00, 10,05,02, 10,06,01
DB 09,08,04, 10,06,04, 10,07,02, 11,01,00, 11,03,00, 11,03,01
DB 11,04,02, 11,05,01, 11,05,03, 11,06,02, 10,09,02, 11,07,01
DB 11,07,03, 11,08,00, 10,09,06, 12,00,00, 11,08,04, 12,03,00
DB 12,03,01, 12,05,00, 12,05,01, 12,05,03, 12,05,04, 12,07,00
DB 12,07,01, 12,07,03, 12,07,04, 12,07,05, 12,08,02, 11,09,08
DB 11,10,06, 12,09,00, 12,09,01, 12,09,03, 12,09,04, 12,09,05
DB 13,02,01, 13,03,02, 13,04,02, 12,09,07, 13,05,03, 13,06,02
DB 13,06,04, 13,07,02, 13,07,03, 13,08,00, 13,08,01, 13,08,03
DB 12,11,01, 13,08,05, 12,11,04, 12,11,05, 13,09,03, 13,08,07
DB 13,09,05, 12,11,07, 13,10,00, 13,10,01, 12,11,08, 13,10,04
DB 14,00,00, 13,09,08, 13,10,06, 14,04,00, 14,04,01, 14,04,03
DB 14,05,03, 13,11,02, 14,07,00, 14,07,01, 14,07,03, 14,07,04
DB 14,07,05, 14,08,02, 14,07,06, 14,08,05, 14,09,00, 14,08,06
DB 14,09,03, 14,09,04, 14,09,05, 13,12,03, 14,09,06, 13,12,05
DB 14,09,07, 14,10,03, 14,10,04, 13,12,07, 13,11,10, 14,10,06
DB 13,12,08, 14,10,07, 14,11,00, 14,11,01, 14,11,03, 14,11,04
DB 14,11,05, 15,00,00, 14,11,06, 15,02,00, 14,11,07, 15,03,02
DB 15,04,02, 15,05,02, 15,06,01, 15,06,03, 15,06,04, 15,06,05
DB 14,11,09, 14,12,05, 15,08,02, 15,07,06, 15,08,04, 14,12,07
DB 15,08,06, 15,09,02, 15,09,04, 15,08,07, 15,09,05, 15,09,06
DB 15,10,00, 15,10,01, 15,10,03, 15,10,04, 15,10,05, 14,13,01
DB 14,13,03, 14,13,04, 15,10,07, 15,11,00, 15,11,01, 15,11,02
DB 14,13,07, 15,11,05, 15,11,05, 15,11,06, 15,10,09, 14,12,11
DB 15,11,07, 14,13,09, 14,13,09, 15,11,08, 15,12,00, 15,12,00
DB 15,12,02, 15,11,09, 14,13,10, 15,12,05, 15,12,06, 15,12,06
DB 14,14,00, 14,14,01, 15,11,10, 14,14,04, 15,12,08, 14,14,05
DB 14,14,06, 14,14,06, 14,14,07, 15,12,09, 15,13,00, 15,13,00
DB 15,13,01, 15,13,03, 15,13,04, 15,12,10, 14,14,09, 15,13,06
DB 14,13,12, 14,13,12, 15,13,07, 15,13,08, 15,13,08, 14,14,10
DB 15,12,11, 15,12,11, 15,13,09, 15,13,09, 15,13,09, 15,13,09
DB 14,14,11, 14,14,11, 14,14,11, 15,13,10, 15,13,10, 15,13,10
DB 15,14,00, 15,14,00, 15,14,00, 15,14,02, 15,14,03, 15,14,04
DB 15,14,05, 15,13,11, 15,14,06, 14,14,12, 15,14,07, 15,14,07
DB 15,14,08, 15,14,08, 15,14,08, 15,14,08, 15,14,09, 15,14,09
DB 15,14,09, 15,13,12, 15,13,12, 15,13,12, 15,13,12, 15,14,10
DB 15,14,10, 15,14,10, 15,14,10, 14,14,13, 14,14,13, 14,14,13
DB 14,14,13, 15,14,11, 15,14,11, 15,14,11, 15,14,11, 15,14,11
DB 15,14,11, 15,15,00, 15,15,00, 15,15,00

~Grauw
Grauw
msx professional
Berichten: 1006
Geplaatst: 03 Juni 2005, 22:30   
Dvik: hehehe .

I’m anxious to hear it, but I haven’t got anything better than an emulator overhere... hope that works well enough.
NYYRIKKI
msx master
Berichten: 1525
Geplaatst: 03 Juni 2005, 23:02   

Have you tried, does it help if you play the sample on R800 or 7MHz? (just to see how much it helps to noice problem)

How to cut a spike:
LD A,10
LD D,5
LD BC,#6A1
OUT (#A0),A
OUT(C),D
OUT(C),B

(This was not a serious idea )

ARTRAG
msx master
Berichten: 1737
Geplaatst: 03 Juni 2005, 23:51   
@dvk
I will try to generate tables from your measures

Btw
When do you observe lower spikes?
Maybe when you minimize the volume changes on each channel?

If yes, as there are lots duplicate configurations is is possible to find
the best configuration for channel volumes in order to minimize the
changes on each one

 
Ga naar pagina ( Vorige pagina 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Volgende pagina )
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.