0110.be logo

~ TarsosDSP: a small JAVA audio processing library

TarsosDSP is a collection of classes to do simple audio processing. It features an implementation of a percussion onset detector and two pitch detection algorithms: Yin and the Mcleod Pitch method.

Its aim is to provide a simple interface to some audio (signal) processing algorithms implemented in JAVA.

To make some of the possibilities clear I coded some examples.

The source code of TarsosDSP is available on github.

Presentation at Newline

Saturday the 25th of March TarsosDSP was presented at Newline, a small conference organized by whitespace. Here you can download the slides I used to present TarsosDSP, I also created an introductory text on sound and Java.


~ Tarsos praktisch

Wat

Tarsos is een softwareprogramma waarmee toonhoogte in muziek onderzocht kan worden in onder meer etnische muziek. Het kan gebruikt worden om toonintervallen en toonladders te identificeren. Het maakt kwarttonen of andere (ongewone) intervallen visueel duidelijk. Tarsos heeft nu ook real-time mogelijkheden. Geluid afkomstig van een microfoon wordt meteen geanalyseerd en onmiddellijke feedback toont een gespeeld of gezongen interval. Zangers of instrumentalisten die willen experimenteren met intonatie kunnen Tarsos zelf uit te proberen.

Meer info over de werking van Tarsos is te vinden in een kort artikel over de werking van Tarsos. Daarin wordt ook de betekenis van de verschillende vensters in Tarsos duidelijk.

Installatie

Om Tarsos te kunnen gebruiken heb je, naast Tarsos zelf, Java nodig. Java staat waarschijnlijk al op je pc. Dit is te controleren op java.com. Daar zijn ook instructies te vinden hoe je Java kan installeren.

Met een werkende Java is Tarsos installeren eenvoudig: download Tarsos en voer het uit (dubbel klikken).

Toonladder detecteren

Om een toonladder te detecteren in een muziekbestand met Tarsos doe je het volgende.

  1. Open het bestand door via file - open... het bestand te kiezen. Een voorbeeld van een muziek bestand in een vreemde toonladder is hier te vinden het is een cello suite van Bach gespeeld in een toonladder met 10 gelijke delen – intervallen van 120 cents
  2. Laat het algoritme het bestand analyseren.
  3. Detecteer de pieken in het histogram door met de slider peakpicking te bewegen. Als niet alle pieken gedetecteerd worden kan je een piek toevoegen door met alt en een muisbeweging over het pitch class histogram te bewegen. Klik om de positie van de piek te bevestigen. Met ctrl kunnen pieken verplaatst worden.

Deze stappen zijn ook te zien in een screenshot in de bijlage. Om de informatie te exporteren kan je bij de uitvoeropties kijken. Met file - export - scala... kan je een scala bestand exporteren. Dit zijn tekstbestanden met daarin een toonladder die gebruikt kunnen worden in het Scala programma.

Real time analyse

Met de real time analyse kan je intervallen inspelen en via visuele feedback meteen te weten komen hoe dicht je intonatie bij het gewenste resultaat zat. Je hebt er een microfoon voor nodig. Door Settings - Tarsos Live te kiezen en daarna Tarsos af te sluiten en opnieuw te starten luistert Tarsos naar geluid afkomstig van een microfoon. Speel toonhoogte intervallen en die worden visueel duidelijk. De reset knop wist het histogram.


~ ARIP: Programma

Tarsos Logo Tijdens ARIP wordt Tarsos voorgesteld en kan het zelfs uitgetest worden. Volgens de ARIP website : “Op 18 maart 2011 stellen de verschillende onderzoekers hun onderzoeksproject voor: geen afgewerkte producten of eindresultaten, maar wel momentopnames. Samen bieden ze een interessante en intrigerende kijk in wat het onderzoek in ons Conservatorium te bieden heeft”.

Het tekstje over Tarsos:

Tarsos is een softwareprogramma waarmee toonhoogte in muziek onderzocht kan worden in onder meer etnische muziek. Tarsos heeft nu ook nieuwe, real-time mogelijkheden. Geluid afkomstig van een microfoon wordt meteen geanalyseerd en onmiddellijke feedback toont een gespeeld of gezongen interval. Het maakt kwarttonen of andere (ongewone) intervallen visueel duidelijk.
Tijdens ARIP zal er kort wat uitleg gegeven worden over Tarsos en mag je een demo verwachten. Zangers of instrumentalisten die willen experimenteren met intonatie zijn ook meer dan welkom om Tarsos zelf uit te proberen.

arip logo

~ Tarsos at 'Lectures on Computational Ethnomusicology'

Tarsos Logo This monday the 28th of February Tarsos will be presented at “Lectures on Computational Ethnomusicology” which is held at Izmir, Turkey. The presentation of Tarsos is available here.

Next to the interesting programme it is a great opportunity to meet Baris Bozkurt who has been working on similar research but applied to Makam music.

On wednesday the second of March there is a small seminar at Electrical and Electronics Eng. Dept. of İzmir Yüksek Teknoloji Enstitüsü where Tarsos will be presented also.


~ TarsosTranscoder

