Join us on Discord!
You can help CodeWalrus stay online by donating here.

rawp music routine for TI-82/83/83+/84+

Started by utz, July 29, 2015, 12:34:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

utz

As a byproduct of stuff I'm currently working on, I ported my rawp sound engine from ZX Spectrum to TI Z80. Thanks to the faster CPU, it sounds much, much better than the original Speccy version. Unfortunately the routine is fairly large and does not use interrupts, so it is not too terribly useful for games. Maybe you'll find it useful for the 1-bit forum competition though ;)

Anyway, for those of you who aren't aware of the original engine, here's the feature list:

- 2 tone channels
- 13 different waveforms
- limited volume control
- 1 interrupting hihat sound
- per-step tempo control

For your convenience, the routine comes with an XM converter. So you can compose your music in something like Milkytracker and then compile it using the provided scripts (Win/*nix). Note that this requires Perl to be installed on your computer.

download
sound example
  • Calculators owned: TI-82, TI-83, TI-83+, TI-85, TI-86, TI-92+, Sharp PC-1403

Snektron

Cool. Is the source included? I'd love to get an inner knowlege of sound engines
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


utz

#2
Yes, source is included. It's even annotated to some extend, but overall this one is rather tricky to understand. Basically what happens here is this: There are some specially crafted samples to create the waveforms. Each sample is 256 bytes, with each byte representing an output state (on or off). Groups of 4 bytes are combined and interpreted as a volume level by the player. Consequently, there are 5 OUT commands per channel (4 levels + silence). So you can think of the samples as a sort of PCM format, but instead of packing 2⁸ volume levels in one byte or 2¹⁶ in a word, you pack 5 volume levels in 4 bytes. This is done so the player can read the sample data as fast as possible.

Mind you, the engine was optimized for a 3,5 MHz machine and is now running in 6 MHz, so there is room for improvements. Especially if you'd think about targetting 15 MHz.
  • Calculators owned: TI-82, TI-83, TI-83+, TI-85, TI-86, TI-92+, Sharp PC-1403

Dream of Omnimaga

I replied to this but here's a repost since my post was lost: I loved how this sounded like. It seemed like MIDI but in lower sample rate. It would definitively be interesting to hear music made with this :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal