analyzer slightly better tuned
This commit is contained in:
parent
9d8d34662d
commit
8cb2f4ac1b
@ -64,11 +64,11 @@ public class AudioAnalyzer {
|
|||||||
int tasksDone = 0;
|
int tasksDone = 0;
|
||||||
int totalTasks = audioData.getSampleCount()/audioData.getReadWindowSize();
|
int totalTasks = audioData.getSampleCount()/audioData.getReadWindowSize();
|
||||||
|
|
||||||
bassThresholdMultiplier = 1.5f;
|
bassThresholdMultiplier = 2.7f;
|
||||||
umThresholdMultiplier = 2f;
|
umThresholdMultiplier = 2f;
|
||||||
|
|
||||||
bassBinBegin = 1;
|
bassBinBegin = 2;
|
||||||
bassBinEnd = 15;
|
bassBinEnd = 16;
|
||||||
|
|
||||||
UMBinBegin = 300;
|
UMBinBegin = 300;
|
||||||
UMBinEnd = 450;
|
UMBinEnd = 450;
|
||||||
@ -129,7 +129,7 @@ public class AudioAnalyzer {
|
|||||||
|
|
||||||
if (work) {
|
if (work) {
|
||||||
Gdx.app.debug("Audio Analyzer", "Done getting spectral flux.");
|
Gdx.app.debug("Audio Analyzer", "Done getting spectral flux.");
|
||||||
|
Gdx.app.debug("Audio Analyzer", "window count: " + bassSpectralFlux.size);
|
||||||
shrinkData();
|
shrinkData();
|
||||||
containsData = true;
|
containsData = true;
|
||||||
Gdx.app.debug("Audio Analyzer", "USING SEED: " + PUID);
|
Gdx.app.debug("Audio Analyzer", "USING SEED: " + PUID);
|
||||||
|
@ -34,7 +34,7 @@ public class WavAudioData implements AudioData {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readIndexUpdate() {
|
public void readIndexUpdate() {
|
||||||
readIndex = (int) (playbackMusic.getPosition() * decoder.getSampleRate() / (float)readWindowSize);
|
readIndex = (int) (playbackMusic.getPosition() * decoder.getSampleRate() / readWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,6 +2,7 @@ package zero1hd.polyjet.audio.map;
|
|||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.audio.Music;
|
import com.badlogic.gdx.audio.Music;
|
||||||
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
|
|
||||||
import zero1hd.polyjet.audio.AudioData;
|
import zero1hd.polyjet.audio.AudioData;
|
||||||
@ -94,7 +95,7 @@ public class GamePlayMap {
|
|||||||
public EntitySpawnInfo safeNextEntity() {
|
public EntitySpawnInfo safeNextEntity() {
|
||||||
playableClip.readIndexUpdate();
|
playableClip.readIndexUpdate();
|
||||||
if (index != playableClip.getReadIndex()) {
|
if (index != playableClip.getReadIndex()) {
|
||||||
index = playableClip.getReadIndex();
|
index = Math.max(0, playableClip.getReadIndex()-1);
|
||||||
return nextEntity(false);
|
return nextEntity(false);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -69,7 +69,7 @@ public class RhythmMapAlgorithm implements Runnable {
|
|||||||
|
|
||||||
map.addToMap(Entities.BAR,
|
map.addToMap(Entities.BAR,
|
||||||
MathUtils.round(3),
|
MathUtils.round(3),
|
||||||
(1.5f/avgBPS)*speedMod);
|
(8f/avgBPS)*speedMod);
|
||||||
} else {
|
} else {
|
||||||
if (UMPeaks.get(index) != 0) {
|
if (UMPeaks.get(index) != 0) {
|
||||||
// map.addToMap(Entities.BAR,
|
// map.addToMap(Entities.BAR,
|
||||||
|
@ -69,6 +69,8 @@ public class VolumeWindow extends Window {
|
|||||||
|
|
||||||
public void setMusic(AudioData music) {
|
public void setMusic(AudioData music) {
|
||||||
this.music = music;
|
this.music = music;
|
||||||
music.getPlaybackMusic().setVolume(prefs.getFloat("music vol")/100f);
|
if (music != null) {
|
||||||
|
music.getPlaybackMusic().setVolume(prefs.getFloat("music vol")/100f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user