Crystal clean PCM 8bit samples on the poor PSG

Pagina 8/14
1 | 2 | 3 | 4 | 5 | 6 | 7 | | 9 | 10 | 11 | 12 | 13

Van chrisborn

Supporter (15)

afbeelding van chrisborn

16-04-2018, 16:35

ARTRAG wrote:

Hi Chris, have you tested your replayer with the data from the encoder?

yes!

Quote:

Which parameters for delays do you need to tune the weights in the Viterbi search?
They should be equal to the time in your replayer between two updates of psg channels

i noticed that part. i had to read it a few times before i got the message. i work in linux so i use 'wine' .
i tried a 'plop' sound but i have a little fight with wine, the linux windows-emulator.
plop.wav , plop_msx_rle.bin
so i made a batchfile to win the 'wine' struggle

@ECHO OFF
ECHO pcmenc for msx
pcmenc.exe -p 0 -cpuf 3546900 -dt1 97 -dt2 97 -dt3 176 -a 115 -c 2 -i 2  54321.wav

but the timing will differ, so it would be nice if the batchfile has some inteligence and helps calculating the true cq needed sample length in tstate.

for ZX i work with PASMO and KATE. maybe i manage to fetch it all in the batchfile, but thats a new adventure for itselve.

i started a page but its a big mess http://www.cborn.nl/zxfiles/wav2ay
i linked to an online zx spectrum emulator, so this is the working 'plop' with 256 deifferent delays:
http://torinak.com/qaop#128#l=http://www.cborn.nl/zxfiles/wa...
the disturbing cliking sound might be the actual msx player inside the BIN *_*

you FIRST have to click LEFT in the border, then the QAOP menu appears and then you have to click on "AY" , if it shows the DOT its activated. it has to do with the snapshot used.
but "once" the ay is realy activated click on the zx screen again and press enter.

Van chrisborn

Supporter (15)

afbeelding van chrisborn

16-04-2018, 16:52

btw, the docfile off pcmenc has a typo error

-p     Packing type:                b7...b5|b4...b0
0 = 4bit RLE (default)   run len|PSG vol
1 = 3 bit RLE; as before but b5 =0

afaik it should be bit 4, which is the 5th bit indeed, but since the bitNUMBERing starts at 0 its bit 4 thats not touched.

-p     Packing type:                b7...b4|b3...b0 %1111 1111
0 = 4bit RLE (default)   run len|PSG vol %1111 1111
1 = 3 bit RLE; as before but b4 =0 %1110 1111 

erhm, it looks messy already. ineed a 'preview' or a 'cancel' button.
ps i am dyslectic

Van AxelStone

Prophet (3189)

afbeelding van AxelStone

04-11-2019, 20:11

Hello guys, really interested on this. Any place to download encoder + decoder with instructions?

Thanks.

Van ARTRAG

Enlighted (6932)

afbeelding van ARTRAG

25-11-2019, 14:30

in the download section
look for pcmenc

Van chrisborn

Supporter (15)

afbeelding van chrisborn

11-01-2020, 19:57

Hello,
I encountered a software crash by pcmenc and the strange thing is that it happens with only a few files, which i made my self being some a-e-o-u-i sounds.
the other vowels have NO problem.
www.cborn.nl/zxfiles/wav2ay/Vp_4p4_work.7z

the vowel_OO.wav crashes while compiled under WINE

Unhandled exception: page fault on write access to 0x318fd553 in 32-bit code (0x7bc5459e).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7bc5459e ESP:0033f634 EBP:0033f728 EFLAGS:00010202(  R- --  I   - - - )
 EAX:318fd54f EBX:7bce7000 ECX:00426798 EDX:fb7329b6
 ESI:00427d60 EDI:00420014
Stack dump:
0x0033f634:  271649d1 00000003 00427d60 00000000
0x0033f644:  00000000 00000000 00000000 4d430003
0x0033f654:  00000000 00000000 00000000 4d430003
0x0033f664:  00000000 00000000 00000000 00000000
0x0033f674:  00000000 4d430001 00426798 00000010
0x0033f684:  00000000 00000000 00000000 4d430003
Backtrace:
=>0 0x7bc5459e RtlIsValidIndexHandle+0x1cae() in ntdll (0x0033f728)
  1 0x7bc54894 RtlIsValidIndexHandle+0x1fa3() in ntdll (0x0033f7c8)
  2 0x7bc55970 RtlFreeHeap+0xcf() in ntdll (0x0033f838)
  3 0x00404860 EntryPoint+0xffffffff() in pcmenc (0x0033fcd8)
  4 0x00401949 EntryPoint+0xffffffff() in pcmenc (0x0033fd4c)
