Giter Club home page Giter Club logo

midi-unreal's People

Contributors

geromatic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

midi-unreal's Issues

License clarification

There are mixed licenses in the code base -- the subpackages could use clarification as to the licenses, e.g. the Scott Bishel copyright as listed would be all rights reserved

Make the event time (On Tick and Off Tick) available in Break MidiEvent

The Time variable in OnMidiEvent seems to give the current playback time when the game thread processes the midi event, not the time recorded in the midi file and associated with the event itself. The resulting value is framerate dependent. This makes it difficult to respond to notes in a specific time range, since you don't know how the Time variable corresponds to the note's normally recorded time.

Additionally, the value of Time doesn't scale with Playback Speed, so the Time can be wildly different than the recorded time in the midi file.

If the "current playback time" behavior of Time isn't a bug, please expose the recorded time of the event in Break MidiEvent.

Android Build issue with ver2.51 - UE4 4.17.2

Hi,
When I try building my project for Android with UE4 4.17.2, it doesn't work properly. It looks like all MIDI Events are called at the same time just after it starts the MIDI Processor Component.

I also tried building the example project https://www.dropbox.com/s/gh5ym2uc3wprgia/Midi_Project.zip?dl=0
both with UE4 4.16.3 and UE4 4.17.2 and the results are the below.

UE4 4.16.3 (Midi Asset ver.2.42)Android Development Build: Works(the cubes blink)
UE4 4.16.3 (Midi Asset ver.2.42)Android Shipping Build: Works(the cubes blink)
UE4 4.17.2 (Midi Asset ver.2.51)Android Development Build: Not Working(Nothing happen on the black screen)
UE4 4.17.2 (Midi Asset ver.2.51)Android Shipping Build: Not Working(Nothing happen on the black screen)

Is this a bug?
As we faced a syncing problem with wave file and the MIDI file, we hope to try the newer version of your plugin.
Thanks,

Mac/IOS unavailable due to UE4 (4.21) engine compiler bug

After UE4 updated their SDK to 10.14(UE4.21) for Mac. attempting to build the plugin causes a error with struct FVector.

[00:02:45.469] /Users/build/RocketSync/4.21.0-4541578+++UE4+Release-4.21/Working/Engine/Source/Runtime/Core/Public/Math/Vector.h:29:8: error: redefinition of 'FVector'
[00:02:45.469] struct FVector
[00:02:45.469] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/NumberFormatting.h:97:8: note: previous definition is here
[00:02:45.469] struct FVector

Link to Logfile

MidiProcessor::process() is losing time

I believe it's because how mMsElapsed is calculated. I replaced it by mMsElapsed = FPlatformTime::ToMilliseconds(now - mStartMs); and it works ok. (mStartMs is set in start() as mStartMs = FPlatformTime::Cycles();)

Also, I think it's better to use actor time or game time, instead of platform time. This way the time can stop when game is paused or time dilation can be applied.

Seeking Platform Testers

I am trying to get MIDI to work on all platforms that Unreal supports.

MIDI Interface [Input/Output] can only run on Linux, Window, Mac/IOS

if there are any bugs can you post the error log

Midi component disappears on engine relauch

I added the Midi Processor comp. to my ACharacter, set everything up, it was working, but after saving, closing the engine and opening again, the component was gone and all the nodes were invalid

Linux rebuild issue

Trying to rebuild the plugin from github after receiving the different engine version error in Linux UE 4.22.3.

The parentheses error can be fixed, but I'm not sure how to get rid of the alsa include error, because alsa-dev libs are installed and /usr/include/alsa/asoundlib.h exists.

Any suggestions would be appreciated.

