Re: [abcusers] [ABCp] Line continuation
Hudson Lacerda wrote: It seems that you coded a line continuation similar to those of bash or C That's what I did. Continuation gets reported (a T_CONTINUE event) and the scanner stays in the same state. [V:1] abcde \ [V:2] ABCDE \ [V:1] cdedc [V:2] CDEDC is equivalent to: [V:1] abcde cdedc [V:2] ABCDE CDEDC but not to: [V:1] abcde [V:2] ABCDE [V:1] etc. That's difficult! Neither the 1.6 nor the 2.0 draft mentioned it! :( Do you mean that continuations should be treated as continuation within a voice? I hope not, it really would be difficult to handle. I hope many others will provide their comments about this issue so to reach a consesus on this topic. I intended to solve the issue treating ABC | def |\ M:1/4 gab |] as if it was: ABC | def | [M:1/4] \ gab |] but your example would prevent me to do so! Another case (rare, though) is when the meter is changed very often. That one works good for me, every single element in your example get recognized properly. R:D To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] [ABCp] Line continuation
On 23 Oct 2004, at 09:36, Remo D. wrote: Hudson Lacerda wrote: It seems that you coded a line continuation similar to those of bash or C That's what I did. Continuation gets reported (a T_CONTINUE event) and the scanner stays in the same state. That's correct. We have had long discussions on this subject previously, and the overall conclusion was that the continuation symbol should simply mean continued on the next line. The alternative, where it would mean continued on the next line of the same type was rejected because it leads to too many ambiguous and un-intuitive constructs. [V:1] abcde \ [V:2] ABCDE \ [V:1] cdedc [V:2] CDEDC is equivalent to: [V:1] abcde cdedc [V:2] ABCDE CDEDC but not to: [V:1] abcde [V:2] ABCDE [V:1] etc. That's difficult! Neither the 1.6 nor the 2.0 draft mentioned it! :( Do you mean that continuations should be treated as continuation within a voice? I hope not, it really would be difficult to handle. No, don't go that way! I hope many others will provide their comments about this issue so to reach a consesus on this topic. I intended to solve the issue treating ABC | def |\ M:1/4 gab |] as if it was: ABC | def | [M:1/4] \ gab |] That's fine. It is important to deal with this construct as it was specifically mentioned in earlier standards (before [inline fields] were introduced it was the only way to specify a key or metre change in mid-line), and there are many tunes on the net which incorporate it. Phil Taylor To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] [ABCp] Line continuation
Remo D. wrote: Hudson Lacerda wrote: It seems that you coded a line continuation similar to those of bash or C That's what I did. Continuation gets reported (a T_CONTINUE event) and the scanner stays in the same state. [V:1] abcde \ [V:2] ABCDE \ [V:1] cdedc [V:2] CDEDC is equivalent to: [V:1] abcde cdedc [V:2] ABCDE CDEDC but not to: [V:1] abcde [V:2] ABCDE [V:1] etc. That's difficult! Neither the 1.6 nor the 2.0 draft mentioned it! :( Do you mean that continuations should be treated as continuation within a voice? I hope not, it really would be difficult to handle. I hope many others will provide their comments about this issue so to reach a consesus on this topic. After send my message, I had a look at the standards and really there are no thing like that my sample! :(( Currently, I know it works as I described, with abcm2ps. I do not want cause any controversies or difficulties concerning the language or it implementations -- especially because ABC already has too many different `flavors' mutually incompatibles. I mentioned that case because I find very useful to control the formatation of the score after write the notes using `\' and `!'. I'd like someone could suggest another way to control the measures to be printed in a same line without need to translate excerpts of code. (That could be simple with 1voice, but is not good for polyphonic music.) Maybe another special character could be used for that purpose (continuation of music system in printed scores). (Suggestion for the new standard?) Best regards. Hudson To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] [ABCp] Line continuation
Hello. Remo D. wrote: [...] There is one thing that I'm not sure about. Should I support the 1.6 syntax for continution? Supporting both is not an easy task and I would prefer not doing it. [...] Does anybody thinks that supporting al this variations on continuation is absolutely crucial? I would prefer to write a special parser to convert the file from an unsupported syntax to a supported one rather then include both into ABCp, but I dont' wont to create some major incompatibility! It seems that you coded a line continuation similar to those of bash or C, that is, the continuation is only related to the source code, to fit it on the screen etc.: asdf \ asdf is equivalent to: asdf asdf In ABC, the `\' is often (mainly?) used refering to the *printed* score, i.e. the layout (where avoid a system break on the page), to make more readable associated lines, like w:ords or d:ecos or several bar-aligned V:oices (coral music). Remembering M-Tx and PMX manuals, music notation is not linear (like text): parallel streams are read simultaneously. That is important for poliphonic music notation. So: [V:1] abcde \ [V:2] ABCDE \ [V:1] cdedc [V:2] CDEDC is equivalent to: [V:1] abcde cdedc [V:2] ABCDE CDEDC but not to: [V:1] abcde [V:2] ABCDE [V:1] etc. *** I think these line continuations are useful: a) V:1 c d g e/d/ c | A c d e2 |\ % I'm not sure about comments... V:2 c G d cA | z A G c2 | V:3 C,G, | C,4 z| V:1 [etc.] b) CDCG | EDCA, |\ w: d r d s | m r d l, DCGE | DA,CD | C4 |] w: r d s m | r l, d r | d Line continuations (\) and line breaks (!) are very useful to control the number of bars per system, specially where lyrics are used. I write lyrics verse after verse (upbeats, repeat/measure bars, etc. adjusted with \ and !), so the layout should be chosen after coding. Another case (rare, though) is when the meter is changed very often. I have a piece with meter changes in nearly each bar, so I used the format below (*only 1 measure per line!*). But I think that can work in your parser, because there is just 1 voice and the meter is changed inside brackets. % c.1-3 [M:10/8]{=c}!f!!(!(_e3=d!)!=e2!(!_B2!)!=d2)|\ [M:4/8]!mf!(6:4(^f_e !(!=d=e-) e!)!z|\ [M:6/8]!f!(=f2=B !(!_e=d!)!^c)| % c.4-6 [M:8/8]!mf!(,(3=e=c^F (3=A^G)(^A (3=B=F=A- (3!(!-A_A=G)!)!|\ [M:2/8](3::2{=F}!p!^c2z|\ [M:10/8]!f!!(!(=g3^f!)!^g2!(!=f=e^f2)!)!| Regards. Hudson To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html