Mercurial > hg > touchkeys
diff Source/Mappings/MappingFactory.h @ 49:90ce403d0dc5
Added OSC control over all main application functions. OSC messages can be sent to do most of the tasks available from the GUI.
author | Andrew McPherson <andrewm@eecs.qmul.ac.uk> |
---|---|
date | Mon, 13 Apr 2015 19:30:27 -0700 |
parents | e8965409903e |
children |
line wrap: on
line diff
--- a/Source/Mappings/MappingFactory.h Mon Jan 05 18:06:43 2015 +0000 +++ b/Source/Mappings/MappingFactory.h Mon Apr 13 19:30:27 2015 -0700 @@ -62,6 +62,7 @@ // Specific name for this particular factory virtual string const getName() { return ""; } + virtual string const getShortName() { return ""; } virtual void setName(const string& name) {} virtual Mapping* mapping(int noteNumber) = 0; // Look up a mapping with the given note number @@ -124,6 +125,7 @@ // Notification from key that a note is about to be sent out virtual void noteWillBegin(int noteNumber, int midiChannel, int midiVelocity) = 0; +#ifndef TOUCHKEYS_NO_GUI // ***** GUI Support ***** // There are two types of editors for a mapping: one is a small editor that fits in the // list view for adjusting the most important parameters, the other goes in a window of @@ -133,6 +135,16 @@ virtual MappingEditorComponent* createBasicEditor() { return nullptr; } virtual bool hasExtendedEditor() { return false; } virtual MappingEditorComponent* createExtendedEditor() { return nullptr; } +#endif + + // ****** OSC Control ****** + // As an alternative to GUI control, the mapping factories can receive OSC messages + // from the keyboard segment to which they are attached. + virtual OscMessage* oscControlMethod(const char *path, const char *types, + int numValues, lo_arg **values, void *data) { + // Nothing to do here in this virtual base class + return 0; + } // ****** Preset Save/Load ****** // These methods generate XML settings files and reload values from them