Jam Origin

MIDI Guitar & MIDI Bass user forum

Experiences how to improve virtual piano playing with Midi Guitar 2

Also applicable for other instruments, but especially helpful for piano and similar instruments.

Play clean (do I have it to say?).

Don’t strum chords. Pick notes of the chord (slowly) one after the other or fingerpick all “important”
strings of the chord at once (e.g. bass note with thumb and the rest with 2 to 4 fingers).

Ensure no loop back is set in DAW / audio interface, this cost me painful days before I found this out and learned how to switch it of. See attached pic for a Steinberg Interface.

What helps inside MG2 or MB:
A big step for me was to use the “scale filter” (midi machine (MM) included in MG2). This lets only notes get through which are in a selectable scale (root and type). Accidentally played notes and ghost notes are only played if they are in scale. This is much better than such notes which are not in scale. The undesired notes that come through can even lively up your playing. Disadvantages are that you have only seven different notes (plus the octaves) and you have to choose the scale in advance. If you don’t grab the right fret, no tone will appear, especially at the beginning it feels unfamiliar that some notes on the fretboard don’t ring. On the other side it is helpful to learn scales on the fretboard. If you only can play a few scales from memory (like me) you can use the “transpose” midi machine, to get other root notes. In this case you have to adapt the root note in the “scale filter”, e.g. if you transpose minus x semitones, you have to increase the root note x semitones (rotate knob clockwise).

Cut low velocities (use gate).

Normalize velocity to taste (between a min. and max. range), use “normalizer” midi machine (e.g. script from stratcat here in the forum, a velocity gain is also included. I used it with a few adjustments for the attached "normalizer.lua”).

Cut all notes that you don’t need (use “Low and high cut” midi machine)

Cut double notes which appears very short after the first (use “Custom_Gate” midi machine from Paul, to be found here in the forum, it includes also a gate)

Use a sustain pedal (preferred half pedal, if your virtual piano supports these). Attached is a simulation for sustain and sostenuto pedal “sustain pedal.lua”. I know you can’t operate it, when playing guitar with two hands, but at least you can experiment and experience what you will miss without it. My virtual piano recognizes the (virtual) sostenuto pedal, but I don’t know how to use it. Your feedback is welcome.

Recommended good & free virtual piano (VST):
Soundmagic Piano One (Neo Piano - Piano One - Sound Magic)

I put all goodies from above into the attached midi machine: “optimizer” (attached). I see this as a Beta-Version, your feedback is appreciated.


  • Sustain pedal, set it between 0 and 127 and hear the different sustain.
    As stated above it is meant as a testing device.
  • Low cut: Set to the lowest note you want to hear (e.g. 28 is low E
    on a 4 string bass, 38 is dropped D, 40 is low E on a 6 string guitar).
  • High cut: Set to the highest note you want to hear and add 1 (e.g. 88
    is the high e note on the 24th fret, set: 89).
  • Gate Threshold: This is the minimum velocity that puts out a note on
    trigger, notes with lower velocities will be suppressed/cut.
  • Norm Low and Norm High are the parameters for the velocity
    normalizer, all velocity output values will be between this two figures.
  • Min Retrigger ms: is the time frame in which repeated notes will be
    suppressed, you can set it between 0 and 100 ms.
    Consider note lengths (in ms) which shall be played and set the
    Min Retrigger time below that. For example at 200 bpm a 1/32 note
    is 37.5 ms long (see attached table).
  • root sets the root note for the scale filter, choose the key with the
    next knob. If you don’t want to use this filter set the key to “chromatic”
    (turn clockwise to the max.position).


Sustain pedals.lua (735 Bytes)
Low and high cut.lua (525 Bytes)
Normalizer.lua (1.2 KB)
Optimizer.lua (4.2 KB)


Excellent work! this adds to the list of good tips.
But you should check your lua scripts, I tested the first one that contained errors. I can not say for the others.

Hi Herold, thanks, also for the hint, I checked it and found this " -" lost in the script, a relict from an earlier comment. I have exchangde the “sustain pedals.lua” file

Meanwhile, I found the error too, but it was not obvious to see :wink:

The Normalizer inside “Optimizer” script didn’t work as it should, here is the corrected version.
Optimizer.lua (4.3 KB)
The “Normalizer” script is O.K.

Thank you! I like scripts when they work because I don’t understand much about them :upside_down_face:

Experimenting with the optimizer script I learned that mainly two things make artefacts which detract from the enjoyment to play piano with MG2, especially when not playing very clean/accurate:

  1. Still remaining noise after use of the noise gate in MG2. Even when not playing the guitar some notes will be triggered. This can be deleted with the Gate_Threshold knob very efficiently. This value has to be adjusted according to guitar setting and playing style.

  2. Ghost notes produced when pushing the string(s) on the fret (or fingers on the string, I am not sure) or even worse when lifting off the finger(s). The latter can produce one or two undesired notes, typically with a short duration < 50 ms, but well to hear. Thats why I have tested a filter, which deletes all notes below an adjusteable time length. To do so the filter has to wait for this time before it can detect such notes and there will be additional latency as an adverse side effect (for about the set min. time). The filter works well (see picture,where the min. time was set to 30 ms), one have to check if the additional latency is acceptable. Beside the set (standard) midi channel where the filtered notes will be output, there is an unfiltered output with no additional latency on midi channel 16. If the latency is uncomfortable this channel can be used for monitoring and the other for recording a cleaned version.

To get an idea of the different latencies I have done some measurements:
My audio interface has a latency of approx. 9 ms (@48 kHz and 256 samples)
The detection latency of MB and MG2 depends on the frequency (f) of the played notes: Low frequencies needs more time to be detected because the periodic time (T) is longer (T = 1/f), for monophonic playing I measured approx. 60 ms for the low E on a 4-string bass (see pic), 25 ms for the low E on a 6-string guitar and approx. 10 ms for an high e on the 12 fret of the high e string. As a raw estimation you can use the formula for the detection latency in s: 0.0085 + 2 / frequency [Hz]. So it is approx. 8.5 ms + 2 times the periodoc time (wave length), which is quite fast in my oppinion.

I will integrate this filter in a new version of the “Optimizer” midi machine.

Cut short notes.lua (1.4 KB)


Inside the standalone version of MG2 the standard channel and channel 16 coming out of “Cut short notes” FX will be both played by the chosen instrument, which isn’ t a good idea. To solve this problem set the “Delete Channel 16” midi machine behind it (a slot below).
Delete channel 16.lua (314 Bytes)

Here is the announced new version “Optimizer2”, which includes the “Cut short notes” filter, while the retrigger blocker is now removed. To use it inside MG2 standalone, set “Delete Channel 16” behind it.
Optimizer2.lua (2.5 KB)