Jump to content
IGNORED

FujiConvert 0.1


Xuel

Recommended Posts

OK, the "out of memory" error strongly suggests a memory leak. Closing Firefox and restarting every so often should be sufficient. No need to clear cache as this is purely a RAM issue.

 

I've been having memory bloat problems with Firefox under Windows 7 for weeks now (months?).

 

Tired of it; I've dumped Firefox and been using Opera (which is quite nice), until Mozilla gets their act together...

Link to comment
Share on other sites

Ha, today I downloaded "SD Formatter 4.0". Okay there is a newer 5.0 version but that one did not work with my old OS (WIN XP 32Bit). The formatter still did not let me choose the cluster size, but it recognized my 16GB SD-card (that had 8k clusters) and formatted it fine with FAT32. When formatting was done, it informed me, that it had used 32k clusters...

 

So theoretically I should no longer have a 24MB limit for PDM files, but a 96MB limit (enough for most/all sound files)...?!? And if 24MB is enough for soundfiles of a length of up to 8-10 minutes, then 96MB should be enough for soundfiles of a length of up to 32-40 minutes...!?!

 

Copied the PDM files onto the SD-card again, put the SD-card into the AVG-cart, the AVG-cart. into the A8 and loaded the usual stuff (SIDE XEX loader, then PDM player) and... YES ! The 26MB, 27MB and 30MB soundfiles playback without any problems now, great!

 

But if anyone knows of an SD-card formatter that works under WIN XP (32 Bit) and lets me freely choose the cluster size, I am all ears... ;-)

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

Ha, today I downloaded "SD Formatter 4.0". Okay there is a newer 5.0 version but that one did not work with my old OS (WIN XP 32Bit). The formatter still did not let me choose the cluster size, but it recognized my 16GB SD-card (that had 8k clusters) and formatted it fine with FAT32. When formatting was done, it informed me, that it had used 32k clusters...

 

So theoretically I should no longer have a 24MB limit for PDM files, but a 96MB limit (enough for most/all sound files)...?!? And if 24MB is enough for soundfiles of a length of up to 8-10 minutes, then 96MB should be enough for soundfiles of a length of up to 32-40 minutes...!?!

 

Copied the PDM files onto the SD-card again, put the SD-card into the AVG-cart, the AVG-cart. into the A8 and loaded the usual stuff (SIDE XEX loader, then PDM player) and... YES ! The 26MB, 27MB and 30MB soundfiles playback without any problems now, great!

 

But if anyone knows of an SD-card formatter that works under WIN XP (32 Bit) and lets me freely choose the cluster size, I am all ears... ;-)

 

It does install, but refuse to run on my currently updated XP machine. It appears that they did this on purpose.

 

Shame on them.

 

I *WILL* keep my eyes open for such a tool.

 

Edit: MiniTool is coming to mind, but I am having a hard time finding it without MALWARE attached.

 

I'll find it eventually.

Edited by Kyle22
Link to comment
Share on other sites

  • 2 weeks later...

So I'm trying to figure this stuff out for the first time, the fujiconvert page seems pretty straight forward, but I'm still confused about the output media types. Is Atarimax output only for the Atarimax 1Mb & 8Mb carts? Or will this work with MyIDE 2 FAT32? Or, alternatively, does the IDE output media work with MyIDE 2 on the HDD side of things? Maybe since I use FJC's SpartaDOS driver for MyIDE 2 I can use the IDE file versions that way? or is this for only SiDE 2 and IDE 2.0?

 

I've got ONE THE!CART, ONE Atarima 8Mb (doesn't seem like a lot of room for much here) and I have MyIDE 2 with plenty of room on an 8GB CF card. I really don't want to use my only THE!CART to flash just one song file too, and have to reflash for every file, which is apparently the only way. I just got done flashing it for a bunch of software and would rather not go through that again. So, am I just SOL unless I want to reflash my THE!CART for every song file made for it? The best option is MyIDE 2 for me, but from what I can gather, this still isn't supported? Only SIDE or IDE + 2.0?

