commit 5cf63feebe6d55b0385484dabb97cd941819cfd7
parent c065ad664df8ca9487cfc9af9c8ca749b123b4f3
Author: CarlSouthall <c-southall@live.co.uk>
Date: Wed, 17 Jan 2018 17:33:54 +0000
output activation functions switch
Diffstat:
7 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/ADTLib.egg-info/PKG-INFO b/ADTLib.egg-info/PKG-INFO
@@ -1,12 +1,13 @@
Metadata-Version: 1.1
Name: ADTLib
-Version: 0.8
+Version: 2.1.2
Summary: Automated Drum Trancription Library
Home-page: https://github.com/CarlSouthall/ADTLib
Author: Carl Southall
-Author-email: c-southall@live.co.uk
+Author-email: carl.southall@bcu.ac.uk
License: BSD
Download-URL: https://github.com/CarlSouthall/ADTLib
+Description-Content-Type: UNKNOWN
Description: UNKNOWN
Keywords: Drums,Transcription,Automated
Platform: UNKNOWN
diff --git a/ADTLib.egg-info/SOURCES.txt b/ADTLib.egg-info/SOURCES.txt
@@ -1,3 +1,4 @@
+README.md
setup.cfg
setup.py
ADTLib/__init__.py
@@ -6,13 +7,15 @@ ADTLib.egg-info/SOURCES.txt
ADTLib.egg-info/dependency_links.txt
ADTLib.egg-info/requires.txt
ADTLib.egg-info/top_level.txt
-ADTLib/models/__init__.py
-ADTLib/nn/__init__.py
-ADTLib/nn/NNFiles/BDHAll-1000
-ADTLib/nn/NNFiles/BDHAll-1000.meta
-ADTLib/nn/NNFiles/BDKAll-1000
-ADTLib/nn/NNFiles/BDKAll-1000.meta
-ADTLib/nn/NNFiles/BDSAll-1000
-ADTLib/nn/NNFiles/BDSAll-1000.meta
+ADTLib/files/HihatADTLibAll.data-00000-of-00001
+ADTLib/files/HihatADTLibAll.index
+ADTLib/files/HihatADTLibAll.meta
+ADTLib/files/KickADTLibAll.data-00000-of-00001
+ADTLib/files/KickADTLibAll.index
+ADTLib/files/KickADTLibAll.meta
+ADTLib/files/PPParams.npy
+ADTLib/files/SnareADTLibAll.data-00000-of-00001
+ADTLib/files/SnareADTLibAll.index
+ADTLib/files/SnareADTLibAll.meta
ADTLib/utils/__init__.py
-bin/ADTBDRNN
-\ No newline at end of file
+bin/ADT
+\ No newline at end of file
diff --git a/ADTLib.egg-info/requires.txt b/ADTLib.egg-info/requires.txt
@@ -2,3 +2,4 @@ numpy
scipy
cython
madmom
+fpdf
diff --git a/ADTLib/__init__.py b/ADTLib/__init__.py
@@ -10,9 +10,11 @@ Created on Fri May 26 15:10:50 2017
from . import utils
import os
-def ADT(filenames,text='yes',tab='yes',save_dir=None):
+def ADT(filenames,text='yes',tab='yes',save_dir=None,output_act='no'):
location=utils.location_extract()
Onsets=[]
+ if output_act=='yes':
+ acts=[]
for k in filenames:
specs=utils.spec(k)
AFs=utils.system_restore(specs,location)
@@ -28,8 +30,12 @@ def ADT(filenames,text='yes',tab='yes',save_dir=None):
utils.tab_create([Peaks[2],Peaks[1],Peaks[0]],k,save_dir)
Onsets.append({'Kick':Peaks[0],'Snare':Peaks[1],'Hihat':Peaks[2]})
- return Onsets
-
+ if output_act=='yes':
+ acts.append(AFs)
+ if output_act=='yes':
+ return Onsets,acts
+ else:
+ return Onsets
\ No newline at end of file
diff --git a/dist/ADTLib-2.1.2.tar.gz b/dist/ADTLib-2.1.2.tar.gz
Binary files differ.
diff --git a/setup.py b/setup.py
@@ -8,7 +8,7 @@ scripts = glob.glob('bin/*')
setup(
name = 'ADTLib',
packages=find_packages(exclude=[]),
- version = '2.0.2',
+ version = '2.1.2',
description = 'Automated Drum Trancription Library',
author = 'Carl Southall',
author_email = 'carl.southall@bcu.ac.uk',
diff --git a/usage.md b/usage.md
@@ -34,7 +34,7 @@ Perform ADT on multiple audio files from different directories. Creates a drum t
```Python
-Onsets=ADT(filenames, text='yes', tab='yes', save_dir=None)
+Onsets=ADT(filenames, text='yes', tab='yes', save_dir=None, output_act='no')
```
| Name | Description | Default setting |
@@ -43,6 +43,7 @@ Onsets=ADT(filenames, text='yes', tab='yes', save_dir=None)
| text | defines whether the output is stored in a .txt file or not ('yes','no' ) | 'yes' |
| tab | defines whether a tabulature is created and saved to a pdf ('yes','no' ) | 'yes' |
| save_dir | location output .txt files are saved ('None' (saves in current dir), dir) | None |
+| output_act | defines whether the activation functions are also output ('yes','no') | 'no' |
##### Examples
@@ -65,6 +66,14 @@ from ADTLib import ADT
Onsets=ADT('~/Drum.wav', '~/Desktop/Drum1.wav', text='no', save_dir='~/Desktop')
```
-Perform ADT on multiple audio files from different directories. Creates a drum tabulature but not a .txt file and saves it to the desktop. Returns onset times per instrument.
+Perform ADT on multiple audio files from different directories. Creates a drum tabulature but not a .txt file and saves it to the desktop. Returns onset times per instrument.
+
+```Python
+from ADTLib import ADTDT
+
+Onsets=ADT(['Drum.wav'], output_act='yes')
+```
+Perform ADT on a single audio file. Saves onset times to a .txt file in the current directory. Creates a drum tabulature and saves it as a pdf in the current directory. Returns onset times per instrument and activation functions per track, per instrument.
+