Crystal clean PCM 8bit samples on the poor PSG

Pagina 12/14
5 | 6 | 7 | 8 | 9 | 10 | 11 | | 13 | 14

Van thegeps

Paragon (1177)

afbeelding van thegeps

25-01-2022, 13:34

Ok, thanks. I'll do this evening when back home from work

Van Grauw

Ascended (10717)

afbeelding van Grauw

25-01-2022, 14:33

thegeps wrote:

the player can't be assembled with Glass (after removing the macros I've obtained an "out of range" error

Hey thegeps, I have removed the range check from Glass after the 0.5 release, so I recommend to use the development version of Glass to get rid of that error.

Van thegeps

Paragon (1177)

afbeelding van thegeps

25-01-2022, 14:38

Thanks Grauw. I remember that I had the same problem when coding Freedom Fighter and then that time I've downloaded a newer Glass version to get rid of the problem. It seemed me strange that it has happened again. How I may know the Glass version? (Anyway I'll download this new version as soon as I will be at home)

Van Grauw

Ascended (10717)

afbeelding van Grauw

25-01-2022, 14:49

Unfortunately I don’t track versions for development builds, however the removal of this out of range error was already done in 2018. Maybe you downloaded the 0.5 release version instead of the development version. I should really make a proper 0.6 release, there have been only a few user-facing changes but some of them (like this one) are important to just get out there properly.

Van chrisborn

Supporter (15)

afbeelding van chrisborn

15-03-2022, 02:43

Hello ,
I did learn a bit off C and could find the source off my problem
I dont know yet if it FULLY works but after all the changes where adding

#include "stdint.h"        //https://stackoverflow.com/questions/40663918/uint32-t-does-not-name-a-type
#include "cstdint"

BTW how can i switch off html tags? '<'

to the files
pcmenc.pcc, resample.c st.h

AND i added '-m32' to the compile line
https://www.geeksforgeeks.org/compile-32-bit-program-64-bit-...
g++ -m32 pcmenc.cpp resample.c -o pcmenc -O2 -Wall

the first result after compiling is

./pcmenc -cpuf 3546900 -p 0 -dt1 97 -dt2 97 -dt3 175 -a 115 -rto 1 -c 2 -i 2 54321_8.wav

Encoding PSG samples at 9612Hz
Resampling input wave from 44100Hz to 9612Hz
Viterbi SNR optimization:
   1 input samples per PSG tripplet output
   dt1 = 97  (Normalized: 0.263)
   dt2 = 97  (Normalized: 0.263)
   dt3 = 175  (Normalized: 0.474)
   Resampling using Lagrange interpolation on 11 points
   Using cost function: L2
Processing 100.00%
The cost metric in Viterbi is about 3.044
SNR is about 21.19
Encoding samples for original player

Now i can try the proposed changes for the minimum length!!
i hope i am through now!

:hannibal:

Van ericb59

Paragon (1099)

afbeelding van ericb59

26-03-2022, 10:45

Hello,

Is someone was able to compile the encoder on MacOS ?
It compile (with warning), the program seems to work, but it refuse any .WAV file I want to encode. While the same files works on windows pcmenc version.

Any help, or binary share welcome Wink

Van Bengalack

Paladin (721)

afbeelding van Bengalack

06-09-2022, 20:25

Being a NOOB(!) when it comes to audio, I sadly have to ask questions for the (probably) most obvious things. Sorry about that, but I still hope someone would care to answer.

The tech in this thread works great! (just tested the sample in MSXgl). I was thinking that it would be cool to use speech-samples in a game. Now I see that speech typically are played back at a minimum of 8000 times a second. Or: 133 times pr frame in NTSC-mode. That is OUTing to PSG every 447 cycles. This is really impractical.

How low can we possibly go on the frequency, when playing back voice?

I guess that, when a sample are recorded, there are frequences that more important than others, and must not be lost. Would it be possible to sample, say at 44100, but encode this in a super-smart way to be played back at, say, 1000Hz (or is this just called plain "downsampling"?)? And when one is playing back, is there anything that could help to reduce playback frequency, like using envelope or any "new discoveries as of late"? Smile

Van aoineko

Paladin (899)

afbeelding van aoineko

06-09-2022, 21:18

In my opinion, playing an audible voice sample with the PSG in parallel with a gameplay code is almost impossible. Not only the code to play the sound will take a lot of CPU resources, but also it will be very difficult to synchronize the sound update which has to be done at regular intervals during a frame.
For Final Smash, my tennis game, I planned to use this techno to announce the score, but at this moment, the gameplay is frozen.

Apart from using SCC or FM, I don't see how that would be possible.

Van wolf_

Ambassador_ (10096)

afbeelding van wolf_

06-09-2022, 21:13

One also has to ponder whether lo-fi PSG actually matches the rest of the audio of a game. It's often like you have all kinds of fancy plates o' food from a fancy restaurant, and one such plate has a rusty screwdriver on it. That screwdriver is like a PSG sample. Hannibal

Van wimpie3

Champion (435)

afbeelding van wimpie3

06-09-2022, 22:17

But with the SCC gameplay and basic speech would be possible at the same time?

Pagina 12/14
5 | 6 | 7 | 8 | 9 | 10 | 11 | | 13 | 14