Class: Stretto::Layer

Inherits:
Array show all
Defined in:
lib/stretto/music_elements/layer.rb

Overview

Wrapper for a layer: set of elements inside a voice

Layers are not part of the MIDI specification, but are a resource to separate multiple notes that should be played together in a voice.

This is most useful in the voice 9 (see Voice), which is the percussion layer. Different parts of the percussion track can be separated in different layers, and they all play together in the same track.

Instance Method Summary collapse

Methods inherited from Array

#sum

Instance Method Details

#elementsArray(MusicElement)

Returns Its elements as an array.

Returns:

  • (Array(MusicElement))

    Its elements as an array



16
17
18
# File 'lib/stretto/music_elements/layer.rb', line 16

def elements
  to_a
end