Computer Music: Musc216
Cocoa Sample Code


If then else:

title = [songSelector titleOfSelectedItem];

if ([title isEqualToString:@"Select a repertory piece"]) {

myFile = @"Beep";

}

else if ([title isEqualToString:@"My Lord, What a Morning"]) {

[songPageNumberField setIntValue:12];
myFile = @"MyLordWhat";\
myLocation = 7.5; // Where to start the sequence

}


if (myTempoValue < 20)

myTempoValue = 20;


 

Main Page