Convert Analog Signal to Midi

Hi There

First of all – i really enjoy using GigPerformer. I’ve been an early adopter coming from Brainspawn Forte and you did a really great Job in making GP pretty accessible and stable while still being very powerful.

I was wondering if there is a way to Convert a Analog Signal to Midi using Gig Performer and scripting or maybe some plugins.

I have an analog Stompbox that i would like to use to trigger electronic kick sounds in any VST-Instrument (roli Studio player for example). I thought that this should be a rather simple task as for that purpose i don’t need any pitch detection – Just converting the Analog input to a (choosable) midi note and if possible with velocity depending on the strength of the input signal.

I tried to use Dodo Midi2 for this but it seems to crash GP and it’s kinda overqualified for the Job because it includes pitch detection. I found no tool that does exactly what i want, maybe it could be done with scripting but this exceeds my capabilities.

Any ideas how to achieve this?

To Mods: Feel free to move the topic if it seems out of place – i wasn’t sure where this would be most fitting.

Maybe a hardware solution is better?

The old pizmidi plugins (free) have one called AudioToCC which will convert audio to a single CC message with the CC value based on the audio volume. The CC could easily be converted to a Note in GP.

The only thing I had to do in the past is really boost the audio going into the plugin, as I was using my guitar DI as the audio signal.

2 Likes

Hello. I’m pretty new here, and my proposal as new may already be very old here. I apologize if that is so.
I’m doing experiments using MTunner, from Melda Productions (it’s free). By default MTunner detects the pitch of the incoming audio, but if you click on Midi Enable, you have the output of that audio to midi. That’s what I’m trying these days. I use it directly from the microphone, with my voice or my bassoon. Maybe it can help in this case, and maybe more expert users in the forum can advise if it is possible to develop this system well.
I leave an image and the gig performer file in case it helps you


Voz a midi.gig (45.6 KB)

2 Likes

Thanks for all the contributions!
I will try out both suggested software solutions and report back soon on how it’s going

I gave MTuner a quick test, and it didn’t convert the audio level to velocity (every note had velocity 127).

The full solution will be MidiGuitar2 - unbeatable in terms of audio to midi conversion.

For audio levels to midi, I also found the Blue Cat meter plugin to be great.

You can kinda do it directly in GP with GP Script

Connect your audio input to a gain/balance control (say)
screenshot_6032

Then create this script in the rackspace

Var
   GB : PluginBlock  // Gain/Balance control
   Follow : Widget   // Widget to track audio value

// Use this to query the magnitude periodically
On TimerTick(ms : double)
    var
       value : double = GB.GetParameter(2) // This is the current magnitude of the signal
       Follow.SetWidgetValue(value)  // Set a widget to that magnitude (or do something else
End

Initialization
   SetTimersRunning(true)
End
2 Likes

I had no luck with the pizdmidi plugins because the latest Mac OS i’m running would not let me load these (not even when i tried to explicitly allow it).
The Melda Tuner would be an easy soloution but it’s limited by not being able to output dynamic velocity.

I might try out the other plugins but as these are a bit costy for what small amount of their capabilites i would use i’d like to try other things first.

The script you posted looks very promising @dhj
I was able to set it up to the point you described but i’m struggeling how to get further now because i’m really a rookie when it comes to scripting.

Could you kindly describe how to get some Midi Note output out of this setup? As i understand your example would control the Value of a widget depending on current magnitude of the Input source.

What is this stompbox and what type of audio does it send?

I just wanted to point out that it is possible to respond to the magnitude of an incoming audio signal. What you actually do with that information is a whole different problem and would require significant scripting.

As @rank13 already noted, a plugin such as Blue Cat meter, is going to be an easier solution.

Another option that appears to work well is Melda MCCGenerator. It’s free, but I think you have to pay the license for the free bundle in order to get the ‘Modulators’ - which is needed to get this to work.

This plugin is converting my guitar input into a CC with the CC value based on audio level. You can also easily set the min/max audio levels to scale the output to match your incoming audio level (and in my case, raise the min audio threshold to ignore the noise floor from my pickups).

But, my earlier question is about your pedal and what it sends. Because if you want a single note, your pedal will need to send a very short burst of audio. I also expect some special handling to ignore any decaying audio e.g. the note velocity is based on peak audio level, and then must be reset once the audio drops to silence?

Its a " Wild Dog Yowie" which uses a built in microphone and it will indeed only send short bursts of audio (and maybe a little rumbling noise at low levels).

OK, got that so i will take a closer look at those tools rank13 described.

Sounds interesting @rank13. I will give the MCCGenerator a try later on.

I forgot about this useful plugin: Unfiltered Audio G8 ($30.99 with code PA-3099)

This won’t do velocity, but I think will be the easiest and most reliable way to get a single note generated from your stomp.

Testing with a kick drum plugin, all the other plugins that convert audio levels to CC values are not going to give you what you want by default, as they detect the rising attack, then decay of the kick, sending out a lot of midi messages.

The Blue Cat Meter plugin does have an option to only send midi on the max peak, but you’d need to reset that after every stomp.

Otherwise, you would probably need a scriptlet that comes after the audio to CC conversion that attempts to detect the peak value and then generate a single note. Or further adapt the example that @dhj gave above.

1 Like

Today i made some Tests with Unfiltered Audio G8 and that worked out pretty well for me. :+1:
Big thanks for your efforts! this will make that little Stompbox a lot more versatile.
Looking forward to do more creative stuff with GP!

3 Likes