Add isochronous times or mean onset times to the data frame
add_isobeats.Rd
Given one instrument, this is the reference time which adds isochronous beats to a onset dataframe based on beat levels and average onset of the 1st beat. Given two or instruments, the mean onset time is added as a reference time.
Arguments
- df
data frame to be processed, where the minimal requirements are: (1) a reference time OR two or more instruments (instr input) and (2) beat sub-division (beat input)
- instr
required element that specifies how the reference time is constructed: if given two or more instruments, will create timings based on mean onset times of the instruments. if given one input as an argument, this is assumed to be an external cycle time and the reference time is then inferred from beat sub-divisions, cycles and mean onset times of the first beat. Required input.
- beat
Beat sub-divisions (required)
- beatlabel
variable which labels the newly created beats (optional)
Value
dataframe with added column of isochronous beats ("Iso.Time") OR mean onset times ("Mean.Time")