Edited by Gunstar
Link to comment
Share on other sites

Is Atarimax output only for the Atarimax 1Mb & 8Mb carts?

No idea about the cart types: pass.

 

Or, alternatively, does the IDE output media work with MyIDE 2 on the HDD side of things? Maybe since I use FJC's SpartaDOS driver for MyIDE 2 I can use the IDE file versions that way? or is this for only SiDE 2 and IDE 2.0?

The IDE files are intended to be used with my PDM Player, which doesn't use drivers of any kind since it must communicate directly with the hardware registers for reasons of speed. The downside to this is that you need a different version of the player for each IDE host adapter. I already released versions for U1MB/SIDE and XEL-CF (1088XEL), but haven't gotten around to making any others yet. Theoretically, the player could work with pretty much any IDE or even SCSI HDD available, given sufficient motivation to actually produce the builds.

 

I've got ONE THE!CART, ONE Atarima 8Mb (doesn't seem like a lot of room for much here) and I have MyIDE 2 with plenty of room on an 8GB CF card. I really don't want to use my only THE!CART to flash just one song file too, and have to reflash for every file, which is apparently the only way. I just got done flashing it for a bunch of software and would rather not go through that again. So, am I just SOL unless I want to reflash my THE!CART for every song file made for it? The best option is MyIDE 2 for me, but from what I can gather, this still isn't supported? Only SIDE or IDE + 2.0?

There's no player for IDE Plus or MYIDE yet, so unless you have U1MB/SIDE (or a 1088XEL), you'll need to flash THE!CART.

  • Like 3
Link to comment
Share on other sites

Thanks for the info...I guess I wait on this stuff then...for another build for MyIDE 2 or maybe down the line with SIDE/U1MB...not going to bother constantly reflashing THE!CART for one item at a time, and have to do full reflashes when finished for the normal stuff I want on it. It's just not worth the trouble to me... I MUCH appreciate the reponse JFC! At least it's cleared up for me.

 

Looks like I'll just have to check it out in an emulator...eventually, maybe... :woozy:

Edited by Gunstar
Link to comment
Share on other sites

Thanks for the info...I guess I wait on this stuff then...for another build for MyIDE 2 or maybe down the line with SIDE/U1MB...not going to bother constantly reflashing THE!CART for one item at a time, and have to do full reflashes when finished for the normal stuff I want on it. It's just not worth the trouble to me... I MUCH appreciate the reponse JFC! At least it's cleared up for me.

 

Looks like I'll just have to check it out in an emulator...eventually, maybe... :woozy:

Or see if you can get an AVG cart !

  • Like 1
Link to comment
Share on other sites

Well,

 

the SIDE XEX loader (as a CAR file) is required to be loaded first, then the PDM player can be loaded with it. The PDM player works on UNO cart, SIDE/SIDE-2 cart and AVG cart and plays the 8Bit mono sounds (converted with FujiConvert and option set to IDE-player Flashjazzcat) directly from the SD card. The FJC PDM player supports up to 3072 clusters, if your SD-card is formatted with 8k clusters, then sounds with up to 24MB can be played back, if it is formatted with 16k clusters, then sounds with up to 48MB can be played back and if it is formatted with the maximum (?) 32k clusters, then sounds with up to 96MB can be played back with it.

 

Playback is currently only mono and there is no option yet to pause or cancel playback (return to the menu), but nevertheless playing Megabyte long sounds in 8Bit resolution and full length on a 64k A8 is great ! My 16GB SD-card is filled with approx. 500 converted sounds and I am currently listening to them and writing down which sounds do require a better (with resampling effort = high or ultra) or louder (with gain = 1.5 or 2) conversion with FujiConvert, since I converted them as fast as possible (with resampling effort= none) in the first go...

Edited by CharlieChaplin
  • Like 3
Link to comment
Share on other sites

  • 6 months later...
  • 2 months later...

thought I'd bump this thread with something applicable/timely.

 