0x7bc5459e RtlIsValidIndexHandle+0x1cae in ntdll: movl	%edx,0x4(%eax)
Modules:
Module	Address			Debug info	Name (12 modules)
PE	  400000-  41b000	Export          pcmenc
ELF	7b400000-7b7f8000	Deferred        kernel32
  \-PE	7b420000-7b7f8000	\               kernel32
ELF	7bc00000-7bd05000	Dwarf           ntdll
  \-PE	7bc20000-7bd05000	\               ntdll
ELF	7c000000-7c004000	Deferred        
ELF	7ef7c000-7efc3000	Deferred        libm.so.6
ELF	f7343000-f7348000	Deferred        libdl.so.2
ELF	f7348000-f74f1000	Deferred        libc.so.6
ELF	f74f1000-f750d000	Deferred        libpthread.so.0
ELF	f754a000-f7702000	Dwarf           libwine.so.1
ELF	f7703000-f7726000	Deferred        ld-linux.so.2
Threads:
process  tid      prio (all id:s are in hex)
00000008 winefile.exe
	00000009    0
0000000e services.exe
	00000024    0
	00000021    0
	0000001c    0
	00000018    0
	00000013    0
	00000010    0
	0000000f    0
00000011 winedevice.exe
	00000019    0
	00000017    0
	00000016    0
	00000012    0
0000001a plugplay.exe
	0000001e    0
	0000001d    0
	0000001b    0
0000001f winedevice.exe
	00000027    0
	00000023    0
	00000022    0
	00000020    0
00000025 explorer.exe
	0000002b    0
	0000002a    0
	00000029    0
	00000028    0
	00000026    0
0000002c cmd.exe
	0000002d    0
0000002e wineconsole.exe
	0000002f    0
00000030 (D) Z:\home\ch\Desktop\some-zx\dutchvox\Vp_4p4\pcmenc.exe
	00000031    0 <==
System information:
    Wine build: wine-4.0-rc1
    Platform: i386 (WOW64)
    Version: Windows XP
    Host system: Linux
    Host version: 4.4.104-18.44-default

and under real Vista, which gives a very marginal report.

APPCRASH.txt

Probleemhandtekening:
  Gebeurtenisnaam van probleem:	APPCRASH
  Naam van de toepassing:	pcmenc.exe
  Versie van toepassing:	0.0.0.0
  Tijdstempel van toepassing:	43d03d78
  Naam van foutmodule:	pcmenc.exe
  Versie van foutmodule:	0.0.0.0
  Tijdstempel van foutmodule:	43d03d78
  Uitzonderingscode:	c0000005
  Uitzonderingsmarge:	0000415f
  Versie van besturingssysteem:	6.0.6002.2.2.0.768.3
  Landinstelling-id:	1043
  Aanvullende informatie 1:	a84a
  Aanvullende informatie 2:	5c3259644efe33b80219230b78d4899c
  Aanvullende informatie 3:	3f1a

I know there is another pcmenc clone, but thats to be compiled under windows, which is a step further then possible for me.

The question:
is there a software boundary in eg the wav frequency or amplitude?

for which windows version is pcmenc written actually ??

the 54321 file IS cristal clear as promissed!! (from mp3-part1 DeusExMachina https://www.worldofspectrum.org/infoseekid.cgi?id=0001373)

Van ARTRAG

Enlighted (6932)

afbeelding van ARTRAG

12-01-2020, 17:27

vowel_OO.wav seems not working in VLC media player. It works in Windows Media player.
There are no limits in the pcmenc encoder, but maybe if files are too short this implementation of the Viterbi algorithm could incur in some edge condition. Try padding the file to make it last a bit longer.
Moreover not all WAV formats are supported. Try uncompressed 8 bit/samples.
You can compile pcmenc.exe yourself from its .CPP file.
[EDIT]
IIRC the current version has been compiled under windows XP and it should be compatible with GCC

Van mfeingol

Champion (293)

afbeelding van mfeingol

12-01-2020, 19:32

Where is the cpp file?

Van ARTRAG

Enlighted (6932)

afbeelding van ARTRAG

12-01-2020, 23:19

in the same zip in the download section

Van ARTRAG

Enlighted (6932)

afbeelding van ARTRAG

12-01-2020, 23:20

Van Sepulep

Resident (36)

afbeelding van Sepulep

13-01-2020, 11:57

I had to add #include < cstdint > on recent g++ (9.2.1) to compile..maybe its an idea to put the tool in a github repo?

also: the current assembly code is not compatible with glass - would be nice cause this a cross platform assembler..

Pagina 8/14
1 | 2 | 3 | 4 | 5 | 6 | 7 | | 9 | 10 | 11 | 12 | 13