Class: Musa::MusicXML::Builder::Internal::UnpitchedNote Private

Inherits:
Note
  • Object
show all
Defined in:
lib/musa-dsl/musicxml/builder/unpitched-note.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Unpitched note for percussion and rhythm-only notation.

UnpitchedNote represents notes without specific pitch, primarily used for percussion instruments in drum notation. It extends Note with simplified pitch handling—no step, alter, or octave needed.

Use Cases

Percussion Notation

Drum kits, percussion ensembles, and rhythm sections use unpitched notes where vertical position on the staff indicates the instrument (not pitch):

  • Snare drum
  • Bass drum
  • Hi-hat
  • Cymbals
  • Toms
  • Auxiliary percussion

Rhythm-Only Notation

Teaching materials and rhythm exercises where pitch is irrelevant.

Tablature

Some tablature systems use unpitched notes with fret/string indications.

Staff Position

Unlike pitched notes, staff line position doesn't represent pitch but rather identifies the percussion instrument. This mapping is defined by the clef (typically percussion clef) and is instrument-specific.

Combining with Technical Markings

Unpitched notes support all standard notations (dynamics, articulations, etc.) but often use percussion-specific technicals like sticking patterns.

Usage

Created via Measure#add_unpitched or Measure#unpitched:

measure.unpitched duration: 2, type: 'quarter'
measure.add_unpitched duration: 1, type: 'eighth', accent: true

Examples:

Basic unpitched quarter note

UnpitchedNote.new(duration: 2, type: 'quarter')

Snare drum hit with accent

UnpitchedNote.new(duration: 2, type: 'quarter', accent: true)

Hi-hat with staccato

UnpitchedNote.new(duration: 1, type: 'eighth', staccato: true)

Bass drum with forte dynamic

UnpitchedNote.new(duration: 4, type: 'half', dynamics: 'f')

Cymbal crash with fermata

UnpitchedNote.new(duration: 8, type: 'whole', fermata: true)

See Also:

Instance Method Summary collapse

Constructor Details

#initialize(pizzicato: nil, grace: nil, cue: nil, chord: nil, duration: nil, tie_start: nil, tie_stop: nil, voice: nil, type: nil, dots: nil, accidental: nil, time_modification: nil, stem: nil, notehead: nil, staff: nil, accidental_mark: nil, arpeggiate: nil, tied: nil, tuplet: nil, dynamics: nil, fermata: nil, glissando: nil, non_arpeggiate: nil, slide: nil, slur: nil, accent: nil, breath_mark: nil, caesura: nil, detached_legato: nil, doit: nil, falloff: nil, other_articulation: nil, plop: nil, scoop: nil, spiccato: nil, staccatissimo: nil, staccato: nil, stress: nil, strong_accent: nil, tenuto: nil, unstress: nil, delayed_inverted_turn: nil, delayed_turn: nil, inverted_mordent: nil, inverted_turn: nil, mordent: nil, schleifer: nil, shake: nil, tremolo: nil, trill_mark: nil, turn: nil, vertical_turn: nil, wavy_line: nil, other_ornament: nil, ornament_accidental_mark: nil, arrow: nil, bend: nil, double_tongue: nil, down_bow: nil, fingering: nil, fingernails: nil, fret: nil, hammer_on: nil, handbell: nil, harmonic: nil, heel: nil, hole: nil, open_string: nil, other_technical: nil, pluck: nil, pull_off: nil, snap_pizzicato: nil, stopped: nil, string: nil, tap: nil, thumb_position: nil, toe: nil, triple_tongue: nil, up_bow: nil, &block) ⇒ UnpitchedNote

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates an unpitched note.

For detailed parameter documentation, see Note#initialize

Examples:

Percussion quarter note

UnpitchedNote.new(duration: 2, type: 'quarter')

Eighth note with accent

UnpitchedNote.new(duration: 1, type: 'eighth', accent: true)

Dotted half with forte

UnpitchedNote.new(duration: 6, type: 'half', dots: 1, dynamics: 'f')

