4
4
# '
5
5
# ' This function creates a tibble data frame containing information defining
6
6
# ' various attributes of chords.
7
- # ' It is used to create the \code{ guitarChords} dataset, but can be used to
8
- # ' create other pre-defined chord collections.
7
+ # ' It is used to create the ` guitarChords` dataset, but can be used to create
8
+ # ' other pre-defined chord collections.
9
9
# ' The tibble has only one row, providing all information for the defined chord.
10
10
# ' The user can decide which arguments to vectorize over when creating a chord
11
11
# ' collection. See examples.
12
12
# '
13
- # ' This function uses a vector of fret integers (\code{NA} for muted string) to
14
- # ' define a chord, in conjunction with a string \code{tuning} (defaults to
15
- # ' standard tuning, six-string guitar).
16
- # ' \code{fret} is from lowest to highest pitch strings, e.g., strings six
17
- # ' through one.
13
+ # ' This function uses a vector of fret integers (`NA` for muted string) to
14
+ # ' define a chord, in conjunction with a string `tuning` (defaults to standard
15
+ # ' tuning, six-string guitar). `fret` is from lowest to highest pitch strings,
16
+ # ' e.g., strings six through one.
18
17
# '
19
- # ' The \code{id} is passed directly to the output. It represents the type of
20
- # ' chord and should conform to accepted \code{ tabr} notation. See \code{id}
21
- # ' column in \code{guitar Chords} for examples.
18
+ # ' The `id` is passed directly to the output. It represents the type of chord
19
+ # ' and should conform to accepted ` tabr` notation. See `id` column in
20
+ # ' `guitarChords` for examples.
22
21
# '
23
- # ' Note that the \code{ semitones} column gives semitone intervals between chord
22
+ # ' Note that the ` semitones` column gives semitone intervals between chord
24
23
# ' notes. These count from zero as the lowest pitch based on the tuning of the
25
24
# ' instrument, e.g., zero is E2 with standard guitar tuning. To convert these
26
25
# ' semitone intervals to standard semitone values assigned to pitches, use
27
- # ' e.g., \code{ pitch_semitones("e2")} (40) if that is the lowest pitch and add
26
+ # ' e.g., ` pitch_semitones("e2")` (40) if that is the lowest pitch and add
28
27
# ' that value to the instrument semitone interval values.
29
28
# ' This is the explanation, but doing this is not necessary. You can use
30
- # ' \code{\link{ chord_semitones}} to compute semitones directly on pitches in a
29
+ # ' [ chord_semitones()] to compute semitones directly on pitches in a
31
30
# ' chord.
32
31
# '
33
32
# ' @param fret integer vector defining fretted chord. See details.
34
33
# ' @param id character, the chord type. See details.
35
- # ' @param optional \code{NA} when all notes required. Otherwise an integer
36
- # ' vector giving the indices of\code{ fret} that are considered optional notes
34
+ # ' @param optional `NA` when all notes required. Otherwise an integer
35
+ # ' vector giving the indices of` fret` that are considered optional notes
37
36
# ' for the chord.
38
- # ' @param tuning character, string tuning. See \code{ tunings} for predefined
39
- # ' tunings. Custom tunings are specified with a similar \code{ value} string.
40
- # ' @param ... additional arguments passed to \code{ transpose} .
37
+ # ' @param tuning character, string tuning. See ` tunings` for predefined
38
+ # ' tunings. Custom tunings are specified with a similar ` value` string.
39
+ # ' @param ... additional arguments passed to ` transpose()` .
41
40
# '
42
41
# ' @return a data frame
43
42
# ' @export
@@ -114,19 +113,19 @@ chord_def <- function(fret, id, optional = NA, tuning = "standard", ...){
114
113
# '
115
114
# ' Obtain LilyPond quasi-chord notation.
116
115
# '
117
- # ' These functions take a \code{ tabr} syntax representation of a chord name and
116
+ # ' These functions take a ` tabr` syntax representation of a chord name and
118
117
# ' convert it to quasi-LilyPond syntax;
119
- # ' "quasi" because the result still uses \code{_} for flats and \code{#} for
120
- # ' sharps, whereas LilyPond itself uses \code{es} and \code{is} (mostly).
121
- # ' This is the format used by \code{ tabr} functions involved in communicating
122
- # ' with LilyPond for music transcription, and they make these final conversions
123
- # ' on the fly.
124
- # ' This can be overridden with \code{ exact = TRUE} .
118
+ # ' "quasi" because the result still uses `_` for flats and `#` for sharps,
119
+ # ' whereas LilyPond itself uses `es` and `is` (mostly).
120
+ # ' This is the format used by ` tabr` functions involved in communicating with
121
+ # ' LilyPond for music transcription, and they make these final conversions on
122
+ # ' the fly.
123
+ # ' This can be overridden with ` exact = TRUE` .
125
124
# '
126
125
# ' @param root character, root note.
127
- # ' @param chord character, \code{ tabr} format chord name.
126
+ # ' @param chord character, ` tabr` format chord name.
128
127
# ' @param exact logical, return a more exact LilyPond chord representation.
129
- # ' @param ... additional arguments passed to \code{ transpose} .
128
+ # ' @param ... additional arguments passed to ` transpose()` .
130
129
# '
131
130
# ' @return character
132
131
# ' @export
@@ -198,34 +197,31 @@ lp_chord_mod <- function(root, chord, exact = FALSE, ...){
198
197
# ' These functions assist with mapping between different information that
199
198
# ' define chords.
200
199
# '
201
- # ' For \code{gc_is_known}, a check is done against chords in the
202
- # ' \code{guitarChords} dataset.
203
- # ' A simple noteworthy string is permitted, but any single-note entry will
204
- # ' automatically yield a \code{FALSE} result.
200
+ # ' For `gc_is_known()`, a check is done against chords in the `guitarChords`
201
+ # ' dataset. A simple noteworthy string is permitted, but any single-note entry
202
+ # ' will automatically yield a `FALSE` result.
205
203
# '
206
- # ' \code{gc_info} returns a tibble data frame containing complete information
207
- # ' for the subset of predefined guitar chords specified by \code{name} and
208
- # ' \code{key}.
209
- # ' Any accidentals present in the chord root of \code{name} (but not in the
210
- # ' chord modifier, e.g., \code{m7_5} or \code{m7#5}) are converted according to
211
- # ' \code{key} if necessary.
212
- # ' \code{gc_notes} and \code{gc_fretboard} are wrappers around \code{gc_info},
213
- # ' which return noteworthy strings of chord notes and a named vector of
214
- # ' LilyPond fretboard diagram data, respectively.
204
+ # ' `gc_info()` returns a tibble data frame containing complete information for
205
+ # ' the subset of predefined guitar chords specified by `name` and `key`.
206
+ # ' Any accidentals present in the chord root of `name` (but not in the chord
207
+ # ' modifier, e.g., `m7_5` or `m7#5`) are converted according to `key` if
208
+ # ' necessary.
209
+ # ' `gc_notes()` and `gc_fretboard()` are wrappers around `gc_info()`, which
210
+ # ' return noteworthy strings of chord notes and a named vector of LilyPond
211
+ # ' fretboard diagram data, respectively.
215
212
# ' Note that although the input to these functions can contain multiple chord
216
213
# ' names, whether as a vector or as a single space-delimited string, the result
217
214
# ' is not intended to be of equal length.
218
- # ' These functions filter \code{ guitarChords} . The result is the set of all
215
+ # ' These functions filter ` guitarChords` . The result is the set of all
219
216
# ' chords matched by the supplied input filters.
220
217
# '
221
- # ' \code{gc_name_split} splits a vector or space-delimited set of chord
222
- # ' names into a tibble data frame containing separate chord root and chord
223
- # ' modifier columns.
224
- # ' \code{gc_name_root} and \code{gc_name_mod} are wrappers around this.
218
+ # ' `gc_name_split()` splits a vector or space-delimited set of chord names into
219
+ # ' a tibble data frame containing separate chord root and chord modifier columns.
220
+ # ' `gc_name_root()` and `gc_name_mod()` are wrappers around this.
225
221
# '
226
222
# ' @param notes character, a noteworthy string.
227
- # ' @param name character, chord name in \code{ tabr} format, e.g.,
228
- # ' \code{"bM b_m b_m7#5"}, etc.
223
+ # ' @param name character, chord name in ` tabr` format, e.g., `"bM b_m b_m7#5"` ,
224
+ # ' etc.
229
225
# ' @param root_octave integer, optional filter for chords whose root note is in
230
226
# ' a set of octave numbers. May be a vector.
231
227
# ' @param root_fret integer, optional filter for chords whose root note matches
@@ -234,11 +230,11 @@ lp_chord_mod <- function(root, chord, exact = FALSE, ...){
234
230
# ' or above a specific fret. May be a vector.
235
231
# ' @param bass_string integer, optional filter for chords whose lowest pitch
236
232
# ' string matches a specific string, 6, 5, or 4. May be a vector.
237
- # ' @param open logical, optional filter for open and movable chords. \code{ NULL}
233
+ # ' @param open logical, optional filter for open and movable chords. ` NULL`
238
234
# ' retains both types.
239
235
# ' @param key character, key signature, used to enforce type of accidentals.
240
- # ' @param ignore_octave logical, if \code{ TRUE} , functions like \code{ gc_info}
241
- # ' and \code{ gc_fretboard} return more results.
236
+ # ' @param ignore_octave logical, if ` TRUE` , functions like ` gc_info()` and
237
+ # ' ` gc_fretboard()` return more results.
242
238
# '
243
239
# ' @return various, see details regarding each function.
244
240
# ' @export
0 commit comments