Scores: Process and Programming

The score was programmed by Transcript* that was a script language for Runtime Revolution*.

• Plus one is a step of chromatic scale is up. For Ex. If 3 is C, 4 is C#.
• The center C is set to 60 for the application player that plays numeric steps. C# is 61. D is 62
• The first number 3 of tempo is 31. Every each number of tempo increments the tempo by 1 until the last. The last number of tempo is 3031
• After every each one hundred numbers are played, the melody has 5 whole rests. And numbers are played again.
• Instruments are Contrabass, Cello, Viola and Violin. And each part of score is written by the programming as follows.


Interface: Left text field is Pi. Right text field is a score.





Write Score: -- is a comment

on mouseUp
put fld "tNoteNum" -3 into tNoteNum -- absolute pitch of 0
put fld "pi" into tPI -- 3001 digits of pi
put 31 into tTempo -- the first tempo 31
put the label of btn "inst" into tInst -- instrumental name for a comment
put inst(tInst) && fld "tNote"&" =" & fld "tNoteNum" &cr&cr into fld "score" -- the first line of score
put "T"&tTempo && char 1 of tPAI +tNoteNum &"q Rw " &cr&cr after fld "score"
put 0 into tNum
put 0 into tRest
delete line 1 of tPAI
set cursor to watch
repeat for each char thisChar in tPI
if isNumber(thisChar) is true then
put "T"&tTempo+1+tNum && thisChar+tNoteNum &"q " after fld "score"
add 1 to tNum
add 1 to tRest
end if
if tRest=100 then
put "Rw Rw Rw Rw Rw " &cr&cr after fld "score"
put 0 into tRest
end if
end repeat
put "Rw Rw Rw Rw Rw " &cr&cr after fld "score"
end mouseUp


function inst pName
switch pName
case "Violin"
put "$41" into tName
break
case "Viola"
put "$42" into tName
break
case "Cello"
put "$43" into tName
break
case "Contrabass"
put "$44" into tName
break
end switch
return (tName && "V10 Z1 // " & pName)
end inst



Scrollbar "tTempo"


global gNoteID, gNoteList

on mouseUp
cancel gNoteID
end mouseUp

on mouseDown
put the cNoteList of this stack into gNoteList
putNote
end mouseDown

on putNote
send putNote to me in 100 milliseconds
put the result into gNoteID
put the thumbPos of sb 1 into tPich
put tPich into fld "tNoteNum"
put item 1 of line lineOffset(tPich, gNoteList) of gNoteList into tNote
put tNote into fld "tNote"
end putNote



Transcript*: One of xTalk that is script languages of the HyperTalk family. See 99 Bottles of Beer.
Runtime Revolution*: http://www.runrev.com/