eftychia: Me in poufy shirt, kilt, and Darth Vader mask, playing a bouzouki (vader)
Add MemoryShare This Entry
posted by [personal profile] eftychia at 05:22pm on 2005-12-24 under , ,
Bad: I'm not in my lover's arms. I have a migraine. I'm worried about feeling well enough to drive tomorrow. When I turned on the furnace, water leaked from the pipes over the boiler.

Mitigating: The leaks seem slow enough that I can just catch them in a bucket for now, until I figure out how to fix them properly. The way I feel right now is less disconcerting and less generally-ooky than last night, despite being more aware of being in pain and more sensitive to loud noises.

Good: Thanks to a major gift, I have half a tank of oil with which to fuel the furnace (which is why I was able to turn it on at last). The Redskins won this afternoon. And though I have neither as complete nor as clean a solution as I'd like (nor as pretty, but that's just a matter of tinkering), I do have slash-noteheads to indicate strumming patterns in ABC by way of embedded Postscript code handled by abcm2ps.

I still haven't gotten around to learning Postscript (it's been on my to-do list for about a decade), and the documentation for adding custom Postscript ornamemts in abcm2ps suffers from "understandable only if known" syndrome (I'm pretty sure I got that phrasing from [livejournal.com profile] realinterrobang), so there was a lot of guessing what uncommented bits of code meant and modifying them by trial and error. (The one place where I'll forgive uncommented code: when it's machine-generated and only intended as an intermediate product never meant to be read or edited by humans.)

I need to get around to learning Lilypond (on my to-do list for, uh, a couple years now), which does implement strum-noteheads without such a kludge -- and apparently there exist ABC-to-Lilypond conversion tools. Or maybe I'll hack the abcm2ps source to add the syntax I want and submit my changes in case they're considered suitable for the next official release ... I'll have to go peek at the guts of abcm2ps and see how well commented it is.

In case anybody else here has a need for strum marks in ABC, here's how I did it:
%%abc-edited-by  D. Glenn Arthur Jr., dglenn@radix.net
%%abc-version    2.0

% Uses features of 'abcm2ps' version 4.12.3 (documentation contains a
% warning that syntax should be considered experimental and may change
% in future versions).

% ============================ C U T === H E R E ============================
% This is the part you want to copy, along with the U: line in the tune
% header.  The rest just tests/demonstrates this.
% ===========================================================================
%%beginps
% -- strum marks (slash noteheads) -- dga 20051224
/head-slash{
    M 3 2.5 RM 2.5 SLW
    -9 -12 RL stroke}!
%%endps

% -- strum mark (slash notehead)
%%deco head-strum 0 head-slash 0 0 0 x
% ============================ C U T === H E R E ============================

X:1
T:Strum Notation Experiment
N:When processed with abcm2ps-4.12.3 the notes prefixed with 's' will have
N:their noteheads replaced with heavy slashes indicating guitar strumming.
N:Hollow noteheads for half-notes and whole-notes are not implemented, and
N:it hasn't been tested with all time values, spacing, layout options, etc.,
N:nor with down-stems. -- DGA
U:s=+head-strum+
M:C
L:1/8
K:C treble-8
 "Am" sAsAsAsA sA2 sA>sA | "Dm" sA2 sA/sA/sA "C" sA2 sA2 |\
 "Am" sA2 GA sA2 GA | "Dm" DsA/sA/ DsA/sA/ "C" CsA/sA/ CsA/sA/ |]
%%text This translates to:
[M:C]
 [A,EAce][A,EAce][A,EAce][A,EAce] [A,EAce]2 [A,EAce]>[A,EAce] |\
 [DAdf]2 [DAdf]/[DAdf]/[DAdf] [CEGce]2 [CEGce]2 |\
 [A,EAce]2 GA [A,EAce] GA |\
 D[DAdf]/[DAdf]/ D[DAdf]/[DAdf]/ C [CEGce]/[CEGce]/ C[CEGce]/[CEGce]/ |]


And if you want to see what the output looks like (the length and angle of the slashes could use tweaking, and if I knew how to make the upper end of the slash join the stem more neatly ... well, it'll do for now):

Mood:: in pain
Music:: "It's Always Something", by Jennifer "Gwenna" Lubell
There are 3 comments on this entry. (Reply.)
 
posted by [identity profile] eviltomble.livejournal.com at 01:11am on 2005-12-25
I still haven't gotten around to learning Postscript (it's been on my to-do list for about a decade),

ISTR you were learning Forth a couple months ago? Postscript is AFAIR supposed to be much the same, but with different commands. Everything goes on a stack (2 stacks? I forget), and just about all the commands are about drawing some primitive or modifying some setting.

A nice site I found on the subject of learning Postscript a couple years ago, might be of use to you. No, I can't say I've done anything* with what I've read but I did read it! :D

There's also a typesetting language called "Lout", which is designed like a higher-level version of postscript that compiles into normal postscript files. It can do graphics a bit, but probably not useful if you want to just do that.

(*-I tend to find that doing stuff is the most important part of learning, so that would be the main reason I can't claim to know postscript: I wouldn't be able to remember how it goes together because I've not practiced)
 
posted by (anonymous) at 07:22am on 2006-07-04
i needed it for

"Ami" sx2 sx2 "B7" sx2 "E7" sx2

thanks
 
posted by [identity profile] dglenn.livejournal.com at 10:29am on 2006-07-04
Whoever the heck you are and however you found this, you're welcome. I'm glad someone besides me found it useful.

Links

January

SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24
 
25
 
26
 
27
 
28
 
29
 
30
 
31