mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
fix pitch bend mapping, add inertia when releasing
This commit is contained in:
parent
0540fb1ce3
commit
6e37f224e1
4 changed files with 46 additions and 23 deletions
|
|
@ -65,9 +65,9 @@ private:
|
|||
|
||||
class PianoRollComponent : public juce::Component, public juce::Timer {
|
||||
public:
|
||||
explicit PianoRollComponent(ChromaFlockProcessor& p) : processor(p) { startTimerHz(30); }
|
||||
explicit PianoRollComponent(ChromaFlockProcessor& p) : processor(p) { startTimerHz(60); }
|
||||
void paint(juce::Graphics& g) override;
|
||||
void timerCallback() override { repaint(); }
|
||||
void timerCallback() override;
|
||||
void mouseDown(const juce::MouseEvent& e) override;
|
||||
void mouseUp(const juce::MouseEvent& e) override;
|
||||
void mouseDrag(const juce::MouseEvent& e) override;
|
||||
|
|
@ -91,6 +91,12 @@ private:
|
|||
|
||||
int lastTriggeredNote = -1;
|
||||
int currentPitchBend = 64; // 0..127, 64 = center
|
||||
bool pitchBendDragging = false;
|
||||
|
||||
bool pitchBendGliding = false;
|
||||
float pitchBendGlideStart = 0.0f;
|
||||
juce::int64 pitchBendGlideStartMs = 0;
|
||||
static constexpr int pitchBendGlideMs = 50;
|
||||
};
|
||||
|
||||
class MainContentComponent : public juce::Component {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue