reMidi3 - Midi File Player Script [solved]

The problem is the reMidi3 plugin. I posted earlier about the audio issues I am having with this plugin. I deleted the song which uses reMidi3 and saved the gig under a different name. I open this gig without reMidi3 and everything works perfectly. The real question is, why is reMidi3 interfering with the audio output of other plugins?

I am using reMidi3 to trigger midi files, the same way I would use Kontakt to trigger an audio sample. Does the built-in midi player in GP5 have this ability? I assign keys on the keyboard to trigger different midi files, usually 1 to 4 measures long.

I use reMidi3 for two songs. I really need this too work or a plugin that can replace it.

Sounds like a bug in reMIDI3 — I don’t know what that plugin is or does but have you been in touch with its developer?

reMidi3 is basically a midi file player. It allows you to trigger sections of or a short midi file from a pad or key on your keyboard. I love reMidi because I can run it through other plug-ins. If I am using Pianoteq, I connect reMidi to it and press a key on the keyboard and it plays the midi file, while I am playing something else. I wish the midi player in GP5 could do this.

I just emailed the developer about what happened in this thread and the earlier thread I posted on audio issues with reMidi.

With a little bit of GP Scripting it can easily do that.

For example, here’s a simple gigfile with a MIDI File player containing three songs. You can click on the buttons (or trigger those buttons from Notes) to play them

MidiPlayer.gig (245.2 KB)

1 Like

This could work, but it would be nice if it was monetary touch and the player would stop when pad or key is released. This is reMidi3 in action. I have the pads in the plugin assigned to a note on the keyboard and each pad has an attached midi file. I wish reMidi3 didn’t cause other issues within GP5.

That’s a simple change to the script but with respect, your wish was ā€œpress a key on the keyboard and it plays the midi fileā€

You didn’t say you wanted to stop it when you released the key

As @dhj said, its a small change to the script.

Try this:
MidiPlayer(2).gig (246.7 KB)

The widgets are now momentary touch, and the callback now checks for a value less than 1 on them (meaning they are off when you stop pressing them) to stop the player.

1 Like

This might work. I tried editing it, but when I assign notes on the midi controller it does not respond well. I can’t seem to retrigger them once pressed already. Thoughts on making it more responsive.

How are you doing those assignments? Are you sure you didn’t assign Note Off by mistake?

I selected ā€œLearnā€ and then pressed the key (note) on my keyboard (StudioLogic NumaX).

Yes, but did you turn off Learn before you released the key? If you didn’t, then you learned Note Off rather than Note On

1 Like

I think the script would need to be amended to react to NoteOff in order to work as its written?

What would this script with a note off look like?

I quickly hacked the script to add widgets for the NoteOff messages, which you’ll have to assign. Its not pretty, but it does work. You can always hide these extra widgets if you don’t want them taking up space,

MidiPlayer(3).gig (284.0 KB)

Maybe it would be better to not bother with widgets and just have the script respond to both NoteOn and NoteOff events

Definitely, I just hacked the other script quickly, knowing it was not the best way to go about it.
I’m sure someone else can write a much better version than I did.
A perfect opportunity for @Stringchaser to learn some scripting! :slight_smile:

1 Like

I just tried to extend the script for more midi tracks, I failed. I would like 10 or more midi clips available to use. Here is my version. Track 1, 2 and 3 work, 4 and 5 do not.
MidiPlayer(4) 4 and 5 not working.gig (181.3 KB)

OK - you defined handles for the buttons but you did not declare those new buttons in the script nor modify the callbacks to respond to them.
Here’s a modified version of that script for you to try

//$<AutoDeclare>
// DO NOT EDIT THIS SECTION MANUALLY
Var
   MidiPlayer : PluginBlock
   T1 : Widget
   T2 : Widget
   T3 : Widget
   T4 : Widget
   T5 : Widget
   StopPlayer : Widget
   //These are the widgets for the Note Off messages.
   Off1 : Widget
   Off2 : Widget
   Off3 : Widget
   Off4 : Widget
   Off5 : Widget
//$</AutoDeclare>

const
   TrackSelectParameter : integer = 0
   PlayParameter : integer = 3
   
// Called when any of several widgets changed
// The widget and index parameters are optional
On WidgetValueChanged(w : Widget, index: integer, newValue : double) from T1, T2, T3, T4, T5

   // Use the index as the track number
var
   trackValue : double = MidiToParamEx(index, 0, 127, 0.0, 1.0)

   SetParameter(MidiPlayer, TrackSelectParameter, trackValue)
   
   //SetWidgetValue(w, 0)
   
   SetParameter(MidiPlayer, PlayParameter, 1)
   If newValue < 1  then 
   SetParameter(MidiPlayer, PlayParameter, 0)

End
End
//When the NoteOff message is received
On WidgetValueChanged(w : Widget, index: integer, newValue : double) from Off1, Off2, Off3, Off4, Off5
   SetParameter(MidiPlayer, PlayParameter, 0)
   SetWidgetValue(T1, 0)
   SetWidgetValue(T2, 0)
   SetWidgetValue(T3, 0)
   SetWidgetValue(T4, 0)
   SetWidgetValue(T5, 0)
   SetWidgetValue(w, 0)
End
On WidgetValueChanged(newValue : double) from StopPlayer
    SetParameter(MidiPlayer, PlayParameter, 0)
    SetWidgetValue(StopPlayer, 0)
  
End
1 Like

Thank you for your help everyone. This is what I have come up with. I will have to get used to the feel of playing this. reMidi is much more responsive with the midi in block. Plus, I am able to launch and overlap midi clips.
MidiPlayer(5).gig (319.2 KB)

What is the issue with reMidi? Is it just that noise or interference is heard?
If so it may be that the developer didn’t clear the audio buffers and so there is random bits set