mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 04:10:46 +02:00
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include <cmath>
|
|
|
|
namespace monostep
|
|
{
|
|
|
|
namespace colours
|
|
{
|
|
inline const juce::Colour bg (0xFF131519);
|
|
inline const juce::Colour panel (0xFF1C1F25);
|
|
inline const juce::Colour grid (0xFF262B33);
|
|
inline const juce::Colour gridLight (0xFF2E343E);
|
|
inline const juce::Colour text (0xFFC9CDD4);
|
|
inline const juce::Colour textDim (0xFF6E7683);
|
|
inline const juce::Colour accent (0xFFE8A33D);
|
|
inline const juce::Colour accent2 (0xFF7FA6FF);
|
|
inline const juce::Colour accentDim (0xFF7A5A26);
|
|
inline const juce::Colour activeCell (0xFF3A6EA5);
|
|
inline const juce::Colour selected (0xFFF0F4F8);
|
|
inline const juce::Colour playMarker (0xFFE5484D);
|
|
}
|
|
|
|
inline const juce::Font font (float height)
|
|
{
|
|
return juce::Font (juce::FontOptions (height));
|
|
}
|
|
|
|
inline juce::String noteNameForOffset (int semitone)
|
|
{
|
|
const int note = 48 + semitone;
|
|
return juce::MidiMessage::getMidiNoteName (note, true, true, 3);
|
|
}
|
|
|
|
inline juce::String formatCents (float cents)
|
|
{
|
|
if (std::fabs (cents) < 0.5f)
|
|
return "0 ct";
|
|
|
|
return juce::String (cents, 0) + " ct";
|
|
}
|
|
|
|
} // namespace monostep
|