- 4-Channel Interrupt-Based Audio (83+SE;84+;84+SE)
- 17 Jul 2013 05:41:50 pm
- Last edited by Iambian on 17 Jul 2013 07:03:43 pm; edited 1 time in total
Over the past couple of weeks, I've been working on a four channel interrupt-based music player for use in assembly games. This program is for 15MHz+ calculators, so no, it won't work on normal TI-83+. Today, I'm proud to report that I've gotten more than just a frequency sweep test written. Today, I've got actual music to play.
For this test, I embedded the source (almost verbatim) of the track "Same One (Bellon)" found with QuadPlayer, and wrote a small routine that feeds that information almost verbatim into the sound driver. After tweaking the frequency delays of the audio interrupt and messing with the tracker timing, I ended up with this: https://soundcloud.com/iambian-zenith/audiotest2/s-q7HJz
(Note: The music is much cleaner on hardware. And when the computer trying to record this isn't struggling)
More work needs to be done with the actual timing or file interpretation (or perhaps the source is at fault? I dunno.) and there does seem to be distortion in the sound at higher frequencies. For the sound linked above, the crystal timer for the sound driver is set at CPU (15MHz) / 8 with a delay count of 30 (which resolves to about 62.5KHz), while the timer for the music tracker was ... well.... guessed and tested until I found that it played it at a rate "close enough" to how QuadPlayer played it.
At the mentioned rate above, I ran further tests to see how much of the CPU is actually taken by the audio interrupt. Using Wabbitemu, I got ~76.5% used, while on my TI-84+SE, I got ~74.8%. During tonight's HCWP, I'd like to distribute this test program to see what numbers other people are getting. I'm especially curious to see if the timings vary a bit more on TI-83+SE hardware.
Another note: Since this an audio-only program, there isn't much in the way of screenshots, unless you like watching a blank screen for the current test, or a bunch of rapidly-changing numbers for the prior test.
EDIT: Link modified to actually point to the audio file. It seems what I had before gave an error
For this test, I embedded the source (almost verbatim) of the track "Same One (Bellon)" found with QuadPlayer, and wrote a small routine that feeds that information almost verbatim into the sound driver. After tweaking the frequency delays of the audio interrupt and messing with the tracker timing, I ended up with this: https://soundcloud.com/iambian-zenith/audiotest2/s-q7HJz
(Note: The music is much cleaner on hardware. And when the computer trying to record this isn't struggling)
More work needs to be done with the actual timing or file interpretation (or perhaps the source is at fault? I dunno.) and there does seem to be distortion in the sound at higher frequencies. For the sound linked above, the crystal timer for the sound driver is set at CPU (15MHz) / 8 with a delay count of 30 (which resolves to about 62.5KHz), while the timer for the music tracker was ... well.... guessed and tested until I found that it played it at a rate "close enough" to how QuadPlayer played it.
At the mentioned rate above, I ran further tests to see how much of the CPU is actually taken by the audio interrupt. Using Wabbitemu, I got ~76.5% used, while on my TI-84+SE, I got ~74.8%. During tonight's HCWP, I'd like to distribute this test program to see what numbers other people are getting. I'm especially curious to see if the timings vary a bit more on TI-83+SE hardware.
Another note: Since this an audio-only program, there isn't much in the way of screenshots, unless you like watching a blank screen for the current test, or a bunch of rapidly-changing numbers for the prior test.
EDIT: Link modified to actually point to the audio file. It seems what I had before gave an error