Embeds the inner segments as a list column with sub-tibbles corresponding to each outer segment.

compmus_align(dat, outer, inner)

Arguments

dat

A tibble.

outer, inner

Tibble columns with start and duration columns.

Examples

library(tidyverse)
get_tidy_audio_analysis("5ZLkc5RY1NM4FtGWEd6HOE") %>%
  compmus_align(bars, segments) %>%
  select(bars) %>%
  unnest(bars)
#> # A tibble: 67 × 4
#>     start duration confidence segments         
#>     <dbl>    <dbl>      <dbl> <list>           
#>  1  0.468     3.61      0.237 <tibble [11 × 9]>
#>  2  4.08      3.52      0.349 <tibble [9 × 9]> 
#>  3  7.60      3.53      0.73  <tibble [10 × 9]>
#>  4 11.1       3.52      0.785 <tibble [11 × 9]>
#>  5 14.7       3.52      0.675 <tibble [11 × 9]>
#>  6 18.2       3.53      0.588 <tibble [12 × 9]>
#>  7 21.7       3.53      0.503 <tibble [9 × 9]> 
#>  8 25.2       3.54      0.916 <tibble [13 × 9]>
#>  9 28.8       3.53      0.335 <tibble [12 × 9]>
#> 10 32.3       3.53      0.598 <tibble [13 × 9]>
#> # … with 57 more rows