TI-Innovator Hub Demo

By Tech Powered Dad | February 16, 2017

I recently added a review of the TI-Innovator. I had a couple of simple demos in there, and I promised I’d show how I did them later. Here’s the first of two blog posts explaining one of those demos. This one is really simple, just playing a few notes from the original Super Mario Bros theme song using the TI-Innovator hub itself.

If you are interested in doing your own experiment similar to this, it’s quite simple. For each note that you want to play, you’ll need to send a command to the hub with the tone and the note duration to play. A couple of notes about this. The documentation (and experimentation) seems to indicate that the tone is in hertz and duration is in seconds. However, I found that the hub is a bit out of tune, as compared to several tuning videos on YouTube (i.e. 440 Hz on the TI-Innovator hub is a bit flat). So if you’re trying to go from sheet music to the hub using a conversion chart, you may end up a little out of tune; you can see in the video that I did. Also, I found that when playing consecutive notes, the Innovator didn’t seem to respect the duration argument. Workaround? Play every sound for the same length of time and add a “Wait” argument in between to make the notes feel like they are the appropriate length.

Here’s the code I used to create this simple program:

Define testsnd()=
Prgm
Send "SET SOUND 666 TIME .1"
Wait 0.15
Send "SET SOUND 660 TIME .1"
Wait 0.3
Send "SET SOUND 660 TIME .1"
Wait 0.3
Send "SET SOUND 510 TIME .1"
Wait 0.1
Send "SET SOUND 660 TIME .1"
Wait 0.3
Send "SET SOUND 770 TIME .1"
Wait 0.55
Send "SET SOUND 380 TIME .1"
Wait 0.575
Send "SET SOUND 510 TIME .1"
Wait 0.45
Send "SET SOUND 380 TIME .1"
Wait 0.4
Send "SET SOUND 320 TIME .1"
Wait 0.5
Send "SET SOUND 440 TIME .1"
Wait 0.3
Send "SET SOUND 480 TIME .1"
Wait 0.33
Send "SET SOUND 450 TIME .1"
Wait 0.15
Send "SET SOUND 430 TIME .1"
Wait 0.3
Send "SET SOUND 380 TIME .1"
EndPrgm

 

STEM careers are the future. Will you be ready?

comments powered by Disqus