26 auto rounded = std::to_string(
std::round(value * 100) / 100);
52 XO(
"Configure Project from Music File"),
53 XO(
"Automatic Music Configuration"));
63 double newTempo, std::optional<MIR::TimeSignature> timeSignature)
68 projTimeSignature.SetTempo(newTempo);
69 if (timeSignature.has_value())
71 projTimeSignature.SetUpperTimeSignature(
73 projTimeSignature.SetLowerTimeSignature(
85 double newTempo,
bool isSingleFileImport)
88 if (policy == wxString(
"Ask"))
93 XO(
"Audacity detected this file to be %s bpm.\nWould you like to enable music view and set the project tempo to %s?")
94 .Format(displayedTempo, displayedTempo) :
95 XO(
"Audacity detected one or more files to be %s bpm.\nWould you like to enable music view and set the project tempo to %s?")
96 .Format(displayedTempo, displayedTempo);
102 yes ? wxString(
"Yes") : wxString(
"No"));
107 const auto yes = policy == wxString(
"Yes");
AUDACITY_DLL_API wxWindow & GetProjectPanel(AudacityProject &project)
Get the main sub-window of the project frame that displays track data.
accessors for certain important windows associated with each project
void SetTimeDisplayMode(TimeDisplayMode rulerType)
TimeDisplayMode GetTimeDisplayMode() const
static AdornedRulerPanel & Get(AudacityProject &project)
double GetTempo() const override
std::optional< ModificationType > mMostSignificantModification
~AudacityMirProject() override
void OnClipsSynchronized() override
AudacityProject & mProject
void ReconfigureMusicGrid(double newTempo, std::optional< MIR::TimeSignature > timeSignature) override
const double mProjectTempo
bool ShouldBeReconfigured(double newTempo, bool isSingleFileImport) override
bool ViewIsBeatsAndMeasures() const override
AudacityMirProject(AudacityProject &project)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
bool Write(const wxString &value)
static EnumSetting< bool > MusicFileImportSetting
static ProjectHistory & Get(AudacityProject &project)
static ProjectTimeSignature & Get(AudacityProject &project)
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
A Track that contains audio waveform data.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
int GetNumerator(TimeSignature ts)
int GetDenominator(TimeSignature ts)
constexpr size_t npos(-1)
auto FormatTempo(double value)
fastfloat_really_inline void round(adjusted_mantissa &am, callback cb) noexcept