temporal: set speed *and* tempo when setting tempo
This commit is contained in:
parent
1a44e612e9
commit
f2a596669e
|
@ -121,11 +121,20 @@ Tempo::Tempo (XMLNode const & node)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Tempo::set_note_types_per_minute (double npm)
|
||||
{
|
||||
_npm = npm;
|
||||
_superclocks_per_note_type = double_npm_to_scpn (_npm);
|
||||
_super_note_type_per_second = double_npm_to_snps (_npm);
|
||||
}
|
||||
|
||||
void
|
||||
Tempo::set_end_npm (double npm)
|
||||
{
|
||||
_end_super_note_type_per_second = double_npm_to_snps (npm);
|
||||
_end_superclocks_per_note_type = double_npm_to_scpn (npm);
|
||||
_enpm = npm;
|
||||
_end_super_note_type_per_second = double_npm_to_snps (_enpm);
|
||||
_end_superclocks_per_note_type = double_npm_to_scpn (_enpm);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -203,7 +203,7 @@ class LIBTEMPORAL_API Tempo {
|
|||
double samples_per_note_type(samplecnt_t sr) const { return superclock_to_samples (superclocks_per_note_type (), sr); }
|
||||
double samples_per_quarter_note(samplecnt_t sr) const { return superclock_to_samples (superclocks_per_quarter_note(), sr); }
|
||||
|
||||
void set_note_types_per_minute (double npm) { _superclocks_per_note_type = double_npm_to_scpn (npm); }
|
||||
void set_note_types_per_minute (double npm);
|
||||
|
||||
int note_type () const { return _note_type; }
|
||||
Beats note_type_as_beats () const { return Beats (0, (1920 * 4) / _note_type); }
|
||||
|
|
Loading…
Reference in New Issue