Midi device disconnect Help

Hi,

I try to learn how to connect my midi device ( got Akai MidiMix and APCkey25 ) to UE4 and control scene with it.
Till now I can manage get working midi controller in UE4 ( controlling intensity of one point light ) but I get some error and I cant get fix it.
When I run game midi working but after 20 or 50 seconds it stops sending signal. I try also to replace midi device but it still get this kind of error.

So my problem is that my midi after 20 - 30 sec stop working.

Can some one help me with this.

Midi Controller Blueprint
[ATTACH=JSON]{“alt”:“Midi Controller Blueprint”,“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_186629_1584962084461_78”,“title”:“01_blueprint.jpg”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

Detail of blueprint
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_186630_1584962188987_599”,“title”:“02_detail-of-blueprint.jpg”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_186631_1584962274294_280”,“title”:“03_detail-of-blueprint.jpg”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_186632_1584962314294_849”,“title”:“04_detail-of-blueprint.jpg”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

SCENE
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_186633_1584962357272_428”,“title”:“05_scene.jpg”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

Midi connection


error text

The trick is to store it as a variable, in some blueprint that exists in the level!

Hi thank you for answer I record video - i add variables but nothing happen

Hmm, I timed it and it happened exactly 61 seconds after beginning play, so pretty sure it’s garbage collection. I still don’t understand why though, as you do store the variable! That should be enough? hmmmmmm

1 Like

yes you are right. I set “time between purging” on 10 ans when I hit play its stops after this 10 seconds. But when i set it on 0 its working with no problem.

Hi, were you able to solve this? I am having the same problem (Midi controller set as variable, after about 50/55 seconds it stops working), I guess It’s caused by garbage collection but I can’t really figure how to stop this behaviour.

1 Like

Hey Guys, any updates on this?
Thanks!

This guys solution worked well when put into the Level Blueprint.


Make sure to put Device ID and MIDI Reference into its own variable. Or else the garbage collector will kick them out.

1 Like