From 8972ed15173e9bc6e60d17c9be0d5d9c8be18ead Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 17 Nov 2021 08:55:25 -0700 Subject: [PATCH] temporal: add Tempo::note_type_as_beats() --- libs/temporal/temporal/tempo.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 5c319a46e4..a83f23de95 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -218,6 +218,7 @@ class LIBTEMPORAL_API Tempo : public Rampable { void set_note_types_per_minute (double npm) { _superclocks_per_note_type = double_npm_to_scpn (npm); } int note_type () const { return _note_type; } + Beats note_type_as_beats () const { return Beats (0, (1920 * 4) / _note_type); } superclock_t superclocks_per_note_type () const { return _superclocks_per_note_type;