well, unless you've been hiding in a cave, you'll be aware that this weekend marks the 50th anniversary of one of mankind's greatest achievements.
Were it not for the frontier breaching competition between the USA and USSRKennedy's Moon Shot "before the end of this decade" statement may never have been realised.
and with the eclipse the other day, I'd been listing my favourite moon-related songs.

now, a list is just (well) - a list, so I thought i'd do something with mine. so as my little tribute to man's "little stepping stone into the cosmos", i've put together a mix

 

here's the files
MP3:    drive.google.com/open?id=10K3s08QkP2b-pASl7ZMbX5bIMKOfun1k

 

(in various Atari formats):
PDM Side/Side2:   drive.google.com/open?id=1uvN10ZddmPWCaR9JUnaBbXTE28P3m8Vj
Emulator XEX file:   drive.google.com/open?id=1cxUs2L2aUisw-jEEcTEjH1BQ0m628Cwj
Atarimax:   drive.google.com/open?id=1Ac-hBYZ-HmP2cpOp6BWMvOuewxQEEmN4
the!Cart:   drive.google.com/open?id=19YRWNRQcyMaTfT3mfJgNS76LzCFZShy3
MegaCart:   drive.google.com/open?id=19zkCtVmlwR6ZMIDO2_J0UOkw6fys6AWx

what's included?
■ Thunderbirds countdown ■ Final Countdown - Europe ■ Space Oddity - David Bowie ■ Aquarius - 5th Dimension ■ Moonage Daydream - David Bowie ■ Highfly - Jon Miles ■ Rocket - Def Leppard ■ Space Truckin' - Deep Purple ■ Bad Moon Rising - Creedence Clearwater Revival ■ Fly Me To the Moon - Frank Sinatra ■ Rocket Man - Elton John ■ Far, Far Away - Slade ■ Whole of the Moon - Waterboys ■ Fly Like An Eagle - Steve Miller ■ Eclipse - Pink Floyd ■ Moonlight Shadow - Mike Oldfield ■ Spaceman - Killers ■ What's Next to the Moon - AC/DC ■ Space Station No5 - Montrose ■ Ticket to the Moon - Electric Light Orchestra ■ Calling Occupants (Of Interplanetary Craft) - Klaatu ■ Starman - David Bowie ■ The Eagle Has Landed - Saxon ■ Man on the Moon - REM ■ Steppin' Out - Joe Jackson ■ Walking on the Moon - Police ■ Cosmic Dancer - T-Rex ■ Fun In Space - Roger Taylor ■ New Moon On Monday - Duran Duran

Link to comment
Share on other sites

  • 4 months later...

FujiConvert 0.3

 

https://github.com/lybrown/fujiconvert

 

Changes

  • [PDM] Replaced all occurrences of "PCM4+4" with "PDM"
  • [PDM] Improved sound quality by restricting fine levels to values 1-14
  • [PDM] Changed "A" key to toggle between settings optimized for linear/non-linear mixing (black background/white background)
  • [PDM] Improved sound quality at very low volumes by adding small DC offset so that waveforms are centered in the fine level range. This avoids pops associated with coarse level transitions.
  • [PDM] Added option to read old .pdm files for reconversion
  • [PWM] Fixed pops by minimizing sample rate jitter
  • [resampling] Improved resampling performance by precomputing coefficients
  • [resampling] Moved resampling to WebWorker threads. Stereo channels are now resampled in parallel threads
  • [resampling] Resampling effort changed to resampling window. Old "Ultra" setting is equivalent to resampling window of 1024. New 2048 option added.
  • [resampling] Added WAV file parser to avoid resampling done by WebAudio
  • [resampling] Skip resampling altogether if WAV sample rate approximately equals (+/-1Hz) Constrained Setting "freq"
  • [mixing] Added auto-gain option to set gain to largest possible value that results in no clipping
  • [conversion] Improved audio-to-Atari-media conversion performance
  • [The!Cart] Disable The!Cart when OPTION is pressed during power up
  • [The!Cart] Leave IRQs and NMIs enabled in splash screen 
  • [cart] Add option to produce either .car or .raw file

