{"action":"created","issue":{"url":"https://api.github.com/repos/cuthbertLab/music21/issues/191","repository_url":"https://api.github.com/repos/cuthbertLab/music21","labels_url":"https://api.github.com/repos/cuthbertLab/music21/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/cuthbertLab/music21/issues/191/comments","events_url":"https://api.github.com/repos/cuthbertLab/music21/issues/191/events","html_url":"https://github.com/cuthbertLab/music21/issues/191","id":175807399,"number":191,"title":"IndexError when running pitch detection on .wav file.","user":{"login":"jjrob13","id":5597740,"avatar_url":"https://avatars.githubusercontent.com/u/5597740?v=3","gravatar_id":"","url":"https://api.github.com/users/jjrob13","html_url":"https://github.com/jjrob13","followers_url":"https://api.github.com/users/jjrob13/followers","following_url":"https://api.github.com/users/jjrob13/following{/other_user}","gists_url":"https://api.github.com/users/jjrob13/gists{/gist_id}","starred_url":"https://api.github.com/users/jjrob13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjrob13/subscriptions","organizations_url":"https://api.github.com/users/jjrob13/orgs","repos_url":"https://api.github.com/users/jjrob13/repos","events_url":"https://api.github.com/users/jjrob13/events{/privacy}","received_events_url":"https://api.github.com/users/jjrob13/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cuthbertLab/music21/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/cuthbertLab/music21/labels/verified:no","name":"verified:no","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-08T17:01:19Z","updated_at":"2016-09-20T18:37:23Z","closed_at":null,"body":"When trying to transcribe .wav files using the monophonicStreamFromFile function, I received an IndexError coming from the autocorrelation function.\r\n\r\nHere is the stack trace:\r\n\r\n`/music21/audioSearch/transcriber.pyc in monophonicStreamFromFile(fileName, useScale)\r\n    124     from music21 import audioSearch as audioSearchBase\r\n    125\r\n--> 126     freqFromAQList = audioSearchBase.getFrequenciesFromAudioFile(waveFilename=fileName)\r\n    127\r\n    128     detectedPitchesFreq = audioSearchBase.detectPitchFrequencies(freqFromAQList, useScale)\r\n\r\n/music21/audioSearch/__init__.pyc in getFrequenciesFromAudioFile(waveFilename)\r\n    384     for data in storedWaveSampleList:\r\n    385         samps = numpy.fromstring(data, dtype=numpy.int16)\r\n--> 386         freqFromAQList.append(autocorrelationFunction(samps, recordSampleRate))\r\n    387     wv.close()\r\n    388\r\n\r\n/music21/audioSearch/__init__.pyc in autocorrelationFunction(recordedSignal, recordSampleRateIn)\r\n    143         beginning = positiveDifferences[0]\r\n    144         peak = numpy.argmax(correlation[beginning:]) + beginning\r\n--> 145         vertex = interpolation(correlation, peak)\r\n    146         finalResult = recordSampleRateIn / vertex\r\n    147     return finalResult\r\n\r\n/music21/audioSearch/__init__.pyc in interpolation(correlation, peak)\r\n    212     3.21428571...\r\n    213     '''\r\n--> 214     vertex = (correlation[peak - 1] - correlation[peak + 1]) / (\r\n    215                 correlation[peak - 1] - 2.0 * correlation[peak] + correlation[peak + 1])\r\n    216     vertex = vertex * 0.5 + peak\r\n\r\nIndexError: index 1024 is out of bounds for axis 0 with size 1024\r\n`\r\n\r\nIs this something on my end?\r\n\r\nThis is happening on about half of the 50 .wav files that I am trying to transcribe.\r\n\r\nI am running Ubuntu 16.04 and installed the latest music21 from the master branch.\r\n\r\nPlease let me know if you need any additional information.\r\n\r\nThanks,\r\n\r\nJJ"},"comment":{"url":"https://api.github.com/repos/cuthbertLab/music21/issues/comments/248392284","html_url":"https://github.com/cuthbertLab/music21/issues/191#issuecomment-248392284","issue_url":"https://api.github.com/repos/cuthbertLab/music21/issues/191","id":248392284,"user":{"login":"riyansetiadji","id":15678968,"avatar_url":"https://avatars.githubusercontent.com/u/15678968?v=3","gravatar_id":"","url":"https://api.github.com/users/riyansetiadji","html_url":"https://github.com/riyansetiadji","followers_url":"https://api.github.com/users/riyansetiadji/followers","following_url":"https://api.github.com/users/riyansetiadji/following{/other_user}","gists_url":"https://api.github.com/users/riyansetiadji/gists{/gist_id}","starred_url":"https://api.github.com/users/riyansetiadji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riyansetiadji/subscriptions","organizations_url":"https://api.github.com/users/riyansetiadji/orgs","repos_url":"https://api.github.com/users/riyansetiadji/repos","events_url":"https://api.github.com/users/riyansetiadji/events{/privacy}","received_events_url":"https://api.github.com/users/riyansetiadji/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T18:37:23Z","updated_at":"2016-09-20T18:37:23Z","body":"I got the same issue on Mac and CentOS(Docker)."}}
{"actor":{"display_login":"riyansetiadji"}}