Announcement

Collapse
No announcement yet.

[SUPPORT] AudioAnalyzer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    I'm using the WINAPI implementation to add this feature to the plugin. Unfortunately I can only test it on windows platform, but if you have a log file you can send it to support@parallelcube.com

    Audio Analyzer
    Web | Marketplace | Support

    Comment


      #47
      Works flawlessly on android. But the plugin causes my game to crash in iOS. I did read it is experimental and mp3 doesn’t work in iOS, but it should atleast build and run in an iphone right ?

      Comment


        #48
        Can you send the log files to support@parallelcube.com?

        Audio Analyzer
        Web | Marketplace | Support

        Comment


          #49
          Originally posted by BYC View Post
          Can you send the log files to support@parallelcube.com?
          Just shared the logs. Just in case, i am also sharing it here


          The plugin crashes the project just by being enabled when deployed onto an ios device.
          It seems "libSDL2.dylib" is not being loaded. Any idea for a quick fix on my end ?


          Code:
          Version:             0.515 (0.7)
          Code Type:           ARM-64 (Native)
          Role:                Foreground
          Parent Process:      launchd [1]
          Coalition:            [1605]
          
          
          Date/Time:           2020-01-09 13:01:45.8371 +0530
          Launch Time:         2020-01-09 13:01:45.8255 +0530
          OS Version:          iPhone OS 13.3 (17C54)
          Release Type:        User
          Baseband Version:    4.01.02
          Report Version:      104
          
          Exception Type:  EXC_CRASH (SIGABRT)
          Exception Codes: 0x0000000000000000, 0x0000000000000000
          Exception Note:  EXC_CORPSE_NOTIFY
          Termination Description: DYLD, dependent dylib '@rpath/libSDL2.dylib' not found for '/private/var/containers/Bundle/Application/C6152FFF-E11A-49EC-8DC8-4B0C43582BD2/BallDasher.app/BallDasher', tried but didn't find: '/private/var/containers/Bundle/Application/C6152FFF-E11A-49EC-8DC8-4B0C43582BD2/BallDasher.app/Frameworks/libSDL2.dylib' '@rpath/libSDL2.dylib' '/usr/local/lib/libSDL2.dylib' '/usr/lib/libSDL2.dylib'
          Highlighted by Thread:  0
          
          Backtrace not available
          
          Unknown thread crashed with ARM Thread State (64-bit):
              x0: 0x0000000000000006   x1: 0x0000000000000001   x2: 0x000000016dd8e070   x3: 0x0000000000000093
              x4: 0x000000016dd8dc70   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
              x8: 0x0000000000000020   x9: 0x0000000000000009  x10: 0x2762696c79642e32  x11: 0x6c2f7273752f2720
             x12: 0x2f27202762696c79  x13: 0x2f62696c2f727375  x14: 0x2e324c445362696c  x15: 0x00202762696c7964
             x16: 0x0000000000000209  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000000
             x20: 0x000000016dd8dc70  x21: 0x0000000000000093  x22: 0x000000016dd8e070  x23: 0x0000000000000001
             x24: 0x0000000000000006  x25: 0x0000000105748000  x26: 0x0000000000000000  x27: 0x0000000105748000
             x28: 0x0000000000000000   fp: 0x000000016dd8dc40   lr: 0x0000000105732498
              sp: 0x000000016dd8dc00   pc: 0x000000010572b5e4 cpsr: 0x00000000
             esr: 0x00000000  Address size fault
          
          Binary images description not available
          
          Error Formulating Crash Report:
          Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯
          
          EOF

          Comment


            #50
            Hi

            The quick fix is to try to copy the dylib to one of the expected folders. You have the dylib in the Plugin folder \UE_4.24\Engine\Plugins\Marketplace\AudioAnalyzer\Source\Thirdparty\SDL2\Libraries\IOS, you will have to copy the libs for the rest of the decoders too. You can find that in \UE_4.24\Engine\Plugins\Marketplace\AudioAnalyzer\Source\Thirdparty\[decoder]\Libraries\IOS

            There is some bugs with the packaging UE4 process and thirdparty plugins. For example in Android platform you will have to copy the plugin folder to your project folder to be able to package it for arm64, With armv7 the packaging is correct. So you can try to copy the plugin folder inside your project before packaging to discard a packaging problem related to their bug. If the problem continues we can try to check more things with your help.

            Audio Analyzer
            Web | Marketplace | Support

            Comment


              #51
              Originally posted by BYC View Post
              Hi

              The quick fix is to try to copy the dylib to one of the expected folders. You have the dylib in the Plugin folder \UE_4.24\Engine\Plugins\Marketplace\AudioAnalyzer\Source\Thirdparty\SDL2\Libraries\IOS, you will have to copy the libs for the rest of the decoders too. You can find that in \UE_4.24\Engine\Plugins\Marketplace\AudioAnalyzer\Source\Thirdparty\[decoder]\Libraries\IOS

              There is some bugs with the packaging UE4 process and thirdparty plugins. For example in Android platform you will have to copy the plugin folder to your project folder to be able to package it for arm64, With armv7 the packaging is correct. So you can try to copy the plugin folder inside your project before packaging to discard a packaging problem related to their bug. If the problem continues we can try to check more things with your help.
              I can find the library files as you mentioned, but i have zero idea on where i need to copy-paste it. Can you guide me on the location to copy-paste it ?

              Comment


                #52
                You will need access to the root folder of your file system

                The error log suggests one of this paths:
                '/private/var/containers/Bundle/Application/C6152FFF-E11A-49EC-8DC8-4B0C43582BD2/BallDasher.app/Frameworks/libSDL2.dylib'
                '@rpath/libSDL2.dylib'
                '/usr/local/lib/libSDL2.dylib'
                '/usr/lib/libSDL2.dylib'


                The first one must be the correct path of a successfully packaging process but I think you can try anyway of that list.

                I'm going to investigate why the thirdparty libraries are not packaged in the expected path.

                Audio Analyzer
                Web | Marketplace | Support

                Comment


                  #53
                  Originally posted by BYC
                  Some questions
                  By str_magic on February 3, 2020 2:52 PM - Edited on February 3, 2020 4:00 PM
                  Was this question helpful?
                  Version: 4.22
                  Cannot use AudioManager in cpp, it's too hard to make it compile, always get link errors or headers not found.

                  Beats detection, it seems to me not accurate, Could you please share some information (for example, how to detect beats)?
                  Also (need, really detect beats accurate, like in time, clear and without noise).

                  Also, Could I analyse an audio file without playing? Cannont find any options.
                  Thank you very much!

                  Originally posted by BYC
                  Cannot use AudioManager in cpp, it's too hard to make it compile, always get link errors or headers not found.
                  If you want to compile the plugin sources you have a guidelines here:
                  https://www.parallelcube.com/content...older-versions

                  You can see too this tutorial about how to link and use thirdparty libraries in UE4 projects
                  https://www.parallelcube.com/2018/03...obile-project/

                  Originally posted by BYC
                  Beats detection, it seems to me not accurate, Could you please share some information (for example, how to detect beats)?
                  Also (need, really detect beats accurate, like in time, clear and without noise).
                  To define a custom range of the frequency analysis you must use the "Init Beat Tracking Config WLimits". To define the limits or the bounds of a band you need to use the Make Array node
                  You can set the low and high frecuency bound of the analysis bands. You only have two rules to make this list: sorted and no overlap.

                  So an example of valid bounds array:
                  0-10
                  11-40
                  80-100

                  And an example of invalid bounds array:

                  0-10
                  10-40 (overlap frequency 10Hz)

                  0-10
                  5-40 (overlap frequencies 5-10Hz)


                  In this image I have created 3 bands, the first one takes the accumulative result of frequencies from 0 Hz to 10 Hz and the second one from 11 Hz to 40 Hz..
                  You can override the threshold value for all the bands at this point too. The concept of the beat tracking analysis and this parameter can be found in this tutorial
                  https://www.parallelcube.com/2018/03...ion-algorithm/

                  Click image for larger version

