expand_notes: Expand notes

expand_notesR Documentation

Expand notes

Description

A character string with incomplete note information for tabr can be expanded to the full information. See Details for the transformations that can be applied.

Usage

expand_notes(ns, sh_fl = 0, rmv_mi = T)

Arguments

ns

Character vector with notes for tabr

sh_fl

Integer indicating the number of sharps (when positive) or flats (when negative). In the latter case the number of flats is (-sh_fl). When ns contains more than one character string the value(s) in sh_fl are recycled when necessary

rmv_mi

Boolean should measure indications (|) be removed

Value

Character vector of the same length as ns with the expanded character strings

Details

Two transformation are applied to the notes:

  • when the octave number is not specified it is taken from the last one specified

  • when a note without a sharp or flat is specified it will be sharpened or flattened according to the number of sharps and flats indicated in sh_fl. A note that should not be sharpened or flattened can be given a additional x: e.g. with sh_fl=1 the note 'fx3' will be noted as 'f3' and not 'f#3'

Examples

## Not run: 
expand_notes('a3 b c g f',sh_fl = 2)
expand_notes(c('a3 b c g f | a3 b c g f | a3 b c g f'),sh_fl = c(2,3),rmv_mi=T)

## End(Not run)

HanOostdijk/tabraux documentation built on Nov. 17, 2022, 3:02 a.m.