slight revisions on analysis and map gen
This commit is contained in:
parent
8cb2f4ac1b
commit
05cf360e71
@ -68,12 +68,12 @@ public class AudioAnalyzer {
|
|||||||
umThresholdMultiplier = 2f;
|
umThresholdMultiplier = 2f;
|
||||||
|
|
||||||
bassBinBegin = 2;
|
bassBinBegin = 2;
|
||||||
bassBinEnd = 16;
|
bassBinEnd = 17;
|
||||||
|
|
||||||
UMBinBegin = 300;
|
UMBinBegin = 300;
|
||||||
UMBinEnd = 450;
|
UMBinEnd = 450;
|
||||||
|
|
||||||
UMThresholdCalcRange = thresholdRangeCalc(0.5f);
|
UMThresholdCalcRange = thresholdRangeCalc(0.6f);
|
||||||
bassThresholdCalcRange = thresholdRangeCalc(0.7f);
|
bassThresholdCalcRange = thresholdRangeCalc(0.7f);
|
||||||
|
|
||||||
Gdx.app.debug("Read freq", String.valueOf(audioData.getFormat().getSampleRate()));
|
Gdx.app.debug("Read freq", String.valueOf(audioData.getFormat().getSampleRate()));
|
||||||
|
@ -95,7 +95,8 @@ public class GamePlayMap {
|
|||||||
public EntitySpawnInfo safeNextEntity() {
|
public EntitySpawnInfo safeNextEntity() {
|
||||||
playableClip.readIndexUpdate();
|
playableClip.readIndexUpdate();
|
||||||
if (index != playableClip.getReadIndex()) {
|
if (index != playableClip.getReadIndex()) {
|
||||||
index = Math.max(0, playableClip.getReadIndex()-1);
|
index = playableClip.getReadIndex();
|
||||||
|
Gdx.app.debug("GPM", "index: " + index);
|
||||||
return nextEntity(false);
|
return nextEntity(false);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -60,21 +60,19 @@ public class RhythmMapAlgorithm implements Runnable {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (bassPeaks.get(index) != 0) {
|
if (bassPeaks.get(index) != 0) {
|
||||||
// float xSpawnLocation = (rand.nextFloat()*(Polyjet.GAME_AREA_WIDTH-2))+1;
|
|
||||||
// map.addToMap(Entities.PELLET,
|
|
||||||
// xSpawnLocation,
|
|
||||||
// Polyjet.GAME_AREA_HEIGHT-0.25f,
|
|
||||||
// 180*rand.nextFloat()+90,
|
|
||||||
// speedMod*(1f/avgBPS));
|
|
||||||
|
|
||||||
map.addToMap(Entities.BAR,
|
map.addToMap(Entities.BAR,
|
||||||
MathUtils.round(3),
|
MathUtils.round(1.5f+rand.nextFloat()*(Polyjet.GAME_AREA_WIDTH-3)),
|
||||||
(8f/avgBPS)*speedMod);
|
(8f/avgBPS)*speedMod);
|
||||||
} else {
|
} else {
|
||||||
if (UMPeaks.get(index) != 0) {
|
if (UMPeaks.get(index) != 0) {
|
||||||
// map.addToMap(Entities.BAR,
|
float xSpawnLocation = (rand.nextFloat()*(Polyjet.GAME_AREA_WIDTH-2))+1;
|
||||||
// MathUtils.round(3),
|
map.addToMap(Entities.PELLET,
|
||||||
// (1.5f/avgBPS)*speedMod);
|
xSpawnLocation,
|
||||||
|
Polyjet.GAME_AREA_HEIGHT-0.25f,
|
||||||
|
180*rand.nextFloat()+90,
|
||||||
|
speedMod*(1f/avgBPS));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user