So we need some pushbuttons … at least 14 .. for the most simple tunes. A sensor for push and pull. A buzzer or better yet .. a jack for earphones. Arduino with enough pins to connect a keyboard matrix. When using a keyboard matrix only single keypresses are detected. So we cant do chords!
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 |
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
These are my lists, but i’m open for discussions/questions Work in progress
Actors
Tom Hanks
John Lithgow
Dennis Lee Hopper
Jack Nicholson
Clint Eastwood
Dustin Hoffman
Rutger Hauer (RIP) .. see “De kijk van Koolhoven” why
Art
H.R. Giger
M.C. Escher
César Manrique
Comics ( Details from André Franquin, Dark Humor Koen Hottentot, Don Lawrence, Don Martin ) to name a few, they are spot on
Classical Music
Paganini
Ludovico Einaudi
Composers
Ennio Morricone
Hans Zimmer
John Williams ( with a remark ) Some of the Starwars Suite was taken from already existing music ( See https://www.youtube.com/watch?v=DN3vl-JnUF8 ! ) Gustav Holst – The Planets Suite – Mars part for example
Folk/pipers (composers)
Gordon Duncan (RIP)
Fred Morrison
RS MacDonald
Paddy Keenan
A (bad) comic i drew about Gordon Duncan in 2012
Opera
Bands (non folk)
Rammstein – I know, seems like a obvious populair choice. But hear me out.
I like classical till metal. But it has to be musically interesting.
Most (non-german) people don’t listen to the lyrics, i did not either. I found the music okay. Then i started to listen to the lyrics.
The lyrics are surprisingly deep. Layers in the text, word jokes like: Du… (you) Du hast… (you have, but sounds like hasst .. You hate) Du hast mich… ( You have me, or sounds like you hate me) Du hast mich… Du hast mich gefragt… (You have asked me)
Although people think they are fascists or far-right. Coming from the punk scene, they are kind of the opposite.
Everything they do has a meaning, but sometimes you can “paste” different stories about the song.
Listen to Ohne Dich, and then see the Music Video.
Have a good listen to Germany, and Man gegen man. There are others better in explaining .. see:
And a AI generated Music Video .. perfectly matching the Lyrics
Bonus: Check out this YT channel, all kinds of musicians .. transcripted (is this a word?) by this dude.
I’m using below scripts to generate tunebooks. These books I can print OR view on a tablet using my DIY bluetooth page turner. ( see other post )
I often work on tunes, add notes, text or write other versions. So i needed a fast and simple way to re-generate a tunebook. ( hence the date on the title page and in the name, so i know whats the most recent version ) Now i have a separate tunebook for each instrument, with the same looks
What does this script?
Generates a title page using Latex
Generates a tune index, with page numbers ( works with multipage tunes )
Adds bookmarks to the tunes, so you can use the bookmark link in your reader.
000 title 001 index 002 – 099 xyz (extra pages, not in index) 100 – 999 Tunes (sorting)
000 title.pdf
001aIndex.pdf
002 tuneinfo.pdf
100 The Battle of Aughrim.pdf
101 I was born for sports.pdf
105 Cerlew Jig.pdf
110 Chanters Song.pdf
115 Gander at the Pratie Hole.pdf
120 honeymoon.pdf
125 Kitty Goes a-Milking.pdf
130 Terribus.pdf
./generatebook
Tune PDFs in directory : 8
Needed index pages : 1
Extra pages : 1
Total pages for tunes : 3
create column page as text
Create Index pdf
Create title page pdf
Add bookmarks : ........
After 3 times being cancelled due to Covid, it finally happened.
We got to get to the “Evening of the film music”
We held on to our tickets, as apparently 90% of the people!
We love film music, but it is a treat when there is a live orchestra. (And special effects .. like a stuntman hanging from the roof, fire (not like Rammstein haha), and big displays)
If you get the chance .. go! Wicked good musicians and singers. Tania Kross was amazing!
Previous concerts we went to: Jeff Wayne’s War of the Worlds. The star wars suite, and an evening with Hans ZImmer.
Richard Strauss – “Also Sprach Zarathustra”
The Cinematic Orchestra – “Arrival of the Birds” from Theory of Everything
John Williams – “Hedwig’s Theme” from Harry Potter and the Sorcerer’s Stone
Ennio Morricone – The Good, the Bad and the Ugly
Main title
The Ecstasy of Gold
Ennio Morricone – Once Upon a Time in the West
Man with a Harmonica
Once Upon a Time in the West
Hans Zimmer – “Maestro” from The Holiday
Thomas Newman – “The Night Window” from 1917
Ludovico Einaudi – “Oltremare” from Nomadland
Ludovico Einaudi – “Fly” from Intouchables
John Williams – “Duel of the Fates” from Star Wars:The Phantom Menace
John Williams – “Main Title” from Star Wars: A New Hope
Intermission
Lalo Schifrin and Lorne Balfe – “Fallout” from Mission: Impossible – Fallout
Alexandre Desplat – “The Shape of Water” from The Shape of Water
Alan Silvestri – “Portals” from Avengers: Endgame
Hans Zimmer, Elton John and Lebo M – The Lion King
Circle of Life
King of the Pride Rock
Don Davis and Juno Reactor – “Navras” from The Matrix Revolutions
Jerry Goldsmith – Theme from Basic Instinct
60 Years of James Bond
James Bond Theme
“No Time To Die” from No Time To Die
“Skyfall” from Skyfall
“A View to a Kill” from A View to a Kill
“Goldfinger” from Goldfinger
“Live and Let Die” from Live and Let Die
John Williams – “The Raiders March” from Raiders of the Lost Ark (encore)
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 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.
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!
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
Way back in 2018 i was playing around with i2c and touch.
I remembered that VGA was using i2c to get information from monitors like brand/type and connection information.
I managed to access the cap1188 up to my Laptop via VGA.
The final python code i used to play with the variables and playing sound i can’t find. But below is the test code
#!/usr/bin/python
# NOTE: i did a address scan, now i have 3v3 connected to AD, so probably the address is 0x28 !!
import smbus
bus = smbus.SMBus(1) # 0 = /dev/i2c-0 (port I2C0), 1 = /dev/i2c-1 (port I2C1)
DEVICE_ADDRESS = 0x29
DEVICEx = 0x10
DEVICE_REG_MODE1 = 0x00
DEVICE_REG_LEDOUT0 = 0x1d
#Write a single register
bus.write_byte_data(DEVICE_ADDRESS, 0x1f, 0x3F)
#Write an array of registers
#ledout_values = [0xff, 0xff, 0xff, 0xff, 0xff, 0xff]
#bus.write_i2c_block_data(DEVICE_ADDRESS, DEVICE_REG_LEDOUT0, ledout_values)
while True:
print bus.read_byte_data(DEVICE_ADDRESS,0x10), bus.read_byte_data(DEVICE_ADDRESS,0x11) , bus.read_byte_data(DEVICE_ADDRESS,0x12), bus.read_byte_data(DEVICE_ADDRESS,0x13), bus.read_byte_data(DEVICE_ADDRESS,0x14), bus.read_byte_dat
a(DEVICE_ADDRESS,0x15), bus.read_byte_data(DEVICE_ADDRESS,0x16), bus.read_byte_data(DEVICE_ADDRESS,0x17)
Today i connected the cap1188 to a ESP32 and a piezo buzzer.
/*** Based on below library ***/
/*** Changed pins and added sound ***/
/***************************************************
This is a library for the CAP1188 I2C/SPI 8-chan Capacitive Sensor
Designed specifically to work with the CAP1188 sensor from Adafruit
----> https://www.adafruit.com/products/1602
These sensors use I2C/SPI to communicate, 2+ pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_CAP1188.h>
const int TONE_OUTPUT_PIN = 26;
const int TONE_PWM_CHANNEL = 0;
int freq = 0;
// Reset Pin is used for I2C or SPI
#define CAP1188_RESET 9
// CS pin is used for software or hardware SPI
#define CAP1188_CS 10
// These are defined for software SPI, for hardware SPI, check your
// board's SPI pins in the Arduino documentation
#define CAP1188_MOSI 11
#define CAP1188_MISO 12
#define CAP1188_CLK 13
// For I2C, connect SDA to your Arduino's SDA pin, SCL to SCL pin
// On UNO/Duemilanove/etc, SDA == Analog 4, SCL == Analog 5
// On Leonardo/Micro, SDA == Digital 2, SCL == Digital 3
// On Mega/ADK/Due, SDA == Digital 20, SCL == Digital 21
// Use I2C, no reset pin!
Adafruit_CAP1188 cap = Adafruit_CAP1188();
// Or...Use I2C, with reset pin
//Adafruit_CAP1188 cap = Adafruit_CAP1188(CAP1188_RESET);
// Or... Hardware SPI, CS pin & reset pin
// Adafruit_CAP1188 cap = Adafruit_CAP1188(CAP1188_CS, CAP1188_RESET);
// Or.. Software SPI: clock, miso, mosi, cs, reset
//Adafruit_CAP1188 cap = Adafruit_CAP1188(CAP1188_CLK, CAP1188_MISO, CAP1188_MOSI, CAP1188_CS, CAP1188_RESET);
void setup() {
Serial.begin(9600);
Serial.println("CAP1188 test!");
ledcAttachPin(TONE_OUTPUT_PIN, TONE_PWM_CHANNEL);
// Initialize the sensor, if using i2c you can pass in the i2c address
if (!cap.begin(0x28)){
//if (!cap.begin()) {
Serial.println("CAP1188 not found");
while (1);
}
Serial.println("CAP1188 found!");
}
void loop() {
uint8_t touched = cap.touched();
if (touched == 0) {
// No touch detected
return;
}
for (uint8_t i=0; i<8; i++) {
if (touched & (1 << i)) {
Serial.print(touched); Serial.print("\t");
freq = (i * 100);
ledcWriteTone(TONE_PWM_CHANNEL, freq);
delay(100);
}
}
Serial.println();
delay(50);
}
Finding the right pins or above pinout was the hardest part. The sketch reads the pins binary so value 129 is first and last bit.
Now i have to get the sound sounding a little better and add frequencies and fingersettings to the sketch to get a minimal electronic bagpipe. (V3 it is .. )
To be continued ..
"If something is worth doing, it's worth overdoing."