diff options
author | Simon Gagne <gags2431@usherbrooke.ca> | 2023-03-21 11:35:43 -0400 |
---|---|---|
committer | Simon Gagne <gags2431@usherbrooke.ca> | 2023-03-21 11:35:43 -0400 |
commit | 73d1b5bdda882a533767e06e75831cc5c9e552a5 (patch) | |
tree | cbe336efcf45c7bb711f84042ade103ca1921fd9 /common.cpp | |
parent | 24975df8fe3161947f99506e05538b05c05ba3a1 (diff) | |
parent | 1d23034ac50413ed3172bad68c944faf93199dcc (diff) |
Windows compat
Diffstat (limited to 'common.cpp')
-rw-r--r-- | common.cpp | 13 |
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 |