Jump to content
IGNORED

Using Pulse Density Modulation for 8-bit PCM


kool kitty89

Recommended Posts

 

Awesome! So we can add 1088XEL to the list. BTW, I think you mean volume alert at 0.05. :)

BTW - I tested this both with stereo enabled and disabled. As usual, with mono sources, stereo should be turned off,a s you get sound through both speakers. However, it works both ways.

  • Like 2
Link to comment
Share on other sites

Confirmed, sounds wonderful on my 1088XEL in Black on White mode, very noisy in the the default start-up mode.

 

Very, very nice :thumbsup: And I love the Bass :thumbsup: . This is absolutely amazing :D :D :D .

 

I second Pink Floyd, how about the song 'Money'. Is there any way to get this to happen in stereo as well?

  • Like 3
Link to comment
Share on other sites

I'm coding up an IDE-based PDM player, and it would be useful to have a raw dump of the file included in the XEX player from the other evening. I installed SOX already but I'm all fingers and thumbs with the build process, and I don't need any interleave: just sequential bytes. Using the same piece of music would also be a good idea from the standpoint of testing. I wonder if Xuel could upload it?

The strategy I'm initially going for is - ironically - to buffer data in order to overcome the problem of waiting for data to become ready on the IDE controller. The player will issue a read, pull data from the buffer until the IDE data is ready, then - while playing the upper half of the buffer - pull two bytes from the data register and place them in the lower half of the buffer for every byte retrieved from the top of the buffer. With careful unrolling, this should eliminate any blips. ;)

Edited by flashjazzcat
  • Like 5
Link to comment
Share on other sites

Hello Xuel, guys

 

Here's an XEX that uses 1088MB of RAM:

 

attachicon.gifram1088.xex

 

 

I guess this is for the Ultimate 1MB only? My extended XEGS (64kB + 1MB, separate ANTIC and CPU access, full software controle over BASIC, OS ROM/RAM, Selftest and Missile Command) crashes when I try to load ram1088.xex from my Ultimate Cart.

 

Sincerely

 

Mathy

Link to comment
Share on other sites

Hello Xuel, guys

 

 

I guess this is for the Ultimate 1MB only? My extended XEGS (64kB + 1MB, separate ANTIC and CPU access, full software controle over BASIC, OS ROM/RAM, Selftest and Missile Command) crashes when I try to load ram1088.xex from my Ultimate Cart.

 

Sincerely

 

Mathy

 

The XEX crashes when run from my Ultimate Cart as well... and that's on a machine equipped with Ultimate 1MB.

 

EDIT: I think the XEX is a few bytes over 1MB, which may be the reason (the Ultimate Cart loads the entire XEX into its own RAM prior to loading). The U1MB XEX loader reads clusters directly from the disk, meaning there's no limit on XEX size.

Edited by flashjazzcat
Link to comment
Share on other sites

I'm coding up an IDE-based PDM player, and it would be useful to have a raw dump of the file included in the XEX player from the other evening. I installed SOX already but I'm all fingers and thumbs with the build process, and I don't need any interleave: just sequential bytes. Using the same piece of music would also be a good idea from the standpoint of testing. I wonder if Xuel could upload it?

 

The strategy I'm initially going for is - ironically - to buffer data in order to overcome the problem of waiting for data to become ready on the IDE controller. The player will issue a read, pull data from the buffer until the IDE data is ready, then - while playing the upper half of the buffer - pull two bytes from the data register and place them in the lower half of the buffer for every byte retrieved from the top of the buffer. With careful unrolling, this should eliminate any blips. ;)

 

Here is the source tune (elektric_funk.mp3) re-sampled to various sample rates for PAL and NTSC:

 

Samples

 

Each file contains a raw sequence of 8-bit samples as produced by sox.

  • Like 3
Link to comment
Share on other sites

Well, it works perfectly on paper, but it will need a stand-alone front-end which I'll port from the XEX loader next (had to unroll 256 loop iterations to adhere to the cycle limit, so the player is about 6KB long now).

Edited by flashjazzcat
  • Like 2
Link to comment
Share on other sites

Hello Jon

 

 

The XEX crashes when run from my Ultimate Cart as well... and that's on a machine equipped with Ultimate 1MB.

 

EDIT: I think the XEX is a few bytes over 1MB, which may be the reason (the Ultimate Cart loads the entire XEX into its own RAM prior to loading). The U1MB XEX loader reads clusters directly from the disk, meaning there's no limit on XEX size.

 

Does that mean that the only way to play this file would be to either get a U1MB or a 1088XEL?

 

Sincerely

 

Mathy

Link to comment
Share on other sites

Hello Jon

 

It looks like I'm not compatible with SIO2PC.

 

