[No longer available] Music player actor blueprint, load your music at runtime from your disk

IMPORTANT: cause my lack of correct english this post will be improved time by time. DOWNLOAD LINK

project no longer available.

OVERVIEW

[spoiler]

Old video, pre-widget interaction component.

[/spoiler]

Hey community,

after a lot of work i want to share with you my Music Player Actor, i know some people could be glad if can listen own music in game and with this actor you can allow them to do it!

Music Player Actor is composed by a plugin derivated from the @Rama’s Victory plugin and by a Blueprint and UMG widgets, it read .ogg files at runtime from the hard disk plus the music player “skin” is customizable.

HOW TO ADD PLUGIN AND CONTENTS TO AN EXISTING PROJECT

[spoiler]
For an existing Blueprint only project

  1. Add a new C++ class on your own, for example a Game Mode C++ class
  2. Close the editor and VS2015
  3. Unzip the MP_PluginAndContent4112 archive and copy and paste the “Content”, “Ogg”, “Plugins”, “Skins” folders into your project folder (is the same folder of yourproject.uproject file)
  4. Right click on yourproject.uproject, select “Generate Visual Studio project files”

For an existing C++ project

Skip step 1.

[/spoiler]

HOW TO MAKE A NEW SKIN

  1. In Skins folder create a new subfolder, the name of this subfolder will be the name of the new skin.
  2. In both “Template” and “ZY78” folder you can find PNG and PSD files, use it to create your new skin
  3. In the Music Player property you can find a “Skin Name” text field, inside it write the name of your new skin

[spoiler]


[/spoiler]

WHERE IS THE MUSIC PLAYER BLUEPRINT?

You can find the Actor blueprint under the Content->ZY78MusicPlayer->Blueprints folder, as you can see i added a child actor blueprint with a different static mesh for example.

[spoiler]


[/spoiler]

WHAT TO DO IN SHIPPED GAME

In the finished game you (or how play the game) only have to create Ogg and Skins folder in the game folder, the same folder where resides Binaries and Content folder, after this you/he/she can convert your/him/her music in .ogg files and put it in the Ogg folder, same for the custom skin as i explained above.

Updated to 4.14 and Widget Interaction component (you no longer need to show mouse cursor).

Download Link

Music by Badass Wolf Shirt

Thank you for this. I’m about to try to set it up now. I’ll keep you posted.

Do I need to install Rama’s plugin for this to work?

I’ve tried compiling this and I always have a screen overlay of a brown brick material. I don’t see it in the viewport but when I try both a windows build and a HTML5 build I don’t see anything but a static texture taking up the whole screen. Any suggestions? I’m using 4.14.

Nope, my plugin is based on Rama’s code but you don’t need it.

Can you post a screenshot?

Sure,

I wasn’t quite sure how to upload the screenshot directly here. That’s a link to it. The brick material is what I see when I build to both the Windows and HTML5 platform.

I followed your above instructions but I got several errors for functions that couldn’t be found. I posted a screenshot below. Are these functions included somewhere else or do I need to recreate them? Thanks in advance for your help.

You can use imgur for screenshot :slight_smile:

Looks like a rendering problem, i don’t think is related to my plugin.

P.S.

My plugin is intended to work only with Windows projects, never tested if it work with HTML5.

Yep, sometime happen but be sure to open the project in Visual Studio and recompile it.

Thank you ZioYuri78,

This is awesome and I’m trying to get it to work. I will tell you step by step what I’m doing and it keeps getting me to the same error.

  1. I created a new 4.14 project.
  2. I created a new C++ Class in the project.
  3. I closed the editor and VS2015
  4. I downloaded MusicPlayer414.rar and copied/merged the Content, Ogg, Plugins, and Skins folder into the existing project folder.
  5. I right clicked on myexistingproject.uproject and selected Generate Visual Studio Project Files.

Now, At this point when I open the project I have all the folders there but I get compiling errors for BP_MusicPlayer like the following:
**
“Could not find a function named “GetSoundWaveFromFile” in ‘BP_MusicPlayer’. Make sure ‘BP_MusicPlayer’ has been compiled for”

“Could not find a function named “GetFiles” in ‘BP_MusicPlayer’. Make sure ‘BP_MusicPlayer’ has been compiled for”

“Could not find a function named “ExplodeString” in ‘BP_MusicPlayer’. Make sure ‘BP_MusicPlayer’ has been compiled for”

“Could not find a function named “ExpoldeString” in ‘BP_MusicPlayer’. Make sure ‘BP_MusicPlayer’ has been compiled for”

“Could not find a function named “GetGameRootDirectory” in ‘BP_MusicPlayer’. Make sure ‘BP_MusicPlayer’ has been compiled for”**

The above screenshot is an example of this stage in the process. In your last response you said I may need to compile in visual basic again so this is what I did:

  1. I went to myproject folder and opened the myproject.sln Visual Basic file.
  2. In VisualBasic 2015, I pressed F5 to to compile and run the project.
  3. The Unreal Project opens in the editor and I’m back in the same position as before I compiled, with the same errors as the above screenshot.
  4. Pressing F5 isn’t the only way I’ve attempted to compile. I have also tried clicking “Build” and “Build ProjectName” and waiting for the build to complete successfully before closing Visual Basic and trying to reopen my Uproject. I always get the compile errors for BP_MusicPlayer.

My thoughts:
I’m not sure where I can find the missing functions. I assume it’s not as easy as just adding a new function with the for each of the missing ones listed above. I’m not sure of the blueprint logic that would need to go in them.

Thank you for patience. I love the functionality of the example project. I’m just trying to see how to implement it in an existing project.

That’s awesome! I was really looking for something like this. Thanks for sharing!

Hi Blood Eros, were you able to add the music player to an already existing project? I’m wondering if it’s just me having trouble.

@jparker86 have you enabled the plugin in editor under “Settings->Plugins”?

#FacePalm

Thank you so much Zio! I’m an idiot! What a great Happy New Year’s Solution!! I enabled the plugin and when the editor reopened I had absolutely no errors whatsoever. I’ll be revisiting this thread on payday. You’re awesome! :smiley:

Ahah, don’t worry, that happen to me very often :slight_smile:

Could you please update it for 4.16? I get that missing UE4Editor-MusicPlayerLib.dll error… :frowning:

As i said in PM next week i will start update it :slight_smile:

is this dead or are there any plans to update to 4.18?

Is dead, i tried to update it to 4.17/4.18 but no longer work, i tried to fix it but i have no idea where is the problem. The only solution is to rewrite it from scratch but i don’t have the time at the moment, i’m sorry.

I suggest you to try the eXi’s Sound Visualization Plugin.