News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_zhulien

Best Quality Samples possible from CPC

Started by zhulien, 14:15, 22 May 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zhulien

I saw this awesome C64 demo on youtube that plays music at 48Khz on an unmodified C64 with extra RAM.



Reading the description here on how it works:

http://brokenbytes.blogspot.com/2018/03/a-48khz-digital-music-player-for.html

I was wondering, we have compiled sprites on CPC and we have faster bank switching - if a sample was a compiled sample across the entire 64kb of banked RAM doing 64k bank switches (C0, C2, CA, ...) what awesomeness can be pumped out of AY on an unmodified CPC with extra RAM?

Must a CPC use triangles simulated with 3 channels to get a good sample quality?

zhulien

btw, I can't imagine loading a 16mb sample on C64 from 95 floppy discs over a period of 3 days to play it... (3 days is my guess)

roudoudou

it's possible on ZX spectrum or with a Play2CPC/PlayCity to have a very good quality but not on a CPC stock because of the amount of time required to select another register and setting it

anyway, back in days, we had some good samples in Morteville Manor :P
My pronouns are RASM and ACE

Prodatron

#3
The CPC can play 62,5kHz Samples on the internal PSG, if you use "compiled" samples.
This requires 10 bytes per sample:

        LD  A,n    ;2
        OUT  (C),A  ;4      #f4xx,sample
        EXX        ;1
        OUT  (C),E  ;4      #f6xx,#80
        OUT  (C),D  ;4      #f6xx,#00
        EXX        ;1  -> 16 nops, 10bytes

If you have 1 MB the duration of the sample will be 1,67 seconds :laugh: :laugh:

The CPC can play 55,5kHz Samples on the internal PSG, if you use "normal" sample data and unroll the code a lot:

        LD  A,(HL) ;2
        INC HL      ;2
        OUT  (C),A  ;4      #f4xx,sample
        EXX        ;1
        OUT  (C),E  ;4      #f6xx,#80
        OUT  (C),D  ;4      #f6xx,#00
        EXX        ;1  -> 18 nops

If you have 1 MB the duration of the sample will be nearly 19 seconds.
So with the full 4MB you can play for about 75 seconds.


*EDIT* There is a sample player for the MSX, which combines all 3 PSG channels for producing 8bit like sample output. On the CPC this would be too slow (and sounds strange if you don't mix the channels to a mono signal, like on the MSX), if you don't use something like the PlayCity (what Roudoudou said). So these maximum values are only possible with a mono 4bit PSG channel (and without compression like in this C64 project of course).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

roudoudou

the high-quality methods on ZX is based on very fast update of the 3 voices (and a mono speaker output), not the overall replay freq
My pronouns are RASM and ACE

zhulien

Are there any sample players for playcity currently?

lmimmfn

Can the CPC take advantage of an Amiga technique whereby multiple channels off sync are used to provide > 8 bit audio? or does the audio chip synchronize across the 3 channels?

I know nothing about it on CPC so please excuse my ignorance.
6128 for the win!!!

eto

Quote from: lmimmfn on 00:27, 23 May 23Can the CPC take advantage of an Amiga technique whereby multiple channels off sync are used to provide > 8 bit audio? or does the audio chip synchronize across the 3 channels?

I know nothing about it on CPC so please excuse my ignorance.
yes and no. On other computers that are using the same sound chip or similar ones (like the Atari ST) it's a common "trick" to mix all channels to get from the 4bit logarithmic output for each channel to an (almost) 8bit linear output for all channels combined.

On the CPC this is generally also possible but since the CPC supports stereo output it doesn't mix 3 channels to 1 like the ST does but rather mixes channel 1 with half the volume of channel 2 for one side, and channel 3 with half the volume of channel 2 for the other side. That limits the potential output quality for samples a lot. It's more in the 5bit or maybe 6bit range what you can achieve. I once did the math for this using an Excel table and confirmed with my multimeter that the output levels should work out, but I never followed up on that. But I guess the better sample replay routines already do that anyway.

STE86

message from Tony Savona who coded that op demo and many other c64 games featuring samples recently.

" The demo is 1mb (ocean cart), not 16. And that's the whole point of the demo, the music is compressed, not just 48khz"

so, John Ward (atic atac) and myself are looking to maybe convert Fix-It Felix to the amstrad from the c64 version which Tony Savona and myself did.

so we need to know if the Amstrad can cope with the sampled speech in it...


robcfg

Have you guys listened to the sampled music of Orion Prime?

andycadley

The Plus machines have three DMA channels that can write to the soundchip at 15kHz. And, in theory they can all write to the same register so you could avoid the stereo issue. Although I've no idea what that would do in terms of audio quality...

zhulien

Attached are demos08.arc and demos09.arc from CPC Decade converted to dsk for Parados 1.2+ in WinAPE.  For some reason I couldn't get 1.2 or the UniDOS patched parados to read any disc images in WinAPE.

demos08 has an AC-DC sample that should work on an unexpanded 464.  The other samples require 512kb.

Powered by SMFPacks Menu Editor Mod