Parameters:

  • grace (Boolean, nil) (defaults to: nil)

    grace note (ornamental, no time value)

  • cue (Boolean, nil) (defaults to: nil)

    cue note (smaller, reference indication)

  • chord (Boolean, nil) (defaults to: nil)

    note is part of a chord (sounds with previous note)

  • duration (Integer, nil) (defaults to: nil)

    duration in division units

  • type (String, nil) (defaults to: nil)

    note type: 'whole', 'half', 'quarter', 'eighth', '16th', etc.

  • dots (Integer, nil) (defaults to: nil)

    number of augmentation dots (1 or 2)

  • voice (Integer, nil) (defaults to: nil)

    voice number for polyphonic music

  • staff (Integer, nil) (defaults to: nil)

    staff number for multi-staff instruments

  • tie_start (Boolean, nil) (defaults to: nil)

    start a tie to next note

  • tie_stop (Boolean, nil) (defaults to: nil)

    stop a tie from previous note

  • accidental (String, nil) (defaults to: nil)

    visual accidental: 'sharp', 'flat', 'natural', etc.

  • stem (String, nil) (defaults to: nil)

    stem direction: 'up', 'down', 'double', 'none'

  • pizzicato (Boolean, nil) (defaults to: nil)

    pizzicato attribute on note element

  • time_modification (TimeModification, Hash, nil) (defaults to: nil)

    tuplet ratio (e.g., 3:2 for triplets)

  • notehead (Notehead, Hash, nil) (defaults to: nil)

    notehead style and properties

  • tied (String, nil) (defaults to: nil)

    tied notation: 'start', 'stop', 'continue'

  • tuplet (Tuplet, Hash, nil) (defaults to: nil)

    tuplet bracket/number notation

  • slur (String, Hash, nil) (defaults to: nil)

    slur: 'start', 'stop', 'continue' or hash with attributes

  • dynamics (String, Array<String>, nil) (defaults to: nil)

    dynamics: 'pp', 'p', 'mp', 'mf', 'f', 'ff', etc.

  • fermata (Boolean, String, nil) (defaults to: nil)

    fermata: true, 'upright', 'inverted'

  • accidental_mark (String, nil) (defaults to: nil)

    accidental in notations: 'sharp', 'flat', 'natural'

  • arpeggiate (Boolean, String, nil) (defaults to: nil)

    arpeggio: true, 'up', 'down'

  • non_arpeggiate (String, nil) (defaults to: nil)

    non-arpeggio: 'top', 'bottom'

  • glissando (String, nil) (defaults to: nil)

    glissando: 'start', 'stop'

  • slide (String, nil) (defaults to: nil)

    slide: 'start', 'stop'

  • accent (Boolean, nil) (defaults to: nil)

    accent mark (>)

  • staccato (Boolean, nil) (defaults to: nil)

    staccato (•)

  • tenuto (Boolean, nil) (defaults to: nil)

    tenuto (−)

  • staccatissimo (Boolean, nil) (defaults to: nil)

    staccatissimo (▼)

  • spiccato (Boolean, nil) (defaults to: nil)

    spiccato

  • strong_accent (Boolean, String, nil) (defaults to: nil)

    strong accent (^): true, 'up', 'down'

  • detached_legato (Boolean, nil) (defaults to: nil)

    detached legato (portato)

  • breath_mark (Boolean, String, nil) (defaults to: nil)

    breath mark: true, 'comma', 'tick'

  • caesura (Boolean, nil) (defaults to: nil)

    caesura (railroad tracks)

  • doit (Boolean, nil) (defaults to: nil)

    doit

  • falloff (Boolean, nil) (defaults to: nil)

    falloff

  • plop (Boolean, nil) (defaults to: nil)

    plop

  • scoop (Boolean, nil) (defaults to: nil)

    scoop

  • stress (Boolean, nil) (defaults to: nil)

    stress

  • unstress (Boolean, nil) (defaults to: nil)

    unstress

  • other_articulation (String, nil) (defaults to: nil)

    custom articulation text

  • trill_mark (Boolean, nil) (defaults to: nil)

    trill

  • mordent (Boolean, nil) (defaults to: nil)

    mordent (lower neighbor)

  • inverted_mordent (Boolean, nil) (defaults to: nil)

    inverted mordent (upper neighbor)

  • turn (Boolean, nil) (defaults to: nil)

    turn

  • inverted_turn (Boolean, nil) (defaults to: nil)

    inverted turn

  • delayed_turn (Boolean, nil) (defaults to: nil)

    delayed turn

  • delayed_inverted_turn (Boolean, nil) (defaults to: nil)

    delayed inverted turn

  • shake (Boolean, nil) (defaults to: nil)

    shake

  • tremolo (String, nil) (defaults to: nil)

    tremolo: 'single', 'start', 'stop'

  • schleifer (Boolean, nil) (defaults to: nil)

    schleifer

  • wavy_line (Boolean, nil) (defaults to: nil)

    wavy line (trill extension)

  • vertical_turn (Boolean, nil) (defaults to: nil)

    vertical turn

  • other_ornament (Boolean, nil) (defaults to: nil)

    custom ornament

  • ornament_accidental_mark (String, nil) (defaults to: nil)

    ornament accidental: 'sharp', 'flat', 'natural'

  • fingering (Fingering, Hash, nil) (defaults to: nil)

    fingering indication

  • up_bow (Boolean, nil) (defaults to: nil)

    up bow (↑)

  • down_bow (Boolean, nil) (defaults to: nil)

    down bow (↓)

  • harmonic (Harmonic, Hash, nil) (defaults to: nil)

    harmonic

  • open_string (Boolean, nil) (defaults to: nil)

    open string (○)

  • stopped (Boolean, nil) (defaults to: nil)

    stopped note (+)

  • snap_pizzicato (Boolean, nil) (defaults to: nil)

    Bartók pizzicato

  • thumb_position (Boolean, nil) (defaults to: nil)

    cello thumb position

  • string (Integer, nil) (defaults to: nil)

    string number

  • hammer_on (String, nil) (defaults to: nil)

    hammer-on: 'start', 'stop'

  • pull_off (String, nil) (defaults to: nil)

    pull-off: 'start', 'stop'

  • double_tongue (Boolean, nil) (defaults to: nil)

    double tonguing

  • triple_tongue (Boolean, nil) (defaults to: nil)

    triple tonguing

  • fingernails (Boolean, nil) (defaults to: nil)

    use fingernails

  • hole (Hole, Hash, nil) (defaults to: nil)

    woodwind fingering hole

  • fret (Integer, nil) (defaults to: nil)

    fret number

  • bend (Bend, Hash, nil) (defaults to: nil)

    string bend

  • tap (String, nil) (defaults to: nil)

    tapping

  • pluck (String, nil) (defaults to: nil)

    plucking technique

  • arrow (Arrow, Hash, nil) (defaults to: nil)

    arrow indication

  • handbell (String, nil) (defaults to: nil)

    handbell technique: 'damp', 'echo', 'gyro', etc.

  • heel (Boolean, nil) (defaults to: nil)

    heel (organ pedal)

  • toe (Boolean, nil) (defaults to: nil)

    toe (organ pedal)

  • other_technical (String, nil) (defaults to: nil)

    custom technical text



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
# File 'lib/musa-dsl/musicxml/builder/unpitched-note.rb', line 84

