LiVES  3.2.0
Data Structures | Macros | Enumerations | Functions
omc-learn.h File Reference
#include "osc.h"

Go to the source code of this file.

Data Structures

struct  lives_omc_macro_t
 
struct  lives_omc_match_node_t
 
struct  omclearn_w
 

Macros

#define OMC_DEV_MIDI   (1 << 0)
 
#define OMC_DEV_JS   (1 << 1)
 
#define OMC_DEV_FORCE_RAW_MIDI   (1 << 2)
 
#define OMC_DEV_MIDI_DUMMY   (1 << 3)
 
#define N_OMC_MACROS   64
 max number of macros More...
 
#define OMC_FP_FIX   4
 floating point precision More...
 
#define OMC_MIDI_IMPL
 
#define MIDI_OMNI   -1
 
#define OMC_PARAM_INT   1
 
#define OMC_PARAM_DOUBLE   2
 
#define OMC_PARAM_SPECIAL   128
 can be int or double, depending on effect type More...
 
#define OMC_INTERNAL   0
 
#define OMC_JS   1
 
#define OMC_JS_AXIS   2
 
#define OMC_JS_BUTTON   3
 
#define OMC_MIDI   128
 
#define OMC_MIDI_NOTE   129
 
#define OMC_MIDI_NOTE_OFF   130
 
#define OMC_MIDI_CONTROLLER   131
 
#define OMC_MIDI_PITCH_BEND   132
 
#define OMC_MIDI_PGM_CHANGE   133
 
#define OMC_FILE_VSTRING   "LiVES OMC map version 1.1"
 
#define OMC_FILE_VSTRING_1_0   "LiVES OMC map version 1.0"
 
#define OSC_BUF_SIZE   1024
 
#define OSC_MAX_TYPETAGS   64
 

Enumerations

enum  {
  KEY_COLUMN, NAME_COLUMN, KEYVAL_COLUMN, MODEVAL_COLUMN,
  EFD_NUM_COLUMNS, TITLE_COLUMN, KEY_COLUMN, VALUE_COLUMN,
  DESC_COLUMN, NUM_COLUMNS, const_domain_notify, const_domain_response,
  const_domain_grav, const_domain_insert_mode, LIVES_DEVICE_CD = 0, LIVES_DEVICE_DVD,
  LIVES_DEVICE_VCD, LIVES_DEVICE_INTERNAL, LIVES_DEVICE_TV_CARD, LIVES_DEVICE_FW_CARD,
  TITLE_COLUMN, VALUE_COLUMN, FILTER_COLUMN, RANGE_COLUMN,
  OFFS1_COLUMN, SCALE_COLUMN, OFFS2_COLUMN, OMC_NUM_COLUMNS,
  LIST_ENTRY_GUI, LIST_ENTRY_DECODING, LIST_ENTRY_PLAYBACK, LIST_ENTRY_RECORDING,
  LIST_ENTRY_ENCODING, LIST_ENTRY_EFFECTS, LIST_ENTRY_DIRECTORIES, LIST_ENTRY_WARNINGS,
  LIST_ENTRY_MISC, LIST_ENTRY_THEMES, LIST_ENTRY_NET, LIST_ENTRY_JACK,
  LIST_ENTRY_MIDI, LIST_ENTRY_MULTITRACK, EXTENDED_NAME_COLUMN, NAME_COLUMN,
  HASH_COLUMN, NUM_COLUMNS
}
 
enum  {
  LIVES_STRING_CONSTANT_ANY = 0, LIVES_STRING_CONSTANT_NONE, LIVES_STRING_CONSTANT_RECOMMENDED, LIVES_STRING_CONSTANT_DISABLED,
  LIVES_STRING_CONSTANT_CL, LIVES_STRING_CONSTANT_BUILTIN, LIVES_STRING_CONSTANT_CUSTOM, LIVES_STRING_CONSTANT_TEST,
  LIVES_STRING_CONSTANT_CLOSE_WINDOW, NUM_LIVES_STRING_CONSTANTS, TITLE2_COLUMN, VALUE2_COLUMN,
  ADJUSTMENT, OMC_NUM2_COLUMNS, LIST_ICON = 0, LIST_ITEM,
  LIST_NUM, N_COLUMNS
}
 

Functions

char * midi_mangle (void)
 
