• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

craffel / pretty-midi / 51
68%

Build:
DEFAULT BRANCH: master
Ran 23 Jul 2017 07:26PM UTC
Jobs 2
Files 6
Run time 26s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
51

push

travis-ci

craffel
Fix swapped note-on note-off events (#132)

Resolves #131.

* Make failing test for reading tracks with overlapping notes.

Make two tracks using mido - one good with correct note-on/note-off order,
second (bad) with another note-on before note-off at the same tick.
Current code fails on the latter.

Then read it via PrettyMidi, write it and read it back. It should be the same
according to expected values, but due to a bug it differs.

* #131 Fix a problem when reading tracks with overlapping notes.

In particular when there are two adjacent notes and at the same tick there's
first note-on and then note-off, the library incorrectly closes both notes, even
though the second note should be still open. Such a MIDI is probably a bit
malformed, but the library should not fail on that if it can resolve the situation.

Due to this bug the library incorrectly produces zero-duration events and some
long open notes.

The solution is to keep the note-on event in the list of open notes if it's at the
same tick as the note-off event and we're closing some previous notes.

Note that we changed the format of time within values of the last_note_on dict
- from real time to integer tick. This is to avoid floating point comparison when
we have the original integer values.

* Fix PEP8 style errors.

* Test using NamedTemporaryFile instead of leaving trash files around.

482 of 873 relevant lines covered (55.21%)

1.1 hits per line

Jobs
ID Job ID Ran Files Coverage
1 51.1 23 Jul 2017 07:26PM UTC 0
55.21
Travis Job 51.1
2 51.2 23 Jul 2017 07:26PM UTC 0
55.21
Travis Job 51.2
Source Files on build 51
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #51
  • 322815e1 on github
  • Prev Build on master (#47)
  • Next Build on master (#52)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc