BroAudio
Quick StartScripting APIAsset Store
  • Overview
    • Introduction
    • Getting Started
    • Compatibility
  • Core Features
    • Library Manager
      • Create The Library
      • Design The Sound
        • 🔊Volume
        • 🎚️Fading
        • 🔁Looping
        • 🎲Randomization
        • 💪Velocity
        • 🎛️Spatial & Mix
    • Audio Player
      • Music Player
      • Dominator Player
    • Playback Group
    • Audio Effect
    • No-Code Components
      • Sound Source
      • Sound Volume
      • Spectrum Analyzer
    • Addressables
    • Customization
  • Designs
    • Audio Mixer
  • Tools
    • Audio Clip Editor
    • Audio Effect Editor
    • Useful Attrubutes
  • Reference
    • Scripting API
      • Class
        • BroAudio
        • SoundSource
        • BroAdvice
      • Interface
        • IAudioPlayer
        • IMusicPlayer
        • IPlayerEffect
        • IAutoResetWaitable
        • IAudioSourceProxy
      • Struct
        • SoundID
        • Effect
        • Fading
      • Enums
        • BroAudioType
        • EffectType
        • StopMode
        • Transition
        • Ease
    • Unity API Integration
    • Audio Terminology
    • Technical Details
  • Others
    • Release Notes
    • Known Issues
      • Duplicate SoundID Issue
    • Roadmap
    • Support & Contact
Powered by GitBook
On this page
  • Introduction
  • How To Use?
  1. Core Features
  2. Library Manager
  3. Design The Sound

Velocity

Last updated 7 months ago

Introduction

Velocity helps determine which clip should be played in a given scenario. The concept originates from the MIDI keyboards in music production world. These devices capture the (the force with which a note is played) and use it to trigger different audio samples based on this value. This feature was designed in a similar way.

How To Use?

Set the to "Velocity" and set the value for each clip from low to high. These values will then be used as the bottom of a certain velocity range. Say if you have 2 clips set as 0 and 50, when the given velocity is 30, the first clip will be played, and if the given velocity is 60, the second clip will be played.

To give a velocity, simplicity just add to the .

BroAudio.Play(_hit).SetVelocity(60);
💪
velocity
Page cover image
PlayMode
method chain
.SetVelocity(velocity)