Extract scale step.
step.RdThis is equivalent to using any pitch function with the
arguments generic = TRUE, simple = TRUE, and step.labels = NULL.
By default, step() will returns steps relative to the key—set Key = NULL if you don't want this.
Arguments
- x
Input data to parse as pitch information.
The
xargument can be any (atomic) vector, or a tonalInterval, orNULL.- ...
Arguments passed to the pitch deparser.
There are also two hidden (advanced) arguments you can specify:
memoizeanddeparse(see the details below).- generic
Should "specific" pitch information (accidentals and qualites) be discarded?
Defaults to
FALSE.Must be a singleton
logicalvalue: an on/off switch.- simple
Should "compound" pitch information (octave/contour) be discarded?
Defaults to
FALSE.Must be a singleton
logicalvalue: an on/off switch.- Key
The input
Keyused by the parser, deparser, and transposer.Defaults to
NULL.Must be a
diatonicSetor something coercable todiatonicSet; must be either length1orlength(x)- transposeArgs
An optional list of arguments passed to a special
transpose()call.Defaults to an empty
list().Must be a
listof named arguments totranspose().- parseArgs
An optional list of arguments passed to the pitch parser.
Defaults to an empty
list().Must be a
listof named arguments to the pitch parser.- inPlace
Should non-pitch information be retained in the output string.
Defaults to
FALSE.Must be a singleton
logicalvalue: an on/off switch.This argument only has an effect if the input (the
xargument) ischaracterstrings, and there is extra, non-pitch information in the input strings "besides" the pitch information. If so, andinPlace = TRUE, the output will be placed into an output string beside the original non-pitch information. IfinPlace = 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(),
quality(),
semits(),
solfa(),
solfg(),
tonh()
Other partial pitch functions:
accidental(),
octave(),
quality()
Examples
chorale <- readHumdrum(humdrumRroot, 'HumdrumData/BachChorales/chor001.krn')
#> Finding and reading files...
#> REpath-pattern '/home/nat/.tmp/RtmpBDgnJw/temp_libpath28db92437ebb13/humdrumR/HumdrumData/BachChorales/chor001.krn' matches 1 text files in 1 directory.
#> One file read from disk.
#> Validating one file...
#> all valid.
#> Parsing one file...
#> Assembling corpus...
#> Done!
chorale[[20:30,]]
#> ######################## vvv chor001.krn vvv #########################
#> 8: **kern **kern **kern **kern
#> 12: *>[A,A,B] *>[A,A,B] *>[A,A,B] *>[A,A,B]
#> 13: *>norep[A,B] *>norep[A,B] *>norep[A,B] *>norep[A,B]
#> 14: *>A *>A *>A *>A
#> 20: 4GG 4B 4d 4g
#> 21: =1 =1 =1 =1
#> 22: 4G 4B 4d 2g
#> 23: 4E 8cL 4e .
#> 24: . 8BJ . .
#> 25: 4F# 4A 4d 4dd
#> 26: =2 =2 =2 =2
#> 27: 4G 4G 2d 4.b
#> 28: 4D 4F# . .
#> 29: . . . 8a
#> 30: 4E 4G 4B 4g
#> 52: *>B *>B *>B *>B
#> 124: *- *- *- *-
#> ######################## ^^^ chor001.krn ^^^ #########################
#>
#> Data fields:
#> *Token :: character
#>
within(chorale[[20:30,]], step(Token))
#> ######################## vvv chor001.krn vvv #########################
#> 8: **step **step **step **step
#> 12: *>[A,A,B] *>[A,A,B] *>[A,A,B] *>[A,A,B]
#> 13: *>norep[A,B] *>norep[A,B] *>norep[A,B] *>norep[A,B]
#> 14: *>A *>A *>A *>A
#> 20: 1 3 5 1
#> 21: =1 =1 =1 =1
#> 22: 1 3 5 1
#> 23: 6 4 6 .
#> 24: . 3 . .
#> 25: 7 2 5 5
#> 26: =2 =2 =2 =2
#> 27: 1 1 5 3
#> 28: 5 7 . .
#> 29: . . . 2
#> 30: 6 1 3 1
#> 52: *>B *>B *>B *>B
#> 124: *- *- *- *-
#> ######################## ^^^ chor001.krn ^^^ #########################
#>
#> Data fields:
#> Token :: character
#> *humdrumR:::step(Token) :: integer (**step tokens)
#>
within(chorale[[20:30,]], step(Token, step.labels = c('C', 'D', 'E', 'F', 'G', 'A', 'B')))
#> ######################## vvv chor001.krn vvv #########################
#> 8: **step **step **step **step
#> 12: *>[A,A,B] *>[A,A,B] *>[A,A,B] *>[A,A,B]
#> 13: *>norep[A,B] *>norep[A,B] *>norep[A,B] *>norep[A,B]
#> 14: *>A *>A *>A *>A
#> 20: C E G C
#> 21: =1 =1 =1 =1
#> 22: C E G C
#> 23: A F A .
#> 24: . E . .
#> 25: B D G G
#> 26: =2 =2 =2 =2
#> 27: C C G E
#> 28: G B . .
#> 29: . . . D
#> 30: A C E C
#> 52: *>B *>B *>B *>B
#> 124: *- *- *- *-
#> ######################## ^^^ chor001.krn ^^^ #########################
#>
#> Data fields:
#> Token :: character
#> *humdrumR:::step(...) :: character (**step tokens)
#>