Date: Fri, 28 Jan 2011 14:42:26 -0600 (CST) From: Mark Jacobson To: 810-025-01-spring@uni.edu Subject: Tempo of the Twinkle, Twinkle, Little Star song... Hi 025 students, I had 3 questions today about the TEMPO of the song. See http://www.cs.uni.edu/~jacobson/025/birthdayWithTempo.txt has the way we adjusted tempo in class on Monday, and also has the way to adjust tempo that is easier to understand and does not require all the extra variables for QN or HN and EightNote and DottedQN and DottedHalfNote. 1 * tempo quarter note gets 1 count 2 * tempo half note gets 2 counts 0.5 * tempo eigth note gets 1/2 count 0.25 * tempo sixteenth note 1.5 * tempo dotted quarter note -------------------------------------------------------------------------- Try out the following code, if you want to. Create a slider named TEMPO and have the slider have choices from about 0.1 to about 1 with INCREMENTS of size 0.1 or from 0.05 to about 1 with INCREMENT of 0.05. -------------------------------------------------------------------------- ; playScalePattern example was NOT shown in class. ; This is easier of the two approaches shown, and does NOT require ; all the GLOBALS like qn, hn and so on. --- ; Twinkle Twinkle Little Star only has TWO NOTE LENGTHS ; ; quarter note gets 1 unit of time or 1 count ; half note gets 2 units of time or 2 counts ; This is the EASIEST and most straightforward approach: ; tempo is a SLIDER that is set to whatever amount ; of time you want to allow for a quarter note. TO playScalePattern playNote 60 1 * tempo ; quarter note is 1 * tempo playNote 64 1 * tempo playNote 62 1 * tempo playNote 65 1 * tempo playNote 64 0.5 * tempo ; eigth note is 0.5 * tempo playNote 64 0.5 * tempo playNote 67 1 * tempo playNote 65 0.25 * tempo ; sixteenth note is 0.25 * tempo playNote 65 0.25 * tempo playNote 65 0.25 * tempo playNote 65 0.25 * tempo playNote 69 1 * tempo playNote 67 2 * tempo ; half note is two quarter notes playNote 71 1 * tempo ; and is thus 2 * tempo playNote 69 1 * tempo playNote 72 1 * tempo playNote 71 1 * tempo playNote 74 1 * tempo playNote 72 2 * tempo ; half note = 2 * tempo END Be sure to send the email attachments to jacobson@cs.uni.edu when you are submitting homework. Do NOT use jacobson@uni.edu! --- jacobson@cs.uni.edu is the one to use. See you on Monday, Mark