Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging strategies for duplicate notes are reversed #28

Open
p3zo opened this issue Mar 4, 2023 · 0 comments
Open

Merging strategies for duplicate notes are reversed #28

p3zo opened this issue Mar 4, 2023 · 0 comments

Comments

@p3zo
Copy link

p3zo commented Mar 4, 2023

In inputs.from_pretty_midi, setting the kwarg mode="max" sums velocities and setting it to "sum" preserves only the maximum.

if mode == "max":
pianoroll[start:end, pitches[idx]] += velocity
else:
maximum = np.maximum(
pianoroll[start:end, pitches[idx]], velocity
)
pianoroll[start:end, pitches[idx]] = maximum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant