26 lines
888 B
C++
26 lines
888 B
C++
#ifndef XTC_SEQUENCER_VELOCITY_WIDGET_HPP
|
|
#define XTC_SEQUENCER_VELOCITY_WIDGET_HPP
|
|
#include <FL/Fl_Widget.H>
|
|
#include "xtc/xtc_mixer.h"
|
|
#include "xtc/xtc_midi.h"
|
|
class SequencerWidget;
|
|
class SequencerVelocityWidget : public Fl_Widget {
|
|
SequencerWidget &owner_;
|
|
uint64_t track_;
|
|
xtc_note_info original_{};
|
|
unsigned int preview_ = 100;
|
|
xtc_automation_point audio_preview_{};
|
|
bool audio_existing_ = false;
|
|
bool note_position(const xtc_note_info ¬e, int &px) const;
|
|
unsigned int note_value(int py) const;
|
|
float audio_value(int py) const;
|
|
void draw_audio(const xtc_track_info &track, int left, int right);
|
|
public:
|
|
SequencerVelocityWidget(SequencerWidget &owner, uint64_t track);
|
|
bool audio() const;
|
|
bool preview_label(char *text, size_t size) const;
|
|
int handle(int event) override;
|
|
protected:
|
|
void draw() override;
|
|
};
|
|
#endif
|