mutwo-org / mutwo.midi Goto Github PK
View Code? Open in Web Editor NEWMidi extension for event based library mutwo
Home Page: https://mutwo-org.github.io/
License: GNU General Public License v3.0
Midi extension for event based library mutwo
Home Page: https://mutwo-org.github.io/
License: GNU General Public License v3.0
Since mutwo.core 0.61.0
events have a tempo_envelope
attribute. EventToMidiFile
should use this tempo_envelope
attribute instead of using its own field. But it should add a field metrize: bool = True
.
Currently conversion of events with smaller duration values is broken.
from mutwo import midi_converters
from mutwo import core_events
# this works
midi_converters.EventToMidiFile().convert(core_events.SimpleEvent(2), 'test.mid')
# this will fail
midi_converters.EventToMidiFile().convert(core_events.SimpleEvent(0.5), 'test.mid')
error message:
Traceback (most recent call last):
File "/build/mutwo.midi/tests/converters/frontends_tests.py", line 768, in test_convert_event_with_small_duration
self.converter.convert(simple_event, self.midi_file_path)
File "/build/mutwo.midi/mutwo/midi_converters/frontends.py", line 947, in convert
midi_file.save(filename=path)
File "/nix/store/fnldc12gqvcydd3ggnpwrc48v5rckmwm-python3.9-mido-1.2.10/lib/python3.9/site-packages/mido/midifiles/midifiles.py", line 446, in save
self._save(file)
File "/nix/store/fnldc12gqvcydd3ggnpwrc48v5rckmwm-python3.9-mido-1.2.10/lib/python3.9/site-packages/mido/midifiles/midifiles.py", line 459, in _save
write_track(outfile, track)
File "/nix/store/fnldc12gqvcydd3ggnpwrc48v5rckmwm-python3.9-mido-1.2.10/lib/python3.9/site-packages/mido/midifiles/midifiles.py", line 251, in write_track
raise ValueError('message time must be non-negative in MIDI file')
ValueError: message time must be non-negative in MIDI file
Some midi exporter don't use note_off
messages, but note_on
messages with velocity=0
. Mutwo currently can't pass such midi files. This should be fixed by adding a new flag to EventToMidiFile
.
Thanks @timpauli for detecting this bug.
This helps debugging.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.