2012-04-07 14:43:06 -04:00
|
|
|
#include <cmath>
|
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
2012-04-08 10:11:00 -04:00
|
|
|
#include <cstdio>
|
2012-04-07 14:43:06 -04:00
|
|
|
|
2012-04-08 17:17:11 -04:00
|
|
|
#include "controls.h"
|
2008-06-02 17:41:35 -04:00
|
|
|
#include "mackie_surface.h"
|
2008-12-12 17:55:03 -05:00
|
|
|
#include "mackie_midi_builder.h"
|
2012-04-08 17:17:11 -04:00
|
|
|
#include "surface_port.h"
|
2008-06-02 17:41:35 -04:00
|
|
|
|
|
|
|
using namespace Mackie;
|
|
|
|
|
2012-04-07 14:43:06 -04:00
|
|
|
void
|
2012-04-08 10:11:00 -04:00
|
|
|
MackieSurface::display_timecode (SurfacePort & port, MackieMidiBuilder & builder, const std::string & timecode, const std::string & timecode_last)
|
2008-06-02 17:41:35 -04:00
|
|
|
{
|
2012-04-08 10:11:00 -04:00
|
|
|
port.write (builder.timecode_display (port, timecode, timecode_last));
|
2008-06-02 17:41:35 -04:00
|
|
|
}
|
|
|
|
|
2012-04-07 14:43:06 -04:00
|
|
|
float
|
2012-04-08 10:11:00 -04:00
|
|
|
MackieSurface::scaled_delta (const ControlState & state, float current_speed)
|
2008-06-02 17:41:35 -04:00
|
|
|
{
|
2012-04-08 10:11:00 -04:00
|
|
|
return state.sign * (std::pow (float(state.ticks + 1), 2) + current_speed) / 100.0;
|
2008-06-02 17:41:35 -04:00
|
|
|
}
|
2012-04-07 14:43:06 -04:00
|
|
|
|