1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:57:35 +00:00

Piano: Draw stereo waves

Draw two waves in different colors.
This commit is contained in:
William McPherson 2020-02-10 00:53:47 +11:00 committed by Andreas Kling
parent 93903c8064
commit 4ad96df0d4
3 changed files with 72 additions and 16 deletions

View file

@ -112,7 +112,7 @@ constexpr KeyColor key_pattern[] = {
const Color note_pressed_color(64, 64, 255);
const Color column_playing_color(128, 128, 255);
const Color wave_colors[] = {
const Color left_wave_colors[] = {
// Sine
{
255,
@ -151,6 +151,45 @@ const Color wave_colors[] = {
},
};
const Color right_wave_colors[] = {
// Sine
{
255,
223,
0,
},
// Triangle
{
35,
171,
90,
},
// Square
{
139,
128,
255,
},
// Saw
{
240,
100,
220,
},
// Noise
{
197,
223,
225,
},
// RecordedSample
{
227,
105,
39,
},
};
constexpr int notes_per_octave = 12;
constexpr int white_keys_per_octave = 7;
constexpr int black_keys_per_octave = 5;