/// dividing the hue circle in 16 parts, hand adjusted for equal look, courtesy Thorsten Wilms
const uint32_t CanvasNoteEvent::midi_channel_colors[16] = {
/// dividing the hue circle in 16 parts, hand adjusted for equal look, courtesy Thorsten Wilms
const uint32_t CanvasNoteEvent::midi_channel_colors[16] = {
- 0xd32d2dff, 0xd36b2dff, 0xd3972dff, 0xd3d12dff,
- 0xa0d32dff, 0x7dd32dff, 0x2dd45eff, 0x2dd3c4ff,
- 0x2da5d3ff, 0x2d6fd3ff, 0x432dd3ff, 0x662dd3ff,
+ 0xd32d2dff, 0xd36b2dff, 0xd3972dff, 0xd3d12dff,
+ 0xa0d32dff, 0x7dd32dff, 0x2dd45eff, 0x2dd3c4ff,
+ 0x2da5d3ff, 0x2d6fd3ff, 0x432dd3ff, 0x662dd3ff,
0x832dd3ff, 0xa92dd3ff, 0xd32dbfff, 0xd32d67ff
};
0x832dd3ff, 0xa92dd3ff, 0xd32dbfff, 0xd32d67ff
};
CanvasNoteEvent::on_channel_selection_change(uint16_t selection)
{
// make note change its color if its channel is not marked active
CanvasNoteEvent::on_channel_selection_change(uint16_t selection)
{
// make note change its color if its channel is not marked active
CanvasNoteEvent::on_channel_change(uint8_t channel)
{
_region.note_selected(this, true);
CanvasNoteEvent::on_channel_change(uint8_t channel)
{
_region.note_selected(this, true);
_channel_selector->channel_selected.connect(
sigc::mem_fun(this, &CanvasNoteEvent::on_channel_change));
_channel_selector->channel_selected.connect(
sigc::mem_fun(this, &CanvasNoteEvent::on_channel_change));
_channel_selector_widget->hide();
_channel_selector_widget->property_height() = 100;
_channel_selector_widget->property_width() = 100;
_channel_selector_widget->hide();
_channel_selector_widget->property_height() = 100;
_channel_selector_widget->property_width() = 100;
const uint8_t min_opacity = 15;
uint8_t opacity = std::max(min_opacity, uint8_t(_note->velocity() + _note->velocity()));
const uint8_t min_opacity = 15;
uint8_t opacity = std::max(min_opacity, uint8_t(_note->velocity() + _note->velocity()));
- SCALE_USHORT_TO_UINT8_T(color.get_red()),
- SCALE_USHORT_TO_UINT8_T(color.get_green()),
- SCALE_USHORT_TO_UINT8_T(color.get_blue()),
+ SCALE_USHORT_TO_UINT8_T(color.get_red()),
+ SCALE_USHORT_TO_UINT8_T(color.get_green()),
+ SCALE_USHORT_TO_UINT8_T(color.get_blue()),