I have two versions: The one by Ray A., I can't get that one to work reliably on my Mac. And the one by AtariMax, running a trial version of Ape that somebody bottled for me ages ago (thanks!). But for some reason, it doesn't seem to recognize the interface.

 

Sincerely

 

Mathy (who's never gotten into SIO2PC and stuff and doesn't like that other OS and stuff that emulates it and who even searched for that special kind of USB cable one needs for the SIO2PCviaUSB by AtariMax but really had to try to get this to work, just to listen to a 1MB PWM file... Which is kinda like a miracle, getting me to do that. I really must be impressed by this PWM stuff)

  • Like 5
Link to comment
Share on other sites

There are builds of RespeQt available (see the subforum) for macOS, and they work. I'm not sure there are macOS FTDI drivers available for the SIO2PC you're using, however (since the vendor ID is changed for some cosmetic purpose). I was able to run the XEX player in a reasonable length of time via RespeQt/SIO2PC on a Windows machine at SIO divisor 0, although I did this solely to verify proper operation when running the same XEX via the SIDE loader (which is somewhat faster than any SIO solution). I hope you can get it working, anyway.

 

Regarding the IDE player: I was probably mistaken in requesting non-interleaved data, since it now occurs to me that interleaving the upper and lower halves of physical sector will allow the player to be much more efficient. I'll cobble up some tool in C to convert the existing files Xuel was kind enough to post. Reason being, the player needs to play the 256 low-order bytes from a sector while simultaneously caching the high-order bytes. A read command is then issued, and we play the 256 buffered bytes while waiting for the next sector to become ready. At that point we repeat the whole process. Obviously we skip playing the buffer on the first iteration, since it's empty. So a suggested layout is:

 

byte 0

byte 256

byte 1

byte 257

byte 2

byte 258

 

...and so on, for each 512 byte chunk of the file.

  • Like 3
Link to comment
Share on other sites

Well, it works perfectly on paper, but it will need a stand-alone front-end which I'll port from the XEX loader next (had to unroll 256 loop iterations to adhere to the cycle limit, so the player is about 6KB long now).

 

This just keeps getting better and better. Hopefully you can pull this off, because it would be so friggin awesome to be able to stream music of this quality from a CF card. Still wondering if this will be possible in stereo as well, although even in mono it'll be fantastic :) .

 

Also wondering if this technique is limited to instrumental only, or if it lends itself to reproducing a vocal track as well? I would think it would, but just wondering.

  • Like 3
Link to comment
Share on other sites

Not sure how they managed it on the C64, but it sounds like pressed through a compander.

 

Well to me all SID sounds sound like that so that's pretty normal I guess :)

 

 

[EDIT] Actually.....it doesn't sound too bad....

 

Edited by Level42
Link to comment
Share on other sites

I have scrambled my own brains several times trying to think how we can do stuff like this on a system which already has interrupts firing on a constant basis, but if you throw an accelerator at the problem, pretty much anything is possible.

 

Shut down ANTIC ?

Link to comment
Share on other sites

Shut down ANTIC ?

I'd rather a music player didn't cause the entire GUI desktop to vanish. :)

 

Had to get back to the U1MB firmware this evening in order to get it prepared for release, but I have no doubt that the IDE PDM player will work. The player code is written and just needs attaching to a front end and some additional code to build a table of 4096 cluster numbers (equating to a typical maximum file size of 16MB, for now). Others did the clever stuff already. ;)

  • Like 2
Link to comment
Share on other sites

Also, I'd have to drop the noise generators and switch back to random noise samples (which sound metalic). Some very fast player routines might still work (Laxity's for example), but Jeroen Tel's player is definitely too slow...

You could first the SID player to generate pure SID register dumps (like SAP-R) in a first phase and then re-play in a 2nd phase. That's what I do if replay get timing cirtical in demos. Something even RLE encoding/decoding is faster than the actual players.

  • Like 1
Link to comment
Share on other sites

I have the same bug as Altirra on the EclaireXL. Since my real rise/fall times are faster (using a delta sigma output) I think I need to simulate rise/fall times to make it work well on the same samples as original hardware - i.e. black/white vs white/black...

 

Has anyone got their scope onto Pokey yet to confirm if it is all down to rise/fall times (and what they are...) or if there is more to this?

  • Like 3
Link to comment
Share on other sites

You could first the SID player to generate pure SID register dumps (like SAP-R) in a first phase and then re-play in a 2nd phase. That's what I do if replay get timing cirtical in demos. Something even RLE encoding/decoding is faster than the actual players.

 

That's how the first two incarnations of atarisid worked. They were never released. As of v3 it runs the original player code. But I might look into it again, because I'm very curious how it will sound at 8-bits/15.6kHz :)

  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...