Inventory Engine
v4.0
|
This component lets you pick an audio source (either global : the whole scene's audio, a unique source, or the microphone), and will cut it into chunks that you can then use to emit beat events, that other objects can consume and act upon. More...
Inherits MonoBehaviour.
Public Types | |
enum | Modes { Modes.Global, Modes.AudioSource, Modes.Microphone } |
Public Member Functions | |
virtual void | FindPeaks () |
virtual void | PastePeaks () |
virtual void | ClearPeaks () |
virtual void | Initialization () |
Public Attributes | |
Modes | Mode = Modes.Global |
AudioSource | TargetAudioSource |
int | MicrophoneID = 0 |
float | SampleInterval = 0.02f |
int | SpectrumSamples = 1024 |
FFTWindow | Window = FFTWindow.Rectangular |
int | NumberOfBands = 8 |
float | BufferSpeed = 2f |
Beat[] | Beats |
float[] | RawSpectrum |
float[] | BandLevels |
float[] | BufferedBandLevels |
float[] | BandPeaks |
float[] | LastPeaksAt |
float[] | NormalizedBandLevels |
float[] | NormalizedBufferedBandLevels |
float | Amplitude |
float | NormalizedAmplitude |
float | BufferedAmplitude |
float | NormalizedBufferedAmplitude |
bool | Active = false |
bool | PeaksPasted = false |
Protected Member Functions | |
virtual void | Awake () |
virtual void | Update () |
virtual IEnumerator | Analyze () |
virtual void | HandleBuffer () |
virtual void | ComputeBandLevels () |
virtual void | ComputeAmplitudes () |
virtual void | HandleBeats () |
virtual void | OnBeat (Beat beat, float rawValue) |
virtual IEnumerator | RemapBeat (Beat beat) |
virtual void | OnValidate () |
Protected Attributes | |
string | _microphone |
float | _microphoneStartedAt = 0f |
WaitForSeconds | _sampleIntervalWaitForSeconds |
int | _cachedNumberOfBands |
Static Protected Attributes | |
const int | _microphoneDuration = 5 |
const float | _microphoneDelay = 0.030f |
const float | _microphoneFrequency = 24000f |
This component lets you pick an audio source (either global : the whole scene's audio, a unique source, or the microphone), and will cut it into chunks that you can then use to emit beat events, that other objects can consume and act upon.
The sample interval is the frequency at which sound will be analyzed, the amount of spectrum samples will determine the accuracy of the sampling, the window defines the method used to reduce leakage, and the number of bands will determine in how many bands you want to cut the sound. The more bands, the more levers you'll have to play with afterwards. In general, for all of these settings, higher values mean better quality and lower performance. The buffer speed determines how fast buffered band levels readjust.
|
strong |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
bool MoreMountains.Tools.MMAudioAnalyzer.Active = false |
float MoreMountains.Tools.MMAudioAnalyzer.Amplitude |
float [] MoreMountains.Tools.MMAudioAnalyzer.BandLevels |
float [] MoreMountains.Tools.MMAudioAnalyzer.BandPeaks |
Beat [] MoreMountains.Tools.MMAudioAnalyzer.Beats |
float MoreMountains.Tools.MMAudioAnalyzer.BufferedAmplitude |
float [] MoreMountains.Tools.MMAudioAnalyzer.BufferedBandLevels |
float MoreMountains.Tools.MMAudioAnalyzer.BufferSpeed = 2f |
float [] MoreMountains.Tools.MMAudioAnalyzer.LastPeaksAt |
int MoreMountains.Tools.MMAudioAnalyzer.MicrophoneID = 0 |
Modes MoreMountains.Tools.MMAudioAnalyzer.Mode = Modes.Global |
float MoreMountains.Tools.MMAudioAnalyzer.NormalizedAmplitude |
float [] MoreMountains.Tools.MMAudioAnalyzer.NormalizedBandLevels |
float MoreMountains.Tools.MMAudioAnalyzer.NormalizedBufferedAmplitude |
float [] MoreMountains.Tools.MMAudioAnalyzer.NormalizedBufferedBandLevels |
int MoreMountains.Tools.MMAudioAnalyzer.NumberOfBands = 8 |
bool MoreMountains.Tools.MMAudioAnalyzer.PeaksPasted = false |
float [] MoreMountains.Tools.MMAudioAnalyzer.RawSpectrum |
float MoreMountains.Tools.MMAudioAnalyzer.SampleInterval = 0.02f |
int MoreMountains.Tools.MMAudioAnalyzer.SpectrumSamples = 1024 |
AudioSource MoreMountains.Tools.MMAudioAnalyzer.TargetAudioSource |
FFTWindow MoreMountains.Tools.MMAudioAnalyzer.Window = FFTWindow.Rectangular |