Description Usage Arguments Value
View source: R/get-corpus-features.R
Analyzes a musical corpus to return a tibble
describing feature values for all possible voicings
of a series of chord sequences.
1 2 | get_corpus_features(x, revoice_from, min_octave, max_octave, min_notes,
max_notes, features = voice_features(), verbose = TRUE)
|
x |
The corpus to analyze, expressed as a list of chord sequences,
where each chord sequence is expressed as a list of chords,
and each chord is expressed as a numeric vector of
non-duplicated MIDI note numbers in ascending order.
The corpus may also be expressed as a |
revoice_from |
(Character scalar)
Determines the representation to which each chord is reduced
before generating candidate revoicings.
Currently supported values are |
min_octave |
(Numeric scalar)
The minimum octave from which the candidate voicings should be drawn,
expressed relative to middle C.
For example, |
max_octave |
(Numeric scalar)
The maximum octave from which the candidate voicings should be drawn,
expressed relative to middle C.
For example, |
min_notes |
(Integer scalar) The minimum number of unique notes permitted in each candidate voicing. An error will be thrown if the corpus contains chords with fewer notes than this number. |
max_notes |
(Integer scalar) The maximum number of unique notes permitted in each candidate voicing. An error will be thrown if the corpus contains chords with more notes than this number. |
features |
A list of features to compute for each chord voicing
(see |
verbose |
(Logical scalar) Whether or not to print progress messages. |
A tibble
where each row describes
a candidate voicing for a particular chord in the corpus,
along with its computed features, with the following columns:
id
- An integer ID variable that uniquely indexes each chord position
in the corpus, beginning at 1 and counting upwards.
seq
- An integer ID variable that uniquely indexes each sequence
in the corpus, beginning at 1 and counting upwards.
pos
- An integer ID variable that uniquely indexes each chord position
in each sequence, restarting at 1 for the beginning of each sequence,
and counting upwards.
chosen
- A logical variable indicating whether this particular
voicing was the one observed in the original corpus.
Each level of id
should have chosen = TRUE
exactly once.
midi
- A character variable describing the pitch content
of the voicing, with each pitch represented as a MIDI note number,
and with these MIDI note numbers pasted together and separated
by spaces.
Subsequent columns provide features values as computed by
the functions provided in features
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.