octave: Convert SPN to standard octave

octaveR Documentation

Convert SPN to standard octave

Description

Convert SPN to standard octave.

Usage

octave(x, to_lower = FALSE, spacing = TRUE)

Arguments

x

A vector containing a note in SPN (Scientific Pitch Notation).

to_lower

Logical. Should the string be lower case? Default: FALSE.

spacing

Logical. Should the strin return spaces between notes? Default: TRUE.

Examples

library(voice)
octave('C4')
octave('C5')
all.equal(octave('C4'), octave('C4'))
octave('C4', to_lower = TRUE)
octave(c('C4','D#7','E2'))
octave(c('C4','D#7','E2'), to_lower = TRUE)
octave(c('C4','D#7','E2'), spacing = FALSE)
octave(c('C4','D#7','E2'), to_lower = TRUE, spacing = FALSE)

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