SSPData
IntroductionThe play data information about the score required for playing it DiscussionThis can be used to drive a synthesizer (supplied for OS X and iOS only) or to generate a MIDI file using createMidiFile: Methods
clearLoopclear any loop setup by setLoopStart: loopBackBar: numRepeats: -(void)clearLoop; createMidiFile:create a MIDI file from this play data with the given full pathname -(enum sscore_error)createMidiFile:(NSString*)filePath; Return Valueany error createPlayDataFromScore:create and return the SSPData play data +(SSPData*)createPlayDataFromScore:(SSScore*)score tempo:(id<SSUTempo>)tempo; ParametersReturn Valuethe SSPData See Also createPlayDataFromScore:tempo:create and return the SSPData play data +(SSPData*)createPlayDataFromScore:(SSScore*)score tempo:(id<SSUTempo>)tempo; ParametersSee Also createPlayDataFromScore:tempo:withTiming:create and return the SSPData play data for synchronising to a defined array of beat timings +(SSPData*)createPlayDataFromScore:(SSScore*)score tempo:(id<SSUTempo>)tempo withTiming:(SSPDSyncTiming*)syncTiming; ParametersReturn Valuethe SSPData createSingleBarPlayData:create and return the SSPData play data for a single bar and single part only +(SSPData*)createSingleBarPlayData:(SSScore*)score part:(int)partIndex bar:(int)barIndex tempo:(id<SSUTempo>)tempo; ParametersReturn Valuethe SSPData See Also createSingleBarPlayData:part:bar:tempo:create and return the SSPData play data for a single bar and single part only +(SSPData*)createSingleBarPlayData:(SSScore*)score part:(int)partIndex bar:(int)barIndex tempo:(id<SSUTempo>)tempo; ParametersSee Also createSingleChordPlayData:create and return the SSPData play data for a single note or chord in the score +(SSPData*)createSingleChordPlayData:(SSScore*)score part:(int)partIndex bar:(int)barIndex note:(sscore_item_handle)noteId; ParametersReturn Valuethe SSPData See Also createSingleChordPlayData:part:bar:note:create and return the SSPData play data for a single note or chord in the score +(SSPData*)createSingleChordPlayData:(SSScore*)score part:(int)partIndex bar:(int)barIndex note:(sscore_item_handle)noteId; ParametersSee Also scaleTempoMidiFilewrite a new tempo value to the MIDI file so it will play at a different speed -(void)scaleTempoMidiFile:(NSString*)filePath scaling:(float)tempoScaling; See Also scaleTempoMidiFile:scaling:write a new tempo value to the MIDI file so it will play at a different speed -(void)scaleTempoMidiFile:(NSString*)filePath scaling:(float)tempoScaling; See Also seqIndexForBarfrom the current sequence index return the sequence index for the nearest instance of a bar with index barIndex If there are no repeats barIndex = seqIndex for all bars so this returns barIndex -(int)seqIndexForBar:(int)barIndex from:(int)seqIndex; ParametersReturn Valuethe bar sequence index See Also seqIndexForBar:from:from the current sequence index return the sequence index for the nearest instance of a bar with index barIndex If there are no repeats barIndex = seqIndex for all bars so this returns barIndex -(int)seqIndexForBar:(int)barIndex from:(int)seqIndex; ParametersSee Also setLoopStart:loopBackBar:numRepeats:create a play loop between 2 bar indexes -(void)setLoopStart:(int)startLoopBarIndex loopBackBar:(int)loopBackBarIndex numRepeats:(int)numRepeats; ParametersDiscussionlicence playloop_capable is required to use this function Properties
barsan array of SSPDBar @property (readonly) NSArray<SSPDBar*> *bars; hasFirstBarAnacrusistrue if the first bar does not contain the full number of beats @property (readonly) bool hasFirstBarAnacrusis; loopBackif this is set we play in an infinite loop over the bars array @property (readonly) bool loopBack; maxDynamicthe maximum dynamic value on any note in the score @property (readonly) float maxDynamic; numPartsthe number of parts in the score @property (readonly) int numParts; rawplaydatathe C play data @property (readonly) const sscore_playdata *rawplaydata; titlethe title of the score @property (readonly) NSString *title; |