llSourcell / Music_Generator_Demo

Music Generator Demo by @Sirajology on Youtube
247 stars 124 forks source link

Slicing type error - bug? #13

Closed matt60b closed 7 years ago

matt60b commented 7 years ago

Installed all of the dependencies but I get this error:

Traceback (most recent call last): File "rbm_chords.py", line 116, in song = song[:np.floor(song.shape[0]/num_timesteps)*num_timsteps] TypeError: slice indices must be integers or None or have an index method

New to using python/Linux so can't really decipher this myself. Would appreciate some assistance.

matt60b commented 7 years ago

To clarify it does the processing and then throws this error

Eumi commented 7 years ago

maybe u should try to run it with python 2.7 i got it running on the python version that came with ubuntu 16.04

Eumi commented 7 years ago

No wait..open rbm_chords ..and set Batch_size to a number thats smaller than your midi files u have as an input .. like if u have 10 midi files set it to 5 .... or for 18 to 9 ..something like that ..half or so. that when u multiply it the actual number is the result. try that

matt60b commented 7 years ago

@Eumi Tried this but I still get the error, but when I change batch size to 10 it still says it processed through 122 songs. So I tried removing all but 10 midi files in Pop music and I still get the same error but then it processes 10 songs.

So I don't think its the batch_size or midi folder that has a problem, I'm also working in python 2.7 so I'm really not sure now :/

matt60b commented 7 years ago

@Eumi OMG, I had the wrong version of numpy...damn dependencies can be a real pain. thank you for replying