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