From 2c0ed61580a3f16de3648bd85988aec90f369cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sercan=20Atl=C4=B1?= Date: Sun, 5 Feb 2017 21:05:30 +0100 Subject: [PATCH 1/5] Refactored according to PEP8 --- predominantmelodymakam/predominantmelodymakam.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/predominantmelodymakam/predominantmelodymakam.py b/predominantmelodymakam/predominantmelodymakam.py index 55c9436..6f66bcf 100644 --- a/predominantmelodymakam/predominantmelodymakam.py +++ b/predominantmelodymakam/predominantmelodymakam.py @@ -215,7 +215,8 @@ def select_contours(self, pitch_contours, contour_saliences, start_times, try: # the pitch contours is a list of numpy arrays, parse them starting # with the longest contour - while pitch_contours: # terminate when all the contours are checked + while pitch_contours: # terminate when all the contours are + # checked # print len(pitchContours) # get the lengths of the pitchContours @@ -243,10 +244,10 @@ def select_contours(self, pitch_contours, contour_saliences, start_times, contour_saliences, lens, acc_idx) except ValueError: # if the audio input is very short such that Essentia returns a - # returns a single contour as a numpy array (of length 1) of numpy - # array (of length 1). In this case the while loop fails directly + # single contour as a numpy array (of length 1) of numpy array + # (of length 1). In this case the while loop fails directly # as it tries to check all the truth value of an all pitch values, - # instead of checking whether the list is emptry or not. + # instead of checking whether the list is empty or not. # Here we handle the error in a Pythonic way by simply breaking the # loop and assigning the inputs to outputs since a single contour # means nothing to filter From 3743d0a77dc7a9e32c69d9a33f2e1e274c87cc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sercan=20Atl=C4=B1?= Date: Sun, 5 Feb 2017 21:09:17 +0100 Subject: [PATCH 2/5] Added changes in the code --- Changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index d88761b..c75d90f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +#### predominantmelodymakam v1.2.2 + - Updated requirements file according to the change in 'pitchfilter' module. + - Fixed a bug where the while loop fails directly when the audio input is very short. + #### predominantmelodymakam v1.2.1 - Fixed a bug where the extract() method was not returning anything From e297c3806771d2dd5eac5791808c82d3acfd7350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sercan=20Atl=C4=B1?= Date: Sun, 5 Feb 2017 21:10:01 +0100 Subject: [PATCH 3/5] Updated version as 1.2.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b4aa5c3..82097a0 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup(name='predominantmelodymakam', description='Predominant melody extraction of makam music', - version='1.2.1', + version='1.2.2', author='Sertan Senturk', author_email='contact AT sertansenturk DOT com', license='agpl 3.0', From d796d7637d7cb430a6e39db11e2aa7e6b4ea9348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sertan=20=C5=9Eent=C3=BCrk?= Date: Sun, 5 Feb 2017 21:32:33 +0100 Subject: [PATCH 4/5] Update Changelog.md --- Changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index c75d90f..05da72e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,12 +1,12 @@ #### predominantmelodymakam v1.2.2 - - Updated requirements file according to the change in 'pitchfilter' module. + - Corrected the name of the 'pitchfilter' package in the requirements file. - Fixed a bug where the while loop fails directly when the audio input is very short. #### predominantmelodymakam v1.2.1 - Fixed a bug where the extract() method was not returning anything #### predominantmelodymakam v1.2 - - Added the [pitchfilter](https://github.com/hsercanatli/pitchfilter) repository as a fallback if the Essetian PitchFilter does not work due to Essentia version problem (e.g. the official version for Ubuntu 14.04). + - Added the [pitchfilter](https://github.com/hsercanatli/pitchfilter) repository as a fallback if the Essetia PitchFilter does not work due to Essentia version problem (e.g. the official version for Ubuntu 14.04). - Added flake8 checking to Travis CI #### predominantmelodymakam v1.1 From f84ce41cc7e94da0d621400ed652eb175e1f3a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sertan=20=C5=9Eent=C3=BCrk?= Date: Sun, 5 Feb 2017 21:33:03 +0100 Subject: [PATCH 5/5] Update Changelog.md --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 05da72e..2428332 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,7 +6,7 @@ - Fixed a bug where the extract() method was not returning anything #### predominantmelodymakam v1.2 - - Added the [pitchfilter](https://github.com/hsercanatli/pitchfilter) repository as a fallback if the Essetia PitchFilter does not work due to Essentia version problem (e.g. the official version for Ubuntu 14.04). + - Added the [pitchfilter](https://github.com/hsercanatli/pitchfilter) repository as a fallback if the Essentia PitchFilter does not work due to Essentia version problem (e.g. the official version for Ubuntu 14.04). - Added flake8 checking to Travis CI #### predominantmelodymakam v1.1