WaoN
is a Wave-to-Notes transcriber


What's new?

What is WaoN?

WaoN is a Wave-to-Notes transcriber, that is, the inverse of timidity by Tuukka Toivonen (and its descendants timidity++). ("WaoN" also has a meaning of harmony of notes or chord in Japanese!) My original intention is to pick up voicing of harmony from sound of my favorite pianists. (I have no talent to do so, but computer will :-) But there is no functional application of this kind on Unix platform, as far as I know. So I began writing this WaoN by myself.

Currently, WaoN contains three programs:

WaoN is released under the GNU General Public License. Here is the Project Page @ SF.

Demo

Features

Platform

I believe that WaoN is able to be built on any platforms.
I am developing this project currently on Mac OS X (and, before that, on FreeBSD).

Currently, (to my knowledge) there are some packages:

Since version 0.11, Win32 binaries (built on MinGW) are ready.

Formats

WaoN's native format as sound-input is WAV, and that as note-output is standard MIDI format 0. If you have SoX, you can use almost all sound format as input. In addition, if you have timidity or some midi player which could read standard MIDI file from stdin, you can play resultant midi file on time. See also Tips.

Screenshot ("WaoN" is not a GUI application but ... :-)

help

$ ./waon --help
WaoN - a Wave-to-Notes transcriber, Version 0.11

Copyright (C) 1998-2013 Kengo Ichiki >kengoichiki@gmail.com>
Web: http://kichiki.github.com/WaoN/

WaoN is a Wave-to-Notes transcriber,
that is, a converter from sound file to midi file.

Usage: ./waon [option ...]

Options:
  -h --help	print this help.
  -v, --version	print version information.
OPTIONS FOR FILES
  -i --input	input wav file (default: stdin)
  -o --output	output mid file (default: 'output.mid')
	options -i and -o have argument '-' as stdin/stdout
  -p --patch	patch file (default: no patch)
FFT OPTIONS
  -n		sampling number from WAV in 1 step (default: 2048)
  -w --window	0 no window
		1 parzen window
		2 welch window
		3 hanning window (default)
		4 hamming window
		5 blackman window
		6 steeper 30-dB/octave rolloff window
READING WAV OPTIONS
  -s --shift	shift number from WAV in 1 step
		(default: 1/4 of the value in -n option)
PHASE-VOCODER OPTIONS
  -nophase	don't use phase diff to improve freq estimation.
		(default: use the correction)
NOTE SELECTION OPTIONS
  -c --cutoff	log10 of cut-off ratio to scale velocity of note
		(default: -5.0)
  -r --relative	log10 of cut-off ratio relative to the average.
		(default: no relative cutoff
		= absolute cutoff with the value in -c option)
  -k --peak	peak threshold for note-on, which ranges [0,127]
		(default: 128 = no peak-search = search only first on-event)
  -t --top	top note [midi #] (default: 103 = G7)
  -b --bottom	bottom note [midi #] (default: 28 = E1)
	Here middle C (261 Hz) = C4 = midi 60. Midi # ranges [0,127].
  -a --adjust	adjust-pitch param, which is suggested by WaoN after analysis.
		unit is half-note, that is, +1 is half-note up,
		and -0.5 is quater-note down. (default: 0)
DRUM-REMOVAL OPTIONS
  -psub-n	number of averaging bins in one side.
		that is, for n, (i-n,...,i,...,i+n) are averaged
		(default: 0)
  -psub-f	factor to the average, where the power is modified as
		p[i] = (sqrt(p[i]) - f * sqrt(ave[i]))^2
		(default: 0.0)
OCTAVE-REMOVAL OPTIONS
  -oct	factor to the octave removal, where the power is modified as
		p[i] = (sqrt(p[i]) - f * sqrt(oct[i]))^2
		(default: 0.0)

Tips

I think that the default setting (2048 samples for FFT, no window, etc) is enough to judge how "WaoN" works.

Here are some more tips.

Ex.1) if you need more resolution in time, use -s (--shift) option as follows.
$ ./waon -i waltz4DB.wav -o waltz4DB.mid -w 3 -n 4096 -s 2048
Ex.2) you can use stdin and stdout, so that you can use timidity to play resultant midi file on time.
$ cat dolphineD.wav | ./waon -i - -o - | timidity -id -
Ex.3) if you want to analyse MP3,
 $ mpg123 -m -s reflectD.mp3\
   | sox -t raw -r 44100 -s -w - -t wav -\
   | ./waon -i -
or
 $ sox ~/MP3/Mulgrew.mp3 -t wav -\
   | ./waon -i - -n 4096 -s 1024
  

Download

Changes

Installation

To install the program "waon",

  1. take a look at "Makefile" and edit it if necessary.
  2. invoke "make waon", for example.
  3. you'll see an excutable "waon". copy it wherever you want.
  4. install man page "waon.1".

note: for DEC users, the following site would be useful; The DECWindows Archive - Audio and Sound by pmoreau@cena.dgac.fr

Library

For "waon", you need FFTW library and libsndfile.

BUGS

  1. -

TODO

  1. improve algorithms -- partly done by phase vocoder technique. current focus is on time-domain.
  2. give some examples and instructions.

Links

Useful sites

Similar projects

History