assign_notes: Assign musical notes

View source: R/assign_notes.R

assign_notesR Documentation

Assign musical notes

Description

Assign musical notes in Scientific Pitch Notation or other variant. See voice::notes(). The notes are cut considering f0 to ensure alignment.

Usage

assign_notes(
  x,
  fmt = 0,
  min_points = 4,
  min_percentile = 0.75,
  max_na_prop = 1
)

Arguments

fmt

Either F0 or formant frequency (in Hz). Default: fmt = 0.

min_points

Minimum number of points for audio section. Default: min_points = 4.

min_percentile

Minimum percentile value of gain to be included on the average of fmt. Default: min_percentile = 0.75.

max_na_prop

Maximum proportion os NAs on gain sector. Default: max_na_prop = 1.

Examples

library(voice)
# get path to audio file
path2wav <- list.files(system.file('extdata', package = 'wrassp'),
pattern = glob2rx('*.wav'), full.names = TRUE)
# Media dataset
M <- extract_features(path2wav)
assign_notes(M, fmt = 0) # f0
assign_notes(M, fmt = 1) # f1
assign_notes(M, fmt = 2) # f2

filipezabala/voice documentation built on April 12, 2025, 12:39 p.m.