ADTLib

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 034f378faae12c4c01ab5454a4dd3535ca544b84
parent 8723060d2db02cf569752eaae7f0f55bb1b5a4ff
Author: CarlSouthall <c-southall@live.co.uk>
Date:   Tue, 29 Aug 2017 14:39:04 +0100

usage

Diffstat:
MREADME.md | 22+++++++++++++++-------
Musage.md | 74++++++++++++++++++++++++++++++++++++++++----------------------------------
2 files changed, 55 insertions(+), 41 deletions(-)

diff --git a/README.md b/README.md @@ -11,19 +11,27 @@ This library is published under the BSD license which allows redistribution and #### Required Packages • [numpy](https://www.numpy.org) -• [scipy](https://www.scipy.org) +• [scipy](https://www.scipy.org) +• [cython](https://www.cython.org) • [madmom](https://github.com/CPJKU/madmom) • [tensorflow](https://www.tensorflow.org/) -The easiest and suggested method to install the library is to use pip. +The easiest and suggested method to install the libary is to use pip. pip install ADTLib -To update the library use +To update the libary use pip install --upgrade ADTlib -For further install information see the [install](https://github.com/CarlSouthall/ADTLib/blob/master/install.md) page. +For futher install information see the [install](https://github.com/CarlSouthall/ADTLib/blob/master/install.md) page. + + +## Algorithms + +The algorithms that are currently contained within the libary are: + +• ADTBDRNN: Bi-directional architecture outlined in [1] ## Usage @@ -33,16 +41,16 @@ Algorithms contained within the library are both available as functions for use #### Command line - ADT DrumFile1.wav DrumFile2.wav + ADTBDRNN DrumFile1.wav DrumFile2.wav #### Python function ```Python -from ADTLib import ADT +from ADTLib.models import ADTBDRNN TrackNames=['DrumFile1.wav','DrumFile2.wav'] -out=ADT(TrackNames) +out=ADTBDRNN(TrackNames) ``` See the [usage](https://github.com/CarlSouthall/ADTLib/blob/master/usage.md) page for more information. diff --git a/usage.md b/usage.md @@ -1,68 +1,74 @@ #Usage -This file contains infromation regarding using the toolbox. +This file contains information regarding using the algorithms within the toolbox. +##ADTBDRNN + +ADT architecture defined in [1]. + +Input: wavfiles names along with control parameters + +Output: kick, snare, hihat onsets in seconds. + ###Command line - ADT [-h] [-c {'DrumSolo','DrumMixture','MultiInstrumentMixture'}] [-od {None,dir}] [-o {yes,no}] [-ot {yes,no}] [I [I ...]] + ADT [-h] [-os] [-od] [-p] [-ot] [I [I ...]] | Flag | Name | Description | Default setting | | ---- | ------- | ----- | ------ | -| -h | help | displays help file | n/a | -| -c | context | defines the context ('DrumSolo', 'DrumMixture','MultiInstrumentMixture' ) | 'DrumSolo' | -| -od | output_dir | location output textfiles are saved | None | -| -o | output_text | defines whether the output is stored in a textfile or not | yes | -| -ot | output_tab | defines whether a tabulature is created and saved to a pdf | yes| -| I | input_file_names| single or list of wav file names seperated by spaces | n/a | +| -h | help | displays help file | n/a | +| -os | output_sort | defines configuration of the output | time | +| -od | output_dir | location output textfiles are saved | current | +| -p | print | defines whether the output is displayed in the terminal or not | yes | +| -ot | output_text | defines whether the output is stored in a textfile or not | yes| +| I | input_file_names| single or list of wav file names separated by spaces | n/a | #####Examples - ADT Drum.wav + ADTBDRNN Drum.wav -Perform ADT on a single audio file. Saves onset times to a text file in the current directory. Creates a drum tabulature and saves it as a pdf in the current directory. + ADTBDRNN Drum.wav Drum1.wav Drum2.wav - ADT Drum.wav Drum1.wav Drum2.wav + ADTBDRNN -od ~/Desktop -o no -ot yes Drum.wav Drum1.wav Drum2.wav -Perform ADT on multiple audio files. Saves onset times to a text file in the current directory. Creates a drum tabulature and saves it as a pdf in the current directory. - - ADT -od ~/Desktop -o no -ot yes Drum.wav Drum1.wav Drum2.wav + Output ordered by time printed to a text file in current directory and printed in terminal + + ADTBDRNN -os instrument -od ~/Desktop -p no -ot yes Drum.wav DrumFile1.wav DrumFile2.wav + + Output ordered by instrument printed to a text file on the desktop. -Perform ADT on multiple audio files. Create a drum tabulature and saves it to the Desktop. ###Python function - - ```Python - -Onsets=ADT(filenames, context='DrumSolo',text='yes',tab='yes',save_dir=None) - +ADTBDRNN(TrackNames, out_sort='time',ret='yes', out_text='no', savedir='current',close_error=0.05,lambd=[9.7,9.9,4.9]) ``` | Name | Description | Default setting | | ------- | ----- | ------ | -| filenames | Drum.wav files, must be in a list. | n/a | -| context | defines the context ('DrumSolo', 'DrumMixture','MultiInstrumentMixture' ) | 'DrumSolo' | -| text | defines whether the output is stored in a textfile or not ('yes','no' ) | 'yes' | -| tab | defines whether a tabulature is created and saved to a pdf ('yes','no' ) | 'yes' | -| save_dir | location output textfiles are saved ('None' (saves in current dir), dir) | None | +| TrackNames | Drum.wav files, must be in a list if more than one. | n/a | +| out_sort | defines configuration of the output | time | +| savedir | location output textfiles are saved | current| +| ret | defines whether the output is returned from the function | yes| +| out_text | defines whether the ouput is stored in a textfile or not | no| +| close_error| Maximum distance between two onsets without onsets being combined, in seconds. | 0.05 | +| lambd| Value used for each instrument within the peak picking stage | 9.7 9.9 9.4 | #####Examples ```Python -from ADTLib import ADT +from ADTLib.models import ADTBDRNN -Filenames=['Drumfile.wav'] -Onsets=ADT(Filenames) +Filenames='Drumfile.wav' +X=ADTBDRNN(Filenames) ``` -Perform ADT on a single audio file. Saves onset times to a text file in the current directory. Creates a drum tabulature and saves it as a pdf in the current directory. Returns onset times per instrument. - - +Output stored in variable X ordered by time. + ```Python -from ADTLib import ADT +from ADTLib.models import ADTBDRNN Filenames=['Drumfile.wav','Drumfile1.wav'] -Onsets=ADT(Filenames, context='DrumSolo', text='no', tab='yes', save_dir='~/Desktop') +ADTBDRNN(Filenames,out_sort='instrument',ret='no',out_text='yes',savedir='Desktop') ``` -Perform ADT on multiple audio files. Create a drum tabulature and saves it to the Desktop. +Output ordered by instrument printed to a text file on the desktop.