question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Taking multi-channel seriously

See original GitHub issue

Most of librosa only supports monophonic audio. But for many of the analyses we’d like to do, stereo or multi-channel support would be very useful and not all that difficult at this point.

This issue is meant to kick off discussion of how this will work, but I have some thoughts as outlined below.

Conventions

In general, we should continue to support native mono y.shape = (N,) without artificial up-casting to explicit mono (1, N).

For example, an stft on (N,) will still produce an output of shape (# freqs, # frames).

However, an stft on (1, N) would produce output (1, #freqs, #frames). Now that framing is fully generalized to multichannel, this should not present any difficulties. More generally, (K, N) would map to (K, #freqs, #frames).

As a general rule, the trailing dimension will be (usually) treated as time-like (samples, frames, etc), and the leading dimension will be channels.

How it will work

Things that will generalize easily

  • STFT and friends
  • Linear filters (mel, mfcc, chroma_stft, and co)
  • HPSS

Things that will be a pain to generalize

  • CQT and friends?
  • Structure / recurrence
  • General decomposition
  • effects?
  • inverse transforms (mfcc, mel, etc)

Things that should stay monophonic

  • Detectors (onset, beat, pitch)
  • Display
  • Sequence modeling (dtw, viterbi)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
bmcfeecommented, Jun 11, 2020

by works I mean that it produces the correct values in the correct shape. However, the memory layout may or may not adhere to any contiguity constraints. Einsum does claim to let you force this with the order= parameter, but a few minutes of hacking didn’t pay off for me yet.

Update: this should now be fixed thanks to https://github.com/numpy/numpy/pull/16446 being merged.

0reactions
bmcfeecommented, Jul 26, 2021

Here’s the relevant discussion on stackoverflow explaining why we are seeing the slowdown and how to optimize it: https://stackoverflow.com/questions/17973507/why-is-converting-a-long-2d-list-to-numpy-array-so-slow

I don’t think that’s the issue we’re having though. The inputs here are already arrays (not lists).

Read more comments on GitHub >

github_iconTop Results From Across the Web

It's Time to Take Multi-Channel Technology Seriously
Multi-channel customer contact is not an option for today's contact centers; it's a necessity. Phone calls may still rule, but the alternatives to...
Read more >
MultiChannel Prospecting - The Go-Getter Strategy
At its best, multi-channel prospecting is a synergetic combo between sales and marketing strategies that go beyond just cold calls and emails.
Read more >
What Is Multichannel Selling? [Key Benefits + Tips to Start]
A multichannel selling strategy may involve a presence in the physical retail space, including brick-and-mortar stores and multi-vendor spaces ...
Read more >
The Importance of Creating a Multichannel Marketing ...
Creating a multichannel marketing strategy can take some trial and error. However, taking some risks and trying a new platform can offer serious...
Read more >
Are Multichannel Customers Really more Valuable? The ...
Taken together, the results show that for hedonic categories, multichannel customers provide the highest monetary value regardless of the risk level of the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found