Category Archives: Music

Arduino Concertina

Lets try to make a Electronic Concertina

UPDATE:
https://www.henriaanstoot.nl/2023/01/10/arduino-concertina-poc/
https://www.henriaanstoot.nl/2023/01/17/arduino-concertina-poc-2/

First design

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!

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

I admire people who excel at things they do

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
One of my comic collections – Don Martin

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.

https://www.youtube.com/@GeorgeCollier

Tunebook generator

2023-01-11 Updated the script! More functions

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.
  • Merges all pdf’s into one.
  • Sets title/author
  • Generic setup for multiple tunebooks
  • Generates ABC pdf and includes these

Todo: embed page numbers on every page?

BASH script:

#!/bin/bash
#sudo apt-get install texlive-latex-extra

### REMOVE OLD BOOKMARKS
ls *pdf | while read; do
rm -f "/tmp/$$.pdf"
cp "$REPLY" /tmp/$$.pdf
pdftk A=/tmp/$$.pdf cat A1-end output "$REPLY"
done


### GENERATE ABC 
if [ -d abc ] ; then
ls abc/*abc | while read abc ; do  abcm2ps -x -O - "$abc" | ps2pdf  -sPAPERSIZE=a4 - "$(echo  $abc | cut -f2 -d/ | sed 's/abc/pdf/g')" ;done
fi


nrpdf=$(ls *\.pdf | grep -vi index.pdf | grep -vi title.pdf | grep -v ^00  | wc -l)
echo "Tune PDFs in directory : $nrpdf"
pages=$(( $nrpdf / 126 ))
pages=$(( $pages + 1 ))
echo "Needed index pages : $pages"

# Extra pages : Number 002-999
extrapages=$( ls *pdf | egrep  ^00 | wc -l)
echo "Extra pages : $extrapages"

nr=$((  $extrapages  ))
echo "Total pages for tunes : $nr"
echo "create column page as text"
nr=$(( $nr +1 ))
echo $nr
ls *\.pdf | grep -vi index.pdf | grep -vi title.pdf | grep -v ^00 | sort | while read ; do 
echo "$nr $REPLY" 
next=$(exiftool "$REPLY" | awk -F": " '/Page Count/{print $2}')
nr=$(( $nr + $next ))
done | cut -f1,3- -d" " | cut -f1 -d. | sed s/\ a$//g | sed s/\ b$//g | pr -2 -t > /tmp/col
echo "Create Index pdf"
vim /tmp/col -c "set printfont=courier:h12"  -c":let &printheader = \" \""   -c "hardcopy > 001aIndex.ps | q"; ps2pdf 001aIndex.ps 

echo "Create title page pdf"
pdflatex "000 title.tex" 1>/dev/null

tempPDF=`mktemp`

echo -n "Add bookmarks : "
ls *\.pdf | grep -vi index.pdf | grep -vi title.pdf | grep -v ^00 | sort | while read i ; do
    bookmarkTitle=$( echo $i | cut -f2- -d" " | rev | cut -f2- -d. | rev)
    bookmarkInfo="BookmarkBegin\nBookmarkTitle: $bookmarkTitle\nBookmarkLevel: 1\nBookmarkPageNumber: 1"
    pdftk "$i" update_info_utf8 <(echo -en $bookmarkInfo) output $tempPDF >/dev/null
    mv $tempPDF "$i"
    echo -n "."
done
echo ""
set +x
#ls *\.pdf | grep ^[A-Z] | sort > /tmp/pdflist
name=$(pwd | rev | cut -f2 -d/ | rev)
echo $name
pdftk *pdf cat output "../${name}_$(date +%Y%m%d).pdf"
exiftool -Author="Henri Aanstoot" -Title="$name" "../${name}_$(date +%Y%m%d).pdf"

Needed tex file (named “000 title.tex”)

\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{anyfontsize}
\usepackage[a4paper, total={6in, 8in}]{geometry}

\usepackage[T1]{fontenc}
\usepackage{tgbonum}

\newlength{\drop}

\begin{document}
  \begin{titlepage}
    \drop=0.1\textheight
    \centering
    \vspace*{\baselineskip}
    \rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
    \rule{\textwidth}{0.4pt}\\[\baselineskip]
    {\fontsize{50}{60}\selectfont Irish Tunes Test Tunebook}
    \rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
    \rule{\textwidth}{1.6pt}\\[\baselineskip]
    \scshape
	{\large Tunebook}\par
    \vspace*{2\baselineskip}
    {\itshape Henri - Exampletunes\par}
    \vfill
    {\scshape generated:} \\
    \today
  \end{titlepage}
\end{document}

File naming:

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

Output from the script

 ./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 : ........

Needed software:

pdftk, pdflatex, vim, exiftool, texlive-fonts-recommended

Avond van de filmmuziek

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)

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

An afternoon music with Irmgard

Missing playing music with our Folkband.
So i drove to Irmgard (our Harp player) to practice playing Concertina together!

Playing songs like:

  • Óró Sé do Bheatha Bhaile
  • The Rathlin Bog
  • Donegal Mazurka
  • Lucy Farr’s Barndance
  • Primrose Lass
  • Planxty Irwin

Talked about methods of music notations for Concertina.
In ireland most folk is being taught by ear.

Some examples of notation

Most of these we learn using lessons from Caitlín Nic Gabhann

At the end of the afternoon i replaced some strings on her harp.
Made someone happy again.

Spotify export

Nice .. you can request a data export from spotify, much like google’s takeout.

I wil export your streaming history, playlists, library and more.

Login spotify on a desktop, goto privacy settings and request data.

Nice to generate some statistics from this data.

For now the top 50 played artists (nr of times, artist)

790     "Rammstein"
507     "Fred Morrison"
478     "Lincoln Hilton"
437     "Avicii"
420     "Shooglenifty"
347     "Treacherous Orchestra"
323     "Battlefield Band"
321     "Breabach"
295     "Nightwish"
254     "The Fraser Shaw Trust"
236     "Michael McGoldrick"
207     "Peatbog Faeries"
207     "Calum Stewart"
203     "Lúnasa"
197     "Martyn Bennett"
194     "Jeff Wayne"
193     "The Prodigy"
173     "Kíla"
172     "Ross Ainslie and Jarlath Henderson"
170     "Buena Vista Social Club"
153     "Ross Ainslie"
150     "Dàimh"
138     "Bliss"
125     "Hans Zimmer"
124     "Rare Air"
118     "Michael McCann"
107     "Kyle Tuttle"
107     "Beinn Lee"
105     "Bourne & Macleod"
 89     "Wolfstone"
 88     "Ímar"
 83     "Afro Celt Sound System"
 81     "Gordon Duncan"
 81     "Armin van Buuren"
 80     "Face The West"
 79     "Tyurgen Kam"
 79     "Aly Bain"
 72     "Keltik Elektrik"
 71     "Duncan Chisholm"
 66     "Liz Carroll"
 63     "Project Smok"
 63     "Blazin' Fiddles"
 62     "Dagda"
 61     "Trail West"
 59     "Julian Winding"
 57     "Solar Fields"
 57     "Dougie McCance"
 56     "John McSherry"
 56     "AES DANA"
 52     "Gaelic Storm"

Get top 50 script

 cat  *json | grep artistName  | sort | uniq -c | sort -nr | head -50 | cut -f1,4,5 -d\" | sed s/,$//g

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/

i2c and cap1188 Musical instrument (from vga to esp32?)

Way back in 2018 i was playing around with i2c and touch.

CAP1188 Multi touch sensor



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.

2018 Schematic i used to abuse 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 ..