Skip to content

Distinction of start and stop in HammerOn/PullOff #940

@louisbigo

Description

@louisbigo

music21 version

7.0.1

In guitar tabs, a hammer-on concerns two notes : the origin note and the destination note. This distinction is done in MusicXML with the attribute type :

<technical>
  <hammer-on number="1" type="start">H</hammer-on>
  <string>3</string>
  <fret>5</fret>
</technical>

...

<technical>
  <hammer-on number="1" type="stop"/>
  <string>3</string>
  <fret>7</fret>
</technical>

The m21 class HammerOn (in articulations.py) does not make this distinctions. I see two possibilities to add this distinction in m21: creating subclasses HammerOnStart and HammerOnStop that inherit from HammerOn (maybe the clean way) or adding an attribute type to HammerOn (to fit with the MusicXML type attribute):

The same apply for PullOff articulations.

Ultimately, there should be a way to identify that two hammer-on (one start and one stop) are linked together (maybe with note IDs ?) but that probably goes beyond this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions