Removed draw_spectrum_bitmap
parent
9d8edf41eb
commit
a9eb47debe
14
src/main.cpp
14
src/main.cpp
|
@ -26,23 +26,9 @@
|
||||||
// note that wave and spectrum have different sizes
|
// note that wave and spectrum have different sizes
|
||||||
//
|
//
|
||||||
// MPD interface
|
// MPD interface
|
||||||
// hid interface to keyboard
|
|
||||||
// beat detection
|
// beat detection
|
||||||
|
|
||||||
|
|
||||||
void draw_spectrum_bitmap(
|
|
||||||
const std::vector<size_t>& waveform,
|
|
||||||
Bitmap& bitmap
|
|
||||||
) {
|
|
||||||
for (size_t x = 0; x < waveform.size(); x++) {
|
|
||||||
for (size_t y = 0; y < waveform[x]; y++) {
|
|
||||||
bitmap.setpixel(bitmap.get_height() - y - 1, x, 0xFF, 0x00, 0x00);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// How many keys in a column * resolution per key.
|
// How many keys in a column * resolution per key.
|
||||||
// this MUST fit inside a uint8_t.
|
// this MUST fit inside a uint8_t.
|
||||||
const uint8_t kb_resolution = 5 * 50;
|
const uint8_t kb_resolution = 5 * 50;
|
||||||
|
|
Loading…
Reference in New Issue