├── CMakeLists.txt ├── LICENSE ├── README.md ├── cmake-modules └── FindJack.cmake ├── interfaces ├── gen_synth_phone.js ├── gen_synth_tablet.js └── template.js ├── maps ├── androsc.omm ├── control.omm ├── default.omm ├── gameOfLife.omm ├── generic.omm ├── sensors2osc.omm ├── sequencer.omm ├── syntax.omm ├── touchosc.omm └── touchosc │ ├── Automat5.omm │ ├── Beatmachine.omm │ ├── Jog-On.omm │ ├── Keys.omm │ ├── Mix 16.omm │ ├── Mix 2 iPad.omm │ ├── Mix 2.omm │ ├── README.md │ ├── Simple.omm │ ├── ViZPad.omm │ ├── ViZPod.omm │ └── pianoroll │ ├── piano.omm │ └── piano.touchosc ├── src ├── CMakeLists.txt ├── converter.c ├── converter.h ├── hashtable.c ├── hashtable.h ├── ht_stuff.c ├── ht_stuff.h ├── jackmidi.c ├── main.c ├── midiseq.h ├── oscserver.c ├── oscserver.h ├── pair.c └── pair.h └── syntax.md /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/") 3 | 4 | project(osc2midi) 5 | 6 | add_subdirectory(src/) 7 | 8 | # file(MAKE_DIRECTORY /usr/share/osc2midi) 9 | install (DIRECTORY maps/ 10 | DESTINATION share/osc2midi 11 | USE_SOURCE_PERMISSIONS 12 | ) 13 | 14 | install (DIRECTORY maps/touchosc/ 15 | DESTINATION share/osc2midi/touchosc 16 | USE_SOURCE_PERMISSIONS 17 | ) 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | OSC2MIDI 2 | ======== 3 | 4 | OSC2MIDI is a highly configurable OSC to jack MIDI (and back) bridge. It was designed especially for use on linux desktop 5 | and the open source Android app 6 | called "Control (OSC+MIDI)" but was deliberately written to be flexible enough 7 | to be used with any OSC controller or target. It has not been tested on windows, but has been reported to work on OSX. 8 | 9 | To try it out download the source files, extract them, and open the resulting 10 | directory. 11 | 12 | This project uses cmake. The easiest and safest way to install is to do the 13 | following commands: 14 | 15 | mkdir build 16 | cd build 17 | cmake .. 18 | make 19 | sudo make install 20 | 21 | If you are missing anything cmake will tell you. Mostly you will just need 22 | cmake, liblo and jack. To get these on ubuntu just run 23 | 24 | sudo apt-get install cmake liblo-dev libjack-dev 25 | 26 | Once installed you can simply run OSC2MIDI with the command 27 | 28 | osc2midi 29 | 30 | For additional details on what options are available run 31 | 32 | osc2midi -h 33 | 34 | 35 | OSC2MIDI allows you to change the mapping between OSC and MIDI messages using 36 | an OSC to MIDI map file (.omm). This package has several mappings already 37 | installed in the folder /usr/local/share/osc2midi/. The default mapping is 38 | made to work with all the default interfaces that come with the Control 39 | Android app. Other included mappings are: 40 | 41 | * touchosc - this was made to work with the proprietary Android app of the 42 | same name, but I don't own it so it is untested. **NOTE:** There is a 43 | "to2omm" script available at 44 | which allows you to convert TouchOSC layout (.touchosc) files to OSC2MIDI 45 | map (.omm) files. The script extracts the MIDI mappings contained in the 46 | TouchOSC layout and creates a corresponding map file ready to be used with 47 | OSC2MIDI. 48 | 49 | * androsc - this file works with the default widgets in the open source 50 | android app andrOSC 51 | 52 | * generic - this was made to work with generic OSC clients that send MIDI like 53 | messages 54 | 55 | * control - identical to the default map, made to work with the Control app 56 | 57 | * gameOfLife - this mapping is a more detailed mapping for the game of life 58 | interface that comes default with Control. It is a bit more musical than the 59 | default mapping. 60 | 61 | * sensors2osc - made to work with many of the sensors in the app of the same 62 | name available on the fdroid app store. 63 | 64 | Mappings are in plain text and are completely human readable. If you wish to 65 | make your own map file or tweak the existing ones there is extensive 66 | documentation in [syntax.md](syntax.md) and also the default map file installed to 67 | /usr/local/share/osc2midi/default.omm or found in the maps/ directory of 68 | this repository. 69 | 70 | You can make your own mappings and store them in $XDG_CONFIG_HOME/osc2midi/ 71 | which is usually located at ~/.config/osc2midi/. Mappings in this directory 72 | will be used first, followed by maps in /etc/osc2midi/ and finally in the 73 | default install location of /usr/local/share/osc2midi. 74 | 75 | If you want to try a different mapping just run with the `-m` argument, i.e. 76 | 77 | osc2midi -m gameOfLife 78 | 79 | This will run with the mapping dictated by gameOfLife.omm in the first 80 | directory it finds it in. The app will check the directories as outlined above 81 | if it cannot find the specified file as a relative or absolute path. 82 | 83 | For creating your own mappings it might be useful to use monitor mode (`-mon`) 84 | which only prints out the OSC messages that are received. While testing a new 85 | mapping it is often useful to run with verbose mode on (`-v`). 86 | 87 | If you develop a mapping that others might find useful please post it in our 88 | as an issue in github or do a pull request so it can be included with the source. 89 | 90 | Also included with this source code are some custom interfaces that can be 91 | loaded into the Control app for Android and iOS. These can also be accessed 92 | through the URL http://ssj71.github.io/OSC2MIDI/interfaces/[interface_name].js 93 | for convenient loading into Control. For Example: 94 | http://ssj71.github.io/OSC2MIDI/interfaces/gen_synth_phone.js 95 | -------------------------------------------------------------------------------- /cmake-modules/FindJack.cmake: -------------------------------------------------------------------------------- 1 | # Try to find JACK 2 | # This will define the following variables: 3 | # 4 | # JACK_FOUND - Whether Jack was found. 5 | # JACK_INCLUDE_DIRS - Jack include directories. 6 | # JACK_LIBRARIES - Jack libraries. 7 | 8 | include(FindPackageHandleStandardArgs) 9 | 10 | if(JACK_LIBRARIES AND JACK_INCLUDE_DIRS) 11 | 12 | # in cache already 13 | set(JACK_FOUND TRUE) 14 | 15 | else() 16 | 17 | find_package(PkgConfig) 18 | if(PKG_CONFIG_FOUND) 19 | pkg_check_modules(_JACK jack) 20 | endif(PKG_CONFIG_FOUND) 21 | 22 | find_path(JACK_INCLUDE_DIR 23 | NAMES 24 | jack/jack.h 25 | PATHS 26 | ${_JACK_INCLUDEDIR} 27 | ) 28 | 29 | find_library(JACK_LIBRARY 30 | NAMES 31 | jack 32 | PATHS 33 | ${_JACK_LIBDIR} 34 | ) 35 | 36 | set(JACK_INCLUDE_DIRS 37 | ${JACK_INCLUDE_DIR} 38 | ) 39 | 40 | set(JACK_LIBRARIES 41 | ${JACK_LIBRARY} 42 | ) 43 | 44 | find_package_handle_standard_args(Jack DEFAULT_MSG JACK_LIBRARIES JACK_INCLUDE_DIRS) 45 | 46 | # show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view 47 | mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY JACK_INCLUDE_DIRS JACK_LIBRARIES) 48 | 49 | endif() 50 | -------------------------------------------------------------------------------- /interfaces/gen_synth_phone.js: -------------------------------------------------------------------------------- 1 | loadedInterfaceName = "generic synth (phone)"; 2 | 3 | interfaceOrientation = "landscape"; 4 | 5 | function oct(dir) 6 | { 7 | if(dir == 1 && octSlider.value < 4) 8 | { 9 | octSlider.setValue(octSlider.value +1); 10 | } 11 | else if(dir == -1 && octSlider.value > -4) 12 | { 13 | octSlider.setValue(octSlider.value -1); 14 | } 15 | else if(dir == 0) 16 | { 17 | octSlider.setValue(0); 18 | } 19 | 20 | switch(octSlider.value) 21 | { 22 | case -4: 23 | octLabel.setValue(-4); 24 | octDnButton.setValue(octDnButton.max); 25 | octUpButton.setValue(0); 26 | break; 27 | case -3: 28 | octLabel.setValue(-3); 29 | octDnButton.setValue(octDnButton.max); 30 | octUpButton.setValue(0); 31 | break; 32 | case -2: 33 | octLabel.setValue(-2); 34 | octDnButton.setValue(octDnButton.max); 35 | octUpButton.setValue(0); 36 | break; 37 | case -1: 38 | octLabel.setValue(-1); 39 | octDnButton.setValue(octDnButton.max); 40 | octUpButton.setValue(0); 41 | break; 42 | case 0: 43 | octLabel.setValue(0); 44 | octDnButton.setValue(0); 45 | octUpButton.setValue(0); 46 | break; 47 | case 1: 48 | octLabel.setValue(1); 49 | octUpButton.setValue(octUpButton.max); 50 | octDnButton.setValue(0); 51 | break; 52 | case 2: 53 | octLabel.setValue(2); 54 | octUpButton.setValue(octUpButton.max); 55 | octDnButton.setValue(0); 56 | break; 57 | case 3: 58 | octLabel.setValue(3); 59 | octUpButton.setValue(octUpButton.max); 60 | octDnButton.setValue(0); 61 | break; 62 | case 4: 63 | octLabel.setValue(4); 64 | octUpButton.setValue(octUpButton.max); 65 | octDnButton.setValue(0); 66 | break; 67 | } 68 | 69 | } 70 | 71 | control.octave = oct; 72 | 73 | pages = [[ 74 | { 75 | "name": "reset", 76 | "type": "Button", 77 | "bounds": [.6, .9, .14, .1], 78 | "startingValue": 0, 79 | "isLocal": true, 80 | "mode": "contact", 81 | "ontouchstart": "control.octave(0)", 82 | "stroke": "#aaa", 83 | "label": "reset", 84 | }, 85 | { 86 | "name": "tabButton", 87 | "type": "Button", 88 | "bounds": [.95, .0, .05, .2], 89 | "mode": "toggle", 90 | "stroke": "#aaa", 91 | "isLocal": true, 92 | "ontouchstart": "if(this.value == this.max) { control.showToolbar(); } else { control.hideToolbar(); }", 93 | "label": "menu", 94 | }, 95 | 96 | //pitch and mod wheel 97 | { 98 | "name" : "pitchSlider", 99 | "type" : "Slider", 100 | "bounds": [0, .05, .15, .9], 101 | "range": [0.1,16383.1], 102 | "startingValue": 8192.1, 103 | "address" : "/midi/pitch", 104 | "isVertical" : true, 105 | "isXFader" : false, 106 | "ontouchend": "pitchSlider.setValue(8192.1);" 107 | }, 108 | { 109 | "name" : "modSlider", 110 | "type" : "Slider", 111 | "bounds": [.17, .05, .15, .9], 112 | "range": [0.1,127.1], 113 | "startingValue": 63.1, 114 | "address" : "/midi/cc1", 115 | "isVertical" : true, 116 | "isXFader" : false, 117 | }, 118 | 119 | //other ccs 120 | { 121 | "name" : "cc2Slider", 122 | "type" : "Slider", 123 | "bounds": [.35, .05, .14, .65], 124 | "range": [0.1,127.1], 125 | "startingValue": 0.1, 126 | "address" : "/midi/cc2", 127 | "isVertical" : true, 128 | "isXFader" : false, 129 | }, 130 | { 131 | "name" : "cc3Slider", 132 | "type" : "Slider", 133 | "bounds": [.51, .05, .15, .65], 134 | "range": [0.1,127.1], 135 | "startingValue": 0.1, 136 | "address" : "/midi/cc3", 137 | "isVertical" : true, 138 | "isXFader" : false, 139 | }, 140 | { 141 | "name" : "cc4Slider", 142 | "type" : "Slider", 143 | "bounds": [.68, .05, .15, .65], 144 | "range": [0.1,127.1], 145 | "startingValue": 0.1, 146 | "address" : "/midi/cc4", 147 | "isVertical" : true, 148 | "isXFader" : false, 149 | }, 150 | { 151 | "name" : "cc5Slider", 152 | "type" : "Slider", 153 | "bounds": [.85, .05, .14, .65], 154 | "range": [0.1,127.1], 155 | "startingValue": 0.1, 156 | "address" : "/midi/cc5", 157 | "isVertical" : true, 158 | "isXFader" : false, 159 | }, 160 | 161 | //Octave 162 | { 163 | "name" : "octLabel", 164 | "type" : "Label", 165 | "bounds": [.6, .75, 0.14, 0.15], 166 | "value" : "0", 167 | "size" : "32" 168 | }, 169 | { 170 | "name" : "octSlider", 171 | "type" : "Slider", 172 | "bounds": [.63, .75, 0.0, 0.0], 173 | "range": [-4,4], 174 | "startingValue": 0, 175 | "address" : "/octave", 176 | "isVertical" : true, 177 | "isXFader" : false, 178 | }, 179 | { 180 | "name": "octDnButton", 181 | "type": "Button", 182 | "bounds": [.35, .75, .25, .25], 183 | "mode": "toggle", 184 | "stroke": "#aaa", 185 | "isLocal": true, 186 | "ontouchstart": "control.octave(-1)", 187 | "label": "Oct--", 188 | }, 189 | { 190 | "name": "octUpButton", 191 | "type": "Button", 192 | "bounds": [.74, .75, .25, .25], 193 | "mode": "toggle", 194 | "stroke": "#aaa", 195 | "isLocal": true, 196 | "ontouchstart": "control.octave(1)", 197 | "label": "Oct++", 198 | }, 199 | 200 | ] 201 | 202 | ]; 203 | -------------------------------------------------------------------------------- /interfaces/gen_synth_tablet.js: -------------------------------------------------------------------------------- 1 | loadedInterfaceName = "generic synth (tablet)"; 2 | 3 | interfaceOrientation = "portrait"; 4 | 5 | function oct(dir) 6 | { 7 | if(dir == 1 && octSlider.value < 4) 8 | { 9 | octSlider.setValue(octSlider.value +1); 10 | } 11 | else if(dir == -1 && octSlider.value > -4) 12 | { 13 | octSlider.setValue(octSlider.value -1); 14 | } 15 | else if(dir == 0) 16 | { 17 | octSlider.setValue(0); 18 | } 19 | 20 | switch(octSlider.value) 21 | { 22 | case -4: 23 | octLabel.setValue(-4); 24 | octDnButton.setValue(octDnButton.max); 25 | octUpButton.setValue(0); 26 | break; 27 | case -3: 28 | octLabel.setValue(-3); 29 | octDnButton.setValue(octDnButton.max); 30 | octUpButton.setValue(0); 31 | break; 32 | case -2: 33 | octLabel.setValue(-2); 34 | octDnButton.setValue(octDnButton.max); 35 | octUpButton.setValue(0); 36 | break; 37 | case -1: 38 | octLabel.setValue(-1); 39 | octDnButton.setValue(octDnButton.max); 40 | octUpButton.setValue(0); 41 | break; 42 | case 0: 43 | octLabel.setValue(0); 44 | octDnButton.setValue(0); 45 | octUpButton.setValue(0); 46 | break; 47 | case 1: 48 | octLabel.setValue(1); 49 | octUpButton.setValue(octUpButton.max); 50 | octDnButton.setValue(0); 51 | break; 52 | case 2: 53 | octLabel.setValue(2); 54 | octUpButton.setValue(octUpButton.max); 55 | octDnButton.setValue(0); 56 | break; 57 | case 3: 58 | octLabel.setValue(3); 59 | octUpButton.setValue(octUpButton.max); 60 | octDnButton.setValue(0); 61 | break; 62 | case 4: 63 | octLabel.setValue(4); 64 | octUpButton.setValue(octUpButton.max); 65 | octDnButton.setValue(0); 66 | break; 67 | } 68 | 69 | } 70 | 71 | control.octave = oct; 72 | 73 | pages = [[ 74 | { 75 | "name": "tabButton", 76 | "type": "Button", 77 | "bounds": [.95, .0, .05, .2], 78 | "mode": "toggle", 79 | "stroke": "#aaa", 80 | "isLocal": true, 81 | "ontouchstart": "if(this.value == this.max) { control.showToolbar(); } else { control.hideToolbar(); }", 82 | "label": "menu", 83 | }, 84 | { 85 | "name": "refresh", 86 | "type": "Button", 87 | "bounds": [.8, .6, .2, .4], 88 | "startingValue": 0, 89 | "isLocal": true, 90 | "mode": "contact", 91 | "ontouchstart": "interfaceManager.refreshInterface()", 92 | "stroke": "#aaa", 93 | "label": "refrsh", 94 | }, 95 | 96 | //pitch and mod wheel 97 | { 98 | "name" : "pitchSlider", 99 | "type" : "Slider", 100 | "bounds": [.31, .0, .69, .08], 101 | "range": [0.1,16383.1], 102 | "startingValue": 8192.1, 103 | "address" : "/pitch", 104 | "isVertical" : false, 105 | "isXFader" : false, 106 | "ontouchend": "pitchSlider.setValue(8192.1);" 107 | }, 108 | { 109 | "name" : "modSlider", 110 | "type" : "Slider", 111 | "bounds": [.31, .10, .69, .08], 112 | "range": [0.1,127.1], 113 | "startingValue": 63.1, 114 | "address" : "/midi/cc1", 115 | "isVertical" : false, 116 | "isXFader" : false, 117 | }, 118 | 119 | //other ccs 120 | { 121 | "name" : "cc2Slider", 122 | "type" : "Slider", 123 | "bounds": [.35, .05, .14, .55], 124 | "range": [0.1,127.1], 125 | "startingValue": 0.1, 126 | "address" : "/midi/cc2", 127 | "isVertical" : false, 128 | "isXFader" : false, 129 | }, 130 | { 131 | "name" : "cc3Slider", 132 | "type" : "Slider", 133 | "bounds": [.51, .05, .15, .55], 134 | "range": [0.1,127.1], 135 | "startingValue": 0.1, 136 | "address" : "/midi/cc3", 137 | "isVertical" : false, 138 | "isXFader" : false, 139 | }, 140 | { 141 | "name" : "cc4Slider", 142 | "type" : "Slider", 143 | "bounds": [.68, .05, .15, .55], 144 | "range": [0.1,127.1], 145 | "startingValue": 0.1, 146 | "address" : "/midi/cc4", 147 | "isVertical" : false, 148 | "isXFader" : false, 149 | }, 150 | { 151 | "name" : "cc5Slider", 152 | "type" : "Slider", 153 | "bounds": [.85, .05, .14, .55], 154 | "range": [0.1,127.1], 155 | "startingValue": 0.1, 156 | "address" : "/midi/cc5", 157 | "isVertical" : false, 158 | "isXFader" : false, 159 | }, 160 | 161 | //Octave 162 | { 163 | "name" : "octLabel", 164 | "type" : "Label", 165 | "bounds": [.1, .75, 0.14, 0.15], 166 | "value" : "0", 167 | "size" : "32" 168 | }, 169 | { 170 | "name" : "octSlider", 171 | "type" : "Slider", 172 | "bounds": [.1, .75, 0.0, 0.0], 173 | "range": [-4,4], 174 | "startingValue": 0, 175 | "address" : "/octave", 176 | "isVertical" : true, 177 | "isXFader" : false, 178 | }, 179 | { 180 | "name": "octDnButton", 181 | "type": "Button", 182 | "bounds": [0, 0, .2, .1], 183 | "mode": "toggle", 184 | "stroke": "#aaa", 185 | "isLocal": true, 186 | "ontouchstart": "control.octave(-1)", 187 | "label": "Oct--", 188 | }, 189 | { 190 | "name": "octUpButton", 191 | "type": "Button", 192 | "bounds": [0, .12, .2, .1], 193 | "mode": "toggle", 194 | "stroke": "#aaa", 195 | "isLocal": true, 196 | "ontouchstart": "control.octave(1)", 197 | "label": "Oct++", 198 | }, 199 | { 200 | "name": "reset", 201 | "type": "Button", 202 | "bounds": [0, .1, .1, .02], 203 | "startingValue": 0, 204 | "isLocal": true, 205 | "mode": "contact", 206 | "ontouchstart": "control.octave(0)", 207 | "stroke": "#aaa", 208 | "label": "reset", 209 | }, 210 | 211 | ] 212 | 213 | ]; 214 | -------------------------------------------------------------------------------- /interfaces/template.js: -------------------------------------------------------------------------------- 1 | loadedInterfaceName = "template"; 2 | 3 | interfaceOrientation = "portrait"; 4 | 5 | pages = [[ 6 | { 7 | "name": "refresh", 8 | "type": "Button", 9 | "bounds": [.6, .9, .2, .1], 10 | "startingValue": 0, 11 | "isLocal": true, 12 | "mode": "contact", 13 | "ontouchstart": "interfaceManager.refreshInterface()", 14 | "stroke": "#aaa", 15 | "label": "refrsh", 16 | }, 17 | { 18 | "name": "tabButton", 19 | "type": "Button", 20 | "bounds": [.8, .9, .2, .1], 21 | "mode": "toggle", 22 | "stroke": "#aaa", 23 | "isLocal": true, 24 | "ontouchstart": "if(this.value == this.max) { control.showToolbar(); } else { control.hideToolbar(); }", 25 | "label": "menu", 26 | }, 27 | ] 28 | ]; 29 | -------------------------------------------------------------------------------- /maps/androsc.omm: -------------------------------------------------------------------------------- 1 | #this mapping works with all the default widgets in androsc 2 | 3 | #template 1,2,3 4 | button i, a : controlchange( channel, 5, a ); 5 | #template 2 6 | /vslider f, a : controlchange( channel, 1, a*127 ); 7 | /hslider f, a : controlchange( channel, 2, a*127 ); 8 | pad ff, a,b : controlchange( channel, 3, a*1.27 ); 9 | pad ff, a,b : controlchange( channel, 4, b*1.27 ); 10 | #template 3 11 | /push i, a : controlchange( channel, 6, a*127 ); 12 | /toggle i, a : controlchange( channel, 7, a*127 ); 13 | /vsliderme f, a : controlchange( channel, 8, a*127 ); 14 | /vsliderme ff, a,a : controlchange( channel, 9, a ); 15 | /hslider f, a : controlchange( channel, 10, a*1.27 ); #this one is different between templates 2 & 3 16 | pad fi, a,b : controlchange( channel, 11, a*12.7 ); 17 | pad fi, a,b : controlchange( channel, 12, b*1.27 ); 18 | -------------------------------------------------------------------------------- /maps/control.omm: -------------------------------------------------------------------------------- 1 | #this mapping works with all the default interfaces that come with control 2 | 3 | # multitouch 4 | /multi/{i} ff, touch,x,y : controlchange( channel, touch, x*127); 5 | /multi/{i} ff, touch,x,y : controlchange( channel, touch+10, y*127); 6 | # mixer 7 | /pan{i} f, cc,val : controlchange( channel, cc*4, val*63.5 + 63.5); 8 | /mute{i} i, cc,val : controlchange( channel, cc*4+1, val*127); 9 | /solo{i} i, cc,val : controlchange( channel, cc*4+2, val*127); 10 | /vol{i} f, cc,val : controlchange( channel, cc*4+3, val*127); 11 | # DJ 12 | /leftHighCut i, val : controlchange( channel, 1, val); 13 | /leftMidCut i, val : controlchange( channel, 2, val); 14 | /leftLowCut i, val : controlchange( channel, 3, val); 15 | /leftVolume f, val : controlchange( channel, 4, val); 16 | /leftMulti{i} f, indx,val : controlchange( channel, 5+indx, val); 17 | /leftCue i, val : controlchange( channel, 9, val); 18 | /crossfader f, val : controlchange( channel, 10, val); 19 | /crossfader i, val : controlchange( channel, 10, val); 20 | /rightHighCut i, val : controlchange( channel, 11, val); 21 | /rightMidCut i, val : controlchange( channel, 12, val); 22 | /rightLowCut i, val : controlchange( channel, 13, val); 23 | /rightVolume f, val : controlchange( channel, 14, val); 24 | /rightMulti{i} f, indx,val : controlchange( channel, 15+indx, val); 25 | /rightCue i, val : controlchange( channel, 19, val); 26 | # conways game of life 27 | /life/{i} i, note, val : note( channel, 127-note,velocity, val); 28 | # monome 29 | /slider{i} f, indx,val : controlchange( channel, indx, val); 30 | /mlr/press iii, x,y,val : note( channel, x*2+54, velocity, val); 31 | /mlr/press iii, x,y,val : note( channel, y*4+48, velocity, val); 32 | # multibutton 33 | /multi/{i} i, indx,val : note( channel, 108-11*indx/8, 100, val); 34 | # sequencer 35 | /sliders0/{i} f, step,val : setvelocity( val ); 36 | /sliders{i}/{i} f, cc,step,val : controlchange( channel, cc, val); 37 | /grid/{i} i, button,state : note( channel, 84-button/32, velocity, state); 38 | # accelerometer 39 | /accelerometer fff, x,y,z : controlchange( channel, 1, x); 40 | /accelerometer fff, x,y,z : controlchange( channel, 2, y); 41 | /accelerometer fff, x,y,z : controlchange( channel, 3, z); 42 | -------------------------------------------------------------------------------- /maps/default.omm: -------------------------------------------------------------------------------- 1 | # spencer jackson 2 | # default.omm (Osc to Midi Map) 3 | 4 | # this is a highly configurable mapping from OSC messages to MIDI messages and 5 | # back. Each uncommented line follows the form: 6 | # [OscPath] [ArgTypes], [VarName1], [VarName2], ..., [VarNameN] : [MIDIFUNCTION](args); 7 | 8 | # more info is below the actual configuration specified in this file. This 9 | # mapping works with all the default interfaces that come with control 10 | # I have also made better maps for some individual interfaces 11 | 12 | # multitouch 13 | /multi/{i} ff, touch,x,y : controlchange( channel, touch, x*127); 14 | /multi/{i} ff, touch,x,y : controlchange( channel, touch+10, y*127); 15 | # mixer 16 | /pan{i} f, cc,val : controlchange( channel, cc*4, val*63.5 + 63.5); 17 | /mute{i} i, cc,val : controlchange( channel, cc*4+1, val*127); 18 | /solo{i} i, cc,val : controlchange( channel, cc*4+2, val*127); 19 | /vol{i} f, cc,val : controlchange( channel, cc*4+3, val*127); 20 | # DJ 21 | /leftHighCut i, val : controlchange( channel, 1, val); 22 | /leftMidCut i, val : controlchange( channel, 2, val); 23 | /leftLowCut i, val : controlchange( channel, 3, val); 24 | /leftVolume f, val : controlchange( channel, 4, val); 25 | /leftMulti/{i} i, indx,val : controlchange( channel, 5+indx, val); 26 | /leftCue i, val : controlchange( channel, 9, val); 27 | /crossfader f, val : controlchange( channel, 10, val); 28 | /crossfader i, val : controlchange( channel, 10, val); 29 | /rightHighCut i, val : controlchange( channel, 11, val); 30 | /rightMidCut i, val : controlchange( channel, 12, val); 31 | /rightLowCut i, val : controlchange( channel, 13, val); 32 | /rightVolume f, val : controlchange( channel, 14, val); 33 | /rightMulti/{i} i, indx,val : controlchange( channel, 15+indx, val); 34 | /rightCue i, val : controlchange( channel, 19, val); 35 | # conways game of life 36 | /life/{i} i, -note+127, val : note( channel, note,velocity, val); 37 | # monome 38 | /slider{i} f, indx,val : controlchange( channel, indx, val*127); 39 | /mlr/press iii, x,y,val : note( channel, x*2+54, velocity, val); 40 | /mlr/press iii, x,y,val : note( channel, y*4+48, velocity, val); 41 | # multibutton 42 | /multi/{i} i, indx,val : note( channel, -11*indx/8+108, 100, val); 43 | # sequencer 44 | /sliders0/{i} f, step,val : setvelocity( val ); 45 | /sliders{i}/{i} f, cc,step,val : controlchange( channel, cc, val); 46 | /grid/{i} i, 0-15,state : note( channel, 84, velocity, state); 47 | /grid/{i} i, 16-31,state : note( channel, 83, velocity, state); 48 | /grid/{i} i, 32-47,state : note( channel, 81, velocity, state); 49 | /grid/{i} i, 48-63,state : note( channel, 79, velocity, state); 50 | /grid/{i} i, 64-79,state : note( channel, 77, velocity, state); 51 | /grid/{i} i, 80-95,state : note( channel, 76, velocity, state); 52 | /grid/{i} i, 96-111,state : note( channel, 74, velocity, state); 53 | /grid/{i} i, 112-127,state : note( channel, 72, velocity, state); 54 | # accelerometer 55 | /accelerometer fff, x,y,z : controlchange( channel, 1, x); 56 | /accelerometer fff, x,y,z : controlchange( channel, 2, y); 57 | /accelerometer fff, x,y,z : controlchange( channel, 3, z); 58 | 59 | 60 | # The first thing to note is that you can pass arguments through the OSC message 61 | # path. The character sequence "{i}" indicates an integer in the path. This allows you to 62 | # map many things quicky. For example rather than type out 127 mappings to include each 63 | # control number, you just pull the index of the controller out of the path. This 64 | # makes [VarName1] (i.e. "touch" above) actually in the path rather than 65 | # lining up with the argument types listed after the path. Only integer types are 66 | # supported in the path. 67 | 68 | # This could of course be accomplished through sending 2 arguments, but doing so 69 | # isn't as simple when designing a Control template. Both ways are fully supported. 70 | 71 | # You can have arguments or variables be constant or have to match a range. 72 | # This will only match when the midi or osc value matches the constant or range 73 | # bounds. This is accomplished by supplying the value or range in the 74 | # form min-max instead of a variable name. 75 | # The first arguments of the "/grid{i}" paths above are good examples. They allow 76 | # easier mapping of many paths to a single midi command. When converting 77 | # a pair with a range the first number in the range is used each time. 78 | 79 | # The next thing to note is that "channel" and velocity are keywords and shall not be used 80 | # as OSC argument names. The channel keyword indicates that the global channel set in 81 | # osc2midi through the command line option -c <0-15> will be used in this 82 | # part of the midi command. This allows easy specification of the channel 83 | # but also great flexibility if one would not like every action to be on the 84 | # global channel. The keyword velocity can similarly be set with option -vel <0-127> 85 | # This value is only useful for note on and off messages. 86 | 87 | # The global channel can be controlled through OSC by mapping an arbitrary 88 | # OSC path to execute the function setchannel() rather than one of the 89 | # midi functions. The parallel for velocity is setvelocity() 90 | 91 | # Naturally, the global channel or velocity doesn't have to be used at all. You could 92 | # specify these values in each message through an argument or the OSC path. i.e. 93 | # /m/chan{i}/controlchange{i} i, chan,ctl,val : controlchange(chan,ctl,val); 94 | # or even 95 | # /supercontroller d f h, ctl,value,grapefruit : controlchange(grapefruit,ctl,value); 96 | 97 | # There is also a non-midi command setshift(). When this appears in a map file 98 | # the utility creates two extra jack midi ports named filter in and out. 99 | # This filter shifts notes up or down the number of semitones set by this command. 100 | # It was implemented primarily to allow octave to be controlled through osc 101 | # as commonly available on keyboard midi controllers. 102 | 103 | # So you see the ordering and naming of the variables is arbitrary. You can also 104 | # do some conditioning of the variables such as in the first few uncommented 105 | # examples in the mapping declared by this file. Only the */+- operators 106 | # are supported and only in the form of variable*/const +- const. You cannot 107 | # use variables to condition other variables, only constants. This can be 108 | # done on the osc or the midi side of the pair map, i.e. 109 | # /hat/sombrero if, a, b/10-.5 : programchange(a,b); 110 | # is equivalent to 111 | # /hat/sombrero if, a,b : programchange(a,b*10+5); 112 | # this is to allow you to think in either osc to midi conversion or visa versa. 113 | 114 | # You can also have conditioning on both the osc and midi side, but you might 115 | # get a headache reversing the one side and applying the other. Aw, heck, I'll 116 | # try to explain it. If an osc message comes in with a 1 and the pair is declared: 117 | # /confusing/but/linear i, 2*var-1 : programchange(channel, 4*var+3) 118 | # then the program change will be 4*( (1-(-1))/2 ) + 3 = 7. So everything inside 119 | # the parenthesis is undoing the osc side conditioning then outside is applying 120 | # the midi side conditioning. This is only useful really if you are going to use 121 | # mappings that are not one-to-one. 122 | 123 | # Non-one-to-one mappings are allowed such as 124 | # /cow/1/moo fff, 2*a, a+3, a*100 : controlchange(channel, 10, a); 125 | # /bus/plugin/param2 i, val : controlchange(channel, val, val); 126 | # As you can see variables from one side are used several times on the other side. 127 | # If you expect messages to be converted both ways it is better to use strictly 128 | # one to one mappings, since osc2midi does not normally check that multiple 129 | # occurrences of a variable are all matched to the same value. However, this can 130 | # be enforced by invoking osc2midi with the -strict option. 131 | 132 | # The important formatting details for each mapping are that the path and argment 133 | # types are separated by a space, the first comma indicates the first argument 134 | # name (naming the variable in the path or actual OSC argument), second comma 135 | # for the next argument etc. Even when there are no arguments, the comma is 136 | # required to separate the empty type and argname fields. For example: 137 | # /pathonly , : programchange(1,23); 138 | # You can have fewer variable names than acutal osc args 139 | # or leave a blank for unused variable names, i.e. 140 | # /hello/world iififfiii, , ,floatval, : programchange( ,floatval*127); 141 | # The colon separates the OSC information from the midi 142 | # information. After the colon must appear a valid function name with the correct 143 | # number of arguments. Each mapping must have its own line. 144 | 145 | # The full list of supported Midi Functions is as follows: 146 | # noteon( channel, noteNumber, velocity ); 147 | # noteoff( channel, noteNumber, velocity ); 148 | # note( channel, noteNumber, velocity, state ); # state dictates note on (state != 0) or note off (state == 0) 149 | # polyaftertouch( channel, noteNumber, pressure ); 150 | # controlchange( channel, controlNumber, value ); 151 | # programchange( channel, programNumber ); 152 | # aftertouch( channel, pressure ); 153 | # pitchbend( channel, value ); 154 | # rawmidi( byte0, byte1, byte2 ); # this sends whater midi message you compose with bytes 0-2 155 | # midimessage( message ); # this sends a message using the OSC type m which is a pointer to a midi message 156 | 157 | # non-Midi functions that operate other system functions are: 158 | # setchannel( channelNumber ); # set the global channel 159 | # setvelocity( velocity ); # set the global velocity 160 | # setshift( shift ); #set the midi filter note shift amount in semitones 161 | 162 | # If you make a mapping file that others could find useful please submit it and I 163 | # will add it to the files provided by the project 164 | -------------------------------------------------------------------------------- /maps/gameOfLife.omm: -------------------------------------------------------------------------------- 1 | # spencer jackson 2 | # 3 | # this mapping is for the Conway's Game of Life that comes default wih the Control app. 4 | # another mapping is available in default.omm but this one is supposed be more more musical 5 | 6 | /life/0 i, val : note( channel, 084, velocity, val); 7 | /life/1 i, val : note( channel, 088, velocity, val); 8 | /life/2 i, val : note( channel, 091, velocity, val); 9 | /life/3 i, val : note( channel, 095, velocity, val); 10 | /life/4 i, val : note( channel, 098, velocity, val); 11 | /life/5 i, val : note( channel, 101, velocity, val); 12 | /life/6 i, val : note( channel, 105, velocity, val); 13 | /life/7 i, val : note( channel, 108, velocity, val); 14 | /life/8 i, val : note( channel, 112, velocity, val); 15 | /life/9 i, val : note( channel, 115, velocity, val); 16 | /life/10 i, val : note( channel, 119, velocity, val); 17 | 18 | /life/11 i, val : note( channel, 077, velocity, val); 19 | /life/12 i, val : note( channel, 081, velocity, val); 20 | /life/13 i, val : note( channel, 084, velocity, val); 21 | /life/14 i, val : note( channel, 088, velocity, val); 22 | /life/15 i, val : note( channel, 091, velocity, val); 23 | /life/16 i, val : note( channel, 095, velocity, val); 24 | /life/17 i, val : note( channel, 098, velocity, val); 25 | /life/18 i, val : note( channel, 101, velocity, val); 26 | /life/19 i, val : note( channel, 105, velocity, val); 27 | /life/20 i, val : note( channel, 108, velocity, val); 28 | /life/21 i, val : note( channel, 112, velocity, val); 29 | 30 | /life/22 i, val : note( channel, 071, velocity, val); 31 | /life/23 i, val : note( channel, 074, velocity, val); 32 | /life/24 i, val : note( channel, 077, velocity, val); 33 | /life/25 i, val : note( channel, 081, velocity, val); 34 | /life/26 i, val : note( channel, 084, velocity, val); 35 | /life/27 i, val : note( channel, 088, velocity, val); 36 | /life/28 i, val : note( channel, 091, velocity, val); 37 | /life/29 i, val : note( channel, 095, velocity, val); 38 | /life/30 i, val : note( channel, 098, velocity, val); 39 | /life/31 i, val : note( channel, 101, velocity, val); 40 | /life/32 i, val : note( channel, 105, velocity, val); 41 | 42 | /life/33 i, val : note( channel, 064, velocity, val); 43 | /life/34 i, val : note( channel, 067, velocity, val); 44 | /life/35 i, val : note( channel, 071, velocity, val); 45 | /life/36 i, val : note( channel, 074, velocity, val); 46 | /life/37 i, val : note( channel, 077, velocity, val); 47 | /life/38 i, val : note( channel, 081, velocity, val); 48 | /life/39 i, val : note( channel, 084, velocity, val); 49 | /life/40 i, val : note( channel, 088, velocity, val); 50 | /life/41 i, val : note( channel, 091, velocity, val); 51 | /life/42 i, val : note( channel, 095, velocity, val); 52 | /life/43 i, val : note( channel, 098, velocity, val); 53 | 54 | /life/44 i, val : note( channel, 057, velocity, val); 55 | /life/45 i, val : note( channel, 060, velocity, val); 56 | /life/46 i, val : note( channel, 064, velocity, val); 57 | /life/47 i, val : note( channel, 067, velocity, val); 58 | /life/48 i, val : note( channel, 071, velocity, val); 59 | /life/49 i, val : note( channel, 074, velocity, val); 60 | /life/50 i, val : note( channel, 077, velocity, val); 61 | /life/51 i, val : note( channel, 081, velocity, val); 62 | /life/52 i, val : note( channel, 084, velocity, val); 63 | /life/53 i, val : note( channel, 088, velocity, val); 64 | /life/54 i, val : note( channel, 091, velocity, val); 65 | 66 | /life/55 i, val : note( channel, 050, velocity, val); 67 | /life/56 i, val : note( channel, 053, velocity, val); 68 | /life/57 i, val : note( channel, 057, velocity, val); 69 | /life/58 i, val : note( channel, 060, velocity, val); 70 | /life/59 i, val : note( channel, 064, velocity, val); 71 | /life/60 i, val : note( channel, 067, velocity, val); 72 | /life/61 i, val : note( channel, 071, velocity, val); 73 | /life/62 i, val : note( channel, 074, velocity, val); 74 | /life/63 i, val : note( channel, 077, velocity, val); 75 | /life/64 i, val : note( channel, 081, velocity, val); 76 | /life/65 i, val : note( channel, 084, velocity, val); 77 | 78 | /life/66 i, val : note( channel, 043, velocity, val); 79 | /life/67 i, val : note( channel, 047, velocity, val); 80 | /life/68 i, val : note( channel, 050, velocity, val); 81 | /life/69 i, val : note( channel, 053, velocity, val); 82 | /life/70 i, val : note( channel, 057, velocity, val); 83 | /life/71 i, val : note( channel, 060, velocity, val); 84 | /life/72 i, val : note( channel, 064, velocity, val); 85 | /life/73 i, val : note( channel, 067, velocity, val); 86 | /life/74 i, val : note( channel, 071, velocity, val); 87 | /life/75 i, val : note( channel, 074, velocity, val); 88 | /life/76 i, val : note( channel, 077, velocity, val); 89 | 90 | /life/77 i, val : note( channel, 036, velocity, val); 91 | /life/78 i, val : note( channel, 040, velocity, val); 92 | /life/79 i, val : note( channel, 043, velocity, val); 93 | /life/80 i, val : note( channel, 047, velocity, val); 94 | /life/81 i, val : note( channel, 050, velocity, val); 95 | /life/82 i, val : note( channel, 053, velocity, val); 96 | /life/83 i, val : note( channel, 057, velocity, val); 97 | /life/84 i, val : note( channel, 060, velocity, val); 98 | /life/85 i, val : note( channel, 064, velocity, val); 99 | /life/86 i, val : note( channel, 067, velocity, val); 100 | /life/87 i, val : note( channel, 071, velocity, val); 101 | 102 | /life/88 i, val : note( channel, 029, velocity, val); 103 | /life/89 i, val : note( channel, 033, velocity, val); 104 | /life/90 i, val : note( channel, 036, velocity, val); 105 | /life/91 i, val : note( channel, 040, velocity, val); 106 | /life/92 i, val : note( channel, 043, velocity, val); 107 | /life/93 i, val : note( channel, 047, velocity, val); 108 | /life/94 i, val : note( channel, 050, velocity, val); 109 | /life/95 i, val : note( channel, 053, velocity, val); 110 | /life/96 i, val : note( channel, 057, velocity, val); 111 | /life/97 i, val : note( channel, 060, velocity, val); 112 | /life/98 i, val : note( channel, 064, velocity, val); 113 | 114 | /life/99 i, val : note( channel, 024, velocity, val); 115 | /life/100 i, val : note( channel, 026, velocity, val); 116 | /life/101 i, val : note( channel, 029, velocity, val); 117 | /life/102 i, val : note( channel, 033, velocity, val); 118 | /life/103 i, val : note( channel, 036, velocity, val); 119 | /life/104 i, val : note( channel, 040, velocity, val); 120 | /life/105 i, val : note( channel, 043, velocity, val); 121 | /life/106 i, val : note( channel, 047, velocity, val); 122 | /life/107 i, val : note( channel, 050, velocity, val); 123 | /life/108 i, val : note( channel, 053, velocity, val); 124 | /life/109 i, val : note( channel, 057, velocity, val); 125 | 126 | /life/110 i, val : note( channel, 024, velocity, val); 127 | /life/111 i, val : note( channel, 024, velocity, val); 128 | /life/112 i, val : note( channel, 024, velocity, val); 129 | /life/113 i, val : note( channel, 026, velocity, val); 130 | /life/114 i, val : note( channel, 029, velocity, val); 131 | /life/115 i, val : note( channel, 033, velocity, val); 132 | /life/116 i, val : note( channel, 036, velocity, val); 133 | /life/117 i, val : note( channel, 040, velocity, val); 134 | /life/118 i, val : note( channel, 043, velocity, val); 135 | /life/119 i, val : note( channel, 047, velocity, val); 136 | /life/120 i, val : note( channel, 050, velocity, val); 137 | -------------------------------------------------------------------------------- /maps/generic.omm: -------------------------------------------------------------------------------- 1 | # spencer jackson 2 | # generic.omm (Osc to Midi Map) 3 | 4 | 5 | # This file is specifically for the default Control templates also included in this repo. 6 | 7 | 8 | /midi/cc{i} f, ctl, val : controlchange( channel, ctl, val ); 9 | /midi/cc{i} i, ctl, val : controlchange( channel, ctl, val ); 10 | /midi/pc f, pgm : programchange( channel, pgm ); 11 | /midi/pitch f, bend : pitchbend( channel, bend ); 12 | /midi/noteon{i} i, n,vel : noteon( channel, n, vel ); 13 | /midi/noteoff{i} i, n,vel : noteon( channel, n, vel ); 14 | /chan i, c : setchannel( c ); 15 | /octave i, o : setshift( o*12 ); 16 | 17 | 18 | -------------------------------------------------------------------------------- /maps/sensors2osc.omm: -------------------------------------------------------------------------------- 1 | #mapping for app sensors2osc on fdroid 2 | #https://f-droid.org/en/packages/org.sensors2.osc/ 3 | #likely every phone will have some variations in the availability 4 | #and sometimes scale of the sensors and data 5 | 6 | #multitouch 7 | /touch{i} ff, a,b,c : controlchange( channel, 2*a-1, 127*b); 8 | /touch{i} ff, a,b,c : controlchange( channel, 2*a, 127*c); 9 | #accelerometer 10 | /accelerometer fff, x,y,z : controlchange( channel, 1, 10*x); 11 | /accelerometer fff, x,y,z : controlchange( channel, 2, 10*y); 12 | /accelerometer fff, x,y,z : controlchange( channel, 3, 10*z); 13 | #magnetic field 14 | /magneticfield fff, x,y,z : controlchange( channel, 4, 2*x+64); 15 | /magneticfield fff, x,y,z : controlchange( channel, 5, 2*y+64); 16 | /magneticfield fff, x,y,z : controlchange( channel, 6, 2*z+64); 17 | #gyroscope 18 | /gyroscope fff, x,y,z : controlchange( channel, 7, 6*x); 19 | /gyroscope fff, x,y,z : controlchange( channel, 8, 6*y); 20 | /gyroscope fff, x,y,z : controlchange( channel, 9, 6*z); 21 | #light 22 | /light f, a : controlchange( channel, 10, a/10); 23 | #gravity 24 | /gravity fff, x,y,z : controlchange( channel, 1, 10*x); 25 | /gravity fff, x,y,z : controlchange( channel, 2, 10*y); 26 | /gravity fff, x,y,z : controlchange( channel, 3, 10*z); 27 | #linear acceleration 28 | /linearacceleration fff, a,b,c : controlchange( channel, 1, 64*a+64); 29 | /linearacceleration fff, a,b,c : controlchange( channel, 2, 64*b+64); 30 | /linearacceleration fff, a,b,c : controlchange( channel, 3, 64*c+64); 31 | #rotation vector 32 | /rotationvector fffff, a,b,c,d,e : controlchange( channel, 1, 64*a+64); 33 | /rotationvector fffff, a,b,c,d,e : controlchange( channel, 2, 64*b+64); 34 | /rotationvector fffff, a,b,c,d,e : controlchange( channel, 3, 64*c+64); 35 | /rotationvector fffff, a,b,c,d,e : controlchange( channel, 4, 127*d); 36 | /rotationvector fffff, a,b,c,d,e : controlchange( channel, 5, 127*e); 37 | #since steps aren't really bounded, these will just saturate after 127 steps 38 | /stepcounter f, a: controlchange( channel, 1, a); 39 | /stepdetector f, a: controlchange( channel, 1, a); 40 | #game rotation vector 41 | /gamerotationvector ffff, a,b,c,d : controlchange( channel, 1, 64*a+64); 42 | /gamerotationvector ffff, a,b,c,d : controlchange( channel, 2, 64*b+64); 43 | /gamerotationvector ffff, a,b,c,d : controlchange( channel, 3, 127*c); 44 | /gamerotationvector ffff, a,b,c,d : controlchange( channel, 4, 127*d); 45 | #geomagnetic rotation vector 46 | /georotationvector fffff, a,b,c,d,e : controlchange( channel, 1, 64*a+64); 47 | /georotationvector fffff, a,b,c,d,e : controlchange( channel, 2, 64*b+64); 48 | /georotationvector fffff, a,b,c,d,e : controlchange( channel, 3, 64*c+64); 49 | /georotationvector fffff, a,b,c,d,e : controlchange( channel, 4, 127*d); 50 | /georotationvector fffff, a,b,c,d,e : controlchange( channel, 5, 127*e); 51 | #orientation 52 | /orientation fff, a,b,c : controlchange( channel, 1, 25*a+64); 53 | /orientation fff, a,b,c : controlchange( channel, 2, 25*b+64); 54 | /orientation fff, a,b,c : controlchange( channel, 3, 25*c+64); 55 | #inclination 56 | /inclination f, a : controlchange( channel, 1, 32*a+64); 57 | 58 | #unimplemented sensors 59 | #uncalibrated values are a bit different on each phone so I wasn't sure 60 | #how to scale them 61 | #/magneticfielduncalibrated ffffff, 62 | #/gyroscopeuncalibrated ffffff, 63 | #my phone didn't produce any messages from these sensors 64 | #/significantmotion 65 | #/tiltdetector 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /maps/sequencer.omm: -------------------------------------------------------------------------------- 1 | # sequencer.omm 2 | # spencer jackson 3 | 4 | # this mapping is for the sequencer interface that is default in Control 5 | 6 | /sliders0/{i} f, step,val : setvelocity( val ); 7 | /sliders{i}/{i} f, cc,step,val : controlchange( channel, cc, val); 8 | /grid/{i} i, 0-15, state : note( channel, 84, velocity, state); 9 | /grid/{i} i, 16-31, state : note( channel, 83, velocity, state); 10 | /grid/{i} i, 32-47, state : note( channel, 81, velocity, state); 11 | /grid/{i} i, 48-63, state : note( channel, 79, velocity, state); 12 | /grid/{i} i, 64-79, state : note( channel, 77, velocity, state); 13 | /grid/{i} i, 80-95, state : note( channel, 76, velocity, state); 14 | /grid/{i} i, 96-111, state : note( channel, 74, velocity, state); 15 | /grid/{i} i, 112-127, state : note( channel, 72, velocity, state); 16 | -------------------------------------------------------------------------------- /maps/syntax.omm: -------------------------------------------------------------------------------- 1 | # This is *not* a working map file. It's full of syntax errors and is not 2 | # intended to be used for any purpose other than a regression test for the 3 | # osc2midi parser. A proper implementation should find an error in each of the 4 | # following lines. (Older versions of osc2midi will happily parse some of 5 | # these and produce bogus mappings instead.) 6 | /1, : noteon( 0, 60, 127 ); 7 | /1 : noteon( 0, 60, 127 ); 8 | /1: noteon( 0, 60, 127 ); 9 | /1/fader1 f, 1- : controlchange( 0, 1, 127*val ); 10 | /1/fader1 f, val- : controlchange( 0, 1, 127*val ); 11 | /1/fader1 f, +val : controlchange( 0, 1, 127*val ); 12 | /1/fader2 f, val : controlchange( 0, 1-, 127*val ); 13 | /1/fader2 f, val : controlchange( 0, 1, 127* ); 14 | /1/fader2 f, val : controlchange( 0, 1, *val ); 15 | /2 , : noteon( 0, 61, 127+ ); 16 | /2/multipush1/1/1 f, val : controlchange 17 | /2/multipush1/1/1 f, val : controlchange( ); 18 | /2/multipush1/2/1 f, val : controlchange( 0, 1, 127*val 19 | /2/multipush1/3/1 f, val : control change( 0, 1, 127*val ); 20 | /2/multipush1/1/2 f, val controlchange( 0, 4, 127*val ); 21 | /2/multipush1/2/2 f, val : controlchange( 0, 5, 127* 22 | /2/multipush1/3/2 f, val : controlchange( 0, 6, 127*val ); junk 23 | /2/xy1 ff, 5+-3, : controlchange( 1, 1, 127*val ); 24 | /2/xy1 ff, , *-3 : controlchange( 1, 2, 127*val ); 25 | /2/xy1 f f,a,b: controlchange( 1, a, b ); #space between data types 26 | -------------------------------------------------------------------------------- /maps/touchosc.omm: -------------------------------------------------------------------------------- 1 | # spencer jackson 2 | # touchosc.omm 3 | 4 | # this mapping is for the proprietary android/iOS app TouchOSC 5 | # since I don't actually own TouchOSC, I have no clue if this 6 | # is accurate or will work 7 | 8 | /ctl iii, v,n,c : controlchange( c, n, v ); 9 | /note iii, n,v,c : noteon( c, n, v ); 10 | /pgm ii, n,c : programchange( c, n ); 11 | /polytouch iii, v,n,c : polyaftertouch( c, n, v ); 12 | /touch ii, v,c : aftertouch( c, v ); 13 | /bend ii, v,c : pitchbend( c, v ); 14 | /start , : rawmidi( 250, 0, 0 ); 15 | /cont , : rawmidi( 251, 0, 0 ); 16 | /stop , : rawmidi( 252, 0, 0 ); 17 | -------------------------------------------------------------------------------- /maps/touchosc/Automat5.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Automat5.touchosc Fri Jun 26 23:42:13 2015 2 | /1 , : noteon( 15, 0, 127 ); 3 | /encoderM f, val : controlchange( 0, 26, 127*val ); 4 | /1/rotaryA f, val : controlchange( 0, 0, 127*val ); 5 | /1/rotaryB f, val : controlchange( 0, 1, 127*val ); 6 | /1/rotaryC f, val : controlchange( 0, 2, 127*val ); 7 | /1/rotaryD f, val : controlchange( 0, 3, 127*val ); 8 | /faderM f, val : controlchange( 0, 28, 127*val ); 9 | /toggleA_1 f, 0.0 : controlchange( 0, 29, 0 ); 10 | /toggleA_1 f, 1.0 : controlchange( 0, 29, 127 ); 11 | /1/faderA f, val : controlchange( 0, 8, 127*val ); 12 | /toggleA_2 f, 0.0 : controlchange( 0, 30, 0 ); 13 | /toggleA_2 f, 1.0 : controlchange( 0, 30, 127 ); 14 | /toggleB_2 f, 0.0 : controlchange( 0, 32, 0 ); 15 | /toggleB_2 f, 1.0 : controlchange( 0, 32, 127 ); 16 | /toggleB_1 f, 0.0 : controlchange( 0, 31, 0 ); 17 | /toggleB_1 f, 1.0 : controlchange( 0, 31, 127 ); 18 | /1/faderB f, val : controlchange( 0, 9, 127*val ); 19 | /toggleD_2 f, 0.0 : controlchange( 0, 38, 0 ); 20 | /toggleD_2 f, 1.0 : controlchange( 0, 38, 127 ); 21 | /toggleD_1 f, 0.0 : controlchange( 0, 37, 0 ); 22 | /toggleD_1 f, 1.0 : controlchange( 0, 37, 127 ); 23 | /toggleC_2 f, 0.0 : controlchange( 0, 36, 0 ); 24 | /toggleC_2 f, 1.0 : controlchange( 0, 36, 127 ); 25 | /toggleC_1 f, 0.0 : controlchange( 0, 35, 0 ); 26 | /toggleC_1 f, 1.0 : controlchange( 0, 35, 127 ); 27 | /1/faderC f, val : controlchange( 0, 10, 127*val ); 28 | /1/faderD f, val : controlchange( 0, 11, 127*val ); 29 | /multifaderM/1 f, val : controlchange( 0, 12, 127*val ); 30 | /multifaderM/2 f, val : controlchange( 0, 13, 127*val ); 31 | /multifaderM/3 f, val : controlchange( 0, 14, 127*val ); 32 | /multifaderM/4 f, val : controlchange( 0, 15, 127*val ); 33 | /1/ledA f, val : controlchange( 0, 4, 127*val ); 34 | /1/ledB f, val : controlchange( 0, 5, 127*val ); 35 | /1/ledC f, val : controlchange( 0, 6, 127*val ); 36 | /1/ledD f, val : controlchange( 0, 7, 127*val ); 37 | /2 , : noteon( 15, 1, 127 ); 38 | /2/multitoggle1/1/1 f, 0.0 : noteon( 0, 0, 0 ); 39 | /2/multitoggle1/1/1 f, 1.0 : noteon( 0, 0, 127 ); 40 | /2/multitoggle1/2/1 f, 0.0 : noteon( 0, 1, 0 ); 41 | /2/multitoggle1/2/1 f, 1.0 : noteon( 0, 1, 127 ); 42 | /2/multitoggle1/3/1 f, 0.0 : noteon( 0, 2, 0 ); 43 | /2/multitoggle1/3/1 f, 1.0 : noteon( 0, 2, 127 ); 44 | /2/multitoggle1/4/1 f, 0.0 : noteon( 0, 3, 0 ); 45 | /2/multitoggle1/4/1 f, 1.0 : noteon( 0, 3, 127 ); 46 | /2/multitoggle1/1/2 f, 0.0 : noteon( 0, 4, 0 ); 47 | /2/multitoggle1/1/2 f, 1.0 : noteon( 0, 4, 127 ); 48 | /2/multitoggle1/2/2 f, 0.0 : noteon( 0, 5, 0 ); 49 | /2/multitoggle1/2/2 f, 1.0 : noteon( 0, 5, 127 ); 50 | /2/multitoggle1/3/2 f, 0.0 : noteon( 0, 6, 0 ); 51 | /2/multitoggle1/3/2 f, 1.0 : noteon( 0, 6, 127 ); 52 | /2/multitoggle1/4/2 f, 0.0 : noteon( 0, 7, 0 ); 53 | /2/multitoggle1/4/2 f, 1.0 : noteon( 0, 7, 127 ); 54 | /2/multitoggle1/1/1 f, 0.0 : noteon( 1, 0, 0 ); 55 | /2/multitoggle1/1/1 f, 1.0 : noteon( 1, 0, 127 ); 56 | /2/multitoggle1/2/1 f, 0.0 : noteon( 1, 1, 0 ); 57 | /2/multitoggle1/2/1 f, 1.0 : noteon( 1, 1, 127 ); 58 | /2/multitoggle1/3/1 f, 0.0 : noteon( 1, 2, 0 ); 59 | /2/multitoggle1/3/1 f, 1.0 : noteon( 1, 2, 127 ); 60 | /2/multitoggle1/4/1 f, 0.0 : noteon( 1, 3, 0 ); 61 | /2/multitoggle1/4/1 f, 1.0 : noteon( 1, 3, 127 ); 62 | /2/multitoggle1/1/2 f, 0.0 : noteon( 1, 4, 0 ); 63 | /2/multitoggle1/1/2 f, 1.0 : noteon( 1, 4, 127 ); 64 | /2/multitoggle1/2/2 f, 0.0 : noteon( 1, 5, 0 ); 65 | /2/multitoggle1/2/2 f, 1.0 : noteon( 1, 5, 127 ); 66 | /2/multitoggle1/3/2 f, 0.0 : noteon( 1, 6, 0 ); 67 | /2/multitoggle1/3/2 f, 1.0 : noteon( 1, 6, 127 ); 68 | /2/multitoggle1/4/2 f, 0.0 : noteon( 1, 7, 0 ); 69 | /2/multitoggle1/4/2 f, 1.0 : noteon( 1, 7, 127 ); 70 | /2/multitoggle2/1/1 f, 0.0 : noteon( 2, 0, 0 ); 71 | /2/multitoggle2/1/1 f, 1.0 : noteon( 2, 0, 127 ); 72 | /2/multitoggle2/2/1 f, 0.0 : noteon( 2, 1, 0 ); 73 | /2/multitoggle2/2/1 f, 1.0 : noteon( 2, 1, 127 ); 74 | /2/multitoggle2/3/1 f, 0.0 : noteon( 2, 2, 0 ); 75 | /2/multitoggle2/3/1 f, 1.0 : noteon( 2, 2, 127 ); 76 | /2/multitoggle2/4/1 f, 0.0 : noteon( 2, 3, 0 ); 77 | /2/multitoggle2/4/1 f, 1.0 : noteon( 2, 3, 127 ); 78 | /2/multitoggle2/1/2 f, 0.0 : noteon( 2, 4, 0 ); 79 | /2/multitoggle2/1/2 f, 1.0 : noteon( 2, 4, 127 ); 80 | /2/multitoggle2/2/2 f, 0.0 : noteon( 2, 5, 0 ); 81 | /2/multitoggle2/2/2 f, 1.0 : noteon( 2, 5, 127 ); 82 | /2/multitoggle2/3/2 f, 0.0 : noteon( 2, 6, 0 ); 83 | /2/multitoggle2/3/2 f, 1.0 : noteon( 2, 6, 127 ); 84 | /2/multitoggle2/4/2 f, 0.0 : noteon( 2, 7, 0 ); 85 | /2/multitoggle2/4/2 f, 1.0 : noteon( 2, 7, 127 ); 86 | /2/multitoggle3/1/1 f, 0.0 : noteon( 3, 0, 0 ); 87 | /2/multitoggle3/1/1 f, 1.0 : noteon( 3, 0, 127 ); 88 | /2/multitoggle3/2/1 f, 0.0 : noteon( 3, 1, 0 ); 89 | /2/multitoggle3/2/1 f, 1.0 : noteon( 3, 1, 127 ); 90 | /2/multitoggle3/3/1 f, 0.0 : noteon( 3, 2, 0 ); 91 | /2/multitoggle3/3/1 f, 1.0 : noteon( 3, 2, 127 ); 92 | /2/multitoggle3/4/1 f, 0.0 : noteon( 3, 3, 0 ); 93 | /2/multitoggle3/4/1 f, 1.0 : noteon( 3, 3, 127 ); 94 | /2/multitoggle3/1/2 f, 0.0 : noteon( 3, 4, 0 ); 95 | /2/multitoggle3/1/2 f, 1.0 : noteon( 3, 4, 127 ); 96 | /2/multitoggle3/2/2 f, 0.0 : noteon( 3, 5, 0 ); 97 | /2/multitoggle3/2/2 f, 1.0 : noteon( 3, 5, 127 ); 98 | /2/multitoggle3/3/2 f, 0.0 : noteon( 3, 6, 0 ); 99 | /2/multitoggle3/3/2 f, 1.0 : noteon( 3, 6, 127 ); 100 | /2/multitoggle3/4/2 f, 0.0 : noteon( 3, 7, 0 ); 101 | /2/multitoggle3/4/2 f, 1.0 : noteon( 3, 7, 127 ); 102 | /3 , : noteon( 15, 2, 127 ); 103 | /3/xyM_l ff, val, : controlchange( 0, 16, 127*val ); 104 | /3/xyM_l ff, , val : controlchange( 0, 17, 127*val ); 105 | /3/xyM_l/z f, 0.0 : controlchange( 0, 20, 0 ); 106 | /3/xyM_l/z f, 1.0 : controlchange( 0, 20, 127 ); 107 | /3/ledM_l f, val : controlchange( 0, 20, 127*val ); 108 | /3/xyM_r ff, val, : controlchange( 0, 18, 127*val ); 109 | /3/xyM_r ff, , val : controlchange( 0, 19, 127*val ); 110 | /3/xyM_r/z f, 0.0 : controlchange( 0, 21, 0 ); 111 | /3/xyM_r/z f, 1.0 : controlchange( 0, 21, 127 ); 112 | /3/ledM_r f, val : controlchange( 0, 21, 127*val ); 113 | /3/multipushM/1/1 f, 0.0 : noteon( 4, 0, 0 ); 114 | /3/multipushM/1/1 f, 1.0 : noteon( 4, 0, 127 ); 115 | /3/multipushM/2/1 f, 0.0 : noteon( 4, 1, 0 ); 116 | /3/multipushM/2/1 f, 1.0 : noteon( 4, 1, 127 ); 117 | /3/multipushM/1/2 f, 0.0 : noteon( 4, 2, 0 ); 118 | /3/multipushM/1/2 f, 1.0 : noteon( 4, 2, 127 ); 119 | /3/multipushM/2/2 f, 0.0 : noteon( 4, 3, 0 ); 120 | /3/multipushM/2/2 f, 1.0 : noteon( 4, 3, 127 ); 121 | /3/multipushM/1/3 f, 0.0 : noteon( 4, 4, 0 ); 122 | /3/multipushM/1/3 f, 1.0 : noteon( 4, 4, 127 ); 123 | /3/multipushM/2/3 f, 0.0 : noteon( 4, 5, 0 ); 124 | /3/multipushM/2/3 f, 1.0 : noteon( 4, 5, 127 ); 125 | /3/multipushM/1/4 f, 0.0 : noteon( 4, 6, 0 ); 126 | /3/multipushM/1/4 f, 1.0 : noteon( 4, 6, 127 ); 127 | /3/multipushM/2/4 f, 0.0 : noteon( 4, 7, 0 ); 128 | /3/multipushM/2/4 f, 1.0 : noteon( 4, 7, 127 ); 129 | -------------------------------------------------------------------------------- /maps/touchosc/Beatmachine.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Beatmachine.touchosc Fri Jun 26 23:42:13 2015 2 | /1/toggle1 f, 0.0 : controlchange( 0, 1, 0 ); 3 | /1/toggle1 f, 1.0 : controlchange( 0, 1, 127 ); 4 | /1/fader2 f, val : controlchange( 0, 2, 127*val ); 5 | /1/toggle2 f, 0.0 : controlchange( 0, 3, 0 ); 6 | /1/toggle2 f, 1.0 : controlchange( 0, 3, 127 ); 7 | /1/push10 f, 0.0 : controlchange( 0, 4, 0 ); 8 | /1/push10 f, 1.0 : controlchange( 0, 4, 127 ); 9 | /1/push11 f, 0.0 : controlchange( 0, 5, 0 ); 10 | /1/push11 f, 1.0 : controlchange( 0, 5, 127 ); 11 | /1/push12 f, 0.0 : controlchange( 0, 6, 0 ); 12 | /1/push12 f, 1.0 : controlchange( 0, 6, 127 ); 13 | /1/push1 f, 0.0 : noteon( 0, 36, 0 ); 14 | /1/push1 f, 1.0 : noteon( 0, 36, 127 ); 15 | /1/push3 f, 0.0 : noteon( 0, 38, 0 ); 16 | /1/push3 f, 1.0 : noteon( 0, 38, 127 ); 17 | /1/push4 f, 0.0 : noteon( 0, 39, 0 ); 18 | /1/push4 f, 1.0 : noteon( 0, 39, 127 ); 19 | /1/push5 f, 0.0 : noteon( 0, 40, 0 ); 20 | /1/push5 f, 1.0 : noteon( 0, 40, 127 ); 21 | /1/push6 f, 0.0 : noteon( 0, 41, 0 ); 22 | /1/push6 f, 1.0 : noteon( 0, 41, 127 ); 23 | /1/push7 f, 0.0 : noteon( 0, 42, 0 ); 24 | /1/push7 f, 1.0 : noteon( 0, 42, 127 ); 25 | /1/push8 f, 0.0 : noteon( 0, 43, 0 ); 26 | /1/push8 f, 1.0 : noteon( 0, 43, 127 ); 27 | /1/push9 f, 0.0 : noteon( 0, 44, 0 ); 28 | /1/push9 f, 1.0 : noteon( 0, 44, 127 ); 29 | /1/push2 f, 0.0 : noteon( 0, 37, 0 ); 30 | /1/push2 f, 1.0 : noteon( 0, 37, 127 ); 31 | /1/fader1 f, val : controlchange( 0, 0, 127*val ); 32 | /2/multifader/1 f, val : controlchange( 2, 0, 127*val ); 33 | /2/multifader/2 f, val : controlchange( 2, 1, 127*val ); 34 | /2/multifader/3 f, val : controlchange( 2, 2, 127*val ); 35 | /2/multifader/4 f, val : controlchange( 2, 3, 127*val ); 36 | /2/multifader/5 f, val : controlchange( 2, 4, 127*val ); 37 | /2/multifader/6 f, val : controlchange( 2, 5, 127*val ); 38 | /2/multifader/7 f, val : controlchange( 2, 6, 127*val ); 39 | /2/multifader/8 f, val : controlchange( 2, 7, 127*val ); 40 | /2/multifader/9 f, val : controlchange( 2, 8, 127*val ); 41 | /2/multifader/10 f, val : controlchange( 2, 9, 127*val ); 42 | /2/multifader/11 f, val : controlchange( 2, 10, 127*val ); 43 | /2/multifader/12 f, val : controlchange( 2, 11, 127*val ); 44 | /2/multifader/13 f, val : controlchange( 2, 12, 127*val ); 45 | /2/multifader/14 f, val : controlchange( 2, 13, 127*val ); 46 | /2/multifader/15 f, val : controlchange( 2, 14, 127*val ); 47 | /2/multifader/16 f, val : controlchange( 2, 15, 127*val ); 48 | /2/multitoggle/1/1 f, 0.0 : controlchange( 1, 0, 0 ); 49 | /2/multitoggle/1/1 f, 1.0 : controlchange( 1, 0, 127 ); 50 | /2/multitoggle/2/1 f, 0.0 : controlchange( 1, 1, 0 ); 51 | /2/multitoggle/2/1 f, 1.0 : controlchange( 1, 1, 127 ); 52 | /2/multitoggle/3/1 f, 0.0 : controlchange( 1, 2, 0 ); 53 | /2/multitoggle/3/1 f, 1.0 : controlchange( 1, 2, 127 ); 54 | /2/multitoggle/4/1 f, 0.0 : controlchange( 1, 3, 0 ); 55 | /2/multitoggle/4/1 f, 1.0 : controlchange( 1, 3, 127 ); 56 | /2/multitoggle/5/1 f, 0.0 : controlchange( 1, 4, 0 ); 57 | /2/multitoggle/5/1 f, 1.0 : controlchange( 1, 4, 127 ); 58 | /2/multitoggle/6/1 f, 0.0 : controlchange( 1, 5, 0 ); 59 | /2/multitoggle/6/1 f, 1.0 : controlchange( 1, 5, 127 ); 60 | /2/multitoggle/1/2 f, 0.0 : controlchange( 1, 6, 0 ); 61 | /2/multitoggle/1/2 f, 1.0 : controlchange( 1, 6, 127 ); 62 | /2/multitoggle/2/2 f, 0.0 : controlchange( 1, 7, 0 ); 63 | /2/multitoggle/2/2 f, 1.0 : controlchange( 1, 7, 127 ); 64 | /2/multitoggle/3/2 f, 0.0 : controlchange( 1, 8, 0 ); 65 | /2/multitoggle/3/2 f, 1.0 : controlchange( 1, 8, 127 ); 66 | /2/multitoggle/4/2 f, 0.0 : controlchange( 1, 9, 0 ); 67 | /2/multitoggle/4/2 f, 1.0 : controlchange( 1, 9, 127 ); 68 | /2/multitoggle/5/2 f, 0.0 : controlchange( 1, 10, 0 ); 69 | /2/multitoggle/5/2 f, 1.0 : controlchange( 1, 10, 127 ); 70 | /2/multitoggle/6/2 f, 0.0 : controlchange( 1, 11, 0 ); 71 | /2/multitoggle/6/2 f, 1.0 : controlchange( 1, 11, 127 ); 72 | /2/multitoggle/1/3 f, 0.0 : controlchange( 1, 12, 0 ); 73 | /2/multitoggle/1/3 f, 1.0 : controlchange( 1, 12, 127 ); 74 | /2/multitoggle/2/3 f, 0.0 : controlchange( 1, 13, 0 ); 75 | /2/multitoggle/2/3 f, 1.0 : controlchange( 1, 13, 127 ); 76 | /2/multitoggle/3/3 f, 0.0 : controlchange( 1, 14, 0 ); 77 | /2/multitoggle/3/3 f, 1.0 : controlchange( 1, 14, 127 ); 78 | /2/multitoggle/4/3 f, 0.0 : controlchange( 1, 15, 0 ); 79 | /2/multitoggle/4/3 f, 1.0 : controlchange( 1, 15, 127 ); 80 | /2/multitoggle/5/3 f, 0.0 : controlchange( 1, 16, 0 ); 81 | /2/multitoggle/5/3 f, 1.0 : controlchange( 1, 16, 127 ); 82 | /2/multitoggle/6/3 f, 0.0 : controlchange( 1, 17, 0 ); 83 | /2/multitoggle/6/3 f, 1.0 : controlchange( 1, 17, 127 ); 84 | /2/multitoggle/1/4 f, 0.0 : controlchange( 1, 18, 0 ); 85 | /2/multitoggle/1/4 f, 1.0 : controlchange( 1, 18, 127 ); 86 | /2/multitoggle/2/4 f, 0.0 : controlchange( 1, 19, 0 ); 87 | /2/multitoggle/2/4 f, 1.0 : controlchange( 1, 19, 127 ); 88 | /2/multitoggle/3/4 f, 0.0 : controlchange( 1, 20, 0 ); 89 | /2/multitoggle/3/4 f, 1.0 : controlchange( 1, 20, 127 ); 90 | /2/multitoggle/4/4 f, 0.0 : controlchange( 1, 21, 0 ); 91 | /2/multitoggle/4/4 f, 1.0 : controlchange( 1, 21, 127 ); 92 | /2/multitoggle/5/4 f, 0.0 : controlchange( 1, 22, 0 ); 93 | /2/multitoggle/5/4 f, 1.0 : controlchange( 1, 22, 127 ); 94 | /2/multitoggle/6/4 f, 0.0 : controlchange( 1, 23, 0 ); 95 | /2/multitoggle/6/4 f, 1.0 : controlchange( 1, 23, 127 ); 96 | /2/multitoggle/1/5 f, 0.0 : controlchange( 1, 24, 0 ); 97 | /2/multitoggle/1/5 f, 1.0 : controlchange( 1, 24, 127 ); 98 | /2/multitoggle/2/5 f, 0.0 : controlchange( 1, 25, 0 ); 99 | /2/multitoggle/2/5 f, 1.0 : controlchange( 1, 25, 127 ); 100 | /2/multitoggle/3/5 f, 0.0 : controlchange( 1, 26, 0 ); 101 | /2/multitoggle/3/5 f, 1.0 : controlchange( 1, 26, 127 ); 102 | /2/multitoggle/4/5 f, 0.0 : controlchange( 1, 27, 0 ); 103 | /2/multitoggle/4/5 f, 1.0 : controlchange( 1, 27, 127 ); 104 | /2/multitoggle/5/5 f, 0.0 : controlchange( 1, 28, 0 ); 105 | /2/multitoggle/5/5 f, 1.0 : controlchange( 1, 28, 127 ); 106 | /2/multitoggle/6/5 f, 0.0 : controlchange( 1, 29, 0 ); 107 | /2/multitoggle/6/5 f, 1.0 : controlchange( 1, 29, 127 ); 108 | /2/multitoggle/1/6 f, 0.0 : controlchange( 1, 30, 0 ); 109 | /2/multitoggle/1/6 f, 1.0 : controlchange( 1, 30, 127 ); 110 | /2/multitoggle/2/6 f, 0.0 : controlchange( 1, 31, 0 ); 111 | /2/multitoggle/2/6 f, 1.0 : controlchange( 1, 31, 127 ); 112 | /2/multitoggle/3/6 f, 0.0 : controlchange( 1, 32, 0 ); 113 | /2/multitoggle/3/6 f, 1.0 : controlchange( 1, 32, 127 ); 114 | /2/multitoggle/4/6 f, 0.0 : controlchange( 1, 33, 0 ); 115 | /2/multitoggle/4/6 f, 1.0 : controlchange( 1, 33, 127 ); 116 | /2/multitoggle/5/6 f, 0.0 : controlchange( 1, 34, 0 ); 117 | /2/multitoggle/5/6 f, 1.0 : controlchange( 1, 34, 127 ); 118 | /2/multitoggle/6/6 f, 0.0 : controlchange( 1, 35, 0 ); 119 | /2/multitoggle/6/6 f, 1.0 : controlchange( 1, 35, 127 ); 120 | /2/multitoggle/1/7 f, 0.0 : controlchange( 1, 36, 0 ); 121 | /2/multitoggle/1/7 f, 1.0 : controlchange( 1, 36, 127 ); 122 | /2/multitoggle/2/7 f, 0.0 : controlchange( 1, 37, 0 ); 123 | /2/multitoggle/2/7 f, 1.0 : controlchange( 1, 37, 127 ); 124 | /2/multitoggle/3/7 f, 0.0 : controlchange( 1, 38, 0 ); 125 | /2/multitoggle/3/7 f, 1.0 : controlchange( 1, 38, 127 ); 126 | /2/multitoggle/4/7 f, 0.0 : controlchange( 1, 39, 0 ); 127 | /2/multitoggle/4/7 f, 1.0 : controlchange( 1, 39, 127 ); 128 | /2/multitoggle/5/7 f, 0.0 : controlchange( 1, 40, 0 ); 129 | /2/multitoggle/5/7 f, 1.0 : controlchange( 1, 40, 127 ); 130 | /2/multitoggle/6/7 f, 0.0 : controlchange( 1, 41, 0 ); 131 | /2/multitoggle/6/7 f, 1.0 : controlchange( 1, 41, 127 ); 132 | /2/multitoggle/1/8 f, 0.0 : controlchange( 1, 42, 0 ); 133 | /2/multitoggle/1/8 f, 1.0 : controlchange( 1, 42, 127 ); 134 | /2/multitoggle/2/8 f, 0.0 : controlchange( 1, 43, 0 ); 135 | /2/multitoggle/2/8 f, 1.0 : controlchange( 1, 43, 127 ); 136 | /2/multitoggle/3/8 f, 0.0 : controlchange( 1, 44, 0 ); 137 | /2/multitoggle/3/8 f, 1.0 : controlchange( 1, 44, 127 ); 138 | /2/multitoggle/4/8 f, 0.0 : controlchange( 1, 45, 0 ); 139 | /2/multitoggle/4/8 f, 1.0 : controlchange( 1, 45, 127 ); 140 | /2/multitoggle/5/8 f, 0.0 : controlchange( 1, 46, 0 ); 141 | /2/multitoggle/5/8 f, 1.0 : controlchange( 1, 46, 127 ); 142 | /2/multitoggle/6/8 f, 0.0 : controlchange( 1, 47, 0 ); 143 | /2/multitoggle/6/8 f, 1.0 : controlchange( 1, 47, 127 ); 144 | /2/multitoggle/1/9 f, 0.0 : controlchange( 1, 48, 0 ); 145 | /2/multitoggle/1/9 f, 1.0 : controlchange( 1, 48, 127 ); 146 | /2/multitoggle/2/9 f, 0.0 : controlchange( 1, 49, 0 ); 147 | /2/multitoggle/2/9 f, 1.0 : controlchange( 1, 49, 127 ); 148 | /2/multitoggle/3/9 f, 0.0 : controlchange( 1, 50, 0 ); 149 | /2/multitoggle/3/9 f, 1.0 : controlchange( 1, 50, 127 ); 150 | /2/multitoggle/4/9 f, 0.0 : controlchange( 1, 51, 0 ); 151 | /2/multitoggle/4/9 f, 1.0 : controlchange( 1, 51, 127 ); 152 | /2/multitoggle/5/9 f, 0.0 : controlchange( 1, 52, 0 ); 153 | /2/multitoggle/5/9 f, 1.0 : controlchange( 1, 52, 127 ); 154 | /2/multitoggle/6/9 f, 0.0 : controlchange( 1, 53, 0 ); 155 | /2/multitoggle/6/9 f, 1.0 : controlchange( 1, 53, 127 ); 156 | /2/multitoggle/1/10 f, 0.0 : controlchange( 1, 54, 0 ); 157 | /2/multitoggle/1/10 f, 1.0 : controlchange( 1, 54, 127 ); 158 | /2/multitoggle/2/10 f, 0.0 : controlchange( 1, 55, 0 ); 159 | /2/multitoggle/2/10 f, 1.0 : controlchange( 1, 55, 127 ); 160 | /2/multitoggle/3/10 f, 0.0 : controlchange( 1, 56, 0 ); 161 | /2/multitoggle/3/10 f, 1.0 : controlchange( 1, 56, 127 ); 162 | /2/multitoggle/4/10 f, 0.0 : controlchange( 1, 57, 0 ); 163 | /2/multitoggle/4/10 f, 1.0 : controlchange( 1, 57, 127 ); 164 | /2/multitoggle/5/10 f, 0.0 : controlchange( 1, 58, 0 ); 165 | /2/multitoggle/5/10 f, 1.0 : controlchange( 1, 58, 127 ); 166 | /2/multitoggle/6/10 f, 0.0 : controlchange( 1, 59, 0 ); 167 | /2/multitoggle/6/10 f, 1.0 : controlchange( 1, 59, 127 ); 168 | /2/multitoggle/1/11 f, 0.0 : controlchange( 1, 60, 0 ); 169 | /2/multitoggle/1/11 f, 1.0 : controlchange( 1, 60, 127 ); 170 | /2/multitoggle/2/11 f, 0.0 : controlchange( 1, 61, 0 ); 171 | /2/multitoggle/2/11 f, 1.0 : controlchange( 1, 61, 127 ); 172 | /2/multitoggle/3/11 f, 0.0 : controlchange( 1, 62, 0 ); 173 | /2/multitoggle/3/11 f, 1.0 : controlchange( 1, 62, 127 ); 174 | /2/multitoggle/4/11 f, 0.0 : controlchange( 1, 63, 0 ); 175 | /2/multitoggle/4/11 f, 1.0 : controlchange( 1, 63, 127 ); 176 | /2/multitoggle/5/11 f, 0.0 : controlchange( 1, 64, 0 ); 177 | /2/multitoggle/5/11 f, 1.0 : controlchange( 1, 64, 127 ); 178 | /2/multitoggle/6/11 f, 0.0 : controlchange( 1, 65, 0 ); 179 | /2/multitoggle/6/11 f, 1.0 : controlchange( 1, 65, 127 ); 180 | /2/multitoggle/1/12 f, 0.0 : controlchange( 1, 66, 0 ); 181 | /2/multitoggle/1/12 f, 1.0 : controlchange( 1, 66, 127 ); 182 | /2/multitoggle/2/12 f, 0.0 : controlchange( 1, 67, 0 ); 183 | /2/multitoggle/2/12 f, 1.0 : controlchange( 1, 67, 127 ); 184 | /2/multitoggle/3/12 f, 0.0 : controlchange( 1, 68, 0 ); 185 | /2/multitoggle/3/12 f, 1.0 : controlchange( 1, 68, 127 ); 186 | /2/multitoggle/4/12 f, 0.0 : controlchange( 1, 69, 0 ); 187 | /2/multitoggle/4/12 f, 1.0 : controlchange( 1, 69, 127 ); 188 | /2/multitoggle/5/12 f, 0.0 : controlchange( 1, 70, 0 ); 189 | /2/multitoggle/5/12 f, 1.0 : controlchange( 1, 70, 127 ); 190 | /2/multitoggle/6/12 f, 0.0 : controlchange( 1, 71, 0 ); 191 | /2/multitoggle/6/12 f, 1.0 : controlchange( 1, 71, 127 ); 192 | /2/multitoggle/1/13 f, 0.0 : controlchange( 1, 72, 0 ); 193 | /2/multitoggle/1/13 f, 1.0 : controlchange( 1, 72, 127 ); 194 | /2/multitoggle/2/13 f, 0.0 : controlchange( 1, 73, 0 ); 195 | /2/multitoggle/2/13 f, 1.0 : controlchange( 1, 73, 127 ); 196 | /2/multitoggle/3/13 f, 0.0 : controlchange( 1, 74, 0 ); 197 | /2/multitoggle/3/13 f, 1.0 : controlchange( 1, 74, 127 ); 198 | /2/multitoggle/4/13 f, 0.0 : controlchange( 1, 75, 0 ); 199 | /2/multitoggle/4/13 f, 1.0 : controlchange( 1, 75, 127 ); 200 | /2/multitoggle/5/13 f, 0.0 : controlchange( 1, 76, 0 ); 201 | /2/multitoggle/5/13 f, 1.0 : controlchange( 1, 76, 127 ); 202 | /2/multitoggle/6/13 f, 0.0 : controlchange( 1, 77, 0 ); 203 | /2/multitoggle/6/13 f, 1.0 : controlchange( 1, 77, 127 ); 204 | /2/multitoggle/1/14 f, 0.0 : controlchange( 1, 78, 0 ); 205 | /2/multitoggle/1/14 f, 1.0 : controlchange( 1, 78, 127 ); 206 | /2/multitoggle/2/14 f, 0.0 : controlchange( 1, 79, 0 ); 207 | /2/multitoggle/2/14 f, 1.0 : controlchange( 1, 79, 127 ); 208 | /2/multitoggle/3/14 f, 0.0 : controlchange( 1, 80, 0 ); 209 | /2/multitoggle/3/14 f, 1.0 : controlchange( 1, 80, 127 ); 210 | /2/multitoggle/4/14 f, 0.0 : controlchange( 1, 81, 0 ); 211 | /2/multitoggle/4/14 f, 1.0 : controlchange( 1, 81, 127 ); 212 | /2/multitoggle/5/14 f, 0.0 : controlchange( 1, 82, 0 ); 213 | /2/multitoggle/5/14 f, 1.0 : controlchange( 1, 82, 127 ); 214 | /2/multitoggle/6/14 f, 0.0 : controlchange( 1, 83, 0 ); 215 | /2/multitoggle/6/14 f, 1.0 : controlchange( 1, 83, 127 ); 216 | /2/multitoggle/1/15 f, 0.0 : controlchange( 1, 84, 0 ); 217 | /2/multitoggle/1/15 f, 1.0 : controlchange( 1, 84, 127 ); 218 | /2/multitoggle/2/15 f, 0.0 : controlchange( 1, 85, 0 ); 219 | /2/multitoggle/2/15 f, 1.0 : controlchange( 1, 85, 127 ); 220 | /2/multitoggle/3/15 f, 0.0 : controlchange( 1, 86, 0 ); 221 | /2/multitoggle/3/15 f, 1.0 : controlchange( 1, 86, 127 ); 222 | /2/multitoggle/4/15 f, 0.0 : controlchange( 1, 87, 0 ); 223 | /2/multitoggle/4/15 f, 1.0 : controlchange( 1, 87, 127 ); 224 | /2/multitoggle/5/15 f, 0.0 : controlchange( 1, 88, 0 ); 225 | /2/multitoggle/5/15 f, 1.0 : controlchange( 1, 88, 127 ); 226 | /2/multitoggle/6/15 f, 0.0 : controlchange( 1, 89, 0 ); 227 | /2/multitoggle/6/15 f, 1.0 : controlchange( 1, 89, 127 ); 228 | /2/multitoggle/1/16 f, 0.0 : controlchange( 1, 90, 0 ); 229 | /2/multitoggle/1/16 f, 1.0 : controlchange( 1, 90, 127 ); 230 | /2/multitoggle/2/16 f, 0.0 : controlchange( 1, 91, 0 ); 231 | /2/multitoggle/2/16 f, 1.0 : controlchange( 1, 91, 127 ); 232 | /2/multitoggle/3/16 f, 0.0 : controlchange( 1, 92, 0 ); 233 | /2/multitoggle/3/16 f, 1.0 : controlchange( 1, 92, 127 ); 234 | /2/multitoggle/4/16 f, 0.0 : controlchange( 1, 93, 0 ); 235 | /2/multitoggle/4/16 f, 1.0 : controlchange( 1, 93, 127 ); 236 | /2/multitoggle/5/16 f, 0.0 : controlchange( 1, 94, 0 ); 237 | /2/multitoggle/5/16 f, 1.0 : controlchange( 1, 94, 127 ); 238 | /2/multitoggle/6/16 f, 0.0 : controlchange( 1, 95, 0 ); 239 | /2/multitoggle/6/16 f, 1.0 : controlchange( 1, 95, 127 ); 240 | /2/led1 f, val : controlchange( 3, 0, 127*val ); 241 | /2/led2 f, val : controlchange( 3, 1, 127*val ); 242 | /2/led3 f, val : controlchange( 3, 2, 127*val ); 243 | /2/led4 f, val : controlchange( 3, 3, 127*val ); 244 | /2/led5 f, val : controlchange( 3, 4, 127*val ); 245 | /2/led6 f, val : controlchange( 3, 5, 127*val ); 246 | /2/led7 f, val : controlchange( 3, 6, 127*val ); 247 | /2/led8 f, val : controlchange( 3, 7, 127*val ); 248 | /2/led9 f, val : controlchange( 3, 8, 127*val ); 249 | /2/led10 f, val : controlchange( 3, 9, 127*val ); 250 | /2/led11 f, val : controlchange( 3, 10, 127*val ); 251 | /2/led12 f, val : controlchange( 3, 11, 127*val ); 252 | /2/led13 f, val : controlchange( 3, 12, 127*val ); 253 | /2/led14 f, val : controlchange( 3, 13, 127*val ); 254 | /2/led15 f, val : controlchange( 3, 14, 127*val ); 255 | /2/led16 f, val : controlchange( 3, 15, 127*val ); 256 | /3/toggle1 f, 0.0 : controlchange( 0, 17, 0 ); 257 | /3/toggle1 f, 1.0 : controlchange( 0, 17, 127 ); 258 | /3/toggle2 f, 0.0 : controlchange( 0, 16, 0 ); 259 | /3/toggle2 f, 1.0 : controlchange( 0, 16, 127 ); 260 | /3/toggle3 f, 0.0 : controlchange( 0, 15, 0 ); 261 | /3/toggle3 f, 1.0 : controlchange( 0, 15, 127 ); 262 | /3/toggle4 f, 0.0 : controlchange( 0, 14, 0 ); 263 | /3/toggle4 f, 1.0 : controlchange( 0, 14, 127 ); 264 | /3/toggle5 f, 0.0 : controlchange( 0, 13, 0 ); 265 | /3/toggle5 f, 1.0 : controlchange( 0, 13, 127 ); 266 | /3/rotary1 f, val : controlchange( 0, 7, 127*val ); 267 | /3/rotary2 f, val : controlchange( 0, 9, 127*val ); 268 | /3/rotary3 f, val : controlchange( 0, 11, 127*val ); 269 | /3/rotary4 f, val : controlchange( 0, 8, 127*val ); 270 | /3/rotary5 f, val : controlchange( 0, 10, 127*val ); 271 | /3/rotary6 f, val : controlchange( 0, 12, 127*val ); 272 | /4/toggle1 f, 0.0 : controlchange( 0, 24, 0 ); 273 | /4/toggle1 f, 1.0 : controlchange( 0, 24, 127 ); 274 | /4/toggle2 f, 0.0 : controlchange( 0, 23, 0 ); 275 | /4/toggle2 f, 1.0 : controlchange( 0, 23, 127 ); 276 | /4/toggle3 f, 0.0 : controlchange( 0, 22, 0 ); 277 | /4/toggle3 f, 1.0 : controlchange( 0, 22, 127 ); 278 | /4/toggle4 f, 0.0 : controlchange( 0, 21, 0 ); 279 | /4/toggle4 f, 1.0 : controlchange( 0, 21, 127 ); 280 | /4/toggle5 f, 0.0 : controlchange( 0, 20, 0 ); 281 | /4/toggle5 f, 1.0 : controlchange( 0, 20, 127 ); 282 | /4/xy ff, val, : controlchange( 0, 18, 127*val ); 283 | /4/xy ff, , val : controlchange( 0, 19, 127*val ); 284 | -------------------------------------------------------------------------------- /maps/touchosc/Keys.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Keys.touchosc Fri Jun 26 23:42:13 2015 2 | /1/push1 f, 0.0 : noteon( 0, 24, 0 ); 3 | /1/push1 f, 1.0 : noteon( 0, 24, 127 ); 4 | /1/push3 f, 0.0 : noteon( 0, 26, 0 ); 5 | /1/push3 f, 1.0 : noteon( 0, 26, 127 ); 6 | /1/push5 f, 0.0 : noteon( 0, 28, 0 ); 7 | /1/push5 f, 1.0 : noteon( 0, 28, 127 ); 8 | /1/push6 f, 0.0 : noteon( 0, 29, 0 ); 9 | /1/push6 f, 1.0 : noteon( 0, 29, 127 ); 10 | /1/push8 f, 0.0 : noteon( 0, 31, 0 ); 11 | /1/push8 f, 1.0 : noteon( 0, 31, 127 ); 12 | /1/push10 f, 0.0 : noteon( 0, 33, 0 ); 13 | /1/push10 f, 1.0 : noteon( 0, 33, 127 ); 14 | /1/push12 f, 0.0 : noteon( 0, 35, 0 ); 15 | /1/push12 f, 1.0 : noteon( 0, 35, 127 ); 16 | /1/push2 f, 0.0 : noteon( 0, 25, 0 ); 17 | /1/push2 f, 1.0 : noteon( 0, 25, 127 ); 18 | /1/push4 f, 0.0 : noteon( 0, 27, 0 ); 19 | /1/push4 f, 1.0 : noteon( 0, 27, 127 ); 20 | /1/push7 f, 0.0 : noteon( 0, 30, 0 ); 21 | /1/push7 f, 1.0 : noteon( 0, 30, 127 ); 22 | /1/push9 f, 0.0 : noteon( 0, 32, 0 ); 23 | /1/push9 f, 1.0 : noteon( 0, 32, 127 ); 24 | /1/push11 f, 0.0 : noteon( 0, 34, 0 ); 25 | /1/push11 f, 1.0 : noteon( 0, 34, 127 ); 26 | /2/push1 f, 0.0 : noteon( 0, 36, 0 ); 27 | /2/push1 f, 1.0 : noteon( 0, 36, 127 ); 28 | /2/push3 f, 0.0 : noteon( 0, 38, 0 ); 29 | /2/push3 f, 1.0 : noteon( 0, 38, 127 ); 30 | /2/push5 f, 0.0 : noteon( 0, 40, 0 ); 31 | /2/push5 f, 1.0 : noteon( 0, 40, 127 ); 32 | /2/push6 f, 0.0 : noteon( 0, 41, 0 ); 33 | /2/push6 f, 1.0 : noteon( 0, 41, 127 ); 34 | /2/push8 f, 0.0 : noteon( 0, 43, 0 ); 35 | /2/push8 f, 1.0 : noteon( 0, 43, 127 ); 36 | /2/push10 f, 0.0 : noteon( 0, 45, 0 ); 37 | /2/push10 f, 1.0 : noteon( 0, 45, 127 ); 38 | /2/push12 f, 0.0 : noteon( 0, 47, 0 ); 39 | /2/push12 f, 1.0 : noteon( 0, 47, 127 ); 40 | /2/push2 f, 0.0 : noteon( 0, 37, 0 ); 41 | /2/push2 f, 1.0 : noteon( 0, 37, 127 ); 42 | /2/push4 f, 0.0 : noteon( 0, 39, 0 ); 43 | /2/push4 f, 1.0 : noteon( 0, 39, 127 ); 44 | /2/push7 f, 0.0 : noteon( 0, 42, 0 ); 45 | /2/push7 f, 1.0 : noteon( 0, 42, 127 ); 46 | /2/push9 f, 0.0 : noteon( 0, 44, 0 ); 47 | /2/push9 f, 1.0 : noteon( 0, 44, 127 ); 48 | /2/push11 f, 0.0 : noteon( 0, 46, 0 ); 49 | /2/push11 f, 1.0 : noteon( 0, 46, 127 ); 50 | /3/fader1 f, val : controlchange( 0, 0, 127*val ); 51 | /3/fader2 f, val : controlchange( 0, 1, 127*val ); 52 | /3/fader3 f, val : controlchange( 0, 2, 127*val ); 53 | /3/toggle1 f, 0.0 : controlchange( 0, 3, 0 ); 54 | /3/toggle1 f, 1.0 : controlchange( 0, 3, 127 ); 55 | /3/fader4 f, val : controlchange( 0, 4, 127*val ); 56 | /3/toggle2 f, 0.0 : controlchange( 0, 5, 0 ); 57 | /3/toggle2 f, 1.0 : controlchange( 0, 5, 127 ); 58 | /3/fader5 f, val : controlchange( 0, 6, 127*val ); 59 | /3/toggle3 f, 0.0 : controlchange( 0, 7, 0 ); 60 | /3/toggle3 f, 1.0 : controlchange( 0, 7, 127 ); 61 | /3/push1 f, 0.0 : controlchange( 0, 11, 0 ); 62 | /3/push1 f, 1.0 : controlchange( 0, 11, 127 ); 63 | /3/push2 f, 0.0 : controlchange( 0, 12, 0 ); 64 | /3/push2 f, 1.0 : controlchange( 0, 12, 127 ); 65 | /3/push3 f, 0.0 : controlchange( 0, 9, 0 ); 66 | /3/push3 f, 1.0 : controlchange( 0, 9, 127 ); 67 | /3/push4 f, 0.0 : controlchange( 0, 10, 0 ); 68 | /3/push4 f, 1.0 : controlchange( 0, 10, 127 ); 69 | /3/rotary1 f, val : controlchange( 0, 8, 127*val ); 70 | -------------------------------------------------------------------------------- /maps/touchosc/Mix 16.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Mix 16.touchosc Fri Jun 26 23:42:14 2015 2 | /1/fader1 f, val : controlchange( 0, 0, 127*val ); 3 | /1/toggle1 f, 0.0 : controlchange( 0, 1, 0 ); 4 | /1/toggle1 f, 1.0 : controlchange( 0, 1, 127 ); 5 | /1/fader2 f, val : controlchange( 0, 2, 127*val ); 6 | /1/toggle2 f, 0.0 : controlchange( 0, 3, 0 ); 7 | /1/toggle2 f, 1.0 : controlchange( 0, 3, 127 ); 8 | /1/fader3 f, val : controlchange( 0, 4, 127*val ); 9 | /1/toggle3 f, 0.0 : controlchange( 0, 5, 0 ); 10 | /1/toggle3 f, 1.0 : controlchange( 0, 5, 127 ); 11 | /1/fader4 f, val : controlchange( 0, 8, 127*val ); 12 | /1/push1 f, 0.0 : controlchange( 0, 9, 0 ); 13 | /1/push1 f, 1.0 : controlchange( 0, 9, 127 ); 14 | /1/push2 f, 0.0 : controlchange( 0, 10, 0 ); 15 | /1/push2 f, 1.0 : controlchange( 0, 10, 127 ); 16 | /1/push3 f, 0.0 : controlchange( 0, 11, 0 ); 17 | /1/push3 f, 1.0 : controlchange( 0, 11, 127 ); 18 | /1/push4 f, 0.0 : controlchange( 0, 12, 0 ); 19 | /1/push4 f, 1.0 : controlchange( 0, 12, 127 ); 20 | /1/push5 f, 0.0 : controlchange( 0, 13, 0 ); 21 | /1/push5 f, 1.0 : controlchange( 0, 13, 127 ); 22 | /1/xy ff, val, : controlchange( 0, 6, 127*val ); 23 | /1/xy ff, , val : controlchange( 0, 7, 127*val ); 24 | /2/fader1 f, val : controlchange( 0, 14, 127*val ); 25 | /2/toggle1 f, 0.0 : controlchange( 0, 15, 0 ); 26 | /2/toggle1 f, 1.0 : controlchange( 0, 15, 127 ); 27 | /2/fader2 f, val : controlchange( 0, 16, 127*val ); 28 | /2/toggle2 f, 0.0 : controlchange( 0, 17, 0 ); 29 | /2/toggle2 f, 1.0 : controlchange( 0, 17, 127 ); 30 | /2/fader3 f, val : controlchange( 0, 18, 127*val ); 31 | /2/toggle3 f, 0.0 : controlchange( 0, 19, 0 ); 32 | /2/toggle3 f, 1.0 : controlchange( 0, 19, 127 ); 33 | /2/fader4 f, val : controlchange( 0, 20, 127*val ); 34 | /2/toggle4 f, 0.0 : controlchange( 0, 21, 0 ); 35 | /2/toggle4 f, 1.0 : controlchange( 0, 21, 127 ); 36 | /2/fader5 f, val : controlchange( 0, 22, 127*val ); 37 | /2/toggle5 f, 0.0 : controlchange( 0, 23, 0 ); 38 | /2/toggle5 f, 1.0 : controlchange( 0, 23, 127 ); 39 | /2/fader6 f, val : controlchange( 0, 24, 127*val ); 40 | /2/toggle6 f, 0.0 : controlchange( 0, 25, 0 ); 41 | /2/toggle6 f, 1.0 : controlchange( 0, 25, 127 ); 42 | /2/fader7 f, val : controlchange( 0, 26, 127*val ); 43 | /2/toggle7 f, 0.0 : controlchange( 0, 27, 0 ); 44 | /2/toggle7 f, 1.0 : controlchange( 0, 27, 127 ); 45 | /2/fader8 f, val : controlchange( 0, 28, 127*val ); 46 | /2/toggle8 f, 0.0 : controlchange( 0, 29, 0 ); 47 | /2/toggle8 f, 1.0 : controlchange( 0, 29, 127 ); 48 | /3/fader1 f, val : controlchange( 0, 30, 127*val ); 49 | /3/toggle1 f, 0.0 : controlchange( 0, 31, 0 ); 50 | /3/toggle1 f, 1.0 : controlchange( 0, 31, 127 ); 51 | /3/fader2 f, val : controlchange( 0, 32, 127*val ); 52 | /3/toggle2 f, 0.0 : controlchange( 0, 33, 0 ); 53 | /3/toggle2 f, 1.0 : controlchange( 0, 33, 127 ); 54 | /3/fader3 f, val : controlchange( 0, 34, 127*val ); 55 | /3/toggle3 f, 0.0 : controlchange( 0, 35, 0 ); 56 | /3/toggle3 f, 1.0 : controlchange( 0, 35, 127 ); 57 | /3/fader4 f, val : controlchange( 0, 36, 127*val ); 58 | /3/toggle4 f, 0.0 : controlchange( 0, 37, 0 ); 59 | /3/toggle4 f, 1.0 : controlchange( 0, 37, 127 ); 60 | /3/fader5 f, val : controlchange( 0, 38, 127*val ); 61 | /3/toggle5 f, 0.0 : controlchange( 0, 39, 0 ); 62 | /3/toggle5 f, 1.0 : controlchange( 0, 39, 127 ); 63 | /3/fader6 f, val : controlchange( 0, 40, 127*val ); 64 | /3/toggle6 f, 0.0 : controlchange( 0, 41, 0 ); 65 | /3/toggle6 f, 1.0 : controlchange( 0, 41, 127 ); 66 | /3/fader7 f, val : controlchange( 0, 42, 127*val ); 67 | /3/toggle7 f, 0.0 : controlchange( 0, 43, 0 ); 68 | /3/toggle7 f, 1.0 : controlchange( 0, 43, 127 ); 69 | /3/fader8 f, val : controlchange( 0, 44, 127*val ); 70 | /3/toggle8 f, 0.0 : controlchange( 0, 45, 0 ); 71 | /3/toggle8 f, 1.0 : controlchange( 0, 45, 127 ); 72 | /4/multifader1/1 f, val : controlchange( 0, 46, 127*val ); 73 | /4/multifader1/2 f, val : controlchange( 0, 47, 127*val ); 74 | /4/multifader1/3 f, val : controlchange( 0, 48, 127*val ); 75 | /4/multifader1/4 f, val : controlchange( 0, 49, 127*val ); 76 | /4/multifader1/5 f, val : controlchange( 0, 50, 127*val ); 77 | /4/multifader1/6 f, val : controlchange( 0, 51, 127*val ); 78 | /4/multifader1/7 f, val : controlchange( 0, 52, 127*val ); 79 | /4/multifader1/8 f, val : controlchange( 0, 53, 127*val ); 80 | /4/multifader1/9 f, val : controlchange( 0, 54, 127*val ); 81 | /4/multifader1/10 f, val : controlchange( 0, 55, 127*val ); 82 | /4/multifader1/11 f, val : controlchange( 0, 56, 127*val ); 83 | /4/multifader1/12 f, val : controlchange( 0, 57, 127*val ); 84 | /4/multifader1/13 f, val : controlchange( 0, 58, 127*val ); 85 | /4/multifader1/14 f, val : controlchange( 0, 59, 127*val ); 86 | /4/multifader1/15 f, val : controlchange( 0, 60, 127*val ); 87 | /4/multifader1/16 f, val : controlchange( 0, 61, 127*val ); 88 | /4/multifader1/17 f, val : controlchange( 0, 62, 127*val ); 89 | /4/multifader1/18 f, val : controlchange( 0, 63, 127*val ); 90 | /4/multifader1/19 f, val : controlchange( 0, 64, 127*val ); 91 | /4/multifader1/20 f, val : controlchange( 0, 65, 127*val ); 92 | /4/multifader1/21 f, val : controlchange( 0, 66, 127*val ); 93 | /4/multifader1/22 f, val : controlchange( 0, 67, 127*val ); 94 | /4/multifader1/23 f, val : controlchange( 0, 68, 127*val ); 95 | /4/multifader1/24 f, val : controlchange( 0, 69, 127*val ); 96 | /4/multifader2/1 f, val : controlchange( 0, 70, 127*val ); 97 | /4/multifader2/2 f, val : controlchange( 0, 71, 127*val ); 98 | /4/multifader2/3 f, val : controlchange( 0, 72, 127*val ); 99 | /4/multifader2/4 f, val : controlchange( 0, 73, 127*val ); 100 | /4/multifader2/5 f, val : controlchange( 0, 74, 127*val ); 101 | /4/multifader2/6 f, val : controlchange( 0, 75, 127*val ); 102 | /4/multifader2/7 f, val : controlchange( 0, 76, 127*val ); 103 | /4/multifader2/8 f, val : controlchange( 0, 77, 127*val ); 104 | /4/multifader2/9 f, val : controlchange( 0, 78, 127*val ); 105 | /4/multifader2/10 f, val : controlchange( 0, 79, 127*val ); 106 | /4/multifader2/11 f, val : controlchange( 0, 80, 127*val ); 107 | /4/multifader2/12 f, val : controlchange( 0, 81, 127*val ); 108 | /4/multifader2/13 f, val : controlchange( 0, 82, 127*val ); 109 | /4/multifader2/14 f, val : controlchange( 0, 83, 127*val ); 110 | /4/multifader2/15 f, val : controlchange( 0, 84, 127*val ); 111 | /4/multifader2/16 f, val : controlchange( 0, 85, 127*val ); 112 | /4/multifader2/17 f, val : controlchange( 0, 86, 127*val ); 113 | /4/multifader2/18 f, val : controlchange( 0, 87, 127*val ); 114 | /4/multifader2/19 f, val : controlchange( 0, 88, 127*val ); 115 | /4/multifader2/20 f, val : controlchange( 0, 89, 127*val ); 116 | /4/multifader2/21 f, val : controlchange( 0, 90, 127*val ); 117 | /4/multifader2/22 f, val : controlchange( 0, 91, 127*val ); 118 | /4/multifader2/23 f, val : controlchange( 0, 92, 127*val ); 119 | /4/multifader2/24 f, val : controlchange( 0, 93, 127*val ); 120 | -------------------------------------------------------------------------------- /maps/touchosc/Mix 2 iPad.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Mix 2 iPad.touchosc Fri Jun 26 23:42:14 2015 2 | /1/rotary1 f, val : controlchange( 0, 21, 127*val ); 3 | /1/rotary2 f, val : controlchange( 0, 22, 127*val ); 4 | /1/rotary3 f, val : controlchange( 0, 23, 127*val ); 5 | /1/rotary4 f, val : controlchange( 0, 24, 127*val ); 6 | /1/rotary5 f, val : controlchange( 0, 25, 127*val ); 7 | /1/rotary6 f, val : controlchange( 0, 26, 127*val ); 8 | /1/rotary7 f, val : controlchange( 0, 27, 127*val ); 9 | /1/rotary8 f, val : controlchange( 0, 28, 127*val ); 10 | /1/rotary9 f, val : controlchange( 0, 29, 127*val ); 11 | /1/rotary10 f, val : controlchange( 0, 30, 127*val ); 12 | /1/rotary11 f, val : controlchange( 0, 31, 127*val ); 13 | /1/rotary12 f, val : controlchange( 0, 32, 127*val ); 14 | /1/fader1 f, val : controlchange( 0, 1, 127*val ); 15 | /1/fader2 f, val : controlchange( 0, 2, 127*val ); 16 | /1/fader3 f, val : controlchange( 0, 0, 127*val ); 17 | /1/fader4 f, val : controlchange( 0, 3, 127*val ); 18 | /1/fader5 f, val : controlchange( 0, 4, 127*val ); 19 | /1/toggle1 f, 0.0 : controlchange( 0, 5, 0 ); 20 | /1/toggle1 f, 1.0 : controlchange( 0, 5, 127 ); 21 | /1/toggle2 f, 0.0 : controlchange( 0, 7, 0 ); 22 | /1/toggle2 f, 1.0 : controlchange( 0, 7, 127 ); 23 | /1/toggle3 f, 0.0 : controlchange( 0, 6, 0 ); 24 | /1/toggle3 f, 1.0 : controlchange( 0, 6, 127 ); 25 | /1/toggle4 f, 0.0 : controlchange( 0, 8, 0 ); 26 | /1/toggle4 f, 1.0 : controlchange( 0, 8, 127 ); 27 | /1/toggle5 f, 0.0 : controlchange( 0, 9, 0 ); 28 | /1/toggle5 f, 1.0 : controlchange( 0, 9, 127 ); 29 | /1/toggle6 f, 0.0 : controlchange( 0, 11, 0 ); 30 | /1/toggle6 f, 1.0 : controlchange( 0, 11, 127 ); 31 | /1/toggle7 f, 0.0 : controlchange( 0, 10, 0 ); 32 | /1/toggle7 f, 1.0 : controlchange( 0, 10, 127 ); 33 | /1/toggle8 f, 0.0 : controlchange( 0, 12, 0 ); 34 | /1/toggle8 f, 1.0 : controlchange( 0, 12, 127 ); 35 | /1/toggle9 f, 0.0 : controlchange( 0, 13, 0 ); 36 | /1/toggle9 f, 1.0 : controlchange( 0, 13, 127 ); 37 | /1/toggle10 f, 0.0 : controlchange( 0, 15, 0 ); 38 | /1/toggle10 f, 1.0 : controlchange( 0, 15, 127 ); 39 | /1/toggle11 f, 0.0 : controlchange( 0, 14, 0 ); 40 | /1/toggle11 f, 1.0 : controlchange( 0, 14, 127 ); 41 | /1/toggle12 f, 0.0 : controlchange( 0, 16, 0 ); 42 | /1/toggle12 f, 1.0 : controlchange( 0, 16, 127 ); 43 | /1/multitoggle1/1/1 f, 0.0 : controlchange( 1, 0, 0 ); 44 | /1/multitoggle1/1/1 f, 1.0 : controlchange( 1, 0, 127 ); 45 | /1/multitoggle1/2/1 f, 0.0 : controlchange( 1, 1, 0 ); 46 | /1/multitoggle1/2/1 f, 1.0 : controlchange( 1, 1, 127 ); 47 | /1/multitoggle1/3/1 f, 0.0 : controlchange( 1, 2, 0 ); 48 | /1/multitoggle1/3/1 f, 1.0 : controlchange( 1, 2, 127 ); 49 | /1/multitoggle1/4/1 f, 0.0 : controlchange( 1, 3, 0 ); 50 | /1/multitoggle1/4/1 f, 1.0 : controlchange( 1, 3, 127 ); 51 | /1/multitoggle1/5/1 f, 0.0 : controlchange( 1, 4, 0 ); 52 | /1/multitoggle1/5/1 f, 1.0 : controlchange( 1, 4, 127 ); 53 | /1/multitoggle1/1/2 f, 0.0 : controlchange( 1, 5, 0 ); 54 | /1/multitoggle1/1/2 f, 1.0 : controlchange( 1, 5, 127 ); 55 | /1/multitoggle1/2/2 f, 0.0 : controlchange( 1, 6, 0 ); 56 | /1/multitoggle1/2/2 f, 1.0 : controlchange( 1, 6, 127 ); 57 | /1/multitoggle1/3/2 f, 0.0 : controlchange( 1, 7, 0 ); 58 | /1/multitoggle1/3/2 f, 1.0 : controlchange( 1, 7, 127 ); 59 | /1/multitoggle1/4/2 f, 0.0 : controlchange( 1, 8, 0 ); 60 | /1/multitoggle1/4/2 f, 1.0 : controlchange( 1, 8, 127 ); 61 | /1/multitoggle1/5/2 f, 0.0 : controlchange( 1, 9, 0 ); 62 | /1/multitoggle1/5/2 f, 1.0 : controlchange( 1, 9, 127 ); 63 | /1/multitoggle1/1/3 f, 0.0 : controlchange( 1, 10, 0 ); 64 | /1/multitoggle1/1/3 f, 1.0 : controlchange( 1, 10, 127 ); 65 | /1/multitoggle1/2/3 f, 0.0 : controlchange( 1, 11, 0 ); 66 | /1/multitoggle1/2/3 f, 1.0 : controlchange( 1, 11, 127 ); 67 | /1/multitoggle1/3/3 f, 0.0 : controlchange( 1, 12, 0 ); 68 | /1/multitoggle1/3/3 f, 1.0 : controlchange( 1, 12, 127 ); 69 | /1/multitoggle1/4/3 f, 0.0 : controlchange( 1, 13, 0 ); 70 | /1/multitoggle1/4/3 f, 1.0 : controlchange( 1, 13, 127 ); 71 | /1/multitoggle1/5/3 f, 0.0 : controlchange( 1, 14, 0 ); 72 | /1/multitoggle1/5/3 f, 1.0 : controlchange( 1, 14, 127 ); 73 | /1/multitoggle1/1/4 f, 0.0 : controlchange( 1, 15, 0 ); 74 | /1/multitoggle1/1/4 f, 1.0 : controlchange( 1, 15, 127 ); 75 | /1/multitoggle1/2/4 f, 0.0 : controlchange( 1, 16, 0 ); 76 | /1/multitoggle1/2/4 f, 1.0 : controlchange( 1, 16, 127 ); 77 | /1/multitoggle1/3/4 f, 0.0 : controlchange( 1, 17, 0 ); 78 | /1/multitoggle1/3/4 f, 1.0 : controlchange( 1, 17, 127 ); 79 | /1/multitoggle1/4/4 f, 0.0 : controlchange( 1, 18, 0 ); 80 | /1/multitoggle1/4/4 f, 1.0 : controlchange( 1, 18, 127 ); 81 | /1/multitoggle1/5/4 f, 0.0 : controlchange( 1, 19, 0 ); 82 | /1/multitoggle1/5/4 f, 1.0 : controlchange( 1, 19, 127 ); 83 | /1/multitoggle1/1/5 f, 0.0 : controlchange( 1, 20, 0 ); 84 | /1/multitoggle1/1/5 f, 1.0 : controlchange( 1, 20, 127 ); 85 | /1/multitoggle1/2/5 f, 0.0 : controlchange( 1, 21, 0 ); 86 | /1/multitoggle1/2/5 f, 1.0 : controlchange( 1, 21, 127 ); 87 | /1/multitoggle1/3/5 f, 0.0 : controlchange( 1, 22, 0 ); 88 | /1/multitoggle1/3/5 f, 1.0 : controlchange( 1, 22, 127 ); 89 | /1/multitoggle1/4/5 f, 0.0 : controlchange( 1, 23, 0 ); 90 | /1/multitoggle1/4/5 f, 1.0 : controlchange( 1, 23, 127 ); 91 | /1/multitoggle1/5/5 f, 0.0 : controlchange( 1, 24, 0 ); 92 | /1/multitoggle1/5/5 f, 1.0 : controlchange( 1, 24, 127 ); 93 | /1/multitoggle2/1/1 f, 0.0 : controlchange( 1, 25, 0 ); 94 | /1/multitoggle2/1/1 f, 1.0 : controlchange( 1, 25, 127 ); 95 | /1/multitoggle2/2/1 f, 0.0 : controlchange( 1, 26, 0 ); 96 | /1/multitoggle2/2/1 f, 1.0 : controlchange( 1, 26, 127 ); 97 | /1/multitoggle2/3/1 f, 0.0 : controlchange( 1, 27, 0 ); 98 | /1/multitoggle2/3/1 f, 1.0 : controlchange( 1, 27, 127 ); 99 | /1/multitoggle2/4/1 f, 0.0 : controlchange( 1, 28, 0 ); 100 | /1/multitoggle2/4/1 f, 1.0 : controlchange( 1, 28, 127 ); 101 | /1/multitoggle2/5/1 f, 0.0 : controlchange( 1, 29, 0 ); 102 | /1/multitoggle2/5/1 f, 1.0 : controlchange( 1, 29, 127 ); 103 | /1/multitoggle2/1/2 f, 0.0 : controlchange( 1, 30, 0 ); 104 | /1/multitoggle2/1/2 f, 1.0 : controlchange( 1, 30, 127 ); 105 | /1/multitoggle2/2/2 f, 0.0 : controlchange( 1, 31, 0 ); 106 | /1/multitoggle2/2/2 f, 1.0 : controlchange( 1, 31, 127 ); 107 | /1/multitoggle2/3/2 f, 0.0 : controlchange( 1, 32, 0 ); 108 | /1/multitoggle2/3/2 f, 1.0 : controlchange( 1, 32, 127 ); 109 | /1/multitoggle2/4/2 f, 0.0 : controlchange( 1, 33, 0 ); 110 | /1/multitoggle2/4/2 f, 1.0 : controlchange( 1, 33, 127 ); 111 | /1/multitoggle2/5/2 f, 0.0 : controlchange( 1, 34, 0 ); 112 | /1/multitoggle2/5/2 f, 1.0 : controlchange( 1, 34, 127 ); 113 | /1/multitoggle2/1/3 f, 0.0 : controlchange( 1, 35, 0 ); 114 | /1/multitoggle2/1/3 f, 1.0 : controlchange( 1, 35, 127 ); 115 | /1/multitoggle2/2/3 f, 0.0 : controlchange( 1, 36, 0 ); 116 | /1/multitoggle2/2/3 f, 1.0 : controlchange( 1, 36, 127 ); 117 | /1/multitoggle2/3/3 f, 0.0 : controlchange( 1, 37, 0 ); 118 | /1/multitoggle2/3/3 f, 1.0 : controlchange( 1, 37, 127 ); 119 | /1/multitoggle2/4/3 f, 0.0 : controlchange( 1, 38, 0 ); 120 | /1/multitoggle2/4/3 f, 1.0 : controlchange( 1, 38, 127 ); 121 | /1/multitoggle2/5/3 f, 0.0 : controlchange( 1, 39, 0 ); 122 | /1/multitoggle2/5/3 f, 1.0 : controlchange( 1, 39, 127 ); 123 | /1/multitoggle2/1/4 f, 0.0 : controlchange( 1, 40, 0 ); 124 | /1/multitoggle2/1/4 f, 1.0 : controlchange( 1, 40, 127 ); 125 | /1/multitoggle2/2/4 f, 0.0 : controlchange( 1, 41, 0 ); 126 | /1/multitoggle2/2/4 f, 1.0 : controlchange( 1, 41, 127 ); 127 | /1/multitoggle2/3/4 f, 0.0 : controlchange( 1, 42, 0 ); 128 | /1/multitoggle2/3/4 f, 1.0 : controlchange( 1, 42, 127 ); 129 | /1/multitoggle2/4/4 f, 0.0 : controlchange( 1, 43, 0 ); 130 | /1/multitoggle2/4/4 f, 1.0 : controlchange( 1, 43, 127 ); 131 | /1/multitoggle2/5/4 f, 0.0 : controlchange( 1, 44, 0 ); 132 | /1/multitoggle2/5/4 f, 1.0 : controlchange( 1, 44, 127 ); 133 | /1/multitoggle2/1/5 f, 0.0 : controlchange( 1, 45, 0 ); 134 | /1/multitoggle2/1/5 f, 1.0 : controlchange( 1, 45, 127 ); 135 | /1/multitoggle2/2/5 f, 0.0 : controlchange( 1, 46, 0 ); 136 | /1/multitoggle2/2/5 f, 1.0 : controlchange( 1, 46, 127 ); 137 | /1/multitoggle2/3/5 f, 0.0 : controlchange( 1, 47, 0 ); 138 | /1/multitoggle2/3/5 f, 1.0 : controlchange( 1, 47, 127 ); 139 | /1/multitoggle2/4/5 f, 0.0 : controlchange( 1, 48, 0 ); 140 | /1/multitoggle2/4/5 f, 1.0 : controlchange( 1, 48, 127 ); 141 | /1/multitoggle2/5/5 f, 0.0 : controlchange( 1, 49, 0 ); 142 | /1/multitoggle2/5/5 f, 1.0 : controlchange( 1, 49, 127 ); 143 | /1/multitoggle3/1/1 f, 0.0 : controlchange( 1, 50, 0 ); 144 | /1/multitoggle3/1/1 f, 1.0 : controlchange( 1, 50, 127 ); 145 | /1/multitoggle3/2/1 f, 0.0 : controlchange( 1, 51, 0 ); 146 | /1/multitoggle3/2/1 f, 1.0 : controlchange( 1, 51, 127 ); 147 | /1/multitoggle3/1/2 f, 0.0 : controlchange( 1, 52, 0 ); 148 | /1/multitoggle3/1/2 f, 1.0 : controlchange( 1, 52, 127 ); 149 | /1/multitoggle3/2/2 f, 0.0 : controlchange( 1, 53, 0 ); 150 | /1/multitoggle3/2/2 f, 1.0 : controlchange( 1, 53, 127 ); 151 | /1/multitoggle3/1/3 f, 0.0 : controlchange( 1, 54, 0 ); 152 | /1/multitoggle3/1/3 f, 1.0 : controlchange( 1, 54, 127 ); 153 | /1/multitoggle3/2/3 f, 0.0 : controlchange( 1, 55, 0 ); 154 | /1/multitoggle3/2/3 f, 1.0 : controlchange( 1, 55, 127 ); 155 | /1/toggle13 f, 0.0 : controlchange( 0, 17, 0 ); 156 | /1/toggle13 f, 1.0 : controlchange( 0, 17, 127 ); 157 | /1/toggle14 f, 0.0 : controlchange( 0, 18, 0 ); 158 | /1/toggle14 f, 1.0 : controlchange( 0, 18, 127 ); 159 | /1/toggle15 f, 0.0 : controlchange( 0, 19, 0 ); 160 | /1/toggle15 f, 1.0 : controlchange( 0, 19, 127 ); 161 | /1/toggle16 f, 0.0 : controlchange( 0, 20, 0 ); 162 | /1/toggle16 f, 1.0 : controlchange( 0, 20, 127 ); 163 | /1/push1 f, 0.0 : noteon( 0, 28, 0 ); 164 | /1/push1 f, 1.0 : noteon( 0, 28, 127 ); 165 | /1/push2 f, 0.0 : noteon( 0, 29, 0 ); 166 | /1/push2 f, 1.0 : noteon( 0, 29, 127 ); 167 | /1/push3 f, 0.0 : noteon( 0, 26, 0 ); 168 | /1/push3 f, 1.0 : noteon( 0, 26, 127 ); 169 | /1/push4 f, 0.0 : noteon( 0, 27, 0 ); 170 | /1/push4 f, 1.0 : noteon( 0, 27, 127 ); 171 | /1/push5 f, 0.0 : noteon( 0, 24, 0 ); 172 | /1/push5 f, 1.0 : noteon( 0, 24, 127 ); 173 | /1/push6 f, 0.0 : noteon( 0, 25, 0 ); 174 | /1/push6 f, 1.0 : noteon( 0, 25, 127 ); 175 | /1/push7 f, 0.0 : noteon( 0, 40, 0 ); 176 | /1/push7 f, 1.0 : noteon( 0, 40, 127 ); 177 | /1/push8 f, 0.0 : noteon( 0, 41, 0 ); 178 | /1/push8 f, 1.0 : noteon( 0, 41, 127 ); 179 | /1/push9 f, 0.0 : noteon( 0, 38, 0 ); 180 | /1/push9 f, 1.0 : noteon( 0, 38, 127 ); 181 | /1/push10 f, 0.0 : noteon( 0, 39, 0 ); 182 | /1/push10 f, 1.0 : noteon( 0, 39, 127 ); 183 | /1/push11 f, 0.0 : noteon( 0, 36, 0 ); 184 | /1/push11 f, 1.0 : noteon( 0, 36, 127 ); 185 | /1/push12 f, 0.0 : noteon( 0, 37, 0 ); 186 | /1/push12 f, 1.0 : noteon( 0, 37, 127 ); 187 | /1/xy1 ff, val, : controlchange( 0, 33, 127*val ); 188 | /1/xy1 ff, , val : controlchange( 0, 34, 127*val ); 189 | /1/xy2 ff, val, : controlchange( 0, 35, 127*val ); 190 | /1/xy2 ff, , val : controlchange( 0, 36, 127*val ); 191 | /2/multifader1/1 f, val : controlchange( 1, 56, 127*val ); 192 | /2/multifader1/2 f, val : controlchange( 1, 57, 127*val ); 193 | /2/multifader1/3 f, val : controlchange( 1, 58, 127*val ); 194 | /2/multifader1/4 f, val : controlchange( 1, 59, 127*val ); 195 | /2/multifader1/5 f, val : controlchange( 1, 60, 127*val ); 196 | /2/multifader1/6 f, val : controlchange( 1, 61, 127*val ); 197 | /2/multifader1/7 f, val : controlchange( 1, 62, 127*val ); 198 | /2/multifader1/8 f, val : controlchange( 1, 63, 127*val ); 199 | /2/multifader1/9 f, val : controlchange( 1, 64, 127*val ); 200 | /2/multifader1/10 f, val : controlchange( 1, 65, 127*val ); 201 | /2/multifader1/11 f, val : controlchange( 1, 66, 127*val ); 202 | /2/multifader1/12 f, val : controlchange( 1, 67, 127*val ); 203 | /2/multifader1/13 f, val : controlchange( 1, 68, 127*val ); 204 | /2/multifader1/14 f, val : controlchange( 1, 69, 127*val ); 205 | /2/multifader1/15 f, val : controlchange( 1, 70, 127*val ); 206 | /2/multifader1/16 f, val : controlchange( 1, 71, 127*val ); 207 | /2/multifader1/17 f, val : controlchange( 1, 72, 127*val ); 208 | /2/multifader1/18 f, val : controlchange( 1, 73, 127*val ); 209 | /2/multifader1/19 f, val : controlchange( 1, 74, 127*val ); 210 | /2/multifader1/20 f, val : controlchange( 1, 75, 127*val ); 211 | /2/multifader1/21 f, val : controlchange( 1, 76, 127*val ); 212 | /2/multifader1/22 f, val : controlchange( 1, 77, 127*val ); 213 | /2/multifader1/23 f, val : controlchange( 1, 78, 127*val ); 214 | /2/multifader1/24 f, val : controlchange( 1, 79, 127*val ); 215 | /2/multifader2/1 f, val : controlchange( 1, 80, 127*val ); 216 | /2/multifader2/2 f, val : controlchange( 1, 81, 127*val ); 217 | /2/multifader2/3 f, val : controlchange( 1, 82, 127*val ); 218 | /2/multifader2/4 f, val : controlchange( 1, 83, 127*val ); 219 | /2/multifader2/5 f, val : controlchange( 1, 84, 127*val ); 220 | /2/multifader2/6 f, val : controlchange( 1, 85, 127*val ); 221 | /2/multifader2/7 f, val : controlchange( 1, 86, 127*val ); 222 | /2/multifader2/8 f, val : controlchange( 1, 87, 127*val ); 223 | /2/multifader2/9 f, val : controlchange( 1, 88, 127*val ); 224 | /2/multifader2/10 f, val : controlchange( 1, 89, 127*val ); 225 | /2/multifader2/11 f, val : controlchange( 1, 90, 127*val ); 226 | /2/multifader2/12 f, val : controlchange( 1, 91, 127*val ); 227 | /2/multifader2/13 f, val : controlchange( 1, 92, 127*val ); 228 | /2/multifader2/14 f, val : controlchange( 1, 93, 127*val ); 229 | /2/multifader2/15 f, val : controlchange( 1, 94, 127*val ); 230 | /2/multifader2/16 f, val : controlchange( 1, 95, 127*val ); 231 | /2/multifader2/17 f, val : controlchange( 1, 96, 127*val ); 232 | /2/multifader2/18 f, val : controlchange( 1, 97, 127*val ); 233 | /2/multifader2/19 f, val : controlchange( 1, 98, 127*val ); 234 | /2/multifader2/20 f, val : controlchange( 1, 99, 127*val ); 235 | /2/multifader2/21 f, val : controlchange( 1, 100, 127*val ); 236 | /2/multifader2/22 f, val : controlchange( 1, 101, 127*val ); 237 | /2/multifader2/23 f, val : controlchange( 1, 102, 127*val ); 238 | /2/multifader2/24 f, val : controlchange( 1, 103, 127*val ); 239 | /3/xy1 ff, val, : controlchange( 0, 37, 127*val ); 240 | /3/xy1 ff, , val : controlchange( 0, 38, 127*val ); 241 | /3/xy2 ff, val, : controlchange( 0, 39, 127*val ); 242 | /3/xy2 ff, , val : controlchange( 0, 40, 127*val ); 243 | /3/xy3 ff, val, : controlchange( 0, 41, 127*val ); 244 | /3/xy3 ff, , val : controlchange( 0, 42, 127*val ); 245 | /3/xy4 ff, val, : controlchange( 0, 43, 127*val ); 246 | /3/xy4 ff, , val : controlchange( 0, 44, 127*val ); 247 | /3/xy5 ff, val, : controlchange( 0, 45, 127*val ); 248 | /3/xy5 ff, , val : controlchange( 0, 46, 127*val ); 249 | /3/xy6 ff, val, : controlchange( 0, 47, 127*val ); 250 | /3/xy6 ff, , val : controlchange( 0, 48, 127*val ); 251 | /3/xy7 ff, val, : controlchange( 0, 49, 127*val ); 252 | /3/xy7 ff, , val : controlchange( 0, 50, 127*val ); 253 | /3/xy8 ff, val, : controlchange( 0, 51, 127*val ); 254 | /3/xy8 ff, , val : controlchange( 0, 52, 127*val ); 255 | -------------------------------------------------------------------------------- /maps/touchosc/Mix 2.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Mix 2.touchosc Fri Jun 26 23:42:14 2015 2 | /1/rotary1 f, val : controlchange( 0, 7, 127*val ); 3 | /1/rotary2 f, val : controlchange( 0, 8, 127*val ); 4 | /1/rotary3 f, val : controlchange( 0, 9, 127*val ); 5 | /1/rotary4 f, val : controlchange( 0, 10, 127*val ); 6 | /1/rotary5 f, val : controlchange( 0, 11, 127*val ); 7 | /1/rotary6 f, val : controlchange( 0, 12, 127*val ); 8 | /1/toggle1 f, 0.0 : controlchange( 0, 3, 0 ); 9 | /1/toggle1 f, 1.0 : controlchange( 0, 3, 127 ); 10 | /1/toggle2 f, 0.0 : controlchange( 0, 4, 0 ); 11 | /1/toggle2 f, 1.0 : controlchange( 0, 4, 127 ); 12 | /1/toggle3 f, 0.0 : controlchange( 0, 5, 0 ); 13 | /1/toggle3 f, 1.0 : controlchange( 0, 5, 127 ); 14 | /1/toggle4 f, 0.0 : controlchange( 0, 6, 0 ); 15 | /1/toggle4 f, 1.0 : controlchange( 0, 6, 127 ); 16 | /1/push1 f, 0.0 : noteon( 0, 24, 0 ); 17 | /1/push1 f, 1.0 : noteon( 0, 24, 127 ); 18 | /1/push2 f, 0.0 : noteon( 0, 25, 0 ); 19 | /1/push2 f, 1.0 : noteon( 0, 25, 127 ); 20 | /1/push3 f, 0.0 : noteon( 0, 26, 0 ); 21 | /1/push3 f, 1.0 : noteon( 0, 26, 127 ); 22 | /1/push4 f, 0.0 : noteon( 0, 27, 0 ); 23 | /1/push4 f, 1.0 : noteon( 0, 27, 127 ); 24 | /1/fader1 f, val : controlchange( 0, 1, 127*val ); 25 | /1/fader2 f, val : controlchange( 0, 2, 127*val ); 26 | /1/fader3 f, val : controlchange( 0, 0, 127*val ); 27 | /2/multifader1/1 f, val : controlchange( 0, 13, 127*val ); 28 | /2/multifader1/2 f, val : controlchange( 0, 14, 127*val ); 29 | /2/multifader1/3 f, val : controlchange( 0, 15, 127*val ); 30 | /2/multifader1/4 f, val : controlchange( 0, 16, 127*val ); 31 | /2/multifader1/5 f, val : controlchange( 0, 17, 127*val ); 32 | /2/multifader1/6 f, val : controlchange( 0, 18, 127*val ); 33 | /2/multifader1/7 f, val : controlchange( 0, 19, 127*val ); 34 | /2/multifader1/8 f, val : controlchange( 0, 20, 127*val ); 35 | /2/multifader1/9 f, val : controlchange( 0, 21, 127*val ); 36 | /2/multifader1/10 f, val : controlchange( 0, 22, 127*val ); 37 | /2/multifader1/11 f, val : controlchange( 0, 23, 127*val ); 38 | /2/multifader1/12 f, val : controlchange( 0, 24, 127*val ); 39 | /2/multifader1/13 f, val : controlchange( 0, 25, 127*val ); 40 | /2/multifader1/14 f, val : controlchange( 0, 26, 127*val ); 41 | /2/multifader1/15 f, val : controlchange( 0, 27, 127*val ); 42 | /2/multifader1/16 f, val : controlchange( 0, 28, 127*val ); 43 | /2/multifader2/1 f, val : controlchange( 0, 29, 127*val ); 44 | /2/multifader2/2 f, val : controlchange( 0, 30, 127*val ); 45 | /2/multifader2/3 f, val : controlchange( 0, 31, 127*val ); 46 | /2/multifader2/4 f, val : controlchange( 0, 32, 127*val ); 47 | /2/multifader2/5 f, val : controlchange( 0, 33, 127*val ); 48 | /2/multifader2/6 f, val : controlchange( 0, 34, 127*val ); 49 | /2/multifader2/7 f, val : controlchange( 0, 35, 127*val ); 50 | /2/multifader2/8 f, val : controlchange( 0, 36, 127*val ); 51 | /2/multifader2/9 f, val : controlchange( 0, 37, 127*val ); 52 | /2/multifader2/10 f, val : controlchange( 0, 38, 127*val ); 53 | /2/multifader2/11 f, val : controlchange( 0, 39, 127*val ); 54 | /2/multifader2/12 f, val : controlchange( 0, 40, 127*val ); 55 | /2/multifader2/13 f, val : controlchange( 0, 41, 127*val ); 56 | /2/multifader2/14 f, val : controlchange( 0, 42, 127*val ); 57 | /2/multifader2/15 f, val : controlchange( 0, 43, 127*val ); 58 | /2/multifader2/16 f, val : controlchange( 0, 44, 127*val ); 59 | /3/xy1 ff, val, : controlchange( 0, 45, 127*val ); 60 | /3/xy1 ff, , val : controlchange( 0, 46, 127*val ); 61 | /3/xy2 ff, val, : controlchange( 0, 47, 127*val ); 62 | /3/xy2 ff, , val : controlchange( 0, 48, 127*val ); 63 | -------------------------------------------------------------------------------- /maps/touchosc/README.md: -------------------------------------------------------------------------------- 1 | TouchOSC Maps 2 | ============= 3 | 4 | The maps in this directory are for the layouts that come preinstalled with 5 | hexler's [TouchOSC][1]. The layout files can also be downloaded from hexler's 6 | website as a [zip archive][2]. 7 | 8 | The osc2midi maps have all been generated using the to2omm script from the 9 | [osc2midi-util][3] project. (Please note that the Live and Logic layouts 10 | aren't included here because they do not contain any MIDI mappings.) 11 | 12 | [1]: http://hexler.net/software/touchosc 13 | [2]: http://hexler.net/pub/touchosc/touchosc-default-layouts.zip 14 | [3]: https://bitbucket.org/agraef/osc2midi-utils 15 | -------------------------------------------------------------------------------- /maps/touchosc/Simple.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from Simple.touchosc Fri Jun 26 23:42:14 2015 2 | /1/fader5 f, val : controlchange( 0, 4, 127*val ); 3 | /1/fader1 f, val : controlchange( 0, 0, 127*val ); 4 | /1/fader2 f, val : controlchange( 0, 1, 127*val ); 5 | /1/fader3 f, val : controlchange( 0, 2, 127*val ); 6 | /1/fader4 f, val : controlchange( 0, 3, 127*val ); 7 | /1/toggle1 f, 0.0 : controlchange( 0, 5, 0 ); 8 | /1/toggle1 f, 1.0 : controlchange( 0, 5, 127 ); 9 | /1/toggle2 f, 0.0 : controlchange( 0, 6, 0 ); 10 | /1/toggle2 f, 1.0 : controlchange( 0, 6, 127 ); 11 | /1/toggle3 f, 0.0 : controlchange( 0, 7, 0 ); 12 | /1/toggle3 f, 1.0 : controlchange( 0, 7, 127 ); 13 | /1/toggle4 f, 0.0 : controlchange( 0, 8, 0 ); 14 | /1/toggle4 f, 1.0 : controlchange( 0, 8, 127 ); 15 | /2/push1 f, 0.0 : noteon( 0, 36, 0 ); 16 | /2/push1 f, 1.0 : noteon( 0, 36, 127 ); 17 | /2/push2 f, 0.0 : noteon( 0, 37, 0 ); 18 | /2/push2 f, 1.0 : noteon( 0, 37, 127 ); 19 | /2/push3 f, 0.0 : noteon( 0, 38, 0 ); 20 | /2/push3 f, 1.0 : noteon( 0, 38, 127 ); 21 | /2/push4 f, 0.0 : noteon( 0, 39, 0 ); 22 | /2/push4 f, 1.0 : noteon( 0, 39, 127 ); 23 | /2/push5 f, 0.0 : noteon( 0, 32, 0 ); 24 | /2/push5 f, 1.0 : noteon( 0, 32, 127 ); 25 | /2/push6 f, 0.0 : noteon( 0, 33, 0 ); 26 | /2/push6 f, 1.0 : noteon( 0, 33, 127 ); 27 | /2/push7 f, 0.0 : noteon( 0, 34, 0 ); 28 | /2/push7 f, 1.0 : noteon( 0, 34, 127 ); 29 | /2/push8 f, 0.0 : noteon( 0, 35, 0 ); 30 | /2/push8 f, 1.0 : noteon( 0, 35, 127 ); 31 | /2/push9 f, 0.0 : noteon( 0, 28, 0 ); 32 | /2/push9 f, 1.0 : noteon( 0, 28, 127 ); 33 | /2/push10 f, 0.0 : noteon( 0, 29, 0 ); 34 | /2/push10 f, 1.0 : noteon( 0, 29, 127 ); 35 | /2/push11 f, 0.0 : noteon( 0, 30, 0 ); 36 | /2/push11 f, 1.0 : noteon( 0, 30, 127 ); 37 | /2/push12 f, 0.0 : noteon( 0, 31, 0 ); 38 | /2/push12 f, 1.0 : noteon( 0, 31, 127 ); 39 | /2/push13 f, 0.0 : noteon( 0, 24, 0 ); 40 | /2/push13 f, 1.0 : noteon( 0, 24, 127 ); 41 | /2/push14 f, 0.0 : noteon( 0, 25, 0 ); 42 | /2/push14 f, 1.0 : noteon( 0, 25, 127 ); 43 | /2/push15 f, 0.0 : noteon( 0, 26, 0 ); 44 | /2/push15 f, 1.0 : noteon( 0, 26, 127 ); 45 | /2/push16 f, 0.0 : noteon( 0, 27, 0 ); 46 | /2/push16 f, 1.0 : noteon( 0, 27, 127 ); 47 | /2/toggle1 f, 0.0 : controlchange( 0, 9, 0 ); 48 | /2/toggle1 f, 1.0 : controlchange( 0, 9, 127 ); 49 | /2/toggle2 f, 0.0 : controlchange( 0, 10, 0 ); 50 | /2/toggle2 f, 1.0 : controlchange( 0, 10, 127 ); 51 | /2/toggle3 f, 0.0 : controlchange( 0, 11, 0 ); 52 | /2/toggle3 f, 1.0 : controlchange( 0, 11, 127 ); 53 | /2/toggle4 f, 0.0 : controlchange( 0, 12, 0 ); 54 | /2/toggle4 f, 1.0 : controlchange( 0, 12, 127 ); 55 | /3/xy ff, val, : controlchange( 0, 13, 127*val ); 56 | /3/xy ff, , val : controlchange( 0, 14, 127*val ); 57 | /3/toggle1 f, 0.0 : controlchange( 0, 15, 0 ); 58 | /3/toggle1 f, 1.0 : controlchange( 0, 15, 127 ); 59 | /3/toggle2 f, 0.0 : controlchange( 0, 16, 0 ); 60 | /3/toggle2 f, 1.0 : controlchange( 0, 16, 127 ); 61 | /3/toggle3 f, 0.0 : controlchange( 0, 17, 0 ); 62 | /3/toggle3 f, 1.0 : controlchange( 0, 17, 127 ); 63 | /3/toggle4 f, 0.0 : controlchange( 0, 18, 0 ); 64 | /3/toggle4 f, 1.0 : controlchange( 0, 18, 127 ); 65 | /4/multitoggle/1/1 f, 0.0 : controlchange( 1, 0, 0 ); 66 | /4/multitoggle/1/1 f, 1.0 : controlchange( 1, 0, 127 ); 67 | /4/multitoggle/2/1 f, 0.0 : controlchange( 1, 1, 0 ); 68 | /4/multitoggle/2/1 f, 1.0 : controlchange( 1, 1, 127 ); 69 | /4/multitoggle/3/1 f, 0.0 : controlchange( 1, 2, 0 ); 70 | /4/multitoggle/3/1 f, 1.0 : controlchange( 1, 2, 127 ); 71 | /4/multitoggle/4/1 f, 0.0 : controlchange( 1, 3, 0 ); 72 | /4/multitoggle/4/1 f, 1.0 : controlchange( 1, 3, 127 ); 73 | /4/multitoggle/5/1 f, 0.0 : controlchange( 1, 4, 0 ); 74 | /4/multitoggle/5/1 f, 1.0 : controlchange( 1, 4, 127 ); 75 | /4/multitoggle/6/1 f, 0.0 : controlchange( 1, 5, 0 ); 76 | /4/multitoggle/6/1 f, 1.0 : controlchange( 1, 5, 127 ); 77 | /4/multitoggle/7/1 f, 0.0 : controlchange( 1, 6, 0 ); 78 | /4/multitoggle/7/1 f, 1.0 : controlchange( 1, 6, 127 ); 79 | /4/multitoggle/8/1 f, 0.0 : controlchange( 1, 7, 0 ); 80 | /4/multitoggle/8/1 f, 1.0 : controlchange( 1, 7, 127 ); 81 | /4/multitoggle/1/2 f, 0.0 : controlchange( 1, 8, 0 ); 82 | /4/multitoggle/1/2 f, 1.0 : controlchange( 1, 8, 127 ); 83 | /4/multitoggle/2/2 f, 0.0 : controlchange( 1, 9, 0 ); 84 | /4/multitoggle/2/2 f, 1.0 : controlchange( 1, 9, 127 ); 85 | /4/multitoggle/3/2 f, 0.0 : controlchange( 1, 10, 0 ); 86 | /4/multitoggle/3/2 f, 1.0 : controlchange( 1, 10, 127 ); 87 | /4/multitoggle/4/2 f, 0.0 : controlchange( 1, 11, 0 ); 88 | /4/multitoggle/4/2 f, 1.0 : controlchange( 1, 11, 127 ); 89 | /4/multitoggle/5/2 f, 0.0 : controlchange( 1, 12, 0 ); 90 | /4/multitoggle/5/2 f, 1.0 : controlchange( 1, 12, 127 ); 91 | /4/multitoggle/6/2 f, 0.0 : controlchange( 1, 13, 0 ); 92 | /4/multitoggle/6/2 f, 1.0 : controlchange( 1, 13, 127 ); 93 | /4/multitoggle/7/2 f, 0.0 : controlchange( 1, 14, 0 ); 94 | /4/multitoggle/7/2 f, 1.0 : controlchange( 1, 14, 127 ); 95 | /4/multitoggle/8/2 f, 0.0 : controlchange( 1, 15, 0 ); 96 | /4/multitoggle/8/2 f, 1.0 : controlchange( 1, 15, 127 ); 97 | /4/multitoggle/1/3 f, 0.0 : controlchange( 1, 16, 0 ); 98 | /4/multitoggle/1/3 f, 1.0 : controlchange( 1, 16, 127 ); 99 | /4/multitoggle/2/3 f, 0.0 : controlchange( 1, 17, 0 ); 100 | /4/multitoggle/2/3 f, 1.0 : controlchange( 1, 17, 127 ); 101 | /4/multitoggle/3/3 f, 0.0 : controlchange( 1, 18, 0 ); 102 | /4/multitoggle/3/3 f, 1.0 : controlchange( 1, 18, 127 ); 103 | /4/multitoggle/4/3 f, 0.0 : controlchange( 1, 19, 0 ); 104 | /4/multitoggle/4/3 f, 1.0 : controlchange( 1, 19, 127 ); 105 | /4/multitoggle/5/3 f, 0.0 : controlchange( 1, 20, 0 ); 106 | /4/multitoggle/5/3 f, 1.0 : controlchange( 1, 20, 127 ); 107 | /4/multitoggle/6/3 f, 0.0 : controlchange( 1, 21, 0 ); 108 | /4/multitoggle/6/3 f, 1.0 : controlchange( 1, 21, 127 ); 109 | /4/multitoggle/7/3 f, 0.0 : controlchange( 1, 22, 0 ); 110 | /4/multitoggle/7/3 f, 1.0 : controlchange( 1, 22, 127 ); 111 | /4/multitoggle/8/3 f, 0.0 : controlchange( 1, 23, 0 ); 112 | /4/multitoggle/8/3 f, 1.0 : controlchange( 1, 23, 127 ); 113 | /4/multitoggle/1/4 f, 0.0 : controlchange( 1, 24, 0 ); 114 | /4/multitoggle/1/4 f, 1.0 : controlchange( 1, 24, 127 ); 115 | /4/multitoggle/2/4 f, 0.0 : controlchange( 1, 25, 0 ); 116 | /4/multitoggle/2/4 f, 1.0 : controlchange( 1, 25, 127 ); 117 | /4/multitoggle/3/4 f, 0.0 : controlchange( 1, 26, 0 ); 118 | /4/multitoggle/3/4 f, 1.0 : controlchange( 1, 26, 127 ); 119 | /4/multitoggle/4/4 f, 0.0 : controlchange( 1, 27, 0 ); 120 | /4/multitoggle/4/4 f, 1.0 : controlchange( 1, 27, 127 ); 121 | /4/multitoggle/5/4 f, 0.0 : controlchange( 1, 28, 0 ); 122 | /4/multitoggle/5/4 f, 1.0 : controlchange( 1, 28, 127 ); 123 | /4/multitoggle/6/4 f, 0.0 : controlchange( 1, 29, 0 ); 124 | /4/multitoggle/6/4 f, 1.0 : controlchange( 1, 29, 127 ); 125 | /4/multitoggle/7/4 f, 0.0 : controlchange( 1, 30, 0 ); 126 | /4/multitoggle/7/4 f, 1.0 : controlchange( 1, 30, 127 ); 127 | /4/multitoggle/8/4 f, 0.0 : controlchange( 1, 31, 0 ); 128 | /4/multitoggle/8/4 f, 1.0 : controlchange( 1, 31, 127 ); 129 | /4/multitoggle/1/5 f, 0.0 : controlchange( 1, 32, 0 ); 130 | /4/multitoggle/1/5 f, 1.0 : controlchange( 1, 32, 127 ); 131 | /4/multitoggle/2/5 f, 0.0 : controlchange( 1, 33, 0 ); 132 | /4/multitoggle/2/5 f, 1.0 : controlchange( 1, 33, 127 ); 133 | /4/multitoggle/3/5 f, 0.0 : controlchange( 1, 34, 0 ); 134 | /4/multitoggle/3/5 f, 1.0 : controlchange( 1, 34, 127 ); 135 | /4/multitoggle/4/5 f, 0.0 : controlchange( 1, 35, 0 ); 136 | /4/multitoggle/4/5 f, 1.0 : controlchange( 1, 35, 127 ); 137 | /4/multitoggle/5/5 f, 0.0 : controlchange( 1, 36, 0 ); 138 | /4/multitoggle/5/5 f, 1.0 : controlchange( 1, 36, 127 ); 139 | /4/multitoggle/6/5 f, 0.0 : controlchange( 1, 37, 0 ); 140 | /4/multitoggle/6/5 f, 1.0 : controlchange( 1, 37, 127 ); 141 | /4/multitoggle/7/5 f, 0.0 : controlchange( 1, 38, 0 ); 142 | /4/multitoggle/7/5 f, 1.0 : controlchange( 1, 38, 127 ); 143 | /4/multitoggle/8/5 f, 0.0 : controlchange( 1, 39, 0 ); 144 | /4/multitoggle/8/5 f, 1.0 : controlchange( 1, 39, 127 ); 145 | /4/multitoggle/1/6 f, 0.0 : controlchange( 1, 40, 0 ); 146 | /4/multitoggle/1/6 f, 1.0 : controlchange( 1, 40, 127 ); 147 | /4/multitoggle/2/6 f, 0.0 : controlchange( 1, 41, 0 ); 148 | /4/multitoggle/2/6 f, 1.0 : controlchange( 1, 41, 127 ); 149 | /4/multitoggle/3/6 f, 0.0 : controlchange( 1, 42, 0 ); 150 | /4/multitoggle/3/6 f, 1.0 : controlchange( 1, 42, 127 ); 151 | /4/multitoggle/4/6 f, 0.0 : controlchange( 1, 43, 0 ); 152 | /4/multitoggle/4/6 f, 1.0 : controlchange( 1, 43, 127 ); 153 | /4/multitoggle/5/6 f, 0.0 : controlchange( 1, 44, 0 ); 154 | /4/multitoggle/5/6 f, 1.0 : controlchange( 1, 44, 127 ); 155 | /4/multitoggle/6/6 f, 0.0 : controlchange( 1, 45, 0 ); 156 | /4/multitoggle/6/6 f, 1.0 : controlchange( 1, 45, 127 ); 157 | /4/multitoggle/7/6 f, 0.0 : controlchange( 1, 46, 0 ); 158 | /4/multitoggle/7/6 f, 1.0 : controlchange( 1, 46, 127 ); 159 | /4/multitoggle/8/6 f, 0.0 : controlchange( 1, 47, 0 ); 160 | /4/multitoggle/8/6 f, 1.0 : controlchange( 1, 47, 127 ); 161 | /4/multitoggle/1/7 f, 0.0 : controlchange( 1, 48, 0 ); 162 | /4/multitoggle/1/7 f, 1.0 : controlchange( 1, 48, 127 ); 163 | /4/multitoggle/2/7 f, 0.0 : controlchange( 1, 49, 0 ); 164 | /4/multitoggle/2/7 f, 1.0 : controlchange( 1, 49, 127 ); 165 | /4/multitoggle/3/7 f, 0.0 : controlchange( 1, 50, 0 ); 166 | /4/multitoggle/3/7 f, 1.0 : controlchange( 1, 50, 127 ); 167 | /4/multitoggle/4/7 f, 0.0 : controlchange( 1, 51, 0 ); 168 | /4/multitoggle/4/7 f, 1.0 : controlchange( 1, 51, 127 ); 169 | /4/multitoggle/5/7 f, 0.0 : controlchange( 1, 52, 0 ); 170 | /4/multitoggle/5/7 f, 1.0 : controlchange( 1, 52, 127 ); 171 | /4/multitoggle/6/7 f, 0.0 : controlchange( 1, 53, 0 ); 172 | /4/multitoggle/6/7 f, 1.0 : controlchange( 1, 53, 127 ); 173 | /4/multitoggle/7/7 f, 0.0 : controlchange( 1, 54, 0 ); 174 | /4/multitoggle/7/7 f, 1.0 : controlchange( 1, 54, 127 ); 175 | /4/multitoggle/8/7 f, 0.0 : controlchange( 1, 55, 0 ); 176 | /4/multitoggle/8/7 f, 1.0 : controlchange( 1, 55, 127 ); 177 | /4/multitoggle/1/8 f, 0.0 : controlchange( 1, 56, 0 ); 178 | /4/multitoggle/1/8 f, 1.0 : controlchange( 1, 56, 127 ); 179 | /4/multitoggle/2/8 f, 0.0 : controlchange( 1, 57, 0 ); 180 | /4/multitoggle/2/8 f, 1.0 : controlchange( 1, 57, 127 ); 181 | /4/multitoggle/3/8 f, 0.0 : controlchange( 1, 58, 0 ); 182 | /4/multitoggle/3/8 f, 1.0 : controlchange( 1, 58, 127 ); 183 | /4/multitoggle/4/8 f, 0.0 : controlchange( 1, 59, 0 ); 184 | /4/multitoggle/4/8 f, 1.0 : controlchange( 1, 59, 127 ); 185 | /4/multitoggle/5/8 f, 0.0 : controlchange( 1, 60, 0 ); 186 | /4/multitoggle/5/8 f, 1.0 : controlchange( 1, 60, 127 ); 187 | /4/multitoggle/6/8 f, 0.0 : controlchange( 1, 61, 0 ); 188 | /4/multitoggle/6/8 f, 1.0 : controlchange( 1, 61, 127 ); 189 | /4/multitoggle/7/8 f, 0.0 : controlchange( 1, 62, 0 ); 190 | /4/multitoggle/7/8 f, 1.0 : controlchange( 1, 62, 127 ); 191 | /4/multitoggle/8/8 f, 0.0 : controlchange( 1, 63, 0 ); 192 | /4/multitoggle/8/8 f, 1.0 : controlchange( 1, 63, 127 ); 193 | /4/toggle1 f, 0.0 : controlchange( 0, 19, 0 ); 194 | /4/toggle1 f, 1.0 : controlchange( 0, 19, 127 ); 195 | /4/toggle2 f, 0.0 : controlchange( 0, 20, 0 ); 196 | /4/toggle2 f, 1.0 : controlchange( 0, 20, 127 ); 197 | /4/toggle3 f, 0.0 : controlchange( 0, 21, 0 ); 198 | /4/toggle3 f, 1.0 : controlchange( 0, 21, 127 ); 199 | /4/toggle4 f, 0.0 : controlchange( 0, 22, 0 ); 200 | /4/toggle4 f, 1.0 : controlchange( 0, 22, 127 ); 201 | -------------------------------------------------------------------------------- /maps/touchosc/ViZPad.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from ViZPad.touchosc Fri Jun 26 23:42:14 2015 2 | /fx/m/fx f, -1.0 : controlchange( 0, 32, 127 ); 3 | /fx/m/fx f, 15.0 : controlchange( 0, 32, 15 ); 4 | /fx/m/fx f, 16.0 : controlchange( 0, 32, 16 ); 5 | /fx/m/fx f, 17.0 : controlchange( 0, 32, 17 ); 6 | /fx/m/fx f, 14.0 : controlchange( 0, 32, 14 ); 7 | /fx/m/fx f, 13.0 : controlchange( 0, 32, 13 ); 8 | /fx/m/fx f, 12.0 : controlchange( 0, 32, 12 ); 9 | /fx/m/fx f, 9.0 : controlchange( 0, 32, 9 ); 10 | /fx/m/fx f, 10.0 : controlchange( 0, 32, 10 ); 11 | /fx/m/fx f, 11.0 : controlchange( 0, 32, 11 ); 12 | /fx/m/fx f, 8.0 : controlchange( 0, 32, 8 ); 13 | /fx/m/fx f, 7.0 : controlchange( 0, 32, 7 ); 14 | /fx/m/fx f, 6.0 : controlchange( 0, 32, 6 ); 15 | /fx/m/fx f, 3.0 : controlchange( 0, 32, 3 ); 16 | /fx/m/fx f, 4.0 : controlchange( 0, 32, 4 ); 17 | /fx/m/fx f, 5.0 : controlchange( 0, 32, 5 ); 18 | /fx/m/fx f, 2.0 : controlchange( 0, 32, 2 ); 19 | /fx/m/fx f, 1.0 : controlchange( 0, 32, 1 ); 20 | /fx/m/fx f, 0.0 : controlchange( 0, 32, 0 ); 21 | /fx/b/fx f, -1.0 : controlchange( 0, 26, 127 ); 22 | /fx/b/fx f, 15.0 : controlchange( 0, 26, 15 ); 23 | /fx/b/fx f, 16.0 : controlchange( 0, 26, 16 ); 24 | /fx/b/fx f, 17.0 : controlchange( 0, 26, 17 ); 25 | /fx/b/fx f, 14.0 : controlchange( 0, 26, 14 ); 26 | /fx/b/fx f, 13.0 : controlchange( 0, 26, 13 ); 27 | /fx/b/fx f, 12.0 : controlchange( 0, 26, 12 ); 28 | /fx/b/fx f, 9.0 : controlchange( 0, 26, 9 ); 29 | /fx/b/fx f, 10.0 : controlchange( 0, 26, 10 ); 30 | /fx/b/fx f, 11.0 : controlchange( 0, 26, 11 ); 31 | /fx/b/fx f, 8.0 : controlchange( 0, 26, 8 ); 32 | /fx/b/fx f, 7.0 : controlchange( 0, 26, 7 ); 33 | /fx/b/fx f, 6.0 : controlchange( 0, 26, 6 ); 34 | /fx/b/fx f, 3.0 : controlchange( 0, 26, 3 ); 35 | /fx/b/fx f, 4.0 : controlchange( 0, 26, 4 ); 36 | /fx/b/fx f, 5.0 : controlchange( 0, 26, 5 ); 37 | /fx/b/fx f, 2.0 : controlchange( 0, 26, 2 ); 38 | /fx/b/fx f, 1.0 : controlchange( 0, 26, 1 ); 39 | /fx/b/fx f, 0.0 : controlchange( 0, 26, 0 ); 40 | /channel/active f, -1.0 : controlchange( 0, 0, 127 ); 41 | /channel/active f, 1.0 : controlchange( 0, 0, 1 ); 42 | /channel/active f, 0.0 : controlchange( 0, 0, 0 ); 43 | /fx/a/fx f, -1.0 : controlchange( 0, 20, 127 ); 44 | /fx/a/fx f, 15.0 : controlchange( 0, 20, 15 ); 45 | /fx/a/fx f, 16.0 : controlchange( 0, 20, 16 ); 46 | /fx/a/fx f, 17.0 : controlchange( 0, 20, 17 ); 47 | /fx/a/fx f, 14.0 : controlchange( 0, 20, 14 ); 48 | /fx/a/fx f, 13.0 : controlchange( 0, 20, 13 ); 49 | /fx/a/fx f, 12.0 : controlchange( 0, 20, 12 ); 50 | /fx/a/fx f, 9.0 : controlchange( 0, 20, 9 ); 51 | /fx/a/fx f, 10.0 : controlchange( 0, 20, 10 ); 52 | /fx/a/fx f, 11.0 : controlchange( 0, 20, 11 ); 53 | /fx/a/fx f, 8.0 : controlchange( 0, 20, 8 ); 54 | /fx/a/fx f, 7.0 : controlchange( 0, 20, 7 ); 55 | /fx/a/fx f, 6.0 : controlchange( 0, 20, 6 ); 56 | /fx/a/fx f, 3.0 : controlchange( 0, 20, 3 ); 57 | /fx/a/fx f, 4.0 : controlchange( 0, 20, 4 ); 58 | /fx/a/fx f, 5.0 : controlchange( 0, 20, 5 ); 59 | /fx/a/fx f, 2.0 : controlchange( 0, 20, 2 ); 60 | /fx/a/fx f, 1.0 : controlchange( 0, 20, 1 ); 61 | /fx/a/fx f, 0.0 : controlchange( 0, 20, 0 ); 62 | /channel/1/speed f, val : controlchange( 0, 11, 127*val ); 63 | /master/mix f, val : controlchange( 0, 40, 127*val ); 64 | /master/red f, val : controlchange( 0, 42, 127*val ); 65 | /master/green f, val : controlchange( 0, 43, 127*val ); 66 | /master/blue f, val : controlchange( 0, 44, 127*val ); 67 | /channel/1/position f, val : controlchange( 0, 12, 127*val ); 68 | /fx/a/param/0 f, val : controlchange( 0, 22, 127*val ); 69 | /fx/a/param/2 f, val : controlchange( 0, 24, 127*val ); 70 | /fx/a/param/1 f, val : controlchange( 0, 23, 127*val ); 71 | /fx/a/param/3 f, val : controlchange( 0, 25, 127*val ); 72 | /fx/a/mix f, val : controlchange( 0, 21, 127*val ); 73 | /master/level f, val : controlchange( 0, 41, 127*val ); 74 | /channel/0/position f, val : controlchange( 0, 8, 127*val ); 75 | /channel/0/speed f, val : controlchange( 0, 7, 127*val ); 76 | /fx/b/param/0 f, val : controlchange( 0, 28, 127*val ); 77 | /fx/b/param/2 f, val : controlchange( 0, 30, 127*val ); 78 | /fx/b/param/1 f, val : controlchange( 0, 29, 127*val ); 79 | /fx/b/param/3 f, val : controlchange( 0, 31, 127*val ); 80 | /fx/b/mix f, val : controlchange( 0, 27, 127*val ); 81 | /fx/m/param/0 f, val : controlchange( 0, 34, 127*val ); 82 | /fx/m/param/2 f, val : controlchange( 0, 36, 127*val ); 83 | /fx/m/param/1 f, val : controlchange( 0, 35, 127*val ); 84 | /fx/m/param/3 f, val : controlchange( 0, 37, 127*val ); 85 | /fx/m/mix f, val : controlchange( 0, 33, 127*val ); 86 | /channel/0/clip f, -1.0 : controlchange( 0, 5, 127 ); 87 | /channel/0/clip f, 0.0 : controlchange( 0, 5, 0 ); 88 | /channel/0/clip f, 1.0 : controlchange( 0, 5, 1 ); 89 | /channel/0/clip f, 2.0 : controlchange( 0, 5, 2 ); 90 | /channel/0/clip f, 3.0 : controlchange( 0, 5, 3 ); 91 | /channel/0/clip f, 4.0 : controlchange( 0, 5, 4 ); 92 | /channel/0/clip f, 5.0 : controlchange( 0, 5, 5 ); 93 | /channel/0/clip f, 6.0 : controlchange( 0, 5, 6 ); 94 | /channel/0/clip f, 7.0 : controlchange( 0, 5, 7 ); 95 | /channel/0/clip f, 8.0 : controlchange( 0, 5, 8 ); 96 | /channel/0/clip f, 9.0 : controlchange( 0, 5, 9 ); 97 | /channel/0/clip f, 10.0 : controlchange( 0, 5, 10 ); 98 | /channel/0/clip f, 11.0 : controlchange( 0, 5, 11 ); 99 | /channel/0/clip f, 12.0 : controlchange( 0, 5, 12 ); 100 | /channel/0/clip f, 13.0 : controlchange( 0, 5, 13 ); 101 | /channel/0/clip f, 14.0 : controlchange( 0, 5, 14 ); 102 | /channel/0/clip f, 15.0 : controlchange( 0, 5, 15 ); 103 | /channel/0/clip f, 16.0 : controlchange( 0, 5, 16 ); 104 | /channel/0/clip f, 17.0 : controlchange( 0, 5, 17 ); 105 | /channel/0/clip f, 18.0 : controlchange( 0, 5, 18 ); 106 | /channel/0/clip f, 19.0 : controlchange( 0, 5, 19 ); 107 | /channel/0/clip f, 20.0 : controlchange( 0, 5, 20 ); 108 | /channel/0/clip f, 21.0 : controlchange( 0, 5, 21 ); 109 | /channel/0/clip f, 22.0 : controlchange( 0, 5, 22 ); 110 | /channel/0/clip f, 23.0 : controlchange( 0, 5, 23 ); 111 | /channel/0/clip f, 24.0 : controlchange( 0, 5, 24 ); 112 | /channel/0/clip f, 25.0 : controlchange( 0, 5, 25 ); 113 | /channel/0/clip f, 26.0 : controlchange( 0, 5, 26 ); 114 | /channel/0/clip f, 27.0 : controlchange( 0, 5, 27 ); 115 | /channel/0/clip f, 28.0 : controlchange( 0, 5, 28 ); 116 | /channel/0/clip f, 29.0 : controlchange( 0, 5, 29 ); 117 | /channel/0/clip f, 30.0 : controlchange( 0, 5, 30 ); 118 | /channel/0/clip f, 31.0 : controlchange( 0, 5, 31 ); 119 | /channel/0/clip f, 32.0 : controlchange( 0, 5, 32 ); 120 | /channel/0/clip f, 33.0 : controlchange( 0, 5, 33 ); 121 | /channel/0/clip f, 34.0 : controlchange( 0, 5, 34 ); 122 | /channel/0/clip f, 35.0 : controlchange( 0, 5, 35 ); 123 | /channel/0/clip f, 36.0 : controlchange( 0, 5, 36 ); 124 | /channel/0/clip f, 37.0 : controlchange( 0, 5, 37 ); 125 | /channel/0/clip f, 38.0 : controlchange( 0, 5, 38 ); 126 | /channel/0/clip f, 39.0 : controlchange( 0, 5, 39 ); 127 | /channel/0/clip f, 40.0 : controlchange( 0, 5, 40 ); 128 | /channel/0/clip f, 41.0 : controlchange( 0, 5, 41 ); 129 | /channel/0/clip f, 42.0 : controlchange( 0, 5, 42 ); 130 | /channel/0/clip f, 43.0 : controlchange( 0, 5, 43 ); 131 | /channel/0/clip f, 44.0 : controlchange( 0, 5, 44 ); 132 | /channel/0/clip f, 45.0 : controlchange( 0, 5, 45 ); 133 | /channel/0/clip f, 46.0 : controlchange( 0, 5, 46 ); 134 | /channel/0/clip f, 47.0 : controlchange( 0, 5, 47 ); 135 | /channel/0/clip f, 48.0 : controlchange( 0, 5, 48 ); 136 | /channel/0/clip f, 49.0 : controlchange( 0, 5, 49 ); 137 | /channel/0/clip f, 50.0 : controlchange( 0, 5, 50 ); 138 | /channel/0/clip f, 51.0 : controlchange( 0, 5, 51 ); 139 | /channel/0/clip f, 52.0 : controlchange( 0, 5, 52 ); 140 | /channel/0/clip f, 53.0 : controlchange( 0, 5, 53 ); 141 | /channel/0/clip f, 54.0 : controlchange( 0, 5, 54 ); 142 | /channel/0/clip f, 55.0 : controlchange( 0, 5, 55 ); 143 | /channel/0/clip f, 56.0 : controlchange( 0, 5, 56 ); 144 | /channel/0/clip f, 57.0 : controlchange( 0, 5, 57 ); 145 | /channel/0/clip f, 58.0 : controlchange( 0, 5, 58 ); 146 | /channel/0/clip f, 59.0 : controlchange( 0, 5, 59 ); 147 | /channel/0/clip f, 60.0 : controlchange( 0, 5, 60 ); 148 | /channel/0/clip f, 61.0 : controlchange( 0, 5, 61 ); 149 | /channel/0/clip f, 62.0 : controlchange( 0, 5, 62 ); 150 | /channel/0/clip f, 63.0 : controlchange( 0, 5, 63 ); 151 | /channel/0/clip f, 64.0 : controlchange( 0, 5, 64 ); 152 | /channel/0/clip f, 65.0 : controlchange( 0, 5, 65 ); 153 | /channel/0/clip f, 66.0 : controlchange( 0, 5, 66 ); 154 | /channel/0/clip f, 67.0 : controlchange( 0, 5, 67 ); 155 | /channel/0/clip f, 68.0 : controlchange( 0, 5, 68 ); 156 | /channel/0/clip f, 69.0 : controlchange( 0, 5, 69 ); 157 | /channel/0/clip f, 70.0 : controlchange( 0, 5, 70 ); 158 | /channel/0/clip f, 71.0 : controlchange( 0, 5, 71 ); 159 | /channel/0/clip f, 72.0 : controlchange( 0, 5, 72 ); 160 | /channel/0/clip f, 73.0 : controlchange( 0, 5, 73 ); 161 | /channel/0/clip f, 74.0 : controlchange( 0, 5, 74 ); 162 | /channel/0/clip f, 75.0 : controlchange( 0, 5, 75 ); 163 | /channel/0/clip f, 76.0 : controlchange( 0, 5, 76 ); 164 | /channel/0/clip f, 77.0 : controlchange( 0, 5, 77 ); 165 | /channel/0/clip f, 78.0 : controlchange( 0, 5, 78 ); 166 | /channel/0/clip f, 79.0 : controlchange( 0, 5, 79 ); 167 | /channel/0/clip f, 80.0 : controlchange( 0, 5, 80 ); 168 | /channel/0/clip f, 81.0 : controlchange( 0, 5, 81 ); 169 | /channel/0/clip f, 82.0 : controlchange( 0, 5, 82 ); 170 | /channel/0/clip f, 83.0 : controlchange( 0, 5, 83 ); 171 | /channel/0/clip f, 84.0 : controlchange( 0, 5, 84 ); 172 | /channel/0/clip f, 85.0 : controlchange( 0, 5, 85 ); 173 | /channel/0/clip f, 86.0 : controlchange( 0, 5, 86 ); 174 | /channel/0/clip f, 87.0 : controlchange( 0, 5, 87 ); 175 | /channel/0/clip f, 88.0 : controlchange( 0, 5, 88 ); 176 | /channel/0/clip f, 89.0 : controlchange( 0, 5, 89 ); 177 | /channel/0/clip f, 90.0 : controlchange( 0, 5, 90 ); 178 | /channel/0/clip f, 91.0 : controlchange( 0, 5, 91 ); 179 | /channel/0/clip f, 92.0 : controlchange( 0, 5, 92 ); 180 | /channel/0/clip f, 93.0 : controlchange( 0, 5, 93 ); 181 | /channel/0/clip f, 94.0 : controlchange( 0, 5, 94 ); 182 | /channel/0/clip f, 95.0 : controlchange( 0, 5, 95 ); 183 | /channel/0/clip f, 96.0 : controlchange( 0, 5, 96 ); 184 | /channel/0/clip f, 97.0 : controlchange( 0, 5, 97 ); 185 | /channel/0/clip f, 98.0 : controlchange( 0, 5, 98 ); 186 | /channel/0/clip f, 99.0 : controlchange( 0, 5, 99 ); 187 | /channel/0/clip f, 100.0 : controlchange( 0, 5, 100 ); 188 | /channel/0/clip f, 101.0 : controlchange( 0, 5, 101 ); 189 | /channel/0/clip f, 102.0 : controlchange( 0, 5, 102 ); 190 | /channel/0/clip f, 103.0 : controlchange( 0, 5, 103 ); 191 | /channel/0/clip f, 104.0 : controlchange( 0, 5, 104 ); 192 | /channel/0/clip f, 105.0 : controlchange( 0, 5, 105 ); 193 | /channel/0/clip f, 106.0 : controlchange( 0, 5, 106 ); 194 | /channel/0/clip f, 107.0 : controlchange( 0, 5, 107 ); 195 | /channel/0/clip f, 108.0 : controlchange( 0, 5, 108 ); 196 | /channel/0/clip f, 109.0 : controlchange( 0, 5, 109 ); 197 | /channel/0/clip f, 110.0 : controlchange( 0, 5, 110 ); 198 | /channel/0/clip f, 111.0 : controlchange( 0, 5, 111 ); 199 | /channel/0/clip f, 112.0 : controlchange( 0, 5, 112 ); 200 | /channel/0/clip f, 113.0 : controlchange( 0, 5, 113 ); 201 | /channel/0/clip f, 114.0 : controlchange( 0, 5, 114 ); 202 | /channel/0/clip f, 115.0 : controlchange( 0, 5, 115 ); 203 | /channel/0/clip f, 116.0 : controlchange( 0, 5, 116 ); 204 | /channel/0/clip f, 117.0 : controlchange( 0, 5, 117 ); 205 | /channel/0/clip f, 118.0 : controlchange( 0, 5, 118 ); 206 | /channel/0/clip f, 119.0 : controlchange( 0, 5, 119 ); 207 | /channel/0/clip f, 120.0 : controlchange( 0, 5, 120 ); 208 | /channel/0/clip f, 121.0 : controlchange( 0, 5, 121 ); 209 | /channel/0/clip f, 122.0 : controlchange( 0, 5, 122 ); 210 | /channel/0/clip f, 123.0 : controlchange( 0, 5, 123 ); 211 | /channel/0/clip f, 124.0 : controlchange( 0, 5, 124 ); 212 | /channel/1/clip f, -1.0 : controlchange( 0, 9, 127 ); 213 | /channel/1/clip f, 0.0 : controlchange( 0, 9, 0 ); 214 | /channel/1/clip f, 1.0 : controlchange( 0, 9, 1 ); 215 | /channel/1/clip f, 2.0 : controlchange( 0, 9, 2 ); 216 | /channel/1/clip f, 3.0 : controlchange( 0, 9, 3 ); 217 | /channel/1/clip f, 4.0 : controlchange( 0, 9, 4 ); 218 | /channel/1/clip f, 5.0 : controlchange( 0, 9, 5 ); 219 | /channel/1/clip f, 6.0 : controlchange( 0, 9, 6 ); 220 | /channel/1/clip f, 7.0 : controlchange( 0, 9, 7 ); 221 | /channel/1/clip f, 8.0 : controlchange( 0, 9, 8 ); 222 | /channel/1/clip f, 9.0 : controlchange( 0, 9, 9 ); 223 | /channel/1/clip f, 10.0 : controlchange( 0, 9, 10 ); 224 | /channel/1/clip f, 11.0 : controlchange( 0, 9, 11 ); 225 | /channel/1/clip f, 12.0 : controlchange( 0, 9, 12 ); 226 | /channel/1/clip f, 13.0 : controlchange( 0, 9, 13 ); 227 | /channel/1/clip f, 14.0 : controlchange( 0, 9, 14 ); 228 | /channel/1/clip f, 15.0 : controlchange( 0, 9, 15 ); 229 | /channel/1/clip f, 16.0 : controlchange( 0, 9, 16 ); 230 | /channel/1/clip f, 17.0 : controlchange( 0, 9, 17 ); 231 | /channel/1/clip f, 18.0 : controlchange( 0, 9, 18 ); 232 | /channel/1/clip f, 19.0 : controlchange( 0, 9, 19 ); 233 | /channel/1/clip f, 20.0 : controlchange( 0, 9, 20 ); 234 | /channel/1/clip f, 21.0 : controlchange( 0, 9, 21 ); 235 | /channel/1/clip f, 22.0 : controlchange( 0, 9, 22 ); 236 | /channel/1/clip f, 23.0 : controlchange( 0, 9, 23 ); 237 | /channel/1/clip f, 24.0 : controlchange( 0, 9, 24 ); 238 | /channel/1/clip f, 25.0 : controlchange( 0, 9, 25 ); 239 | /channel/1/clip f, 26.0 : controlchange( 0, 9, 26 ); 240 | /channel/1/clip f, 27.0 : controlchange( 0, 9, 27 ); 241 | /channel/1/clip f, 28.0 : controlchange( 0, 9, 28 ); 242 | /channel/1/clip f, 29.0 : controlchange( 0, 9, 29 ); 243 | /channel/1/clip f, 30.0 : controlchange( 0, 9, 30 ); 244 | /channel/1/clip f, 31.0 : controlchange( 0, 9, 31 ); 245 | /channel/1/clip f, 32.0 : controlchange( 0, 9, 32 ); 246 | /channel/1/clip f, 33.0 : controlchange( 0, 9, 33 ); 247 | /channel/1/clip f, 34.0 : controlchange( 0, 9, 34 ); 248 | /channel/1/clip f, 35.0 : controlchange( 0, 9, 35 ); 249 | /channel/1/clip f, 36.0 : controlchange( 0, 9, 36 ); 250 | /channel/1/clip f, 37.0 : controlchange( 0, 9, 37 ); 251 | /channel/1/clip f, 38.0 : controlchange( 0, 9, 38 ); 252 | /channel/1/clip f, 39.0 : controlchange( 0, 9, 39 ); 253 | /channel/1/clip f, 40.0 : controlchange( 0, 9, 40 ); 254 | /channel/1/clip f, 41.0 : controlchange( 0, 9, 41 ); 255 | /channel/1/clip f, 42.0 : controlchange( 0, 9, 42 ); 256 | /channel/1/clip f, 43.0 : controlchange( 0, 9, 43 ); 257 | /channel/1/clip f, 44.0 : controlchange( 0, 9, 44 ); 258 | /channel/1/clip f, 45.0 : controlchange( 0, 9, 45 ); 259 | /channel/1/clip f, 46.0 : controlchange( 0, 9, 46 ); 260 | /channel/1/clip f, 47.0 : controlchange( 0, 9, 47 ); 261 | /channel/1/clip f, 48.0 : controlchange( 0, 9, 48 ); 262 | /channel/1/clip f, 49.0 : controlchange( 0, 9, 49 ); 263 | /channel/1/clip f, 50.0 : controlchange( 0, 9, 50 ); 264 | /channel/1/clip f, 51.0 : controlchange( 0, 9, 51 ); 265 | /channel/1/clip f, 52.0 : controlchange( 0, 9, 52 ); 266 | /channel/1/clip f, 53.0 : controlchange( 0, 9, 53 ); 267 | /channel/1/clip f, 54.0 : controlchange( 0, 9, 54 ); 268 | /channel/1/clip f, 55.0 : controlchange( 0, 9, 55 ); 269 | /channel/1/clip f, 56.0 : controlchange( 0, 9, 56 ); 270 | /channel/1/clip f, 57.0 : controlchange( 0, 9, 57 ); 271 | /channel/1/clip f, 58.0 : controlchange( 0, 9, 58 ); 272 | /channel/1/clip f, 59.0 : controlchange( 0, 9, 59 ); 273 | /channel/1/clip f, 60.0 : controlchange( 0, 9, 60 ); 274 | /channel/1/clip f, 61.0 : controlchange( 0, 9, 61 ); 275 | /channel/1/clip f, 62.0 : controlchange( 0, 9, 62 ); 276 | /channel/1/clip f, 63.0 : controlchange( 0, 9, 63 ); 277 | /channel/1/clip f, 64.0 : controlchange( 0, 9, 64 ); 278 | /channel/1/clip f, 65.0 : controlchange( 0, 9, 65 ); 279 | /channel/1/clip f, 66.0 : controlchange( 0, 9, 66 ); 280 | /channel/1/clip f, 67.0 : controlchange( 0, 9, 67 ); 281 | /channel/1/clip f, 68.0 : controlchange( 0, 9, 68 ); 282 | /channel/1/clip f, 69.0 : controlchange( 0, 9, 69 ); 283 | /channel/1/clip f, 70.0 : controlchange( 0, 9, 70 ); 284 | /channel/1/clip f, 71.0 : controlchange( 0, 9, 71 ); 285 | /channel/1/clip f, 72.0 : controlchange( 0, 9, 72 ); 286 | /channel/1/clip f, 73.0 : controlchange( 0, 9, 73 ); 287 | /channel/1/clip f, 74.0 : controlchange( 0, 9, 74 ); 288 | /channel/1/clip f, 75.0 : controlchange( 0, 9, 75 ); 289 | /channel/1/clip f, 76.0 : controlchange( 0, 9, 76 ); 290 | /channel/1/clip f, 77.0 : controlchange( 0, 9, 77 ); 291 | /channel/1/clip f, 78.0 : controlchange( 0, 9, 78 ); 292 | /channel/1/clip f, 79.0 : controlchange( 0, 9, 79 ); 293 | /channel/1/clip f, 80.0 : controlchange( 0, 9, 80 ); 294 | /channel/1/clip f, 81.0 : controlchange( 0, 9, 81 ); 295 | /channel/1/clip f, 82.0 : controlchange( 0, 9, 82 ); 296 | /channel/1/clip f, 83.0 : controlchange( 0, 9, 83 ); 297 | /channel/1/clip f, 84.0 : controlchange( 0, 9, 84 ); 298 | /channel/1/clip f, 85.0 : controlchange( 0, 9, 85 ); 299 | /channel/1/clip f, 86.0 : controlchange( 0, 9, 86 ); 300 | /channel/1/clip f, 87.0 : controlchange( 0, 9, 87 ); 301 | /channel/1/clip f, 88.0 : controlchange( 0, 9, 88 ); 302 | /channel/1/clip f, 89.0 : controlchange( 0, 9, 89 ); 303 | /channel/1/clip f, 90.0 : controlchange( 0, 9, 90 ); 304 | /channel/1/clip f, 91.0 : controlchange( 0, 9, 91 ); 305 | /channel/1/clip f, 92.0 : controlchange( 0, 9, 92 ); 306 | /channel/1/clip f, 93.0 : controlchange( 0, 9, 93 ); 307 | /channel/1/clip f, 94.0 : controlchange( 0, 9, 94 ); 308 | /channel/1/clip f, 95.0 : controlchange( 0, 9, 95 ); 309 | /channel/1/clip f, 96.0 : controlchange( 0, 9, 96 ); 310 | /channel/1/clip f, 97.0 : controlchange( 0, 9, 97 ); 311 | /channel/1/clip f, 98.0 : controlchange( 0, 9, 98 ); 312 | /channel/1/clip f, 99.0 : controlchange( 0, 9, 99 ); 313 | /channel/1/clip f, 100.0 : controlchange( 0, 9, 100 ); 314 | /channel/1/clip f, 101.0 : controlchange( 0, 9, 101 ); 315 | /channel/1/clip f, 102.0 : controlchange( 0, 9, 102 ); 316 | /channel/1/clip f, 103.0 : controlchange( 0, 9, 103 ); 317 | /channel/1/clip f, 104.0 : controlchange( 0, 9, 104 ); 318 | /channel/1/clip f, 105.0 : controlchange( 0, 9, 105 ); 319 | /channel/1/clip f, 106.0 : controlchange( 0, 9, 106 ); 320 | /channel/1/clip f, 107.0 : controlchange( 0, 9, 107 ); 321 | /channel/1/clip f, 108.0 : controlchange( 0, 9, 108 ); 322 | /channel/1/clip f, 109.0 : controlchange( 0, 9, 109 ); 323 | /channel/1/clip f, 110.0 : controlchange( 0, 9, 110 ); 324 | /channel/1/clip f, 111.0 : controlchange( 0, 9, 111 ); 325 | /channel/1/clip f, 112.0 : controlchange( 0, 9, 112 ); 326 | /channel/1/clip f, 113.0 : controlchange( 0, 9, 113 ); 327 | /channel/1/clip f, 114.0 : controlchange( 0, 9, 114 ); 328 | /channel/1/clip f, 115.0 : controlchange( 0, 9, 115 ); 329 | /channel/1/clip f, 116.0 : controlchange( 0, 9, 116 ); 330 | /channel/1/clip f, 117.0 : controlchange( 0, 9, 117 ); 331 | /channel/1/clip f, 118.0 : controlchange( 0, 9, 118 ); 332 | /channel/1/clip f, 119.0 : controlchange( 0, 9, 119 ); 333 | /channel/1/clip f, 120.0 : controlchange( 0, 9, 120 ); 334 | /channel/1/clip f, 121.0 : controlchange( 0, 9, 121 ); 335 | /channel/1/clip f, 122.0 : controlchange( 0, 9, 122 ); 336 | /channel/1/clip f, 123.0 : controlchange( 0, 9, 123 ); 337 | /channel/1/clip f, 124.0 : controlchange( 0, 9, 124 ); 338 | -------------------------------------------------------------------------------- /maps/touchosc/ViZPod.omm: -------------------------------------------------------------------------------- 1 | # to2omm: generated from ViZPod.touchosc Fri Jun 26 23:42:15 2015 2 | /master/mix f, val : controlchange( 0, 40, 127*val ); 3 | /master/red f, val : controlchange( 0, 42, 127*val ); 4 | /master/green f, val : controlchange( 0, 43, 127*val ); 5 | /master/blue f, val : controlchange( 0, 44, 127*val ); 6 | /master/level f, val : controlchange( 0, 41, 127*val ); 7 | /fx/a/fx f, -1.0 : controlchange( 0, 20, 127 ); 8 | /fx/a/fx f, 15.0 : controlchange( 0, 20, 15 ); 9 | /fx/a/fx f, 16.0 : controlchange( 0, 20, 16 ); 10 | /fx/a/fx f, 17.0 : controlchange( 0, 20, 17 ); 11 | /fx/a/fx f, 14.0 : controlchange( 0, 20, 14 ); 12 | /fx/a/fx f, 13.0 : controlchange( 0, 20, 13 ); 13 | /fx/a/fx f, 12.0 : controlchange( 0, 20, 12 ); 14 | /fx/a/fx f, 9.0 : controlchange( 0, 20, 9 ); 15 | /fx/a/fx f, 10.0 : controlchange( 0, 20, 10 ); 16 | /fx/a/fx f, 11.0 : controlchange( 0, 20, 11 ); 17 | /fx/a/fx f, 8.0 : controlchange( 0, 20, 8 ); 18 | /fx/a/fx f, 7.0 : controlchange( 0, 20, 7 ); 19 | /fx/a/fx f, 6.0 : controlchange( 0, 20, 6 ); 20 | /fx/a/fx f, 3.0 : controlchange( 0, 20, 3 ); 21 | /fx/a/fx f, 4.0 : controlchange( 0, 20, 4 ); 22 | /fx/a/fx f, 5.0 : controlchange( 0, 20, 5 ); 23 | /fx/a/fx f, 2.0 : controlchange( 0, 20, 2 ); 24 | /fx/a/fx f, 1.0 : controlchange( 0, 20, 1 ); 25 | /fx/a/fx f, 0.0 : controlchange( 0, 20, 0 ); 26 | /fx/a/mix f, val : controlchange( 0, 21, 127*val ); 27 | /fx/a/param/0 f, val : controlchange( 0, 22, 127*val ); 28 | /fx/a/param/3 f, val : controlchange( 0, 25, 127*val ); 29 | /fx/a/param/1 f, val : controlchange( 0, 23, 127*val ); 30 | /fx/a/param/2 f, val : controlchange( 0, 24, 127*val ); 31 | /fx/b/fx f, -1.0 : controlchange( 0, 26, 127 ); 32 | /fx/b/fx f, 15.0 : controlchange( 0, 26, 15 ); 33 | /fx/b/fx f, 16.0 : controlchange( 0, 26, 16 ); 34 | /fx/b/fx f, 17.0 : controlchange( 0, 26, 17 ); 35 | /fx/b/fx f, 14.0 : controlchange( 0, 26, 14 ); 36 | /fx/b/fx f, 13.0 : controlchange( 0, 26, 13 ); 37 | /fx/b/fx f, 12.0 : controlchange( 0, 26, 12 ); 38 | /fx/b/fx f, 9.0 : controlchange( 0, 26, 9 ); 39 | /fx/b/fx f, 10.0 : controlchange( 0, 26, 10 ); 40 | /fx/b/fx f, 11.0 : controlchange( 0, 26, 11 ); 41 | /fx/b/fx f, 8.0 : controlchange( 0, 26, 8 ); 42 | /fx/b/fx f, 7.0 : controlchange( 0, 26, 7 ); 43 | /fx/b/fx f, 6.0 : controlchange( 0, 26, 6 ); 44 | /fx/b/fx f, 3.0 : controlchange( 0, 26, 3 ); 45 | /fx/b/fx f, 4.0 : controlchange( 0, 26, 4 ); 46 | /fx/b/fx f, 5.0 : controlchange( 0, 26, 5 ); 47 | /fx/b/fx f, 2.0 : controlchange( 0, 26, 2 ); 48 | /fx/b/fx f, 1.0 : controlchange( 0, 26, 1 ); 49 | /fx/b/fx f, 0.0 : controlchange( 0, 26, 0 ); 50 | /fx/b/mix f, val : controlchange( 0, 27, 127*val ); 51 | /fx/b/param/0 f, val : controlchange( 0, 28, 127*val ); 52 | /fx/b/param/3 f, val : controlchange( 0, 31, 127*val ); 53 | /fx/b/param/1 f, val : controlchange( 0, 29, 127*val ); 54 | /fx/b/param/2 f, val : controlchange( 0, 30, 127*val ); 55 | /fx/m/fx f, -1.0 : controlchange( 0, 32, 127 ); 56 | /fx/m/fx f, 15.0 : controlchange( 0, 32, 15 ); 57 | /fx/m/fx f, 16.0 : controlchange( 0, 32, 16 ); 58 | /fx/m/fx f, 17.0 : controlchange( 0, 32, 17 ); 59 | /fx/m/fx f, 14.0 : controlchange( 0, 32, 14 ); 60 | /fx/m/fx f, 13.0 : controlchange( 0, 32, 13 ); 61 | /fx/m/fx f, 12.0 : controlchange( 0, 32, 12 ); 62 | /fx/m/fx f, 9.0 : controlchange( 0, 32, 9 ); 63 | /fx/m/fx f, 10.0 : controlchange( 0, 32, 10 ); 64 | /fx/m/fx f, 11.0 : controlchange( 0, 32, 11 ); 65 | /fx/m/fx f, 8.0 : controlchange( 0, 32, 8 ); 66 | /fx/m/fx f, 7.0 : controlchange( 0, 32, 7 ); 67 | /fx/m/fx f, 6.0 : controlchange( 0, 32, 6 ); 68 | /fx/m/fx f, 3.0 : controlchange( 0, 32, 3 ); 69 | /fx/m/fx f, 4.0 : controlchange( 0, 32, 4 ); 70 | /fx/m/fx f, 5.0 : controlchange( 0, 32, 5 ); 71 | /fx/m/fx f, 2.0 : controlchange( 0, 32, 2 ); 72 | /fx/m/fx f, 1.0 : controlchange( 0, 32, 1 ); 73 | /fx/m/fx f, 0.0 : controlchange( 0, 32, 0 ); 74 | /fx/m/mix f, val : controlchange( 0, 33, 127*val ); 75 | /fx/m/param/0 f, val : controlchange( 0, 34, 127*val ); 76 | /fx/m/param/3 f, val : controlchange( 0, 37, 127*val ); 77 | /fx/m/param/1 f, val : controlchange( 0, 35, 127*val ); 78 | /fx/m/param/2 f, val : controlchange( 0, 36, 127*val ); 79 | /channel/active f, -1.0 : controlchange( 0, 0, 127 ); 80 | /channel/active f, 1.0 : controlchange( 0, 0, 1 ); 81 | /channel/1/position f, val : controlchange( 0, 12, 127*val ); 82 | /channel/1/speed f, val : controlchange( 0, 11, 127*val ); 83 | /channel/active f, 0.0 : controlchange( 0, 0, 0 ); 84 | /channel/0/position f, val : controlchange( 0, 8, 127*val ); 85 | /channel/0/speed f, val : controlchange( 0, 7, 127*val ); 86 | /channel/0/clip f, -1.0 : controlchange( 0, 5, 127 ); 87 | /channel/0/clip f, 0.0 : controlchange( 0, 5, 0 ); 88 | /channel/0/clip f, 1.0 : controlchange( 0, 5, 1 ); 89 | /channel/0/clip f, 2.0 : controlchange( 0, 5, 2 ); 90 | /channel/0/clip f, 3.0 : controlchange( 0, 5, 3 ); 91 | /channel/0/clip f, 4.0 : controlchange( 0, 5, 4 ); 92 | /channel/0/clip f, 5.0 : controlchange( 0, 5, 5 ); 93 | /channel/0/clip f, 6.0 : controlchange( 0, 5, 6 ); 94 | /channel/0/clip f, 7.0 : controlchange( 0, 5, 7 ); 95 | /channel/0/clip f, 8.0 : controlchange( 0, 5, 8 ); 96 | /channel/0/clip f, 9.0 : controlchange( 0, 5, 9 ); 97 | /channel/0/clip f, 10.0 : controlchange( 0, 5, 10 ); 98 | /channel/0/clip f, 11.0 : controlchange( 0, 5, 11 ); 99 | /channel/0/clip f, 12.0 : controlchange( 0, 5, 12 ); 100 | /channel/0/clip f, 13.0 : controlchange( 0, 5, 13 ); 101 | /channel/0/clip f, 14.0 : controlchange( 0, 5, 14 ); 102 | /channel/0/clip f, 15.0 : controlchange( 0, 5, 15 ); 103 | /channel/0/clip f, 16.0 : controlchange( 0, 5, 16 ); 104 | /channel/0/clip f, 17.0 : controlchange( 0, 5, 17 ); 105 | /channel/0/clip f, 18.0 : controlchange( 0, 5, 18 ); 106 | /channel/0/clip f, 19.0 : controlchange( 0, 5, 19 ); 107 | /channel/0/clip f, 20.0 : controlchange( 0, 5, 20 ); 108 | /channel/0/clip f, 21.0 : controlchange( 0, 5, 21 ); 109 | /channel/0/clip f, 22.0 : controlchange( 0, 5, 22 ); 110 | /channel/0/clip f, 23.0 : controlchange( 0, 5, 23 ); 111 | /channel/0/clip f, 24.0 : controlchange( 0, 5, 24 ); 112 | /channel/1/clip f, -1.0 : controlchange( 0, 9, 127 ); 113 | /channel/1/clip f, 0.0 : controlchange( 0, 9, 0 ); 114 | /channel/1/clip f, 1.0 : controlchange( 0, 9, 1 ); 115 | /channel/1/clip f, 2.0 : controlchange( 0, 9, 2 ); 116 | /channel/1/clip f, 3.0 : controlchange( 0, 9, 3 ); 117 | /channel/1/clip f, 4.0 : controlchange( 0, 9, 4 ); 118 | /channel/1/clip f, 5.0 : controlchange( 0, 9, 5 ); 119 | /channel/1/clip f, 6.0 : controlchange( 0, 9, 6 ); 120 | /channel/1/clip f, 7.0 : controlchange( 0, 9, 7 ); 121 | /channel/1/clip f, 8.0 : controlchange( 0, 9, 8 ); 122 | /channel/1/clip f, 9.0 : controlchange( 0, 9, 9 ); 123 | /channel/1/clip f, 10.0 : controlchange( 0, 9, 10 ); 124 | /channel/1/clip f, 11.0 : controlchange( 0, 9, 11 ); 125 | /channel/1/clip f, 12.0 : controlchange( 0, 9, 12 ); 126 | /channel/1/clip f, 13.0 : controlchange( 0, 9, 13 ); 127 | /channel/1/clip f, 14.0 : controlchange( 0, 9, 14 ); 128 | /channel/1/clip f, 15.0 : controlchange( 0, 9, 15 ); 129 | /channel/1/clip f, 16.0 : controlchange( 0, 9, 16 ); 130 | /channel/1/clip f, 17.0 : controlchange( 0, 9, 17 ); 131 | /channel/1/clip f, 18.0 : controlchange( 0, 9, 18 ); 132 | /channel/1/clip f, 19.0 : controlchange( 0, 9, 19 ); 133 | /channel/1/clip f, 20.0 : controlchange( 0, 9, 20 ); 134 | /channel/1/clip f, 21.0 : controlchange( 0, 9, 21 ); 135 | /channel/1/clip f, 22.0 : controlchange( 0, 9, 22 ); 136 | /channel/1/clip f, 23.0 : controlchange( 0, 9, 23 ); 137 | /channel/1/clip f, 24.0 : controlchange( 0, 9, 24 ); 138 | /channel/0/clip f, 25.0 : controlchange( 0, 5, 25 ); 139 | /channel/0/clip f, 26.0 : controlchange( 0, 5, 26 ); 140 | /channel/0/clip f, 27.0 : controlchange( 0, 5, 27 ); 141 | /channel/0/clip f, 28.0 : controlchange( 0, 5, 28 ); 142 | /channel/0/clip f, 29.0 : controlchange( 0, 5, 29 ); 143 | /channel/0/clip f, 30.0 : controlchange( 0, 5, 30 ); 144 | /channel/0/clip f, 31.0 : controlchange( 0, 5, 31 ); 145 | /channel/0/clip f, 32.0 : controlchange( 0, 5, 32 ); 146 | /channel/0/clip f, 33.0 : controlchange( 0, 5, 33 ); 147 | /channel/0/clip f, 34.0 : controlchange( 0, 5, 34 ); 148 | /channel/0/clip f, 35.0 : controlchange( 0, 5, 35 ); 149 | /channel/0/clip f, 36.0 : controlchange( 0, 5, 36 ); 150 | /channel/0/clip f, 37.0 : controlchange( 0, 5, 37 ); 151 | /channel/0/clip f, 38.0 : controlchange( 0, 5, 38 ); 152 | /channel/0/clip f, 39.0 : controlchange( 0, 5, 39 ); 153 | /channel/0/clip f, 40.0 : controlchange( 0, 5, 40 ); 154 | /channel/0/clip f, 41.0 : controlchange( 0, 5, 41 ); 155 | /channel/0/clip f, 42.0 : controlchange( 0, 5, 42 ); 156 | /channel/0/clip f, 43.0 : controlchange( 0, 5, 43 ); 157 | /channel/0/clip f, 44.0 : controlchange( 0, 5, 44 ); 158 | /channel/0/clip f, 45.0 : controlchange( 0, 5, 45 ); 159 | /channel/0/clip f, 46.0 : controlchange( 0, 5, 46 ); 160 | /channel/0/clip f, 47.0 : controlchange( 0, 5, 47 ); 161 | /channel/0/clip f, 48.0 : controlchange( 0, 5, 48 ); 162 | /channel/0/clip f, 49.0 : controlchange( 0, 5, 49 ); 163 | /channel/1/clip f, 25.0 : controlchange( 0, 9, 25 ); 164 | /channel/1/clip f, 30.0 : controlchange( 0, 9, 30 ); 165 | /channel/1/clip f, 26.0 : controlchange( 0, 9, 26 ); 166 | /channel/1/clip f, 31.0 : controlchange( 0, 9, 31 ); 167 | /channel/1/clip f, 35.0 : controlchange( 0, 9, 35 ); 168 | /channel/1/clip f, 36.0 : controlchange( 0, 9, 36 ); 169 | /channel/1/clip f, 40.0 : controlchange( 0, 9, 40 ); 170 | /channel/1/clip f, 41.0 : controlchange( 0, 9, 41 ); 171 | /channel/1/clip f, 27.0 : controlchange( 0, 9, 27 ); 172 | /channel/1/clip f, 32.0 : controlchange( 0, 9, 32 ); 173 | /channel/1/clip f, 37.0 : controlchange( 0, 9, 37 ); 174 | /channel/1/clip f, 42.0 : controlchange( 0, 9, 42 ); 175 | /channel/1/clip f, 45.0 : controlchange( 0, 9, 45 ); 176 | /channel/1/clip f, 46.0 : controlchange( 0, 9, 46 ); 177 | /channel/1/clip f, 47.0 : controlchange( 0, 9, 47 ); 178 | /channel/1/clip f, 28.0 : controlchange( 0, 9, 28 ); 179 | /channel/1/clip f, 33.0 : controlchange( 0, 9, 33 ); 180 | /channel/1/clip f, 38.0 : controlchange( 0, 9, 38 ); 181 | /channel/1/clip f, 43.0 : controlchange( 0, 9, 43 ); 182 | /channel/1/clip f, 48.0 : controlchange( 0, 9, 48 ); 183 | /channel/1/clip f, 29.0 : controlchange( 0, 9, 29 ); 184 | /channel/1/clip f, 34.0 : controlchange( 0, 9, 34 ); 185 | /channel/1/clip f, 39.0 : controlchange( 0, 9, 39 ); 186 | /channel/1/clip f, 44.0 : controlchange( 0, 9, 44 ); 187 | /channel/1/clip f, 49.0 : controlchange( 0, 9, 49 ); 188 | /channel/0/clip f, 50.0 : controlchange( 0, 5, 50 ); 189 | /channel/0/clip f, 51.0 : controlchange( 0, 5, 51 ); 190 | /channel/0/clip f, 52.0 : controlchange( 0, 5, 52 ); 191 | /channel/0/clip f, 53.0 : controlchange( 0, 5, 53 ); 192 | /channel/0/clip f, 54.0 : controlchange( 0, 5, 54 ); 193 | /channel/0/clip f, 55.0 : controlchange( 0, 5, 55 ); 194 | /channel/0/clip f, 56.0 : controlchange( 0, 5, 56 ); 195 | /channel/0/clip f, 57.0 : controlchange( 0, 5, 57 ); 196 | /channel/0/clip f, 58.0 : controlchange( 0, 5, 58 ); 197 | /channel/0/clip f, 59.0 : controlchange( 0, 5, 59 ); 198 | /channel/0/clip f, 60.0 : controlchange( 0, 5, 60 ); 199 | /channel/0/clip f, 61.0 : controlchange( 0, 5, 61 ); 200 | /channel/0/clip f, 62.0 : controlchange( 0, 5, 62 ); 201 | /channel/0/clip f, 63.0 : controlchange( 0, 5, 63 ); 202 | /channel/0/clip f, 64.0 : controlchange( 0, 5, 64 ); 203 | /channel/0/clip f, 65.0 : controlchange( 0, 5, 65 ); 204 | /channel/0/clip f, 66.0 : controlchange( 0, 5, 66 ); 205 | /channel/0/clip f, 67.0 : controlchange( 0, 5, 67 ); 206 | /channel/0/clip f, 68.0 : controlchange( 0, 5, 68 ); 207 | /channel/0/clip f, 69.0 : controlchange( 0, 5, 69 ); 208 | /channel/0/clip f, 70.0 : controlchange( 0, 5, 70 ); 209 | /channel/0/clip f, 71.0 : controlchange( 0, 5, 71 ); 210 | /channel/0/clip f, 72.0 : controlchange( 0, 5, 72 ); 211 | /channel/0/clip f, 73.0 : controlchange( 0, 5, 73 ); 212 | /channel/0/clip f, 74.0 : controlchange( 0, 5, 74 ); 213 | /channel/1/clip f, 50.0 : controlchange( 0, 9, 50 ); 214 | /channel/1/clip f, 51.0 : controlchange( 0, 9, 51 ); 215 | /channel/1/clip f, 55.0 : controlchange( 0, 9, 55 ); 216 | /channel/1/clip f, 56.0 : controlchange( 0, 9, 56 ); 217 | /channel/1/clip f, 60.0 : controlchange( 0, 9, 60 ); 218 | /channel/1/clip f, 61.0 : controlchange( 0, 9, 61 ); 219 | /channel/1/clip f, 52.0 : controlchange( 0, 9, 52 ); 220 | /channel/1/clip f, 57.0 : controlchange( 0, 9, 57 ); 221 | /channel/1/clip f, 62.0 : controlchange( 0, 9, 62 ); 222 | /channel/1/clip f, 65.0 : controlchange( 0, 9, 65 ); 223 | /channel/1/clip f, 66.0 : controlchange( 0, 9, 66 ); 224 | /channel/1/clip f, 67.0 : controlchange( 0, 9, 67 ); 225 | /channel/1/clip f, 53.0 : controlchange( 0, 9, 53 ); 226 | /channel/1/clip f, 58.0 : controlchange( 0, 9, 58 ); 227 | /channel/1/clip f, 63.0 : controlchange( 0, 9, 63 ); 228 | /channel/1/clip f, 68.0 : controlchange( 0, 9, 68 ); 229 | /channel/1/clip f, 70.0 : controlchange( 0, 9, 70 ); 230 | /channel/1/clip f, 71.0 : controlchange( 0, 9, 71 ); 231 | /channel/1/clip f, 72.0 : controlchange( 0, 9, 72 ); 232 | /channel/1/clip f, 73.0 : controlchange( 0, 9, 73 ); 233 | /channel/1/clip f, 54.0 : controlchange( 0, 9, 54 ); 234 | /channel/1/clip f, 59.0 : controlchange( 0, 9, 59 ); 235 | /channel/1/clip f, 64.0 : controlchange( 0, 9, 64 ); 236 | /channel/1/clip f, 69.0 : controlchange( 0, 9, 69 ); 237 | /channel/1/clip f, 74.0 : controlchange( 0, 9, 74 ); 238 | /channel/0/clip f, 75.0 : controlchange( 0, 5, 75 ); 239 | /channel/0/clip f, 76.0 : controlchange( 0, 5, 76 ); 240 | /channel/0/clip f, 77.0 : controlchange( 0, 5, 77 ); 241 | /channel/0/clip f, 78.0 : controlchange( 0, 5, 78 ); 242 | /channel/0/clip f, 79.0 : controlchange( 0, 5, 79 ); 243 | /channel/0/clip f, 80.0 : controlchange( 0, 5, 80 ); 244 | /channel/0/clip f, 81.0 : controlchange( 0, 5, 81 ); 245 | /channel/0/clip f, 82.0 : controlchange( 0, 5, 82 ); 246 | /channel/0/clip f, 83.0 : controlchange( 0, 5, 83 ); 247 | /channel/0/clip f, 84.0 : controlchange( 0, 5, 84 ); 248 | /channel/0/clip f, 85.0 : controlchange( 0, 5, 85 ); 249 | /channel/0/clip f, 86.0 : controlchange( 0, 5, 86 ); 250 | /channel/0/clip f, 87.0 : controlchange( 0, 5, 87 ); 251 | /channel/0/clip f, 88.0 : controlchange( 0, 5, 88 ); 252 | /channel/0/clip f, 89.0 : controlchange( 0, 5, 89 ); 253 | /channel/0/clip f, 90.0 : controlchange( 0, 5, 90 ); 254 | /channel/0/clip f, 91.0 : controlchange( 0, 5, 91 ); 255 | /channel/0/clip f, 92.0 : controlchange( 0, 5, 92 ); 256 | /channel/0/clip f, 93.0 : controlchange( 0, 5, 93 ); 257 | /channel/0/clip f, 94.0 : controlchange( 0, 5, 94 ); 258 | /channel/0/clip f, 95.0 : controlchange( 0, 5, 95 ); 259 | /channel/0/clip f, 96.0 : controlchange( 0, 5, 96 ); 260 | /channel/0/clip f, 97.0 : controlchange( 0, 5, 97 ); 261 | /channel/0/clip f, 98.0 : controlchange( 0, 5, 98 ); 262 | /channel/0/clip f, 99.0 : controlchange( 0, 5, 99 ); 263 | /channel/1/clip f, 75.0 : controlchange( 0, 9, 75 ); 264 | /channel/1/clip f, 80.0 : controlchange( 0, 9, 80 ); 265 | /channel/1/clip f, 76.0 : controlchange( 0, 9, 76 ); 266 | /channel/1/clip f, 81.0 : controlchange( 0, 9, 81 ); 267 | /channel/1/clip f, 85.0 : controlchange( 0, 9, 85 ); 268 | /channel/1/clip f, 86.0 : controlchange( 0, 9, 86 ); 269 | /channel/1/clip f, 77.0 : controlchange( 0, 9, 77 ); 270 | /channel/1/clip f, 82.0 : controlchange( 0, 9, 82 ); 271 | /channel/1/clip f, 87.0 : controlchange( 0, 9, 87 ); 272 | /channel/1/clip f, 90.0 : controlchange( 0, 9, 90 ); 273 | /channel/1/clip f, 91.0 : controlchange( 0, 9, 91 ); 274 | /channel/1/clip f, 92.0 : controlchange( 0, 9, 92 ); 275 | /channel/1/clip f, 78.0 : controlchange( 0, 9, 78 ); 276 | /channel/1/clip f, 83.0 : controlchange( 0, 9, 83 ); 277 | /channel/1/clip f, 88.0 : controlchange( 0, 9, 88 ); 278 | /channel/1/clip f, 93.0 : controlchange( 0, 9, 93 ); 279 | /channel/1/clip f, 95.0 : controlchange( 0, 9, 95 ); 280 | /channel/1/clip f, 96.0 : controlchange( 0, 9, 96 ); 281 | /channel/1/clip f, 97.0 : controlchange( 0, 9, 97 ); 282 | /channel/1/clip f, 98.0 : controlchange( 0, 9, 98 ); 283 | /channel/1/clip f, 79.0 : controlchange( 0, 9, 79 ); 284 | /channel/1/clip f, 84.0 : controlchange( 0, 9, 84 ); 285 | /channel/1/clip f, 89.0 : controlchange( 0, 9, 89 ); 286 | /channel/1/clip f, 94.0 : controlchange( 0, 9, 94 ); 287 | /channel/1/clip f, 99.0 : controlchange( 0, 9, 99 ); 288 | /channel/0/clip f, 100.0 : controlchange( 0, 5, 100 ); 289 | /channel/0/clip f, 101.0 : controlchange( 0, 5, 101 ); 290 | /channel/0/clip f, 102.0 : controlchange( 0, 5, 102 ); 291 | /channel/0/clip f, 103.0 : controlchange( 0, 5, 103 ); 292 | /channel/0/clip f, 104.0 : controlchange( 0, 5, 104 ); 293 | /channel/0/clip f, 105.0 : controlchange( 0, 5, 105 ); 294 | /channel/0/clip f, 106.0 : controlchange( 0, 5, 106 ); 295 | /channel/0/clip f, 107.0 : controlchange( 0, 5, 107 ); 296 | /channel/0/clip f, 108.0 : controlchange( 0, 5, 108 ); 297 | /channel/0/clip f, 109.0 : controlchange( 0, 5, 109 ); 298 | /channel/0/clip f, 110.0 : controlchange( 0, 5, 110 ); 299 | /channel/0/clip f, 111.0 : controlchange( 0, 5, 111 ); 300 | /channel/0/clip f, 112.0 : controlchange( 0, 5, 112 ); 301 | /channel/0/clip f, 113.0 : controlchange( 0, 5, 113 ); 302 | /channel/0/clip f, 114.0 : controlchange( 0, 5, 114 ); 303 | /channel/0/clip f, 115.0 : controlchange( 0, 5, 115 ); 304 | /channel/0/clip f, 116.0 : controlchange( 0, 5, 116 ); 305 | /channel/0/clip f, 117.0 : controlchange( 0, 5, 117 ); 306 | /channel/0/clip f, 118.0 : controlchange( 0, 5, 118 ); 307 | /channel/0/clip f, 119.0 : controlchange( 0, 5, 119 ); 308 | /channel/0/clip f, 120.0 : controlchange( 0, 5, 120 ); 309 | /channel/0/clip f, 121.0 : controlchange( 0, 5, 121 ); 310 | /channel/0/clip f, 122.0 : controlchange( 0, 5, 122 ); 311 | /channel/0/clip f, 123.0 : controlchange( 0, 5, 123 ); 312 | /channel/0/clip f, 124.0 : controlchange( 0, 5, 124 ); 313 | /channel/1/clip f, 124.0 : controlchange( 0, 9, 124 ); 314 | /channel/1/clip f, 119.0 : controlchange( 0, 9, 119 ); 315 | /channel/1/clip f, 114.0 : controlchange( 0, 9, 114 ); 316 | /channel/1/clip f, 113.0 : controlchange( 0, 9, 113 ); 317 | /channel/1/clip f, 118.0 : controlchange( 0, 9, 118 ); 318 | /channel/1/clip f, 123.0 : controlchange( 0, 9, 123 ); 319 | /channel/1/clip f, 108.0 : controlchange( 0, 9, 108 ); 320 | /channel/1/clip f, 109.0 : controlchange( 0, 9, 109 ); 321 | /channel/1/clip f, 107.0 : controlchange( 0, 9, 107 ); 322 | /channel/1/clip f, 112.0 : controlchange( 0, 9, 112 ); 323 | /channel/1/clip f, 117.0 : controlchange( 0, 9, 117 ); 324 | /channel/1/clip f, 122.0 : controlchange( 0, 9, 122 ); 325 | /channel/1/clip f, 101.0 : controlchange( 0, 9, 101 ); 326 | /channel/1/clip f, 102.0 : controlchange( 0, 9, 102 ); 327 | /channel/1/clip f, 103.0 : controlchange( 0, 9, 103 ); 328 | /channel/1/clip f, 104.0 : controlchange( 0, 9, 104 ); 329 | /channel/1/clip f, 106.0 : controlchange( 0, 9, 106 ); 330 | /channel/1/clip f, 111.0 : controlchange( 0, 9, 111 ); 331 | /channel/1/clip f, 116.0 : controlchange( 0, 9, 116 ); 332 | /channel/1/clip f, 121.0 : controlchange( 0, 9, 121 ); 333 | /channel/1/clip f, 100.0 : controlchange( 0, 9, 100 ); 334 | /channel/1/clip f, 105.0 : controlchange( 0, 9, 105 ); 335 | /channel/1/clip f, 110.0 : controlchange( 0, 9, 110 ); 336 | /channel/1/clip f, 115.0 : controlchange( 0, 9, 115 ); 337 | /channel/1/clip f, 120.0 : controlchange( 0, 9, 120 ); 338 | -------------------------------------------------------------------------------- /maps/touchosc/pianoroll/piano.omm: -------------------------------------------------------------------------------- 1 | # Piano.touchosc for 720 x 1280 2 | 3 | /1/n{i} f, n,state : note( channel, n, 100, state ); 4 | /1/cc{i} f, cc,val : controlchange( channel, cc, 127*val ); 5 | /2/push{i} f, n,state : note( channel, n, 100, state ); 6 | /2/cc{i} f, cc,val : controlchange( channel, cc, 127*val ); 7 | 8 | #run: osc2midi -p 3819 -c 0 -o2m -m touchosc/pianoroll/Piano where Piano is located under /usr/share/osc2midi/touchosc/pianoroll/Piano.omm 9 | -------------------------------------------------------------------------------- /maps/touchosc/pianoroll/piano.touchosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/OSC2MIDI/37b2417e8c8b29ee020d255c3363466d015f5255/maps/touchosc/pianoroll/piano.touchosc -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for osc2midi 2 | 3 | cmake_minimum_required(VERSION 2.8) 4 | 5 | project (osc2midi) 6 | 7 | set(CMAKE_C_FLAGS "-Wall -g -DPREFIX='\"${CMAKE_INSTALL_PREFIX}\"'") 8 | 9 | # check for our various libraries 10 | find_package(PkgConfig) 11 | find_package(Jack REQUIRED) 12 | pkg_check_modules(LO liblo) 13 | 14 | include_directories (${LO_INCLUDE_DIRS} ${JACK_INCLUDE_DIRS}) 15 | link_directories (${LO_LIBRARY_DIRS} ${JACK_LIBRARY_DIRS}) 16 | 17 | # config libraries 18 | 19 | add_executable(osc2midi 20 | pair.c 21 | hashtable.c 22 | ht_stuff.c 23 | oscserver.c 24 | jackmidi.c 25 | converter.c 26 | main.c 27 | ) 28 | 29 | 30 | target_link_libraries(osc2midi ${LO_LIBRARIES} ${JACK_LIBRARIES} m) 31 | 32 | # config install 33 | install(TARGETS osc2midi 34 | DESTINATION bin 35 | ) 36 | 37 | -------------------------------------------------------------------------------- /src/converter.c: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //converter.c 3 | 4 | //osc2midi converter utility functions 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include//only for usleep 13 | #include"pair.h" 14 | #include"oscserver.h" 15 | #include"converter.h" 16 | #include"midiseq.h" 17 | #include"ht_stuff.h" 18 | 19 | #ifndef PREFIX 20 | #define PREFIX "/usr/local" 21 | #endif 22 | 23 | int is_empty(const char *s) 24 | // check whether a config line is empty or just a comment 25 | { 26 | while (*s != '\0') 27 | { 28 | if (*s == '#') 29 | return 1; 30 | else if (!isspace(*s)) 31 | return 0; 32 | s++; 33 | } 34 | return 1; 35 | } 36 | 37 | // This must be called with n == the 38 | // number of config lines in the map, to allocate enough storage to hold all 39 | // the register pointers that some pairs might share (note that there is <= 40 | // one entry per configuration pair in the table). 41 | void init_registers(float ***regs, int n) 42 | { 43 | *regs = (float**)calloc(n, sizeof(float*)); 44 | } 45 | 46 | 47 | int load_map(CONVERTER* conv, char* file) 48 | { 49 | int i; 50 | char path[200],line[400],prefix[400],*home; 51 | FILE* map = NULL; 52 | FILE* tmp = NULL; 53 | PAIRHANDLE *p; 54 | int use_stdin = strcmp(file, "-") == 0; 55 | 56 | //try to load the file: 57 | //from stdin 58 | if(use_stdin) 59 | { 60 | strcpy(path, ""); 61 | map = stdin; 62 | } 63 | //absolute path 64 | if(!map) 65 | { 66 | map = fopen(strcpy(path,file),"r"); 67 | } 68 | if(!map) 69 | { 70 | map = fopen(strcat(path,".omm"),"r"); 71 | } 72 | if(!map) 73 | { 74 | //check at home 75 | home = getenv("XDG_CONFIG_HOME"); 76 | if(!home) 77 | { 78 | home = getenv("HOME"); 79 | strcpy(path,home); 80 | strcat(path,"/.config"); 81 | } 82 | else 83 | { 84 | strcpy(path,home); 85 | } 86 | strcat(path,"/osc2midi/"); 87 | map = fopen(strcat(path,file),"r"); 88 | } 89 | if(!map) 90 | { 91 | //try with extra .omm 92 | map = fopen(strcat(path,".omm"),"r"); 93 | } 94 | if(!map) 95 | { 96 | //try etc location 97 | strcpy(path,"/etc/osc2midi/"); 98 | map = fopen(strcat(path,file),"r"); 99 | } 100 | if(!map) 101 | { 102 | //try with extra .omm 103 | map = fopen(strcat(path,".omm"),"r"); 104 | } 105 | if(!map) 106 | { 107 | //try default install location 108 | strcpy(path,PREFIX "/share/osc2midi/"); 109 | map = fopen(strcat(path,file),"r"); 110 | } 111 | if(!map) 112 | { 113 | //try with extra .omm 114 | map = fopen(strcat(path,".omm"),"r"); 115 | } 116 | if(!map) 117 | { 118 | path[strlen(path)-4]=0; 119 | printf("Error opening map file! %s",path); 120 | fflush(stdout); 121 | printf("\b\b\b\n"); 122 | return -1; 123 | } 124 | if(conv->verbose) 125 | printf("Using map file %s\n",path); 126 | 127 | //copy to temp file if reading from stdin 128 | if(use_stdin && !(tmp = tmpfile())) 129 | { 130 | printf("Error opening temporary file!\n"); 131 | return -1; 132 | } 133 | 134 | //count how many lines there are 135 | i=0; 136 | while(!feof(map)) 137 | { 138 | if (!fgets(line,400,map)) break; 139 | if (use_stdin) fputs(line,tmp); 140 | if(!is_empty(line)) 141 | i++;//line is not commented out and not empty 142 | } 143 | if (use_stdin) map = tmp; 144 | 145 | p = (PAIRHANDLE*)malloc(sizeof(PAIRHANDLE)*i); 146 | //initialize the register table (cf. pair.c) -ag 147 | init_registers(&conv->registers,i); 148 | conv->tab = init_table(); 149 | int nkeys = 0; 150 | rewind(map); 151 | i=0; 152 | *prefix = 0; 153 | while(!feof(map)) 154 | { 155 | char rule[800]; 156 | if (!fgets(line,400,map)) break; 157 | if(!is_empty(line)) 158 | { 159 | // This provides a quick and dirty way to left-factor rules, where 160 | // the same osc message is mapped to different midi messages. -ag 161 | char *s = line; 162 | while (*s && isspace(*s)) ++s; 163 | if (*s == ':') 164 | { 165 | // Line starts with ':' delimiter, use prefix from previous 166 | // rule. 167 | strcat(strcpy(rule, prefix), s); 168 | } 169 | else 170 | { 171 | // Skip over the OSC path. 172 | while (*s && !isspace(*s)) ++s; 173 | // Skip over the rest of the lhs of the rule. 174 | while (*s && *s != ':') ++s; 175 | if (*s == ':') 176 | { 177 | // Complete rule, store prefix for subsequent rules. 178 | int n = s-line; 179 | strncpy(prefix, line, n); 180 | prefix[n] = 0; 181 | } 182 | strcpy(rule, line); 183 | } 184 | p[i] = alloc_pair(rule, conv->tab, conv->registers, &nkeys); 185 | if(p[i++]) 186 | { 187 | if(conv->verbose) 188 | { 189 | printf("pair created: "); 190 | print_pair(p[i-1]); 191 | } 192 | } 193 | else 194 | { 195 | conv->errors++; 196 | i--;//error message will be printed by alloc_pair 197 | } 198 | } 199 | } 200 | free_table(conv->tab); 201 | if(conv->verbose) 202 | { 203 | printf("%i pairs created.\n",i); 204 | } 205 | conv->npairs = i; 206 | conv->p = p; 207 | return i; 208 | } 209 | 210 | static int missing_arg(const char *opt) 211 | { 212 | printf("Missing argument! %s\n",opt); 213 | return -1; 214 | } 215 | 216 | int process_cli_args(int argc, char** argv, char* file, char* port, char* addr, char* clientname, CONVERTER* conv) 217 | { 218 | int i; 219 | //defaults 220 | strcpy(file,"default.omm"); 221 | strcpy(port,"57120"); 222 | strcpy(addr,"osc.udp://localhost:8000"); 223 | strcpy(clientname,"osc2midi"); 224 | conv->verbose = 0; 225 | conv->dry_run = 0; 226 | conv->errors = 0; 227 | conv->mon_mode = 0; 228 | conv->multi_match = 1; 229 | conv->strict_match = 0; 230 | conv->glob_chan = 0; 231 | conv->glob_vel = 100; 232 | conv->filter = 0; 233 | conv->convert = 0; 234 | conv->seq.useout = 1; 235 | conv->seq.usein = 1; 236 | conv->seq.usefilter = 0; 237 | 238 | if(argc>1) 239 | { 240 | for (i = 1; imulti_match = 0; 246 | } 247 | else if(strcmp(argv[i], "-multi") ==0) 248 | { 249 | //multiple matches 250 | conv->multi_match = 1; 251 | } 252 | else if(strcmp(argv[i], "-strict") ==0) 253 | { 254 | //strict matches 255 | conv->strict_match = 1; 256 | } 257 | else if (strcmp(argv[i], "-map") == 0) 258 | { 259 | if (!argv[i+1]) return missing_arg(argv[i]); 260 | //load map file 261 | strcpy(file,argv[++i]); 262 | } 263 | else if(strcmp(argv[i], "-mon") ==0) 264 | { 265 | //monitor mode (osc messages) 266 | conv->mon_mode = 1; 267 | conv->convert = 1; 268 | } 269 | else if(strcmp(argv[i], "-m2o") ==0) 270 | { 271 | //monitor mode (osc messages) 272 | conv->convert = -1; 273 | } 274 | else if(strcmp(argv[i], "-o2m") ==0) 275 | { 276 | //monitor mode (osc messages) 277 | conv->convert = 1; 278 | } 279 | else if (strcmp(argv[i], "-m") == 0) 280 | { 281 | if (!argv[i+1]) return missing_arg(argv[i]); 282 | //load map file 283 | strcpy(file,argv[++i]); 284 | } 285 | else if (strcmp(argv[i], "-n") == 0) 286 | { 287 | //dry run (only check syntax and exit with error code) 288 | conv->dry_run = 1; 289 | } 290 | else if(strcmp(argv[i], "-p") ==0) 291 | { 292 | if (!argv[i+1]) return missing_arg(argv[i]); 293 | //set osc server port 294 | strcpy(port,argv[++i]); 295 | } 296 | else if(strcmp(argv[i], "-a") ==0) 297 | { 298 | if (!argv[i+1]) return missing_arg(argv[i]); 299 | //osc client address to send return osc messages to 300 | if(lo_url_get_protocol_id(argv[i+1]) < 0) 301 | //protocol id missing, assume osc.udp 302 | sprintf(addr, "osc.udp://%s", argv[++i]); 303 | else 304 | strcpy(addr, argv[++i]); 305 | } 306 | else if(strcmp(argv[i], "-c") ==0) 307 | { 308 | if (!argv[i+1]) return missing_arg(argv[i]); 309 | // global channel 310 | conv->glob_chan = atoi(argv[++i]); 311 | if(conv->glob_chan < 0) conv->glob_chan = 0; 312 | if(conv->glob_chan > 15) conv->glob_chan = 15; 313 | } 314 | else if(strcmp(argv[i], "-vel") ==0) 315 | { 316 | if (!argv[i+1]) return missing_arg(argv[i]); 317 | // global velocity 318 | conv->glob_vel = atoi(argv[++i]); 319 | if(conv->glob_vel < 0) conv->glob_vel = 0; 320 | if(conv->glob_vel > 127) conv->glob_vel = 127; 321 | } 322 | else if(strcmp(argv[i], "-s") == 0) 323 | { 324 | if (!argv[i+1]) return missing_arg(argv[i]); 325 | // filter shift 326 | conv->filter = atoi(argv[++i]); 327 | conv->seq.usefilter = 1; 328 | conv->seq.filter = &conv->filter; 329 | } 330 | else if (strcmp(argv[i], "-name") == 0) 331 | { 332 | if (!argv[i+1]) return missing_arg(argv[i]); 333 | // JACK client name 334 | strcpy(clientname, argv[++i]); 335 | } 336 | else if (strcmp(argv[i], "-v") == 0) 337 | { 338 | conv->verbose = 1; 339 | } 340 | else if (strcmp(argv[i], "-h") == 0) 341 | { 342 | //help 343 | return -1; 344 | } 345 | else 346 | { 347 | printf("Unknown argument! %s\n",argv[i]); 348 | return -1; 349 | } 350 | 351 | } 352 | }//get args 353 | return 0; 354 | } 355 | -------------------------------------------------------------------------------- /src/converter.h: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //converter.h 3 | 4 | //this is a data struct used to pass data from the OSC server thread to the midi thread 5 | #ifndef CONVERTER_H 6 | #define CONVERTER_H 7 | #include 8 | #include 9 | #include"pair.h" 10 | #include"midiseq.h" 11 | #include"hashtable.h" 12 | 13 | typedef struct _CONVERTER 14 | { 15 | uint8_t glob_chan; 16 | uint8_t glob_vel; 17 | int8_t filter; 18 | bool verbose; 19 | bool mon_mode; 20 | bool multi_match; 21 | bool strict_match; 22 | int8_t convert; //0 = both, 1 = o2m, -1 = m2o 23 | bool dry_run; 24 | int errors; 25 | 26 | uint16_t npairs; 27 | PAIRHANDLE* p; 28 | 29 | table tab; 30 | float** registers; 31 | 32 | MIDI_SEQ seq; 33 | } CONVERTER; 34 | 35 | int load_map(CONVERTER* conv, char* file); 36 | int is_empty(const char *s); 37 | void init_registers(float ***regs, int n); 38 | int process_cli_args(int argc, char** argv, char* file, char* port, char* addr, char* clientname, CONVERTER* conv); 39 | #endif 40 | -------------------------------------------------------------------------------- /src/hashtable.c: -------------------------------------------------------------------------------- 1 | // Original code by Frank Pfenning from CMU (https://www.cs.cmu.edu/~fp/), see 2 | // https://www.cs.cmu.edu/~fp/courses/15122-f10/lectures/22-mem/. The code 3 | // doesn't carry any license notes and thus presumably is in the public 4 | // domain. 5 | 6 | /* Hash tables (fixed size) 7 | * 15-122 Principles of Imperative Computation, Fall 2010 8 | * Frank Pfenning 9 | */ 10 | 11 | #include 12 | #include 13 | #include "hashtable.h" 14 | 15 | #include 16 | 17 | #ifdef DEBUG 18 | 19 | #define ASSERT(COND) assert(COND) 20 | #define REQUIRES(COND) assert(COND) 21 | #define ENSURES(COND) assert(COND) 22 | 23 | #else 24 | 25 | #define ASSERT(COND) ((void)0) 26 | #define REQUIRES(COND) ((void)0) 27 | #define ENSURES(COND) ((void)0) 28 | 29 | #endif 30 | 31 | /* Interface type definitions */ 32 | /* see hashtable.h */ 33 | 34 | /* Chains, implemented as linked lists */ 35 | typedef struct chain* chain; 36 | 37 | /* alpha = n/m = num_elems/size */ 38 | struct table 39 | { 40 | int size; /* m */ 41 | int num_elems; /* n */ 42 | chain* array; /* \length(array) == size */ 43 | ht_key (*elem_key)(ht_elem e); /* extracting keys from elements */ 44 | bool (*equal)(ht_key k1, ht_key k2); /* comparing keys */ 45 | int (*hash)(ht_key k, int m); /* hashing keys */ 46 | }; 47 | 48 | struct list 49 | { 50 | ht_elem data; 51 | struct list* next; 52 | }; 53 | typedef struct list* list; 54 | /* linked lists may be NULL (= end of list) */ 55 | /* we do not check for circularity */ 56 | 57 | void list_free(list p, void (*elem_free)(ht_elem e)) 58 | { 59 | list q; 60 | while (p != NULL) 61 | { 62 | if (p->data != NULL && elem_free != NULL) 63 | /* free element, if such a function is supplied */ 64 | (*elem_free)(p->data); 65 | q = p->next; 66 | free(p); 67 | p = q; 68 | } 69 | } 70 | 71 | /* chains */ 72 | 73 | chain chain_new (); 74 | ht_elem chain_insert(table H, chain C, ht_elem e); 75 | ht_elem chain_search(table H, chain C, ht_key k); 76 | void chain_free(chain C, void (*elem_free)(ht_elem e)); 77 | 78 | struct chain 79 | { 80 | list list; 81 | }; 82 | 83 | /* valid chains are not null */ 84 | bool is_chain(chain C) 85 | { 86 | return C != NULL; 87 | } 88 | 89 | chain chain_new() 90 | { 91 | chain C = malloc(sizeof(struct chain)); 92 | C->list = NULL; 93 | ENSURES(is_chain(C)); 94 | return C; 95 | } 96 | 97 | /* chain_find(p, k) returns list element whose 98 | * data field has key k, or NULL if none exists 99 | */ 100 | list chain_find(table H, chain C, ht_key k) 101 | { 102 | REQUIRES(is_chain(C)); 103 | list p = C->list; 104 | while (p != NULL) 105 | { 106 | if ((*H->equal)(k, (*H->elem_key)(p->data))) 107 | return p; 108 | p = p->next; 109 | } 110 | return NULL; 111 | } 112 | 113 | ht_elem chain_insert(table H, chain C, ht_elem e) 114 | { 115 | REQUIRES(is_chain(C) && e != NULL); 116 | list p = chain_find(H, C, (*H->elem_key)(e)); 117 | if (p == NULL) 118 | { 119 | /* insert new element at the beginning */ 120 | list new_item = malloc(sizeof(struct list)); 121 | new_item->data = e; 122 | new_item->next = C->list; 123 | C->list = new_item; 124 | ENSURES(is_chain(C)); 125 | return NULL; /* did not overwrite entry */ 126 | } 127 | else 128 | { 129 | /* overwrite existing entry with given key */ 130 | ht_elem old_e = p->data; 131 | p->data = e; 132 | ENSURES(is_chain(C)); 133 | return old_e; /* return old entry */ 134 | } 135 | } 136 | 137 | ht_elem chain_search(table H, chain C, ht_key k) 138 | { 139 | REQUIRES(is_chain(C)); 140 | list p = chain_find(H, C, k); 141 | if (p == NULL) return NULL; 142 | else return p->data; 143 | } 144 | 145 | void chain_free(chain C, void (*elem_free)(ht_elem e)) 146 | { 147 | REQUIRES(is_chain(C)); 148 | list_free(C->list, elem_free); 149 | free(C); 150 | } 151 | 152 | /* Hash table interface */ 153 | /* see hashtable.h */ 154 | 155 | /* Hash table implementation */ 156 | 157 | /* is_h_chain(C, h, m) - all of chain C's keys are equal to h */ 158 | /* keys should also be pairwise distinct, but we do not check that */ 159 | /* table size is m */ 160 | bool is_h_chain (table H, chain C, int h, int m) 161 | { 162 | REQUIRES(0 <= h && h < m); 163 | if (C == NULL) return false; 164 | list p = C->list; 165 | while (p != NULL) 166 | { 167 | if (p->data == NULL) return false; 168 | if ((*H->hash)((*H->elem_key)(p->data),m) != h) 169 | return false; 170 | p = p->next; 171 | } 172 | return true; 173 | } 174 | 175 | bool is_table(table H) 176 | //@requires H != NULL && H->size == \length(H->array); 177 | { 178 | int i; 179 | int m; 180 | /* array elements may be NULL or chains */ 181 | if (H == NULL) return false; 182 | m = H->size; 183 | for (i = 0; i < m; i++) 184 | { 185 | chain C = H->array[i]; 186 | if (!(C == NULL || is_h_chain(H, C, i, m))) return false; 187 | } 188 | return true; 189 | } 190 | 191 | table table_new(int init_size, 192 | ht_key (*elem_key)(ht_elem e), 193 | bool (*equal)(ht_key k1, ht_key k2), 194 | int (*hash)(ht_key k, int m)) 195 | { 196 | REQUIRES(init_size > 1); 197 | chain* A = calloc(init_size, sizeof(chain)); 198 | table H = malloc(sizeof(struct table)); 199 | H->size = init_size; 200 | H->num_elems = 0; 201 | H->array = A; /* all initialized to NULL; */ 202 | H->elem_key = elem_key; 203 | H->equal = equal; 204 | H->hash = hash; 205 | ENSURES(is_table(H)); 206 | return H; 207 | } 208 | 209 | ht_elem table_insert(table H, ht_elem e) 210 | { 211 | REQUIRES(is_table(H)); 212 | ht_elem old_e; 213 | ht_key k = (*H->elem_key)(e); 214 | int h = (*H->hash)(k, H->size); 215 | if (H->array[h] == NULL) 216 | H->array[h] = chain_new(); 217 | old_e = chain_insert(H, H->array[h], e); 218 | if (old_e != NULL) return old_e; 219 | H->num_elems++; 220 | ENSURES(is_table(H)); 221 | ENSURES(table_search(H, (*H->elem_key)(e)) == e); /* pointer equality */ 222 | return NULL; 223 | } 224 | 225 | ht_elem table_search(table H, ht_key k) 226 | { 227 | REQUIRES(is_table(H)); 228 | int h = (*H->hash)(k, H->size); 229 | if (H->array[h] == NULL) return NULL; 230 | ht_elem e = chain_search(H, H->array[h], k); 231 | ENSURES(e == NULL || (*H->equal)((*H->elem_key)(e), k)); 232 | return e; 233 | } 234 | 235 | void table_free(table H, void (*elem_free)(ht_elem e)) 236 | { 237 | REQUIRES(is_table(H)); 238 | int i; 239 | for (i = 0; i < H->size; i++) 240 | { 241 | chain C = H->array[i]; 242 | if (C != NULL) chain_free(C, elem_free); 243 | } 244 | free(H->array); 245 | free(H); 246 | } 247 | -------------------------------------------------------------------------------- /src/hashtable.h: -------------------------------------------------------------------------------- 1 | /* Hash tables 2 | * 15-122 Principles of Imperative Computation, Fall 2010 3 | * Frank Pfenning 4 | */ 5 | 6 | #ifndef _HASHTABLE_H 7 | #define _HASHTABLE_H 8 | #include 9 | 10 | typedef void* ht_key; 11 | typedef void* ht_elem; 12 | 13 | /* Hash table interface */ 14 | typedef struct table* table; 15 | table table_new (int init_size, 16 | ht_key (*elem_key)(ht_elem e), 17 | bool (*equal)(ht_key k1, ht_key k2), 18 | int (*hash)(ht_key k, int m) 19 | ); 20 | ht_elem table_insert(table H, ht_elem e); 21 | ht_elem table_search(table H, ht_key k); 22 | void table_free(table H, void (*elem_free)(ht_elem e)); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/ht_stuff.c: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //ht_stuff.c 3 | 4 | // stuff for the hashtable to determine if an OSC message generates multiple 5 | // MIDI messages. This way several pairs can share registers. 6 | // the hashtable is used for a new pair to see a previous pair used the same OSC 7 | // message. This way values are persistent for MIDI->OSC where all the OSC 8 | // args cannot be contained in a single MIDI message 9 | 10 | /*************************************************************************/ 11 | 12 | /* Register implementation for keeping track of OSC values of partial mappings 13 | Albert Graef , Computer Music Research Group, Johannes 14 | Gutenberg University Mainz, June 2015 15 | 16 | This stems from a discussion with Spencer on how to make partial 17 | assignments of OSC values work in reverse mappings (MIDI->OSC). This is 18 | needed for rules like the following which map a single, multi-argument OSC 19 | message to several different MIDI messages: 20 | 21 | /2/xy1 ff, val, : controlchange( 1, 1, 127*val ); 22 | /2/xy1 ff, , val : controlchange( 1, 2, 127*val ); 23 | 24 | When receiving one of the MIDI messages on the right-hand side of such 25 | rules, a complete OSC message has to be constructed which supplies values 26 | to *all* arguments of the OSC message. To these ends, the present 27 | implementation stores previously received values for all arguments 28 | (obtained from previous OSC or MIDI messages) in a vector of "registers" 29 | which is accessible to all rules for the same type of OSC message. 30 | 31 | The (indexes of the) register vectors for each rule are kept in a hash 32 | table indexed by path-argtype pairs. (Note that indexing by just the OSC 33 | paths won't work, since the same path might be used with different argument 34 | combinations.) This means that each rule for a given path-argtype pair will 35 | get the same collection of registers. The hash table is constructed at 36 | startup time, while reading the map file. Accessing the register values in 37 | the real-time loop then just needs a constant-time lookup using a pointer 38 | stored in each configuration pair, and thus incurs only minimal overhead. 39 | 40 | After initialization, the necessary bookkeeping (storing received values in 41 | registers, and retrieving stored values in the MIDI->OSC mappings) is done 42 | in the try_match_osc() and try_match_midi() routines . */ 43 | 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include"ht_stuff.h" 49 | 50 | /*************************************************************************/ 51 | // Not sure what's a good magic number for the hash table size here, just 52 | // make it large enough so that the buckets don't grow too large. 53 | #define TABLESZ 4711 54 | 55 | 56 | // element type 57 | struct elem 58 | { 59 | char* key; 60 | int k; 61 | }; 62 | typedef struct elem* elem;//for hashtable 63 | 64 | 65 | // key comparison 66 | bool ht_equal(ht_key s1, ht_key s2) 67 | { 68 | return strcmp((char*)s1,(char*)s2) == 0; 69 | } 70 | 71 | // extracting keys from elements 72 | ht_key ht_getkey(ht_elem e) 73 | { 74 | return ((elem)e)->key; 75 | } 76 | 77 | 78 | // hash function using an inlined random number generator -- this comes from 79 | // the sample code provided with Frank Pfenning's hash table implementation 80 | int ht_hash(ht_key s, int m) 81 | { 82 | unsigned int a = 1664525; 83 | unsigned int b = 1013904223; 84 | unsigned int r = 0xdeadbeef; /* initial seed */ 85 | int len = strlen(s); 86 | int i; 87 | unsigned int h = 0; /* empty string maps to 0 */ 88 | for (i = 0; i < len; i++) 89 | { 90 | h = r*h + ((char*)s)[i]; /* mod 2^32 */ 91 | r = r*a + b; /* mod 2^32, linear congruential random no */ 92 | } 93 | h = h % m; /* reduce to range */ 94 | //@assert -m < (int)h && (int)h < m; 95 | int hx = (int)h; 96 | if (hx < 0) h += m; /* make positive, if necessary */ 97 | return hx; 98 | } 99 | 100 | void free_elem(ht_elem e) 101 | { 102 | elem el = (elem)e; 103 | free(el->key); 104 | free(el); 105 | } 106 | 107 | //initialize hash table 108 | table init_table() 109 | { 110 | return table_new(TABLESZ, ht_getkey, ht_equal, ht_hash); 111 | } 112 | 113 | //uninitialize hash table 114 | void free_table(table tab) 115 | { 116 | table_free(tab,free_elem); 117 | } 118 | 119 | // Return a key (index into the regs table) which is unique for the given 120 | // path, argtypes pair. 121 | int strkey(table tab, char* path, char* argtypes, int* nkeys) 122 | { 123 | // According to the OSC spec, path may not contain a comma, so we can use 124 | // that as a delimiter for the path,argtypes key value here. 125 | char *key = malloc(strlen(path)+strlen(argtypes)+2); 126 | sprintf(key, "%s,%s", path, argtypes); 127 | // Make sure that the hash table is initialized. 128 | ht_elem e = table_search(tab, key); 129 | if (!e) 130 | { 131 | // new key, add a new entry to the regs table 132 | elem el = (elem)malloc(sizeof(struct elem)); 133 | el->key = key; 134 | el->k = (*nkeys)++; 135 | table_insert(tab, el); 136 | e = el; 137 | } 138 | else 139 | { 140 | free(key); 141 | } 142 | return ((elem)e)->k; 143 | } 144 | -------------------------------------------------------------------------------- /src/ht_stuff.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //ht_stuff.h 3 | 4 | //everything implementation specific dealing with the hash table 5 | //see ht_stuff.c for much more info 6 | 7 | #ifndef HT_STUFF_H 8 | #define HT_STUFF_H 9 | 10 | #include"hashtable.h" 11 | 12 | int strkey(table tab, char* path, char* argtypes, int* nkeys); 13 | table init_table(); 14 | void free_table(table tab); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/jackmidi.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2014 Spencer Jackson 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | */ 26 | 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include "midiseq.h" 41 | 42 | 43 | typedef struct _MidiMessage 44 | { 45 | jack_nframes_t time; 46 | int len; /* Length of MIDI message, in bytes. */ 47 | uint8_t data[3]; 48 | } MidiMessage; 49 | 50 | #define RINGBUFFER_SIZE 256*sizeof(MidiMessage) 51 | 52 | /* Will emit a warning if time between jack callbacks is longer than this. */ 53 | #define MAX_TIME_BETWEEN_CALLBACKS 0.1 54 | 55 | /* Will emit a warning if execution of jack callback takes longer than this. */ 56 | #define MAX_PROCESSING_TIME 0.01 57 | 58 | typedef struct _jackseq 59 | { 60 | jack_ringbuffer_t *ringbuffer_out; 61 | jack_ringbuffer_t *ringbuffer_in; 62 | jack_client_t *jack_client; 63 | jack_port_t *output_port; 64 | jack_port_t *input_port; 65 | jack_port_t *filter_in_port; 66 | jack_port_t *filter_out_port; 67 | }JACK_SEQ; 68 | 69 | /////////////////////////////////////////////// 70 | //These functions operate in the JACK RT Thread 71 | /////////////////////////////////////////////// 72 | 73 | double 74 | get_time(void) 75 | { 76 | double seconds; 77 | int ret; 78 | struct timeval tv; 79 | 80 | ret = gettimeofday(&tv, NULL); 81 | 82 | if (ret) 83 | { 84 | perror("gettimeofday"); 85 | exit(EX_OSERR); 86 | } 87 | 88 | seconds = tv.tv_sec + tv.tv_usec / 1000000.0; 89 | 90 | return (seconds); 91 | } 92 | 93 | double 94 | get_delta_time(void) 95 | { 96 | static double previously = -1.0; 97 | double now; 98 | double delta; 99 | 100 | now = get_time(); 101 | 102 | if (previously == -1.0) 103 | { 104 | previously = now; 105 | 106 | return (0); 107 | } 108 | 109 | delta = now - previously; 110 | previously = now; 111 | 112 | assert(delta >= 0.0); 113 | 114 | return (delta); 115 | } 116 | 117 | 118 | double 119 | nframes_to_ms(jack_client_t* jack_client,jack_nframes_t nframes) 120 | { 121 | jack_nframes_t sr; 122 | 123 | sr = jack_get_sample_rate(jack_client); 124 | 125 | assert(sr > 0); 126 | 127 | return ((nframes * 1000.0) / (double)sr); 128 | } 129 | 130 | void 131 | queue_message(jack_ringbuffer_t* ringbuffer, MidiMessage *ev) 132 | { 133 | int written; 134 | 135 | if (jack_ringbuffer_write_space(ringbuffer) < sizeof(*ev)) 136 | { 137 | printf("Not enough space in the ringbuffer, MIDI LOST."); 138 | return; 139 | } 140 | 141 | written = jack_ringbuffer_write(ringbuffer, (char *)ev, sizeof(*ev)); 142 | 143 | if (written != sizeof(*ev)) 144 | printf("jack_ringbuffer_write failed, MIDI LOST."); 145 | } 146 | 147 | void 148 | process_midi_input(JACK_SEQ* seq,jack_nframes_t nframes) 149 | { 150 | int read, events, i; 151 | void *port_buffer; 152 | MidiMessage rev; 153 | jack_midi_event_t event; 154 | 155 | port_buffer = jack_port_get_buffer(seq->input_port, nframes); 156 | if (port_buffer == NULL) 157 | { 158 | printf("jack_port_get_buffer failed, cannot receive anything."); 159 | return; 160 | } 161 | 162 | #ifdef JACK_MIDI_NEEDS_NFRAMES 163 | events = jack_midi_get_event_count(port_buffer, nframes); 164 | #else 165 | events = jack_midi_get_event_count(port_buffer); 166 | #endif 167 | 168 | for (i = 0; i < events; i++) 169 | { 170 | 171 | #ifdef JACK_MIDI_NEEDS_NFRAMES 172 | read = jack_midi_event_get(&event, port_buffer, i, nframes); 173 | #else 174 | read = jack_midi_event_get(&event, port_buffer, i); 175 | #endif 176 | if (!read) 177 | { 178 | //successful event get 179 | 180 | if (event.size <= 3 && event.size >=1) 181 | { 182 | //not sysex or something 183 | 184 | //PUSH ONTO CIRCULAR BUFFER 185 | //not sure if its a true copy onto buffer, if not this won't work 186 | rev.len = event.size; 187 | rev.time = event.time; 188 | memcpy(rev.data, event.buffer, rev.len); 189 | queue_message(seq->ringbuffer_in,&rev); 190 | } 191 | } 192 | 193 | 194 | } 195 | } 196 | 197 | void 198 | process_midi_filter(MIDI_SEQ* mseq,jack_nframes_t nframes) 199 | { 200 | JACK_SEQ* seq = (JACK_SEQ*)mseq->driver; 201 | int read, events, i, j; 202 | uint8_t* buffer; 203 | int8_t filter = *mseq->filter; 204 | void *inport_buffer; 205 | void *outport_buffer; 206 | jack_midi_event_t event; 207 | 208 | inport_buffer = jack_port_get_buffer(seq->filter_in_port, nframes); 209 | if (inport_buffer == NULL) 210 | { 211 | printf("jack_port_get_buffer failed, cannot receive anything."); 212 | return; 213 | } 214 | outport_buffer = jack_port_get_buffer(seq->filter_out_port, nframes); 215 | if (outport_buffer == NULL) 216 | { 217 | printf("jack_port_get_buffer failed, cannot send anything."); 218 | return; 219 | } 220 | 221 | #ifdef JACK_MIDI_NEEDS_NFRAMES 222 | jack_midi_clear_buffer(outport_buffer, nframes); 223 | #else 224 | jack_midi_clear_buffer(outport_buffer); 225 | #endif 226 | 227 | //check if filter shift amount has changed 228 | if(filter != mseq->old_filter) 229 | { 230 | uint8_t data[3]; 231 | event.buffer = data; 232 | event.size = 3; 233 | //turn off all currently on notes and send new note-ons 234 | for(j=0; jnnotes; j++) 235 | { 236 | int note = mseq->note[j]+mseq->old_filter; 237 | if (note < 0 || note > 127) 238 | // note out of range, skip 239 | continue; 240 | event.buffer[0] = mseq->notechan[j]&0xEF;//note on to note off 241 | event.buffer[1] = note; 242 | event.buffer[2] = 0; 243 | #ifdef JACK_MIDI_NEEDS_NFRAMES 244 | buffer = jack_midi_event_reserve(outport_buffer, 0, 3, nframes); 245 | #else 246 | buffer = jack_midi_event_reserve(outport_buffer, 0, 3); 247 | #endif 248 | 249 | if (buffer == NULL) 250 | { 251 | //warn_from_jack_thread_context("jack_midi_event_reserve failed, NOTE LOST."); 252 | break; 253 | } 254 | 255 | memcpy(buffer, event.buffer, 3); 256 | } 257 | for(j=0; jnnotes; j++) 258 | { 259 | int note = mseq->note[j]+filter; 260 | if (note < 0 || note > 127) 261 | // note out of range, skip 262 | continue; 263 | event.buffer[0] = mseq->notechan[j];//note on 264 | event.buffer[1] = note; 265 | event.buffer[2] = mseq->notevel[j]; 266 | #ifdef JACK_MIDI_NEEDS_NFRAMES 267 | buffer = jack_midi_event_reserve(outport_buffer, 0, 3, nframes); 268 | #else 269 | buffer = jack_midi_event_reserve(outport_buffer, 0, 3); 270 | #endif 271 | 272 | if (buffer == NULL) 273 | { 274 | //warn_from_jack_thread_context("jack_midi_event_reserve failed, NOTE LOST."); 275 | break; 276 | } 277 | 278 | memcpy(buffer, event.buffer, 3); 279 | } 280 | mseq->old_filter = filter; 281 | } 282 | 283 | #ifdef JACK_MIDI_NEEDS_NFRAMES 284 | events = jack_midi_get_event_count(inport_buffer, nframes); 285 | #else 286 | events = jack_midi_get_event_count(inport_buffer); 287 | #endif 288 | 289 | 290 | for (i = 0; i < events; i++) 291 | { 292 | 293 | #ifdef JACK_MIDI_NEEDS_NFRAMES 294 | read = jack_midi_event_get(&event, inport_buffer, i, nframes); 295 | #else 296 | read = jack_midi_event_get(&event, inport_buffer, i); 297 | #endif 298 | if (!read) 299 | { 300 | //successful event get 301 | 302 | //filter if note 303 | if (event.size <= 3 && event.size >=1) 304 | { 305 | //not sysex or something 306 | 307 | if((event.buffer[0]&0xF0) == 0x80 || 308 | ((event.buffer[0]&0xF0) == 0x90 && event.buffer[2] == 0)) 309 | { 310 | uint8_t on = mseq->note[0]; 311 | //note off event 312 | //remove it from list 313 | for(j=0; jnnotes; j++) 314 | { 315 | //find it and shift everything above it down 1 316 | if(j && on == event.buffer[1]) 317 | { 318 | mseq->note[j-1] = mseq->note[j]; 319 | mseq->notechan[j-1] = mseq->notechan[j]; 320 | mseq->notevel[j-1] = mseq->notevel[j]; 321 | } 322 | else if(j) 323 | { 324 | on = mseq->note[j]; 325 | } 326 | } 327 | if(on == event.buffer[1]) 328 | { 329 | mseq->nnotes--; 330 | } 331 | int note = event.buffer[1]+filter; 332 | if (note < 0 || note > 127) 333 | // note out of range, skip 334 | continue; 335 | event.buffer[1] = note; 336 | } 337 | else if((event.buffer[0]&0xF0) == 0x90) 338 | { 339 | //note on event 340 | for(j=0; jnnotes; j++) 341 | { 342 | //check if it's already on the list 343 | if(mseq->note[j] == event.buffer[1]) 344 | { 345 | break; 346 | } 347 | } 348 | if(j == mseq->nnotes) 349 | { 350 | //add note to queue 351 | mseq->notechan[mseq->nnotes] = event.buffer[0]; 352 | mseq->note[mseq->nnotes] = event.buffer[1]; 353 | mseq->notevel[mseq->nnotes++] = event.buffer[2]; 354 | } 355 | int note = event.buffer[1]+filter; 356 | if (note < 0 || note > 127) 357 | // note out of range, skip 358 | continue; 359 | event.buffer[1] = note; 360 | } 361 | else if((event.buffer[0]&0xF0) == 0xA0) 362 | { 363 | //polyphonic aftertouch event (just transpose) 364 | int note = event.buffer[1]+filter; 365 | if (note < 0 || note > 127) 366 | // note out of range, skip 367 | continue; 368 | event.buffer[1] = note; 369 | } 370 | 371 | } 372 | 373 | //copy to output 374 | #ifdef JACK_MIDI_NEEDS_NFRAMES 375 | buffer = jack_midi_event_reserve(outport_buffer, event.time, event.size, nframes); 376 | #else 377 | buffer = jack_midi_event_reserve(outport_buffer, event.time, event.size); 378 | #endif 379 | 380 | if (buffer == NULL) 381 | { 382 | //warn_from_jack_thread_context("jack_midi_event_reserve failed, NOTE LOST."); 383 | break; 384 | } 385 | 386 | memcpy(buffer, event.buffer, event.size); 387 | } 388 | 389 | } 390 | } 391 | 392 | void 393 | process_midi_output(JACK_SEQ* seq,jack_nframes_t nframes) 394 | { 395 | int read, t; 396 | uint8_t *buffer; 397 | void *port_buffer; 398 | jack_nframes_t last_frame_time; 399 | MidiMessage ev; 400 | 401 | last_frame_time = jack_last_frame_time(seq->jack_client); 402 | 403 | port_buffer = jack_port_get_buffer(seq->output_port, nframes); 404 | if (port_buffer == NULL) 405 | { 406 | printf("jack_port_get_buffer failed, cannot send anything."); 407 | return; 408 | } 409 | 410 | #ifdef JACK_MIDI_NEEDS_NFRAMES 411 | jack_midi_clear_buffer(port_buffer, nframes); 412 | #else 413 | jack_midi_clear_buffer(port_buffer); 414 | #endif 415 | 416 | while (jack_ringbuffer_read_space(seq->ringbuffer_out)) 417 | { 418 | read = jack_ringbuffer_peek(seq->ringbuffer_out, (char *)&ev, sizeof(ev)); 419 | 420 | if (read != sizeof(ev)) 421 | { 422 | //warn_from_jack_thread_context("Short read from the ringbuffer, possible note loss."); 423 | jack_ringbuffer_read_advance(seq->ringbuffer_out, read); 424 | continue; 425 | } 426 | 427 | t = ev.time + nframes - last_frame_time; 428 | 429 | /* If computed time is too much into the future, we'll need 430 | to send it later. */ 431 | if (t >= (int)nframes) 432 | break; 433 | 434 | /* If computed time is < 0, we missed a cycle because of xrun. */ 435 | if (t < 0) 436 | t = 0; 437 | 438 | jack_ringbuffer_read_advance(seq->ringbuffer_out, sizeof(ev)); 439 | 440 | #ifdef JACK_MIDI_NEEDS_NFRAMES 441 | buffer = jack_midi_event_reserve(port_buffer, t, ev.len, nframes); 442 | #else 443 | buffer = jack_midi_event_reserve(port_buffer, t, ev.len); 444 | #endif 445 | 446 | if (buffer == NULL) 447 | { 448 | //warn_from_jack_thread_context("jack_midi_event_reserve failed, NOTE LOST."); 449 | break; 450 | } 451 | 452 | memcpy(buffer, ev.data, ev.len); 453 | } 454 | } 455 | 456 | // in, i+o, i+o+t, o+t, out 457 | 458 | int 459 | process_callback(jack_nframes_t nframes, void *seqq) 460 | { 461 | MIDI_SEQ* mseq = (MIDI_SEQ*)seqq; 462 | JACK_SEQ* seq = (JACK_SEQ*)mseq->driver; 463 | #ifdef MEASURE_TIME 464 | if (get_delta_time() > MAX_TIME_BETWEEN_CALLBACKS) 465 | printf("Had to wait too long for JACK callback; scheduling problem?"); 466 | #endif 467 | 468 | if(mseq->usein) 469 | process_midi_input( seq,nframes ); 470 | if(mseq->usefilter) 471 | process_midi_filter( mseq,nframes ); 472 | if(mseq->useout) 473 | process_midi_output( seq,nframes ); 474 | 475 | #ifdef MEASURE_TIME 476 | if (get_delta_time() > MAX_PROCESSING_TIME) 477 | printf("Processing took too long; scheduling problem?"); 478 | #endif 479 | 480 | return (0); 481 | } 482 | 483 | /////////////////////////////////////////////// 484 | //these functions are executed in other threads 485 | /////////////////////////////////////////////// 486 | void queue_midi(MIDI_SEQ* seqq, uint8_t msg[]) 487 | { 488 | MidiMessage ev; 489 | JACK_SEQ* seq = (JACK_SEQ*)seqq->driver; 490 | ev.len = 3; 491 | 492 | // At least with JackOSX, Jack will transmit the bytes verbatim, so make 493 | // sure that we look at the status byte and trim the message accordingly, 494 | // in order not to transmit any invalid MIDI data. 495 | switch (msg[0] & 0xf0) 496 | { 497 | case 0x80: 498 | case 0x90: 499 | case 0xa0: 500 | case 0xb0: 501 | case 0xe0: 502 | break; // 2 data bytes 503 | case 0xc0: 504 | case 0xd0: 505 | ev.len = 2; // 1 data byte 506 | break; 507 | case 0xf0: // system message 508 | switch (msg[0]) 509 | { 510 | case 0xf2: 511 | break; // 2 data bytes 512 | case 0xf1: 513 | case 0xf3: 514 | ev.len = 2; // 1 data byte 515 | break; 516 | case 0xf6: 517 | case 0xf8: 518 | case 0xf9: 519 | case 0xfa: 520 | case 0xfb: 521 | case 0xfc: 522 | case 0xfe: 523 | case 0xff: 524 | ev.len = 1; // no data byte 525 | break; 526 | default: 527 | // ignore unknown (most likely sysex) 528 | return; 529 | } 530 | break; 531 | default: 532 | return; // not a valid MIDI message, bail out 533 | } 534 | 535 | ev.data[0] = msg[0]; 536 | ev.data[1] = msg[1]; 537 | ev.data[2] = msg[2]; 538 | 539 | ev.time = jack_frame_time(seq->jack_client); 540 | queue_message(seq->ringbuffer_out,&ev); 541 | } 542 | 543 | int pop_midi(MIDI_SEQ* seqq, uint8_t msg[]) 544 | { 545 | int read; 546 | MidiMessage ev; 547 | JACK_SEQ* seq = (JACK_SEQ*)seqq->driver; 548 | 549 | if (jack_ringbuffer_read_space(seq->ringbuffer_in)) 550 | { 551 | read = jack_ringbuffer_peek(seq->ringbuffer_in, (char *)&ev, sizeof(ev)); 552 | 553 | if (read != sizeof(ev)) 554 | { 555 | //warn_from_jack_thread_context("Short read from the ringbuffer, possible note loss."); 556 | jack_ringbuffer_read_advance(seq->ringbuffer_in, read); 557 | return -1; 558 | } 559 | 560 | jack_ringbuffer_read_advance(seq->ringbuffer_in, sizeof(ev)); 561 | 562 | memcpy(msg,ev.data,ev.len); 563 | 564 | return ev.len; 565 | } 566 | else 567 | return 0; 568 | } 569 | 570 | //////////////////////////////// 571 | //this is run in the main thread 572 | //////////////////////////////// 573 | int 574 | init_midi_seq(MIDI_SEQ* mseq, uint8_t verbose, const char* clientname) 575 | { 576 | int err; 577 | JACK_SEQ* seq; 578 | 579 | mseq->nnotes = 0; 580 | mseq->old_filter = 0; 581 | seq = (JACK_SEQ*)malloc(sizeof(JACK_SEQ)); 582 | mseq->driver = seq; 583 | if(verbose)printf("opening client...\n"); 584 | seq->jack_client = jack_client_open(clientname, JackNullOption, NULL); 585 | 586 | if (seq->jack_client == NULL) 587 | { 588 | printf("Could not connect to the JACK server; run jackd first?\n"); 589 | free(seq); 590 | return 0; 591 | } 592 | 593 | if(verbose)printf("assigning process callback...\n"); 594 | err = jack_set_process_callback(seq->jack_client, process_callback, (void*)mseq); 595 | if (err) 596 | { 597 | printf("Could not register JACK process callback.\n"); 598 | free(seq); 599 | return 0; 600 | } 601 | 602 | if(mseq->usein) 603 | { 604 | 605 | if(verbose)printf("initializing JACK input: \ncreating ringbuffer...\n"); 606 | seq->ringbuffer_in = jack_ringbuffer_create(RINGBUFFER_SIZE); 607 | 608 | if (seq->ringbuffer_in == NULL) 609 | { 610 | printf("Cannot create JACK ringbuffer.\n"); 611 | free(seq); 612 | return 0; 613 | } 614 | 615 | jack_ringbuffer_mlock(seq->ringbuffer_in); 616 | 617 | seq->input_port = jack_port_register(seq->jack_client, "midi_in", JACK_DEFAULT_MIDI_TYPE, 618 | JackPortIsInput, 0); 619 | 620 | if (seq->input_port == NULL) 621 | { 622 | printf("Could not register JACK port.\n"); 623 | free(seq); 624 | return 0; 625 | } 626 | } 627 | if(mseq->useout) 628 | { 629 | 630 | if(verbose)printf("initializing JACK output: \ncreating ringbuffer...\n"); 631 | seq->ringbuffer_out = jack_ringbuffer_create(RINGBUFFER_SIZE); 632 | 633 | if (seq->ringbuffer_out == NULL) 634 | { 635 | printf("Cannot create JACK ringbuffer.\n"); 636 | free(seq); 637 | return 0; 638 | } 639 | 640 | jack_ringbuffer_mlock(seq->ringbuffer_out); 641 | 642 | seq->output_port = jack_port_register(seq->jack_client, "midi_out", JACK_DEFAULT_MIDI_TYPE, 643 | JackPortIsOutput, 0); 644 | 645 | if (seq->output_port == NULL) 646 | { 647 | printf("Could not register JACK port.\n"); 648 | free(seq); 649 | return 0; 650 | } 651 | } 652 | if(mseq->usefilter) 653 | { 654 | if(verbose)printf("initializing JACK midi filter in/out pair...\n"); 655 | seq->filter_in_port = jack_port_register(seq->jack_client, "filter_in", JACK_DEFAULT_MIDI_TYPE, 656 | JackPortIsInput, 0); 657 | seq->filter_out_port = jack_port_register(seq->jack_client, "filter_out", JACK_DEFAULT_MIDI_TYPE, 658 | JackPortIsOutput, 0); 659 | 660 | if (seq->filter_in_port == NULL || seq->filter_out_port == NULL) 661 | { 662 | printf("Could not register JACK port.\n"); 663 | free(seq); 664 | return 0; 665 | } 666 | } 667 | 668 | if (jack_activate(seq->jack_client)) 669 | { 670 | printf("Cannot activate JACK client.\n"); 671 | free(seq); 672 | return 0; 673 | } 674 | return 1; 675 | } 676 | 677 | void close_midi_seq(MIDI_SEQ* mseq) 678 | { 679 | JACK_SEQ* seq = (JACK_SEQ*)mseq->driver; 680 | if(mseq->useout)jack_ringbuffer_free(seq->ringbuffer_out); 681 | if(mseq->usein)jack_ringbuffer_free(seq->ringbuffer_in); 682 | free(seq); 683 | } 684 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //osc2midi.m 3 | 4 | //main file for the osc2midi utility 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include//only for usleep 13 | #include"pair.h" 14 | #include"oscserver.h" 15 | #include"converter.h" 16 | #include"midiseq.h" 17 | #include"ht_stuff.h" 18 | 19 | #ifndef PREFIX 20 | #define PREFIX "/usr/local" 21 | #endif 22 | 23 | uint8_t quit = 0; 24 | 25 | void quitter(int sig) 26 | { 27 | quit = 1; 28 | } 29 | 30 | void usage() 31 | { 32 | printf("osc2midi - a linux OSC to MIDI bridge\n"); 33 | printf("\n"); 34 | printf("\n"); 35 | printf("USAGE:\n"); 36 | printf(" osc2midi [-option ...]\n"); 37 | printf("\n"); 38 | printf("OPTIONS:\n"); 39 | printf(" -v verbose mode\n"); 40 | printf(" -p set OSC server port\n"); 41 | printf(" -m set mapping file by name or path\n"); 42 | printf(" -a address of OSC client for midi->OSC, \n"); 43 | printf(" -c set default MIDI channel\n"); 44 | printf(" -vel set default MIDI note velocity\n"); 45 | printf(" -s set default filter shift value\n"); 46 | printf(" -multi multi mode (check all mappings/send multiple messages)\n"); 47 | printf(" -single multi mode off (stop checks after first match)\n"); 48 | printf(" -strict strict matches (check multiple occurrences of variables)\n"); 49 | printf(" -mon only print OSC messages that come into the port\n"); 50 | printf(" -o2m only convert OSC messages to MIDI\n"); 51 | printf(" -m2o only convert MIDI messages to OSC\n"); 52 | printf(" -n dry run: check syntax of map file and exit\n"); 53 | printf(" -name midi client name (default osc2midi)\n"); 54 | printf(" -h show this message\n"); 55 | printf("\n"); 56 | printf("NOTES:\n"); 57 | printf(" By default osc2midi looks for mapping files in /usr/local/share/osc2midi/.\n"); 58 | printf(" See default.omm in that directory on how to create your own mappings.\n"); 59 | printf("\n"); 60 | printf(" Multi mode is heavier: It finds all matches, which is useful if OSC\n"); 61 | printf(" messages contain more data than can be sent in a single MIDI message.\n"); 62 | printf(" By default multi mode is on. Pass -single to disable.\n"); 63 | printf("\n"); 64 | printf(" Strict matches make sure that multiple occurrences of a variable are all\n"); 65 | printf(" matched to the same value when converting an OSC or MIDI message. This\n"); 66 | printf(" incurs a small overhead and is disabled by default; -strict enables it.\n"); 67 | printf("\n"); 68 | 69 | return; 70 | } 71 | 72 | int main(int argc, char** argv) 73 | { 74 | char file[200], port[200], addr[200], clientname[200]; 75 | int i; 76 | lo_address loaddr; 77 | CONVERTER conv; 78 | 79 | if(process_cli_args(argc,argv,file,port,addr,clientname,&conv)) 80 | { 81 | usage(); 82 | return -1; 83 | } 84 | 85 | if(!conv.mon_mode) 86 | { 87 | if(load_map(&conv,file) == -1) 88 | return -1; 89 | if(conv.dry_run) 90 | { 91 | printf("Found %d error(s), exiting\n", conv.errors); 92 | return conv.errors?-1:0; 93 | } 94 | else if(conv.errors > 0) 95 | { 96 | printf("Found %d error(s)\n", conv.errors); 97 | } 98 | if( (i = check_pair_set_for_filter(conv.p,conv.npairs)) ) 99 | { 100 | conv.seq.usefilter = true; 101 | conv.seq.filter = &conv.filter; 102 | printf("Found pair %i with filter functions, creating midi filter in/out pair.\n", i); 103 | } 104 | } 105 | else if(conv.verbose) 106 | printf("Monitor mode, incoming OSC messages will only be printed.\n"); 107 | 108 | //start the server 109 | lo_server_thread st; 110 | if(conv.convert > -1) 111 | { 112 | st = start_osc_server(port,&conv); 113 | conv.seq.useout = true; 114 | } 115 | else 116 | { 117 | conv.seq.useout = false; 118 | } 119 | if(conv.convert < 1) 120 | { 121 | //get address ready to send osc messages to 122 | conv.seq.usein = true; 123 | loaddr = lo_address_new_from_url(addr); 124 | printf(" sending osc messages to address %s\n",addr); 125 | } 126 | else 127 | { 128 | conv.seq.usein = false; 129 | } 130 | 131 | //start midi client 132 | if(!conv.mon_mode) 133 | { 134 | if(!init_midi_seq(&conv.seq,conv.verbose,clientname)) 135 | { 136 | printf("MIDI connection failed"); 137 | return -1; 138 | } 139 | } 140 | 141 | if(conv.verbose) 142 | printf("Ready.\n"); 143 | fflush(stdout); 144 | 145 | signal(SIGINT, quitter); 146 | while(!quit) 147 | { 148 | if(conv.convert < 1) 149 | { 150 | convert_midi_in(loaddr,&conv); 151 | usleep(1000); 152 | } 153 | else 154 | usleep(50000); 155 | } 156 | 157 | //stop everything 158 | printf("\nquitting...\n"); 159 | if(!conv.mon_mode) 160 | { 161 | if(conv.verbose) 162 | printf(" closing midi ports\n"); 163 | close_midi_seq(&conv.seq); 164 | } 165 | if(conv.convert > -1) 166 | { 167 | if(conv.verbose) 168 | printf(" closing osc server\n"); 169 | stop_osc_server(st); 170 | } 171 | if(conv.convert < 1) 172 | { 173 | lo_address_free(loaddr); 174 | } 175 | return 0; 176 | } 177 | -------------------------------------------------------------------------------- /src/midiseq.h: -------------------------------------------------------------------------------- 1 | #ifndef MIDI_SEQ_H 2 | #define MIDI_SEQ_H 3 | #include 4 | #include 5 | 6 | //general midi sequencer data 7 | typedef struct _mseq 8 | { 9 | void* driver; 10 | bool usein; 11 | bool useout; 12 | bool usefilter; 13 | int8_t* filter; 14 | int8_t old_filter; 15 | //keep track of on notes to jump octaves mid note 16 | uint8_t notechan[127]; 17 | uint8_t note[127]; 18 | uint8_t notevel[127]; 19 | uint8_t nnotes; 20 | } MIDI_SEQ; 21 | 22 | int init_midi_seq(MIDI_SEQ* seq, uint8_t verbose, const char* clientname); 23 | void close_midi_seq(MIDI_SEQ* seq); 24 | void queue_midi(MIDI_SEQ* seqq, uint8_t msg[]); 25 | int pop_midi(MIDI_SEQ* seqq, uint8_t msg[]); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/oscserver.c: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //oscserver.c 3 | //modified from the example code from the liblo documentation 4 | #include 5 | #include 6 | #include 7 | 8 | #include "lo/lo.h" 9 | #include "pair.h" 10 | #include "oscserver.h" 11 | #include "converter.h" 12 | #include "midiseq.h" 13 | 14 | int done = 0; 15 | 16 | void error(int num, const char *m, const char *path); 17 | 18 | int mon_handler(const char *path, const char *types, lo_arg ** argv, 19 | int argc, void *data, void *user_data); 20 | int msg_handler(const char *path, const char *types, lo_arg ** argv, 21 | int argc, void *data, void *user_data); 22 | 23 | 24 | lo_server_thread start_osc_server(char* port, CONVERTER* data) 25 | { 26 | /* start a new server on port 7770 */ 27 | lo_server_thread st = lo_server_thread_new(port, error); 28 | 29 | /* add method that will match any path and args */ 30 | if(data->mon_mode) 31 | lo_server_thread_add_method(st, NULL, NULL, mon_handler, NULL); 32 | else 33 | lo_server_thread_add_method(st, NULL, NULL, msg_handler, data); 34 | 35 | lo_server_thread_start(st); 36 | printf("starting osc server on port %s\n",port); 37 | return st; 38 | } 39 | 40 | 41 | int stop_osc_server(lo_server_thread st) 42 | { 43 | lo_server_thread_free(st); 44 | 45 | return 0; 46 | } 47 | 48 | void error(int num, const char *msg, const char *path) 49 | { 50 | printf("liblo server error %d in path %s: %s\n", num, path, msg); 51 | fflush(stdout); 52 | } 53 | 54 | /* catch any incoming messages and display them. returning 1 means that the 55 | * message has not been fully handled and the server should try other methods */ 56 | int mon_handler(const char *path, const char *types, lo_arg ** argv, 57 | int argc, void *data, void *user_data) 58 | { 59 | int i; 60 | 61 | printf("%s ", path); 62 | for (i = 0; i < argc; i++) 63 | { 64 | printf("%c", types[i]); 65 | } 66 | for (i = 0; i < argc; i++) 67 | { 68 | printf(", "); 69 | lo_arg_pp((lo_type)types[i], argv[i]); 70 | } 71 | printf("\n\n"); 72 | fflush(stdout); 73 | 74 | return 0; 75 | } 76 | 77 | //this handles the osc to midi conversions 78 | int msg_handler(const char *path, const char *types, lo_arg ** argv, 79 | int argc, void *data, void *user_data) 80 | { 81 | int i,j,n; 82 | uint8_t first = 1; 83 | uint8_t midi[3]; 84 | CONVERTER* conv = (CONVERTER*)user_data; 85 | 86 | for(j=0; jnpairs; j++) 87 | { 88 | PAIRHANDLE ph = conv->p[j]; 89 | if( (n = try_match_osc(ph,(char *)path,(char *)types,argv,argc,conv->strict_match,&(conv->glob_chan),&(conv->glob_vel),&(conv->filter),midi)) ) 90 | { 91 | if(!conv->multi_match) 92 | j = conv->npairs; 93 | if(conv->verbose) 94 | { 95 | if(first) 96 | printf("matches found:\n"); 97 | first = 0; 98 | printf(" %s ", path); 99 | for (i = 0; i < argc; i++) 100 | { 101 | printf("%c", types[i]); 102 | } 103 | for (i = 0; i < argc; i++) 104 | { 105 | printf(", "); 106 | lo_arg_pp((lo_type)types[i], argv[i]); 107 | } 108 | printf(" -> "); 109 | if(n>0) 110 | print_midi(ph, midi); 111 | else 112 | printf("%s ( %i )", opcode2cmd(midi[0],1), (int8_t) midi[1]); 113 | printf("\n"); 114 | fflush(stdout); 115 | } 116 | 117 | //push message onto ringbuffer (with timestamp) 118 | if(n>0) 119 | queue_midi(&conv->seq,midi); 120 | } 121 | } 122 | if(conv->verbose && !first) 123 | printf("\n"); 124 | return 0; 125 | } 126 | 127 | //client side 128 | void convert_midi_in(lo_address addr, CONVERTER* data) 129 | { 130 | int i,n; 131 | uint8_t midi[3]; 132 | 133 | while(pop_midi(&data->seq,midi)) 134 | { 135 | char path[200]; 136 | lo_message oscm; 137 | uint8_t first = 1; 138 | 139 | if( (midi[0]&0xF0) == 0x90 && midi[2] == 0x00) 140 | { 141 | //this is actually a noteon 0 which is the same as note-off 142 | //convert it before we try to pair it; 143 | midi[0] -= 0x10; 144 | midi[2] = 64; 145 | } 146 | 147 | for(i=0; inpairs; i++) 148 | { 149 | PAIRHANDLE ph = data->p[i]; 150 | oscm = lo_message_new(); 151 | if( (n = try_match_midi(ph, midi, data->strict_match, &(data->glob_chan), path, oscm)) ) 152 | { 153 | if(!data->multi_match) 154 | i = data->npairs; 155 | if(data->verbose) 156 | { 157 | if(first) 158 | printf("matches found:\n"); 159 | first = 0; 160 | printf(" "); 161 | print_midi(ph, midi); 162 | printf(" -> %s ", path); 163 | /*printf("%s", lo_message_get_types(oscm)); 164 | for (i = 0; i < lo_message_get_argc(oscm); i++) { 165 | printf(", "); 166 | lo_arg_pp((lo_type)types[i], argv[i]); 167 | }*/ 168 | //we'll see how the pp looks 169 | lo_message_pp(oscm); 170 | fflush(stdout); 171 | } 172 | 173 | //send message 174 | lo_send_message(addr,path,oscm); 175 | } 176 | lo_message_free(oscm); 177 | } 178 | if(data->verbose && !first) 179 | printf("\n"); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /src/oscserver.h: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //oscserver.h 3 | #ifndef OSCSERVER_H 4 | #define OSCSERVER_H 5 | #include"converter.h" 6 | #include "lo/lo.h" 7 | 8 | lo_server_thread start_osc_server(char* port,CONVERTER* data); 9 | int stop_osc_server(lo_server_thread st); 10 | void convert_midi_in(lo_address addr, CONVERTER* data); 11 | #endif 12 | -------------------------------------------------------------------------------- /src/pair.h: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | 3 | //pair.h 4 | #ifndef PAIR_H 5 | #define PAIR_H 6 | 7 | #include 8 | #include 9 | #include"hashtable.h" 10 | 11 | typedef void* PAIRHANDLE; 12 | 13 | PAIRHANDLE alloc_pair(char* config, table tab, float** regs, int* nkeys); 14 | void free_pair(PAIRHANDLE ph); 15 | int try_match_osc(PAIRHANDLE ph, char* path, char* types, lo_arg** argv, int argc, 16 | uint8_t strict_match, uint8_t* glob_chan, uint8_t* glob_vel, int8_t* filter, uint8_t msg[]); 17 | int try_match_midi(PAIRHANDLE ph, uint8_t msg[], uint8_t strict_match, uint8_t* glob_chan, char* path, lo_message oscm); 18 | void print_pair(PAIRHANDLE ph); 19 | int check_pair_set_for_filter(PAIRHANDLE* pa, int npair); 20 | char * opcode2cmd(uint8_t opcode, uint8_t noteoff); 21 | void print_midi(PAIRHANDLE ph, uint8_t msg[]); 22 | 23 | #endif 24 | --------------------------------------------------------------------------------