How do I use Audio Analyser?

0 favourites
  • 2 posts
From the Asset Store
100+ Musical High Quality Sound Effects for your game!
  • I've been trying to use audio analyser to make a background like Super Hexagon. I'm using Construct 2 r180. To preview, I am using Chrome Canary.

    The event is

    System > General > Compare 2 Values > First value: round(Audio.AnalyserRMSLevel("pew", 0)) | Comparison: > Greater than | Second value: -22
    [/code:1g99xkao]
    The action is
    [code:1g99xkao]
    System > Layers & Layout >  Set layer background color > Layer: 0 | Color: rgb(random(255), random(255), random(255))
    [/code:1g99xkao]
    
    I found that Audio.AnalyserRMSLevel("pew", 0) always outputs 0, regardless if the music is off or on.
    Then I used the Audio analyser sample project and imported the same music and changed the play audio action to play my music, and then I imported the code from above, and it worked exactly how I wanted it to.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You have to add Analyzer then you should succeed:

    System > On start of layout | Audio > Add analyzer effect to tag "pew" (FFT size 512, smoothing 0) [/code:3tx4vs09]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)