const char * get_midi_filename (void)
 
boolean midi_open (void)
 
void midi_close (void)
 
const lives_omc_macro_tget_omc_macro (int idx)
 
void on_midi_learn_activate (LiVESMenuItem *, livespointer)
 start learning MIDI inputs More...
 
boolean omc_process_string (int supertype, const char *string, boolean learn, omclearn_w *omclw)
 process a string (i.e. convert to an OSC message and pass to OSC subsys) only need to set omclw if learn is TRUE More...
 
boolean has_devicemap (int has_this_macro)
 
void create_devicemap_directory (void)
 
void on_devicemap_save_activate (LiVESMenuItem *, livespointer)
 
void on_devicemap_load_activate (LiVESMenuItem *, livespointer)
 
OSCbuf * omc_learner_decode (int type, int index, const char *string)
 decode learnt behaviours More...
 

Macro Definition Documentation

◆ MIDI_OMNI

#define MIDI_OMNI   -1

Definition at line 28 of file omc-learn.h.

◆ N_OMC_MACROS

#define N_OMC_MACROS   64

max number of macros

Definition at line 16 of file omc-learn.h.

◆ OMC_DEV_FORCE_RAW_MIDI

#define OMC_DEV_FORCE_RAW_MIDI   (1 << 2)

Definition at line 12 of file omc-learn.h.

◆ OMC_DEV_JS

#define OMC_DEV_JS   (1 << 1)

Definition at line 11 of file omc-learn.h.

◆ OMC_DEV_MIDI

#define OMC_DEV_MIDI   (1 << 0)

Definition at line 10 of file omc-learn.h.

◆ OMC_DEV_MIDI_DUMMY

#define OMC_DEV_MIDI_DUMMY   (1 << 3)

Definition at line 13 of file omc-learn.h.

◆ OMC_FILE_VSTRING

#define OMC_FILE_VSTRING   "LiVES OMC map version 1.1"

Definition at line 149 of file omc-learn.h.

◆ OMC_FILE_VSTRING_1_0

#define OMC_FILE_VSTRING_1_0   "LiVES OMC map version 1.0"

Definition at line 150 of file omc-learn.h.

◆ OMC_FP_FIX

#define OMC_FP_FIX   4

floating point precision

Definition at line 19 of file omc-learn.h.

◆ OMC_INTERNAL

#define OMC_INTERNAL   0

Definition at line 126 of file omc-learn.h.

◆ OMC_JS

#define OMC_JS   1

Definition at line 128 of file omc-learn.h.

◆ OMC_JS_AXIS

#define OMC_JS_AXIS   2

Definition at line 129 of file omc-learn.h.

◆ OMC_JS_BUTTON

#define OMC_JS_BUTTON   3

Definition at line 130 of file omc-learn.h.

◆ OMC_MIDI

#define OMC_MIDI   128

Definition at line 132 of file omc-learn.h.

◆ OMC_MIDI_CONTROLLER

#define OMC_MIDI_CONTROLLER   131

Definition at line 135 of file omc-learn.h.

◆ OMC_MIDI_IMPL

#define OMC_MIDI_IMPL

Definition at line 26 of file omc-learn.h.

◆ OMC_MIDI_NOTE

#define OMC_MIDI_NOTE   129

Definition at line 133 of file omc-learn.h.

◆ OMC_MIDI_NOTE_OFF

#define OMC_MIDI_NOTE_OFF   130

Definition at line 134 of file omc-learn.h.

◆ OMC_MIDI_PGM_CHANGE

#define OMC_MIDI_PGM_CHANGE   133

Definition at line 137 of file omc-learn.h.

◆ OMC_MIDI_PITCH_BEND

#define OMC_MIDI_PITCH_BEND   132

Definition at line 136 of file omc-learn.h.

◆ OMC_PARAM_DOUBLE

#define OMC_PARAM_DOUBLE   2

Definition at line 46 of file omc-learn.h.

◆ OMC_PARAM_INT

#define OMC_PARAM_INT   1

Definition at line 45 of file omc-learn.h.

◆ OMC_PARAM_SPECIAL

#define OMC_PARAM_SPECIAL   128

can be int or double, depending on effect type

Definition at line 47 of file omc-learn.h.

◆ OSC_BUF_SIZE

#define OSC_BUF_SIZE   1024

