new Beams()
Object representing a collection of Beams
- Source:
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 |
Extends
Methods
-
<static> Beams#append(type, direction) → {music21.beam.Beam}
-
Append a new
music21.beam.Beamobject to this Beams, automatically creating the Beam
object and incrementing the number count.Parameters:
Name Type Argument Description typestring the type (passed to
music21.beam.Beam)directionstring <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 levelstring | Int either a string like "eighth" or a number like 1 (="eighth")
typestring 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 numberInt 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.Beamobjects to a given type/directionParameters:
Name Type Argument Description typestring beam type
directionstring <optional>
beam direction
- Source:
Returns:
- Type
- this
-
<static> Beams#setByNumber(number, type, direction) → {this}
-
Set the
music21.beam.Beamobject specified bynumberto a given type/directionParameters:
Name Type Argument Description numberInt typestring directionstring <optional>
- Source:
Returns:
- Type
- this