mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-15 03:13:45 +00:00
desktop vis testing
This commit is contained in:
parent
8a4769e206
commit
85bfd00bad
|
@ -125,6 +125,7 @@
|
|||
<haxelib name="flxanimate" /> <!-- Texture atlas rendering -->
|
||||
<haxelib name="hxCodec" if="desktop" unless="hl" /> <!-- Video playback -->
|
||||
<haxelib name="funkin.vis"/>
|
||||
<haxelib name="grig.audio" />
|
||||
|
||||
|
||||
<haxelib name="json2object" /> <!-- JSON parsing -->
|
||||
|
|
9
hmm.json
9
hmm.json
|
@ -49,9 +49,16 @@
|
|||
"name": "funkin.vis",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "2aa654b974507ab51ab1724d2d97e75726fd7d78",
|
||||
"ref": "c6a1e24d48646849ea63563ca45561512c953779",
|
||||
"url": "https://github.com/FunkinCrew/funkVis"
|
||||
},
|
||||
{
|
||||
"name": "grig.audio",
|
||||
"type": "git",
|
||||
"dir": "src",
|
||||
"ref": "cbf91e2180fd2e374924fe74844086aab7891666",
|
||||
"url": "https://gitlab.com/haxe-grig/grig.audio.git"
|
||||
},
|
||||
{
|
||||
"name": "hamcrest",
|
||||
"type": "haxelib",
|
||||
|
|
|
@ -58,8 +58,8 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
|
|||
public function initAnalyzer()
|
||||
{
|
||||
@:privateAccess
|
||||
analyzer = new SpectralAnalyzer(7, new LimeAudioClip(cast snd._channel.__source), 0.01, 30);
|
||||
analyzer.maxDb = -35;
|
||||
analyzer = new SpectralAnalyzer(snd._channel.__source, 7, 0.01, 30);
|
||||
// analyzer.maxDb = -35;
|
||||
// analyzer.fftN = 2048;
|
||||
}
|
||||
|
||||
|
@ -83,9 +83,7 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
|
|||
|
||||
override function draw()
|
||||
{
|
||||
#if web
|
||||
if (analyzer != null) drawFFT();
|
||||
#end
|
||||
super.draw();
|
||||
}
|
||||
|
||||
|
@ -94,7 +92,7 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
|
|||
*/
|
||||
function drawFFT():Void
|
||||
{
|
||||
var levels = analyzer.getLevels(false);
|
||||
var levels = analyzer.getLevels();
|
||||
|
||||
for (i in 0...min(group.members.length, levels.length))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue