Module: Musa::Neumas::Neuma
Overview
Base neuma module for serie and parallel structures.
Mixed into neuma hashes to provide structure-specific methods.
Neumas are extended with either Neuma::Serie or Neuma::Parallel.
Defined Under Namespace
Instance Method Summary collapse
-
#|(other) ⇒ Parallel
Creates parallel structure with another neuma.
Instance Method Details
#|(other) ⇒ Parallel
Creates parallel structure with another neuma.
Combines this neuma with another into parallel (polyphonic) structure. If already parallel, adds to existing parallel array.
74 75 76 77 78 79 80 81 82 |
# File 'lib/musa-dsl/neumas/neumas.rb', line 74 def |(other) if is_a?(Parallel) clone.tap { |_| _[:parallel] << convert_to_parallel_element(other) }.extend(Parallel) else { kind: :parallel, parallel: [clone, convert_to_parallel_element(other)] }.extend(Parallel) end end |