GuitarMidi-LV2

Discuss anything new and newsworthy! See http://planet.linuxaudio.org and https://libreav.org/news for more Linux Audio News!

Announcements of proprietary software may fit better in the Marketplace.


Moderators: raboof, MattKingUSA, khz

User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

GuitarMidi-LV2

Post by khz »

https://github.com/geraldmwangi/GuitarMidi-LV2 wrote:A concept for guitar to midi as an lv2 plugin. GuitarMidi-LV2 analyses the signal of a guitar in standard tuning E A D g b e extracts the notes played. It deploys a bank of elliptic cauer bandpass filters to separate the polyphonic audio into monophonic frequency segments, which are then analysed by monophonic pitch detectors.
Why not use FFT?

For higher frequencies (strings g b e) FFT would be suffient at frame buffersizes of 512 samples. However for lower frequencies the FFT would need windows of 1024 samples and higher to provide suitable resolution for the notes on the E string (82Hz and higher). This results in high latency for the guitar player. IIR based filters such as those used in this plugin offer faster frequency response at suitable resolution at low frequencies.
So how fast is GuitatMidi-LV2

Don't expect wonders. While I havent done strict meassurements I have percieved drastically lower latency compared to my earlier FFT based method which had a guaranteed latency of 1024 samples at 48khz. This new approach is more like 500-700 samples at 48khz when playing lower frequencies at 82hz (E string). The figures are better at higher frequencies, but again: You won't be able to play funk ala Superstition from Stevie Wonder (well not at this stage).
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: GuitarMidi-LV2

Post by khz »

By the way, according to this https://forum.moddevices.com/t/new-plug ... i-lv2/7589 post, the developer is still looking for testers and is happy to receive bug reports as well as feedback. :-)
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: GuitarMidi-LV2

Post by sysrqer »

Cool, I will have to give this a try.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: GuitarMidi-LV2

Post by j_e_f_f_g »

You know, a better approach would be to see if you could get some pickup with independant outputs for each guitar string, and run those 6 outputs into 6 line inputs, with an instance of a pitch-to-midi plugin for each input. Then you could do 2 things:

1) The pitch-to-midi plugin could skip having to do any time-consuming FFT to separate the sounds of the 6 strings (since they would all be separated by the pickup).

2) You could substitute the low E, A, and D strings with strings pitched up an octave. That would eliminate the time needed to detect low pitches. The plugin could transpose the midi note down an octave for those strings.

That would give you triggering that would be playable.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: GuitarMidi-LV2

Post by bluzee »

Or just get a MIDI pickup for your guitar....

Seems to me Guitarix tuner can send midi notes if you set that option. I remember playing with it once and it worked to a degree but not something i found terribly useful.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: GuitarMidi-LV2

Post by j_e_f_f_g »

bluzee wrote: Guitarix tuner can send midi notes... It worked to a degree but not something i found terribly useful.
When you say "not useful", I assume you mean it wasn't practical because of a lot of falsely triggered notes, and on the low strings there's too much delay between the time you pick a string and the time when you hear the midi note. That's the problem with a standard (midi) guitar pickup, and standard guitar tuning. That's the problem the above programmer is trying to work around with some fft routines. I don't think he's going to get that much better than guitarix's tuner because he's dealing with some daunting physical/acoustic limitations. I'm suggesting altering those actual physical limitations. A pickup that has individual outputs for the 6 strings will pretty much solve the falsely triggered notes. And replacing the low 3 strings with a gauge that allows them to be tuned an octave higher will solve the note delay. In theory, this should make a guitar as capable of playing VSTs live as a keyboard controller is. And that of course would be immensely useful.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

jimsondrift
Established Member
Posts: 12
Joined: Tue Apr 12, 2022 7:21 pm
Been thanked: 9 times

Re: GuitarMidi-LV2

Post by jimsondrift »

j_e_f_f_g wrote: Mon Apr 11, 2022 9:50 pm You know, a better approach would be to see if you could get some pickup with independant outputs for each guitar string, and run those 6 outputs into 6 line inputs, with an instance of a pitch-to-midi plugin for each input.
Hi. I'm the dev of GuitarMidi-LV2. I was thinking about buying a hex pickup, however I found them to be expensive. Furthermore you need a multicore
cable to hook up the guitar to the audio interface, then comes the setup of the software...
It's too complicated for a live setup for me.
j_e_f_f_g wrote: Mon Apr 11, 2022 9:50 pm Then you could do 2 things:

