Module: Musa::Neumas::Neuma::Serie

Includes:
Musa::Neumas::Neuma
Defined in:
lib/musa-dsl/neumas/neumas.rb

Overview

Serie neuma structure (monophonic).

Represents sequential musical events (single voice melody). Contains array of neuma objects in :serie key.

The shape it takes (a structure, not a runnable example):

{ kind: :serie, serie: [neuma1, neuma2, neuma3] }.extend(Serie)

Instance Method Summary collapse

Instance Method Details

#|(other) ⇒ Parallel Originally defined in module Musa::Neumas::Neuma

Creates parallel structure with another neuma.

Combines this neuma with another into parallel (polyphonic) structure. If already parallel, adds to existing parallel array.

Examples:

Create parallel from neumas

using Musa::Extension::Neumas  # refinements are per file

# The voices are parallelised as notation. The right operand has to be
# something convertible to neumas -- a String -- so an already parsed
# serie works on the left but not on the right.
harmony = "(0) (+2) (+4)" | "(-7) (-5) (-3)"

harmony[:kind]           # => :parallel
harmony[:parallel].size  # => 2

Chain multiple parallels

using Musa::Extension::Neumas

satb = "(+7) (+9)" | "(+4) (+5)" | "(0) (+2)" | "(-7) (-5)"

# Chaining adds to the existing parallel instead of nesting it.
satb[:parallel].size  # => 4

Parameters:

Returns:

  • (Parallel)

    parallel neuma structure

Raises:

  • (ArgumentError)

    if other cannot be converted