Definition at line 159 of file omc-learn.h.

◆ OSC_MAX_TYPETAGS

#define OSC_MAX_TYPETAGS   64

Definition at line 160 of file omc-learn.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
KEY_COLUMN 
NAME_COLUMN 
KEYVAL_COLUMN 
MODEVAL_COLUMN 
EFD_NUM_COLUMNS 
TITLE_COLUMN 
KEY_COLUMN 
VALUE_COLUMN 
DESC_COLUMN 
NUM_COLUMNS 
const_domain_notify 
const_domain_response 
const_domain_grav 
const_domain_insert_mode 
LIVES_DEVICE_CD 
LIVES_DEVICE_DVD 
LIVES_DEVICE_VCD 
LIVES_DEVICE_INTERNAL 
LIVES_DEVICE_TV_CARD 
LIVES_DEVICE_FW_CARD 
TITLE_COLUMN 
VALUE_COLUMN 
FILTER_COLUMN 
RANGE_COLUMN 
OFFS1_COLUMN 
SCALE_COLUMN 
OFFS2_COLUMN 
OMC_NUM_COLUMNS 
LIST_ENTRY_GUI 
LIST_ENTRY_DECODING 
LIST_ENTRY_PLAYBACK 
LIST_ENTRY_RECORDING 
LIST_ENTRY_ENCODING 
LIST_ENTRY_EFFECTS 
LIST_ENTRY_DIRECTORIES 
LIST_ENTRY_WARNINGS 
LIST_ENTRY_MISC 
LIST_ENTRY_THEMES 
LIST_ENTRY_NET 
LIST_ENTRY_JACK 
LIST_ENTRY_MIDI 
LIST_ENTRY_MULTITRACK 
EXTENDED_NAME_COLUMN 
NAME_COLUMN 
HASH_COLUMN 
NUM_COLUMNS 

Definition at line 108 of file omc-learn.h.

◆ anonymous enum

anonymous enum
Enumerator
LIVES_STRING_CONSTANT_ANY 
LIVES_STRING_CONSTANT_NONE 
LIVES_STRING_CONSTANT_RECOMMENDED 
LIVES_STRING_CONSTANT_DISABLED 
LIVES_STRING_CONSTANT_CL 

"the current layout"

LIVES_STRING_CONSTANT_BUILTIN 
LIVES_STRING_CONSTANT_CUSTOM 
LIVES_STRING_CONSTANT_TEST 
LIVES_STRING_CONSTANT_CLOSE_WINDOW 
NUM_LIVES_STRING_CONSTANTS 
TITLE2_COLUMN 
VALUE2_COLUMN 
ADJUSTMENT 
OMC_NUM2_COLUMNS 
LIST_ICON 
LIST_ITEM 
LIST_NUM 
N_COLUMNS 

Definition at line 119 of file omc-learn.h.

Function Documentation

◆ create_devicemap_directory()

void create_devicemap_directory ( void  )

◆ get_midi_filename()

const char* get_midi_filename ( void  )

◆ get_omc_macro()

const lives_omc_macro_t* get_omc_macro ( int  idx)

◆ has_devicemap()

boolean has_devicemap ( int  has_this_macro)

Referenced by autolives_pre_dialog(), and sensitize().

◆ midi_close()

void midi_close ( void  )

Referenced by pref_factory_bitmapped().

◆ midi_mangle()

char* midi_mangle ( void  )

◆ midi_open()

boolean midi_open ( void  )

◆ omc_learner_decode()

OSCbuf* omc_learner_decode ( int  type,
int  index,
const char *  string 
)

decode learnt behaviours

◆ omc_process_string()

boolean omc_process_string ( int  supertype,
const char *  string,
boolean  learn,
omclearn_w omclw 
)

process a string (i.e. convert to an OSC message and pass to OSC subsys) only need to set omclw if learn is TRUE

Referenced by pconx_chain_data_omc().

◆ on_devicemap_load_activate()

void on_devicemap_load_activate ( LiVESMenuItem *  ,
livespointer   
)

◆ on_devicemap_save_activate()

void on_devicemap_save_activate ( LiVESMenuItem *  ,
livespointer   
)

◆ on_midi_learn_activate()

void on_midi_learn_activate ( LiVESMenuItem *  ,
livespointer   
)

start learning MIDI inputs