summaryrefslogtreecommitdiff
path: root/common.cpp
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-03-21 02:32:05 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-03-21 02:32:05 -0400
commit1acc49b21d850e035a2517930e6738b873953047 (patch)
tree7e5e50a4a5848d919d979f46b4383958c7096462 /common.cpp
parent433faac95e86a4ed61176061c4b0e8451cc58bf5 (diff)
Manual merge of chartFile branch
Diffstat (limited to 'common.cpp')
-rw-r--r--common.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/common.cpp b/common.cpp
new file mode 100644
index 0000000..5838766
--- /dev/null
+++ b/common.cpp
@@ -0,0 +1,13 @@
+#include "common.h"
+
+// Timing calculations {{{
+
+// NanoSeconds per Tick
+int nspt(const int nbpm, const int resolution){
+ // nbpm: 133000 = 133bpm
+ // resolution: Tick per beat
+ return 60000000000 / (nbpm * resolution);
+}
+
+// }}}
+// vim: syntax=cpp.doxygen