diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..8c0ba09
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e234552..9d8cb0e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,14 +2,9 @@
-
-
-
-
-
-
-
-
+
+
+
@@ -34,7 +29,7 @@
-
+
diff --git a/dist/jump_reward_inference-0.0.5-py3-none-any.whl b/dist/jump_reward_inference-0.0.5-py3-none-any.whl
deleted file mode 100644
index 56f33cc..0000000
Binary files a/dist/jump_reward_inference-0.0.5-py3-none-any.whl and /dev/null differ
diff --git a/dist/jump_reward_inference-0.0.5.tar.gz b/dist/jump_reward_inference-0.0.5.tar.gz
deleted file mode 100644
index d936d2e..0000000
Binary files a/dist/jump_reward_inference-0.0.5.tar.gz and /dev/null differ
diff --git a/dist/jump_reward_inference-0.0.6-py3-none-any.whl b/dist/jump_reward_inference-0.0.6-py3-none-any.whl
new file mode 100644
index 0000000..7cf08a6
Binary files /dev/null and b/dist/jump_reward_inference-0.0.6-py3-none-any.whl differ
diff --git a/dist/jump_reward_inference-0.0.6.tar.gz b/dist/jump_reward_inference-0.0.6.tar.gz
new file mode 100644
index 0000000..009893b
Binary files /dev/null and b/dist/jump_reward_inference-0.0.6.tar.gz differ
diff --git a/setup.py b/setup.py
index 7873ec7..21d0374 100644
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,7 @@ def run(self):
# Package details
name="jump_reward_inference",
- version="0.0.5",
+ version="0.0.6",
package_dir={"": "src"},
packages=find_packages(where="src"),
# packages=find_packages(),
diff --git a/src/jump_reward_inference.egg-info/PKG-INFO b/src/jump_reward_inference.egg-info/PKG-INFO
index 4e20aee..3c4e37d 100644
--- a/src/jump_reward_inference.egg-info/PKG-INFO
+++ b/src/jump_reward_inference.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: jump-reward-inference
-Version: 0.0.5
+Version: 0.0.6
Summary: A package for online music joint rhythmic parameters tracking including beats, downbeats, tempo and meter using the BeatNet AI, a super compact 1D state space and the jump back reward technique
Home-page: https://github.com/mjhydri/1D-StateSpace
Author: Mojtaba Heydari
diff --git a/src/jump_reward_inference/inference.py b/src/jump_reward_inference/inference.py
index ef3b603..6e73ed6 100644
--- a/src/jump_reward_inference/inference.py
+++ b/src/jump_reward_inference/inference.py
@@ -29,6 +29,12 @@ class BDObservationModel:
beat tracking method using RNN and enhanced particle filtering,” in In Proc. IEEE Int. Conf. Acoust. Speech
Signal Process. (ICASSP), 2021.
+ M. Heydari, F. Cwitkowitz, and Z. Duan, “BeatNet:CRNN and particle filtering for online joint beat down-beat
+ and meter tracking,” in Proc. of the 22th Intl. Conf.on Music Information Retrieval (ISMIR), 2021.
+
+ M. Heydari and Z. Duan, “Don’t Look Back: An online beat tracking method using RNN and enhanced
+ particle filtering,” in Proc. IEEE Int. Conf. Acoust. Speech Signal Process. (ICASSP), 2021.
+
"""
@@ -132,8 +138,7 @@ class inference_1D:
'''
MIN_BPM = 55.
- MAX_BPM = 200. # 215.
- NUM_TEMPI = 300
+ MAX_BPM = 215.
LAMBDA_B = 0.01 # beat transition lambda
Lambda_D = 0.01 # downbeat transition lambda
OBSERVATION_LAMBDA = "B56"
@@ -169,7 +174,7 @@ def __init__(self, beats_per_bar=[], min_bpm=MIN_BPM, max_bpm=MAX_BPM, offset=OF
self.om2 = BDObservationModel(self.st2, "B60") # downbeat tracking observation model
pass
- def process(self, activations, **kwargs):
+ def process(self, activations):
T = 1 / self.fps
font = {'color': 'green', 'weight': 'normal', 'size': 12}
counter = 0
@@ -275,14 +280,14 @@ def process(self, activations, **kwargs):
self.st2.jump_weights[:self.st2.min_interval - 1] = 0
down_max = np.argmax(down_distribution)
- # Beat vs Downbeat distinguishment
+ # Beat vs Downbeat mark off
if down_max == self.st2.first_states[0]:
output = np.append(output, [[counter * T + self.offset, 1, local_tempo, meter]], axis=0)
last_detected = "Downbeat"
else:
output = np.append(output, [[counter * T + self.offset, 2, local_tempo, meter]], axis=0)
last_detected = "Beat"
- if self.plot and counter>5000: #and counter>5000
+ if self.plot:
subplot3.cla()
subplot4.cla()
down_distribution = down_distribution / np.max(down_distribution)
@@ -303,7 +308,7 @@ def process(self, activations, **kwargs):
position2 = down_max
subplot3.axvline(x=position2)
- if self.plot and counter>5000: # and counter>5000 # activates this when you want to plot the performance
+ if self.plot: # activates this when you want to plot the performance
if counter % 1 == 0: # Choosing how often to plot
print(counter)
subplot1.cla()
diff --git a/src/jump_reward_inference/state_space_1D.py b/src/jump_reward_inference/state_space_1D.py
index 51cc4dd..d2d1be1 100644
--- a/src/jump_reward_inference/state_space_1D.py
+++ b/src/jump_reward_inference/state_space_1D.py
@@ -23,7 +23,7 @@ class beat_state_space_1D(state_space_1D):
def __init__(self, alpha=0.01, tempo=None, fps=None, min_interval=None, max_interval=None):
super().__init__(min_interval, max_interval)
- self.jump_weights = np.concatenate((np.zeros(self.min_interval), np.array([alpha] * (self.max_interval - self.min_interval)), ))
+ self.jump_weights = np.concatenate((np.zeros(self.min_interval), np.array([alpha] * (self.max_interval - self.min_interval)),))
if tempo and fps:
self.jump_weights[round(60. * fps / tempo) - self.min_interval] = 1 - alpha
@@ -32,7 +32,7 @@ class downbeat_state_space_1D(state_space_1D):
def __init__(self, alpha=0.1, meter=None, min_beats_per_bar=None, max_beats_per_bar=None):
super().__init__(min_beats_per_bar, max_beats_per_bar)
- self.jump_weights = np.concatenate((np.zeros(self.min_interval-1), np.array([alpha] * (self.max_interval - self.min_interval+1)), ))
+ self.jump_weights = np.concatenate((np.zeros(self.min_interval-1), np.array([alpha] * (self.max_interval - self.min_interval+1)),))
if meter:
self.jump_weights[meter[0] - self.min_interval+1] = 1 - alpha
pass