Upload 2 files
Browse files
TMIDIX.py
CHANGED
|
@@ -4726,7 +4726,8 @@ def augment_enhanced_score_notes(enhanced_score_notes,
|
|
| 4726 |
timings_divider=16,
|
| 4727 |
full_sorting=True,
|
| 4728 |
timings_shift=0,
|
| 4729 |
-
pitch_shift=0
|
|
|
|
| 4730 |
):
|
| 4731 |
|
| 4732 |
esn = copy.deepcopy(enhanced_score_notes)
|
|
@@ -4745,6 +4746,9 @@ def augment_enhanced_score_notes(enhanced_score_notes,
|
|
| 4745 |
else:
|
| 4746 |
dtime = int(dtime)
|
| 4747 |
|
|
|
|
|
|
|
|
|
|
| 4748 |
e[1] = max(0, abs_time + timings_shift)
|
| 4749 |
|
| 4750 |
e[2] = max(1, int(e[2] / timings_divider)) + timings_shift
|
|
|
|
| 4726 |
timings_divider=16,
|
| 4727 |
full_sorting=True,
|
| 4728 |
timings_shift=0,
|
| 4729 |
+
pitch_shift=0,
|
| 4730 |
+
legacy_timings=False
|
| 4731 |
):
|
| 4732 |
|
| 4733 |
esn = copy.deepcopy(enhanced_score_notes)
|
|
|
|
| 4746 |
else:
|
| 4747 |
dtime = int(dtime)
|
| 4748 |
|
| 4749 |
+
if legacy_timings:
|
| 4750 |
+
abs_time = int(e[1] / timings_divider) + timings_shift
|
| 4751 |
+
|
| 4752 |
e[1] = max(0, abs_time + timings_shift)
|
| 4753 |
|
| 4754 |
e[2] = max(1, int(e[2] / timings_divider)) + timings_shift
|
TPLOTS.py
CHANGED
|
@@ -966,7 +966,7 @@ def square_image_matrix(image_matrix,
|
|
| 966 |
pca = PCA(n_components=num_pca_components)
|
| 967 |
pca.fit(group)
|
| 968 |
|
| 969 |
-
principal_component = pca.components_
|
| 970 |
contributions = np.dot(group, principal_component)
|
| 971 |
selected_row_index = np.argmax(contributions)
|
| 972 |
|
|
|
|
| 966 |
pca = PCA(n_components=num_pca_components)
|
| 967 |
pca.fit(group)
|
| 968 |
|
| 969 |
+
principal_component = np.mean(pca.components_, axis=0)
|
| 970 |
contributions = np.dot(group, principal_component)
|
| 971 |
selected_row_index = np.argmax(contributions)
|
| 972 |
|