marl / jams

A JSON Annotated Music Specification for Reproducible MIR Research
ISC License
186 stars 27 forks source link

added infer_duration flag to import_lab #125

Closed bmcfee closed 8 years ago

bmcfee commented 8 years ago

fixes #107


This change is Reviewable

bmcfee commented 8 years ago

Note: this PR changes the default behavior of import_lab on event annotations.

Previously, if there were only two columns on input, then the duration field was set to 0 as it was assumed to correspond to instantaneous events.

You can still achieve this behavior by setting infer_duration=False for this kind of input, but when the flag is set to True (default, to be consistent with interval inputs), duration is computed by the deltas between successive rows. The final event is assumed to have zero duration.

This may cause hiccups in some data set import scripts. However, I couldn't think of a better/more consistent way to parameterize this behavior.

bmcfee commented 8 years ago

tagging @stefan-balke

stefan-balke commented 8 years ago

Will check asap.

bmcfee commented 8 years ago

Also tagging @urinieto since it might break some of his import scripts.

stefan-balke commented 8 years ago

Tried it and LGTM!

bmcfee commented 8 years ago

@urinieto can you take a peek at this and give me your :euro: e-2?

bmcfee commented 8 years ago

Reviewed 2 of 2 files at r1. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

bmcfee commented 8 years ago

@urinieto timed out! But note that the salami importer will need to be updated.