Tag Archives: bagpipes

Automating the h*ll out of windows applications using linux

I’m using a windows program for typesetting bagpipe music.
Luckily this runs on Linux using wine.

Sometimes i just want a PDF version of a tune, for example for my tunebook compiler. (Other post)
Or i want to batch convert a lot of bww files.

A long time ago i used a virtual machine with automation software for this.
Why not automate the process on my Laptop?

So i made this script, with a workaround for the xdotool wine problem.
(wine window needs to be active to accept key strokes, other linux xwindows you can use the ID of the window)

#!/bin/bash
# use c for close at the end, without c bgplayer wont be shut down
# bww2pdf path/to/music.bww c
# make tmp file
cat "$1" > /tmp/deze.bww
# start bgplayer if not started .. if not started wait 3 secs
slp=0
pgrep BGPlayer.exe >/dev/null || slp=3
pgrep BGPlayer.exe  >/dev/null|| ( nohup wine ~/.wine/dosdevices/c\:/Program\ Files\ \(x86\)/Bagpipe\ Player/BGPlayer.exe & )
sleep $slp
# get program id
pid=$(pgrep BGPlayer.exe)
# get xwindow id using pid
winid=$(xdotool search --limit 1 --all --pid $pid)
# activate window
xdotool search --desktop 0 --class "BGPlayer.exe" windowactivate
# open file menu and Open file
xdotool key --window $winid "alt+f"
xdotool key --window $winid "o"
# give program time to execute
sleep 1
# open our tmp file
xdotool type '\tmp\deze.bww'
xdotool key KP_Enter
sleep 2
# open file menu select Print and PDF as output
xdotool key "alt+f"
xdotool key "p"
xdotool key "P"
sleep 2
# execute
xdotool key KP_Enter
sleep 1
# File close
xdotool key "alt+f"
xdotool key "c"
sleep 2
# close program when c was added to commandline
mv ~/PDF/deze* "$1.pdf"
if [ "$2" == "c" ] ; then 
	xdotool key "alt+f"
	xdotool key "x"
fi
I’m not touching the keyboard when the program is running, all handled by the script

Music notation programs

I play several instruments, and know a lot of tunes by heart. But for some instruments i’d like to have a music sheet in front of me.
When playing new tunes or from my old stash, i need it on paper also.
And when i do, I’d like my music nicely printed and in the same style.

So i’ve been using multiple programs and tools to get a result i can live with.
I’ve got a huge collection of pipe and folk tunes, but whenever i decide that i’m going to play it more often then i’m going to re-create the music sheet.
The musicsheet will be printed and put in a folder. But also as PDF wil be placed in my calibre server, with i use to provide my tablets and phones with a digital version.
For automatically generating a PDF musicbook i’ve written some scripts.
These PDF’s i can use with my DIY bluetooth page turner.

For my bagpipe tunes i started a long time ago with a dos version of Bagpipe Music Writer. Getting a decent result from your printer was a b*tch. But it was do-able.

Several other programs i’ve tried but few stuck.
CelticPipes, Ceol Mor, Bagpipe (French), MusicTex, Lilypond for example.
I don’t like to click a symbol and place it on the bars, i like typing .. so i’m a little biased.
For midi and printing multi bar/staff music i also used Cakewalk Pro.

So i’ve been using the following software:

ABC Music notation :

X: 1
T:After the Battle of Aughrim
R:Polka
M:2/4
K:ADor
E2A2 ABcd | e2d2 c3A | B2G2 GFGA | B2AG E2D2 |
E2A2 ABcd | e2d2 e2ag | e2d2 BedB | A4 A4 :|
|:\
a2e2 e2fg | abag e2fg | abaf g3e | dedB G4 |
a2e2 e2fg | abag e2d2 | B2e2 d2B2 | A4 A4 :|
  • I use this mainly for Whistle and skeletal melody lines for Uilleann pipes (no ornaments)
  • Bagpipe IS possible but hard and ugly.
  • Multiple voices (harmony) is possible.
  • Chord names can be places above bars, as well as vocals.
  • I’ve made scripts with headers and footers to get the same output result.
  • Creating the music is typing the notes and ornaments in a text file.
  • Little chords for guitar mandoline are also possible.
# Edit/createing a abc music file
vi musicpiece.abc ; edit with plain editor
abcm2ps musicpiece.abc ; convert to ps
ps2pdf14 Out.ps musicpiece.pdf ; ps convert to pdf
Also EasyABC i use occasionally

Bagpipe music:

I still use Bagpipe Music Writer, but the free Player, which is a full version also. (Long story)
Using wine on linux it is usable.



In the past i made a virtual machine which could be controlled by a web form and some CGI scripts.
I could paste a “bmw” score in a webform which would be send to the virtual machine, a BMW program would be started, printed the tune as a PDF that was send to the website again.


For a long time i also had a abc music to PDF convertor on my website.

I like the way of writing the tunes .. just type abbreviations of ornaments to print.
When you know these you are faster than using a mouse!

