Tag Archives: concertina

Planxty Irwin Concertina Notation

While working on a harmony for Irmgard and me in Musescore, i tought it would be nice to have it also in another notation.

Above a Musescore screenshot.

When using below button assignment, we can easily rewrite above into another notation.

Write musescore as MusicML/mxl Music xml.

Install xml2abc from https://wim.vree.org/svgParse/xml2abc.html

python xml2abc.py INPUTFILE.mxl output.abc

My abc file

X:1
T:Planxty Irwin
C:OCarolan
L:1/4
M:3/4
I:
K:G
V:1 treble nm="Henri" snm="H"
V:1
|: d | B2 d | c2 A | F2 A | G3/2 d/ B | A G F | G3/2 A/ B | D2 E | F2 d | B2 d | c2 A | F2 A |
 G3/2 d/ B | A G F | G3/2 A/ B | e d c | B2 d | B3/2 c/ B | B G B | c3/2 d/ c | c A F | G d e |
 c d e | d3/2 c/ A | d c A | B c d | c B A | F G A | G3/2 d/ B | A G F | G3/2 A/ B | e d c | B2 :|

Using below bash script you can convert this to PDF WITH concertina notations.
WARNING: I didn't include all keys (yet).
NOTE: Easy to adjust to other notations.
#!/bin/bash
if [ $# -lt 2 ]; then
    print "script orgname convertname"
    exit 1
fi
: > parced
org=$1
abc=$2
cat $1 | awk '/^\|/ {exit} {print}' > header
cat $1 | grep "|" | tr -d '[0-9]:/'> parse
(
cat parse | while read ; do 
echo $REPLY
echo -n "w: "

for word in $(echo $REPLY) ; do

	if [ "$word" == "|" ] ; then echo -n " | " 
	elif [ "$word" == "D" ] ; then echo -n " 2 ";
	elif [ "$word" == "G" ] ; then echo -n " 3 ";
	elif [ "$word" == "B" ] ; then echo -n " 4 ";
	elif [ "$word" == "d" ] ; then echo -n " 5 ";
	elif [ "$word" == "g" ] ; then echo -n " 6 ";
	elif [ "$word" == "b" ] ; then echo -n " 7 ";
	else echo -n " * "
	fi
done
echo ""

echo -n "w: "

for word in $(echo $REPLY) ; do

	if [ "$word" == "|" ] ; then echo -n " | " 
	elif [ "$word" == "F" ] ; then echo -n " 2 ";
	elif [ "$word" == "A" ] ; then echo -n " 3 ";
	elif [ "$word" == "c" ] ; then echo -n " 4 ";
	elif [ "$word" == "e" ] ; then echo -n " 5 ";
	elif [ "$word" == "f" ] ; then echo -n " 6 ";
	elif [ "$word" == "a" ] ; then echo -n " 7 ";
	elif [ "$word" == "E" ] ; then echo -n " 4' ";  # <============ example 2nd row
	else echo -n " * "
	fi
done
echo ""

done
) >> parced
cat header parced > $abc
abcm2ps -x -O - "$abc" | ps2pdf  -sPAPERSIZE=a4 - "$(echo  $abc | cut -f2 -d/ | sed 's/abc/pdf/g')"

Example output (Harmony part)

ABC to Animation for Concertina

I want to take simple ABC Music notation tunes and convert these to animations which shows you which keys to press and to push or pull.

This is a work in progress.
Script is using ImageMagick and ffmpeg

I started this in bash, and i should rewrite this in python.

Bash script which generates the images

#!/bin/bash
convert -size 800x600 canvas:white white.png
x=55
y=55
draw=""
for xx in $(seq 1 6); do
for yy in $(seq 1 5); do
	startx=$(( $x * $xx + 100))
	starty=$(( $y * $yy + 200))
if [ $xx -gt 3 ] ; then startx=$(($startx + 200)) ;fi
draw="$draw  -draw \"circle $startx,$starty $(( $startx - 10)),$(( $starty - 10 ))\""
done
done
echo convert $draw white.png          draw_circle.png | bash

for xx in $(seq 1 6); do
for yy in $(seq 1 5); do
        startx=$(( $x * $xx + 100))
        starty=$(( $y * $yy + 200))
if [ $xx -gt 3 ] ; then startx=$(($startx + 200)) ;fi
convert -fill white -stroke black $draw  -draw "circle $startx,$starty $(( $startx - 10)),$(( $starty - 10 ))" draw_circle.png $xx-$yy.png
convert  -draw "rectangle 300,50 500,100"  $xx-$yy.png push-$xx-$yy.png
convert  -draw "rectangle 150,50 650,100"  $xx-$yy.png pull-$xx-$yy.png
done
done

Example movie generated using random notes/length pause

for f in $(seq 1 50) ; do
pushpull=$(shuf -n1 -e push pull)
row=$(shuf -n1 -e 1 2 2 2 2 2 3 4 4 5 5 5 6)
col=$(shuf -n1 -e 1 1 1 2 2 3)
pauze=$(shuf -n1 -e 0 0 0 0 0 0 0 0 1 )
length=$(shuf -n1 -e 1 1 1 1 2 2 3 4)
file="$pushpull-$row-$col.png"
if [ $pauze == "1" ]; then
file="draw_circle.png"
fi
for f in $(seq 1 $lenght) ; do
echo "file $file"
echo "duration 0.5"
done
done

list to mp4

ffmpeg -f concat -i list  -vf fps=10 -pix_fmt yuv420p test.mp4

Above movie shows left and right hand. Keys to press.
And the bar above represents PULL/PUSH

Todo/In progress:

  • abc parser ( started )
  • Push/Pull as text in above movie also note to play??
  • Rewrite to python

Bella Ciao on Concertina

In post below i posted the score for Bella Ciao
https://www.henriaanstoot.nl/2022/12/09/generating-pdfs-from-abc-files-to-include-in-tunebooks/

Here is a quick ‘n dirty recording (sound a little distorted)

Edited with Kdenlive

I’ve imported the score as an image.
Drag a transform effect on the image.
Move the image to the bottom of the screen.
Add a keyframe.
Move to the end of the movie, add another keyframe.
Adjust the Y position to 0
Set opacity to a nice position and render

Generating PDFs from abc files to include in tunebooks.

see : https://www.henriaanstoot.nl/2022/11/21/tunebook-generator/

Edit or download a ABC music file

(More info about music notation programs https://www.henriaanstoot.nl/2022/08/24/music-notation-programs/ )

I wanted to learn Bella Ciao on my Concertina. I find the sound of the Concerina fitting the tune. So i used vi and conversion tools to create a pdf for my concertina tunebook.

(While being popular nowadays because it was used in La Casa de Papel (Money Heist). It has a interesting history)
https://en.wikipedia.org/wiki/Bella_ciao

X:
T: Bella Ciao
M: 4/4
L: 1/8
R: reel
K:C 
Zz EAB | cA-A z  EAB | cA-A z  EAB | c2 BA c2 BA | 
e2 e2 eede | ff-f2 z fed | | fe-e z edc | B2 e2 c2 B2 | 
A4 z z de | ff-f2 z fed | fe-e2 z edc | B2 e2 c2 B2 | 
w: "repeat\ from\ beginning"
A4 z EAB | cA-A z  EAB | cA-A z  EAB | c2 BA c2 BA |
e2 e2 e2 de | ff-f2 z fed | fe-e z edc | B2 e2 c2 B2 |
A4 z EAB | cA-A z  EAB | cA-A z  EAB | c2 BA c2 BA |
e2 e2 eede | ff-f2 z fed | fe-e2 z edc | B2 e2 c2 B2 | 
A4 z ede | ff-f2 z fed | fe-e2 z edc | B2 e2 ^f2 ^g2 | a4 Zz |

Using below command, I get a nicely formatted PDF

abcm2ps -x -O - bella.abc | ps2pdf  -sPAPERSIZE=a4 - bella.pdf

I’ll probably automate this, for example include this in the tunebook generator. Something like : “If abc file in subdir create pdf to include”

# Reads every file in abcsources and writes filename.pdf in current directory
ls abcsources/*abc | while read abc ; do  abcm2ps -x -O - "$abc" | ps2pdf  -sPAPERSIZE=a4 - "$(echo  $abc | cut -f2 -d/ | sed 's/abc/pdf/g')" ;done