voice_opt: Voicing options

Description Usage Arguments

View source: R/voice-opt.R

Description

Defines a list of options to be passed to voice.

Usage

1
2
3
4
voice_opt(min_octave = -2L, max_octave = 1L, dbl_change = TRUE,
  min_notes = 1L, max_notes = 4L, features = voice_features(),
  weights = voice_default_weights, exp_cost = FALSE,
  norm_cost = FALSE, log_cost = FALSE, verbose = interactive())

Arguments

min_octave

(Integerish scalar) The minimum octave allowed in the voicing, expressed relative to middle C (MIDI note 60). For example, -1 identifies the octave ranging from one octave below middle C to the B below middle C.

max_octave

(Integerish scalar) The maximum octave allowed in the voicing, expressed relative to middle C (MIDI note 60). For example, 0 identifies the octave ranging from middle C to the B 11 semitones above.

dbl_change

(Logical scalar) Is it permitted to change the doubling of the chords, whether by adding duplicated pitch classes or removing duplicated pitch classes?

min_notes

(Integerish scalar) Sets the minimum allowed number of notes in the voiced chords; ignored if dbl_change = FALSE.

max_notes

(Integerish scalar) Sets the maximum allowed number of notes in the voiced chords; ignored if dbl_change = FALSE.

features

A named list of features to apply to chord transitions, defaulting to a list created by voice_features. Any new features must be created using cost_fun, and take chords as arguments, where the chords are represented as ordered numeric vectors of MIDI note numbers.

weights

A numeric vector of weights mapping to the respective elements of features in their original order. This vector need not be named, but an error will be thrown if names are provided and they do not match with those of features. Alternatively, it is possible to pass a voicer model as created by model_features, or the weights slot of such a model.

exp_cost

(Logical scalar) Experimental - passed to seq_opt, thereby determining whether the linear predictor is exponentiated when computing a sequence's cost.

norm_cost

(Logical scalar) Experimental - passed to seq_opt, thereby determining whether the (possibly exponentiated) linear predictor is normalized over all possible continuations when computing a sequence's cost.

log_cost

(Logical scalar) Experimental - passed to seq_opt, thereby determining whether to take the logarithm of the (possibly exponentiated, possibly normalized) linear predictor when computing a sequence's cost.

verbose

(Logical scalar) Determines whether progress messages are printed during the function's execution.


pmcharrison/voicer documentation built on Dec. 17, 2020, 1:09 p.m.