Jump to content
IGNORED

FujiConvert 0.1


Xuel

Recommended Posts

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.

 

  • Like 17
Link to comment
Share on other sites

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:

 

Jim Power - Title Theme 360p pcm44 stereo 34125Hz thecart pal.zip

 

 

Edited by Rybags
  • Like 1
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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! :)

 

 

  • Like 2
Link to comment
Share on other sites

love this.

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

 

great tho, nonetheless.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

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:

 

Demovibes9 pcm44 mono 44270Hz ide pal.zip

 

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
  • Like 4
Link to comment
Share on other sites

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.

 

Meglio Stasera (From 1963 Pink Panther Movie) - Fran Jeffries pcm44 mono 44270Hz ide pal.zip

 

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
  • Like 5
Link to comment
Share on other sites

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).

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 Guest
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
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...