User Tools

Site Tools


registering_midi_input_handlers_from_javascript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
registering_midi_input_handlers_from_javascript [2017/03/16 14:40]
be.ing [Integrating with Components]
registering_midi_input_handlers_from_javascript [2017/03/17 13:08]
be.ing [Background]
Line 3: Line 3:
  
 ===== Background ===== ===== Background =====
-Working with the hybrid JavaScript & XML system is an unpleasant developer experience. Most controllers require (almost) all of the mapping to be written in JavaScript for a fully functional mapping. XML files quickly become very unwieldy and practically impossible to organize. Every time a JavaScript input handler is renamed or a mapping is rearranged, the XML file must be edited and manually reloaded. It would be easier and more fun to write mappings if development could be done entirely in JavaScript. The JavaScript system can already handle output to controllers;​ the only missing piece is registering functions to handle input from controllers.+Working with the hybrid JavaScript & XML system is an unpleasant developer experience. Most controllers require (almost) all of the mapping to be written in JavaScript for a fully functional mapping. XML files quickly become very unwieldy and practically impossible to organize. Every time a JavaScript input handler is renamed or a mapping is rearranged, the XML file must be edited and manually reloaded, which is an error prone process. It would be easier and more fun to write mappings if development could be done entirely in JavaScript. The JavaScript system can already handle output to controllers;​ the only missing piece is registering functions to handle input from controllers.
  
 ===== Overview ===== ===== Overview =====
Line 49: Line 49:
  
 ===== Integrating with Components ===== ===== Integrating with Components =====
-The [[Components JS]] library would continue to work in largely the same way. The input callback would be registered by the generic ''​Component''​ constructor using the Component'​s ​ ''​midi''​ and ''​input''​ properties as arguments to ''​midi.makeInputHandler''​. ​The input connection ​object ​would be stored ​as a property of the Componenet. As before, input callbacks would use ''​this.group''​ and ''​this.inKey''​ to refer to a ControlObject specified by the Component.+The [[Components JS]] library would continue to work in largely the same way. The input callback would be registered by the generic ''​Component''​ constructor using the Component'​s ​ ''​midi''​ and ''​input''​ properties as arguments to ''​midi.makeInputHandler''​. ​Like the output connections,​ the input connection ​objects ​would be stored ​in an array property of the Component and the library would provide prototype methods for connecting/​disconnecting the input handlers. As before, input callbacks would use ''​this.group''​ and ''​this.inKey''​ to refer to a ControlObject specified by the Component.
  
 ===== Working with layers ===== ===== Working with layers =====
registering_midi_input_handlers_from_javascript.txt ยท Last modified: 2017/03/17 13:08 by be.ing