Name:	InitBT.png
Views:	102
Size:	21.6 KB
ID:	1717953
                  The output of Get Beat Tracking will be an array of 3 elements, one for each band.

                  Click image for larger version

Name:	BetBT.png
Views:	69
Size:	8.3 KB
ID:	1717954

                  You can override one threshold value for each band using the WThreshold node

                  Click image for larger version

Name:	GetBTT.png
Views:	72
Size:	13.6 KB
ID:	1717955


                  Originally posted by BYC
                  Also, Could I analyse an audio file without playing? Cannont find any options.
                  The plugin is focused in real time analysis so there is no node to do a full beat tracking analysis without playing. But if you only want the analysis in real time without audio output you can set the Volume of the Audio Manager to 0 using Set Playback Volume node.

                  For example, an audiosurf style game. If you want to generate the track in front of the player before they reach that point you need to audio managers, one to play the song with volume 0 and make the analysis, and the second one start playing the same song but with a delay of 3-5 seconds (the time of the track generated in front of the player) and without analysis.

                  Audio Analyzer
                  Web | Marketplace | Support

                  Comment


                    #54
                    Question:
                    All the listed formats (mp3, wav, ogg) can be open at runtime and played inside the game ? Can get the soudwave file ?
                    From some replies I notice you're using SDL2, you're using the base or Mixer ? And in the case you're using SDL2 base why aren't you using the inclued SDL2 in the engine ?
                    Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
                    Hevedy - Image Tools: https://hevedy.itch.io/imagetools

                    Comment


                      #55
                      I'm using the audio module of SDL2 library to play the sounds, and taking the raw data during the playback. It's and audio system independient of the UE4 audio, but can be used inside the ue4 projects. You can load the audio and play from the original file at runtime. I have not been able to extract the audio from the soundwave class so you can't take the audio from a soundwave and use it in the plugin.

                      I'm using the base library. On plugin release the version of the sdl2 included by the engine was outdated, I don't know the current version included with the engine, I prefer to use the last version, for example that version included performance improvements on Android platform and some fixes than the UE4 version didn't have, at that time.

                      Audio Analyzer
                      Web | Marketplace | Support

                      Comment


                        #56
                        Hi BYC

                        I am running into a problem when using your Plugin. I want to create a project (as basic as possible) that uses frequency ranges of a selected audio device input/output to drive different parameters of objects.

                        I'm not an expert on blueprints, so I took your AA_StarterProject and changed it into a "loopback-version". Well maybe you can create a short guide for a very simple setup, but with the current changed up starter project, there's a problem with the frequency range defined as array index 1.

                        The array indexes (frequency ranges) 0, 2 & 3 return the correct values, but index 1 stays at 0.

                        Click image for larger version  Name:	AA0.jpg Views:	0 Size:	211.6 KB ID:	1737367

                        Thanks! And let me know if you need any further information.
                        Attached Files

                        Comment


                          #57
                          The problem is the size of the range in position 1 with that time window.

                          For a 0.02s window with a 44100 sample rate audio the minimal frequency bucket is:
                          Num_samples = 44100 * 0.02 = 882 (now we search for a window size power 2 to fit that number samples (1024), this is the size of our FFT analysis)
                          So each FFT result position represent a band of 44100 / 1024 = 43.0660 hz

                          Now you have a band of 120 - 90 = 30 Hz, that value falls below the band size of the FFT
                          If you request a range under that minimal you obtain a 0.


                          With a timewindow of 0.03 you can reduce the minimal size to work with your bounds.
                          44100 * 0.03 =1323 -> next power 2 value 2048
                          44100 / 2048 = 21.53 hz
                          So you can increase the time window by 0.03 sec to reduce the minimal range and obtain a value for all your curent bands (or you can increase the size of that band over 43)



                          Audio Analyzer
                          Web | Marketplace | Support

                          Comment


                            #58
                            Originally posted by BYC View Post
                            The problem is the size of the range in position 1 with that time window.

                            For a 0.02s window with a 44100 sample rate audio the minimal frequency bucket is:
                            Num_samples = 44100 * 0.02 = 882 (now we search for a window size power 2 to fit that number samples (1024), this is the size of our FFT analysis)
                            So each FFT result position represent a band of 44100 / 1024 = 43.0660 hz

                            Now you have a band of 120 - 90 = 30 Hz, that value falls below the band size of the FFT
                            If you request a range under that minimal you obtain a 0.


                            With a timewindow of 0.03 you can reduce the minimal size to work with your bounds.
                            44100 * 0.03 =1323 -> next power 2 value 2048
                            44100 / 2048 = 21.53 hz
                            So you can increase the time window by 0.03 sec to reduce the minimal range and obtain a value for all your curent bands (or you can increase the size of that band over 43)

                            Thanks for the quick answer! I had to read this a couple of times to understand it, but it makes sense!

                            I changed the range to 90 - 140. I will create sliders to directly adjust the values in the gamepreview later, so that I have direct feedback for how it looks. Then it will come in handy that I understand the problem with the timewindow

                            Comment


                              #59
                              I managed to get the libraries imported into the final ipa file, and the game no longer crashes in my iphone at startup. But no music plays. Do you know why it might not play in iOS ? There is simply no reaction, while building the same game for windows works like a charm. I really need to get it work in iphone somehow. Is it properly tested in iOS though ?

                              All the necessary .dylib files are successfully packaged in the framework folder.
                              Last edited by codehawk64; 03-31-2020, 12:13 PM.

                              Comment

                              Working...
                              X