Difference between revisions of "MNSI:Sound Libraries"

From Mischys Awesome Wiki
Jump to navigation Jump to search
(Created page with "Sound libraries in MNSI take the form of a struct asset. Pictured bellow. 800px ==What are they== They are essentially, a structure composed out of...")
 
Line 1: Line 1:
Sound libraries in MNSI take the form of a struct asset.
Sound libraries in MNSI take the form of a struct asset.
Pictured bellow.
Pictured bellow.
A blank sound library can be found in Located in MNSI-MainPlugin/MNSI_BasicSoundSet called MyCustomSoundSet, it is advised to copy this struct, rename the copy and work off of that.


[[File:PhysMat 05.JPG|800px]]
[[File:PhysMat 05.JPG|800px]]
Line 34: Line 36:
Cardboard-DEFINT  
Cardboard-DEFINT  
Cardboard-GrassySurface
Cardboard-GrassySurface
==Usage Types==
Since a MNSI component can have several sound library structs, there are two ways they can be thought of.
A struct containing all the sounds needed in your project, Or. A struct per physical material. For example, all sounds related to wood physical materials can be held in a Wooden sound library and loaded alongside others.
Currently, it is advised to use as few sound libraries as possible, but for organizational purposes, several structs can end up being more practical to manage.
==Loading sound libraries in MNSI==
There is a pseudo-node like way to load sound libraries. It is an easy way to manage which libraries are loaded.
Here is an example from the train demo on the main page. There is the default sound library loaded alongside the Train Set and MyCustomSoundLibrary.
[[File:SoundLib1.JPG|1000px]]
==How to load a library==
#Open the MNSI component blueprint used in your project, located in MNSI-MainPlugin. It is called MNSI-PhysicsSounds. ((Or MNSI-PhysicsSounds_SkeletalMesh if adding libraries or skeletal meshes.)) Then navigate to the SoundLibraryHolder function, located under the Functions tab on the left. By default it looks like this.
[[File:SoundLib2.JPG]]
#Sound libraries are loaded by adding a new struct variable. First click the plus to add a new variable, and give it any name needed.
[[File:SoundLib3.JPG]]
#Change the variable type to be of the type of the new sound library needed. Sound Library Structs become their own types. So a sound library named "WoodCollection" will need a variable type of "WoodCollection.". Simply start typing the name of the sound library and it will get displayed automatically. Once that's done, Compile the blueprint.
[[File:SoundLib4.JPG]]
#Once that's done drag it to the graph, and add a new Break node. Easiest way to do that is to drag out a connection from the pin of the struct, and type Break.
[[File:SoundLib5.JPG]]
#Drag out the Concat function. It is what combines sound libraries together.
[[File:SoundLib6.JPG]]

Revision as of 15:20, 8 June 2019

Sound libraries in MNSI take the form of a struct asset. Pictured bellow.

A blank sound library can be found in Located in MNSI-MainPlugin/MNSI_BasicSoundSet called MyCustomSoundSet, it is advised to copy this struct, rename the copy and work off of that.

PhysMat 05.JPG

What are they

They are essentially, a structure composed out of String->SoundBaseActor dictionaries. Strings act as a sort of key in of them selves. A key composed of two physical material names.

In essence, MNSI iterates over all sound libraries loaded and looks for a string key that matches either the collision event between the prop's own physical material, and the physical material of the surface being hit, Or if it fails to find one, to find the default sound set for the prop's own physical material.

The Structure part of the sound library struct should not be edited. It even says so in the Tooltip. The only area a user cares about is the Default Values below.

To add custom set, simply create a new blank value and write the name of the two physical materials to define a sound for the impact of.

Let's say Default_Stone and Default_Wood are two physical materials.

To define the sound that MNSI will play when A prop with the physical material Default_Stone will play when it collides with a surface using Default_Wood, simple add a new key for each of the 4 default values, and name it;

Default_Stone-Default_Wood

Then load a sound cue for each.

To create a fallback sound set for Default_Stone for MNSI to use when a Default_Stone prop collides with a physical material that is not defined, name it;

Default_Stone-DEFINT

It is possible to define most of the physical materials as just DEFINTs and maybe add one or two specific keys for really noticeable differences.

For example cardboard sounds almost the same when it collides with wood or stone or metal, but when it collides with a grassy surface, the sound is perceptually different.

In this example the sound library might look like this;

Cardboard-DEFINT Cardboard-GrassySurface

Usage Types

Since a MNSI component can have several sound library structs, there are two ways they can be thought of.

A struct containing all the sounds needed in your project, Or. A struct per physical material. For example, all sounds related to wood physical materials can be held in a Wooden sound library and loaded alongside others.

Currently, it is advised to use as few sound libraries as possible, but for organizational purposes, several structs can end up being more practical to manage.

Loading sound libraries in MNSI

There is a pseudo-node like way to load sound libraries. It is an easy way to manage which libraries are loaded. Here is an example from the train demo on the main page. There is the default sound library loaded alongside the Train Set and MyCustomSoundLibrary. SoundLib1.JPG

How to load a library

  1. Open the MNSI component blueprint used in your project, located in MNSI-MainPlugin. It is called MNSI-PhysicsSounds. ((Or MNSI-PhysicsSounds_SkeletalMesh if adding libraries or skeletal meshes.)) Then navigate to the SoundLibraryHolder function, located under the Functions tab on the left. By default it looks like this.

SoundLib2.JPG

  1. Sound libraries are loaded by adding a new struct variable. First click the plus to add a new variable, and give it any name needed.

SoundLib3.JPG

  1. Change the variable type to be of the type of the new sound library needed. Sound Library Structs become their own types. So a sound library named "WoodCollection" will need a variable type of "WoodCollection.". Simply start typing the name of the sound library and it will get displayed automatically. Once that's done, Compile the blueprint.

SoundLib4.JPG

  1. Once that's done drag it to the graph, and add a new Break node. Easiest way to do that is to drag out a connection from the pin of the struct, and type Break.

SoundLib5.JPG

  1. Drag out the Concat function. It is what combines sound libraries together.

SoundLib6.JPG