joerenner / sampleChop

Python code for neural network that chops audio samples for hip hop production
2 stars 1 forks source link

How to run? #1

Open jeremydeanw opened 3 years ago

jeremydeanw commented 3 years ago

Hi Joe, what are the steps for running the script? (for someone who has only used python a couple of times)

jeremydeanw commented 3 years ago

I downgraded numpy to 1.11.3 (seems only the earlier versions work) But now its a different error that im trying to figure out:
File "C:\Users\Jeremy\Desktop\sampleChop-master\sampleChop\get_data.py", line 19, in cqt = np.abs(lb.core.cqt(y, sr=sr, fmin=lb.note_to_hz('F2'), AttributeError: 'module' object has no attribute 'note_to_hz'

joerenner commented 3 years ago

hmm it seems to not be finding this librosa function: https://librosa.org/doc/latest/generated/librosa.note_to_hz.html

I would make sure you have the correct librosa version (0.5.1) installed.

If you just want to run a song through the system, I would use this function: https://github.com/joerenner/sampleChop/blob/0eac5bf54b55168def11bcb894b43354573402ce/sampleChop/classify.py#L165 just replace the path to the wav or mp3 file.

This library is quite old and I didn't really know what I was doing when I created it... but hopefully it will get some interesting outputs for you!

jeremydeanw commented 3 years ago

The order to run the program is how you have it written already right? I should run get_data, data_ops, sampleChop, then classify? Or do I just run classify?

jeremydeanw commented 3 years ago

Ok.....so after alot of scratching my head, I reinstalled everything....and the issue was that I was running 0.3.0 not 0.51. I ran into a bunch of errors, and what fixed it and allowed me to install 0.5.1 was installing llvmlite-0.31.0-cp27-cp27m-win_amd64.whl I also needed to fall back joblib per: https://github.com/librosa/librosa/issues/729

Seems to work now! Running classify.py. Not sure if its working correctly though...the cuts seem to be random. Not sure what order I'm supposed to go in? How do I train on multiple drum breaks for instance? I have a blank text file in my input folder.....what does the text file do? Do you have your data points somewhere?

When running get_data.py on its own I get the error:

File "get_data.py", line 67, in truth_times = [float(x) for x in truth_times] ValueError: could not convert string to float:

jeremydeanw commented 3 years ago

Would I need to resolve the error above in order to create data points?

joerenner commented 3 years ago

Hi Jeremy,

a couple points:

Sorry I can't be more help, this was a side project years ago when I was in school and just messing around getting to know machine learning.

jeremydeanw commented 3 years ago

Thanks, I'm more just needing to know what the workflow order is....so a temp-plot.html, as well as features + targets txt files were created after running get_data. I see that in sampleChop.py that it uses these files. I tried running sampleChop but ran into an error, I have the seconds as 05,10,15.....is this the correct format? I'm sure I'll figure it out eventually

ValueError: Found input variables with inconsistent numbers of samples: [251802, 4663]

(when running sampleChop)