commit b2fadd15450be0af482e5e250d809d7d91b32eca
parent 90ba0321f7cef41d331cbe9f9b120b58c0cd980e
Author: CarlSouthall <[email protected]>
Date: Mon, 3 Jul 2017 23:05:29 +0100
notes update
Diffstat:
3 files changed, 35 insertions(+), 49 deletions(-)
diff --git a/README.md b/README.md
@@ -11,27 +11,19 @@ This library is published under the BSD license which allows redistribution and
#### Required Packages
• [numpy](https://www.numpy.org)
-• [scipy](https://www.scipy.org)
-• [cython](https://www.cython.org)
+• [scipy](https://www.scipy.org)
• [madmom](https://github.com/CPJKU/madmom)
• [tensorflow](https://www.tensorflow.org/)
-The easiest and suggested method to install the libary is to use pip.
+The easiest and suggested method to install the library is to use pip.
pip install ADTLib
-To update the libary use
+To update the library use
pip install --upgrade ADTlib
-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]
+For further install information see the [install](https://github.com/CarlSouthall/ADTLib/blob/master/install.md) page.
## Usage
@@ -41,16 +33,16 @@ Algorithms contained within the library are both available as functions for use
#### Command line
- ADTBDRNN DrumFile1.wav DrumFile2.wav
+ ADT DrumFile1.wav DrumFile2.wav
#### Python function
```Python
-from ADTLib.models import ADTBDRNN
+from ADTLib import ADT
TrackNames=['DrumFile1.wav','DrumFile2.wav']
-out=ADTBDRNN(TrackNames)
+out=ADT(TrackNames)
```
See the [usage](https://github.com/CarlSouthall/ADTLib/blob/master/usage.md) page for more information.
diff --git a/install.md b/install.md
@@ -10,7 +10,6 @@ ADTLib requires the following packages to already be installed:
• [numpy](https://www.numpy.org)
• [scipy](https://www.scipy.org)
-• [cython](https://www.cython.org)
• [madmom](https://github.com/CPJKU/madmom)
• [tensorflow](https://www.tensorflow.org/)
diff --git a/usage.md b/usage.md
@@ -1,22 +1,15 @@
#Usage
-This file contains infromation 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.
+This file contains infromation regarding using the toolbox.
###Command line
- ADT [-h] [-od {None,dir}] [-o {yes,no}] [-ot {yes,no}] [I [I ...]]
+ ADT [-h] [-c {'DrumSolo','DrumMixture','MultiInstrumentMixture'}] [-od {None,dir}] [-o {yes,no}] [-ot {yes,no}] [I [I ...]]
| Flag | Name | Description | Default setting |
| ---- | ------- | ----- | ------ |
-| -h | help | displays help file | n/a |
+| -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|
@@ -26,48 +19,50 @@ Output: kick, snare, hihat onsets in seconds.
ADT 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.
+
ADT 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
-ADTBDRNN(TrackNames, out_sort='time',ret='yes', out_text='no', savedir='current',close_error=0.05,lambd=[9.7,9.9,4.9])
+
+Onsets=ADT(filenames, context='DrumSolo',text='yes',tab='yes',save_dir=None):
+
```
| Name | Description | Default setting |
| ------- | ----- | ------ |
-| 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 |
+| 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 |
#####Examples
```Python
-from ADTLib.models import ADTBDRNN
+from ADTLib import ADT
-Filenames='Drumfile.wav'
-X=ADTBDRNN(Filenames)
+Filenames=['Drumfile.wav']
+Onsets=ADT(Filenames)
```
-Output stored in variable X ordered by time.
-
+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.
+
+
```Python
-from ADTLib.models import ADTBDRNN
+from ADTLib import ADT
Filenames=['Drumfile.wav','Drumfile1.wav']
-ADTBDRNN(Filenames,out_sort='instrument',ret='no',out_text='yes',savedir='Desktop')
+Onsets=ADT(Filenames, context='DrumSolo', text='no', tab='yes', save_dir='~/Desktop')
```
-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.