1) The pitch-to-midi plugin could skip having to do any time-consuming FFT to separate the sounds of the 6 strings (since they would all be separated by the pickup).
I dont do any FFT but deploy IIR Bandpass filters. These are considerably faster/have less computations

j_e_f_f_g wrote: Mon Apr 11, 2022 9:50 pm 2) You could substitute the low E, A, and D strings with strings pitched up an octave. That would eliminate the time needed to detect low pitches. The plugin could transpose the midi note down an octave for those strings.

That would give you triggering that would be playable.
Good idea. However the intention of this plugin is to be able to use it with unmodified guitars so that the original signal of the guitar could still be used in parallel to the synth
jimsondrift
Established Member
Posts: 12
Joined: Tue Apr 12, 2022 7:21 pm
Been thanked: 9 times

Re: GuitarMidi-LV2

Post by jimsondrift »

Announcing GuitarMidi-LV2 1.0
* stable midi with no hanging notes
* latency is still high, as I need to work on the filtering/separating neighboring frets
* It is absolutely useable for chords and slow synth pads (like those found in Helm)
Have fun trying/playing
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: GuitarMidi-LV2

Post by j_e_f_f_g »

jimsondrift wrote: I'm the dev of GuitarMidi-LV2.
Hello. Very nice to "meet" you. We could use more developers around here.
a hex pickup, however I found them to be expensive.
I'm sure they are. But I think the improvement in triggering would be so much better that it would be worth the price, I have a guitarist friend who has a pitch-to-midi guitar pickup, and there are so many false triggers, and delays on the low strings that he wouldn't dare use it in a live performance.
cable to hook up the guitar to the audio interface
Right. it's not cheap. But I think it's the best way to go.
then comes the setup of the software
Well, you'd be making the software, so you could make it as easy to setup as you'd like.

In fact, if you had a working prototype done, you could see if someone would be interested in making a product that could be sold, or maybe do a crowd fund raiser. There are companies that already sell Linux based "music products" along these lines, such as MOD Devices, and Muse Receptor. But the thing is that your product would be unique in that I haven't seen many dedicated midi guitars, aside from the SynthAxe (and if you think a hex pickup is expensive...) which would deliver the performance I think you could achieve (and at a lower price than the SynthAxe, or even ordinary pitch-to-voltage schemes like the Roland GR series),
However the intention of this plugin is to be able to use it with unmodified guitars so that the original signal of the guitar could still be used in parallel to the synth
Right, But the other thing would be so much nicer. And maybe even viable as a product.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

jimsondrift
Established Member
Posts: 12
Joined: Tue Apr 12, 2022 7:21 pm
Been thanked: 9 times

Re: GuitarMidi-LV2

Post by jimsondrift »

j_e_f_f_g wrote: Wed Apr 13, 2022 4:58 am I'm sure they are. But I think the improvement in triggering would be so much better that it would be worth the price, I have a guitarist friend who has a pitch-to-midi guitar pickup, and there are so many false triggers, and delays on the low strings that he wouldn't dare use it in a live performance.
It seems that GuitarMidi-LV2 has already few false positives, but there is room for improvement ofcourse.

Right. it's not cheap. But I think it's the best way to go.
It very much depends. My ultimate goal is for GuitarMidi-LV2 to be as good as a hex pickup guitar, and since it deploys filters which can be theoretically faster
then FFT, I believe I can reach this goal.
Already now its usable with chords and slow synths pads. If I don't reach the goal, then the current state is already worth the effort.
For faster and funky stiles I would resort to the vast array of pedals to make synth style sounds.

In fact, if you had a working prototype done, you could see if someone would be interested in making a product that could be sold, or maybe do a crowd fund raiser. There are companies that already sell Linux based "music products" along these lines, such as MOD Devices, and Muse Receptor. But the thing is that your product would be unique in that I haven't seen many dedicated midi guitars, aside from the SynthAxe (and if you think a hex pickup is expensive...) which would deliver the performance I think you could achieve (and at a lower price than the SynthAxe, or even ordinary pitch-to-voltage schemes like the Roland GR series),
For me building hardware (the midi guitar) is more then I could achieve besides work and familly ;) And btw I'm planning to release GuitarMidi-LV2
for MOD Devices products (I own the MOD Duo)

