
Get onset differences
difference_onsets.RdCalculates the difference in onset times for each instrument pair in milli-seconds.
Arguments
- onset_obj
OnsetsSelectedobject.- instruments
character vector of instrument names.
- expr
R expression to subset onsets (not required).
- splicing_dfr
Spliceobject (not required).
See also
Other statistical and analysis functions:
apply_column_spliceview(),
apply_segment_spliceview(),
ave_cross_power_over_splices(),
ave_cross_power_spliceview(),
ave_power_over_splices(),
ave_power_spliceview(),
calculate_ave_cross_power1(),
calculate_ave_power1(),
compare_ave_cross_power1(),
compare_ave_power1(),
compare_avg_cross_power2(),
compare_avg_power2(),
pull_segment_spliceview(),
sample_gap_splice(),
sample_offset_splice(),
summary_onsets(),
visualise_sample_splices()
Examples
r1 <- get_sample_recording()
o1 <- get_onsets_selected_data(r1)
head(difference_onsets(o1, instruments = c('Inst', 'Tabla')))
#> Metre Ref_Beat_Time Inst-Tabla Segment
#> 1 DrutTeental 2395.808 15.159 All
#> 2 DrutTeental NaN NA All
#> 3 DrutTeental 2396.261 NA All
#> 4 DrutTeental 2396.502 NA All
#> 5 DrutTeental 2396.753 NA All
#> 6 DrutTeental 2397.003 NA All
head(difference_onsets(o1, instruments = c('Inst', 'Tabla'), expr = 'Matra == 3'))
#> Metre Ref_Beat_Time Inst-Tabla Segment
#> 1 DrutTeental 2396.261 NA Matra == 3
#> 2 DrutTeental 2400.210 NA Matra == 3
#> 3 DrutTeental 2404.247 NA Matra == 3
#> 4 DrutTeental NaN NA Matra == 3
#> 5 DrutTeental 2411.947 NA Matra == 3
#> 6 DrutTeental 2415.839 20.244 Matra == 3