• SoftwareC/C++
  • Pitch correction, Harmonization and Autotune effects

I've picked a project for the next three months of quarantine, as I live in the USA 🙁 I'd like to make a pitch detection system, that could also be used as a harmonizer, that ideally could also be an autotune effect like all the experimental musicians are using again since the pop stars left them behind.

After reading through the wonderful post about developing an LV2 plugin host for Bela, I couldn't really parse the results of this work. I'm assuming there's a Makefile or .deb of jalv for Bela.

I was thinking rather than loading LV2 plugins, it could be interesting to try and learn from the source code of other open source projects and do something that I can put directly in render() rather than dealing with LV2 scaffolding. So here's a list of what I found online.

  • Autotalent is an academic project. It's in LADSPA format. I've used it before and I like the results.
  • Talented Hack is an LV2 port of Autotalent.
  • VocProc is another LV2 plugin. Hadn't heard of it before this post.
  • zita-at1 is another one. No idea how it works.
  • x24 autotune which is based on zita-at1.

I don't really know where to start other than Autotalent because I like the name and there's a nice signal path reference card.

This will be my second Bela project. But I completed all 13 C++ tutorials so I think I have a decent grasp on how to do stuff per-sample. Too ambitious? Redundant? Good idea?

    lazzarello about developing an LV2 plugin host for Bela, I couldn't really parse the results of this work. I'm assuming there's a Makefile or .deb of jalv for Bela.

    you would follow the instructions here https://github.com/giuliomoro/lv2host . @lokki has done some work with lv2 and autotune (discussed in that very thread). The outcome seems to be that the fat1 plugin works fine, but maybe he has something to add here?

    lazzarello it could be interesting to try and learn from the source code of other open source projects and do something that I can put directly in render()

    that's always more fun, but it could be pretty daunting in this case. Autotuning involves pitch detection and pitch transformation, which doesn't make it very easy.

      giuliomoro that's always more fun, but it could be pretty daunting in this case. Autotuning involves pitch detection and pitch transformation, which doesn't make it very easy.

      I was thinking that maybe it would be a "porting" job. It looks like the FFT-phase-vocoder example included in the IDE uses a different library than these autotune projects, which depends on fftw3. The source code of Talented Hack is in C so it should "just work", right? 🙂

      update looks like there is one #include of fftw3 and four functions used from the lib. Not sure what other things are included. I guess I can just start copying files into a project.

      update update looks like libfftw3-dev is installed on the standard OS image, so I'm just going ahead with copy + paste now 🙂

      update update update I imported almost all of the pitch detection/transformation algorithms and the only missing part is a circular buffer, which I'm comfortable making given the C++ tutorial on this subject. The majority of the code in the main file is specific to LV2. So I imagine that's where the complexity will lie. Also all the MIDI stuff is handled by LV2 functions, so that'll need to be ported to the Bela MIDI API.

      cool! please let me know when you have something working, i would love to try it.

      i have the x42 autotune plugin working fine on BELA, i like the responsiveness and sound much better then any other open source autotune i have tried.

      if you need example code for the lv2 autotune stuff, let me know.

        lokki I got distracted having fun messing with all the ALSA settings for my fancy new sound card. I'm putting this one on a shelf for a minute.

        JACK plugins, similar to zita-at1, are probably the easiest to port into Bela. I ported the zita-rev1 (reverb) to be used with render() https://github.com/transmogrifox/transmogriFX_bela/tree/master/src, and it was not difficult.

        Obviously it becomes more difficult when you have to uproot GUI interfaces or replace libraries that run inefficiently on Bela, etc.

        For example, an attempt to port Stephen Bernsee's pitch shifting code was a disaster because CPU usage was too high for it to be usable.

        4 years later

        lokki Just finding this thread and I'm wondering if you could send some example code for the lv2 autotune. Sorry I'm picking up a few years late but I'm just getting into this with my bela mini. I got as far as following all the steps to set up the lv2 host from the github above but I'm unsure of the next step to get the plugin running on my bela. Any suggestions or getting pointed in the right direction would be super helpful. Thanks for everything you have put into this so far.