Re: [abcusers] What software will translate this correctly?
On Fri, 11 Jun 2004 01:40:31 +0100, Jon Freeman [EMAIL PROTECTED] wrote: From: Stephen Kellett [EMAIL PROTECTED] Write a monitor process that monitors your abcm2ps processes. Any process that has been at a high CPU for more than X time, kill it. Or modify abcm2ps to include a monitor thread to do the same task (better as it'll know how long each tune processing has taken). I must admit I had not read you post properly last time round. Are you suggesting that it could be possible to have a version of abcm2ps that could watch itself and terminate itself if it did get out of control? I wouldn't have the first clue where to start but if that sort of idea is feasible, I am intrested. Jon If your server runs under Unix, you may simply set the max cpu time with the shell command 'ulimit -t seconds'. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** | http://moinejf.free.fr/ Pépé Jef| mailto:[EMAIL PROTECTED] To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
From: Phil Taylor [EMAIL PROTECTED] A better solution would be to find a tune which causes this behaviour and send it to Jeff so he can fix the bug ( but of course that presupposes that you notice it happening when you're using it yourself). It only happened the once and I'm not even convinced that one of us who can add abc to the song database was responsible for it. I also suspect that it was faulty abc that caused this to happen and these days all abc gets tested locally, perferably with abcm2ps but sometimes using other programs before getting added to the on line system. I suppose the same could happen again even with our precautions but it was having an open to all system and not being able to do anything should a problem occur that concerned me the most. Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
In message [EMAIL PROTECTED], Jon Freeman [EMAIL PROTECTED] writes I must admit I had not read you post properly last time round. Are you suggesting that it could be possible to have a version of abcm2ps that could watch itself and terminate itself if it did get out of control? I wouldn't have the first clue where to start but if that sort of idea is feasible, I am intrested. Yes, entirely possible. How you'd do it would depend on the operating system. If it was Windows I could do it for you trivially. If it was Unix I'd have to dust off some books and do some research. Then Phil Taylor writes: It might be simpler to just kill the program after a short period of time every time it's used. In this application where only single tunes are being processed the program should have finished and quit in less than a second, so if you can add something to the script to kill it after five seconds that should do the job. Yes, if that is the invocation pattern, that approach is fine. I wasn't sure if abcm2ps used in this context stayed around waiting for another request. I think 5 seconds may be a bit on the low side. If the shared server just happened to get a lot of work at the same time the user of abcm2ps may get they valid job dumped too soon. Stephen -- Stephen Kellett Object Media Limitedhttp://www.objmedia.demon.co.uk RSI Information:http://www.objmedia.demon.co.uk/rsi.html To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
Stephen Kellett writes: | In message [EMAIL PROTECTED], Jon Freeman | [EMAIL PROTECTED] writes | I had one for a while but took it down after some abc from somewhere caused | abcm2ps to loop and I had my ISP phoning me up asking what abcm2ps was and | telling me that it had been using something like 90% of the processing power | for a good hour or more. I'm not prepared to take the chance on the shared | server again. | | Write a monitor process that monitors your abcm2ps processes. Any | process that has been at a high CPU for more than X time, kill it. Or | modify abcm2ps to include a monitor thread to do the same task (better | as it'll know how long each tune processing has taken). A monitoring process or thread is radical overkill for this task. We're talking about a C program. The standard C library handles the job almost trivially (as the term is understood by C programmers ;-). Here's a demo program that should run anywhere you have a minimally POSIX-compliant C library: /* * Demo of using the signal/alarm routines to interrupt a program that * runs for too long. */ #include stdio.h #include signal.h int timeout = 5;/* Kill the program after this many seconds */ sig_t alrm() { /* Alarm handler */ printf(Alarm!\n); exit(0);/* Exit normally */ } main(ac,av) char **av; { int n = 0; signal(SIGALRM,(sig_t)alrm);/* Declare our alarm handler */ alarm(timeout); /* Set alarm timer */ while (++n) { printf(%d ...\n,n); sleep(1); } printf(Can't get here.\n); exit(1);/* Paranoia */ } Supposedly even Windows has a POSIX-compliant C library, though I'd guess you'll find that this needs a bit of tweaking there. Anyway, this takes no extra process or thread. You should be able to copy the alrm() routine and the signal() and alarm() calls to any other C program to kill the program after some interval. To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
From: John Chambers [EMAIL PROTECTED] Stephen Kellett writes: | In message [EMAIL PROTECTED], Jon Freeman | [EMAIL PROTECTED] writes | I had one for a while but took it down after some abc from somewhere caused | abcm2ps to loop and I had my ISP phoning me up asking what abcm2ps was and | telling me that it had been using something like 90% of the processing power | for a good hour or more. I'm not prepared to take the chance on the shared | server again. | | Write a monitor process that monitors your abcm2ps processes. Any | process that has been at a high CPU for more than X time, kill it. Or | modify abcm2ps to include a monitor thread to do the same task (better | as it'll know how long each tune processing has taken). A monitoring process or thread is radical overkill for this task. We're talking about a C program. The standard C library handles the job almost trivially (as the term is understood by C programmers ;-). Here's a demo program that should run anywhere you have a minimally POSIX-compliant C library: example snipped Thanks. I won't try to understand it but I think I should be able to copy that code and compile abcm2ps with it included. As far as I can make out, this will be the ideal solution for me. I'll have a play with it over the weekend. Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
From: Stephen Kellett [EMAIL PROTECTED] In message [EMAIL PROTECTED], Jon Freeman I presume that this approach would have a new thread within abcm2ps? And Yes. Main thread executing, 2nd thread monitoring. If 2nd thread notices 1st thread has been running for too long it can either kill the program or just kill the first thread. I'll write you some code if you are interested. I'm busy this weekend, but after Monday I can do it for you. Shouldn't take me long. Thanks, I'll try to see if I can try John Chambers' suggestion first but may will be back Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
In message [EMAIL PROTECTED], Stephen Kellett [EMAIL PROTECTED] writes In message [EMAIL PROTECTED], John Chambers [EMAIL PROTECTED] writes It usually means a trill, the TR ligature above the note. But there's a scheme to (re)define ornaments now. I wonder how widely it has been implemented? I've implemented it. However the software I have written is still not publicly available as there are many other things needing implementation, such as multi-voice support. Stephen Ditto for me! Music Publisher 5 can support abc import and export and I too have not done multi-voice. -- Bernard Hill Braeburn Software Author of Music Publisher system Music Software written by musicians for musicians http://www.braeburn.co.uk Selkirk, Scotland To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
On 10 Jun 2004, at 07:04, Steve Wyrick wrote: Thanks John, I like the way that looks on abc2ps; unfortunately BarFly doesn't like the voice headers in that position and returns a score that's blank except for title composer! As you mentioned, abc2ps doesn't need the middle=d term. BarFly doesn't really need it either but I specified it for 2 reasons: to (hopefully) let me write code that was readable by both programs, and to save me typing so many commas in the bass line (e.g., without that term, C is written as C,,)! Steve, I think you should suggest to your friends that they get abcm2ps; it's much more up to date, is still being developed and there are versions for all three major platforms. You might want to look at it yourself too, as you can invoke it directly from BarFly to get a nice GUI. There are instructions for this in the Import/Export doc which comes with BarFly. Phil Taylor To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
I have implemented the transpose clause on the sound, but I wasn't sure about the score. You have confirmed that transpose should not be reflected there. My progam does not yet implement the 'middle' clause, and automatically positions the notes on the score according to pitch. There are also differences between the various display modes available. I didn't know of this transpose clause but I have found it handy to both be able to just change the sound and to change the whole thing. I quite like the the way Cakewalk goes about it. In the edit menu, there is a transpose function that can be used to re-calculate the note values to put the tune in a different key. For each track, there is a key+/- option allowing you to write for transposing instruments which incidently includes my tenor banjo - that is one of the instruments that plays an octave (key -12) lower than written. Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
Steve Wyrick wrote: | John Chambers wrote: | I tried it with the original abc2ps, Jef Moine's abcm2ps, and my | jcabc2ps. They all handled it. The original abc2ps had two minor | problems: It doesn't accept V: lines in the header section, so I | moved them to after the K: line. And it can't handle the spaces in | the name = term, so I removed them. ... | | This worked without problems in all three abc2ps clones. There were | some warnings about the unrecognized transpose term, but that's to | be expected from a program that doesn't produce pitches, and it | didn't effect the output at all. All three programs produced pages | that look identical. | | Actually, the original abc2ps doesn't implement the middle= term, and | it gave a warning about that. But it assumes middle=d for bass clef, | so it worked. Jef and I have both implemented it. Tunes that expect a | different mapping than middle=d for bass come out strange with the | original abc2ps. Lots and lots of leger lines ... | | Thanks John, I like the way that looks on abc2ps; unfortunately BarFly | doesn't like the voice headers in that position and returns a score that's | blank except for title composer! Yeah; there is disagreement among programs as to where the V: voice declaration lines belong. The only way to successfully handle the abc that's out there is to just say that a declaration has to come before the first use of a voice in the music. Also, I came across another bug in the original abc2ps: If a voice isn't declared at all before its first use, strange things go wrong. I handled this by adding a test for a voice being defined, and if not, generated a default declaration. It only took a few lines of code. | As you mentioned, abc2ps doesn't need the middle=d term. BarFly doesn't | really need it either but I specified it for 2 reasons: to (hopefully) let | me write code that was readable by both programs, and to save me typing so | many commas in the bass line (e.g., without that term, C is written as C,,)! I'd say that abc2ps doesn't accept the middle= term. This is a bit of a defect, because without it, there's no way to correct for abc that uses a different mapping. I added it as a way to handle some of the abc that I was seeing. Some time back, we had a bit of a discussion about the proper mapping of abc notes to staff lines for non-treble clefs. There were at least two factions. Those who type abc thought it was obvious that you always want abc notes to map onto the staff, since this minimizes the awkward typing of all those silly commas in bass lines. But there are a lot of users who never type abc directly and always use a GUI tool, and they don't much care. Among them are people working on abc players, and to them it's obvious that abc notes should have a fixed pitch. This simplifies writing software that deals with sound. The discussion showed that there was no way to compromise between the two approaches, and furthermore, both had been implemented. How to solve this impass? The solution was the middle= term, which states explicitly the abc note to staff position mapping (and the transpose= term to give the actual pitch relative to the treble-clef default). This lets people write the music in any octave they like, and by a simple change to a voice's clef=, middle= and transpose= terms, a voice can be retargeted for an instrument with a different range. This is a bit more complicated, but it makes abc more powerful and versatile. It's a little extra work for implementers, since it adds one more term to the expression to calculate a note's staff position or pitch. But from some users' viewpoint, it's very useful. So users should probably be happy that abc implementers couldn't agree on these mappings. One illustration of its use that I've come across: The recorder is one of my instruments, and I have a couple of very nice Dolmetsch altos in my collection. Alto recorder players have to get used to the fact that music for the instrument is routinely written in two octaves. The range is F to g', and you can see that no matter how you map this to the treble clef, half the range is on the staff and half is either above or below. Historically, music printers have never agreed which range to use on paper. Most music printed nowadays for alto recorder is written with the upper half of the range above the staff. But recorders have a strong affinity for human voices, and vocal music is conventionally written an octave lower. So alto recorder players learn to read vocal lines with the lower mapping. There's nothing to be done about this; it's just a fact of life for a recorder player. I've had several occasions to retarget vocal and alto recorder lines to the other. With abc now, you can convert a vocal line to the upper recorder form by saying middle=B,, and you can convert a
Re: [abcusers] What software will translate this correctly?
On 10 Jun 2004, at 16:22, Steve Wyrick wrote: Phil Taylor said: Steve, I think you should suggest to your friends that they get abcm2ps; it's much more up to date, is still being developed and there are versions for all three major platforms. You might want to look at it yourself too, as you can invoke it directly from BarFly to get a nice GUI. There are instructions for this in the Import/Export doc which comes with BarFly. Thanks Phil, I'll look into it, and suggest it to anyone who asks. Unfortunately, the majority of the people I interact with who use abc just dump it into the concertina.net tune-o-tron (http://www.concertina.net/tunes_convert.html), which uses abc2ps, abc2midi and ghostscript; or download tunes from JC's ABC Tunefinder as pdf files (John, does your site also use abc2ps as an intermediate step in going to pdf? What about the MIDI generator?). Since I planned to post this transcription I was looking for a format that even the dumbest abc translator could read! It's frustrating having to deal with the situation where the most-used program isn't the best one! -Steve There used to be at least one other abc to staff notation converter on the web at http://www.fojar.com/~steve/abctostaff/index.php but that just gave me a 404, and www.fojar.com gives a message which says Moving day, so maybe it will be back. It might be worth contacting the owners of concertina.net and asking them to change it to use abcm2ps. It would be a trivial job, as the interface is identical, and it would make no difference to simple tunes. As another alternative, perhaps Jon Freeman could consider adding a tune converter to FolkInfo? As he is already using abcm2ps to convert tunes from the FolkInfo database on the fly it might not be too difficult. Phil Taylor To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
There used to be at least one other abc to staff notation converter on the web at http://www.fojar.com/~steve/abctostaff/index.php but that just gave me a 404, and www.fojar.com gives a message which says Moving day, so maybe it will be back. There used to be another at http://hjem.get2net.dk/atte/lovsang/input.php where you could choose between several programs, but that's gone too. Pity. Ray To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
From: Phil Taylor [EMAIL PROTECTED] As another alternative, perhaps Jon Freeman could consider adding a tune converter to FolkInfo? As he is already using abcm2ps to convert tunes from the FolkInfo database on the fly it might not be too difficult. I had one for a while but took it down after some abc from somewhere caused abcm2ps to loop and I had my ISP phoning me up asking what abcm2ps was and telling me that it had been using something like 90% of the processing power for a good hour or more. I'm not prepared to take the chance on the shared server again. Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
From: Stephen Kellett [EMAIL PROTECTED] In message [EMAIL PROTECTED], Jon Freeman [EMAIL PROTECTED] writes I had one for a while but took it down after some abc from somewhere caused abcm2ps to loop and I had my ISP phoning me up asking what abcm2ps was and telling me that it had been using something like 90% of the processing power for a good hour or more. I'm not prepared to take the chance on the shared server again. Write a monitor process that monitors your abcm2ps processes. Any process that has been at a high CPU for more than X time, kill it. Or modify abcm2ps to include a monitor thread to do the same task (better as it'll know how long each tune processing has taken). I can't do that (even if I knew how to). If I was on my own server I would look into that sort of possibility but I'm on a shared server somewhere in Derbyshire which my ISP monitors. It was a while ago and perhaps these days they do run something like that themselves but it's not really the sort of question I want to ask them... You know, I run an executable on your server that I fear may once in a while take over most of your resources and perhaps screw up other users. Do you have anything in the system to prevent that? Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
From: Stephen Kellett [EMAIL PROTECTED] Write a monitor process that monitors your abcm2ps processes. Any process that has been at a high CPU for more than X time, kill it. Or modify abcm2ps to include a monitor thread to do the same task (better as it'll know how long each tune processing has taken). I must admit I had not read you post properly last time round. Are you suggesting that it could be possible to have a version of abcm2ps that could watch itself and terminate itself if it did get out of control? I wouldn't have the first clue where to start but if that sort of idea is feasible, I am intrested. Jon To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
Re: [abcusers] What software will translate this correctly?
My HARMONY is not to be confused with Harmony Assistant, of course. I believe I was first to use the name, back in 1996, but I may be wrong there. Chuck Boody wrote: Harmony Assistant makes total hash out of it. only one part, 4/4 meter etc... Chuck Boody = On Wednesday, June 9, 2004, at 09:10 AM, Steve Wyrick wrote: I apologize if this is a duplicate post; I sent this yesterday but haven't seen it appear on the list, and I discovered a problem with my sending address which I think prevented it from going out. I just completed a transcription of Robert Petrie's 1st tunebook (Scottish, 1790), which has parts for violin and cello. I wrote the code using Phil Taylor's BarFly, on which this reads and plays correctly, but it appears that a lot of other abc software can't handle the multiple voices. Below is a sample tune; I'd be interested to know what other readers and midi players can handle this code, especially any PC software (for reference, the 2nd note in the 3rd staff bass line is middle C). Thanks for any help, or suggestions for improving the portability of this code! -Steve X:2 T:Mrs. Farquharson's Jigg or Quick Step C:Robert Petrie S:Petrie's Collection of Strathspey Reels and Country Dances c., 1790 Z:Steve Wyrick sjwyrick'at'astound'dot'net, 3/20/04 N:Petrie's First Collection, page 2 L:1/8 V:1 name = violin V:2 name = bass clef=bass middle=d transpose=-24 M:6/8 R:Jig K:Cm [V:1] G|(Tc=Bc) GEC|(Tc=Bc) edc|(Tc=Bc) G=A_B| FGE DCB, | [V:2] z|C3 E3 | F3G3 | c3 e3 | d2f b2B | %Petrie's original does not have the B flatted in the third measure -SW [V:1] (Tc=Bc) GEC|cde dec|=BGgfed | ecc c2 :| [V:2] c3 e3 | a3f3 | g2 e g2G | c3 C2 :| [V:1] c|(Tgfg) edc|(Tgfg) fed|(Tgfg) cde |=Bcd G3 | [V:2] z|c3 c'3| =b3g3 | e3 f3 | g3 gaf | [V:1] (Tgfg) edc|(Tgfg) fed| efgfed | ecc c3 | [V:2] e3 c3 | =B3G3 | c2eg2G | c3 CEG | [V:1] (Tgfg) edc|(Tgfg) fed|(Tgfg) cde |=Bcd G2F | [V:2] c3 c'3| =b3g3 | c3 f3 | g3 G=A=B| [V:1] EDC FED| GFEAGF| Gedcd=B | c2c c2 |] [V:2] c3 G3 | c3 f3 | e2fg2G | cGE C2 |] % The above code was written using Phil Taylor's BarFly abc reader/composer/player program. % Other abc readers (e.g. abc2ps) may require everything after the word bass to be % deleted in the V:2 header line for correct display of notes the bass clef, or require that % the M: and K: fields be repeated directly under the V:1 header line to display the meter % and key signature on both staffs. -- Steve Wyrick -- Concord, California To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html