sugarlabs / musicblocks

Music Blocks -- A musical microworld
https://musicblocks.sugarlabs.org/
GNU Affero General Public License v3.0
579 stars 794 forks source link

BUG: Chord for Lilypond #45

Closed pikurasa closed 9 years ago

pikurasa commented 9 years ago

Slight tweak to be able to make multiple notes together.

Think of chords as almost equivalent to single notes: almost everything you can attach to a single note can be attached to a chord, and _everything must go outside the angle brackets_. For example, you can combine markings like beams and ties with chords. They must be placed outside the angle brackets. http://lilypond.org/doc/v2.18/Documentation/learning/combining-notes-into-chords

Currently, we get this output: {< g'4 e'4 >c'4 d'4 } screenshot - 10152015 - 12-22-32 pm multiple notes in one voice parsing is a little off

But, we should be putting in this: {< g' e' >4 c'4 d'4 } screenshot - 10152015 - 12-26-52 pm the syntax needs to be adjusted to put stuff outside angle brackets

pikurasa commented 9 years ago

For completion's sake, this is what I started with:

screenshot - 10152015 - 12-31-04 pm test multiple notes at a time

[start .tb] [[0,["action",{"collapsed":false}],188,59,[null,1,19,null]],[1,["text",{"value":"chunk"}],282.5,68,[0]],[2,["note",{}],201.5,131,[19,3,4,7]],[3,["number",{"value":4}],273.5,131,[2]],[4,["pitch",{}],215,162.5,[2,5,6,9]],[5,["solfege",{"value":"sol"}],288.5,162.5,[4]],[6,["number",{"value":4}],288.5,194,[4]],[7,["note",{}],201.5,320,[2,8,21,12]],[8,["number",{"value":4}],273.5,320,[7]],[9,["pitch",{}],215,225.5,[4,10,11,null]],[10,["solfege",{"value":"mi"}],288.5,225.5,[9]],[11,["number",{"value":4}],288.5,257,[9]],[12,["note",{}],201.5,446,[7,13,14,17]],[13,["number",{"value":4}],273.5,446,[12]],[14,["pitch",{}],215,477.5,[12,15,16,null]],[15,["solfege",{"value":"re"}],288.5,477.5,[14]],[16,["number",{"value":4}],288.5,509,[14]],[17,["savelilypond",{}],201.5,572,[12,18,null]],[18,["text",{"value":"test.ly"}],335,572,[17]],[19,["setbpm",{}],201.5,99.5,[0,20,2]],[20,["number",{"value":60}],359,99.5,[19]],[21,["pitch",{}],215,351.5,[7,22,23,null]],[22,["solfege",{"value":"do"}],288.5,351.5,[21]],[23,["number",{"value":4}],288.5,383,[21]]] [end .tb]

walterbender commented 9 years ago

I was lazy and specified the beat value for each note but I see that for chords that will not work. I'll have to work on that.

walterbender commented 9 years ago

Should be all set...

lilychord

{ < a' e' a'' > 4. a'2
}

pikurasa commented 9 years ago

Trying it all out now, but that pic looks great! (which is one reason why lilypond is awesome!)

walterbender commented 9 years ago

reopen if the issue reappears