Tarsos Transcoder is a library to transcode audio with JAVA.

Downloads and more info on http://tarsos.0110.be/tag/TarsosTranscoder

It uses (platform dependent) FFmpeg binaries in the background. It is a fork of JAVE (Java Audio and Video Encoder) by Carlo Pelliccia (www.sauronsoftware.it).

Tarsos Transcoder focuses only on audio and it is compatible with more, and more recent FFmpeg binaries and it less dependent on text output of the different binaries. The interface is also simplified. It falls back to use the ffmpeg binary in the system path, if one is present, therefore it supports platforms for which no binary is provided within the release.

Getting Started

If you have Apache Ant and git installed on your system the following commands get you started quickly:

git clone https://JorenSix@github.com/JorenSix/TarsosTranscoder.git
cd TarsosTranscoder/build
ant #Compiles and builds the core TarsosTranscoder library
ant javadoc #Creates the javadoc documentation in TarsosTranscoder/doc
java -jar tarsos_transcoder-1.0.jar ../audio/input/tone/tone_10s.wav test.flac FLAC_MONO_44KHZ #Test wav to flac transcoding

If you want to use the transcoder from within Java you need to call Transcoder. It is as simple as:

Transcoder.transcode("foo.mp3","foo.wav",DefaultAttributes.WAV_PCM_S16LE_STEREO_44KHZ);

FFmpeg can encode to a lot of audio formats and can decode even more.

Inner workings

Tarsos Transcoder tries to find an FFmpeg binary in the path of the system. If it does not find one it tries to copy a binary for the current platform. Tarsos Transcoder contains three binaries: one for MAC OS X, one for Linux (x86) and one for windows. Tarsos Transcoder has been tested on:

It will probably work most of the time.

Alternative Binaries

If the TarsosTranscoder does not include binaries for you platform, install ffmpeg and add the ffmpeg executable to your system path. It will be found and used by TarsosTranscoder automatically.

Alternatively, providing binaries for your (unsupported) platform can be done by implementing FFMPEGLocator. The PickMe method should yield true on your platform and copy e.g. an FFmpeg binary to a temporary directory.

Lisence

This software is licensed under GPL, TarsosTranscoder is based on JAVE (GPL).

Credits

JAVE (Java Audio and Video Encoder) by Carlo Pelliccia – www.sauronsoftware.it

FFmpeg: this uses libraries from the FFmpeg project under the LGPLv2.1

This product includes software developed by The Apache Software Foundation. It uses the Apache Commons Exec library, licensed under the Apache License Version 2.0

TarsosTranscoder is used by Tarsos, Tarsos is developed at University College Ghent, Faculty of Music


~ ARIP: Artistic Research In Progress

Voor ARIP heb ik een artikel over Tarsos geschreven. Het motiveert kort de bestaansredenen van Tarsos – een applicatie om toonhoogtegebruik in muziek te analyseren – en het artikel geeft een overzicht van de werking van Tarsos aan de hand van een voorbeeld. Hieronder zijn multimediale aanvullingen te vinden bij het artikel.

Ladrang Kandamanyura (slendro pathet manyura), zo heet het muziekfragment dat gebruikt werd in het artikel als voorbeeld van een stuk muziek met een ongewone (voor onze westerse oren toch) toonladder. De CD waarop het stuk te vinden is, is bij wergo te verkrijgen. Een fragment van 30 seconden is hier te beluisteren:

Het fragment kan je ook downloaden om zelf te analyseren met Tarsos.

Ladrang Kandamanyura (slendro pathet manyura)
Courtesy of: WERGO/Schott Music & Media, Mainz, Germany, www.wergo.de and Museum Collection Berlin
Lestari – The Hood Collection, Early Field Recordings from Java (SM 1712 2)
Recorded in 1957 and 1958 in Java – First release

Tarsos Live

Het onderstaande videofragment geeft aan hoe Tarsos gebruikt kan worden om in real time stemmingen te meten. Geluid afkomstig van een microfoon wordt dan meteen geanalyseerd en onmiddellijke feedback toont een gespeeld of gezongen interval. Het maakt kwarttonen of andere (ongewone) intervallen visueel duidelijk. Tarsos kan zo gebruikt worden door zangers of strijkers die willen experimenteren met microtonaliteit. Ook kan het handig zijn voor etnomusicologisch veldwerk: bijvoorbeeld om kora (een Afrikaanse harp) toonladders te documenteren.


~ Tarsos Live - Real Time Tone Scale Analysis

Tarsos LogoA new version of Tarsos was uploaded today and it contains an exciting (at least my kind of exciting) new feature. It is capable of real-time pitch analysis and tone scale construction. A video should make its use clear:

The immediate feedback is practical for educational purposes: it makes rather vague things like quarter tones or (uncommon) pitch intervals in general quite tangible. It could be used by singers or string players to explore microtonality or to improve their technique. Another use case is ethnomusicologic field-work: if you would want to research Kora tuning (an African harp) Tarsos could be a practical tool for real-time analysis.

Thanks to Olmo Cornelis and Wannes Gonnissen for playing the thumb piano and Saz respectively.


