mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 04:10:46 +02:00
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#include <cmath>
|
|
|
|
namespace monostep
|
|
{
|
|
|
|
namespace colours
|
|
{
|
|
// Jellybeans terminal palette
|
|
inline const juce::Colour bg (0xFF121212);
|
|
inline const juce::Colour panel (0xFF1A1A1A);
|
|
inline const juce::Colour grid (0xFF222222);
|
|
inline const juce::Colour gridLight (0xFF2B2B2B);
|
|
inline const juce::Colour text (0xFFDEDEDE);
|
|
inline const juce::Colour textDim (0xFF929292);
|
|
|
|
inline const juce::Colour accent (0xFFE27373); // red - active toggles/buttons, value labels
|
|
inline const juce::Colour note (0xFFBDDEAB); // green - matrix note cells
|
|
inline const juce::Colour slide (0xFFFFBA7B); // yellow - matrix slide row
|
|
inline const juce::Colour section (0xFF97BEDC); // blue - section pills and borders
|
|
inline const juce::Colour highlight (0xFF94B979); // darker green - general highlight
|
|
inline const juce::Colour activeCell (0xFF94B979);
|
|
inline const juce::Colour selected (0xFFDEDEDE);
|
|
inline const juce::Colour playMarker (0xFFE27373);
|
|
}
|
|
|
|
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
|