/
music.html
411 lines (356 loc) · 23.4 KB
/
music.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create music objects and check music string validity — music • tabr</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/cosmo/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Create music objects and check music string validity — music" />
<meta property="og:description" content="Check whether a string is comprised exclusively of valid syntax for music
strings. A music object can be built from such a string. It combines a
noteworthy string and a note info string." />
<meta property="og:image" content="https://leonawicz.github.io/tabr/logo.png" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">tabr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.4.5</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa-home"></span>
Home
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Tutorials
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">Programming</li>
<li>
<a href="../articles/tabr-prog-nw.html">Noteworthiness</a>
</li>
<li>
<a href="../articles/tabr-prog-scales.html">Musical scales</a>
</li>
<li>
<a href="../articles/tabr-prog-notes.html">Note functions</a>
</li>
<li>
<a href="../articles/tabr-prog-chords.html">Chord functions</a>
</li>
<li>
<a href="../articles/tabr-prog-noteinfo.html">Time and note info</a>
</li>
<li>
<a href="../articles/tabr-prog-music.html">The music class</a>
</li>
<li>
<a href="../articles/tabr-prog-converters.html">Syntax converters</a>
</li>
<li>
<a href="../articles/tabr-fretboard.html">Fretboard diagram plots</a>
</li>
<li class="divider"></li>
<li class="dropdown-header">Transcription</li>
<li>
<a href="../articles/tabr-basics.html">Basic overview</a>
</li>
<li>
<a href="../articles/tabr-phrases.html">Musical phrases</a>
</li>
<li>
<a href="../articles/tabr-helpers.html">Phrase helpers</a>
</li>
<li>
<a href="../articles/tabr-chords.html">Chords</a>
</li>
<li>
<a href="../articles/tabr-repeats.html">Repeats</a>
</li>
<li>
<a href="../articles/tabr-tracks-scores.html">Tracks and scores</a>
</li>
<li>
<a href="../articles/tabr-engraving.html">Render scores</a>
</li>
<li>
<a href="../articles/tabr-snippets.html">Music snippets</a>
</li>
<li>
<a href="../articles/tabr-chordchart.html">Render chord chart</a>
</li>
<li>
<a href="../articles/tabr-tunings.html">Strings and tunings</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Examples
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/tabr-ex1.html">Tuning and capo</a>
</li>
<li>
<a href="../articles/tabr-ex2.html">Multiple voices</a>
</li>
<li>
<a href="../articles/tabr-ex3.html">AC2 - Ezio's family</a>
</li>
<li>
<a href="../articles/tabr-ex4.html">Gin Wigmore - Devil in me</a>
</li>
</ul>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/leonawicz/tabr">
<span class="fas fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Create music objects and check music string validity</h1>
<small class="dont-index">Source: <a href='https://github.com/leonawicz/tabr/blob/master/R/music.R'><code>R/music.R</code></a></small>
<div class="hidden name"><code>music.Rd</code></div>
</div>
<div class="ref-description">
<p>Check whether a string is comprised exclusively of valid syntax for music
strings. A music object can be built from such a string. It combines a
noteworthy string and a note info string.</p>
</div>
<pre class="usage"><span class='fu'>musical</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
<span class='fu'>as_music</span><span class='op'>(</span>
<span class='va'>notes</span>,
info <span class='op'>=</span> <span class='cn'>NULL</span>,
lyrics <span class='op'>=</span> <span class='cn'>NA</span>,
key <span class='op'>=</span> <span class='st'>"c"</span>,
time <span class='op'>=</span> <span class='st'>"4/4"</span>,
tempo <span class='op'>=</span> <span class='st'>"2 = 60"</span>,
accidentals <span class='op'>=</span> <span class='cn'>NULL</span>,
format <span class='op'>=</span> <span class='cn'>NULL</span>,
labels <span class='op'>=</span> <span class='cn'>NULL</span>,
at <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq_along</a></span><span class='op'>(</span><span class='va'>labels</span><span class='op'>)</span>
<span class='op'>)</span>
<span class='fu'>is_music</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
<span class='fu'>music_split</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span></pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>character or music, a string to be coerced or an existing music
object.</p></td>
</tr>
<tr>
<th>notes, info</th>
<td><p>noteworthy and note info strings. For <code>as_music</code>, a
complete music string is assumed for <code>notes</code> when <code>info = NULL</code>.</p></td>
</tr>
<tr>
<th>lyrics</th>
<td><p>optional <code>lyrics</code> object or <code>NA</code>, attached to output
as an attribute.</p></td>
</tr>
<tr>
<th>key</th>
<td><p>character, store the key signature as a music attribute. Defaults
to <code>"c"</code>. See details.</p></td>
</tr>
<tr>
<th>time</th>
<td><p>character, store the time signature as a music attribute.
Defaults to <code>"4/4"</code>. See details.</p></td>
</tr>
<tr>
<th>tempo</th>
<td><p>character, defaults to <code>"2 = 60"</code>. See details.</p></td>
</tr>
<tr>
<th>accidentals</th>
<td><p><code>NULL</code> or character, represent accidentals,
<code>"flat"</code> or <code>"sharp"</code>.</p></td>
</tr>
<tr>
<th>format</th>
<td><p><code>NULL</code> or character, the timestep delimiter format,
<code>"space"</code> or <code>"vector"</code>.</p></td>
</tr>
<tr>
<th>labels</th>
<td><p>character, text annotations to attach to timesteps using
<code>notate</code>.</p></td>
</tr>
<tr>
<th>at</th>
<td><p>integer, timesteps for <code>labels</code>, defaults to starting from
time one.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>depends on the function</p>
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>With note info strings, you are required to enter something at every
timestep, even if it is only the duration. This makes sense because if you
do not enter something, there is simply no indication of a timestep.
A nice feature of music strings is that explicit timesteps are achieved
just by having notes present, allowing you to leave out durations entirely
when they repeat, inheriting them from the previous timestep where duration
was given explicitly. There is no need to enter the same number across
consecutive timesteps; the first will suffice and the rest are automatically
filled in for you when the object is constructed.</p>
<p><code>musical</code> returns a scalar logical result indicating whether all
timesteps contain exclusively valid entries.</p>
<p><code>as_music</code> can be used to coerce to the <code>music</code> class.
Coercion will fail if the string is not musical.
The <code>music</code> class has its own <code>print</code> and <code>summary</code> methods.
<code>music</code> objects are primarily intended to represent an aggregation of a
<code>noteworthy</code> object and a <code>noteinfo</code>. You can optionally fold in a
<code>lyrics</code> object as well. However, for music data analysis, any
operations will involve first splitting the object into its component parts.
The value of this class is for the more efficient data entry it provides.</p>
<p>When <code>accidentals</code> or <code>format</code> are <code>NULL</code>,
these settings are inferred from the musical string input.
When mixed formats are present, flats are the default for accidentals.</p>
<p>Other attributes are attached to a <code>music</code> object.
<code>key</code> uses the <code>tabr</code> syntax, e.g., <code>"c"</code>, <code>"b_"</code>,
<code>"f#m"</code>, etc. <code>time</code> and <code>tempo</code> use the LilyPond string
format. For music programming and analysis, <code>key</code>, <code>time</code> and
<code>tempo</code> can most likely be ignored. They are primarily relevant when
rendering a music snippet directly from a <code>music</code> object with LilyPond.
These additional attributes provide more complete context for the rendered
sheet music.</p>
<p>If you plan to render music snippets from a <code>music</code> object that you are
defining from a new character string, and the context you have in mind is a
stringed and fretted instrument like guitar, you can specify string numbers
at the end of each timestep with numbers following a semicolon delimiter.
This would still precede any <code><a href='https://rdrr.io/r/base/Arithmetic.html'>*</a></code> timestep multiplier number.
See examples.</p>
<p>Note that if you convert a music object to a phrase object, you are changing
contexts. The phrase object is the simplest LilyPond-format music structure.
Coercion with <code>phrase</code> strips all attributes of a music object and
retains only notes, note info and string numbers.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><code><a href='music-helpers.html'>music-helpers</a></code>, <code><a href='note-checks.html'>note-checks</a></code>,
<code><a href='note-metadata.html'>note-metadata</a></code>, <code><a href='note-summaries.html'>note-summaries</a></code>,
<code><a href='note-coerce.html'>note-coerce</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># note durations inherit from previous timestep if missing</span>
<span class='va'>x</span> <span class='op'><-</span> <span class='st'>"a#4-+ b_[staccato] c,x d''t8( e)( g_')- a4 c,e_,g, ce_g4. a~8 a1"</span>
<span class='fu'>is_music</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
</div><div class='output co'>#> [1] FALSE</div><div class='input'><span class='fu'>musical</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
</div><div class='output co'>#> [1] TRUE</div><div class='input'><span class='va'>x</span> <span class='op'><-</span> <span class='fu'>as_music</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
<span class='fu'>is_music</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
</div><div class='output co'>#> [1] TRUE</div><div class='input'><span class='va'>x</span>
</div><div class='output co'>#> <span style='color: #808080;font-weight: bold;'><Music string>
#> Format: </span><span>space-delimited time</span><span style='color: #808080;font-weight: bold;'>
#> Values: </span><span style='color: #00AFFF;font-weight: bold;'>b_</span><span style='color: #FFAF00;'>4-+</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>b_</span><span style='color: #FFAF00;'>4[staccato]</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>c,</span><span style='color: #FFAF00;'>4x</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>d''</span><span style='color: #FFAF00;'>t8(</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>e</span><span style='color: #FFAF00;'>t8)(</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>g_'</span><span style='color: #FFAF00;'>t8)-</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a</span><span style='color: #FFAF00;'>4</span><span style='color: #808080;'> <</span><span style='color: #00AFFF;font-weight: bold;'>c,e_,g,</span><span style='color: #808080;'>></span><span style='color: #FFAF00;'>4</span><span style='color: #808080;'> <</span><span style='color: #00AFFF;font-weight: bold;'>ce_g</span><span style='color: #808080;'>></span><span style='color: #FFAF00;'>4.</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a~</span><span style='color: #FFAF00;'>8</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a</span><span style='color: #FFAF00;'>1</span><span></div><div class='input'>
<span class='va'>y</span> <span class='op'><-</span> <span class='fu'><a href='lyrics.html'>lyrics_template</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
<span class='va'>y</span><span class='op'>[</span><span class='fl'>3</span><span class='op'>:</span><span class='fl'>8</span><span class='op'>]</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/strsplit.html'>strsplit</a></span><span class='op'>(</span><span class='st'>"These are some song ly- rics"</span>, <span class='st'>" "</span><span class='op'>)</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span>
<span class='va'>y</span>
</div><div class='output co'>#> </span><span style='color: #808080;font-weight: bold;'><Lyrics string>
#> Format: </span><span>space-delimited time</span><span style='color: #808080;font-weight: bold;'>
#> Values: </span><span style='color: #FFAF00;font-weight: bold;'>.</span><span style='color: #808080;'> </span><span style='color: #FFAF00;font-weight: bold;'>.</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>These</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>are</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>some</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>song</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>ly-</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>rics</span><span style='color: #808080;'> </span><span style='color: #FFAF00;font-weight: bold;'>.</span><span style='color: #808080;'> </span><span style='color: #FFAF00;font-weight: bold;'>.</span><span style='color: #808080;'> </span><span style='color: #FFAF00;font-weight: bold;'>.</span><span></div><div class='input'>
<span class='va'>x</span> <span class='op'><-</span> <span class='fu'>as_music</span><span class='op'>(</span><span class='va'>x</span>, lyrics <span class='op'>=</span> <span class='va'>y</span>, accidentals <span class='op'>=</span> <span class='st'>"sharp"</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span>
</div><div class='output co'>#> </span><span style='color: #808080;font-weight: bold;'><Music string>
#> Timesteps: </span><span>11 (9 notes, 2 chords)</span><span style='color: #808080;font-weight: bold;'>
#> Octaves: </span><span>tick</span><span style='color: #808080;font-weight: bold;'>
#> Accidentals: </span><span>sharp</span><span style='color: #808080;font-weight: bold;'>
#> Key signature: </span><span>c</span><span style='color: #808080;font-weight: bold;'>
#> Time signature: </span><span>4/4</span><span style='color: #808080;font-weight: bold;'>
#> Tempo: </span><span>2 = 60</span><span style='color: #808080;font-weight: bold;'>
#> Lyrics: </span><span>. . These are some song ly- rics . ...</span><span style='color: #808080;font-weight: bold;'>
#> Format: </span><span>space-delimited time</span><span style='color: #808080;font-weight: bold;'>
#> Values: </span><span style='color: #00AFFF;font-weight: bold;'>a#</span><span style='color: #FFAF00;'>4-+</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a#</span><span style='color: #FFAF00;'>4[staccato]</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>c,</span><span style='color: #FFAF00;'>4x</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>d''</span><span style='color: #FFAF00;'>t8(</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>e</span><span style='color: #FFAF00;'>t8)(</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>f#'</span><span style='color: #FFAF00;'>t8)-</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a</span><span style='color: #FFAF00;'>4</span><span style='color: #808080;'> <</span><span style='color: #00AFFF;font-weight: bold;'>c,d#,g,</span><span style='color: #808080;'>></span><span style='color: #FFAF00;'>4</span><span style='color: #808080;'> <</span><span style='color: #00AFFF;font-weight: bold;'>cd#g</span><span style='color: #808080;'>></span><span style='color: #FFAF00;'>4.</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a~</span><span style='color: #FFAF00;'>8</span><span style='color: #808080;'> </span><span style='color: #00AFFF;font-weight: bold;'>a</span><span style='color: #FFAF00;'>1</span><span></div><div class='input'>
<span class='co'># Starting string = 5: use ';5'. Carries over until an explicit change.</span>
<span class='va'>x</span> <span class='op'><-</span> <span class='st'>"a,4;5*5 b,4-+ c4[staccato] cgc'e'~4 cgc'e'1 e'4;2 c';3 g;4 c;5 ce'1;51"</span>
<span class='va'>x</span> <span class='op'><-</span> <span class='fu'><a href='as_music_df.html'>as_music_df</a></span><span class='op'>(</span><span class='fu'>as_music</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span><span class='op'>)</span>
<span class='va'>x</span><span class='op'>$</span><span class='va'>string</span>
</div><div class='output co'>#> [1] "5" "5" "5" "5" "5" "5" "5" "5432" "5432" "2"
#> [11] "3" "4" "5" "51" </div></span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by <a href='https://github.com/leonawicz'>Matthew Leonawicz</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>
</footer>
</div>
</body>
</html>