Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AugmentedNet/input_representations.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Duration14(FeatureRepresentationTI):
[0, 1, 1, 1, 1, 1, 1],
]

def run(self):
def run(self, transposition=None):
array = np.zeros(self.shape, dtype=self.dtype)
prev_measure = -1
idx = 0
Expand All @@ -119,14 +119,14 @@ def run(self):
prev_measure = measure
pattern = self.pattern[idx]
array[frame, 0:7] = pattern
idx += 1
idx = min(idx + 1, len(self.pattern) - 1)
idx = 0
for frame, onset in enumerate(self.df.s_isOnset):
if sum(onset) > 0:
idx = 0
pattern = self.pattern[idx]
array[frame, 7:] = pattern
idx += 1
idx = min(idx + 1, len(self.pattern) - 1)
return array

@classmethod
Expand Down