Header or Body Statements

The large, bold brackets, braces, and parentheses in the components of the envelope, waveTable, and object declarations below are to be typed where shown.

variableDeclaration:

dataType initVariableList

dataType:

double

int

string

var

obj

wave

env

initVariableList:

initVariable [ , initVariableList ]

initVariable:

identifier [ = expression ]

envelopeDeclaration:

envelope envelopeName = envelopeConstant

envelopeName:

identifier

envelopeConstant:

[ envelopePointList ]

envelopePointList:

envelopePoint [ , envelopePointList ]

envelopePoint:

( xValue , yValue [ , smoothingValue] )

waveTableDeclaration:

waveTable waveTableName = waveTableConstant

waveTableName:

identifier

waveTableConstant:

[ partialsList ]

[ { soundfileName } ]

partialsList:

partial [ , partialsList ]

partial:

{ frequencyRatio , amplitudeRatio [ , phase ] }

soundfileName:

fileName

fileName:

"fileName"

objectDeclaration:

object objectName = objectConstant

objectName:

identifier

objectConstant:

[ className objectDescription ]

objectDescription:

defined by className; can contain anything except ]

assignmentStatement:

identifier = expression

includeStatement:

include fileName

printStatement:

print expressionList

expressionList:

expression [ , expressionList ]

tuneStatement:

tune pitchVariable = expression

tune expression

commentStatement:

comment

endCommentStatement:

endComment