~ Tarsos in het jaarboek Orpheus instituut

Naar jaarlijkse gewoonte wordt er in het Orpheus instituut de Dag van het Artistiek onderzoek georganiseerd. Hieronder volgt een tekstje over het onderzoeksproject rond Tarsos dat in het jaarboek komt. Het jaarboek is een boekje met daarin een overzicht van artistieke onderzoeksprojecten aan Vlaamse instituten. Het wordt gepubliceerd naar aanleiding van de eerder aangehaalde “Dag van het Artistiek Onderzoek”.

Tarsos LogoHet doel van dit onderzoeksproject is het ontwikkelen van een methode om een cultuuronafhankelijke kijk op muzikale parameters te verkrijgen. Meer concreet worden er technieken aangewend uit Music Information Retrieval om toonhoogte, tempo en timbre te bestuderen. Aanpassing van bestaande, meestal westers georiënteerde, MIR-methodes moet leiden tot een gestructureerde documentatie van verschillende klankkleuren, toonschalen, metrische verhoudingen en muzikale vormen. Die beschrijving kan dienen als inspiratie voor de ontwikkeling van een artistieke compsitionele taal of kan gebruikt worden als bronmateriaal voor wetenschappelijk onderzoek rond ethnische muziek. Bijvoorbeeld om (de eventuele

teloorgang van) de eigenheid van orale muziekculturen objectief aan te tonen.

datasetIn de eerste fase van het onderzoek ligt de focus van het onderzoek op één van de meer tastbare parameters: toonhoogte. In etnische muziek is het gebruik van toonhoogte vaak radicaal anders dan westerse muziek die meestal gebaseerd is op de onderverdeling van een octaaf in twaalf gelijke delen. Om toonladders uit
muziek te extraheren en weer te geven werd het software platform Tarsos ontwikkeld. Met Tarsos is het mogelijk om automatische toonladderanlyse uit te voeren op een grote dataset of om manueel een gedetailleerde analyse te verkrijgen van enkele muziekstukken. De cultuuronafhankelijke analysemethode waarvan Tarsos gebruik maakt kan even goed toegepast worden op Indonesische, Westerse of Afrikaanse muziek.

Onze bedoeling is om Tarsos te gebruiken om evoluties in toonladdergebruik te ontdekken in de enorme dataset van het Koninklijk Museum voor Midden-Afrika. Is toonladderdiversiteit in Afrika aan het wegkwijnen onder invloed van Westerse muziek? Zijn er specifieke kenmerken te vinden over eventueel ‘uitgestorven’ muziekculturen? Dit zijn vragen die kaderen in het overkoepelende onderzoeksproject van Olmo Cornelis en waar we met behulp van Tarsos een antwoord op proberen te vinden.

Later krijgen de twee overige muzikale parameters, tempo en timbre, een gelijkaardige behandeling. In de laatste fase van dit toch wel ambitieuze onderzoekproject wordt de relatie tussen de parameters onderzocht.


~ Digital Music Research Network Workshop - Queen Mary University London

Queen Mary University Logo

Monday the 20th and Tuesday the 21th of December I attended two workshops at The Queen Mary University of London: The Machine Listening Workshop and Digital Music Research Network One-day Workshop 2010

At the workshop I had an interesting meeting with Dan Tidhar. He researches harpsichord temperament estimation at QMUL. Together they created the Tempest web service where you can upload harpsichord audio and let the system guess the temperament. The process is described in the paper “High precision frequency estimation for harpsichord tuning classification”. Although Tarsos was not officially part of the programme I hijacked the poster sessions to show a live demo of Tarsos with Dan’s dataset.

Another interesting talk was about 2032, a tunable synthesizer with definable Harmonics. It elaborates on the ideas of Sethares about tone scales .


~ Latex & Version Control Introduction

Latex Logo

Monday, I’ll give a small presentation about Latex and Version Control for the research team at the University College Gent, Faculty of Music. The idea is to give a pragmatic overview of working with Latex and version control. The presentation about Latex & Version control can be downloaded. The presentation itself is created using Latex and the source of the presentation is also available. A good description of Latex can be found here:

LaTeX (pronounced “latech”) is a document preparation system for high-quality typesetting based on, and succeeding TeX formatting. It is a very popular format in academia, as it allows advanced document formatting capabilities not found in other common document formatting systems. Some of these capabilities include table figure notations, bibliography formatting (see BibTeX), and an advanced macro language.

Some useful references:


Previous blog posts

26-11-2010 ~ Seminar - Research on Music History and Analysis

09-11-2010 ~ Groovy Tarsos Scripting

08-10-2010 ~ Tarsos Screencast

06-10-2010 ~ Tarsos Presented at the "Perspectives for Computational Musicology" Symposium

30-08-2010 ~ Tarsos User Interface Prototype

29-06-2010 ~ Rendering MIDI Using Arbitrary Tone Scales

24-06-2010 ~ Reproduction of speech using MIDI

14-06-2010 ~ Tone Scale Matching With Tarsos

03-06-2010 ~ Static Code Analysis For Java Using Eclipse

27-05-2010 ~ Tarsos demos