From 2573c33ffe79d48d25991c0b1fb5fbb1a77c9fb8 Mon Sep 17 00:00:00 2001 From: William McPherson Date: Thu, 26 Dec 2019 01:36:13 +1100 Subject: [PATCH] Piano: Rename "release" to "decay" That's not release! --- Applications/Piano/PianoWidget.cpp | 10 +++++----- Applications/Piano/PianoWidget.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Applications/Piano/PianoWidget.cpp b/Applications/Piano/PianoWidget.cpp index b2336c4bfa..0d63245a99 100644 --- a/Applications/Piano/PianoWidget.cpp +++ b/Applications/Piano/PianoWidget.cpp @@ -88,8 +88,8 @@ void PianoWidget::fill_audio_buffer(uint8_t* stream, int len) sst[i].right = sst[i].left; } - // Release pressed notes. - if (m_release_enabled) { + // Decay pressed notes. + if (m_decay_enabled) { for (size_t n = 0; n < (sizeof(m_note_on) / sizeof(u8)); ++n) { if (m_note_on[n]) m_power[n] *= 0.965; @@ -255,7 +255,7 @@ void PianoWidget::keydown_event(GKeyEvent& event) m_delay_enabled = !m_delay_enabled; break; case KeyCode::Key_B: - m_release_enabled = !m_release_enabled; + m_decay_enabled = !m_decay_enabled; break; case KeyCode::Key_Z: if (m_octave > m_octave_min) @@ -420,8 +420,8 @@ void PianoWidget::render_knobs(GPainter& painter) Rect delay_knob_rect(m_width - knob_width - 16, m_height - 50, knob_width, 16); render_knob(painter, delay_knob_rect, m_delay_enabled, "V: Delay "); - Rect release_knob_rect(m_width - knob_width - 16, m_height - 30, knob_width, 16); - render_knob(painter, release_knob_rect, m_release_enabled, "B: Release "); + Rect decay_knob_rect(m_width - knob_width - 16, m_height - 30, knob_width, 16); + render_knob(painter, decay_knob_rect, m_decay_enabled, "B: Decay "); Rect octave_knob_rect(m_width - knob_width - 16 - knob_width - 16, m_height - 50, knob_width, 16); auto text = String::format("Z/X: Oct %d ", m_octave); diff --git a/Applications/Piano/PianoWidget.h b/Applications/Piano/PianoWidget.h index 93cf255138..6b3437b781 100644 --- a/Applications/Piano/PianoWidget.h +++ b/Applications/Piano/PianoWidget.h @@ -78,7 +78,7 @@ private: int m_wave_type { 0 }; bool m_delay_enabled { false }; - bool m_release_enabled { false }; + bool m_decay_enabled { false }; bool keys[256] { false };