---
title: 0110.be
canonical: https://0110.be/?page=6
markdown_url: https://0110.be/index.md?page=6
page: 6
posts_per_page: 30
total_posts: 215
filters:
  content_page: _home_page
  tags:
  - HoGent
  - UGent
previous: https://0110.be/index.md?page=5
next: https://0110.be/index.md?page=7
---

## [Simplify Collaboration on a LaTeX Documents with Dropbox and a Build Server](https://0110.be/posts/Simplify_Collaboration_on_a_LaTeX_Documents_with_Dropbox_and_a_Build_Server.md)

- Published: 2011-09-21T09:46:41Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 409
- Canonical: https://0110.be/posts/Simplify_Collaboration_on_a_LaTeX_Documents_with_Dropbox_and_a_Build_Server

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md), [LaTeX](https://0110.be/tags/LaTeX.md), [Research papers](https://0110.be/tags/Research%20papers.md)

### Problem

<img src="https://0110.be/files/attachments/409/latex.gif"  alt="LaTeX icon" style="float:right"/>While working on a Latex document with several collaborators some problems arise:

-   Who has the latest version of the TeX-files?

-   Which LaTeX distributions are in use (MiKTeX, LiveTex,...)

-   Are all [LaTeX packages](http://en.wikibooks.org/wiki/LaTeX/Packages) correctly installed on each computer?

-   Why is the bibliography, generated with BiBTeX, not included or incomplete?

-   How does the final PDF look like when it is build by one of the collaborators, with a different LaTeX distribution?

Especially installing and maintaining LaTeX distributions on different platforms (Mac OS X, Linux, Windows) in combination with a lot of LaTeX packages can be challenging. This blog post presents a way to deal with these problems.

### Solution

The solution proposed here uses a build-server. The server is responsible for compiling the LaTeX source files and creating a PDF-file when the source files are modified. The source files should be available on the server should be in sync with the latest versions of the collaborators. Also the new PDF-file should be distributed. The syncing and distribution of files is done using a Dropbox install. Each author installs a Dropbox share (available on all platforms) which is also installed on the server. When an author modifies a file, this change is propagated to the server, which, in turn, builds a PDF and sends the resulting file back. This has the following advantages:

-   Everyone always has the latest version of files;

-   Only one LaTeX install needs to be maintained (on the server);

-   The PDF is the same for each collaborator;

-   You can modify files on every platform with Dropbox support (Linux, Mac OS X, Windows) and even smartphones;

-   Compiling a large LaTeX file can be computationally intensive, a good task for a potentially beefy server.

### Implementation

The implementation of this is done with a couple of bash-scripts running on Ubuntu Linux. LaTeX compilation is handeled by the LiveTeX distribution. The first script `compile.bash` handles compilation in multiple stages: the cross referencing and BiBTeX bibliography need a couple of runs to get everything right.

\`\`\`ruby\
#!/bin/bash\
#first iteration: generate aux file\
pdflatex -interaction=nonstopmode ---src-specials article.tex\
#run bibtex on the aux file\
bibtex article.aux\
#second iteration: include bibliography\
pdflatex -interaction=nonstopmode ---src-specials article.tex\
#third iteration: fix references\
pdflatex -interaction=nonstopmode ---src-specials article.tex\
#remove unused files\
rm article.aux article.bbl article.blg article.out\
\`\`\`

The second script `watcher.bash` is more interesting. It watches the Dropbox directory for changes (only in .tex-files) using the efficient inotify library. If a modification is detected the compile script (above) is executed.

\`\`\`ruby\
#!/bin/bash\
directory=/home/user/Dropbox/article/\
#recursivly watch te directory\
while inotifywait -r \$directory; do\
#find all files changed the last minute that match tex\
#if there are matches then do something...\
if find \$directory -mmin --1 \| grep tex; then\
#tex files changed =\> recompile\
echo "Tex file changed... compiling"\
/bin/bash \$directory/compile.bash\
#sleep a minute to prevent recompilation loop\
sleep 60\
fi\
done\
\`\`\`

<b>To summarize</b>: a user-friendly way of collaboration on LaTeX documents was presented. Some server side configuration needs to be done but the clients only need Dropbox and a simple text editor and can start working togheter.


---

## [The Pidato Experiment: Vibrato on a Digital Piano Using an Arduino](https://0110.be/posts/The_Pidato_Experiment%3A_Vibrato_on_a_Digital_Piano_Using_an_Arduino.md)

- Published: 2011-09-21T00:00:00Z
- Updated: 2023-05-25T07:36:48Z
- Author: Joren
- ID: 410
- Canonical: https://0110.be/posts/The_Pidato_Experiment%3A_Vibrato_on_a_Digital_Piano_Using_an_Arduino

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md)

<img src="https://0110.be/files/attachments/410/vibrato_ff.png"  style="float:right" alt="ff vibrato on a piano score of Franz Liszt"/> The Pidato experiment demonstrates a rather straightforward method to handle vibrato on a digital piano. It solves the age-old problem on what to do with the enigmatic "vibrato" instructions on some piano solo scores of Franz Liszt. The figure on the right is an exerpt of [*sonetto 104 del Petrarca*](http://imslp.org/wiki/3_Sonetti_del_Petrarca,_S.270_%28Liszt,_Franz%29).

Since there is no way to perform vibrato on an *analogue* piano there are all kinds of different interpretations. Interpretations of the 'vibrato' instruction include: vibrating the pedal, vibrating the key, simply ignoring it, [a vibrato like wiggling with a psychological sounding effect](http://www3.sympatico.ca/norma.barr/library/piano/tone_piano_playing.html), ... A pianist specialized in 19th century music, explains his embodied use of vibrato in a youtube video: [Brian Ganz on piano vibrato](http://www.youtube.com/watch?v=FxwBDZQslzI&feature=related). Those solutions all seem a bit halfhearted, so I created an alternative approach which resulted in the Pidato experiment.

Pidato is a portmanteau of piano and vibrato, the d, a and o hint to the use of an Arduino. Pidato is also Indonesian for speech, expression. To get a feel of what it actually does I created the video below. Please note that this is a *technical demonstration*, not an artistic performance... in any way.

<center>
<video style="width:70%" controls preload="none"  poster="https://0110.be/files/attachments/410/The_Pidato_experiment-Vibrato_on_a_Digital_Piano_using_an_Arduino.webp">
<source src="https://0110.be/files/attachments/410/The_Pidato_experiment-Vibrato_on_a_Digital_Piano_using_an_Arduino.mp4" type="video/mp4">
</video>
<small>Vid: The Pidato experiment - Vibrato on a Digital Piano using an Arduino.</small>

</center>
The way it works is by translating movement (accelerometer data) to MIDI messages. The hardware consists of an [Arduino](http://arduino.cc), MIDI-ports and a three axis accelerometer. The MIDI-ports are provided by this [MIDI IN & OUT Arduino shield](http://tomscarff.110mb.com/MIDI_IN_OUT_ARDUINO/midi_in_out_arduino.htm). The accelerometer is a [MMA7260Q](http://www.sparkfun.com/datasheets/Accelerometers/MMA7260Q-Rev1.pdf) from [Sparkfun](http://sparkfun.com). Attaching the MMA7260Q and the arduino is done by following the instructions [here](http://chalmersphyscomp10.wordpress.com/2010/09/17/mma7260q/). One change was made: by attaching the 3.3V output to `AREF` and executing [`analogReference(EXTERNAL);`](http://www.arduino.cc/en/Reference/AnalogReference) fluctuations in power supply cease to have an influence on accelerometer data readings. It is represented by the purple wire in the diagram below.

<img src="https://0110.be/files/attachments/410/accelerometer_wire_piano_vibrato.jpg" width="100%"  alt="Accelerometer - Arduino - wiring diagram"/>

The software should know when a vibrato like movement is made and how to translate such movement to MIDI messages. The software therefore contains a periodicity estimator and frequency detector to detect how periodic a movement is and how fast the movement is repeated. This was done with the [YIN algorithm](http://audition.ens.fr/adc/pdf/2002_JASA_YIN.pdf) (more commonly used in audio signal analysis). A periodicity threshold was determined experimentally so the system does not yield false positives when playing the piano in the usual way. Another interesting bit of code is the interrupt setup that samples the accelerometer at a fixed sample rate and sends MIDI messages, also at a fixed rate.

MIDI messaging is done over a serial connection. From the Arduino sending a MIDI message is as simple as calling `Serial.print` with the correct data. For the task at hand (sending vibrato) [Pitch Bend messages](http://tomscarff.110mb.com/midi_analyser/pitch_bend.htm) were used. The standard Arduino UNO firmware is replaced with [Arduino MIDI firmware](http://hunt.net.nz/users/darran/weblog/5b7f8/Arduino_UNO_USB_MIDI_firmware.html). This makes the Arduino appear as a standard MIDI device when connected to a computer, which makes interfacing with it practical.

The YIN algorithm is encapsulated in a reusable Arduino library and can be used to detect periodicity and frequency for any signal. [This guy](http://www.youtube.com/watch?v=oGKE1vmAWCA) used his implementation to create a chromatic tuner. The source code for both the [Yin Arduino library](https://github.com/JorenSix/Pidato) and [Pidato experiment](https://github.com/JorenSix/Pidato) can be found on github or "here (zip)":\[Pidato.src.zip\].

The Pidato experiment was done with the help the friendly hackers at [Hackerspace Ghent](http://0x20.be).

This [piano vibrato](http://hackaday.com/2011/04/16/pidato-box-adds-vibrato-effect-to-digital-pianos/) hack was also covered by [hackaday.com](http://hackaday.com) and posted to the [Hackerspace Ghent blog](http://0x20.posterous.com/).


![Prototype](https://0110.be/files/photos/410/01.prototype.jpg)

![Constuction](https://0110.be/files/photos/410/02.case.jpg)

![Finished](https://0110.be/files/photos/410/03.pidato.jpg)

![ff vibrato annotation](https://0110.be/files/photos/410/vibrato.png)

![wire schema](https://0110.be/files/photos/410/accelerometer_wire.jpg)

- [Pidato.src.zip](https://0110.be/files/attachments/410/Pidato.src.zip)

- [vibrato\_ff.png](https://0110.be/files/attachments/410/vibrato_ff.png)

- [accelerometer\_wire\_piano\_vibrato.jpg](https://0110.be/files/attachments/410/accelerometer_wire_piano_vibrato.jpg)

- [The\_Pidato\_experiment-Vibrato\_on\_a\_Digital\_Piano\_using\_an\_Arduino.mp4](https://0110.be/files/attachments/410/The_Pidato_experiment-Vibrato_on_a_Digital_Piano_using_an_Arduino.mp4)

- [The\_Pidato\_experiment-Vibrato\_on\_a\_Digital\_Piano\_using\_an\_Arduino.webp](https://0110.be/files/attachments/410/The_Pidato_experiment-Vibrato_on_a_Digital_Piano_using_an_Arduino.webp)

---

## [Rendering MIDI Using Arbitrary Tone Scales - Revisited](https://0110.be/posts/Rendering_MIDI_Using_Arbitrary_Tone_Scales_-_Revisited.md)

- Published: 2011-09-20T14:14:02Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 408
- Canonical: https://0110.be/posts/Rendering_MIDI_Using_Arbitrary_Tone_Scales_-_Revisited

- Tags: [Code](https://0110.be/tags/Code.md), [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md)

Tarsos can be used to render MIDI files to audio (WAV) files using arbitrary tone scales. This functionallity can be used to (automatically) verify tone scale extraction from audio files. Since I could not find a dataset with audio and corresponding tone scales creating one using MIDI seemed a good idea.

MIDI files can be found in spades (for example on [piano-midi.de](http://www.piano-midi.de/midi_files.htm) or [kunstderfuge.com](http://kunstderfuge.com)), tone scales on the other hand are harder to find. Luckily there is one massive source, the [Scala Tone Scale Archive](http://www.huygens-fokker.org/scala/downloads.html#scales): *A large collection of over 3700 tone scales*.

Using Scala tone scale files and a midi files a *Tone Scale - Audio* dataset can be generated. The quality of the audio depends on the (software) synthesizer and the [SoundFont](http://en.wikipedia.org/wiki/SoundFont) used. Tarsos currently uses the [Gervill synthesizer](https://gervill.dev.java.net/). Gervill is a pure Java software synthesizer with support for 24bit SoundFonts and the MIDI tuning standard.\
<br/>

### How To Render MIDI Using Arbitrary Tone Scales with Tarsos

A recent version of the JRE (Java Runtime Environment) needs to be installed on your system if you want to use Tarsos. Tarsos itself can be downloaded in the form of the "MIDI and Scala to Wav - JAR Package":\[MidiToWav.jar\].

To test the program you can use "a MIDI file":\[MIDI_file.mid\] and "a Scala file":\[persian.scl.txt\] and drag and drop those on the graphical interface.

<center>
<img src="https://0110.be/photo/cons/216/MIDI_and_Scala_to_WAV.png" alt="Midi to WAV screen shot"/>

</center>
The result should sound like this:

<object height="81" width="100%">
<param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F23757999"></param> <param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F23757999" type="application/x-shockwave-flash" width="100%"></embed> </object>

To summarize: by rendering audio with MIDI and Scala tone scale files a dataset with tone scale - audio information can be generated and tone scale extraction algorithms can be tested on the fly.


![Drag and drop MIDI and scala files](https://0110.be/files/photos/408/MIDI_and_Scala_to_WAV.png)

![Create WAV files](https://0110.be/files/photos/408/MIDI_and_Scala_to_WAV_processing.png)

- [MidiToWav.jar](https://0110.be/files/attachments/408/MidiToWav.jar)

- [MIDI\_file.mid](https://0110.be/files/attachments/408/MIDI_file.mid)

- [persian.scl.txt](https://0110.be/files/attachments/408/persian.scl.txt)

---

## [PeachNote Piano](https://0110.be/posts/PeachNote_Piano.md)

- Published: 2011-09-08T06:32:37Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 407
- Canonical: https://0110.be/posts/PeachNote_Piano

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [PeachNote Piano](https://0110.be/tags/PeachNote%20Piano.md), [Presentation](https://0110.be/tags/Presentation.md)

<img style="float:right;margin-left:5px" src="https://0110.be/photo/cons/212/PeachNote_Schema.png" alt="PeachNote Piano Schema"/>This is about PeachNote Piano, a project only tangentially related to Tarsos. PeachNote Piano aims to capture as many piano practice sessions as possible and offer useful services using this data. The system does this by capturing and redirecting MIDI events on a Bluetooth enabled smartphone. It is done together with [Vladimir Viro](http://www.peachnote.com/about.html) and builds on the existing [PeachNote](http://peachnote.com) infrastructure.

The schema - right - shows the components of the PeachNote Piano system. At the bottom you have a MIDI keyboard connected to the MIDI-Bluetooth-bridge. A smartphone (middle left) receives these MIDI events via Bluetooth and controls the communication to the server (top left). An alternative path goes through a standard computer (top right).

The Arduino based Bluetooth to MIDI bridge is an improvement on the work by [Peter Brinkmann](http://nettoyeur.noisepages.com/). The video below shows communication between USB-MIDI, Bluetooth MIDI and MIDI IN/OUT ports.

As an example application of the PeachNote Piano system we implemented a "Continue a Melody" service which works as follows: a user plays something on a keyboard, maybe just a few notes, and pauses for a few seconds. In the meantime, the server searches through a large database of MIDI piano recordings, finds the longest fuzzy match for the user's most recent input, and, after a short silence on the users part, starts streaming the continuation of the best matched performance from the database to the user. This mechanism, in fact, is way of browsing a music collection. Users may play a known leitmotiv or just improvise something, and the system continues playing a high quality recording, "replying" to the musical proposition of the user.

<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/zDWon8l8Cx4?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/zDWon8l8Cx4?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>

### More technical details

The melody matching is done on the server, which is implemented in Javascript in the Node.js framework. The whole dataset (about 350 hours of piano recordings) resides in memory in two representations: as a sequence of pitches, and as a sequence of "densities" at the corresponding places of the pitch sequence dataset. This second array is used to store the rough tempo information (number of notes per second) absent in the pitch sequence data.\
By combining the two search criteria we can achieve reasonable approximation of the tempo-aware search without its computational complexity.

The implementation of the hardware is based on the open-source electronic prototyping platform Arduino. Optocoupled MIDI ports (IN/OUT) and the BlueSMiRF Bluetooth module were attached to the main board, as can be seen in the middle left block of the schema. The BlueTooth module is configured to use the Serial Port Profile (SPP) which emulates RS-232. The software on the Arduino manages bi-directional, low latency message passing between three serial ports: USB (through an FTDI chip), BlueTooth and the hardware MIDI-IN and OUT port.

The standard Arduino firmware has been replaced with firmware that implements the "Universal Serial Bus Device Class Definition for MIDI Devices": when attached to a computer via USB, the Arduino shows up as a standard MIDI device, which makes it compatible with all available MIDI software. The software client currently works on the Android smartphone platform. It is represented using the middle right block in the schema. The client can send and receive MIDI events over its Bluetooth port. Pairing, connecting and communicating with the device is done using the [Amarino software library](http://www.amarino-toolkit.net/). The client communicates with the Peachnote Piano server using TCP sockets implemented on the Dalvik Java runtime.


![Finished enclosure](https://0110.be/files/photos/407/IMG_20110827_014141.jpg)

![Building a Bluetooth - MIDI shield](https://0110.be/files/photos/407/IMG_20110827_003652.jpg)

![Assembled](https://0110.be/files/photos/407/IMG_20110827_014024.jpg)

![PeachNote Piano in action](https://0110.be/files/photos/407/peachnote.jpg)

![PeachNote Schema](https://0110.be/files/photos/407/PeachNote_Schema.png)

---

## [Makam Recognition with the Tarsos API](https://0110.be/posts/Makam_Recognition_with_the_Tarsos_API.md)

- Published: 2011-09-01T08:13:21Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 406
- Canonical: https://0110.be/posts/Makam_Recognition_with_the_Tarsos_API

- Tags: [Code](https://0110.be/tags/Code.md), [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Tarsos](https://0110.be/tags/Tarsos.md)

This article describes how to do makam recognition with a script that uses the Tarsos API.

The task we want to do is to find the tone scales most similar to the one used in recorded music. To complete this task you need a small set of theoretical scales and a large set of music, each brought in one of the scales. To make it more concrete, an example of Turkish classical music is used.

In an [article by Bozkurt](http://dl.acm.org/citation.cfm?id=1688013) pitch histograms are used for - amongst other tasks - makam recognition. A maqam defines rules for a composition or performance of classical Turkish music. It specifies melodic shapes and pitch intervals, the scale. The task is to identify which of nine makams is used in a specific song. A simplified, generalized implementation of this task is shown here. In our implementation there is no tonic detection step. Also here we use only theoretical descriptions of the tone scales as a template and do not construct a template using the audio itself, as is done by Bozkurt. Ioannidis Leonidas wrote an interesting [master thesis about makam recognition](http://www.mtg.upf.edu/static/media/Ioannidis-Leonidas-Master-Thesis-2010.pdf). Since no knowledge of the music itself is used the approach is generally applicable.

The following is an implementation in [Scala](http://scala-lang.org) a general purpose programming language that is interoperable with Jave . The first step is to write the Scala header. This is just some boilerplate code to be able to run the script from the command line - it assumes a UNIX-like environment and tarsos.jar in the same directory:

\`\`\`ruby\
#!/bin/sh\
exec scala -cp tarsos.jar -savecompiled "\$0" "\$@"\
!#\
import be.hogent.tarsos.util.\_\
//other import statements\
\`\`\`

The second step constructs the templates the capability of Tarsos to create\
theoretical tone scale templates using Gaussian kernels is used, line 8. See the attached images for some examples.

\`\`\`ruby\
val makams = List( "hicaz","huseyni","huzzam","kurdili_hicazar",\
"nihavend","rast","saba","segah","ussak")

var theoreticKDEs = Map\[java.lang.String,KernelDensityEstimate\]()\
makams.foreach{ makam =\>\
val scalaFile = makam + ".scl"\
val scalaObject = new ScalaFile(scalaFile);\
val kde = HistogramFactory.createPichClassKDE(scalaObject,35)\
kde.normalize\
theoreticKDEs = theoreticKDEs + (makam -\> kde)\
}\
\`\`\`

The third and last step is matching. First a list of audio\
files is created by recursively iterating a directory and matching each file to\
a regular expression. Next, starting from line 4, each audio file is processed.\
The internal implementation of the YIN pitch detection\
algorithm is used on the audio file and a pitch class histogram is created\
(line 6,7). On line 10 normalization of the histogram is done, to\
make the correlation calculation meaningful. Line 11 until 15 compare the\
created histogram from the audio file with the templates calculated beforehand.\
The results are stored, ordered and eventually printed on line 19.

\`\`\`ruby\
val directory = "/home/joren/turkish_makams/"\
val audio_pattern = ".\*.(mp3\|wav\|ogg\|flac)"\
val audioFiles = FileUtils.glob(directory,audio_pattern,true).toList

audioFiles.foreach{ file =\>\
val audioFile = new AudioFile(file)\
val detectorYin = PitchDetectionMode.TARSOS_YIN.getPitchDetector(audioFile)\
val annotations = detectorYin.executePitchDetection()\
val actualKDE = HistogramFactory.createPichClassKDE(annotations,15);\
actualKDE.normalize\
var resultList = List\[Tuple2\[java.lang.String,Double\]\]()\
for ((name, theoreticKDE) \<- theoreticKDEs){\
val shift = actualKDE.shiftForOptimalCorrelation(theoreticKDE)\
val currentCorrelation = actualKDE.correlation(theoreticKDE,shift)\
resultList = (name -\> currentCorrelation) :: resultList\
}\
//order by correlation\
resultList = resultList.sortBy{\_.\_2}.reverse\
Console.println(file + " is brought in tone scale " + resultList(0).\_1)\
}\
\`\`\`

A complete version of this script can is available: "Tone scale matching script":\[guess_makam.scala\] Results of the script when ran on Bozkurt's dataset can be seen in the attached spreadsheet ("openoffice format":\[makam_recognition_results.ods\] or "excel format":\[makam_recognition_results.xls\]).


![Theoretical template](https://0110.be/files/photos/406/template_ussak.png)

![Other theoretical template](https://0110.be/files/photos/406/template_segah.png)

![Actual Hicaz song overlayed with a theoretical template](https://0110.be/files/photos/406/hicaz.png)

- [guess\_makam.scala](https://0110.be/files/attachments/406/guess_makam.scala)

- [makams.zip](https://0110.be/files/attachments/406/makams.zip)

- [makam\_recognition\_results.ods](https://0110.be/files/attachments/406/makam_recognition_results.ods)

- [makam\_recognition\_results.xls](https://0110.be/files/attachments/406/makam_recognition_results.xls)

---

## [Tarsos at 'ISMIR 2011'](https://0110.be/posts/Tarsos_at_%27ISMIR_2011%27.md)

- Published: 2011-08-22T08:26:09Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 405
- Canonical: https://0110.be/posts/Tarsos_at_%27ISMIR_2011%27

- Tags: [Code](https://0110.be/tags/Code.md), [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [ISMIR](https://0110.be/tags/ISMIR.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Research papers](https://0110.be/tags/Research%20papers.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right;margin-left:5px;"/>A paper about Tarsos was submitted for review at the [12th International Society for Music Information Retrieval Conference](http://ismir2011.ismir.net/) which will be held in Miami. The paper "Tarsos - a Platform to Explore Pitch Scales in Non-Western and Western Music":\[tarsos_ismir_2011.pdf\] was reviewed and accepted, it will be published in this year's proceedings of the ISMIR conference. It can be read below as well.

An oral presentation about Tarsos is going to take place Tuesday, the 25 of October during the afternoon, as can be seen on the [ISMIR preliminary program schedule](http://ismir2011.ismir.net/program.html#OS2).

If you want to cite our work, please use the following data:

\`\`\`ruby\
\@inproceedings{six2011tarsos,\
author = {Joren Six and Olmo Cornelis},\
title = {Tarsos - a Platform to Explore Pitch Scales\
in Non-Western and Western Music},\
booktitle = {Proceedings of the 12th International\
Society for Music Information Retrieval Conference,\
ISMIR 2011},\
year = {2011},\
publisher = {International Society for Music Information Retrieval}\
}\
\`\`\`

<iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/78729538/content?start_page=1&view_mode=list&access_key=key-1z0pgdh7p069k0k1s0jg" data-auto-height="true" data-aspect-ratio="0.772727272727273" scrolling="no" id="doc_99055" width="100%" height="600" frameborder="0">
</iframe>
<script type="text/javascript">
(function() { var scribd = document.createElement("script"); scribd.type = "text/javascript"; scribd.async = true; scribd.src = "http://www.scribd.com/javascripts/embed_code/inject.js"; var s = document.getElementsByTagName("script")\[0\]; s.parentNode.insertBefore(scribd, s); })();</script>


- [tarsos\_ismir\_paper.bibtex.txt](https://0110.be/files/attachments/405/tarsos_ismir_paper.bibtex.txt)

- [tarsos\_ismir\_2011.pdf](https://0110.be/files/attachments/405/tarsos_ismir_2011.pdf)

---

## [Latex export functions](https://0110.be/posts/Latex_export_functions.md)

- Published: 2011-06-17T08:02:51Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 402
- Canonical: https://0110.be/posts/Latex_export_functions

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [Tarsos](https://0110.be/tags/Tarsos.md)

Tarsos, a software package to analyse pitch organization in music, contains a new output modality. It is now possible to export a pitch class histogram and a pitch class interval matrix to latex from within Tarsos. This makes documenting tone scales more efficient.

An example for "a pitch class histogram and pitch class interval matrix":\[latex_export.pdf\] can be seen. Also available is the "latex source code":\[latex_export.tex\].


![Latex export of a pitch class histo.](https://0110.be/files/photos/402/latex_export_pitch_class_histo.png)

![Latex export of a pitch class interval matrix](https://0110.be/files/photos/402/latex_export_p_c_interval_matrix.png)

- [latex\_export.tex](https://0110.be/files/attachments/402/latex_export.tex)

- [latex\_export.pdf](https://0110.be/files/attachments/402/latex_export.pdf)

- [MR.1954.1.19-4.dat](https://0110.be/files/attachments/402/MR.1954.1.19-4.dat)

---

## [Resynthesis of Pitch Detection Annotations on a Flute Piece](https://0110.be/posts/Resynthesis_of_Pitch_Detection_Annotations_on_a_Flute_Piece.md)

- Published: 2011-06-16T14:43:10Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 403
- Canonical: https://0110.be/posts/Resynthesis_of_Pitch_Detection_Annotations_on_a_Flute_Piece

- Tags: [Code](https://0110.be/tags/Code.md), [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Tarsos](https://0110.be/tags/Tarsos.md)

Tarsos, a software package to analyse pitch organization in music, contains a new output modality. Now it is possible to export resynthesized pitch annotations, detected by a pitch detection algorithm and compare those with the original sound. This can be interesting to see which errors a pitch detection algorithm makes.

Below you can listen to an example of synthesized pitch detection results compared with the original flute piece. The file starts with only the original flute sound (on the right channel) and gradually changes so only the synthesized annotations (on the left channel) can be heard.

<object height="81" width="100%">
<param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F17260613&amp;show_comments=true&amp;auto_play=false&amp;color=ff7700"></param> <param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F17260613&amp;show_comments=true&amp;auto_play=false&amp;color=ff7700" type="application/x-shockwave-flash" width="100%"></embed> </object> <span><a href="http://soundcloud.com/joren_six/flute-resynth">Resynthesis of Pitch Detection Annotations on a Flute Piece</a> by <a href="http://soundcloud.com/joren_six">Joren Six</a></span>


- [flute\_resynth.wav](https://0110.be/files/attachments/403/flute_resynth.wav)

---

## [Tarsos at 'IPEM Open House'](https://0110.be/posts/Tarsos_at_%27IPEM_Open_House%27.md)

- Published: 2011-05-27T10:02:51Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 400
- Canonical: https://0110.be/posts/Tarsos_at_%27IPEM_Open_House%27

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Presentation](https://0110.be/tags/Presentation.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="https://0110.be/files/attachments/400/ipem_logo.gif"  alt="IPEM Logo"  width="100" style="float:right;margin-left:5px;"/> The 25th of May 2011 Tarsos was present at the [IPEM (Institute for Psychoacoustics and Electronic Music)](http://www.ipem.ugent.be/) open house.

> IPEM (Institute for Psychoacoustics and Electronic Music) is the research center of the Department of Musicology, which is part of the Department of Art, Music and Theater Studies of Ghent University. IPEM provides a scientific basis for the cultural and creative sector, especially for music and performance arts, and does pioneering research work on the relationship between music body movement and new technologies. The institute consists of an interdisciplinary team but also welcomes visiting researchers from all over the world. One of its aims is also to actively try and validate research results during public events and by means of user studies.

There are close relations between the Royal Conservatory Ghent, where we are located, and IPEM. There is more information [about the IPEM open house](http://www.ipem.ugent.be/node/292) available. Also available is [the program of the IPEM open house 2011](http://www.ipem.ugent.be/node/293)

Tarsos was presented using a poster, a flyer and a live demo. The "poster about Tarsos":\[tarsos_poster.pdf\] and the "flyer about Tarsos":\[tarsos_flyer.pdf\] are both downloadable.


- [tarsos\_flyer.pdf](https://0110.be/files/attachments/400/tarsos_flyer.pdf)

- [tarsos\_poster.pdf](https://0110.be/files/attachments/400/tarsos_poster.pdf)

- [ipem\_logo.gif](https://0110.be/files/attachments/400/ipem_logo.gif)

---

## [PulseAudio Support for Sun Java 6 on Ubuntu](https://0110.be/posts/PulseAudio_Support_for_Sun_Java_6_on_Ubuntu.md)

- Published: 2011-05-27T09:59:31Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 394
- Canonical: https://0110.be/posts/PulseAudio_Support_for_Sun_Java_6_on_Ubuntu

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md)

This article describes how to make sun-java6 play nice with the PulseAudio sound sytem on Ubuntu with an x64 processor architecture. With some changes the method should also work with other operating systems and other platforms.

The default way sun-java6 operates with respect to sound on Ubuntu is, well unrespectfull. When playing audio it claims an audio device, which then can not be used any more by other applications trying to access the same device. This is far from ideal. Also changing audio interfaces (by e.g. plugging in a USB audio interface) goes wrong most of the time.

<center>
<img src="https://0110.be/files/attachments/394/pulseaudio_logo.png" alt="PulseAudio ear-candy">

</center>
These problems are addressed by PulseAudio and there is a way to make sun-java6 aware of PulseAudio on Ubuntu. The OpenJDK does this automatically but it has some other, unrelated, issues. If you want to use PulseAudio with java6 on Ubuntu x64 you need copy "pulse-java.jar":\[pulse-java.jar\] and platform dependent "libpulse-java.so":\[libpulse-java.so\] file to correct JVM directories. To make it easy you can execute these commands:

\`\`\`ruby\
wget http://tarsos.0110.be/attachment/cons/255/libpulse-java.so\
sudo cp libpulse-java.so /usr/lib/jvm/java-6-sun/jre/lib/amd64

wget http://tarsos.0110.be/attachment/cons/256/pulse-java.jar\
sudo cp pulse-java.jar /usr/lib/jvm/java-6-sun/jre/lib/ext\
\`\`\`

From this moment on the "PulseAudio Mixer" is available for Java applications. Sharing, switching and assigning audio devices to Java programs is as a result smooth. To use the PulseAudio Mixer by default you need to change sound.properties which can be found at `/usr/lib/jvm/java-6-sun/jre/lib/sound.properties`. Details can be found [here](http://www.mail-archive.com/universe-bugs@lists.ubuntu.com/msg146425.html).


- [libpulse-java.so](https://0110.be/files/attachments/394/libpulse-java.so)

- [pulse-java.jar](https://0110.be/files/attachments/394/pulse-java.jar)

- [pulseaudio\_logo.png](https://0110.be/files/attachments/394/pulseaudio_logo.png)

---

## [Tarsos at 'First International Workhop of Folk Music Analysis'](https://0110.be/posts/Tarsos_at_%27First_International_Workhop_of_Folk_Music_Analysis%27.md)

- Published: 2011-05-13T09:46:54Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 393
- Canonical: https://0110.be/posts/Tarsos_at_%27First_International_Workhop_of_Folk_Music_Analysis%27

- Tags: [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Presentation](https://0110.be/tags/Presentation.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right;margin-left:5px;"/>Tarsos will be presented at the [First International Workhop of Folk Music Analysis: Symbolic and Signal Processing](http://www.arehna.di.uoa.gr/fma/):

> "The First International Workhop of Folk Music Analysis: Symbolic and Signal Processing, will take place in Athens, Greece, on the 19th and 20th of May, 2011. ... The purpose of the event is to gather reseachers who work in the area of computational folk music analysis, using symbolic or singal processing methods, to present their work, discuss and exchange views on the topic."

The "submitted abstract about Tarsos":\[Tarsos_FMA_2011.pdf\] can be downloaded. "A presentation about Tarsos":\[2011-05-20-tarsos_at_athens.pdf\] is also available.


- [Tarsos\_FMA\_2011.pdf](https://0110.be/files/attachments/393/Tarsos_FMA_2011.pdf)

- [2011-05-20-tarsos\_at\_athens.pdf](https://0110.be/files/attachments/393/2011-05-20-tarsos_at_athens.pdf)

---

## [TarsosDSP: a small JAVA audio processing library](https://0110.be/posts/TarsosDSP%3A_a_small_JAVA_audio_processing_library.md)

- Published: 2011-03-25T15:58:59Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 392
- Canonical: https://0110.be/posts/TarsosDSP%3A_a_small_JAVA_audio_processing_library

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [Tarsos](https://0110.be/tags/Tarsos.md), [TarsosDSP](https://0110.be/tags/TarsosDSP.md), [featured](https://0110.be/tags/featured.md)

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.

-   "TarsosDSP UtterAsterisk":\[UtterAsterisk.jar\] a game that shows real-time pitch detection with YIN.

-   "TarsosDSP Sound Detector":\[SoundDetector.jar\] is simply to show how to react when (loud) sound is available.

-   "TarsosDSP Percussion Detector":\[PercussionDetector.jar\] is capable of detecting percussion onsets using the method described [here](http://arrow.dit.ie/cgi/viewcontent.cgi?article=1018&context=argcon). It plays a sound from [freesound.org](http://freesound.org) when percussion is detected.

The [source code of TarsosDSP](https://github.com/JorenSix/TarsosDSP) is available on github.

### Presentation at Newline

Saturday the 25th of March TarsosDSP was presented at [Newline](http://0x20.be/Newline/Schedule), a small conference organized by [whitespace](http://0x20.be). Here you can download "the slides I used to present TarsosDSP":\[tarsosDSP_presentation.pdf\], I also created "an introductory text on sound and Java":\[sound_and_java.pdf\].

<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/_abJ00qHkXI?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/_abJ00qHkXI?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>


![Percussion detection](https://0110.be/files/photos/392/Percussion_Detector.png)

![UtterAsterisk](https://0110.be/files/photos/392/UtterAsterisk.png)

![Sound Detector](https://0110.be/files/photos/392/SoundDetector.png)

- [PitchDetector.jar](https://0110.be/files/attachments/392/PitchDetector.jar)

- [PercussionDetector.jar](https://0110.be/files/attachments/392/PercussionDetector.jar)

- [tarsosDSP\_presentation.pdf](https://0110.be/files/attachments/392/tarsosDSP_presentation.pdf)

- [sound\_and\_java.pdf](https://0110.be/files/attachments/392/sound_and_java.pdf)

- [UtterAsterisk.jar](https://0110.be/files/attachments/392/UtterAsterisk.jar)

- [SoundDetector.jar](https://0110.be/files/attachments/392/SoundDetector.jar)

---

## [Tarsos praktisch](https://0110.be/posts/Tarsos_praktisch.md)

- Published: 2011-03-21T13:54:41Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 397
- Canonical: https://0110.be/posts/Tarsos_praktisch

- Tags: [Dutch](https://0110.be/tags/Dutch.md), [HoGent](https://0110.be/tags/HoGent.md), [Tarsos](https://0110.be/tags/Tarsos.md)

### 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":\[tarsos_werking.pdf\]. 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](http://java.com). Daar zijn ook instructies te vinden hoe je Java kan installeren.

Met een werkende Java is Tarsos installeren eenvoudig: download [Tarsos](https://0110.be/attachment/tarsos.jar) 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":\[bach_BWV_1007_120.mp3\]

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](http://www.huygens-fokker.org/scala/).

### 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.


![](https://0110.be/files/photos/397/detect_tone_scale.png)

- [tarsos\_werking.pdf](https://0110.be/files/attachments/397/tarsos_werking.pdf)

- [bach\_BWV\_1007\_120.mp3](https://0110.be/files/attachments/397/bach_BWV_1007_120.mp3)

---

## [ARIP: Programma](https://0110.be/posts/ARIP%3A_Programma.md)

- Published: 2011-03-08T13:23:14Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 389
- Canonical: https://0110.be/posts/ARIP%3A_Programma

- Tags: [ARIP](https://0110.be/tags/ARIP.md), [Dutch](https://0110.be/tags/Dutch.md), [HoGent](https://0110.be/tags/HoGent.md), [Presentation](https://0110.be/tags/Presentation.md)

<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right;margin-left:5px;"/> Tijdens ARIP( Artistic Research in Progress) wordt Tarsos voorgesteld en kan het zelfs uitgetest worden. Volgens de [ARIP website](http://cons.hogent.be/nl/nieuws-en-agenda/nieuws/dag-van-het-onderzoek-arip-371) : *"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*.

<center>
<img src="https://0110.be/files/attachments/389/arip.jpg" alt="arip logo">

</center>


---

## [Tarsos at 'Lectures on Computational Ethnomusicology'](https://0110.be/posts/Tarsos_at_%27Lectures_on_Computational_Ethnomusicology%27.md)

- Published: 2011-02-24T13:09:23Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 385
- Canonical: https://0110.be/posts/Tarsos_at_%27Lectures_on_Computational_Ethnomusicology%27

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Presentation](https://0110.be/tags/Presentation.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right;margin-left:5px;"/> 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":\[2011-02-28_tarsos_at_izmir.pdf\] is available here.

Next to the interesting "programme":\[programme_lectures_on_comp_ethno_izmir.pdf\] it is a great opportunity to meet [Baris Bozkurt](http://web.iyte.edu.tr/~barisbozkurt/) who has been working on similar research but applied to [Makam music](http://likya.iyte.edu.tr/eee/labs/audio/Main.html).

On wednesday the second of March there is a small seminar at Electrical and Electronics Eng. Dept. of [İzmir Yüksek Teknoloji Enstitüsü](http://www.iyte.edu.tr/) where Tarsos will be presented also.


- [2011-02-28\_tarsos\_at\_izmir.pdf](https://0110.be/files/attachments/385/2011-02-28_tarsos_at_izmir.pdf)

- [2011-02-28-tarsos\_at\_izmir.odp](https://0110.be/files/attachments/385/2011-02-28-tarsos_at_izmir.odp)

- [programme\_lectures\_on\_comp\_ethno\_izmir.pdf](https://0110.be/files/attachments/385/programme_lectures_on_comp_ethno_izmir.pdf)

---

## [TarsosTranscoder](https://0110.be/posts/TarsosTranscoder.md)

- Published: 2011-02-09T13:17:34Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 382
- Canonical: https://0110.be/posts/TarsosTranscoder

- Tags: [HoGent](https://0110.be/tags/HoGent.md), [TarsosTranscoder](https://0110.be/tags/TarsosTranscoder.md)

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](http://ffmpeg.org/) 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](http://ant.apache.org/) and [git](http://git-scm.com/) installed on your system the following commands get you started quickly:

    <code>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
    </code>

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

<code>Transcoder.transcode("foo.mp3","foo.wav",DefaultAttributes.WAV_PCM_S16LE_STEREO_44KHZ);</code>

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:

-   MAC OS X 10.6

-   Windows 7

-   Ubuntu linux 10.10 ARM

-   Ubuntu Linux 10.04 x86_64

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](http://www.ffmpeg.org): this uses libraries from the FFmpeg project under the LGPLv2.1

This product includes software developed by [The Apache Software Foundation](http://www.apache.org/). It uses the Apache Commons Exec library, licensed under [the Apache License Version 2.0](http://commons.apache.org/exec/license.html)

TarsosTranscoder is used by [Tarsos](http://tarsos.0110.be), Tarsos is developed at University College Ghent, Faculty of Music


---

## [ARIP: Artistic Research In Progress](https://0110.be/posts/ARIP%3A_Artistic_Research_In_Progress.md)

- Published: 2011-02-01T10:35:52Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 386
- Canonical: https://0110.be/posts/ARIP%3A_Artistic_Research_In_Progress

- Tags: [ARIP](https://0110.be/tags/ARIP.md), [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Presentation](https://0110.be/tags/Presentation.md), [Research papers](https://0110.be/tags/Research%20papers.md), [Tarsos](https://0110.be/tags/Tarsos.md)

Voor ARIP (Artistic Research In Progress) heb ik een "artikel over Tarsos":\[arip.pdf\] 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](http://www.wergo.de/shop/en_UK/Audio_CDs/1000088/show,223736,n.html) te verkrijgen. Een fragment van 30 seconden is hier te beluisteren:

<object height="81" width="100%">
<param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F9912709%3Fsecret_token%3Ds-pZJk8&secret_url=true"></param> <param name="allowscriptaccess" value="always"></param> <embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F9912709%3Fsecret_token%3Ds-pZJk8&secret_url=true" type="application/x-shockwave-flash" width="100%"></embed> </object>

Het fragment kan je ook "downloaden":\[08.\_Ladrang_Kandamanyura_10s-20s.wav\] om zelf te analyseren met Tarsos.

Ladrang Kandamanyura (slendro pathet manyura) <br>\
Courtesy of: WERGO/Schott Music & Media, Mainz, Germany, [www.wergo.de](http://wergo.de) and Museum Collection Berlin <br>\
Lestari - The Hood Collection, Early Field Recordings from Java ([SM 1712 2](http://www.wergo.de/shop/en_UK/Audio_CDs/1000088/show,223736,n.html)) <br>\
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.

<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/1qJHAQgXS7I?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/1qJHAQgXS7I?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>


![Spectrogram](https://0110.be/files/photos/386/01_spectrogram.png)

![Annotaties](https://0110.be/files/photos/386/02_piano_roll.png)

![Ambitus](https://0110.be/files/photos/386/03_ambitus.png)

![Toonladder](https://0110.be/files/photos/386/04_tone_scale.png)

- [arip.doc](https://0110.be/files/attachments/386/arip.doc)

- [08.\_Ladrang\_Kandamanyura\_10s-20s.wav](https://0110.be/files/attachments/386/08._Ladrang_Kandamanyura_10s-20s.wav)

- [arip.pdf](https://0110.be/files/attachments/386/arip.pdf)

---

## [Tarsos Live - Real Time Tone Scale Analysis](https://0110.be/posts/Tarsos_Live_-_Real_Time_Tone_Scale_Analysis.md)

- Published: 2011-01-25T14:04:16Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 381
- Canonical: https://0110.be/posts/Tarsos_Live_-_Real_Time_Tone_Scale_Analysis

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right;margin-left:5px;"/>A 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:

<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/1qJHAQgXS7I?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/1qJHAQgXS7I?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>

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](http://cons.hogent.be/nl/onderzoek/onderzoeksprojecten/olmo-cornelis) and [Wannes Gonnissen](http://cons.hogent.be/nl/onderzoek/onderzoeksprojecten/wannes-gonnissen) for playing the thumb piano and Saz respectively.


---

## [Tarsos in het jaarboek Orpheus instituut](https://0110.be/posts/Tarsos_in_het_jaarboek_Orpheus_instituut.md)

- Published: 2011-01-14T14:54:35Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 380
- Canonical: https://0110.be/posts/Tarsos_in_het_jaarboek_Orpheus_instituut

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [Dutch](https://0110.be/tags/Dutch.md), [HoGent](https://0110.be/tags/HoGent.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Tarsos](https://0110.be/tags/Tarsos.md)

Naar jaarlijkse gewoonte wordt er in het [Orpheus instituut](http://www.orpheusinstituut.be/nl/home) de [Dag van het Artistiek onderzoek](http://www.orpheusinstituut.be/nl/seminaries/studiedagen-2010-2011#DAO) 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".

<div style="padding-left:2em;">
<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right;margin-left:5px;"/>Het 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.

<img style="float:left;margin-right:5px;" src="https://0110.be/attachment/cons/167/dataset_small.jpg" alt="dataset" class="bordered" height="96" width="104">In 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.

</div>


- [tarsos\_orpheus\_jaarboek.pdf](https://0110.be/files/attachments/380/tarsos_orpheus_jaarboek.pdf)

- [tarsos\_orpheus\_jaarboek.txt](https://0110.be/files/attachments/380/tarsos_orpheus_jaarboek.txt)

---

## [ Digital Music Research Network Workshop - Queen Mary University London](https://0110.be/posts/_Digital_Music_Research_Network_Workshop_-_Queen_Mary_University_London.md)

- Published: 2010-12-22T14:00:56Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 366
- Canonical: https://0110.be/posts/_Digital_Music_Research_Network_Workshop_-_Queen_Mary_University_London

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Research papers](https://0110.be/tags/Research%20papers.md), [featured](https://0110.be/tags/featured.md)

<img src="https://0110.be/files/attachments/366/queenmary.jpg"  alt="Queen Mary University Logo" style="float:right;margin-left:5px;"/>

Monday the 20th and Tuesday the 21th of December I attended two workshops at The Queen Mary University of London: [The Machine Listening Workshop](http://www.eecs.qmul.ac.uk/events/mlw/mlw2010/) and [Digital Music Research Network One-day Workshop 2010](http://www.elec.qmul.ac.uk/dmrn/events/dmrnp5/)

At the workshop I had an interesting meeting with Dan Tidhar. He researches harpsichord temperament estimation at QMUL (Queen Mary University of London). Together they created the [Tempest web service](http://www.isophonics.net/sawa/tempest/) 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](http://www.dynamictonality.com/2032), a tunable synthesizer with definable Harmonics. It elaborates on the ideas of Sethares about tone scales .


---

## [Latex  & Version Control Introduction](https://0110.be/posts/Latex__%26_Version_Control_Introduction.md)

- Published: 2010-11-30T08:56:17Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 365
- Canonical: https://0110.be/posts/Latex__%26_Version_Control_Introduction

- Tags: [HoGent](https://0110.be/tags/HoGent.md), [Presentation](https://0110.be/tags/Presentation.md)

<img src="https://0110.be/files/attachments/365/latex_icon.png"  alt="Latex Logo" style="float:right;margin-left:5px;"/>

Monday, I'll give a small presentation about Latex and Version Control for the research team at the [University College Gent, Faculty of Music](http://cons.hogent.be). The idea is to give a pragmatic overview of working with Latex and version control. The "presentation about Latex & Version control (in Dutch)":\[latex_svn_presentatie.pdf\] can be downloaded. The presentation itself is created using Latex and "the source of the presentation":\[latex_svn_presentatie.zip\] is also available. A good description of Latex can be found [here](http://swik.net/LaTeX):

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

-   [Practical Latex introduction course (in Dutch)](http://zeus.ugent.be/~gaspard/latex/)

-   [UGent Latex website](http://latex.ugent.be)

-   [WikiBook about Latex](http://en.wikibooks.org/wiki/Latex)

-   [Eclipse](http://eclipse.org): an IDE (Integrated Development Environment) which can be used as Latex editor with version control by installing the [TeXclipse](http://texlipse.sourceforge.net/) and [Subclipse](http://subclipse.tigris.org/) plugins.


- [latex\_svn\_presentatie.zip](https://0110.be/files/attachments/365/latex_svn_presentatie.zip)

- [latex\_icon.png](https://0110.be/files/attachments/365/latex_icon.png)

- [latex\_svn\_presentatie.pdf](https://0110.be/files/attachments/365/latex_svn_presentatie.pdf)

---

## [Seminar - Research on Music History and Analysis](https://0110.be/posts/Seminar_-_Research_on_Music_History_and_Analysis.md)

- Published: 2010-11-26T14:39:40Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 364
- Canonical: https://0110.be/posts/Seminar_-_Research_on_Music_History_and_Analysis

- Tags: [Computational musicology](https://0110.be/tags/Computational%20musicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Presentation](https://0110.be/tags/Presentation.md)

This post contains links to genuinely useful software to do signal based audio analysis.

-   [Sonic Visualizer](http://www.sonicvisualiser.org): As its name suggests Sonic Visualizer contains a lot different visualisations for audio. It can be used for analysis (pitch,beat,chroma,...) with [VAMP-plugins](http://vamp-plugins.org). To quote *"The aim of Sonic Visualiser is to be the first program you reach for when want to study a musical recording rather than simply listen to it"*. It is the swiss army knife of audio analysis.

-   [BeatRoot](http://www.eecs.qmul.ac.uk/~simond/beatroot/) is designed specifically for one goal: beat tracking. It can be used for e.g. comparing tempi of different performances of the same piece or to track tempo deviation within one piece.

-   [Tartini](http://tartini.net) is capable to do real-time pitch analysis of sound. You can e.g. play into a microphone with a violin and see the harmonics you produce and adapt you playing style based on visual feedback. It also contains a pitch deviation measuring apparatus to analyse vibrato.

-   [Tarsos](http://tarsos.0110.be) is software for tone scale analysis. It is useful to extract tone scales from audio. Different tuning systems can be seen, extracted and compared. It also contains the ability to play along with the original song with a tuned midi keyboard .

[Melodic Match](http://www.melodicmatch.com) is a different beast. It does not work on signal level but processes symbolic audio. More to the point it searches through MusicXML files - which can be created from MIDI-files. See its website for use cases. Melodic Match is only available for Windows.

During a lecture at the [University College Gent, Faculty of Music](http://cons.hogent.be) these tools were presented with some examples. "The slides (Slides in Dutch)":\[presentatie.pdf\] and "a zip-file with audio samples, slides and software":\[Tarsos-presentatie.zip\] are available for reference. Most of the time was given to Tarsos, the software we developed.

[Olmo Cornelis](http://webs.hogent.be/olmocornelis/) also gave a lecture about his own research and how Tarsos fits in the bigger picture. "His presentation (Slides in English)":\[lezing_Olmo_Cornelis_zonder_audio.ppt\] and "the presentation with audio":\[lezing_Olmo_Cornelis_met_audio.zip\] are also available here.


![Sonic Visualizer](https://0110.be/files/photos/364/Sonic_Visualizer.png)

![BeatRoot](https://0110.be/files/photos/364/BeatRoot.png)

![Tarsos](https://0110.be/files/photos/364/Tarsos.png)

![Tartini](https://0110.be/files/photos/364/tartini.png)

![Melodic Match](https://0110.be/files/photos/364/melodic_match.jpg)

- [presentatie.pdf](https://0110.be/files/attachments/364/presentatie.pdf)

- [Tarsos-presentatie.zip](https://0110.be/files/attachments/364/Tarsos-presentatie.zip)

- [lezing\_Olmo\_Cornelis\_zonder\_audio.ppt](https://0110.be/files/attachments/364/lezing_Olmo_Cornelis_zonder_audio.ppt)

- [lezing\_Olmo\_Cornelis\_met\_audio.zip](https://0110.be/files/attachments/364/lezing_Olmo_Cornelis_met_audio.zip)

---

## [Groovy Tarsos Scripting](https://0110.be/posts/Groovy_Tarsos_Scripting.md)

- Published: 2010-11-09T00:00:00Z
- Updated: 2020-11-17T09:12:42Z
- Author: Joren
- ID: 346
- Canonical: https://0110.be/posts/Groovy_Tarsos_Scripting

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="https://0110.be/files/attachments/346/medium.png"  alt="Groovy Logo" style="float:right"/>

There is more to Tarsos then meets te eye. The graphical user interface only exposes some functionality; the API (Application Programmer Interface) exposes all of Tarsos' capabilities.

Tarsos is programmed in Java so the API is accessible trough Java and other programming languages targeting the JVM (Java Virtual Machine) like JRuby, Scala and Groovy. The following examples use [the Groovy programming language](http://groovy.codehaus.org/) because I find it the most aesthetically pleasing with regards to interoperability and it gets the job done without getting in your way.

To run the examples a copy of the [Tarsos JAR-file](http://0110.be/releases/Tarsos) needs to be added to the Classpath and the Groovy runtime must be installed correctly. I'll leave this as an exercise for the reader: godspeed to you, brave soul. Quick protip: placing a copy of the jar in the extensions directory seems to work best, e.g. see [important java directories on mac OS X.](http://developer.apple.com/library/mac/#qa/qa2001/qa1170.html)

The first example extracts pitch class histograms from a bunch of files and saves them as EPS (Encapsulated PostScript)-files. It iterates a directory recursively and handles each file that matches a given regular expression. In this example the regular expression matches all WAV-files. Batch processing is one of those things scripting is ideal for, doing the same thing with the user interface would be tedious or even mind-numbingly boring, not groovy at all indeed.

\`\`\`ruby\
import be.hogent.tarsos.\*\
import be.hogent.tarsos.util.\*\
import be.hogent.tarsos.util.histogram.ToneScaleHistogram\
import be.hogent.tarsos.sampled.pitch.Annotation\
import be.hogent.tarsos.sampled.pitch.PitchDetectionMode

dir = "/home/joren/audio"

FileUtils.glob(dir,".\*.wav",true).each { file -\>\
audioFile = new AudioFile(file)\
pitchDetector = PitchDetectionMode.TARSOS_YIN.getPitchDetector(audioFile)\
pitchDetector.executePitchDetection()\
//get some annotations\
annotations = pitchDetector.getAnnotations()\
//create an ambitus and tone scale histogram\
ambitusHistogram = Annotation.ambitusHistogram(annotations)\
toneScaleHisto = ambitusHistogram.toneScaleHistogram()\
//plot a smoothed version of the histogram\
p = new SimplePlot()\
p.addData 0, toneScaleHisto.gaussianSmooth(0.2)\
p.save FileUtils.basename( file) + ".eps"\
}\
\`\`\`

The second example uses functionality that is currently only available trough the API. It takes a MIDI-file and synthesizes it to a wave file using an arbitrary scale. In this case 10-TET. The heavy-work is done by the [Gervill synthesizer](https://gervill.dev.java.net/). The resulting file is available for download, micro---macro?---tonal Bach is great: "BWV 1013 in 10-TET":\[BWV_1013_10-TET.mp3\]. The result of "an analysis with Tarsos on the synthesized audio":\[120.png\] clearly shows an interval of 120 cents with some deviations.

\`\`\`ruby\
import java.io.File\
import be.hogent.tarsos.midi.MidiToWavRenderer\
import be.hogent.tarsos.util.ScalaFile

midiFile = new File("BWV_1013.mid")\
outFile = new File("out.wav")

tuning = \[0,120,240,360,480,600,720,840,960,1080\] as double \[\]

MidiToWavRenderer renderer\
renderer = new MidiToWavRenderer()\
renderer.setTuning(tuning)\
renderer.createWavFile(midiFile, outFile)\
\`\`\`

An extended version of this second example script could be used to generate a dataset with audio and corresponding tone scale information on the fly. The dataset could then be used as a baseline.

The API is not yet well documented and is still in flux or more correctly: superflux. Note to self: I will provide documentation and a number of useful examples when the dust settles down. I'm not even sure if I will stick with Groovy. Scala has a nice Lispy feel to it and seems more developed. Groovy has a less steep learning curve, especially if you have some experience with Ruby. JRuby is also nice but the interoperability with legacy Java looks like an ugly hack.


![10-TET in Tarsos](https://0110.be/files/photos/346/120.png)

![EPS export as PNG](https://0110.be/files/photos/346/tone_scale_eps.png)

- [medium.png](https://0110.be/files/attachments/346/medium.png)

- [120.png](https://0110.be/files/attachments/346/120.png)

- [BWV\_1013\_10-TET.mp3](https://0110.be/files/attachments/346/BWV_1013_10-TET.mp3)

---

## [Tarsos Screencast](https://0110.be/posts/Tarsos_Screencast.md)

- Published: 2010-10-08T15:16:47Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 344
- Canonical: https://0110.be/posts/Tarsos_Screencast

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Tarsos](https://0110.be/tags/Tarsos.md)

<img src="http://tarsos.0110.be/attachment/cons/210/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right"/> This afternoon I created [a screencast showing the main features of Tarsos](http://www.youtube.com/watch?v=nzDdYvqgcOo). If everything goes well it should be visible below.

<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/nzDdYvqgcOo?version=3&fs=1&rel=0&ap=%2526fmt%3D22"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/nzDdYvqgcOo?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>

To give Tarsos a try you can <a href="https://0110.be/attachment/tarsos.jnlp">start Tarsos using JAVA WebStart</a> or download the [executable Tarsos JAR-file](https://0110.be/attachment/tarsos.jar). A JAVA 1.5 runtime is required.


---

## [Tarsos Presented at the "Perspectives for Computational Musicology" Symposium](https://0110.be/posts/Tarsos_Presented_at_the_%22Perspectives_for_Computational_Musicology%22_Symposium.md)

- Published: 2010-10-06T14:42:01Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 341
- Canonical: https://0110.be/posts/Tarsos_Presented_at_the_%22Perspectives_for_Computational_Musicology%22_Symposium

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Presentation](https://0110.be/tags/Presentation.md), [featured](https://0110.be/tags/featured.md)

<img src="https://0110.be/files/attachments/341/tarsos_logo_small.png"  alt="Tarsos Logo" style="float:right"/> Yesterday Tarsos was publicly presented at the symposium [Perspectives for Computational Musicology](https://www.meertens.knaw.nl/cms/nl/agenda-othermenu-70/143334-5-oktober-2010) in Amsterdam. The first public presentation of Tarsos, excluding this website. The symposium was organized by [the Meertens Institute](https://www.meertens.knaw.nl/cms/en) on the occasion of Peter van Kranenburg's PhD defense.

The presentation included a live demo of a daily build of Tarsos (a Friday evening build) which worked, surprisingly, without hiccups. The presentation was done by [Olmo Cornelis](http://cons.hogent.be/nl/onderzoek/onderzoeksprojecten/olmo-cornelis/bio). This was the small introduction:

> **Tarsos - a Platform for Pitch Analysis of Ethnic Music**<br/>\
> Ethnic music is a vulnerable cultural heritage that has received only recently more attention within the Music Information Retrieval community. However, access to ethnic music remains problematic, as this music does not always correspond to the Western concepts of music and metadata that underlie the currently available content-based methods. During this lecture, we like to present our current research on pitch analysis of African music. TARSOS, a platform for analysis, will be presented as a powerful tool that can describe and compare scales with great detail.

To give Tarsos a try ou can <a href="https://0110.be/attachment/tarsos.jnlp">start Tarsos using JAVA WebStart</a> or download the [executable Tarsos JAR-file](https://0110.be/attachment/tarsos.jar). A JAVA 1.5 runtime is required.


---

## [Tarsos User Interface Prototype](https://0110.be/posts/Tarsos_User_Interface_Prototype.md)

- Published: 2010-08-30T13:33:20Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 345
- Canonical: https://0110.be/posts/Tarsos_User_Interface_Prototype

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

Tarsos now has an easy to use drag and drop User Interface. It can be used to extract tone scale information from audio files.

<a href="https://0110.be/attachment/tarsos.jnlp">Start tarsos using JAVA WebStart.</a>

Drag and drop works for scala tone scale files and different kinds of audio files. Audiofiles are transcoded automagically using an embedded ffmpeg binary which is platform dependend. It works on linux and windows, on other platforms only WAV files are supported.

Some of the current features:

-   Scala file extraction from audio

-   Real time pitch tracking

-   Real time pitch class histogram visualization

-   Alignment of pitch intervals with histogram using mouse dragging

-   MIDI Tuning messages based on scala files.

-   Histogram smoothing functions

-   ... a lot more is available under the hood.


![Analysis](https://0110.be/files/photos/345/ui.png)

![Browser](https://0110.be/files/photos/345/browser.png)

---

## [Rendering MIDI Using Arbitrary Tone Scales](https://0110.be/posts/Rendering_MIDI_Using_Arbitrary_Tone_Scales.md)

- Published: 2010-06-29T12:58:41Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 334
- Canonical: https://0110.be/posts/Rendering_MIDI_Using_Arbitrary_Tone_Scales

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

<img src="http://tarsos.0110.be/photo/cache/x96-e52dd.120_Cents_difference.bach_120.png?1277822210"  style="float:right"/>

Tarsos can be used to render MIDI files to audio (WAV) files using arbitrary tone scales. This functionallity can be used to (automatically) verify tone scale extraction from audio files. Since I could not find a dataset with audio and corresponding tone scales creating one using MIDI seemed a good idea.

MIDI files can be found in spades, tone scales on the other hand are harder to find. Luckily there is one massive source, the [Scala Tone Scale Archive](http://www.huygens-fokker.org/scala/downloads.html#scales): *A large collection of over 3700 tone scales*.

Using Scala tone scale files and a midi files a *Tone Scale - Audio* dataset can be generated. The quality of the audio depends on the (software) synthesizer and the [SoundFont](http://en.wikipedia.org/wiki/SoundFont) used. Tarsos currently uses the [Gervill synthesizer](https://gervill.dev.java.net/). Gervill is a pure Java software synthesizer with support for 24bit SoundFonts and the MIDI tuning standard.\
<br/>

### How To Render MIDI Using Arbitrary Tone Scales with Tarsos

A recent version of the JRE (Java Runtime Environment) needs to be installed on your system if you want to use Tarsos. Tarsos itself can be downloaded in the form of the "Tarsos JAR Package":\[tarsos.jar\].

Currently Tarsos has a Command Line Interface. An example with the files you can find attached:

\`\`\`ruby\
java -jar tarsos.jar ---midi BWV_1007.mid ---scala 120.scl ---out bach.wav\
\`\`\`

The result of this command should yield an audio file that sounds like "the cello suites of bach in a nonsensical tone scale with steps of 120 cents":\[bach_BWV_1007_120.mp3\]. Executing tone scale extraction on the generated audo yields the expected result. In <a href="https://0110.be/article/view_photo/1734?page=1" rel="tiny-show">the pich class histogram</a> every 120 cents a peak can be found.

To summarize: by rendering audio with MIDI and Scala tone scale files a dataset with tone scale - audio information can be generated and tone scale extraction algorithms can be tested on the fly.

This method also has some limitations. Because audio is rendered there is no (background) noise, no fluctuations in pitch and timbre,... all of which are present in recorded audio. So testing testing tone scale extraction algorithms on recorded audio remains advised.


![120 Cents difference](https://0110.be/files/photos/334/bach_120.png)

- [bach\_BWV\_1007\_120.mp3](https://0110.be/files/attachments/334/bach_BWV_1007_120.mp3)

- [120.scl.txt](https://0110.be/files/attachments/334/120.scl.txt)

- [BWV\_1007.mid](https://0110.be/files/attachments/334/BWV_1007.mid)

- [tarsos.jar](https://0110.be/files/attachments/334/tarsos.jar)

---

## [Reproduction of speech using MIDI](https://0110.be/posts/Reproduction_of_speech_using_MIDI.md)

- Published: 2010-06-24T15:26:56Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 361
- Canonical: https://0110.be/posts/Reproduction_of_speech_using_MIDI

- Tags: [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md)

Tarsos is now capable of reproducing *speech* using MIDI. The idea to convert speech into MIDI comes from [the blog of Corban Brook](http://weare.buildingsky.net/2009/10/08/mechanical-reproduction-of-digitized-speech-on-a-piano) where the following video can be found, actually a work by [Peter Ablinger](http://ablinger.mur.at/voices_and_piano.html):

<object width="640" height="385">
<param name="movie" value="http://www.youtube.com/v/muCPjK4nGY4&color1=0xb1b1b1&color2=0xd0d0d0&hl=nl_NL&feature=player_detailpage&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/muCPjK4nGY4&color1=0xb1b1b1&color2=0xd0d0d0&hl=nl_NL&feature=player_detailpage&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="385"></embed></object>

Another example of music inspired by speech is this interview with Louis Van Gaal:

<object style="height: 344px; width: 425px">
<param name="movie" value="http://www.youtube.com/v/BDxvRfCNmQY"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/BDxvRfCNmQY" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></object>

Tarsos sends out midi data based on an FFT analysis of the signal. It maps the spectrogram to MIDI Messages and uses the power spectrum to calculate the velocity of each note on message.

The implementation can run in real-time but the output has some delay: the FFT calculation, constructing MIDI messages, calculating velocity, synthesizing sound, ... is not instantaneous.

To use this capability Tarsos supports the following syntax. If a MIDI file is given the MIDI messages are written to the file. If an audio file is given Tarsos uses the audio as input. If the `--pitch` switch is used only the F0 is considered to construct MIDI messages instead of a complete FFT.

\`\`\`ruby\
java -jar tarsos.jar pitch_to_midi \[---pitch\] \[midi_out.midi\] \[audio_in.wav\]\
\`\`\`


- [ttm.mp3](https://0110.be/files/attachments/361/ttm.mp3)

- [ttm.midi](https://0110.be/files/attachments/361/ttm.midi)

- [sitting\_in\_a\_room.mp3](https://0110.be/files/attachments/361/sitting_in_a_room.mp3)

- [sitting\_in\_a\_room.midi](https://0110.be/files/attachments/361/sitting_in_a_room.midi)

- [tarsos.jar](https://0110.be/files/attachments/361/tarsos.jar)

---

## [Tone Scale Matching With Tarsos](https://0110.be/posts/Tone_Scale_Matching_With_Tarsos.md)

- Published: 2010-06-14T13:37:29Z
- Updated: 2013-12-05T18:19:15Z
- Author: Joren
- ID: 357
- Canonical: https://0110.be/posts/Tone_Scale_Matching_With_Tarsos

- Tags: [Computational ethnomusicology](https://0110.be/tags/Computational%20ethnomusicology.md), [HoGent](https://0110.be/tags/HoGent.md), [Music Information Retrieval](https://0110.be/tags/Music%20Information%20Retrieval.md), [Tarsos](https://0110.be/tags/Tarsos.md), [featured](https://0110.be/tags/featured.md)

*Tarsos can be used to search for music that uses a certain tone scale or tone interval(s). Tone scales can be defined by a Scala tone scale file or an exemplifying audio file. This text explains how you can use Tarsos for this task.*

### Search Using Scala Tone Scale Files

<img src="https://0110.be/files/attachments/357/data_flow_scala.png" style="float:left;margin:10px" />

Scala files are text files with information about a tone scale. It is used to share and exchange tone scales. The file format originates from the [Scala program](http://www.huygens-fokker.org/scala/) :

> Scala is a powerful software tool for experimentation with musical tunings, such as just intonation scales, equal and historical temperaments, microtonal and macrotonal scales, and non-Western scales. It supports scale creation, editing, comparison, analysis, ...

The Scala file format is popular because there is a [library with more than 3000 tone scales](http://www.huygens-fokker.org/scala/downloads.html#scales) available on the Scala website.

Tarsos also understands Scala files. It is able to create a pitch class histogram using a gaussian mixture model. A technique described in *A. C. Gedik, B.Bozkurt, 2010, "Pitch Frequency Histogram Based Music Information Retrieval for Turkish Music ", Signal Processing, vol.10, pp.1049-1063. (doi:10.106/j.sigpro.2009.06.017)*.

An example should make things clear. Lets search for an interval of 300 cents or exactly three semitones. A scala file with this interval is easy to define:

\`\`\`ruby\
! example.scl\
! An example of a tone interval of 300 cents\
Tone interval of 300 cents\
2\
!\
900\
1200.0\
\`\`\`

The next step is to create <a href="https://0110.be/article/view_photo/1732?page=4" rel="tiny-show">a histogram with an interval of 300 cents</a>. In the block diagram this step is called "Peak histogram creation". The Similarity calculation step expects a list of histograms to compare with the newly defined histogram. Feeding the similarity calculation with the western12ET tone scale and a pentatonic Indonesian Slendro tone scale shows that a 300 cents interval is used in the western tone scale but is not available in the Slendro tone scale.

This example only uses scala files, creating histograms is actually not needed: calculating intervals can be done using the scala file itself. This changes when audio files are compared with each other or with scala files.

### Search Using Audio Files

<img src="https://0110.be/files/attachments/357/data_flow_audio.png" style="float:right;margin:10px" />

When audio files are fed to the algorithm additional steps need to be taken.

1.  First of all pitch detection is executed on the audio file. Currently two pitch extractors are implemented in pure Java, it is also possible to use an external pitch extractor such as [aubio](http://aubio.org)

2.  Using pitch annotations a Pitch Histogram is created.

3.  Peak detection on the Pitch Histogram results in a number of peaks, these should represent the distinct pitch classes used in the musical piece.

4.  With the pitch classes a clean peak histogram is created during the Peak Histogram construction phase.

5.  Finally the Peak histogram is matched with other histograms.

The last two steps are the same for audio files or scala files.

Using real audio files can cause <a href="http://tarsos.0110.be/article/view_photo/1732?page=6" rel="tiny-show">*dirty* histograms</a>. Determining how many distinct pitch classes are used is no trivial task, even for an expert (human) listener. Tarsos should provide a semi-automatic way of peak extraction: a best guess by an algorithm that can easily be corrected by a user. For the moment Tarsos does not allow manual intervention.

### Tarsos

To use tarsos you need a recent java runtime (1.6) and the following command line arguments:

\`\`\`ruby\
java -jar tarsos.jar rank ---detector TARSOS_MPM\
---needle audio.wav ---haystack scala.scl other_audio.wav other_scala_file.scl\
\`\`\`

<div style="clear:both">
</div>


![Data flow audio](https://0110.be/files/photos/357/data_flow_audio.png)

![Data flow scala](https://0110.be/files/photos/357/data_flow_scala.png)

![300 cents interval](https://0110.be/files/photos/357/300_cents_interval.png)

![12ET and 300 cents](https://0110.be/files/photos/357/12ET_300.png)

![Slendro and 300 cents](https://0110.be/files/photos/357/Slendro_300.png)

![Realistic Tone scale](https://0110.be/files/photos/357/real_tone_scale.png)

- [data\_flow\_scala.png](https://0110.be/files/attachments/357/data_flow_scala.png)

- [data\_flow\_audio.png](https://0110.be/files/attachments/357/data_flow_audio.png)

- [tarsos.jar](https://0110.be/files/attachments/357/tarsos.jar)

---

## [Static Code Analysis For Java Using Eclipse](https://0110.be/posts/Static_Code_Analysis_For_Java_Using_Eclipse.md)

- Published: 2010-06-03T00:00:00Z
- Updated: 2020-11-17T09:04:00Z
- Author: Joren
- ID: 358
- Canonical: https://0110.be/posts/Static_Code_Analysis_For_Java_Using_Eclipse

- Tags: [Code](https://0110.be/tags/Code.md), [HoGent](https://0110.be/tags/HoGent.md), [Java](https://0110.be/tags/Java.md), [featured](https://0110.be/tags/featured.md)

This post is about the tools I use to keep the source code of [Tarsos](http://0110.be) reasonably clean, consistent and readable. Static code analysis can be of great help if you want to maintain strict coding standards and follow language idioms. Some of the [patterns they can detect for you](http://pmd.sourceforge.net/):

-   Dead code - unused variables, parameters, methods

-   Suboptimal code - wasteful resource usage

-   Overcomplicated expressions - unnecessary if statements, for loops that could be while loops

-   Duplicate code - copied/pasted code is a code smell.

-   Formatting inconsistencies, e.g. variable modifier order

And even more subtle, but equally important:

-   Resource management: is a resource handled (closed) correctly on all possible code paths?

-   Abstraction level: is it needed to expose the concrete type of an object or could an (abstract) supertype or even an interface be used instead?

-   ...

In a previous life I used .NET and the static code analysis tools FxCop & StyleCop. FxCop operates on bytecode (or intermediate language in .NET parlance) level, StyleCop analyses the source code itself. Tarsos uses JAVA so I looked for JAVA alternatives and found a few.

-   PMD & Checkstyle both operate on source code level.

-   FindBugs operates on bytecode level.

On freesoftwaremagazine.com there is an [article series on JAVA static code analysis software](http://www.freesoftwaremagazine.com/columns/destroy_annoying_bugs_part_1). It covers PMD and FixBugs and integration in Eclipse. It does not cover Checkstyle. Checkstyle is essentialy the same as PMD but it is better integrated in eclipse: it checks code on save and uses the standard 'Problems' interface, PMD does not.

To fix problems *Eclipse save actions* can save you some time. IBM has an article on [how to keep your code clean using Eclipse](http://www.ibm.com/developerworks/library/os-eclipse-clean/).

Continuous testing is also a really nice thing to have: detecting unexpected behavior while refactoring/programming can prevent unnecessary bug hunts. A [video about immediate feedback using continuous testing](http://improvingworks.com/products/infinitest/) makes this clear.

Another tip is a more philosophical one: making your code and code revisions publicly available makes you think twice before implementing (and subsequently publishing) a quick and dirty hack. Tarsos is available on github.

## References

-   [FxCop](http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx) & [StyleCop](http://code.msdn.microsoft.com/sourceanalysis)

-   [Checkstyle](http://checkstyle.sourceforge.net/)

-   [Find bugs](http://findbugs.sourceforge.net/)

-   [PDM](http://pmd.sourceforge.net/)

-   [Infinitest](http://improvingworks.com/products/infinitest/)

-   [Github](http://github.com)


![PMD](https://0110.be/files/photos/358/pmd.png)

![Checkstyle](https://0110.be/files/photos/358/checkstyle.png)

---

[Newer posts](https://0110.be/index.md?page=5)

[Older posts](https://0110.be/index.md?page=7)
