From cc6ed32bb9da1319834d06d78cee7a8c4050334e Mon Sep 17 00:00:00 2001 From: Aidan Ross Date: Wed, 24 May 2023 17:02:47 -0400 Subject: Instead of timestamps, notes are now sent in by beats, which are based off of the song's bpm. --- src/fallTest/Timer.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/fallTest/Timer.java') diff --git a/src/fallTest/Timer.java b/src/fallTest/Timer.java index 2ad7efe..d8fd2e3 100644 --- a/src/fallTest/Timer.java +++ b/src/fallTest/Timer.java @@ -8,8 +8,13 @@ package fallTest; public class Timer { private long timeStart = System.currentTimeMillis(); - - public int time() { - return (int)(System.currentTimeMillis()-timeStart); + private int bpm; + + public Timer(int newBpm) { + bpm = newBpm; + } + + public double time() { + return ((double)(System.currentTimeMillis()-timeStart))*(bpm/60000.0); } } -- cgit v1.2.3