PDM Improvements

 

As cool as the PDM method is, many have noticed that it suffers from a lot of noise or static in many cases, e.g. quiet parts of a song or pure tones. This vexed me so I studied the problem a bit. So far I've only focused entirely on Altirra and not on real hardware. Though @CharlieChaplin did provide me with some samples from his machine which more or less confirm what I've found with Altirra.

 

What I found was that the waveform appears to "pop" when transitioning from volume 0 to volume 15 on the "fine level" channel, e.g. when gradually rising from coarse/fine levels 0/15 to 1/0.

 

What I found ameliorates this problem is to simply avoid volume 0 on the fine channel. For example instead of transitioning up from coarse/fine levels 0/15, transition directly to 1/1 instead of 1/0.

 

This means there are now only 15 fine volumes and 16 coarse volumes for a total of 240 combinations so you don't get the full 8-bits of dynamic range but rather only ~7.9-bits. So, it actually doesn't make much difference to the dynamic range but greatly reduces the noise and static. This also means that the "pulse density" on the fine channel should be calibrated to as close to 1/15 as possible instead of 1/16. This begs the question of what happens if we restrict the volume values even further, say 1-14 or 1-4. The best sounding settings I've found are 1-14 and 1-8.

 

I created a program to explore different settings: pdm-test.xex

 

I'd be interested to hear from folks with real hardware to see which settings work the best.

 

Also, I made a small hack to Altirra to plot the audio waveform which helped me investigate this:

 

0001-plot-sound-output-buffer-in-audio-monitor.patch

Altirra-plot-audio.zip

 

There are many other interesting things I found with pdm-test.xex. Here are some settings to try in the program: pdm.txt Of particular interest to me is the difference between "16 ok" and "16 pops". The program re-initializes POKEY on every key press so the only difference between these settings is where within the sample that it begins playing after initialization. This indicates some kind of timing-dependent behavior.

 

Also, if you just start the program, it starts out on a clear triangle wave tone using the best settings I've found for Altirra with the linear volume setting. But if you press a do-nothing key like "E" several times you'll notice that the height of the "bumps" in the waveform change every key press. Correspondingly, the amount of background noise or static changes. (I suggest wearing headphones to get the really experience the effect.) I can't figure out what's causing this since I try to re-initialize POKEY in the exact same way on every key press. Is there some hidden un-resettable state which is controlling this? Is it just an artifact of Altirra or does this happen on real hardware as well? If it could be controlled, then I think we could engineer an initialization sequence which always results in the lowest noise possible.

 

Also, I'm interested in whether or not every real Atari responds the same way to the calibration of the fine channel pulse density. If not, I'd be sad because it makes PDM a whole lot less compelling. Oscilloscopes would be valuable here, though decently high sample rate audio recordings could do the trick as well.

  • Like 7
  • Thanks 2
Link to comment
Share on other sites

The effect you're hearing with Altirra and keypresses may be a dynamic equalizer in the Windows audio path responding to the transient that occurs when the key is pressed. With the audio enhancer that Dell ships by default on their laptops, I can hear a slight variation when this occurs, but it goes away if I cut out the transients at zero crossings in Audacity. There doesn't seem to be anything amiss in the waveform. The second stage AC coupling filter in Altirra's output path will also react to this, but the time constant is pretty short (24ms).

 

Fortunately, I happen to currently have an open-heart patient:

 

patient.thumb.jpeg.ce79f7e15740ed097a26494d3b83f984.jpeg

 

Here are oscilloscope captures of the Sin112 waveform with pulse 3/5 and finelevels 16 and 14, respectively:

Sin112-FineLevels16-Pulse35.thumb.png.2d744996c746c3b4656135700a1c35a4.pngSin112-FineLevels14-Pulse35.thumb.png.576500419dde97b2b021e43f6f0d1b15.png

 

