pitch_seq {tabr} | R Documentation |
Create a sequence from pitch notation
Description
Create a noteworthy string of a sequence of consecutive pitches.
Usage
pitch_seq(x, y, key = NULL, scale = NULL, format = c("space", "vector"))
Arguments
x |
character, valid pitch notation, e.g., |
y |
character, same as |
key |
character, key signature for a diatonic sequence.
|
scale |
character, if you want to use a different scale in conjunction
with the key/root note, you can provide it, e.g., |
format |
character, the timestep delimiter format, |
Details
Note that all pitches resulting from the defined sequence must be in the semitone range 0-131 or an error is thrown.
If not using a chromatic sequence and x
(or y
if also a pitch) is not
part of the key signature or scale, the sequence is internally bound. See
examples.
Format of accidentals in the result is prioritized by the scale and key, the
key when no scale is given, then x
(and y
if also a pitch), and finally
defaults to flats if ambiguous.
Value
noteworthy
Examples
# chromatic sequence (default)
pitch_seq("a,", 13)
pitch_seq("c5", -2)
pitch_seq("c", "b")
# diatonic sequence
pitch_seq("c", 8, key = "c")
pitch_seq("c", 8, "am")
pitch_seq("c#,", "a#'", "am")
# combine with alternative scale
pitch_seq("a", 8, "am", "harmonic minor")