Template:CSurfIntroduction

From CockosWiki

Jump to: navigation, search

This is a short summary of the available Control Surface functions, it is included in each CSurf function page.

Function Type Example(s) Description
“On” CSurf_OnPlay, CSurf_OnStop Called from the plugin in response to a h/w event. e.g. The user presses the physical Play button on the control surface and CSurf_OnPlay() is called by the plugin to set REAPER playing the current project
“Set”, “Get” CSurf_SetSurfaceRecArm Called by the plugin to to set the state of a track inside reaper (mute it, solo it etc.)
Utility CSurf_TrackFromID, CSurf_TrackToID, Not triggered by a h/w or REAPER event but used within the plugin. e.g. To translate between REAPER and h/w track indexes.
Other

CSurf_ScrubAmt, CSurf_ResetAllCachedVolPanStates

MIDI CreateMIDIInput, CreateMIDIOutput Functions to create objects which control MIDI devices, including control surfaces.

REAPER calls a control surface through the IReaperControlSurface interface (defined in reaper_plugin.h) which a plugin has to register on startup. The function names of this interface are very similar to the CSurf_* functions, they just work the other way round (from REAPER to the plugin).