* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: rawp music routine for TI-82/83/83+/84+  (Read 927 times)

0 Members and 1 Guest are viewing this topic.

Offline utz

  • Full User
  • Join Date: Jun 2015
  • Location: Absurdistan
  • Posts: 150
  • Post Rating Ratio: +11/-0
  • 01000101110
    • utz82
    • utz's hp
  • WalriiPoints: 50
rawp music routine for TI-82/83/83+/84+
« on: July 29, 2015, 12:34:32 pm »
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
« Last Edit: July 29, 2015, 12:37:53 pm by utz »


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

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3165
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Re: rawp music routine for TI-82/83/83+/84+
« Reply #1 on: July 29, 2015, 03:32:21 pm »
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...


Offline utz

  • Full User
  • Join Date: Jun 2015
  • Location: Absurdistan
  • Posts: 150
  • Post Rating Ratio: +11/-0
  • 01000101110
    • utz82
    • utz's hp
  • WalriiPoints: 50
Re: rawp music routine for TI-82/83/83+/84+
« Reply #2 on: July 29, 2015, 11:30:03 pm »
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.
« Last Edit: July 29, 2015, 11:33:53 pm by utz »
  • Calculators owned: TI-82, TI-83, TI-83+, TI-85, TI-86, TI-92+, Sharp PC-1403

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18606
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: rawp music routine for TI-82/83/83+/84+
« Reply #3 on: August 10, 2015, 03:23:26 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games