Jump to content

Photo

FujiConvert 0.1


182 replies to this topic

#1 Xuel ONLINE  

Xuel

    Dragonstomper

  • 723 posts
  • Location:US

Posted Tue May 29, 2018 5:02 AM

FujiConvert converts audio to Atari 8-bit media using various playback methods:

https://lybrown.github.io/fujiconvert/

Here is an example converted to a The!Cart cartridge playing in stereo on dual POKEYs at 34kHz using the PCM4+4 method:

 

money pcm44 stereo 34125Hz thecart pal.zip (23MB)
 

I'm still working out the bugs and adding more features. Feedback appreciated.

 



#2 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,786 posts
  • Location:Australia

Posted Tue May 29, 2018 6:40 AM

Cool.  First try on that Roadblasters rip I did earlier.

The problem I'm seeing is that the audio track length isn't matching the available storage so we end up with lots of padding at the end.

 

Attached File  ROAD BLASTERS Sound Track 360p pcm44 stereo 34125Hz atarimax pal.zip   894.92KB   66 downloads


Edited by Rybags, Tue May 29, 2018 7:01 AM.


#3 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,786 posts
  • Location:Australia

Posted Tue May 29, 2018 7:13 AM

ACDC have never sounded so good on the Atari - the source material is a YT video, so not near as good as is actually possible...

 

Attached File  AC_DC - Are You Ready (Official Video) pcm44 stereo 34125Hz thecart pal.zip   15.18MB   69 downloads



#4 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,786 posts
  • Location:Australia

Posted Tue May 29, 2018 7:55 AM

Pity analmux isn't around to hear this stuff - pretty sure it was he that proposed this sort of thing nearly 10 years ago to get more fidelity.

Source material was MP3 for these ones. 

 

Attached File  Pet Shop Boys - Its a sin pcm44 stereo 34125Hz thecart pal.zip   18.38MB   70 downloads

 

Attached File  Metallica - Sad_but_True pcm44 stereo 34125Hz thecart pal.zip   19.37MB   60 downloads



#5 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,786 posts
  • Location:Australia

Posted Tue May 29, 2018 8:10 AM

OK, just one more, getting late here.

 

Jim Power on the Amiga had some of the best music in the day though the game itself was just too hard.

I ripped a Wav from a YT video (included) and did the title music - note this is from the SNES version:

 

Attached File  Jim Power - Title Theme 360p pcm44 stereo 34125Hz thecart pal.zip   15.08MB   54 downloads

 

 


Edited by Rybags, Tue May 29, 2018 8:11 AM.


#6 Poison OFFLINE  

Poison

    Moonsweeper

  • 347 posts
  • Location:Czech Republic

Posted Tue May 29, 2018 8:26 AM

FujiConvert converts audio to Atari 8-bit media using various playback methods:

https://lybrown.github.io/fujiconvert/

Here is an example converted to a The!Cart cartridge playing in stereo on dual POKEYs at 34kHz using the PCM4+4 method:

 

money pcm44 stereo 34125Hz thecart pal.zip (23MB)
 

I'm still working out the bugs and adding more features. Feedback appreciated.

 

 

Absolute outstanding !!!!!! thank you very much, I love it :)



#7 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,168 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Tue May 29, 2018 8:27 AM

Can't wait to test this out, but must resist temptation.  Have much (real) work to do :mad:



#8 ivop ONLINE  

ivop

    Dragonstomper

  • 755 posts
  • Location:The Netherlands

Posted Tue May 29, 2018 9:15 AM

Great work! Glancing over the source code (I'm not that well versed in js btw) it looks like you use the browser's resampling (is that called webaudio?) and clamp float values to the desired range (i.e. number of bits per sample). Perhaps there are a few things to improve the audio quality even more:

 

* Strong low-pass filter before resampling to a lower bit rate (i.e. remove all frequencies that can not be represented in the new bit rate anyway)

* Normalize to 0dB to be sure every bit is used to the max (a signal floating between -0.7 and 0.7 won't use the maximum dynamic range of 8-bits). This could be the final step before resampling.

* Use dither and triangular noise shaping during depth reduction. The latter makes sure the added dither noise is mostly in the higher frequency ranges and not just plain white noise. This might increase the dynamic range to around 56dB instead of 48dB which one would expect from 8-bits (8 bits * 6 = 48dB). At low playback rates, the noise will still be heard too much I guess, but at rates >30kHz I think it should be OK and indeed increase fidelity.

 

Not sure how much of this is even possible from javascript :)

 

Anyway, very nice project! :)

 

 



#9 brenski OFFLINE  

brenski

    Stargunner

  • 1,632 posts
  • How should we f**k off, oh Lord ?
  • Location:Ventura Highway, in the sunshine [UK]

Posted Tue May 29, 2018 9:19 AM

love this. 

are there any plans to have a standalone version? or is .js browser the only possibility?

 

great tho, nonetheless.



#10 Poison OFFLINE  

Poison

    Moonsweeper

  • 347 posts
  • Location:Czech Republic

Posted Tue May 29, 2018 9:36 AM

I test it on real HW and its great! But is possible to convert to format which is not limited to 1Mb and is compatible with Ultimate Cart ? Now I can use only Atarimax and it is 1MB only :(



#11 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,168 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Tue May 29, 2018 10:21 AM

I test it on real HW and its great! But is possible to convert to format which is not limited to 1Mb and is compatible with Ultimate Cart ? Now I can use only Atarimax and it is 1MB only :(

You may want to use the IDE Player.  I believe fjc said that his player will work on limited memory machines, but this will not work with the Ultimate Cart.



#12 Xuel ONLINE  

Xuel

    Dragonstomper

  • Topic Starter
  • 723 posts
  • Location:US

Posted Tue May 29, 2018 10:36 AM

Great work! Glancing over the source code (I'm not that well versed in js btw) it looks like you use the browser's resampling (is that called webaudio?) and clamp float values to the desired range (i.e. number of bits per sample). Perhaps there are a few things to improve the audio quality even more:

 

* Strong low-pass filter before resampling to a lower bit rate (i.e. remove all frequencies that can not be represented in the new bit rate anyway)

* Normalize to 0dB to be sure every bit is used to the max (a signal floating between -0.7 and 0.7 won't use the maximum dynamic range of 8-bits). This could be the final step before resampling.

* Use dither and triangular noise shaping during depth reduction. The latter makes sure the added dither noise is mostly in the higher frequency ranges and not just plain white noise. This might increase the dynamic range to around 56dB instead of 48dB which one would expect from 8-bits (8 bits * 6 = 48dB). At low playback rates, the noise will still be heard too much I guess, but at rates >30kHz I think it should be OK and indeed increase fidelity.

 

Not sure how much of this is even possible from javascript :)

 

Anyway, very nice project! :)

 

 

 

Yep, I'm using the WebAudio API. All processing takes place within the browser. No data is transferred to a server. You can actually install the files locally and point your browser the appropriate "file://" URL and get the same behavior.

 

I'm relying on WebAudio to perform the resampling operation. I haven't found a whole lot of configuration knobs in the API for this operation, so I'm not sure what technique it's using, e.g. Lanczos, sinc, cubic, linear, etc. Probably something fast since it seems to be geared towards real time games in the browser. Another option would be to compile sox or just the filter from C to WebAssembly and use that instead.

 

I do plan on trying out WebAudio's DynamicsCompressorNode to normalize to the available dynamic range of the target playback method.

 

I would like to play with noise shaping. Another benefit of compiling sox to WebAssembly would be to take advantage of its noise reshaping features.

 

The code is a mess at the moment but if you'd like to try your hand at javascript and would like to contribute then I wouldn't mind having your expertise on board. :)

 

 

love this. 

are there any plans to have a standalone version? or is .js browser the only possibility?

 

great tho, nonetheless.

 

I do plan on using electron to bundle the code as a native app for a few platforms. If anyone has experience with electron, let me know.

 

I test it on real HW and its great! But is possible to convert to format which is not limited to 1Mb and is compatible with Ultimate Cart ? Now I can use only Atarimax and it is 1MB only :(

 

The Ultimate Cart only supports carts up to 1MB because that's how much RAM it has on board. I don't recall if it has a SIDE-like IDE interface to the flash card. If so, then flashjazzcat's PDM Player may work (or could be made to work?) for arbitrarily large files.



#13 Poison OFFLINE  

Poison

    Moonsweeper

  • 347 posts
  • Location:Czech Republic

Posted Tue May 29, 2018 12:01 PM

 

Yep, I'm using the WebAudio API. All processing takes place within the browser. No data is transferred to a server. You can actually install the files locally and point your browser the appropriate "file://" URL and get the same behavior.

 

I'm relying on WebAudio to perform the resampling operation. I haven't found a whole lot of configuration knobs in the API for this operation, so I'm not sure what technique it's using, e.g. Lanczos, sinc, cubic, linear, etc. Probably something fast since it seems to be geared towards real time games in the browser. Another option would be to compile sox or just the filter from C to WebAssembly and use that instead.

 

I do plan on trying out WebAudio's DynamicsCompressorNode to normalize to the available dynamic range of the target playback method.

 

I would like to play with noise shaping. Another benefit of compiling sox to WebAssembly would be to take advantage of its noise reshaping features.

 

The code is a mess at the moment but if you'd like to try your hand at javascript and would like to contribute then I wouldn't mind having your expertise on board. :)

 

 

 

I do plan on using electron to bundle the code as a native app for a few platforms. If anyone has experience with electron, let me know.

 

 

The Ultimate Cart only supports carts up to 1MB because that's how much RAM it has on board. I don't recall if it has a SIDE-like IDE interface to the flash card. If so, then flashjazzcat's PDM Player may work (or could be made to work?) for arbitrarily large files.

 

Ulatimae cart emulate orher carts and use sd card for images. But iam not sure which one of supported carts can be bigger then 1Mb.

 

EDIT: sorry, in older toppic:

 

It supports most ROMs up to 1 megabyte in size, including standard 8k and 16k cartridges, XEGS, AtariMax 1 & 8mbit ROMs, SIC! Cart, Bounty Bob, OSS, SDX & Williams. ROM dumps can be easily converted into CAR format with my conversion utility.

 

thats a pitty:(


Edited by Poison, Tue May 29, 2018 12:11 PM.


#14 Xuel ONLINE  

Xuel

    Dragonstomper

  • Topic Starter
  • 723 posts
  • Location:US

Posted Tue May 29, 2018 12:21 PM

Version 0.2 released. Change log here.

 

I fixed the IDE Player code but it's super slow in Chrome for some reason. Chrome doesn't seem to like an every-other-byte access pattern in a Uint8Array. Very strange. Maybe cache thrashing. Will have to investigate. Anyhow, after a long conversion process I was able to produce a working example that plays in flashjazzcat's PDM Player:

 

Attached File  Demovibes9 pcm44 mono 44270Hz ide pal.zip   6.46MB   58 downloads

 

A note of caution: I found that the sector table ends up overwriting the PCM4+4 hi/lo tables if the audio is too long. Not sure where the cutoff is but it's somewhere between 3 and 5 minutes.

 

I also support half-rate (22kHz) stereo conversion for the PDM Player. I anticipated flashjazzcat would want the following byte order:

 

left 0

left 256

right 0

right 256

left 1

left 257

right 1

right 257

...

 

Edit: note about sector table.


Edited by Xuel, Tue May 29, 2018 12:51 PM.


#15 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • 13,810 posts
  • Location:United Kingdom

Posted Tue May 29, 2018 12:44 PM

Wow... Mind = blown. :) I had no idea what this topic was about when I noticed it earlier, otherwise I'd have been all over it. Just (randomly) converted an MP3 of Fran Jeffries singing Meglio Stasera (from 'The Pink Panther') and played it back on the IDE player... amazing.

 

Attached File  Meglio Stasera (From 1963 Pink Panther Movie) - Fran Jeffries pcm44 mono 44270Hz ide pal.zip   7.92MB   70 downloads

 

Stereo format looks spot-on, and thanks to this converter I'll go ahead and code something up as soon as I get a chance. I know you said you were working on some tools, Xuel, but I didn't imagine we were going to get something this good this fast. Again: remarkable. Thanks so much.

 

I guess 4096 clusters are going to be limiting, so I'll take the time to (optionally) use extended RAM banks for more clusters, effectively providing unlimited file size support. The cluster mapping phase is quite painful once we exceed 8MB, though, so I may put my thinking cap on about that. ;)

 

The PDM concept and this converter are the software events of 2018 as far as I'm concerned. :)


Edited by flashjazzcat, Tue May 29, 2018 12:44 PM.


#16 CharlieChaplin OFFLINE  

CharlieChaplin

    River Patroller

  • 2,931 posts

Posted Tue May 29, 2018 1:47 PM

Hmmm, for several years 1MB was the limit for ROM and CAR formats. Thanks to the PDM music and players, it is time to change this and go for bigger CAR and ROM formats (2MB, 4MB, 8MB, 16MB, 32MB, 64MB, 128MB) and errm, several real cartridges (not only The!Cart) that support such bigger formats. How about an Ultimate 2 or AVG 2 cart. with much more RAM onboard or a flashchip and software that can emulate such bigger carts ?!? Of course it would be also very good if the PDM players support SIDE, as well as IDE+/IDE-2 and other harddisk types (e.g. CD's loading PDM music via a harddisk-interface)...

 

If I can request some music conversion into PDM (allthough I most likely cannot listen to it on real hardware), I would like to have a conversion of "Chi Mai" and "Man with a Harmonica" both originally by Ennio Morricone (and various versions available on youtube).



#17 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,168 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Tue May 29, 2018 1:57 PM

Hmmm, for several years 1MB was the limit for ROM and CAR formats. Thanks to the PDM music and players, it is time to change this and go for bigger CAR and ROM formats (2MB, 4MB, 8MB, 16MB, 32MB, 64MB, 128MB) and errm, several real cartridges (not only The!Cart) that support such bigger formats. How about an Ultimate 2 or AVG 2 cart. with much more RAM onboard or a flashchip and software that can emulate such bigger carts ?!? Of course it would be also very good if the PDM players support SIDE, as well as IDE+/IDE-2 and other harddisk types (e.g. CD's loading PDM music via a harddisk-interface)...

 

If I can request some music conversion into PDM (allthough I most likely cannot listen to it on real hardware), I would like to have a conversion of "Chi Mai" and "Man with a Harmonica" both originally by Ennio Morricone (and various versions available on youtube).

IDE Player already supports the SIDE2 cart.



#18 brenski OFFLINE  

brenski

    Stargunner

  • 1,632 posts
  • How should we f**k off, oh Lord ?
  • Location:Ventura Highway, in the sunshine [UK]

Posted Tue May 29, 2018 3:27 PM

just to add my latest ....just wow!!!

 

got this playing the PDM thru Side2 with Ultimate and...f***ing hell!!!

love this...

a 12mb audio file.

 

love it.

 

is it correct that there's a 22kHz limit on PDM?


Edited by brenski, Tue May 29, 2018 3:37 PM.


#19 Mathy OFFLINE  

Mathy

    River Patroller

  • 2,688 posts
  • Location:Heerlen, NL

Posted Tue May 29, 2018 3:51 PM

Hello guys

 

"Error: Unsupported cartridge type", that's what my Ultimate Cart tells me.   :sad:

 

Sincerely

 

Mathy



#20 Mathy OFFLINE  

Mathy

    River Patroller

  • 2,688 posts
  • Location:Heerlen, NL

Posted Tue May 29, 2018 6:04 PM

Hello guys

 

Tried FujiConvert.  Won't work under Safari (a green bar appears under "Read" but that's it).  Works fine under Firefox.  Created a 33.6 MB file.  Ultimate Cart can't handle that  :grin: .  Will try again tomorrow after work.  Any tips on what will work with the Ultimate Cart?  I don't mean size wise, but the kind of cart I should select in FujiConvert.

 

BTW if it works on a 1MB XEGS (with separate ANTIC and CPU access), that's fine too.

 

Sincerely

 

Mathy


Edited by Mathy, Tue May 29, 2018 6:05 PM.


#21 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,168 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Tue May 29, 2018 6:09 PM

just to add my latest ....just wow!!!

 

got this playing the PDM thru Side2 with Ultimate and...f***ing hell!!!

love this...

a 12mb audio file.

 

love it.

 

is it correct that there's a 22kHz limit on PDM?

No - I believe up to 48kHz is supported, but when playnig stereo files, the limit is halved to 22k.



#22 MaPa OFFLINE  

MaPa

    Dragonstomper

  • 951 posts
  • Location:Czech Republic

Posted Tue May 29, 2018 11:24 PM

So why are here example files with stereo and 34kHz? :) (at least in their name)


Edited by MaPa, Tue May 29, 2018 11:25 PM.


#23 twh/f2 OFFLINE  

twh/f2

    Dragonstomper

  • 644 posts
  • Location:Fractalus

Posted Tue May 29, 2018 11:58 PM

@FJC . One question to your PDM files. Do I have to put them on Fat32 partitions with APT medias? 



#24 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • 13,810 posts
  • Location:United Kingdom

Posted Wed May 30, 2018 1:29 AM

@FJC . One question to your PDM files. Do I have to put them on Fat32 partitions with APT medias? 


FAT32 or FAT16.

#25 Mclaneinc OFFLINE  

Mclaneinc

    Quadrunner

  • 5,919 posts
  • Location:Northolt, UK

Posted Wed May 30, 2018 4:05 AM

Caught this and the whole sound threads in a patchy way, saw the carts on here and booted them in Altirra and the noise was not stunningly good, ie there was something I had not done (?) unlike the early examples I had tried in another thread. A confession, I don't really use the SIDE stuff on Altirra as I'm really just an overgrown gamer at heart and if I can boot images quickly the other ways the notion of adding a virtual hard drive just does not do much for me but obviously for devs and real hardware people its a nice way to test its working without the damage, and of course for the peeps liking all the HD addition stuff its a wonderful addition by Avery..Just not my thing..

 

Basically I'd love to hear these newer musics properly, what do I need to do on Altirra for the Car stuff to work, the .pdm stuff I'll pass on as it seems to need to create a VHD etc which I'll use once or twice just to hear it.

 

If the cart thing just needs a setting change in Altirra I'd appreciate knowing that....Sound I get now is low, distorted and in some cases garbled...If it needs SIDE then don't worry :)

 

Thanks, Paul..


Edited by Mclaneinc, Wed May 30, 2018 4:06 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users