def initialize(pizzicato: nil,
               grace: nil, cue: nil, chord: nil,
               duration: nil, tie_start: nil, tie_stop: nil,
               voice: nil, type: nil, dots: nil,
               accidental: nil, time_modification: nil,
               stem: nil, notehead: nil, staff: nil,
               accidental_mark: nil, arpeggiate: nil,
               tied: nil, tuplet: nil,
               dynamics: nil, fermata: nil, glissando: nil, non_arpeggiate: nil,
               slide: nil, slur: nil,
               accent: nil, breath_mark: nil, caesura: nil,
               detached_legato: nil, doit: nil, falloff: nil,
               other_articulation: nil, plop: nil, scoop: nil,
               spiccato: nil, staccatissimo: nil, staccato: nil,
               stress: nil, strong_accent: nil, tenuto: nil, unstress: nil,
               delayed_inverted_turn: nil, delayed_turn: nil,
               inverted_mordent: nil, inverted_turn: nil,
               mordent: nil, schleifer: nil, shake: nil,
               tremolo: nil, trill_mark: nil, turn: nil,
               vertical_turn: nil, wavy_line: nil,
               other_ornament: nil, ornament_accidental_mark: nil,
               arrow: nil, bend: nil, double_tongue: nil, down_bow: nil,
               fingering: nil, fingernails: nil, fret: nil,
               hammer_on: nil, handbell: nil, harmonic: nil,
               heel: nil, hole: nil, open_string: nil,
               other_technical: nil, pluck: nil, pull_off: nil,
               snap_pizzicato: nil, stopped: nil, string: nil,
               tap: nil, thumb_position: nil, toe: nil,
               triple_tongue: nil, up_bow: nil,
               &block)

  super
end