0xfe/vexflow — pull request #231 by Silverwolf90 (2014-05-29 23:24:25+00:00)
Title: Added PedalMarking class

# Features
* You can provide custom text through the `.setCustomText(depress, release)`. Where `depress` and `release` is the custom text for each pedal action.

* Three Different Styles - based off of lilypond
* `TEXT` style defaults to the traditional *Ped* and *asterix* glyphs, unless custom text has been provided. This style only supports **depress** and **release** actions on separate notes. Trying to do both on the same note will simply draw overlapping text.

* `BRACKET` draws bracket based marking and supports **release and depress** on the same note. Which will draw the little tooth.

* `MIXED` draws the depress text (either the default *Ped* glyph, or the custom text), followed by the brackets. This also supports **release and depress** action. But will not render the release text, only a release bracket.

* Helper functions to draw common pedal markings `.createSustain(notes)`, `.createSostenuto(notes)`, `.createUnaCorda(notes)`

# Code Examples

```javascript
// Create a new pedal marking. Each note in the array toggle back and forth
// between a depress/release action
var pedal = new Vex.Flow.PedalMarking([note0, note10]);

// Set the style of the pedal marking
pedal.setStyle(Vex.Flow.PedalMarking.Styles.TEXT);

// Set the custom text for the pedal marking
pedal.setCustomText("una corda", "tre corda");

// Set the line the marking should render on
pedal.setLine(1);

// Draw elements, must draw pedal marking after its notes have a stave
voice.draw(ctx, stave);
pedal.setContext(ctx).draw();
```

# Tests

![image](https://cloud.githubusercontent.com/assets/1631625/3125138/b0d9b1da-e785-11e3-9995-0614b5ae1b55.png)
![image](https://cloud.githubusercontent.com/assets/1631625/3125141/b517f8b0-e785-11e3-8c3a-a4ded65c7dac.png)
![image](https://cloud.githubusercontent.com/assets/1631625/3125143/b91d26e2-e785-11e3-8340-04c5f1597601.png)
![image](https://cloud.githubusercontent.com/assets/1631625/3125145/be84d562-e785-11e3-9a0b-68970d8a535b.png)
![image](https://cloud.githubusercontent.com/assets/1631625/3125146/c2eaee3e-e785-11e3-9a33-24ce21facd99.png)
![image](https://cloud.githubusercontent.com/assets/1631625/3125148/c978e3b4-e785-11e3-88df-006937b40e18.png)
![image](https://cloud.githubusercontent.com/assets/1631625/3125149/cd4c45b2-e785-11e3-803b-fc035c98c6f4.png)