Suggestion (Audio Library): Keep an eye on CycFi's "Hz" pitch detection project; "Q" DSP library

bit 9

Member
The two most recent blog posts from CycFi Research (links: part 1, part 2) are about a lightweight "cross-platform C++ library for audio digital signal processing". According to the first part of the article, "The code is wicked fast, with processing time ... in the microsecond per sample range on modern MCUs", which made me want to make sure it was on someone's radar at PJRC. The library is currently on git, under the MIT license.

Here are some snippits that will hopefully spark the interest of someone here who can do something with it:
  • The code is significantly simpler ... resulting in improved readability and ease of maintenance. The code is based off modular and reusable building blocks in the Q Audio DSP library. Anything I consider reusable is encapsulated in a C++ class.
  • No downsampling. The algorithms are fine-tuned and highly optimized, leveraging modern C++ features to enable highly efficient code.
  • Processing is performed serially, on a per-sample basis, rather than working in frames (most pitch detectors are frame-based). This allows for real-time responsiveness with minimal latency, enabling quicker handling of changes in the input signal.
  • Precise, real-time detection of both the start and end of a note. This is not just a glorified transient detector. It looks at both spectral and amplitude dynamics. It can detect musical passages that involve techniques such as right-hand tapping, hammer-ons, and pull-offs.
  • Multiple detection methods run simultaneously, with each complementing and enhancing the others for improved accuracy.
  • Detects pitch or note information within a single cycle, effectively reducing latency by half when compared to standard autocorrelation-based pitch detection.
  • Designed specifically for fretted instruments like the guitar, it identifies pitch before the actual attack of a note. This allows for even earlier detection.
Yeah, okay - you read that last one right. This is focused on guitars and such, which is precicely what I was looking for (see the spoiler below for how I got here). I'm just really, really hoping someone sees this and is able to impliment it on the Teensy.

The articles are an interesting read either way.

I'm not a shill. I promise.

I'm looking at building a guitar. For giggles, not because I'm particularly good. My musical experience actually centers around voice (opera, if you'll believe it), DAWs, and MIDI devices. I have a cheap electric guitar I got for $200 off Craigslist several years ago which I recently picked up again. I got it in my head that electric guitars are stuck in the 1950's, and thought that there had to be some interesting things on YouTube and GitHub that I clone so I could plug it into Ableton and play around.

Turns out - that's not actually a thing in the DIY/maker sphere, yet.
(The most interesting thing I did find was someone who put together a circuit to emulate the full range of guitar pickups (links: YouTube, GitHub)

If trying to run signal processing on the raw guitar audio, the usual (tremendous) issue of real-time polyphonic pitch detection makes small-brains (like me) either throw their hands up in defeat, or find a new strategy. The only other idea I can come up with is to cut out the polyphonic part of the equasion, and instead run per-string signal processling. The typical pickups can't do this, because they output the sumed audio from all the strings.

I hadn't heard of per-string pickups, but after a little googling I discovered CycFi (open source hardware/software company based in the Philippines) and their "Nu" pickups. I made a mental note for whenever I get around to making a heavy metal hurdy gurdy, and kept searching.

It seems the consumer solutions are piezos embedded, per string, into the saddle/bridge (see: GraphTech's Ghost pickups), or optical sensors, per string, positioned just inside the saddle/bridge (see: Fishman's TriplePlay). Not wanting to re-invent the whole guitar, all at once, I started looking for pinouts for the Ghost pickups (mostly because it's intended to be wired up inside the guitar, not dangling off it).

After crawling through all the documention (and finding nothing of value on the subject), I found another source that states that there's no actual MIDI-out coming from the guitar, even though they charge more than $150 for the core of their "MIDI" solution. Instead, it relies on an external, dedicated DSP/MIDI box that can cost thousands more.

Unacceptable.

"Okay, then. How hard is realtime monophonic pitch detecetion anyay? I mean, it's way beyond my skillset, but surely someone out there has something of note!"

And that was when I circled back to CycFi's blog posts from less than a month ago.
 
Back
Top