Creating makefile for ProceduralMIDITestEditor (ini files are newer than makefile)
@progress push 5%
Creating makefile for UnrealHeaderTool (ini files are newer than makefile)
@progress push 5%
@progress pop
------- Build details --------
Using toolchain located at '/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v13_clang-7.0.1-centos7/x86_64-unknown-linux-gnu'.
Using clang (/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v13_clang-7.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '7.0.1' (string), 7 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v13_clang-7.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink  circularly dependent libraries (no FixDeps).
------------------------------
Parsing headers for ProceduralMIDITestEditor
  Running UnrealHeaderTool "/Documents/Unreal Projects/ProceduralMIDITest/ProceduralMIDITest.uproject" "/Documents/Unreal Projects/ProceduralMIDITest/Intermediate/Build/Linux/B4D820EA/ProceduralMIDITestEditor/Development/ProceduralMIDITestEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors
Reflection code generated for ProceduralMIDITestEditor in 4.3238604 seconds
@progress pop
------- Build details --------
Using toolchain located at '/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v13_clang-7.0.1-centos7/x86_64-unknown-linux-gnu'.
Using clang (/UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v13_clang-7.0.1-centos7/x86_64-unknown-linux-gnu/bin/clang++) version '7.0.1' (string), 7 (major), 0 (minor), 1 (patch)
Using bundled libc++ standard C++ library.
Using lld linker
Using llvm-ar : /UnrealEngine/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v13_clang-7.0.1-centos7/x86_64-unknown-linux-gnu/bin/llvm-ar
Using fast way to relink  circularly dependent libraries (no FixDeps).
------------------------------
Performing 17 actions (10 in parallel)
[2/17] Compile MidiAsset.gen.cpp
[9/17] Compile Module.ProceduralAudio.cpp
[1/17] Compile MidiAssetModule.cpp
[3/17] Compile MidiAsset.init.gen.cpp
[6/17] Compile Module.MidiAssetEditor.cpp
[5/17] Compile Module.Midi.gen.cpp
[10/17] Compile Module.ProceduralAudio.gen.cpp
[8/17] Compile Module.MidiInterface.cpp
[4/17] Compile Module.Midi.cpp
[7/17] Compile Module.MidiAssetEditor.gen.cpp
In file included from /Documents/Unreal Projects/ProceduralMIDITest/Plugins/MidiAsset/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/Midi/Module.Midi.cpp:13:
/Documents/Unreal Projects/ProceduralMIDITest/Plugins/MidiAsset/Source/Midi/Classes/Event/Meta/MetaEvent.cpp:54:35: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
        if (eventData.type >= TEXT_EVENT && eventData.type <= CUE_POINT ||
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
/Documents/Unreal Projects/ProceduralMIDITest/Plugins/MidiAsset/Source/Midi/Classes/Event/Meta/MetaEvent.cpp:54:35: note: place parentheses around the '&&' expression to silence this warning
        if (eventData.type >= TEXT_EVENT && eventData.type <= CUE_POINT ||
                                         ^
            (                                                          )
In file included from /Documents/Unreal Projects/ProceduralMIDITest/Plugins/MidiAsset/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/MidiInterface/Module.MidiInterface.cpp:2:
/Documents/Unreal Projects/ProceduralMIDITest/Plugins/MidiAsset/Source/MidiInterface/Classes/RtMidi.cpp:1444:10: fatal error: 'alsa/asoundlib.h' file not found
#include <alsa/asoundlib.h>
         ^~~~~~~~~~~~~~~~~~
[11/17] Compile Module.MidiInterface.gen.cpp
1 error generated.
[12/17] Link (ld) libUE4Editor-MidiAsset.so
[13/17] Link (ld) libUE4Editor-MidiAssetEditor.so
1 error generated.
[14/17] Link (ld) libUE4Editor-ProceduralAudio.so
LogInit: Warning: Still incompatible or missing module: ProceduralMIDITest
LogInit: Warning: Still incompatible or missing module: Midi
LogInit: Warning: Still incompatible or missing module: MidiAsset
LogInit: Warning: Still incompatible or missing module: MidiAssetEditor
LogInit: Warning: Still incompatible or missing module: MidiInterface
LogInit: Warning: Still incompatible or missing module: ProceduralAudio

Speed of 1.0 plays MIDI file too fast

I've got a short MIDI file - a 64-note phrase at 110bpm - and I'm running it against a 110bpm looping metronome click WAV. The only way I can get the MIDI to play at approximately the correct speed is to set the Speed option to ~0.92, since at 1.0 it runs way too fast.

Is this a bug? What's the relationship between Speed and the tempo of MIDI files?

Ideally (and maybe this counts as a feature request) I'd like to have a settable BPM value that overrides any tempo messages in a MIDI file and can be changed programmatically - this would be great for procedural note variations. I understand that BPM is a meta-event in MIDI files, and that it's only a guide to the delta time between ticks in the file...so maybe a BPM setter could work on files which include a BPM event (and be ignored for files which don't).

Meanwhile though, I'm really struggling to play at the right speed and stay synced with other fixed-tempo material.

Thanks in advance! (And I can share the MIDI file, if that helps)

4.23 Compatible?

Heya, noticed you didn't update compatibility on the marketplace, but wondering if the plugin is working in 4.23? happy to use the c++ version from this github, but just wanted to check in before trying.

Join in on the Development

Anyone and everyone is welcome to join in the development of the project. If you have any ideas that you would like to add to the project. I say go for it.

Just put a Pull Request up and ill look into it.

Allow midi playback in reverse

I wanted to create a scrubber that lets me skip forward and backwards through the music, then I realized there's no way for me to tell the midi processor to play backwards, or to skip to a specific time. I can set the playback speed higher to scrub forward (and with some tricksy math I could even skip forward a fairly specific amount of time in a single frame), but it doesn't seem like there's any way I can move backward other than restarting the midi from the beginning. It would be nice if I could play midi events backwards, and even nicer if it could flip the event on/offs so the sounds played in reverse too.

Using midi to trigger events for non-real-time capture

Hi,

I'm trying to render to (hi-res) video, using a midi file solely to drive level events. This project is making it all super-simple to wire things up (it's super clean, thanks!), but it seems to run in real-world time (I think) which is a bit awkward for my purposes, as my rendering is distinctly slower than realtime – I'd like to be able to use game elapsed time, or even to supply my own ticks into MidiProcessor::process.

Any interest in supporting this, or any thoughts on the best way for me to implement it?

Cheers,
Matt.

Mac/IOS Users Readme

Interacting with MIDI devices on mac is disable for the Marketplace. to @re-enable uncomment e8cf49d

Somehow "AudioCore/AudioCore.h" could not be found when Epic compiled the plugin. So atm you must use the c++ plugin to include Mac/IOS MIDI device support

MIDI variables disappear after restart

Steps to reproduce:
1.
2021-07-05 21_15_09-Unreal Project Browser
2.
2021-07-05 21_15_40-Unreal Project Browser
3.
2021-07-05 21_16_38-Unreal Project Browser
4. Enable plugin and restart project
2021-07-05 21_19_25-Plugins
5. a) Create somwhere let's say in ThirdPersonCharacter blueprint variables or add components from MIDI plugin
2021-07-05 22_28_44-
5. b) Save and restart
6. a) Open project one more time and you see this while opening editor:
2021-07-05 22_29_45-Message Log
6. b) and this while opening blueprint containing MIDI components or variables. Everything is gone:
2021-07-05 22_31_21-ThirdPersonCharacter

