Blueprint Empty Project Sample

A basic sample to learn how to start with an empty project

Installation of the plugin

We can install the plugin form the UE4 Marketplace, if the engine version is supported (Only the last three engine version have direct support in the marketplace for Code Plugins).
If the engine version is older we can follow this guidelines to build the plugin for our version

Make an empty project

On the Epic Games Launcher go to Unreal Engine > Library and push the Launch button for your desired Engine Version
doc_blueprint_empty_launch
Now select the New Project tab > Blank Blueprint project > No Starter Content. Set a name project and Create Project
doc_blueprint_empty_project

Project Setup

Enable the Audio Analyzer plugin and restart the Unreal Editor
doc_blueprint_empty_enable_plugin
Now we can make a folder to contain the Non-assets files in the Content folder. This files don’t need to be imported by the engine we will use the file directly from the folder.
doc_blueprint_empty_asset_folder
The audio files can be copy directly to this folder. We don’t need to import this files using the engine.
doc_blueprint_empty_asset_file
We need to include this folder explicity in our package build. Open the Project Settings > Project section > Packaging > Additional Non-Asset Directories to Package
Add the folder name to the list
doc_blueprint_empty_asset_pack

Audio Analyzer Manager Setup

Now we can make the blueprint class of the Audio Analyzer Manager parent class.
Right click in our Content folder > Blueprint Class > Search for AudioAnalyzerManager class > Select
doc_blueprint_empty_bpmake
This Blueprint instance will be the used to make our Audio Analyzer Manager objects.
doc_blueprint_empty_bpclass

Playing the sound

We will use the level blueprint to contain the logic of the project, but you can make an actor and put the same content inside it and spawn the actor in the level.
We can open the level blueprint using the Toolbar > Blueprints > Open Level Blueprint
doc_blueprint_empty_level_bp
Now we are going to create a variable to contain the AudioAnalyzerManager. The Type for this variable is the blueprint previously created.
doc_blueprint_empty_bp_var
To instanciate the object we can use the Construct Object from Class node and set the class to the blueprint class of the Audio Analyzer
doc_blueprint_empty_construct
Now we need to initialize the audio source, we are going to use the player in this example, so we need to use the Init Player Audio node with the path to the audio file.
We have a Get Project Folder to retrieve the path to the Content folder in runtime, we need to add the non-asset folder and the filename to this path.
doc_blueprint_empty_initplay
After the initialization we can add a playback controler. In this case a Play node
doc_blueprint_empty_play
So the Event BeginPlay of the Level looks like that:
doc_blueprint_empty_event_begin

Setting up the visualizer

We are going to set up a frequency spectrum visualizer, so the first step is to initialize this visualizer using the Init Spectrum Config
We can put this node just after the Init Player Audio node
doc_blueprint_empty_init_vis
Now in the Event Tick we can request the visualizer data
We can add a check to only update the data when the audio is playing
doc_blueprint_empty_tick_check
And request the frequency spectrum data using Get Spectrum and, for example, display this values using a Print String node
doc_blueprint_empty_tick_freq
So the Event Tick of the Level looks like that:
doc_blueprint_empty_tick_event
Now the frequency spectrum values will be displayed on the screen during the playback
doc_blueprint_empty_level

Level Blueprint