|
TRAXMOD
Digital Audio Player
|
Forums K9spud.com |
TRAXMOD is a small digital audio player using the
LPC2103 ARM7TDMI-S high
speed microcontroller chip (prior versions were based on Microchip dsPIC
DSPs). Currently, TRAXMOD can play raw wave audio and 4 channel MOD files
streaming off of a FAT formatted MMC/SD Card at 44100Hz, 16 bits,
stereo. The hardware for TRAXMOD/ARM can be built using
a BBMICRO Protoboard and a few
additional low cost components.
News
07-04-2008
At this point, I'm thinking any glitches in the MOD player audio are no longer being caused by lack of data being ready in time from the SD Card. I think the remaining few glitches are from bugs in the code, and/or lack of volume ramping support in the mixer. It locks up on a few select MOD files, not sure why yet. A couple MOD files are able to play sample data that they should not be able to access. So, still plenty of work to do, but some MODs sound very close to perfect (at 44.1KHz/16-bit stereo, no less!).
I've got a lot of optimization ideas, some are quite involved though (hardware changes, plus new components that I'll need to order before I can do it). For example, reading data from the SPI port in master mode requires twice the number of instructions than should really be required because we have to pump the SPI data register with dummy data to get the SPI peripheral to clock in each SD Card byte. That's just plain wasteful of instruction cycles. Plus, our SPI master mode clock runs at a slower speed than the maximum 25MHz accepted by SD Cards because we have to use a multiple of the LPC2103's clock rate (I think we're currently maxed out at 16.9344MHz). If we had an external free running clock, we could run it at the full 25MHz, throw the SPI port into slave mode, and then we would not need to pump the SPI data register with dummy data to receive data from the SD Card. Unfortunately, I do not have parts necessary to create a good 25MHz clock source externally on hand right now. Plus, this change would necessitate delving into the EFSL FAT library source code to teach it how to access the SD Card while the SPI port is in slave mode. Lots of work to be done.
Meanwhile, I think I've squashed the bug that was causing some MODs to still have samples that don't play correctly in version 0.6.1. In order to print out sample names, I was writing a zero to the last byte of the sample name data, or so I thought. Instead, I was off by one and ended up zeroing the most significant byte of the sample length variable in memory. That caused larger samples to get truncated in memory. The version 0.6.2 firmware snapshot available in the Developer's Area now fixes that little bug. All of my MODs that are small enough to fit into RAM now play much better with this version. Aside from missing effects like arpeggio, I'd dare say they sound close to perfect.