0xfe/vexflow — pull request #218 by Silverwolf90 (2014-05-05 21:20:08+00:00)
Title: Added automatic accidental generation

### Summary
This pull request adds the `Accidental.generateBeams(voices, keySignature)` static method for applying accidentals to voices. Works with double sharps/flats.

To be used like this:

```javascript
Vex.Flow.Accidental.generateAccidentals([voice0, voice1], "Ab");
```

By passing in multiple voices, the accidentals will be remembered between the voices. This facilitates a few different accidental placement styles where accidental "remembering" can happen per voice, per staff or even per grandstaff. Simply include the voices you wish to have accidentals remembered between.

However, I'm thinking about changing the name of the method. `generateAccidentals` sounds like it would return an array of `Accidental` objects (like `generateBeams()`). When in reality, it simply adds them to the StaveNote. So maybe I should rename it to `autoApplyAccicdentals()` or something else ?

### Tests
**Basic**
![image](https://cloud.githubusercontent.com/assets/1631625/2883344/fd95d002-d499-11e3-85dc-818e5aa9c850.png)
**C major scale over Ab key signature**
![image](https://cloud.githubusercontent.com/assets/1631625/2883346/0ae925b0-d49a-11e3-9a42-96256cf676f6.png)
**A major scale with A major key signature**
![image](https://cloud.githubusercontent.com/assets/1631625/2883352/182a080c-d49a-11e3-8599-37b4d9328445.png)
**Multi-voice, with similar accidentals inline.**
![image](https://cloud.githubusercontent.com/assets/1631625/2883357/260309b0-d49a-11e3-96eb-41e0319fb733.png)
**Multi-voice, same as above, but the 1st voice is offset, so the accidentals are rememebered**
![image](https://cloud.githubusercontent.com/assets/1631625/2883360/2d782108-d49a-11e3-9205-d1b6dbf3bc7c.png)