SSPDBarTiming

Superclass:
NSObject
Declared In:

Introduction

timing of beats in a bar

Discussion

All timings are relative to the current bar so it's easy to edit a timing file (remove/add a bar etc)



Methods

-initWith:duration:beats:

initialiser


initWith:duration:beats:


initialiser

-(nonnull instancetype)initWith:(int)barIndex duration:(int)duration_ms 
        beats:(nonnull NSArray<SSPDBeatTiming*> *)beatTimings; 
Parameters
barIndex

the 0-based bar index

duration_ms

the duration of this bar

beatTimings

the beat timings for the bar excluding the first beat which is always at the start of the bar


Properties

barIndex

the 0-based index of the bar

beatTimings

array of SSBeatTiming for beats 2..

duration_ms

the duration of this bar (from 1st beat of this bar to 1st beat of following bar)

json

for JSON serialisation


barIndex


the 0-based index of the bar

@property (readonly) int barIndex; 
Discussion

this is currently only used to report errors


beatTimings


array of SSBeatTiming for beats 2..

@property (readonly,
    nonnull) NSArray<SSPDBeatTiming*> *beatTimings; 
Discussion

1st beat is always at start of bar


duration_ms


the duration of this bar (from 1st beat of this bar to 1st beat of following bar)

@property (readonly) int duration_ms; 

json


for JSON serialisation

@property (readonly,
    nonnull) NSDictionary *json;