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

Non-uniform time-sampling #72

Open
bmcfee opened this issue Jun 11, 2017 · 0 comments
Open

Non-uniform time-sampling #72

bmcfee opened this issue Jun 11, 2017 · 0 comments

Comments

@bmcfee
Copy link
Owner

bmcfee commented Jun 11, 2017

Some applications call for non-uniform time sampling, eg, beat-synchronous features.

This is fairly involved to implement, since it requires both an estimator (beat tracker) and a post-processing of all dynamic observations, including both features and task outputs.

I think this can all be implemented with the following:

  • Introduce a new base class, Timing, which processes audio like a FeatureExtractor, but returns an array of non-overlapping time intervals.
  • In the FeatureExtractor and TaskTransformer objects, implement the following methods:
    • time_to_frames(times) which wraps librosa's implementation with the object's frame rate
    • resample(data, times) which resamples all of the entries of data generated by that object according to the specified time intervals. The results are returned as a new dict with the resampled data. In general, different analyzers will have different methods of summarizing observations within an interval, which is why each object needs to implement its own resampler.
  • In the pump object, add a new method to add a timing object. During transform, the timing is applied to each output as it is generated. The resampled versions are scoped under {timing.name}/ORIGNAL_SCOPE. A flag in the pump object can be set to retain the original analyses, or discard them in favor of the resampled ones. The timing intervals are stored as {timing.name}/_intervals.
  • Inverse transforms get tricky. I think the easiest way to accomplish this is to add a times= or intervals= parameter to the task inverters, which can bypass the frame-rate conversions when generating the jams annotation times.
@bmcfee bmcfee self-assigned this Jun 11, 2017
@bmcfee bmcfee modified the milestone: 0.2.3 Jun 11, 2017
@bmcfee bmcfee added this to the 0.4.0 milestone Jul 28, 2017
@bmcfee bmcfee removed this from the 0.4.0 milestone Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant