Learn R Programming

music (version 0.1.2)

formatNote: Format notes

Description

Format notes for use in other music functions

Usage

formatNote(notes, default.octave = 4)

Arguments

notes

Vector, String: Input notes in the form c("C4", "D4", "Eb4")

default.octave

Integer: Octave to use if missing in notes. Default = 4; i.e. "C" becomes "C4"

Author

E.D. Gennatas

Details

Converts sharps to flats, adds octave number if missing (Default = 4), and converts (rare) "bb" notes to regular notes

Examples

Run this code
formatNote(c("D#4", "Ebb"))

Run the code above in your browser using DataLab