Reproduced multiple times on different PCs and on different engine versions supporting the plugin. I tried this https://answers.unrealengine.com/questions/770929/unreal-cant-find-my-player-blueprint-assets-please.html but it didn't help.

In C++ example code FBufferReader is not a istream

I'm on UE 4.22.3.
I'm trying to read in a Midi from file using the example code as a starting point and using the provided example code:

FString path;
TArray data;
bool result = FFileHelper::LoadFileToArray(data, path.GetCharArray().GetData());
FBufferReader reader((uint8*)data.GetData(), data.Num(), false);
MidiFile midi(reader);

fails to compile since FBufferReader is not a istream and MidiFile only accepts istreams in the file constructor.

How to play drum roll properly?

Drum roll or any other case of very short notes. For example, with MPQN of 454545 and resolution of 120, note can be as short as about 3 millisec, which is way shorter than the unreal tick (time per frame). As consequence, successive notes are processed at the same time. As a result my drum roll have "holes": instead of tatatatatatatatatatata it does tatata...ta..tata...tatata.

I don't know how sendMidiMessage() works. Is there a way to say "play the note after a delay"?

Is it working together with the midi plugin from Epic

Hi,
How exactly this plugin works with the midi from epic ?
Could you explain briefly what's the difference ?

I see one for now yours can send to the midi device while the epic one can receive only, are you complementary? do I need to disable the epic one ?

Midi files should have a right click->Reimport option

Every time I update my midi file, I have to delete the existing uasset, then reimport it from scratch, then hook up all the references again. It would be really great if the midi uasset had a right click -> Reimport option the same way wav assets do.

Compatibility with low-latency drivers (WASAPI / ASIO)?

Hello,

This plugin has served me well in the initial stages of my project (MIDI keyboard game), but there is too much noticeable input lag for me to use in a shipping build. Is there any way to use low-latency WASAPI or ASIO?

Thanks and great job so far

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.