A modded EditSaber for making beat saber maps.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
5.1 KiB

  1. [![](http://imgur.com/DWGECXG.gif)](https://www.youtube.com/watch?v=N4eA68BEpak)
  2. <sup>**Note:** The image above is an animated GIF, so there's some quality lost. Please see the [YouTube video](https://www.youtube.com/watch?v=N4eA68BEpak) for higher quality visualization of Disclosure's You and Me.</sup>
  3. This is an Unreal Engine 4 plugin that loads `.ogg` files at runtime and analyzes them to get the frequency spectrum to control gameplay, visualization and more.
  4. Feature list and pictures of available nodes:
  5. ---------------------------------------------
  6. * Load `.ogg` file from HDD
  7. * Load sound names and file paths from HDD to display list of sound
  8. * Get frequency spectrum of a loaded Sound
  9. * Get specific frequency values by using the calculated frequency spectrum
  10. * Start/Pause/Resume/Stop your Sound and Frequency Calculation through the build in Player
  11. ![](http://puu.sh/opY1K/16c2b7b3c5.jpg)
  12. ![](http://puu.sh/opYtT/ed734b2396.png)
  13. ![](http://puu.sh/opYPr/e850f7baf0.jpg)
  14. ![](http://puu.sh/oq0nd/c72fb3d48e.jpg)
  15. Installation
  16. -------------
  17. Unzip the package into the Plugins directory of your game.
  18. To add it as an engine plugin you will need to unzip the module into the plugin directory under where you installed UE4.
  19. **1.** Download the ZIP File.
  20. **2.** Create a `Plugins` folder in your game or engine directory and extract the plugin into it. It should look something like this:
  21. ![](http://puu.sh/oqMnc/f1f3292bc0.png)
  22. **3.** Open your project (and/or regenerate the Visual Studio files to have the plugin in your solution) and enable it in the plugin section:
  23. ![](http://puu.sh/oqM0q/9a07b082eb.png)
  24. **4.** To use the Plugin, add the `SoundVisComponent` to the Actor of your choice, which comes with the plugin:
  25. ![](http://puu.sh/oqMuE/10892c5bc2.png)
  26. **5.** Load a sound via its **ABSOLUTE** path (only `.ogg` files). The Component has a `Delegate | OnFileLoadCompleted`, which gets called and passes the complete `USoundWave` Reference, once the process is over (ASYNC)!:
  27. ![](http://puu.sh/oqN7E/72273737df.jpg)
  28. **5.1** NEVER CLOSE THE PROJECT WHILE LOADING A SOUND!
  29. **6.** Use the Calculate Frequency Spectrum function after you loaded a sound to get an `Array of Frequency Values`, which represents the Frequencies from 0 to ~22000hz:
  30. ![](http://puu.sh/oqNpa/8a3b11650c.jpg)
  31. **6.1** THIS ONLY WORKS WITH LOADED AND DECOMPRESSED .ogg FILES!
  32. **7.** Since this only analyzes one small segment of the Sound and we don't want ugly `Delay-Loops`, use these functions to Start/Pause/Resume/Stop the whole sound (will also play it!)
  33. ![](http://puu.sh/opYPr/e850f7baf0.jpg)
  34. **7.1** The analyzed Frequency Spectrum will be returned via a second `Delegate | OnFrequencySpectrumCalculated`, which also comes with the Component.
  35. ![](http://puu.sh/opYVk/aaf6479271.jpg)
  36. **8.** Now you can use the different frequency functions to get the values (for example if you want to get the values for bass, use 20 to 60 for SubBass and 60 to 250 for Bass. You can look up more on the internet.
  37. ![](http://puu.sh/opYtT/ed734b2396.png)
  38. **11.** You can find all functions available by going to the SoundVis category. They are explained in the [`SoundVisComponent.h`](https://github.com/eXifreXi/eXiSoundVis/blob/4.11/Source/eXiSoundVis/Public/SoundVisComponent.h) if you don't know how to use them:
  39. ![](http://puu.sh/oqNUm/317177f03d.png)
  40. When cooking, make sure to add the plugin to your projects dependencies!
  41. ![](http://i.imgur.com/fh8VB1T.png)
  42. Example project
  43. ---------------
  44. - 4.16 (No idea if properly commented or not and rather ugly, but maybe it helps!): http://www.cedric-neukirchen.net/Downloads/SoundVisDemo.7z
  45. License
  46. -------------
  47. By using this plugin you accept the CC-BY 4.0 license and
  48. The MIT License (MIT)
  49. Copyright (c) 2015 Cedric Neukirchen
  50. Permission is hereby granted, free of charge, to any person obtaining a copy
  51. of this software and associated documentation files (the "Software"), to deal
  52. in the Software without restriction, including without limitation the rights
  53. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  54. copies of the Software, and to permit persons to whom the Software is
  55. furnished to do so, subject to the following conditions:
  56. The above copyright notice and this permission notice shall be included in all
  57. copies or substantial portions of the Software.
  58. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  59. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  60. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  61. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  62. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  63. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  64. SOFTWARE.
  65. Contact
  66. -------------
  67. If you have any Questions, Comments, Bug reports or feature requests for this plugin,
  68. or you wish to contact me you can:
  69. email me - [email protected]
  70. contact me on the forum - Username: eXi
  71. contact me on the Discord Unreal-Slackers Server - Username: cedric_exi
  72. Credits
  73. --------------
  74. n00854180t - Helping a lot to get the loading of the .ogg file running
  75. moss - Helping to understand wave files