From 85bfd00bade0d7413b578d7152afa6cc8f93f1d6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 24 May 2024 16:38:35 -0400 Subject: [PATCH 1/6] desktop vis testing --- Project.xml | 1 + hmm.json | 9 ++++++++- source/funkin/audio/visualize/ABotVis.hx | 8 +++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Project.xml b/Project.xml index 24cdac270..03e87e2d8 100644 --- a/Project.xml +++ b/Project.xml @@ -125,6 +125,7 @@ + diff --git a/hmm.json b/hmm.json index 288aa80b8..a1998f515 100644 --- a/hmm.json +++ b/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", diff --git a/source/funkin/audio/visualize/ABotVis.hx b/source/funkin/audio/visualize/ABotVis.hx index ca77dd58a..15596318c 100644 --- a/source/funkin/audio/visualize/ABotVis.hx +++ b/source/funkin/audio/visualize/ABotVis.hx @@ -58,8 +58,8 @@ class ABotVis extends FlxTypedSpriteGroup 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 override function draw() { - #if web if (analyzer != null) drawFFT(); - #end super.draw(); } @@ -94,7 +92,7 @@ class ABotVis extends FlxTypedSpriteGroup */ function drawFFT():Void { - var levels = analyzer.getLevels(false); + var levels = analyzer.getLevels(); for (i in 0...min(group.members.length, levels.length)) { From 6c0d998edd02f39863b840e5557fdb8375d367b5 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 28 May 2024 01:18:18 -0400 Subject: [PATCH 2/6] update funkVis in hmm --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index a1998f515..e364e405f 100644 --- a/hmm.json +++ b/hmm.json @@ -49,7 +49,7 @@ "name": "funkin.vis", "type": "git", "dir": null, - "ref": "c6a1e24d48646849ea63563ca45561512c953779", + "ref": "38261833590773cb1de34ac5d11e0825696fc340", "url": "https://github.com/FunkinCrew/funkVis" }, { From f2dd626ed9ab616d6b66d72fb2b399683fd11999 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 4 Jun 2024 22:37:51 -0400 Subject: [PATCH 3/6] rollback viz hmm --- hmm.json | 2 +- source/funkin/audio/visualize/ABotVis.hx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hmm.json b/hmm.json index e364e405f..a1998f515 100644 --- a/hmm.json +++ b/hmm.json @@ -49,7 +49,7 @@ "name": "funkin.vis", "type": "git", "dir": null, - "ref": "38261833590773cb1de34ac5d11e0825696fc340", + "ref": "c6a1e24d48646849ea63563ca45561512c953779", "url": "https://github.com/FunkinCrew/funkVis" }, { diff --git a/source/funkin/audio/visualize/ABotVis.hx b/source/funkin/audio/visualize/ABotVis.hx index 15596318c..8ddc41691 100644 --- a/source/funkin/audio/visualize/ABotVis.hx +++ b/source/funkin/audio/visualize/ABotVis.hx @@ -58,7 +58,7 @@ class ABotVis extends FlxTypedSpriteGroup public function initAnalyzer() { @:privateAccess - analyzer = new SpectralAnalyzer(snd._channel.__source, 7, 0.01, 30); + analyzer = new SpectralAnalyzer(snd._channel.__source, 7, 0.1, 30); // analyzer.maxDb = -35; // analyzer.fftN = 2048; } From 4f0e77c974c7a62fb1deb6cc351668a4b01a4f92 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 6 Jun 2024 20:20:54 -0400 Subject: [PATCH 4/6] update hmm --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index ab55e30ba..4f3d9ac4d 100644 --- a/hmm.json +++ b/hmm.json @@ -56,7 +56,7 @@ "name": "funkin.vis", "type": "git", "dir": null, - "ref": "c6a1e24d48646849ea63563ca45561512c953779", + "ref": "38261833590773cb1de34ac5d11e0825696fc340", "url": "https://github.com/FunkinCrew/funkVis" }, { From c54c10f562e1931f39f0eb41d1f41c16c8505447 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 6 Jun 2024 20:46:12 -0400 Subject: [PATCH 5/6] lower fft res on desktop --- source/funkin/audio/visualize/ABotVis.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/funkin/audio/visualize/ABotVis.hx b/source/funkin/audio/visualize/ABotVis.hx index ed22092b6..1b0463144 100644 --- a/source/funkin/audio/visualize/ABotVis.hx +++ b/source/funkin/audio/visualize/ABotVis.hx @@ -55,6 +55,13 @@ class ABotVis extends FlxTypedSpriteGroup { @:privateAccess analyzer = new SpectralAnalyzer(snd._channel.__source, 7, 0.1, 30); + + #if desktop + // On desktop it uses FFT stuff that isn't as optimized as the direct browser stuff we use on HTML5 + // So we want to manually change it! + analyzer.fftN = 512; + #end + // analyzer.maxDb = -35; // analyzer.fftN = 2048; } From 7214e159e0174a04b21fd4f01bceaa405e062e4f Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 6 Jun 2024 20:50:53 -0400 Subject: [PATCH 6/6] update grig --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index 4f3d9ac4d..68e0c5cb0 100644 --- a/hmm.json +++ b/hmm.json @@ -63,7 +63,7 @@ "name": "grig.audio", "type": "git", "dir": "src", - "ref": "cbf91e2180fd2e374924fe74844086aab7891666", + "ref": "57f5d47f2533fd0c3dcd025a86cb86c0dfa0b6d2", "url": "https://gitlab.com/haxe-grig/grig.audio.git" }, {