From 8bcea5cfff05d12efcf07c871b7f884929313c47 Mon Sep 17 00:00:00 2001 From: Recrown Date: Sun, 16 Jul 2017 13:34:56 -0500 Subject: [PATCH] tuning and minor map gen changes --- core/src/zero1hd/polyjet/audio/AudioAnalyzer.java | 4 ++-- .../src/zero1hd/polyjet/audio/map/RhythmMapAlgorithm.java | 7 +++---- core/src/zero1hd/polyjet/ui/builders/AudioGraph.java | 8 +++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/src/zero1hd/polyjet/audio/AudioAnalyzer.java b/core/src/zero1hd/polyjet/audio/AudioAnalyzer.java index 0f02e04..46635a2 100755 --- a/core/src/zero1hd/polyjet/audio/AudioAnalyzer.java +++ b/core/src/zero1hd/polyjet/audio/AudioAnalyzer.java @@ -68,9 +68,9 @@ public class AudioAnalyzer { umThresholdMultiplier = 1.5f; bassBinBegin = 1; - bassBinEnd = 25; + bassBinEnd = 17; - UMBinBegin = 300; + UMBinBegin = 350; UMBinEnd = 512; bassThresholdCalcRange = thresholdRangeCalc(0.3f); diff --git a/core/src/zero1hd/polyjet/audio/map/RhythmMapAlgorithm.java b/core/src/zero1hd/polyjet/audio/map/RhythmMapAlgorithm.java index 1116444..cdc5b95 100755 --- a/core/src/zero1hd/polyjet/audio/map/RhythmMapAlgorithm.java +++ b/core/src/zero1hd/polyjet/audio/map/RhythmMapAlgorithm.java @@ -58,9 +58,8 @@ public class RhythmMapAlgorithm implements Runnable { if (bassPeaks.get(index) != 0 || UMPeaks.get(index) != 0) { if (bassPeaks.get(index) >= avgBass) { //TODO basic void circle spawning - int warningTime = (int) (map.goBack((int) (windowPerSecond*1.5f))/windowPerSecond); - - float endRadius = (bassPeaks.get(index)/bassMax)*(Polyjet.GAME_AREA_HEIGHT/2f); + float warningTime = map.goBack((int) (windowPerSecond*1.5f))/windowPerSecond; + float endRadius = (bassPeaks.get(index)/bassMax)*(Polyjet.GAME_AREA_HEIGHT/4f); map.addToMap(Entities.VOID_CIRCLE, endRadius, rand.nextFloat()*Polyjet.GAME_AREA_WIDTH, @@ -71,7 +70,7 @@ public class RhythmMapAlgorithm implements Runnable { map.resetIndex(); } - if (bassPeaks.get(index) != 0) { + if (UMPeaks.get(index) >= avgUM) { int spawnLocations = (Polyjet.GAME_AREA_WIDTH-8)/8; map.addToMap(Entities.BAR, MathUtils.round(rand.nextFloat()*spawnLocations)*8, diff --git a/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java b/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java index 1859fb1..d9371f8 100755 --- a/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java +++ b/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java @@ -43,11 +43,11 @@ public class AudioGraph extends Actor { if (Gdx.input.isKeyPressed(Keys.COMMA)) { if (scale > 0.05f) { - scale -= 0.05f; + scale -= 0.25f; } } else if (Gdx.input.isKeyPressed(Keys.PERIOD)) { - if (scale < audioGraph.getHeight()) { - scale += 0.05f; + if (scale < audioGraph.getHeight()+30f) { + scale += 0.25f; } } if (Gdx.input.isKeyJustPressed(Keys.M)) { @@ -57,6 +57,8 @@ public class AudioGraph extends Actor { } else { displayMode = 0; } + } else if (Gdx.input.isKeyJustPressed(Keys.SLASH)) { + scale = audioGraph.getHeight(); } switch (displayMode) { case 0: