Home STEM HQ TI-Nspire Authoring TI-Nspire Scripting HQ Scripting Tutorial - Lesson 44

           


Scripting Tutorial - Lesson 44: Lua Scripting and the TI Innovator™ Hub:

4. Making Music with the Innovator™ Hub



Download supporting file for this tutorial

Texas Instruments TI-Nspire Scripting Support Page

       
  

Scripting for the Innovator Hub: Lesson 4: Making Music with the Innovator™ Hub

Top of Page

A lovely application of the OneShotTimer involves taking lists of tones and times to play melodies.

In this sampler, a collection of melodies are included at the end of the script, and then the oneShotTimer is used to play these, when they are selected from the menu.

  

 
    
  1. We add some new variables - tempo, key and lists.

    Our menu is now growing substantially with each new set of examples.

  2.   
      

  3. No changes, other than adding values to the new variables.
  4.   
      

  5. After the previous lesson, this application should be relatively easy to follow, as the time counts down the number of terms in the list.

  6.   
      
  7. No changes from that previously defined.

  8.   
      

  9. These functions are as previously defined, with just the lists of tones and times added at the end.

  
     
 
 

 
 

We can add a whole extra dimension to our sound exploration by including a keyboard. Check out problem 2 of the supporting document for this lesson and you will find a Lua keyboard that lets you create your own Innovator music!

There are also options to explore some of the interesting applications of the harmonic mean to creating alternative tunings, as developed in Mathematics: A Search for Harmony.

It may be of interest to note that this same document will work with both the TI Innovator Hub and with the TI-Nspire iPad Apps using BLE (BlueTooth Low Energy) and the TI MSP432 LaunchPad. Use the free Energia software to flash the attached sketch to the LaunchPad via USB, then follow the guides outlined in LaunchPad lessons LP5 and LP6.

Next we have a bit of fun and build our very own Innovator Robot!


  

Back to Top

  

Home STEM HQ TI-Nspire Authoring TI-Nspire Scripting HQ Scripting Tutorial - Lesson 44