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