musa-dsl 0.40.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Gemfile +0 -1
- data/README.md +15 -1
- data/docs/README.md +1 -0
- data/docs/subsystems/datasets.md +75 -0
- data/docs/subsystems/generative.md +92 -6
- data/docs/subsystems/music.md +349 -19
- data/docs/subsystems/transport.md +26 -0
- data/lib/musa-dsl/datasets/dataset.rb +2 -0
- data/lib/musa-dsl/datasets/gdv.rb +3 -3
- data/lib/musa-dsl/datasets/p.rb +1 -1
- data/lib/musa-dsl/datasets/score/to-mxml/process-time.rb +4 -2
- data/lib/musa-dsl/datasets/score.rb +3 -1
- data/lib/musa-dsl/generative/darwin.rb +36 -1
- data/lib/musa-dsl/generative/generative-grammar.rb +31 -1
- data/lib/musa-dsl/generative/markov.rb +3 -1
- data/lib/musa-dsl/generative/rules.rb +54 -0
- data/lib/musa-dsl/generative/variatio.rb +69 -0
- data/lib/musa-dsl/midi/midi-recorder.rb +4 -0
- data/lib/musa-dsl/midi/midi-voices.rb +13 -1
- data/lib/musa-dsl/music/chord-definition.rb +7 -5
- data/lib/musa-dsl/music/chord-definitions.rb +37 -0
- data/lib/musa-dsl/music/chords.rb +88 -21
- data/lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb +70 -521
- data/lib/musa-dsl/music/scale_kinds/bebop/bebop_dominant_scale_kind.rb +110 -0
- data/lib/musa-dsl/music/scale_kinds/bebop/bebop_major_scale_kind.rb +110 -0
- data/lib/musa-dsl/music/scale_kinds/bebop/bebop_minor_scale_kind.rb +110 -0
- data/lib/musa-dsl/music/scale_kinds/blues/blues_major_scale_kind.rb +100 -0
- data/lib/musa-dsl/music/scale_kinds/blues/blues_scale_kind.rb +99 -0
- data/lib/musa-dsl/music/scale_kinds/chromatic_scale_kind.rb +79 -0
- data/lib/musa-dsl/music/scale_kinds/ethnic/double_harmonic_scale_kind.rb +102 -0
- data/lib/musa-dsl/music/scale_kinds/ethnic/hungarian_minor_scale_kind.rb +102 -0
- data/lib/musa-dsl/music/scale_kinds/ethnic/neapolitan_major_scale_kind.rb +102 -0
- data/lib/musa-dsl/music/scale_kinds/ethnic/neapolitan_minor_scale_kind.rb +101 -0
- data/lib/musa-dsl/music/scale_kinds/ethnic/phrygian_dominant_scale_kind.rb +103 -0
- data/lib/musa-dsl/music/scale_kinds/harmonic_major/harmonic_major_scale_kind.rb +104 -0
- data/lib/musa-dsl/music/scale_kinds/major_scale_kind.rb +110 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/altered_scale_kind.rb +106 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/dorian_b2_scale_kind.rb +104 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/locrian_sharp2_scale_kind.rb +103 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/lydian_augmented_scale_kind.rb +103 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/lydian_dominant_scale_kind.rb +106 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/melodic_minor_scale_kind.rb +104 -0
- data/lib/musa-dsl/music/scale_kinds/melodic_minor/mixolydian_b6_scale_kind.rb +103 -0
- data/lib/musa-dsl/music/scale_kinds/minor_harmonic_scale_kind.rb +125 -0
- data/lib/musa-dsl/music/scale_kinds/minor_natural_scale_kind.rb +123 -0
- data/lib/musa-dsl/music/scale_kinds/modes/dorian_scale_kind.rb +111 -0
- data/lib/musa-dsl/music/scale_kinds/modes/locrian_scale_kind.rb +114 -0
- data/lib/musa-dsl/music/scale_kinds/modes/lydian_scale_kind.rb +111 -0
- data/lib/musa-dsl/music/scale_kinds/modes/mixolydian_scale_kind.rb +111 -0
- data/lib/musa-dsl/music/scale_kinds/modes/phrygian_scale_kind.rb +111 -0
- data/lib/musa-dsl/music/scale_kinds/pentatonic/pentatonic_major_scale_kind.rb +93 -0
- data/lib/musa-dsl/music/scale_kinds/pentatonic/pentatonic_minor_scale_kind.rb +99 -0
- data/lib/musa-dsl/music/scale_kinds/symmetric/diminished_hw_scale_kind.rb +110 -0
- data/lib/musa-dsl/music/scale_kinds/symmetric/diminished_wh_scale_kind.rb +110 -0
- data/lib/musa-dsl/music/scale_kinds/symmetric/whole_tone_scale_kind.rb +99 -0
- data/lib/musa-dsl/music/scale_systems/equally_tempered_12_tone_scale_system.rb +80 -0
- data/lib/musa-dsl/music/scale_systems/twelve_semitones_scale_system.rb +60 -0
- data/lib/musa-dsl/music/scales.rb +606 -67
- data/lib/musa-dsl/musicxml/builder/note.rb +31 -92
- data/lib/musa-dsl/musicxml/builder/pitched-note.rb +33 -94
- data/lib/musa-dsl/musicxml/builder/rest.rb +30 -91
- data/lib/musa-dsl/musicxml/builder/unpitched-note.rb +31 -91
- data/lib/musa-dsl/neumas/array-to-neumas.rb +1 -1
- data/lib/musa-dsl/neumas/neuma-gdv-decoder.rb +2 -2
- data/lib/musa-dsl/sequencer/sequencer-dsl.rb +367 -3
- data/lib/musa-dsl/series/base-series.rb +250 -240
- data/lib/musa-dsl/series/buffer-serie.rb +16 -5
- data/lib/musa-dsl/series/hash-or-array-serie-splitter.rb +29 -3
- data/lib/musa-dsl/series/main-serie-constructors.rb +19 -15
- data/lib/musa-dsl/series/main-serie-operations.rb +74 -29
- data/lib/musa-dsl/series/proxy-serie.rb +5 -1
- data/lib/musa-dsl/series/quantizer-serie.rb +16 -2
- data/lib/musa-dsl/series/queue-serie.rb +15 -1
- data/lib/musa-dsl/series/series-composer.rb +5 -2
- data/lib/musa-dsl/series/timed-serie.rb +8 -4
- data/lib/musa-dsl/transport/timer-clock.rb +4 -2
- data/lib/musa-dsl/transport/timer.rb +27 -4
- data/lib/musa-dsl/version.rb +1 -1
- data/musa-dsl.gemspec +18 -15
- metadata +85 -22
|
@@ -327,98 +327,37 @@ module Musa
|
|
|
327
327
|
# For detailed parameter documentation, see {NoteComplexities::PARAMETERS}
|
|
328
328
|
#
|
|
329
329
|
# @api private (called by subclasses)
|
|
330
|
-
def initialize(*
|
|
331
|
-
pizzicato: nil,
|
|
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
|
-
## articulations
|
|
363
|
-
accent: nil, # true
|
|
364
|
-
breath_mark: nil, # true / comma / tick
|
|
365
|
-
caesura: nil, # true
|
|
366
|
-
detached_legato: nil, # true
|
|
367
|
-
doit: nil, # true
|
|
368
|
-
falloff: nil, # true
|
|
369
|
-
other_articulation: nil, # text
|
|
370
|
-
plop: nil, # true
|
|
371
|
-
scoop: nil, # true
|
|
372
|
-
spiccato: nil, # true
|
|
373
|
-
staccatissimo: nil, # true
|
|
374
|
-
staccato: nil, # true
|
|
375
|
-
stress: nil, # true
|
|
376
|
-
strong_accent: nil, # true / up / down
|
|
377
|
-
tenuto: nil, # true
|
|
378
|
-
unstress: nil, # true
|
|
379
|
-
|
|
380
|
-
## ornaments
|
|
381
|
-
delayed_inverted_turn: nil, # true
|
|
382
|
-
delayed_turn: nil, # true
|
|
383
|
-
inverted_mordent: nil, # true
|
|
384
|
-
inverted_turn: nil, # true
|
|
385
|
-
mordent: nil, # true
|
|
386
|
-
schleifer: nil, # true
|
|
387
|
-
shake: nil, # true
|
|
388
|
-
tremolo: nil, # start / stop / single,
|
|
389
|
-
trill_mark: nil, # true
|
|
390
|
-
turn: nil, # true
|
|
391
|
-
vertical_turn: nil, # true
|
|
392
|
-
wavy_line: nil, # true
|
|
393
|
-
other_ornament: nil, # true
|
|
394
|
-
ornament_accidental_mark: nil, # sharp / natural / flat / ...
|
|
395
|
-
|
|
396
|
-
## technical
|
|
397
|
-
arrow: nil, # Arrow class instance
|
|
398
|
-
bend: nil, # Bend class instance
|
|
399
|
-
double_tongue: nil, # true
|
|
400
|
-
down_bow: nil, # true
|
|
401
|
-
fingering: nil, # Fingering class instance
|
|
402
|
-
fingernails: nil, # true
|
|
403
|
-
fret: nil, # number
|
|
404
|
-
hammer_on: nil, # start / stop
|
|
405
|
-
handbell: nil, # damp / echo / ...
|
|
406
|
-
harmonic: nil, # Harmonic class instance
|
|
407
|
-
heel: nil, # true
|
|
408
|
-
hole: nil, # Hole class instance
|
|
409
|
-
open_string: nil, # true
|
|
410
|
-
other_technical: nil, # text
|
|
411
|
-
pluck: nil, # text
|
|
412
|
-
pull_off: nil, # start / stop
|
|
413
|
-
snap_pizzicato: nil, # true
|
|
414
|
-
stopped: nil, # true
|
|
415
|
-
string: nil, # number (string number)
|
|
416
|
-
tap: nil, # text
|
|
417
|
-
thumb_position: nil, # true
|
|
418
|
-
toe: nil, # true
|
|
419
|
-
triple_tongue: nil, # true
|
|
420
|
-
up_bow: nil, # true
|
|
421
|
-
**_keyrest,
|
|
330
|
+
def initialize(*rest_args,
|
|
331
|
+
pizzicato: nil,
|
|
332
|
+
grace: nil, cue: nil, chord: nil,
|
|
333
|
+
duration: nil, tie_start: nil, tie_stop: nil,
|
|
334
|
+
voice: nil, type: nil, dots: nil,
|
|
335
|
+
accidental: nil, time_modification: nil,
|
|
336
|
+
stem: nil, notehead: nil, staff: nil,
|
|
337
|
+
accidental_mark: nil, arpeggiate: nil,
|
|
338
|
+
tied: nil, tuplet: nil,
|
|
339
|
+
dynamics: nil, fermata: nil, glissando: nil, non_arpeggiate: nil,
|
|
340
|
+
slide: nil, slur: nil,
|
|
341
|
+
accent: nil, breath_mark: nil, caesura: nil,
|
|
342
|
+
detached_legato: nil, doit: nil, falloff: nil,
|
|
343
|
+
other_articulation: nil, plop: nil, scoop: nil,
|
|
344
|
+
spiccato: nil, staccatissimo: nil, staccato: nil,
|
|
345
|
+
stress: nil, strong_accent: nil, tenuto: nil, unstress: nil,
|
|
346
|
+
delayed_inverted_turn: nil, delayed_turn: nil,
|
|
347
|
+
inverted_mordent: nil, inverted_turn: nil,
|
|
348
|
+
mordent: nil, schleifer: nil, shake: nil,
|
|
349
|
+
tremolo: nil, trill_mark: nil, turn: nil,
|
|
350
|
+
vertical_turn: nil, wavy_line: nil,
|
|
351
|
+
other_ornament: nil, ornament_accidental_mark: nil,
|
|
352
|
+
arrow: nil, bend: nil, double_tongue: nil, down_bow: nil,
|
|
353
|
+
fingering: nil, fingernails: nil, fret: nil,
|
|
354
|
+
hammer_on: nil, handbell: nil, harmonic: nil,
|
|
355
|
+
heel: nil, hole: nil, open_string: nil,
|
|
356
|
+
other_technical: nil, pluck: nil, pull_off: nil,
|
|
357
|
+
snap_pizzicato: nil, stopped: nil, string: nil,
|
|
358
|
+
tap: nil, thumb_position: nil, toe: nil,
|
|
359
|
+
triple_tongue: nil, up_bow: nil,
|
|
360
|
+
**keyrest_args,
|
|
422
361
|
&block)
|
|
423
362
|
|
|
424
363
|
@tuplets = []
|
|
@@ -79,13 +79,12 @@ module Musa
|
|
|
79
79
|
class PitchedNote < Note
|
|
80
80
|
# Creates a pitched note.
|
|
81
81
|
#
|
|
82
|
-
# @param
|
|
82
|
+
# @param positional_step [String, nil] step as positional parameter (alternative to keyword)
|
|
83
83
|
# @param step [String, nil] diatonic step: 'C', 'D', 'E', 'F', 'G', 'A', 'B'
|
|
84
84
|
# @param alter [Integer, nil] semitone alteration: -2 (double flat), -1 (flat),
|
|
85
85
|
# 0 (natural), +1 (sharp), +2 (double sharp)
|
|
86
86
|
# @param octave [Integer] octave number (scientific pitch notation, middle C = 4)
|
|
87
|
-
#
|
|
88
|
-
# @param (see Note#initialize) All Note parameters are supported
|
|
87
|
+
# @param (see Note#initialize)
|
|
89
88
|
#
|
|
90
89
|
# @example C natural in octave 4, quarter note
|
|
91
90
|
# PitchedNote.new('C', octave: 4, duration: 4, type: 'quarter')
|
|
@@ -99,99 +98,39 @@ module Musa
|
|
|
99
98
|
# type: 'quarter', accidental: 'flat')
|
|
100
99
|
#
|
|
101
100
|
# For detailed parameter documentation, see {Note#initialize}
|
|
102
|
-
def initialize(
|
|
103
|
-
pizzicato: nil,
|
|
104
|
-
grace: nil,
|
|
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
|
-
## articulations
|
|
134
|
-
accent: nil, # true
|
|
135
|
-
breath_mark: nil, # comma / tick
|
|
136
|
-
caesura: nil, # true
|
|
137
|
-
detached_legato:nil, # true
|
|
138
|
-
doit: nil, # true
|
|
139
|
-
falloff: nil, # true
|
|
140
|
-
other_articulation: nil, # text
|
|
141
|
-
plop: nil, # true
|
|
142
|
-
scoop: nil, # true
|
|
143
|
-
spiccato: nil, # true
|
|
144
|
-
staccatissimo: nil, # true
|
|
145
|
-
staccato: nil, # true
|
|
146
|
-
stress: nil, # true
|
|
147
|
-
strong_accent: nil, # true / up / down
|
|
148
|
-
tenuto: nil, # true
|
|
149
|
-
unstress: nil, # true
|
|
150
|
-
|
|
151
|
-
## ornaments
|
|
152
|
-
delayed_inverted_turn: nil, # true
|
|
153
|
-
delayed_turn: nil, # true
|
|
154
|
-
inverted_mordent: nil, # true
|
|
155
|
-
inverted_turn: nil, # true
|
|
156
|
-
mordent: nil, # true
|
|
157
|
-
schleifer: nil, # true
|
|
158
|
-
shake: nil, # true
|
|
159
|
-
tremolo: nil, # start / stop / single,
|
|
160
|
-
trill_mark: nil, # true
|
|
161
|
-
turn: nil, # true
|
|
162
|
-
vertical_turn: nil, # true
|
|
163
|
-
wavy_line: nil, # true
|
|
164
|
-
other_ornament: nil, # true
|
|
165
|
-
ornament_accidental_mark: nil, # sharp / natural / flat / ...
|
|
166
|
-
|
|
167
|
-
## technical
|
|
168
|
-
arrow: nil, # Arrow class instance
|
|
169
|
-
bend: nil, # Bend class instance
|
|
170
|
-
double_tongue: nil, # true
|
|
171
|
-
down_bow: nil, # true
|
|
172
|
-
fingering: nil, # Fingering class instance
|
|
173
|
-
fingernails: nil, # true
|
|
174
|
-
fret: nil, # number
|
|
175
|
-
hammer_on: nil, # HammerOnPullOff class instance
|
|
176
|
-
handbell: nil, # damp / echo / ...
|
|
177
|
-
harmonic: nil, # Harmonic class instance
|
|
178
|
-
heel: nil, # true
|
|
179
|
-
hole: nil, # Hole class instance
|
|
180
|
-
open_string: nil, # true
|
|
181
|
-
other_technical: nil, # text
|
|
182
|
-
pluck: nil, # text
|
|
183
|
-
pull_off: nil, # HammerOnPullOff class insstance
|
|
184
|
-
snap_pizzicato: nil, # true
|
|
185
|
-
stopped: nil, # true
|
|
186
|
-
string: nil, # number (string number)
|
|
187
|
-
tap: nil, # text
|
|
188
|
-
thumb_position: nil, # true
|
|
189
|
-
toe: nil, # true
|
|
190
|
-
triple_tongue: nil, # true
|
|
191
|
-
up_bow: nil, # true
|
|
101
|
+
def initialize(positional_step = nil, step: nil, alter: nil, octave:,
|
|
102
|
+
pizzicato: nil,
|
|
103
|
+
grace: nil, cue: nil, chord: nil,
|
|
104
|
+
duration: nil, tie_start: nil, tie_stop: nil,
|
|
105
|
+
voice: nil, type: nil, dots: nil,
|
|
106
|
+
accidental: nil, time_modification: nil,
|
|
107
|
+
stem: nil, notehead: nil, staff: nil,
|
|
108
|
+
accidental_mark: nil, arpeggiate: nil,
|
|
109
|
+
tied: nil, tuplet: nil,
|
|
110
|
+
dynamics: nil, fermata: nil, glissando: nil, non_arpeggiate: nil,
|
|
111
|
+
slide: nil, slur: nil,
|
|
112
|
+
accent: nil, breath_mark: nil, caesura: nil,
|
|
113
|
+
detached_legato: nil, doit: nil, falloff: nil,
|
|
114
|
+
other_articulation: nil, plop: nil, scoop: nil,
|
|
115
|
+
spiccato: nil, staccatissimo: nil, staccato: nil,
|
|
116
|
+
stress: nil, strong_accent: nil, tenuto: nil, unstress: nil,
|
|
117
|
+
delayed_inverted_turn: nil, delayed_turn: nil,
|
|
118
|
+
inverted_mordent: nil, inverted_turn: nil,
|
|
119
|
+
mordent: nil, schleifer: nil, shake: nil,
|
|
120
|
+
tremolo: nil, trill_mark: nil, turn: nil,
|
|
121
|
+
vertical_turn: nil, wavy_line: nil,
|
|
122
|
+
other_ornament: nil, ornament_accidental_mark: nil,
|
|
123
|
+
arrow: nil, bend: nil, double_tongue: nil, down_bow: nil,
|
|
124
|
+
fingering: nil, fingernails: nil, fret: nil,
|
|
125
|
+
hammer_on: nil, handbell: nil, harmonic: nil,
|
|
126
|
+
heel: nil, hole: nil, open_string: nil,
|
|
127
|
+
other_technical: nil, pluck: nil, pull_off: nil,
|
|
128
|
+
snap_pizzicato: nil, stopped: nil, string: nil,
|
|
129
|
+
tap: nil, thumb_position: nil, toe: nil,
|
|
130
|
+
triple_tongue: nil, up_bow: nil,
|
|
192
131
|
&block)
|
|
193
132
|
|
|
194
|
-
@step = step ||
|
|
133
|
+
@step = step || positional_step
|
|
195
134
|
@alter = alter
|
|
196
135
|
@octave = octave
|
|
197
136
|
|
|
@@ -69,7 +69,7 @@ module Musa
|
|
|
69
69
|
# Creates a rest.
|
|
70
70
|
#
|
|
71
71
|
# @param measure [Boolean, nil] measure rest (fills entire measure)
|
|
72
|
-
# @param (see Note#initialize)
|
|
72
|
+
# @param (see Note#initialize)
|
|
73
73
|
#
|
|
74
74
|
# @example Quarter rest
|
|
75
75
|
# Rest.new(duration: 2, type: 'quarter')
|
|
@@ -81,96 +81,35 @@ module Musa
|
|
|
81
81
|
# Rest.new(duration: 3, type: 'eighth', dots: 1, voice: 2)
|
|
82
82
|
#
|
|
83
83
|
# For detailed parameter documentation, see {Note#initialize}
|
|
84
|
-
def initialize(pizzicato: nil,
|
|
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
|
-
slur: nil, # start / stop / continue
|
|
114
|
-
|
|
115
|
-
## articulations
|
|
116
|
-
accent: nil, # true
|
|
117
|
-
breath_mark: nil, # comma / tick
|
|
118
|
-
caesura: nil, # true
|
|
119
|
-
detached_legato:nil, # true
|
|
120
|
-
doit: nil, # true
|
|
121
|
-
falloff: nil, # true
|
|
122
|
-
other_articulation: nil, # text
|
|
123
|
-
plop: nil, # true
|
|
124
|
-
scoop: nil, # true
|
|
125
|
-
spiccato: nil, # true
|
|
126
|
-
staccatissimo: nil, # true
|
|
127
|
-
staccato: nil, # true
|
|
128
|
-
stress: nil, # true
|
|
129
|
-
strong_accent: nil, # true / up / down
|
|
130
|
-
tenuto: nil, # true
|
|
131
|
-
unstress: nil, # true
|
|
132
|
-
|
|
133
|
-
## ornaments
|
|
134
|
-
delayed_inverted_turn: nil, # true
|
|
135
|
-
delayed_turn: nil, # true
|
|
136
|
-
inverted_mordent: nil, # true
|
|
137
|
-
inverted_turn: nil, # true
|
|
138
|
-
mordent: nil, # true
|
|
139
|
-
schleifer: nil, # true
|
|
140
|
-
shake: nil, # true
|
|
141
|
-
tremolo: nil, # start / stop / single,
|
|
142
|
-
trill_mark: nil, # true
|
|
143
|
-
turn: nil, # true
|
|
144
|
-
vertical_turn: nil, # true
|
|
145
|
-
wavy_line: nil, # true
|
|
146
|
-
other_ornament: nil, # true
|
|
147
|
-
ornament_accidental_mark: nil, # sharp / natural / flat / ...
|
|
148
|
-
|
|
149
|
-
## technical
|
|
150
|
-
arrow: nil, # Arrow class instance
|
|
151
|
-
bend: nil, # Bend class instance
|
|
152
|
-
double_tongue: nil, # true
|
|
153
|
-
down_bow: nil, # true
|
|
154
|
-
fingering: nil, # Fingering class instance
|
|
155
|
-
fingernails: nil, # true
|
|
156
|
-
fret: nil, # number
|
|
157
|
-
hammer_on: nil, # HammerOnPullOff class instance
|
|
158
|
-
handbell: nil, # damp / echo / ...
|
|
159
|
-
harmonic: nil, # Harmonic class instance
|
|
160
|
-
heel: nil, # true
|
|
161
|
-
hole: nil, # Hole class instance
|
|
162
|
-
open_string: nil, # true
|
|
163
|
-
other_technical: nil, # text
|
|
164
|
-
pluck: nil, # text
|
|
165
|
-
pull_off: nil, # HammerOnPullOff class insstance
|
|
166
|
-
snap_pizzicato: nil, # true
|
|
167
|
-
stopped: nil, # true
|
|
168
|
-
string: nil, # number (string number)
|
|
169
|
-
tap: nil, # text
|
|
170
|
-
thumb_position: nil, # true
|
|
171
|
-
toe: nil, # true
|
|
172
|
-
triple_tongue: nil, # true
|
|
173
|
-
up_bow: nil, # true
|
|
84
|
+
def initialize(pizzicato: nil, measure: nil,
|
|
85
|
+
grace: nil, cue: nil, chord: nil,
|
|
86
|
+
duration: nil, tie_start: nil, tie_stop: nil,
|
|
87
|
+
voice: nil, type: nil, dots: nil,
|
|
88
|
+
accidental: nil, time_modification: nil,
|
|
89
|
+
stem: nil, notehead: nil, staff: nil,
|
|
90
|
+
accidental_mark: nil, arpeggiate: nil,
|
|
91
|
+
tied: nil, tuplet: nil,
|
|
92
|
+
dynamics: nil, fermata: nil, glissando: nil, non_arpeggiate: nil,
|
|
93
|
+
slide: nil, slur: nil,
|
|
94
|
+
accent: nil, breath_mark: nil, caesura: nil,
|
|
95
|
+
detached_legato: nil, doit: nil, falloff: nil,
|
|
96
|
+
other_articulation: nil, plop: nil, scoop: nil,
|
|
97
|
+
spiccato: nil, staccatissimo: nil, staccato: nil,
|
|
98
|
+
stress: nil, strong_accent: nil, tenuto: nil, unstress: nil,
|
|
99
|
+
delayed_inverted_turn: nil, delayed_turn: nil,
|
|
100
|
+
inverted_mordent: nil, inverted_turn: nil,
|
|
101
|
+
mordent: nil, schleifer: nil, shake: nil,
|
|
102
|
+
tremolo: nil, trill_mark: nil, turn: nil,
|
|
103
|
+
vertical_turn: nil, wavy_line: nil,
|
|
104
|
+
other_ornament: nil, ornament_accidental_mark: nil,
|
|
105
|
+
arrow: nil, bend: nil, double_tongue: nil, down_bow: nil,
|
|
106
|
+
fingering: nil, fingernails: nil, fret: nil,
|
|
107
|
+
hammer_on: nil, handbell: nil, harmonic: nil,
|
|
108
|
+
heel: nil, hole: nil, open_string: nil,
|
|
109
|
+
other_technical: nil, pluck: nil, pull_off: nil,
|
|
110
|
+
snap_pizzicato: nil, stopped: nil, string: nil,
|
|
111
|
+
tap: nil, thumb_position: nil, toe: nil,
|
|
112
|
+
triple_tongue: nil, up_bow: nil,
|
|
174
113
|
&block)
|
|
175
114
|
|
|
176
115
|
@measure = measure
|
|
@@ -69,7 +69,7 @@ module Musa
|
|
|
69
69
|
class UnpitchedNote < Note
|
|
70
70
|
# Creates an unpitched note.
|
|
71
71
|
#
|
|
72
|
-
# @param (see Note#initialize)
|
|
72
|
+
# @param (see Note#initialize)
|
|
73
73
|
#
|
|
74
74
|
# @example Percussion quarter note
|
|
75
75
|
# UnpitchedNote.new(duration: 2, type: 'quarter')
|
|
@@ -81,96 +81,36 @@ module Musa
|
|
|
81
81
|
# UnpitchedNote.new(duration: 6, type: 'half', dots: 1, dynamics: 'f')
|
|
82
82
|
#
|
|
83
83
|
# For detailed parameter documentation, see {Note#initialize}
|
|
84
|
-
def initialize(
|
|
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
|
-
## articulations
|
|
115
|
-
accent: nil, # true
|
|
116
|
-
breath_mark: nil, # comma / tick
|
|
117
|
-
caesura: nil, # true
|
|
118
|
-
detached_legato:nil, # true
|
|
119
|
-
doit: nil, # true
|
|
120
|
-
falloff: nil, # true
|
|
121
|
-
other_articulation: nil, # text
|
|
122
|
-
plop: nil, # true
|
|
123
|
-
scoop: nil, # true
|
|
124
|
-
spiccato: nil, # true
|
|
125
|
-
staccatissimo: nil, # true
|
|
126
|
-
staccato: nil, # true
|
|
127
|
-
stress: nil, # true
|
|
128
|
-
strong_accent: nil, # true / up / down
|
|
129
|
-
tenuto: nil, # true
|
|
130
|
-
unstress: nil, # true
|
|
131
|
-
|
|
132
|
-
## ornaments
|
|
133
|
-
delayed_inverted_turn: nil, # true
|
|
134
|
-
delayed_turn: nil, # true
|
|
135
|
-
inverted_mordent: nil, # true
|
|
136
|
-
inverted_turn: nil, # true
|
|
137
|
-
mordent: nil, # true
|
|
138
|
-
schleifer: nil, # true
|
|
139
|
-
shake: nil, # true
|
|
140
|
-
tremolo: nil, # start / stop / single,
|
|
141
|
-
trill_mark: nil, # true
|
|
142
|
-
turn: nil, # true
|
|
143
|
-
vertical_turn: nil, # true
|
|
144
|
-
wavy_line: nil, # true
|
|
145
|
-
other_ornament: nil, # true
|
|
146
|
-
ornament_accidental_mark: nil, # sharp / natural / flat / ...
|
|
147
|
-
|
|
148
|
-
## technical
|
|
149
|
-
arrow: nil, # Arrow class instance
|
|
150
|
-
bend: nil, # Bend class instance
|
|
151
|
-
double_tongue: nil, # true
|
|
152
|
-
down_bow: nil, # true
|
|
153
|
-
fingering: nil, # Fingering class instance
|
|
154
|
-
fingernails: nil, # true
|
|
155
|
-
fret: nil, # number
|
|
156
|
-
hammer_on: nil, # HammerOnPullOff class instance
|
|
157
|
-
handbell: nil, # damp / echo / ...
|
|
158
|
-
harmonic: nil, # Harmonic class instance
|
|
159
|
-
heel: nil, # true
|
|
160
|
-
hole: nil, # Hole class instance
|
|
161
|
-
open_string: nil, # true
|
|
162
|
-
other_technical: nil, # text
|
|
163
|
-
pluck: nil, # text
|
|
164
|
-
pull_off: nil, # HammerOnPullOff class insstance
|
|
165
|
-
snap_pizzicato: nil, # true
|
|
166
|
-
stopped: nil, # true
|
|
167
|
-
string: nil, # number (string number)
|
|
168
|
-
tap: nil, # text
|
|
169
|
-
thumb_position: nil, # true
|
|
170
|
-
toe: nil, # true
|
|
171
|
-
triple_tongue: nil, # true
|
|
172
|
-
up_bow: nil, # true
|
|
173
|
-
&block)
|
|
84
|
+
def initialize(pizzicato: nil,
|
|
85
|
+
grace: nil, cue: nil, chord: nil,
|
|
86
|
+
duration: nil, tie_start: nil, tie_stop: nil,
|
|
87
|
+
voice: nil, type: nil, dots: nil,
|
|
88
|
+
accidental: nil, time_modification: nil,
|
|
89
|
+
stem: nil, notehead: nil, staff: nil,
|
|
90
|
+
accidental_mark: nil, arpeggiate: nil,
|
|
91
|
+
tied: nil, tuplet: nil,
|
|
92
|
+
dynamics: nil, fermata: nil, glissando: nil, non_arpeggiate: nil,
|
|
93
|
+
slide: nil, slur: nil,
|
|
94
|
+
accent: nil, breath_mark: nil, caesura: nil,
|
|
95
|
+
detached_legato: nil, doit: nil, falloff: nil,
|
|
96
|
+
other_articulation: nil, plop: nil, scoop: nil,
|
|
97
|
+
spiccato: nil, staccatissimo: nil, staccato: nil,
|
|
98
|
+
stress: nil, strong_accent: nil, tenuto: nil, unstress: nil,
|
|
99
|
+
delayed_inverted_turn: nil, delayed_turn: nil,
|
|
100
|
+
inverted_mordent: nil, inverted_turn: nil,
|
|
101
|
+
mordent: nil, schleifer: nil, shake: nil,
|
|
102
|
+
tremolo: nil, trill_mark: nil, turn: nil,
|
|
103
|
+
vertical_turn: nil, wavy_line: nil,
|
|
104
|
+
other_ornament: nil, ornament_accidental_mark: nil,
|
|
105
|
+
arrow: nil, bend: nil, double_tongue: nil, down_bow: nil,
|
|
106
|
+
fingering: nil, fingernails: nil, fret: nil,
|
|
107
|
+
hammer_on: nil, handbell: nil, harmonic: nil,
|
|
108
|
+
heel: nil, hole: nil, open_string: nil,
|
|
109
|
+
other_technical: nil, pluck: nil, pull_off: nil,
|
|
110
|
+
snap_pizzicato: nil, stopped: nil, string: nil,
|
|
111
|
+
tap: nil, thumb_position: nil, toe: nil,
|
|
112
|
+
triple_tongue: nil, up_bow: nil,
|
|
113
|
+
&block)
|
|
174
114
|
|
|
175
115
|
super
|
|
176
116
|
end
|
|
@@ -64,7 +64,7 @@ module Musa::Neumas
|
|
|
64
64
|
class NeumaDecoder < Decoder # to get a GDV
|
|
65
65
|
# Creates GDV neuma decoder.
|
|
66
66
|
#
|
|
67
|
-
# @param scale [Scale] scale for interpreting grade values
|
|
67
|
+
# @param scale [Scales::Scale] scale for interpreting grade values
|
|
68
68
|
# @param base_duration [Rational, nil] base duration unit (default: 1/4)
|
|
69
69
|
# @param transcriptor [Transcriptor, nil] optional transcriptor for ornaments
|
|
70
70
|
# @param base [Hash, nil] initial state (auto-created if nil)
|
|
@@ -106,7 +106,7 @@ module Musa::Neumas
|
|
|
106
106
|
|
|
107
107
|
# Scale for interpreting grade values.
|
|
108
108
|
#
|
|
109
|
-
# @return [Scale] scale object
|
|
109
|
+
# @return [Scales::Scale] scale object
|
|
110
110
|
#
|
|
111
111
|
# @api public
|
|
112
112
|
attr_accessor :scale
|