Slashdot Mirror


Making Your Graphing Calculator a Musical Instrument

An anonymous reader writes: Thanks to a recently published open source music editor/sequencer, you can now create music on Texas Instruments graphing calculators. The complexity of the sound is impressive (video) for such a simple device, which does not feature any dedicated sound hardware. HoustonTracker 2 is open source, and is available for the TI-82, 83, 83Plus, and 84Plus.

55 comments

  1. So basically 1-track MOD tracker by UnknownSoldier · · Score: 3, Interesting

    This is cool, but we were software mixing doing this on the Apple ][ and PC/Amiga ages ago with FastTracker, ScreamTracker, etc, etc.
    i.e.
    Tech. Specs for the TI-32: Zilog Z80 @ 6 MHz

    I was more impressed with "Oscillofun":

    * https://www.youtube.com/watch?...

    1. Re:So basically 1-track MOD tracker by bob_super · · Score: 3, Funny

      I remember writing down the frequencies of every note so that we could encode a song into an HP48.
      Then the resident Uber-geek added that to an unrelated piece of code that we gave to the idiot who had erased a couple of our calculators "for fun". Essentially started playing the song in the middle of class at full speed, then looping ever so slower, and nothing short of pulling the batteries or the physical reset button could stop it for about 2 or 3 loooong minutes.
      The teacher had to turn around so we wouldn't see him laugh, but when we could still hear it from the depths of the backpack, I saw him lose it.

    2. Re:So basically 1-track MOD tracker by cant_get_a_good_nick · · Score: 1

      The Apple ][ had very very bad hardware. You could basically ping the speaker, that's it. People built around that, making libraries that eventually became sound, then music. The Amiga had really good sound hardware (as did the Commodore 64), so not a lot of "geek builder cred" there. The PC had whatever hardware you put in, from the bare bones "ping the speaker" that essentially Apple had, to real dedicated spend a hundred or so sound cards. that makes PCs "it depends"

      I heard stories of the old days of mainframes where they used disc packs for sound - access them a certain way for certain sounds that can be called "music" if you try hard enough.

    3. Re:So basically 1-track MOD tracker by es330td · · Score: 4, Interesting

      I remember writing down the frequencies of every note so that we could encode a song into an HP48.

      You certainly did it the hard way. A=440 hz. The ratio between any two adjacent half steps is 2^-12 so one can calculate any pitch given a note name and octave. A friend wrote a program for our 48SX's that would take a file of the format {t=60 {notename octavenumber duration}...} (the first term is the tempo, duration is 1 for whole note, 2 for half note, 4 for quarter, etc.) and convert it to the format "freq dur BEEP" so we could input songs directly from sheet music. I still have the program on my HP48SX twenty years later and still have the interpreted William Tell Overture and Imperial March.

    4. Re:So basically 1-track MOD tracker by Crashmarik · · Score: 2

      Really long history.

      People were doing it on the TRS-80 using the cassette data port and pulse width modulation.

      Before that there were examples of people using loops to generate RF signals that you could use a radio to listen to.

    5. Re:So basically 1-track MOD tracker by bob_super · · Score: 1

      Old engineering question:
        - Why did you spend three days writing that PERL script?
        - Because it saved me half an hour of copy-pasting.

      Perfect example here. I calculated the frequencies using the math formula, and it was a lot simpler to translate every note (using search/replace on the score's text file) than to write a program to do it for me or even worry about the exact syntax to get the math done at runtime.

    6. Re:So basically 1-track MOD tracker by Anonymous Coward · · Score: 0

      the 48's BEEP command is not accurate in frequency. Not at all. And it has some problems with very high pitch sounds. No granularity.

    7. Re:So basically 1-track MOD tracker by es330td · · Score: 1

      The fact that this was possible in 1990 is something of a minor miracle, imho. I wasn't exactly trying to use it as a tuner.

  2. No surround here. by Anonymous Coward · · Score: 0

    Without auricular plug.

  3. Pshaw! by ArhcAngel · · Score: 4, Interesting

    Call me when it can do the Hallelujah Chorus

    --
    "A person is smart. People are dumb, panicky dangerous animals and you know it." - K
    1. Re:Pshaw! by Anonymous Coward · · Score: 0

      SW Imperial March with stepper motors. Then I'll be impressed.

    2. Re:Pshaw! by Anonymous Coward · · Score: 0

      https://www.youtube.com/watch?v=yHJOz_y9rZE

      https://www.youtube.com/watch?v=cM_sAxrAu7Q

      https://www.youtube.com/watch?v=X0j7XcTaD-I&feature=iv&src_vid=P7ZOyUO18gg&annotation_id=annotation_4293122041

      I'm fairly sure it could handle it with some appropriate supporting hardware.

  4. Using the Amiga is cheating by tekrat · · Score: 2

    The Amiga had dedicated sound hardware that was highly sophisticated for its time.

    If you were doing this on a PC that had no soundcard (i.e., no sound hardware), and you were getting music out of the internal speaker usually known for just going "beep", then you've got something impressive.

    --
    If telephones are outlawed, then only outlaws will have telephones.
    1. Re:Using the Amiga is cheating by Anonymous Coward · · Score: 0

      I did this in the 80s on a 4.77MHz PC. I was 16 at the time and played a recorded (trough the parallel port and an ADC converter) voice on a PC using software PWM in the "beep" only enabled speaker. A few months after I did this I saw the same effect created in a game to play music.

    2. Re:Using the Amiga is cheating by UnknownSoldier · · Score: 1

      >and you were getting music out of the internal speaker usually known for just going "beep", then you've got something impressive.

      Nah, just need to dedicate CPU cycles to the task.

        we had digitized speech (SeaDragon) on the Apple ][ and music (Goonies), even classical. (Not linking to the obvious Castle Wolfenstein)

      At 1 MHz you can get fake 2-voice music. (Karateka)

      1-bit sampling can produce anything (albeit at low quality) when you dedicate even 1 MHz to the process.

      Similarly on the PC @ 4.77 Mhz, you can get fake mutl-voice music (8088 MPH by Hornet + CRTC + DESiRE)

      On the PC, since you had ~8 MHz you could get fake 3 voice music. (Sorry, can't find a demo)

      8-bit DAC at 16MHz sounds SO much better.

      So yeah, this is old news.

      Still impressive for a calc. :-)

    3. Re:Using the Amiga is cheating by Anonymous Coward · · Score: 0

      Not really. "Fancy" sound (think sci fi sound effects) were common enough on early 8 bitters, and primitive voice synth was not unheard of - for example there was a typing tutor on the microbee 32k (z80, 32k ram, 1 bit sound direct controlled directly by the cpu) that would buzz (in a crude, very buzzy voice) "congratulations" if you typed fast enough. I have absolutely no idea how it did it, but we were all so impressed we learnt how to type just to hear it.

    4. Re: Using the Amiga is cheating by patterner982 · · Score: 1

      LDA $C030 // Loading Accumulator from memory address $C030 makes a "click"
      That's all the Apple ][ had as audio.

    5. Re:Using the Amiga is cheating by Anonymous Coward · · Score: 0

      If you were doing this on a PC that had no soundcard (i.e., no sound hardware), and you were getting music out of the internal speaker usually known for just going "beep", then you've got something impressive.

      Umm, no, not really. It might have been 1-bit sound but there were plenty of tools for playing audio files through the bit toggle for the PC speaker. Hint: the "beep" was usually just a BIOS routine that toggled the same bit at a given frequency for a given duration. Games were doing exactly the same thing on Apple ]['s long before the Apple ][gs came along with its Ensoniq dedicated sound chip.

    6. Re: Using the Amiga is cheating by UnknownSoldier · · Score: 1

      Technically LDA or STA produces 1-bit sound. Interestingly enough 22 years later Sony copied the same idea with their Super Audio CD -- 1 bit @ 2.8224 MHz

      And while 1-bit audio was all the Apple had one _could_ playback digitized speech as Castle Wolfenstien and Sea Dragon proved.

      i.e.

      • ACHTUNG
      • HALT
      • EEYAGH
      • YIEEE
      • CHWEINHUND
      • SS
      • PHOLGE
      • KAMERAD
      • WASISTLOS
      • FEUER
      • DAPUT
      • UFWIEDERSEN

      Along with the famous "You're caught"

      See this CW disassembly thread for more details.

  5. hmm, not really by rewindustry · · Score: 1

    linux has had good drivers for PC type squeakers built in, for some time now.

    all things are easy, given the algorithm.

    1. Re:hmm, not really by Blaskowicz · · Score: 1

      If anyone wonders you have to do a "modprobe snd-pcsp" if you want to be able to play just a beep.

  6. how pathetic by rubycodez · · Score: 5, Insightful

    TI-82 introduced in 1993, TI-83 in 1996. Twenty fucking year old tech and they have the gall to ask $150 list for those pieces of shit, and moreover get schools to require them. Fuck you TI, die in a fire

    1. Re:how pathetic by TechyImmigrant · · Score: 1

      Casio FTW!

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    2. Re:how pathetic by UnknownSoldier · · Score: 1

      You would rather have a crappy Casio over a HP or a TI ? That's sick. :-)

      4 grayscale HP-48 SX/GX FTW !

    3. Re:how pathetic by cdrudge · · Score: 1

      Chevrolet Suburban was introduced in 1935. Eighty fucking year old tech and they have the gall to ask $50k list for those pieces of shit... Oh wait. The model has actually changed over the years and it's not the same thing that was introduced long ago despite it still having the same original purpose.

      TI-82 and TI-83 was discontinued in 2004. They've been replaced with more modern successors with updated features. You can find new TI-83+ for less than half your stated MSRP or if you don't mind used, half again. I think I picked up a Ti-84 Plus C Silver Edition, Texas Instrument's most advanced model without stepping up to the TI-89 or Nspire lines, for about $80.

      Sure you could get a mediocre tablet for that price. And TI is probably milking that product line design for a fortune by now. But they're built like a tank, most text books and school curriculum are written with them in mind, and they're usable on almost any standardized test a high school or college student will encounter. Plus they're built like tanks and aside from batteries, are close to indestructible unless you use them as a hammer or Frisbee.

    4. Re:how pathetic by Anonymous Coward · · Score: 0

      I still have fond memories of my TI-83, and I still have my 89 from 2001. It still works, although I have long forgotten how to do the interesting stuff on it.

    5. Re:how pathetic by rubycodez · · Score: 1

      Wrong. Suburban has modern engine and accessories, nothing like the 1933 one

        TI-82 and 83 still REQUIRED by many schools, still SOLD by major chains (go to amazon.com and enlighten yourself)
      The TI-83+ you mention is 1999 tech and list price is $149, look it up

    6. Re:how pathetic by sconeu · · Score: 1

      Wrong. Suburban has modern engine and accessories, nothing like the 1933 one

      That's what GP said:

      Oh wait. The model has actually changed over the years and it's not the same thing that was introduced long ago despite it still having the same original purpose.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    7. Re:how pathetic by rubycodez · · Score: 1

      but the TI models have the 1990s display and processor

    8. Re:how pathetic by TechyImmigrant · · Score: 1

      Because 30 years after I used if in my O-level exams (UK exams) it's still working fine, it does what's required and it's not huge like a TI.
      HPs are good too but I couldn't afford one when I was at school and after 30+ years with a Casio, I'm not about to change.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    9. Re:how pathetic by Anonymous Coward · · Score: 0

      4 grayscale HP-48 SX/GX FTW !

      Thanks, I can fap to this!

    10. Re:how pathetic by Anonymous Coward · · Score: 0

      Yeah, the 1933 version lasts longer than the new rust bucket.

    11. Re:how pathetic by Anonymous Coward · · Score: 0

      i don't know about ti

      but i bought a hp48gx for nearly €300 back in 97

      it's still going strong, as new. the buttons have the same feel they had the day i bought it

      in contrast, i've gone through at least ten computers and ten smartphones since then

      i can think of no other general purpose electronics device that i own use and ABUSE for nearly two decades that still functions perfectly without any servicing whatsoever

      if you ask me, they are cheap as fuck

    12. Re:how pathetic by cdrudge · · Score: 1

      TI-82 and TI-83 are discontinued. Period. Go look on TI's website and you won't find them under the current products. You may be able to find them "new" but that is just old stock that never sold. Amazon themselves does not sell either of those new, all listings that have a new link are from 3rd party sellers.

      TI-83 Plus is available new, from Amazon, for 93.01 as of this posting.

      If your school REQUIRES either a TI-82 or TI-83 and not any of the newer variants than that's your school's damn fault. Their is not a significant functional difference between any of the TI-83 and TI-84 product lines in their basic use.

      The TI-83 Plus is still around because schools do have a very large investment over the years and it is easier if just one model is maintained by the school system. The same principal applies to computers for instance when a company standardizes on one particular model. They stick with that same base model for longer than what the consumer market might as it's cheaper to maintain, stock spare parts, certifying software and accessory hardware, etc.

    13. Re:how pathetic by cdrudge · · Score: 1

      I was the first student in my high school to have a TI-92 in 1995 or 96 and I got a TI-89 in 1998 when they were first released. Symbolic manipulation with the CAS and "pretty print" were awesome at the time and was wonderful going through college math courses with trig, stats, linear algebra, and calculus.

      When my oldest needed a calculator for his advanced math class in middle school, I picked it up and reminisced the memories of using one. I tried to remember how to do a few interesting thinks, and like you, I drew a blank.

  7. Suddenly I feel by macxcool · · Score: 1

    inadequate ;-)

  8. Now *this* is news for nerds! by Anonymous Coward · · Score: 3, Interesting

    I don't understand where all the negative comments are coming from. To get that out of a pathetic 6 MHz little calculator with no sound hardware is awesome! This is what being a nerd is all about. This is the best news post I've seen on this site in months.

    1. Re:Now *this* is news for nerds! by Anonymous Coward · · Score: 0

      Bad Apple on the TI84+: https://youtu.be/6pAeWf3NPNU

    2. Re:Now *this* is news for nerds! by Anonymous Coward · · Score: 0

      This is news almost 20 years old, though. ZPong was a game on the TI-85 and produced sound through the link port. This FAQ from the 90s discusses exactly this in the section about programs with sound. It never really caught on and far more effort was invested into games with grayscale graphics (on a display that really didn't support grayscale) than was put into sound. The quality of the sound might be better here, but this has been around for almost 20 years.

  9. Take the singing calculator by Anonymous Coward · · Score: 0

    up your fucking ass, you faggot.

    1. Re:Take the singing calculator by Anonymous Coward · · Score: 0

      I've had no trouble with your iPhone, but my graphing calculator was just too big. Sorry!

  10. News from 2003!!! by Anonymous Coward · · Score: 0

    How is this news? http://www.ticalc.org/ has hosted music players for all of those calculators. A brief search and I found some from 2003 (around the time I remember first seeing them.)

  11. Prior Art for this by TarPitt · · Score: 1

    Pocket Calculator

    Kraftwerk

    I'm the operator with my pocket calculator
    I'm the operator with my pocket calculator
    I am adding and subtracting
    I'm controlling and composing
    I'm the operator with my pocket calculator
    I'm the operator with my pocket calculator
    I am adding and subtracting
    I'm controlling and composing
    By pressing down a special key, it plays a little melody
    By pressing down a special key, it plays a little melody
    I'm the operator with my pocket calculator
    I'm the operator with my pocket calculator

    www.youtube.com/watch?v=MobpPTVobOk

    --
    If your children ever found out how lame you are, they'd murder you in your sleep
  12. Taschenrechner by Anonymous Coward · · Score: 0

    Ich bin der Musikant mit Taschenrechner in der Hand.

  13. Much more interesting by avandesande · · Score: 3, Funny

    Making your musical instrument a graphing calculator :-)

    --
    love is just extroverted narcissism
    1. Re:Much more interesting by AthanasiusKircher · · Score: 1

      Making your musical instrument a graphing calculator :-)

      Fun fact -- for a couple thousand years there were these devices called monochords in use as scientific instruments that connected mathematical proportions visually and geometrically to music.

      While they were generally used to understand musical intervals and to build musical scales from math, they could also be "used in reverse" to demonstrate certain kinds of mathematical relationships from the standard positions of musical intervals.

      Not exactly a "graphing calculator," but there's a reason why music theory used to be studied as an advanced science/math at universities up to the early 1700s or so.

  14. HP48 could do this by Anonymous Coward · · Score: 0

    In high school I used to make programs for my HP-48 calculator. The beep frequency and and time delay could be changed to play tunes.

  15. Did it on a TRS-80... by Anonymous Coward · · Score: 0

    I cracked open the case and installed a speaker jack connected to a bus. It produced some cool sounds whenever the cpu was busy.

  16. Jimi "TI" Hendrix by theodp · · Score: 1

    Purple Haze all in my brain, / lately things don't seem the same, / actin' funny but I don't know why / 'scuse me while I calculate Pi

  17. Similar was done on the ZX Spectrum by Vapula · · Score: 2

    Back in the 80ies, the ZX Spectrum had a Z80 clocked at 3.25 MHz (about half TI's clock) and a direct control to the speaker (OUT(0xFE),x allowed to change border color, speaker output and tape output).

    There were many games that were using that simple 1-bit control to play multi-channel music, some even simulating ADSR enveloppe (Release was missing).

    You may find many old Spectrum games using these tricks like Gyroscope, Fox fights back, Dizzy série, ...

    Basically, same processor, lower clock frequency, same kind of output... nothing impressive... but still a nice hack...

  18. Pocket Calculator by Anonymous Coward · · Score: 0

    By pressing down a special key, it plays a little melody.

  19. TI-81? by orion205 · · Score: 1

    I'll be impressed when they get this working for my TI-81!

  20. Wow great progress after nearly 20 years by Anonymous Coward · · Score: 0

    It is amazing what he has done.
    I was one of the first* to "discover" playing music with the TI-85 and posted a library for people to use.
    (*Back then I said I was the first but I am more humble now.)

    I made some neat games but alas I didn't post much source. That was the days before open-source and consequently I lost most of the asm files. Only the website maintains the historical record. I still have the old calculator but lost the ability to install ZShell on it. It would be neat to run those games again.

    http://www.ticalc.org/pub/85/asm/source/zshell/crunchsc.zip ;;Chris Busch ;;cbusch@d.umn.edu (address will be stale after may 96) ;;tuneslib.asm copyright (c)1996 ;;version 1.0 ;;Allows ti-85 zshell programs to play songs or sound effects. ;;To use playsong(hl->song) just do #include "tuneslib.asm" in your zshell ;;program. There is no reason to change anything in this file. ;;This code is freeware, the only restrictions are if you use this code, ;;please send me a copy of your game (so I can play it too!) and give ;;me credit where credit is do in your .doc file.

    #ifndef TUNESLIB_ASM
    #define TUNESLIB_ASM ;;how to call playsong: ;; ld de,(PROGRAM_ADDR) ;; ld hl,yoursong ;; add hl,de ;; CALL_(playsong) ;;If you wish to have a different key to exit the playsong function, do: ;;#define EXITBIT the_port1_bit_of_the_key_you_want ;;The format of songs are: ;; playmode, octive, duration,frequency, duration,frequency ... ;;None of the above numbers are true. ;;valid playmodes are:
    #define LegatoOn 00000000b
    #define LegatoOff 00000001b ;;Legato On means there is a slight pause between notes. ;;Octive: This number specifies the innermost delay. It can be ;;use to raise or lower the whole pitch of the song. Lower number ;;higher pitch. ;;Duration: This number specifies the duration of the note. Its the ;;outer most loop. ;;Use a duration of zero to indicate the end of the song. ;;Frequency: This is not the true frequency. The lower the number the ;;higher the frequency. Use a frequency of 0 to indicate a rest. ;;To have your notes be the same length, make sure that duration*frequency ;;is a constant number (or close to it). ;;WARNING! Not responsible for any damage this may cause!!!!!!!
    #define StopNote 0

    #ifndef EXITBIT
    EXITBIT =6
    #endif
    LEGATOBIT =0 ;;if bit true then no delay between notes ;;void playsong(hl->song) ;;where data= playbits, delay, count,freqd, count,freqd... ;;used: a,b=looper, c=currentport,d=delay,e=playbits,hl->data
    playsong:
    di
    playnokey: ;;dont want any keys pressed when start
    xor a
    out (1),a
    in a,(1)
    cp 255 ;;;bit EXITBIT,a ;;is the exit keypressed??
    jr nz,playnokey
    ld a,$C0
    ld c,a
    out (7),a
    ld e,(hl) ;;play bits
    inc hl
    ld d,(hl) ;;load

  21. HatsuneTracker 4 by Anonymous Coward · · Score: 0

    If anyone is interested, the japanese appear to have eventually achieved a breakthrough in computer-generated singing. Triphones are now fluent, growl is available and the avatar sounds just like a human. DAW is no longer a one-armed giant, your n+1th instrument can be a cute girl who sings like a nightingale!

    https://www.youtube.com/watch?v=q8sZvO22Vug

    Ienai, ienai ft. Hatsune Miku v4X beta
    Fan cover from original score and lyrics by Hilchryme
    Engine: Yamaha Vocaloid 4 for Mac / Windows PC

    If they can port that result to non-orthographic languages, e.g. english, Lady Gaga et al. may as well retire.

  22. Acknowledge the hard work by Anonymous Coward · · Score: 0

    What a lot of "ah done before" and "I am only impressed if it does this 'Link to another video' ". This is a tracker on the calculator itself, with real time editing/creating of your song and saving of your work with the capabilities of a decent 8-bit tracker. Give the guy some credit for his hard work instead!