get_duration: get_duration function

View source: R/get_duration.R

get_durationR Documentation

get_duration function

Description

Computes the duration of a song using its unit table.

Usage

get_duration(unit_table)

Arguments

unit_table:

A unit table tibble containing the original sound file, start/end times of the note,the note position and note_label.

Value

: A numeric scalar, the end of the first note minus the start of the first note.

Examples

  unit_table = tibble::tibble(start = c(0.37, 0.6, 0.75, 0.2, 1.8, 2.5),
end = c(0.45, 0.7, 0.9, 0.4, 2, 3), 
sound.files = "JS001.wav",
select = seq(6),
note_label = "Curve")
get_duration(unit_table)

Anthony-Kwong/birdsong.tools documentation built on April 14, 2023, 9:50 a.m.