& sharpf sharpc
I!	hdbe Er_8 'e LAl_16		gbr LA_4					dbe Er_8 'e LAl_16			gg Fr_16 El_16 Dl_8
!	dbe Er_8 'e LAl_16		gbr LA_4					dbhg HG_4					tg Fr_16 HAl_8 'ha
!	hdbe Er_8 'e LAl_16		gbr LA_4					dbe Er_8 'e LAl_16			gg Fr_16 El_16 Dl_8
!	dbb Br_8 'b LAl_16	gg LGr_8 'lg dg Bl_16					dbhg HG_4					tg Fr_16 HAl_8 'ha			!t

There is no way to write harmonies.
In the past i’ve been using a pdf editor to merge music bars and align those by hand.
I’ve stopped doing that. I just print 2 versions.
Sometimes i use MuseScore for harmonies and multiinstrumental sheets

Mhairi Bhan Og with multiple other midi instruments (a test composition I did in 2024)

I wil post my MusicBook compiler here, when i’ve cleaned up the code.
UPDATE: https://www.henriaanstoot.nl/2022/12/09/generating-pdfs-from-abc-files-to-include-in-tunebooks/

Bought some tunebooks in Scotland

While visiting the Ardbeg dristiller on Isle of Islay, i notished a tunebook with CD in the whiskyshop. Tunes for multiple instruments and pipe settings .. interesting! Fraser Shaw, didn’t know who he was. The tunes in the book looked interesting. I bought both .. we will see.

While reading more about him, i learned he was a driving force on the islands when it comes to folk music. Sadly he died by a illness .. far to soon. While on holiday we drove by some places he was know to play.
Tunes for whistle with guitar chords and pipe settings. Some tunes are in a complex time measure. I lost the CD but it is on spotify .. favourites: £50 Cashback and Air Chall

While visiting the Kildonan Museum in South Uist, i found a tunebook which was compiled of tunes from a piper named: Calum Campbell.

This oldskool piper wrote some amazing tunes. The book was made after he, his daughter and her two children lost their lives in a heavy storm in 2005.
2005 Was a bad year .. we lost John D Burgess, Martyn Bennett and Gordon Duncan the same year.

On our way home we visited the Morpeth Chantry Bagpipe Museum.

Most of the pipes here where Northumbrian bagpipes and some borderpipes ( even a shuttlepipe )

Our Northumbrian pipes

In the touristy shop i found these books, amoung others.

Last two are Duets/Trios also for different instruments .. nice!

3D printed double chanter proof of concept

We both got a smallpipe, so there are 2 chanters in the house.

I designed a 3D adaptor for two chanters, and 3D printed this.

Taping the bottom part of one of the chanters and a part of the other, gave me the possibillity to play harmony’s.

There are only a few tunes which are suitable for playing like this.

First recording after connecting the chanters and doing a 30sec tuning.

Blender model

Folk band instruments 2021

Today newest addition Concertina

Bert Visscher and Herman Finkers

Stupid bagpipe tricks

Playing two chanters at the same time.

Made a bagpipe octopus

I think it was Burns Night 2005. We took one pipebag, took the drones out. And added one blowpipe and three chanters.
We were struggling to play the damn beast with 4 people.

A picture should exist somewhere, add it when found.

Smallpipe adaptor for two chanters.

Xmas tree lights in the drones

I’ve seen some do this, but never with xmas balls also.

Playing the THX sound

Alternative playing

Above in the movie with two chanter you can see tape.
You can tape other notes, for accidentals.

I’ve started a set with our folkband with my hands reversed.
(Left on the bottom part of the chanter, right hand toppart)
After playing amazing grace, I switched hands every few bars.

Playing high A gracenote with tophand index finger.

Play a tune and slide bottomhand over your top hand down.

Tape or block the bottom sound holes.

A old old movie (2005?), when we lift our knees we close the bottom sound hole on the side of the chanter.

Playing with the holes on the inside

Joe Mooney Summer School

UPDATE: 20230426 – Book with info

While on holiday in Ireland, Coline, Monique and i went to the Joe Mooney Summer School of Traditional Irish Music, Song & Dance.

Every July Drumshanbo plays host to the award winning Joe Mooney Summer School, a week long festival of traditional Irish music, song and dance named after the man who did so much to promote the cause of Leitrim and his beloved town. The committee continue to emulate his high ideals, endeavouring to promote Leitrim’s heritage of traditional music while handing on the best traditions of the past to future generations.

While being in Ireland from 9-27 Juli, we drove around and visited many places.

One week was reserved for attending the Summer School in Drumshanbo, Leitrim.

Coline followed the Flute Course, Monique Bodhran and I Uilleann Pipes.

I was being taught by Brain McNamara.

Internationally respected as a performer and tutor, Brian McNamara hails from a musically rich rural region (County Leitrim) of Ireland which has produced notable musicians past and present and which has been prominently associated with the preservation and performance of Irish Traditional Music.

During daytime there were lessons, and concerts in the evening.
We learned a lot!

Some evening practising by the lake

Tunes i’ve learned from Brian are:

  • Gander at the Pratie Hole
  • Honeymoon
  • Kitty goes a milking
  • O’Sullivans March

Beautiful interpretation of the tune “Battle of Cnoc na ndos”

UPDATE: 20230426 – Book with info

While flipping through some books i own about piping i found this little book: “The Man & his Music” An Anthology of the writings of Breandan Breathnach. ISBN: 09509743