utz Posted January 11, 2018 Share Posted January 11, 2018 Wow, after 5 years of being a member of this forum I finally managed to actually code an Atari thingy Made a little sound routine for the mighty TIA, which fixes the "detune problem". This is achieved by re-implementing the TIA waveforms in software, and controlling playback with 16-bit pitch accuracy. All AUDC waveforms except 2,3 and E are supported, playback rate is approx. 10 KHz. The player takes 100% CPU time so it isn't suitable for use in games or demos, unfortunately. If you've followed last year's Silly Venture VCS music competition, you will have heard the player in action on the entry named "Tunabit", which took 2nd place. Anyway, I'm now releasing the source code, as well as an XM converter that can be used to convert music composed with a specially crafted XM template. Disclaimer: I'm only a beginner-level 65xx coder so please tell me if you spot any bugs/possible optimizations/etc. github download (includes win32 converter + xm template) tunabit.bin 7 Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted January 11, 2018 Share Posted January 11, 2018 Sounds great! Quote Link to comment Share on other sites More sharing options...
zilog_z80a Posted January 11, 2018 Share Posted January 11, 2018 (edited) Wow, after 5 years of being a member of this forum I finally managed to actually code an Atari thingy Made a little sound routine for the mighty TIA, which fixes the "detune problem". This is achieved by re-implementing the TIA waveforms in software, and controlling playback with 16-bit pitch accuracy. All AUDC waveforms except 2,3 and E are supported, playback rate is approx. 10 KHz. The player takes 100% CPU time so it isn't suitable for use in games or demos, unfortunately. If you've followed last year's Silly Venture VCS music competition, you will have heard the player in action on the entry named "Tunabit", which took 2nd place. Anyway, I'm now releasing the source code, as well as an XM converter that can be used to convert music composed with a specially crafted XM template. Disclaimer: I'm only a beginner-level 65xx coder so please tell me if you spot any bugs/possible optimizations/etc. github download (includes win32 converter + xm template) VERY NICE!! is possible to use this with a static image? ie: like a game title before the game starts i`m asking cos the page says Limitations=========== - 100% CPU time used, cannot render graphics at the same time as playing music and i'm thinking if this means no render at all, static AND rendering an animated player0 for example. cheers!! Edited January 11, 2018 by zilog_z80a 1 Quote Link to comment Share on other sites More sharing options...
utz Posted January 11, 2018 Author Share Posted January 11, 2018 Sadly it's not possible to output any gfx with this player, because it does not produce a stable image. I do have plans for a simpler version however. That one will mix 2 simple saw wave channels, have a stable kernal and maybe even leave some time free on each scanline to do some additional ops. However, I don't understand yet how to do a VSYNC without introducing wait states, which would be crucial for pulling this off. 1 Quote Link to comment Share on other sites More sharing options...
TheHoboInYourRoom Posted January 11, 2018 Share Posted January 11, 2018 Oh my goodness, that's amazing! Quote Link to comment Share on other sites More sharing options...
zilog_z80a Posted January 11, 2018 Share Posted January 11, 2018 Sadly it's not possible to output any gfx with this player, because it does not produce a stable image. I do have plans for a simpler version however. That one will mix 2 simple saw wave channels, have a stable kernal and maybe even leave some time free on each scanline to do some additional ops. However, I don't understand yet how to do a VSYNC without introducing wait states, which would be crucial for pulling this off. ty for your work. Kind regards. Quote Link to comment Share on other sites More sharing options...
Jinroh Posted January 12, 2018 Share Posted January 12, 2018 Rad man! Great job. Can't wait to check this out further when I'm not at work. Quote Link to comment Share on other sites More sharing options...
utz Posted February 1, 2018 Author Share Posted February 1, 2018 I've had some reports that tiatune doesn't work (more specifically, hangs on load) on Flashback Portable. Any ideas that I could try to make it work? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted March 31, 2018 Share Posted March 31, 2018 I just have heard "RoboTIA" at Revision. Great stuff made with this player! 1 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted March 31, 2018 Share Posted March 31, 2018 However, I don't understand yet how to do a VSYNC without introducing wait states, which would be crucial for pulling this off. There is no (too) big deal with VSYNC. If you are able to sync to scanlines to display a picture, then you will be able to sync to VSYNC too. Let me know if I can help. 1 Quote Link to comment Share on other sites More sharing options...
utz Posted April 5, 2018 Author Share Posted April 5, 2018 (edited) Hehe yeah, props to Tronimal for producing such an excellent track with my player (for anybody interested, download it from here: https://demozoo.org/music/185140/ ) I'm currently busy with non-Atari things but I'll definately come back to this at some point. Edited April 5, 2018 by utz 2 Quote Link to comment Share on other sites More sharing options...
+SvOlli Posted April 7, 2018 Share Posted April 7, 2018 I'm currently busy with non-Atari things but I'll definately come back to this at some point. Any Party planned? Nordlicht, Evoke or Deadline? Quote Link to comment Share on other sites More sharing options...
utz Posted April 8, 2018 Author Share Posted April 8, 2018 Most likely Deadline and/or VCFB, provided those are happening. No clue what to code though. I was going to do something with KC-85/3, but now that a KC-85/4 demo has happened at Revision my motivation for that has been lowered significantly Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 3, 2022 Share Posted January 3, 2022 I am no musician, but I have some ideas how to accelerate the main loop which would allow for higher frequencies than 10.4 kHz (best case 16.6 kHz). @utz hasn't been on AtariAge since April 2018, so I am not sure if he is watching or would be interested. Anyone else who wants to step in instead? Or at least interested in general? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 5, 2022 Share Posted January 5, 2022 I have created a fork here. This uses an improved waveform generation code which allows for an ~25% higher pitch and a smaller player (~256 bytes). 1 Quote Link to comment Share on other sites More sharing options...
utz Posted January 25, 2022 Author Share Posted January 25, 2022 In the last couple of weeks, Thomas and I (well, mostly Thomas) have been working hard on a major upgrade for tiatune. The upgrade includes: Optimized waveform generation code, increasing the sample rate from 10.4 to 13.5 kHz. More compact player, freeing up ca. 700 bytes for music Support for all TIA waveforms More compact music data format Variable global song tempo Optional simple visuals Enjoy it while it's fresh and let us know if you run into any issues with this new release. source code download (includes XM converter for Windows) new demotune: waverider.bin 7 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.