3 #include "bcf_surface.h"
5 #include "mackie_midi_builder.h"
6 #include "surface_port.h"
10 using namespace Mackie;
13 BcfSurface::display_bank_start (SurfacePort & port, MackieMidiBuilder & builder, uint32_t current_bank)
15 if (current_bank == 0) {
16 // send Ar. to 2-char display on the master
17 port.write (builder.two_char_display ("Ar", ".."));
19 // write the current first remote_id to the 2-char display
20 port.write (builder.two_char_display (current_bank));
25 BcfSurface::zero_all (SurfacePort & port, MackieMidiBuilder & builder)
27 // clear 2-char display
28 port.write (builder.two_char_display ("LC"));
30 // and the led ring for the master strip
31 blank_jog_ring (port, builder);
35 BcfSurface::blank_jog_ring (SurfacePort & port, MackieMidiBuilder & builder)
37 Control & control = *controls_by_name["jog"];
38 port.write (builder.build_led_ring (dynamic_cast<Pot &> (control), off));
42 BcfSurface::scaled_delta (const ControlState & state, float current_speed)
44 return state.sign * (std::pow (float(state.ticks + 1), 2) + current_speed) / 100.0;