Quite a lot of the fine channel noise leaks through into the output, so this is with CH1 bandwidth restricted to 20MHz and a low-pass filtered version displayed at the top. To be honest, I don't see much of a difference between them. However, a high resolution capture combined with a second tap right out of POKEY gives a clue as to what may be going on (Tri104/16/003/005):

 

image.thumb.png.56a7cc055b7d8983436919455074133a.png

 

Final RCA output is on CH1/yellow, POKEY's output is CH2/cyan. Notice that the discontinuities in the final audio output are not just aligned on coarse steps, they are also happening on half-coarse steps. You can't see it in a static image, but the higher amplitude half of each fine waveform is noisier and less well defined. Zooming in on the fine 7/8 transition shows something interesting:

 

image.thumb.png.5c60611eb00867fcd1525bf75eb589ff.png

 

I've been noticing in traces that POKEY seems to have slightly different timings for different polarities of high-pass edge transitions, which I'm guessing is due to different on/off gate thresholds. Most of the time this is completely inaudible, but at the cycle level this can result in the transitions being shifted by a quarter cycle or so. What's interesting in this particular trace is that this also seems to be happening here, but in this case specifically for the third volume bit, which has a more pronounced alternating pattern. I suspect some internal circuitry in the high-pass audio path has different timing depending on the phase of the toggle flip-flop, and while the gates for volume bits 0-2 are able to accommodate this, the one for volume bit 3 is having trouble ramping in time before it is shut back off. Reducing the number of fine levels reduces the number of steps that activate bit 3 and thus the number of steps subject to this noise.

 

It might be possible to compensate for this with a tailored volume mapping curve. Figuring out that curve, though, will take some work. The high-pass effects in the amplifier stages, particularly the faster one in the first stage, make this difficult to do from the final audio signal as the fast decay makes it hard to measure clean relative levels. It might take a high-resolution signal capture of a slow 256 step ramp right out of POKEY.

 

  • Like 7
Link to comment
Share on other sites

@Xuel I suppose the number of "quieter" sections in my file have lent itself nicely to the experiment? there's definitely an improvement. 

although, I'd say the it's not specifically the "quieter bits",  - some of the louder passages suffer equally - with decent headphones it's very noticeable.

I think it may be more about the sheer number of things "going on".

 

For example -

(louder passages) CCR and AC/DC sound nice and clear, Montrose & Killers suffer badly.

 

and timely that this gets a re-airing during the anniversary week of the second moon landings!

 

 

Link to comment
Share on other sites

Hello guys

 

When I choose "IDE player (flashjazzcat)" I see "freq: 22135.135135135137" and "frequency: 22kHz" when I choose "stereo", but

when I choose "The!Cart" I see "freq: 32760" and "frequency: 47kHz" when I choose "stereo".

 

Two questions:

 

- Why is "freq" and "frequency" different when choosing "The!Cart"?

- Why is the frequency lower when choosing the IDE player when compared to The!Cart?  And does that mean the quality of the sound is better when using The!Cart?

 

Sincerely

 

Mathy

 

 

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, Mathy said:

- Why is "freq" and "frequency" different when choosing "The!Cart"?

- Why is the frequency lower when choosing the IDE player when compared to The!Cart?  And does that mean the quality of the sound is better when using The!Cart?

The "frequency" is whatever you selected.

 

The "freq" is what the tool determined is the highest possible frequency available for the media/stereo/mono/method that you've selected which is around or less than than the "frequency".

 

The IDE player only has two valid choices: mono 22KHz or stereo 44KHz. So the tool ignores the selected frequency in that case.

 

The max frequency for PDM on other media types depends mainly on the speed of the bank switching mechanism for that media type:

  • RAM: 33KHz mono or 22KHz stereo
  • AtariMax, MegaMax, SIC!: 44KHz mono or 31KHz stereo
  • All others: 47KHz mono or 33KHz stereo

