User Tools

Site Tools


music:abcnotation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

music:abcnotation [2007/12/08 00:00]
Chris Freyer
music:abcnotation [2009/05/04 14:22] (current)
Chris Freyer replacing <draw> plugin with <graphviz> for diagram
Line 1: Line 1:
 ~~NOCACHE~~ ~~NOCACHE~~
 +
 +
 +
 ====== ABC Notation ====== ====== ABC Notation ======
 I learned about [[http://www.walshaw.plus.com/abc/|ABC Notation]] indirectly.  I was looking for backing tracks to accompany me while I practice the guitar.  Its fairly tedious to find exactly what I need (right speed, right key, etc...), so I thought:  why not program my own tracks.  MIDI seemed like the obvious starting point...everything supports it.  But it turns out to be a complicated thing to program.  Lots of effort would be needed, and the output isn't very human-friendly.   I learned about [[http://www.walshaw.plus.com/abc/|ABC Notation]] indirectly.  I was looking for backing tracks to accompany me while I practice the guitar.  Its fairly tedious to find exactly what I need (right speed, right key, etc...), so I thought:  why not program my own tracks.  MIDI seemed like the obvious starting point...everything supports it.  But it turns out to be a complicated thing to program.  Lots of effort would be needed, and the output isn't very human-friendly.  
Line 15: Line 18:
   * there is an [[http://abcwiki.selfthinker.org/|abc plugin]] for my wiki!!   * there is an [[http://abcwiki.selfthinker.org/|abc plugin]] for my wiki!!
  
-Very nice!  That's the kind of leverage I was looking for.  The idea is starting to take shape now...  Write a small program to create ABC files and let abcMIDI and the abc plugin do the rest.  So I can have sheet music in standard notation on my website, and midi files available for download.  Cool!+Very nice!  That's the kind of leverage I was looking for.  The idea is starting to take shape now...  Use an external editor to create ABC files, then use tools to create various forms of output.  Something like this: 
 + 
 +<graphviz> 
 +digraph{ 
 +rankdir = LR; 
 +node [shape=box]; 
 + 
 +External_Editor [style=filled, fillcolor = limegreen]; 
 +ABC_Text_File [shape=note, style=filled, fillcolor = khaki]; 
 +WikiPlugin [style=filled, fillcolor = limegreen]; 
 +abc2midi [style=filled, fillcolor = limegreen]; 
 +abc2pdf [style=filled, fillcolor = limegreen]; 
 +other_processor [style=filled, fillcolor = limegreen]; 
 + 
 +HTML [shape=note, style=filled, fillcolor = khaki]; 
 +MIDI [shape=note, style=filled, fillcolor = khaki]; 
 +PDF  [shape=note, style=filled, fillcolor = khaki]; 
 +other_output [shape=note, style=filled, fillcolor = khaki]; 
 + 
 +External_Editor->ABC_Text_File; 
 +ABC_Text_File->WikiPlugin->HTML; 
 +ABC_Text_File->abc2midi->MIDI; 
 +ABC_Text_File->abc2pdf->PDF; 
 +ABC_Text_File->other_processor->other_output; 
 +
 +</graphviz> 
 + 
 +Now I can have sheet music on my website, with PDF and other output formats available for download.  Cool! 
  
  
Line 22: Line 53:
  
 ===== First Attempt ===== ===== First Attempt =====
 +My first attempt at using the ABC tools was on my home Linux machine.  I was able to produce all the assets as expected.  Not bad for a 15-minute exercise!  I uploaded the assets and put them here just for reference.  Now I need to try the same thing on my hosting service.  I'm certain there will be issues.
 +
 +  * {{music:maryhadalittlelamb.abc|ABC}} - the ABC file
 +  * {{music:maryhadalittlelamb.pdf|PDF}} - the PDF file
 +  * {{music:maryhadalittlelamb1.mid|MID}} - the MIDI file((Note:  if you can't play the midi file, it could be that you have RealPlayer handling your MIDI files, which it doesn't like to do.  Try QuickTime or another player instead.))
 +
  
-My first attempt at using the ABC tools ended up like this.  Not bad for a 15-minute exercise. 
-^File^Comment^ 
-|{{music:maryhadalittlelamb.abc|ABC}}  |the ABC file| 
-|{{music:maryhadalittlelamb.pdf|PDF}}  |the PDF file  | 
-|{{music:maryhadalittlelamb1.mid|MID}}| the MIDI file| 
-(Note:  if you can't play the midi file, it could be that you have RealPlayer handling your MIDI files, which it doesn't like to do.  Try QuickTime or another player instead.) 
  
  
Line 43: Line 74:
 I have to say thanks to the support staff at [[http://www.asmallorange.com|A Small Orange]] for helping to get this working.   Tim G, Jayson G, Phil Z, Jason H, Josh S, and Victor T got the job done (at different times of day, of course).  I don't think most hosting services would go that far.  I'm happy to be with them. I have to say thanks to the support staff at [[http://www.asmallorange.com|A Small Orange]] for helping to get this working.   Tim G, Jayson G, Phil Z, Jason H, Josh S, and Victor T got the job done (at different times of day, of course).  I don't think most hosting services would go that far.  I'm happy to be with them.
  
 +[[music:abc_example|Here is an example]] of the ABC Plugin in action.
  
  
  
  
-===== Example ===== 
-Below is a simple example of what the ABC Plugin can do. 
  
-<abc> 
-X:42 
-T:Test 
-M:4/4 
-K:C 
-"C" C2 D2 E2 G2 |"C" c8 |] 
-w:This is just a test 
-</abc> 
  
-<abc> 
-X: 1 
-T: Tourdion 
-C: Pierre Attaignant (c.1494 - c.1551) 
-M: 3/2 
-L: 1/4 
-Q: 1/2 = 140 
-%%staves [S|A|T|B] 
-V: S clef=treble   name="Soprano" 
-V: A clef=treble   name="Alto" 
-V: T clef=treble-8 name="Tenor" 
-V: B clef=bass     name="Bass" octave=-2 
-K: Bm 
-%#define !F! "" 
-[V: S] !F!EFGAGF |E3 FGA|BAGGAF |(G2FE)D2| 
-w: Quand je bois du vin clai-ret, a-mi tout \ 
-w: tour-ne tour-ne tour-ne tour - - ne, 
-[V: A] !F!B,4 B,2|E4 E2 |D4 E2  |E2 A4   | 
-w: Le bon vin nous a ren- du gais, 
-[V: T] !F!G4 E2  |B4 B2 |B2B2=c2|B4 A2   | 
-w: Bu- vons bien, bu- vons mes a- mis, trin- 
-[V: B] !F!e4 e2  |e4 e2 |g2b2a2 |e2f4    | 
-w: Bu- vons bien, bu- vons mes a- mis, trin- 
-% 
-[V: S] EFGAGF|E2G2F2      |E4 D2    |E6 :: 
-w: aus-si d\'e-sor-mais je bois An-jou ou Ar-bois. 
-[V: A] G4 E2 |(B,A,B,C) D2|B,2 B,4  |B,6:: 
-w: chan-tons, ou-bli-ons nos pei-nes, chan-tons! 
-[V: T] B4 B2 |G4 A2       |G2 (FEF2)|E6 :: 
-w: quons, bu-vons, gai-ment chan - - tons! 
-[V: B] e4 e2 |e4 d2       |e2 B4    |e6 :: 
-w: quons, bu-vons, gai-ment chan-tons! 
-% 
-[V: S] !fff!B3 AB=c|B4 B2|d=cBAGF|(G3F) E2| 
-w: chan- tons et bu-vons, \`a ce fla-con fai-sons la guer -re, 
-[V: A] !fff!G4 G2  |G4 G2|F4 F2  |E4E2    | 
-w: en man-geant d'un gras jam-bon, \`a 
-[V: T] !fff!e4 e2  |d4 d2|d4 d2  |B4 B2   | 
-w: en man-geant d'un gras jam-bon, \`a 
-[V: B] !fff!e4 e2  |g4 g2|d4 d2  |e4 e2   | 
-w: en man-geant d'un gras jam-bon, \`a 
-% 
-[V: S] B3 AB=c|B2 (AG) F2|E4 D2  |E6 !D.C.!:| 
-w: chan-tons et bu-vons, mes a-mis, bu-vons donc! 
-[V: A] D4 D2  |D4 D2     |B,2 B,4|B,6:| 
-w: ce fla-con fai-sons la guerre! 
-[V: T] B4 B2  |B4 A2     |G2 F4  |E6 :| 
-w: ce fla-con fai-sons la guerre! 
-[V: B] g4 g2  |g4 d2     |e2 B4  |e6 :| 
-w: ce fla-con fai-sons la guerre! 
-</abc> 
  
 ===== Music Collection ===== ===== Music Collection =====
-[[William Marshall's Scottish Melodies]] +  * [[William Marshall's Scottish Melodies]] 
 +  * [[http://www.blanksheetmusic.net/|Blank Sheet Music]]
/home/cfreyer/public_html/data/attic/music/abcnotation.1197090027.txt.gz · Last modified: 2007/12/08 00:00 by Chris Freyer