From 8dc661c2da567cfd7beea9ce0e1bb557962e654c Mon Sep 17 00:00:00 2001 From: Aidan Ross Date: Tue, 30 May 2023 08:51:59 -0400 Subject: Bit of progress on reading in the bpm and nuimbeats --- src/gameplay/SongPlayer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gameplay/SongPlayer.java') diff --git a/src/gameplay/SongPlayer.java b/src/gameplay/SongPlayer.java index 7ea6bfa..acf9d6b 100644 --- a/src/gameplay/SongPlayer.java +++ b/src/gameplay/SongPlayer.java @@ -115,8 +115,8 @@ public class SongPlayer extends Pane { difficulty = d; pane = p; - songLength = 28; - timer = new Timer(120); //Sets the timer's bpm to that of the song + songLength = d.numBeats; + timer = new Timer(d.bpm); //Sets the timer's bpm to that of the song scoreCounter = cntrl; //Uses the song's designated scoreCounter try { @@ -176,7 +176,7 @@ public class SongPlayer extends Pane { super.getChildren().addAll(root); //puts all of the combonents in the pane to be rendered gameLoop.start(); //starts the gameLoop, a periodic backround task runner that runs the methods within it 60 times every second - music = new AudioFilePlayer("src/assets/TestSync120bpm.wav"); + music = new AudioFilePlayer(d.song.getPath()); music.play(); } -- cgit v1.2.3