quality: Extract quality from pitch

qualityR Documentation

Extract quality from pitch

Description

Use this if you want to extract only the tonal qualities from pitch data, discarding octave and step information.

Usage

quality(
  x,
  ...,
  generic = FALSE,
  simple = FALSE,
  octave.relative = FALSE,
  Key = NULL,
  transposeArgs = list(),
  parseArgs = list(),
  gamutArgs = list(),
  inPlace = FALSE
)

Arguments

x

Input data to parse as pitch information.

The x argument can be any (atomic) vector, or a tonalInterval, or NULL.

...

Arguments passed to the pitch deparser.

There are also two hidden (advanced) arguments you can specify: memoize and deparse (see the details below).

generic

Should "specific" pitch information (accidentals and qualites) be discarded?

Defaults to FALSE.

Must be a singleton logical value: an on/off switch.

simple

Should "compound" pitch information (octave/contour) be discarded?

Defaults to FALSE.

Must be a singleton logical value: an on/off switch.

Key

The input Key used by the parser, deparser, and transposer.

Defaults to NULL.

Must be a diatonicSet or something coercable to diatonicSet; must be either length 1 or length(x)

transposeArgs

An optional list of arguments passed to a special transpose() call.

Defaults to an empty list().

Must be a list of named arguments to transpose().

parseArgs

An optional list of arguments passed to the pitch parser.

Defaults to an empty list().

Must be a list of named arguments to the pitch parser.

inPlace

Should non-pitch information be retained in the output string.

Defaults to FALSE.

Must be a singleton logical value: an on/off switch.

This argument only has an effect if the input (the x argument) is character strings, and there is extra, non-pitch information in the input strings "besides" the pitch information. If so, and inPlace = TRUE, the output will be placed into an output string beside the original non-pitch information. If inPlace = FALSE, only the pitch output information will be returned (details below).

See Also

Other pitch functions: accidental(), bhatk(), degree(), freq(), helmholtz(), interval(), kern(), lilypond(), octave(), pc(), pitch(), semits(), solfa(), solfg(), step(), tonh()

Other partial pitch functions: accidental(), octave(), step()

Examples


## Not run: 
chorales <- readHumdrum(humdrumRroot, 'HumdrumData/BachChorales/.*krn')

within(chorales, quality(Token))

# Harmonic interval qualities:

within(chorales, hint(Token, deparser = quality))
with(chorales, hint(Token, deparser = quality, incomplete = NA, bracket = FALSE)) |> table()


## End(Not run)

Computational-Cognitive-Musicology-Lab/humdrumR documentation built on Oct. 22, 2024, 9:28 a.m.