Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

track84

very badly written tracker for the ti-84 plus ce

you probably don't want to use this yet as i still have to implement some features

notes:

  • the audio is 8000hz 8-bit
  • the usb device is added and removed every time it is played (by the calculator, not the user)

usage

keys:

  • clear: goes to previous menu or exits program in the main menu
  • arrows: navigation and editing
  • 2nd: enter/exit edit mode or press buttons in the main menu
  • mode: copy
  • del: paste
  • math: copies the previous cell and moves down 1 (must not be in edit mode)
  • x^-1: clears the current cell (must not be in edit mode)
  • enter: activates usb interface and plays the song from the beginning
  • plus: acticates usb interface and plays the song from where you left off

main menu

on the main menu you can choose to save/load songs, edit patterns, and edit your song using the arrows and the 2nd button. on this menu, the clear key will close the program.

edit mode

in edit mode, you are able to edit the current cell's value using the arrow keys. the up/down arrow keys increment/decrement the value by 1, and the left/right arrow keys increment/decrement the value by a preset jump value (e.g. the jump value for musical notes is 12, for one octave).

pattern edit

the top number in the pattern editor is the pattern's number you're currently editing. the pattern length can be changed in the song edit menu

song edit

the top left number in the song editor is the tempo (jump value is 10), and the number to the right of it is the pattern length (jump value is 8). the 2nd row allows you to set the oscillator used for each of the 6 voices. the rest of the rows allow you to program which pattern each voice plays at a certain time.

playing the song

you can press enter/plus to play the song no matter what menu you're in. it will create a usb microphone device and the screen will tell you it is playing.

compiling

nixos

there's a flake that provides a devshell with the toolchain, tilp2, and usbutils. in the devshell you can run make but the flake also provides a package which can be built with nix build.

everything else

install the ce c toolchain and then run make.

todo

  • usb stuff
    • basic functionality and workingness
    • add a standby mode (using alternates somehow? this might not be possible)
  • sound stuff
    • basic oscillator system
    • sine saw square triangle
    • get a functional noise generator
      • basic noise
      • pitch change
    • get working event handling
    • tempo adjustment
    • volume?
  • gui stuff
    • basic controls and grid layout
    • main menu
    • patterns
    • songs
    • saving

high-level code overview

there's 3 sections to the code: the gui, the usb driver, and the sound engine.

the gui

simple-ish gui with a grid layout made in graphx

it has special cases for the buttons on the main menu and editing to update the sound engine's state

the usb driver

the usb driver handles setting up the usb audio device and sending the data.

it calls the sound engine's GenerateSample function to generate the audio samples which are then sent over usb.

the sound engine

the sound engine handles events (notes within patterns, patterns within song layout) and generates samples with the oscillators.

the GenerateSample function has 3 parts, the timekeeper, which keeps track of time in terms of rows and patterns, the event handler, which updates each voice's pitch based on the current time in the state, and the oscillators themselves, which generate the actual audio.

the oscillators keep track of phase rather than pitch and time, so each sample their phase will increment by an amount specific to the pitch it's set to. this helps prevent popping when the frequency changes and also eliminates the need for multiplication.

About

tracker written for the ti-84 plus ce

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages