Class: Beams

music21.beam. Beams

new Beams()

Object representing a collection of Beams

Properties:
Name Type Argument Default Description
beamsList Array.<music21.beam.Beam>

a list of Beam objects

feathered Boolean <optional>
false

is this a feathered beam.

length Int

length of beamsList

Source:

Extends

Methods

<static> Beams#append(type, direction) → {music21.beam.Beam}

Append a new music21.beam.Beam object to this Beams, automatically creating the Beam
object and incrementing the number count.

Parameters:
Name Type Argument Description
type string

the type (passed to music21.beam.Beam)

direction string <optional>

the direction if type is "partial"

Source:
Returns:

newly appended object

Type
music21.beam.Beam

<static> Beams#fill(level, type) → {this}

A quick way of setting the beams list for a particular duration, for
instance, fill("16th") will clear the current list of beams in the
Beams object and add two beams. fill(2) will do the same (though note
that that is an int, not a string).
It does not do anything to the direction that the beams are going in,
or by default. Either set type here or call setAll() on the Beams
object afterwards.
Both "eighth" and "8th" work. Adding more than six beams (i.e. things
like 512th notes) raises an error.

Parameters:
Name Type Description
level string | Int

either a string like "eighth" or a number like 1 (="eighth")

type string

type to fill all beams to.

Source:
Returns:
Type
this

<static> Beams#getByNumber(number) → {music21.beam.Beam|undefined}

Get the beam with the given number or throw an exception.

Parameters:
Name Type Description
number Int

the beam number to retrieve (usually one less than the position in .beamsList)

Source:
Returns:
Type
music21.beam.Beam | undefined

<static> Beams#getNumbers() → {Array.<Int>}

Get an Array of all the numbers for the beams

Source:
Returns:

all the numbers

Type
Array.<Int>

<static> Beams#getTypes() → {Array.<string>}

Get an Array of all the types for the beams

Source:
Returns:

all the types

Type
Array.<string>

<static> Beams#setAll(type, direction) → {this}

Set all the music21.beam.Beam objects to a given type/direction

Parameters:
Name Type Argument Description
type string

beam type

direction string <optional>

beam direction

Source:
Returns:
Type
this

<static> Beams#setByNumber(number, type, direction) → {this}

Set the music21.beam.Beam object specified by number to a given type/direction

Parameters:
Name Type Argument Description
number Int
type string
direction string <optional>
Source:
Returns:
Type
this
Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.