About your earlier comment:
2) You could substitute the low E, A, and D strings with strings pitched up an octave. That would eliminate the time needed to detect low pitches. The plugin could transpose the midi note down an octave for those strings.

That would give you triggering that would be playable.
Thats really good. I'll build into GuitarMidi-LV2 the possibility of user defined tunings. Then users can do exactly as you propose. Thanks
tavasti
Established Member
Posts: 2047
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 369 times
Been thanked: 208 times
Contact:

Re: GuitarMidi-LV2

Post by tavasti »

jimsondrift wrote: Tue Apr 12, 2022 7:34 pm I was thinking about buying a hex pickup, however I found them to be expensive. Furthermore you need a multicore
cable to hook up the guitar to the audio interface, then comes the setup of the software...
And sure, also needs 6 channels in audio interface. I would like to experiment with hex pickups, without conversion to midi, but to have different efects for each string, or have distortion separately for each string. But indeed, they cost pretty much. I also planned that I might make such pickup myself, but this far haven't had that much spare time/energy/whatever.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: GuitarMidi-LV2

Post by j_e_f_f_g »

jimsondrift wrote: GuitarMidi-LV2 has already few false positives

For faster and funky stiles I would resort to pedals

the current state is already worth the effort.
Of course anything that improves the situation is welcome. But I'm advocating looking at even further improvement in an effort to completely eliminate false positives and make the delays imperceptible even for patches with fast attacks. I think that could be done if you made a version of the software tailored to work with a hex pickup.
For me building hardware (the midi guitar) is more then I could achieve

planning to release GuitarMidi-LV2 for MOD Devices products (I own the MOD Duo)
So you're not a hardware guy. That's fine. You just need to find a hardware guy willing to work with you. And that's easier than you may think. You've already got a pretty good prospect. MOD devices is obviously the work of some hardware guy (Initially), because the hardware was made before the software stack. So they very likely have someone in their organization who could design and manufacture the hardware you need. Give them and call, or write an email. Explain what your software does and how it works. Provide a link to it so they can see it's already a working prototype. Then ask if they'd be interested in working with you on producing a "Midi Guitar interface" product. They would create the hardware which would consist of a hex pickup (capable of being mounted on any electric guitar). This hardware would have a USBMIDI standard output (USB jack) which would attach to a computer's usb port and appear as a standard USBMIDI input to the computer. Internally the pickup would have 6 ADCs (analog to digital converters) and a processor to run your plugin. Your plugin would have direct access to the ADCs (via ALSA's MMAP API since the hardware's processor would be internally running Linux). You would do the conversion to midi notes, and send them out the USBMIDI connector (via ALSA's rawmidi).

MOD devices may very well be interested in working with you. After all, they already have a hardware product that internally runs Linux and loads/accesses LV2 plugins. And it contains at least one DAC (so the hardware guy should have no trouble adding ADCs to the design). Plus it's a guitar-oriented product, so a hex pickup would probably be easy for him. In other words, they already have an existing product that does approximately 75% of what you need, and is being sold to the same customers who would use this new product. If they're looking to add another product to their lineup, I would think that your proposal would be very appealing to them.

Since the product outputs as usbmidi, it's supported by Windows, MacOS, iOS, and linux.

Give a good sales pitch to mod devices, and I wouldn't be surprised if you got your hardware.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
milkii
Established Member
Posts: 477
Joined: Tue Jan 05, 2016 9:08 am
Location: Edinburgh
Has thanked: 92 times
Been thanked: 91 times
Contact:

Re: GuitarMidi-LV2

Post by milkii »

#moddevices on libera chat

they/them ta / libreav.org / wiki.thingsandstuff.org/Audio and related pages / gh

jimsondrift
Established Member
Posts: 12
Joined: Tue Apr 12, 2022 7:21 pm
Been thanked: 9 times

New release GuitarMidi-LV2 1.1

Post by jimsondrift »

Hi. I've just pushed a new release, GuitarMidi-LV2 1.1
* use of higher order Elliptic filters, less latency
Have fun testing
jimsondrift
Established Member
Posts: 12
Joined: Tue Apr 12, 2022 7:21 pm
Been thanked: 9 times

Re: GuitarMidi-LV2

Post by jimsondrift »

Hi guys n galls, Its been a bit quiet here but I have been working on the project. I have vastly improved the plugin. Please test the master branch If you like and leave some comments, issues here
Post Reply