I've created a subsystem for audio playback on the Ti-83+SE and 84+, which I've creatively titled "Untitled TI Audio Subsystem".

Untitled TI Audio Subsystem is an untitled audio subsystem for Ti-83+SE and Ti-84+(SE) calculators. It makes use of all three crystal timers; timer 1 for the left audio output, timer 2 for the right audio output, and timer 3 for progressing the audio.

The purpose of this project is to be a lightweight subsystem others can make use of to add music or sound effects to their assembly programs or games. It's been tested on a real Ti-84+, a real Ti-84+SE, and an emulated Ti-83+SE.

This audio subsystem includes the following features:
    4 channel 1-bit audio (2 channels audible at a time)
    2 channels for music, 2 channels for sound effects
    Pitch sweeping capabilities
    Duty cycle options to give audio a bit more ~color~
    Can play frequencies ranging from 64.63Hz to 1260.31Hz (C2 to D#6)
    Timing handled by the Crystal Timers
    Single-frame call stack and finite loops

The subsystem plays audio from a series of audio instructions. I've created a python script to compile these audio instructions into a series of bytes to be included or pasted into your program. The python script also has limited midi file conversion capabilities.


This was originally written as part of a larger project I'm working on, but I figured I'd also release it as a standalone thing in case anyone else was interested in making use of it.

You can download the project here: https://drive.google.com/file/d/1TA6Q7F9KJwYtFOIOT9HRD4AEB5EGSA2-/view?usp=sharing

Included in the download files:
    readme.txt: More detailed information about this subsystem
    audio.z80: The audio subsystem to include in your assembly code
    Compiler: Folder containing the audio compiler and example songs
    audio_ex.z80: Simple example program using the audio subsystem
    audio_ex_player.z80: Not-so-simple example program using the audio subsystem
    credits.txt: Additional credits for the example songs used and code snippets used


Here are some example songs I've converted to the subsystem to show off its capabilities (both included in the download files):




If y'all have any comments, questions, or suggestions, I'd love to hear them!
I don't have much to add to this, considering that I'm not particularly knowledgeable in either the z80 calcs or assembly programming in general, but awesome work! The converter is a nice touch as well, it's always nice to be able to give people a way to automate these things.

Since you're using different timers for the left and right channels, I assume that means that stereo output is a thing? It's difficult to tell given those videos (which sound great, by the way).

Great work, and I look forward to seeing more updates! Any plans on integrating this into other projects (I assume the "larger project" you mentioned would mean yes)?
Thank you!

It does indeed have stereo output. I attached speakers for the video to make it easier to film, It's much more noticeable with headphones on.

Future updates will probably mainly involve making the converter better. On the calculator side of things I'm pretty happy with where things are at right now (unless of course it turns out there's a bug I missed).

I do plan to integrate this into future projects of mine. No clue when those will be ready to show off but hopefully it won't be too long!
Wow, it sounds really good, like mobileTunes. I don't know much about playing audio on calculators - is it able to play that while running code? I've always wanted to be able to multitask enough to listen to tetris music while playing tetris. If it can multitask, maybe it could be built into a library for the calculator for basic programs to call easily.
Yes, it is possible to play the audio and run other code at the same time. I haven't measured how much performance cost this has on the code, but anecdotally when I put it in my game I didn't notice any change in performance.

I don't have any experience making basic libraries, but I think it would probably be possible.
Just updated the files, fixed a small bug with the memory page swapping and added some more detail to the documentation.

Also I've been looking more into the idea of packaging it as a basic library. My thought is I could setup a custom interrupt to somewhere in SaveSScreen, and then if it's a crystal interrupt hand it off to the audio player, and if it's not then jump to Ti's interrupt handling code. Not sure how stable it would be, but I'm sure I could get something working...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement