scramble_n2: scramble n2 function

View source: R/scramble_n2.R

scramble_n2R Documentation

scramble n2 function

Description

Takes the IOI table (output of compute_IOI) and permutes note2 (along with t2) according to their note classes. I.e. Curve notes are replaced by other curve notes within the same song

Usage

scramble_n2(ioi)

Arguments

ioi

: An IOI table output by compute_IOI

Value

List of 2. 1:A permuted IOI table where each note2 is replaced by another note of the same class. 2: Vector of row indices for the permuted IOI table

Examples

unit_table = tibble::tibble(start = c(0.37, 0.6, 1.2, 1.9), end = c(0.45, 0.7, 1.4, 2),
pos = seq(1,4),sound.files = "JS001.wav" , note_label = rep(c("A","B"),2))
ioi = compute_IOI(unit_table)
perm_ioi = scramble_n2(ioi)

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