From 1acc49b21d850e035a2517930e6738b873953047 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 21 Mar 2023 02:32:05 -0400 Subject: Manual merge of chartFile branch --- common.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 common.cpp (limited to 'common.cpp') 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 -- cgit v1.2.3