carlsouthall / adtlib Goto Github PK
View Code? Open in Web Editor NEWAutomated Drum Transcription Library
License: BSD 2-Clause "Simplified" License
Automated Drum Transcription Library
License: BSD 2-Clause "Simplified" License
Hi there,
Just for some wav files I'm getting the error:
INFO:tensorflow:Restoring parameters from /Users/ignaciot/miniconda3/lib/python3.6/site-packages/ADTLib/files/SnareADTLibAll
INFO:tensorflow:Restoring parameters from /Users/ignaciot/miniconda3/lib/python3.6/site-packages/ADTLib/files/HihatADTLibAll
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ignaciot/miniconda3/lib/python3.6/site-packages/ADTLib/__init__.py", line 24, in ADT
Peaks.append(utils.meanPPmm(AFs[j][:,0],PP[j,0],PP[j,1],PP[j,2]))
File "/Users/ignaciot/miniconda3/lib/python3.6/site-packages/ADTLib/utils/__init__.py", line 44, in meanPPmm
np.delete(onsets,onsets[i-1+ind])
File "<__array_function__ internals>", line 6, in delete
File "/Users/ignaciot/miniconda3/lib/python3.6/site-packages/numpy/lib/function_base.py", line 4406, in delete
keep[obj,] = False
IndexError: arrays used as indices must be of integer (or boolean) type
Any hints of what might be causing this? These are short clips from songs with a very clearly defined beat pattern.
Thanks for releasing this library!
I was trying it out first with some wave files I had, which gave me no problems. I later tried to convert an mp3 to wav using ffmpeg (mono, 44.1KHz):
ffmpeg -i in.mp3 -acodec pcm_s16le -ac 1 -ar 44100 out.wav
When using default settings I get the following error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-41-50059aaecf0f> in <module>()
----> 1 out=ADTBDRNN(['/home/cuaras/out.wav'])
/home/cuaras/Documents/workspace/drum/venv/lib/python2.7/site-packages/ADTLib/models/__init__.pyc in ADTBDRNN(TrackNames, out_sort, ret, out_text, savedir, close_error, lambd)
83 P[j][i]=peak
84
---> 85 P=arrange_output(P,output_sort=out_sort)
86
87 if out_text == 'yes':
/home/cuaras/Documents/workspace/drum/venv/lib/python2.7/site-packages/ADTLib/utils/__init__.pyc in arrange_output(Inputs, output_sort)
44 Out[i][j][k][1]=Names[j]
45
---> 46 Out[i]=np.concatenate([Out[i][0],Out[i][1],Out[i][2]],axis=0)
47
48 if output_sort=='time':
ValueError: all the input arrays must have same number of dimensions
Maybe it's some configuration error on my part. Here is the link to the file:
https://dl.dropboxusercontent.com/u/12497232/out.wav
An input of one filename as a singleton list works, but a list of two filenames raises an error.
Good input:
ADTBDRNN(['simple_loop.wav'])
Output:
[array([ 0. , 0.04643991, 0.52244898, 0.52244898, 0.98684807,
0.99845805, 1.04489796, 1.24226757, 1.24226757, 1.30031746,
1.52090703, 1.52090703, 1.59056689]),
array(['BD', 'HH', 'SD', 'HH', 'BD', 'HH', 'BD', 'BD', 'HH', 'BD', 'SD',
'HH', 'HH'],
dtype='|S32')]
Good input:
ADTBDRNN(['125_bounce.wav'])
Output:
[array([ 0.49922902, 0.510839 , 0.58049887, 0.95201814, 0.95201814,
1.45124717, 1.53251701, 2.31038549, 2.41487528, 2.47292517,
2.80961451, 3.36689342, 3.44816327, 3.81968254, 3.81968254,
4.23764172, 4.34213152, 4.42340136, 5.09678005, 5.29414966,
5.36380952, 6.33904762, 6.6060771 , 7.0124263 , 7.05886621,
7.20979592, 7.27945578, 7.43038549]),
array(['SD', 'HH', 'HH', 'HH', 'BD', 'SD', 'HH', 'BD', 'SD', 'HH', 'BD',
'SD', 'HH', 'HH', 'SD', 'BD', 'SD', 'HH', 'BD', 'SD', 'HH', 'HH',
'BD', 'BD', 'SD', 'SD', 'SD', 'HH'],
dtype='|S32')]
Bad Input:
ADTBDRNN(['simple_loop.wav', '125_bounce.wav'])
Output:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-8-88f3a1bbf5de> in <module>()
----> 1 ADTBDRNN(['simple_loop.wav', '125_bounce.wav'])
/Library/Python/2.7/site-packages/ADTLib/models/__init__.pyc in ADTBDRNN(TrackNames, out_sort, ret, out_text, savedir, close_error, lambd)
85 P[j][i]=peak
86
---> 87 P=arrange_output(P,output_sort=out_sort)
88
89 if out_text == 'yes':
/Library/Python/2.7/site-packages/ADTLib/utils/__init__.pyc in arrange_output(Inputs, output_sort)
40
41 Out[i]=list(np.zeros(len(Inputs[i])))
---> 42 Out1[i]=list(np.zeros((1,2)))
43 for j in xrange(len(Inputs[i])):
44 Out[i][j]=list(np.zeros((len(Inputs[i][j]))))
ValueError: setting an array element with a sequence.
Hi!
I wanted to test your library but seems that the demo website you made can't upload file and return error 500 ๐ https://dmtlab.bcu.ac.uk/ADT/
Also, the usage page you provided in your readme is not available ?
https://github.com/CarlSouthall/ADTLibNew/blob/master/usage.md
Thanks!
I have started automatic drum transciption, but I'm lacking the datasets.
I'd like to ask where I can obtain the datasets for training.
Thanks a lot.
Hi Carl,
I was trying to run your algo on couple of songs but I've noticed whatever I pass as input I will always get only half of the song processed. For instance if I pass 20 seconds in input I can see only BD, SD and HH up to 10 seconds same if I double those values. Any idea of why this might be happening?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.