octave | R Documentation |
Returns which octave each pitch falls in.
By default, middle-C is the bottom of the zeroth-octave, but this can be changed with the octave.offset
argument.
Other octave labels (like lilypond()
-style marks) can be used if you set octave.integer = FALSE
.
octave(
x,
...,
generic = FALSE,
simple = FALSE,
octave.relative = FALSE,
Key = NULL,
transposeArgs = list(),
parseArgs = list(),
gamutArgs = list(),
inPlace = FALSE
)
x |
Input data to parse as pitch information. The |
... |
Arguments passed to the pitch deparser. There are also two hidden (advanced) arguments you can specify: |
generic |
Should "specific" pitch information (accidentals and qualites) be discarded? Defaults to Must be a singleton |
simple |
Should "compound" pitch information (octave/contour) be discarded? Defaults to Must be a singleton |
Key |
The input Defaults to Must be a |
transposeArgs |
An optional list of arguments passed to a special Defaults to an empty Must be a |
parseArgs |
An optional list of arguments passed to the pitch parser. Defaults to an empty Must be a |
inPlace |
Should non-pitch information be retained in the output string. Defaults to Must be a singleton This argument only has an effect if the input (the |
Other pitch functions:
accidental()
,
bhatk()
,
degree()
,
freq()
,
helmholtz()
,
interval()
,
kern()
,
lilypond()
,
pc()
,
pitch()
,
quality()
,
semits()
,
solfa()
,
solfg()
,
step()
,
tonh()
Other partial pitch functions:
accidental()
,
quality()
,
step()
## Not run:
chorales <- readHumdrum(humdrumRroot, 'HumdrumData/BachChorales/.*krn')
within(chorales, octave(Token))
within(chorales, octave(Token, octave.offset = 4)) # traditional octaves
within(chorales, octave(Token, octave.integer = FALSE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.