In general higher frequency (i.e. sample rate) does equate to better quality all other things being equal. But PDM might throw a wrench in that rule of thumb since the pulse density doesn't change as you ramp up the sample rate so there might be some artifacts at higher frequencies where one sample period may have a very small number of pulses to average over and adjacent sample periods will have different numbers of pulses with different spacings.

 

Another issue is jitter. The player doesn't account for RAM refresh cycles so all frequencies other than 8KHz, 15KHz and 31KHz will have fairly random X cycle jitter depending on where the STA AUDC# instructions land within the scan line. Probably not a big deal when the CPU clock is 1.79MHz.

  • Like 1
Link to comment
Share on other sites

I created a couple videos using my Altirra hack to illustrate a couple of my observations. The Altirra hack plots Altirra's output waveform on the screen. You can get a standing wave if you use a frequency synced to the screen refresh rate, so it's kinda like an oscilloscope.

 

With finelevels=14, pressing E several times changes the heights of the little bumps on the rising and falling ramps of the triangle wave:

 

 

With finelevels=16, changing the offset into the sample upon each initialization changes whether or not there are huge spikes in waveform and also where they occur:

 

 

  • Like 1
Link to comment
Share on other sites

Pretty sure the first effect is just a sampling effect with Altirra's internal audio pipeline, which works by first downsampling the pulse train out of POKEY from 1.8MHz to 64KHz (/28) with a box filter, then high-pass and resampling occurs to 44/48KHz. There's a trick that I did on the main audio pipeline recently that I need to try on the POKEY rendering pipeline, which is to reorder the pulse rendering with the first stage of the high-pass filter to make higher-order filtering cheaper.

 

The second one is a bit suspicious, I wonder if it may be a volume-0 high-pass optimization bug. It's currently forcing output events on channel 1/2, but that may be backwards now that the high-pass is being done at a later stage. I have seen spikes in the output on the scope, but not quite this frequent.

 

  • Like 2
Link to comment
Share on other sites

Something's wrong with the RAM option. I convert a ~40 second MP3 changing just the frequency to 15kHz.
The!Cart plays fine, but RAM XEX is trimmed (just the beginning of the audio plays) and with high noises.
I'm testing on Altirra 3.20 XE PAL 320K Rambo and both files are ~230KB.

  • Like 1
Link to comment
Share on other sites

38 minutes ago, pseudografx said:

Any chance of making this running on the Ultimate Cart?

 

Only as a .CAR or .XEX file and limited to 1MB then, since the Ultimate cannot run bigger files or carts. But ermm, the original filesize (here) is 22.6MB, if you limit this to just 1MB but with the same quality (44khz, 8Bit), you only hear 10, 20 or 30 seconds - not worth the hassle, if you ask me. One could reduce the quality to as low as 8khz, but I am not sure if you really want this...

 

  • Like 2
Link to comment
Share on other sites

On 11/27/2019 at 8:50 PM, CharlieChaplin said:

 

Only as a .CAR or .XEX file and limited to 1MB then, since the Ultimate cannot run bigger files or carts. But ermm, the original filesize (here) is 22.6MB, if you limit this to just 1MB but with the same quality (44khz, 8Bit), you only hear 10, 20 or 30 seconds - not worth the hassle, if you ask me. One could reduce the quality to as low as 8khz, but I am not sure if you really want this...

 

Oh, ok, thanks, I somehow forgot about the 1MB limit. Would it be possible to upload the .pdm then, so I can play it using my SIDE2?

Link to comment
Share on other sites

9 hours ago, pseudografx said:

Oh, ok, thanks, I somehow forgot about the 1MB limit. Would it be possible to upload the .pdm then, so I can play it using my SIDE2?

 

The MP3 and PDM conversion (done with FujiConvert 0.2) can be found in post #186. You may use the MP3 to make your own PDM conversion with the newer FujiConvert 0.3 and several available settings. Sorry, I do not hear much difference with these settings, since I am hard-hearing / hearing-impaired, so you better make your own conversions with FujiConvert 0.3 and simply keep the best one...

 

  • Thanks 1
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...