├── README.md ├── examples ├── accelerometer_xy │ ├── ReadMe.md │ ├── accelerometer-tosc-example.gif │ └── accelerometer_example.tosc ├── address_controls │ ├── ReadMe.md │ ├── SIMPLE_address_controls.tosc │ └── address_controls.gif ├── battery_level │ ├── README.md │ ├── battery_level.tosc │ └── pics │ │ ├── preview.gif │ │ └── script.png ├── bpm_tap │ ├── README.md │ ├── bpm_tap_01.tosc │ └── pics │ │ ├── preview.gif │ │ └── script.png ├── copy_value │ ├── README.md │ ├── copy_value.tosc │ └── pics │ │ ├── preview.gif │ │ └── preview2.png ├── date_time │ ├── README.md │ ├── date_time_clock.tosc │ └── pics │ │ └── preview_1.gif ├── delayed_and_repetitive_actions │ ├── README.md │ ├── delayed_and_repetitive_actions.tosc │ └── pics │ │ ├── preview_1.gif │ │ ├── script_1.png │ │ └── script_2.png ├── fade_example │ ├── README.md │ ├── fade_example.tosc │ └── pics │ │ └── preview.gif ├── fader_incdec │ ├── README.md │ ├── fader_incdec.tosc │ └── pics │ │ └── preview.gif ├── fader_two_value_responsefactor │ ├── README.md │ ├── fader_dynamic_responsefactor.tosc │ └── pics │ │ ├── fader_two_value_responsefactor_preview.gif │ │ └── fader_two_value_responsefactor_testing_ground.gif ├── find&findAll │ ├── README.md │ ├── find&findAll.tosc │ └── pics │ │ ├── preview.png │ │ ├── script.png │ │ └── script2.png ├── grid_label │ ├── GRID_switchable_exclusive_mode.tosc │ ├── Grid_label.tosc │ ├── README.md │ ├── SIMPLE_set_GRID_label_texts.tosc │ └── pics │ │ ├── g_01.png │ │ ├── g_05.png │ │ ├── g_06.gif │ │ ├── grid_text_lock.png │ │ ├── preview_1.gif │ │ ├── preview_2.gif │ │ ├── script_button.png │ │ ├── script_direct.png │ │ └── script_grid.png ├── group_iterator │ ├── README.md │ ├── group_iterator.tosc │ └── pics │ │ ├── preview_1.gif │ │ ├── preview_2.gif │ │ ├── script_1.png │ │ └── script_2.png ├── many_properties │ ├── ReadMe.md │ ├── many_properties.PNG │ └── many_properties.tosc ├── master_fader_mix │ ├── README.md │ ├── master_fader_mix.tosc │ └── preview.gif ├── midi_pgm_incdec │ ├── README.md │ ├── pgm_incdec.tosc │ ├── pgm_incdec_lua_only.tosc │ └── pics │ │ ├── lua_only.png │ │ ├── preview.gif │ │ ├── tag_in_CC_value.png │ │ └── tag_in_PGM.png ├── multitoggle_1d │ ├── Multitoggle_Radio_Grid.tosc │ ├── Multitoggle_from_MK1.tosc │ ├── README.md │ ├── preview_1.gif │ ├── preview_2.gif │ └── radio_grid_script.png ├── randomizer │ ├── README.md │ ├── pics │ │ ├── preview_1.gif │ │ └── script.png │ └── randomizer.tosc ├── shuffle_table │ ├── README.md │ ├── pics │ │ ├── preview_1.gif │ │ └── script.png │ └── shuffle_table.tosc └── simple_properties │ ├── README.md │ ├── lm_bundle.png │ ├── preview_sbsap.gif │ ├── preview_sp.gif │ ├── properties_localmessage.tosc │ └── size_color_position_LuaAndLocal.tosc └── modules ├── README.md ├── dropdown_scroll ├── README.md ├── dropdown_scroll.tosc └── pics │ ├── direct_midi_osc.png │ ├── preview.gif │ ├── preview_scrollable.gif │ └── settings.png ├── dropdown_static ├── README.md ├── dropdown_static.tosc └── pics │ ├── direct_midi_osc.png │ ├── preview.gif │ ├── preview_small.gif │ └── settings.png ├── multitoggle ├── Multitoggle_MIDI.tosc ├── Multitoggle_OSC.tosc ├── ReadMe.md └── pics │ └── Animation.gif └── numpad ├── Numpad_basic.tosc ├── README.md └── pics ├── direct_midi_osc.png ├── hidebig.gif ├── hidesmall.gif ├── numpad.gif ├── numpad.png ├── preview3.gif ├── set_limit_size.png ├── tag_interface.gif └── tag_interface.png /README.md: -------------------------------------------------------------------------------- 1 | ## TouchOSC examples and modules 2 | 3 | Get in touch with us via [Discord](https://discord.gg/TXz23QUeQC) and the [Facebook group](https://www.facebook.com/groups/TouchOSCTemplatesMakers) 4 | 5 | ### ![Examples](/examples) 6 | 7 | A loose collection of many different examples to achieve lighter or heavier tasks. 8 | They include local messages, scripting and shall provide an entry into building your own cool interfaces, features and extensions. 9 | 10 | ### ![Modules](/modules) 11 | 12 | The modules are ready to use community made controls with extended functionality. 13 | 14 | 15 | --- 16 | 17 | -------------------------------------------------------------------------------- /examples/accelerometer_xy/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Example of using the accelerometer on your device to control XY-values 2 | 3 | Simple smoothing is applied to the input values to reduce jitter. 4 | (change the smoothSamples variable, smaller value makes the control 5 | more responsive, larger value makes it more stable but with slower response) 6 | 7 | ![accelerometer_example](accelerometer-tosc-example.gif) 8 | 9 | by Eero Pitkänen 10 | -------------------------------------------------------------------------------- /examples/accelerometer_xy/accelerometer-tosc-example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/accelerometer_xy/accelerometer-tosc-example.gif -------------------------------------------------------------------------------- /examples/accelerometer_xy/accelerometer_example.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/accelerometer_xy/accelerometer_example.tosc -------------------------------------------------------------------------------- /examples/address_controls/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## How to address controls with 'parent' & 'children' in Lua 2 | 3 | ![moving faders](address_controls.gif) 4 | 5 | This template shows you how to address controls with 6 | 'parent' & 'children' to change their properties with Lua. 7 | 8 | Depending on the pressed button we change the text of 9 | 3 labels. One in the root of the template (red), one in a group 10 | (yellow) and one on a page in a pager (green). 11 | 12 | The blue button uses handles to make the code more 13 | readable. 14 | 15 | Have a look at the code in the buttons (double-click the group and pager to enter them and access the buttons). 16 | 17 | Also take a look at the following example showing how to use the find() and findAll() in more detail: 18 | https://github.com/F-l-i-x/TouchOSC/tree/main/examples/find%26findAll -------------------------------------------------------------------------------- /examples/address_controls/SIMPLE_address_controls.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/address_controls/SIMPLE_address_controls.tosc -------------------------------------------------------------------------------- /examples/address_controls/address_controls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/address_controls/address_controls.gif -------------------------------------------------------------------------------- /examples/battery_level/README.md: -------------------------------------------------------------------------------- 1 | ## ![using getBatteryLevel()](battery_level.tosc) 2 | 3 | ### Overview 4 | 5 | This example shows how to utilize the getBatteryLevel() function, and applies it to 3 different controls. 6 | The battery level is continuously checked every 5 seconds. Some controls use color changes to imprve visibility of low battery levels. 7 | 8 | ![overview](pics/preview.gif) 9 | 10 | 11 | Here is the script of the included the label: 12 | 13 | ![script](pics/script.png) 14 | 15 | 16 | ### getBatteryLevel() is currently (TouchOSC v1.1.0.132) not working under Android and will always return 1.0 (full battery) 17 | 18 | A fix is expected soon. 19 | 20 | --- 21 | -------------------------------------------------------------------------------- /examples/battery_level/battery_level.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/battery_level/battery_level.tosc -------------------------------------------------------------------------------- /examples/battery_level/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/battery_level/pics/preview.gif -------------------------------------------------------------------------------- /examples/battery_level/pics/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/battery_level/pics/script.png -------------------------------------------------------------------------------- /examples/bpm_tap/README.md: -------------------------------------------------------------------------------- 1 | ## BPM counter example/module 2 | 3 | Calculate a simple mean BPM values from a ring buffer of meassured times between button presses. 4 | 5 | ![delayed osc](pics/preview.gif) 6 | 7 | we use a list as a ringbuffer. Indexing by using modulo will cycle the needed index. 8 | 9 | ![delayed osc](pics/script.png) 10 | 11 | ```lua 12 | 13 | local last = getMillis() 14 | local ring = {0, 0, 0, 0, 0} -- the ring buffer list we will write the times into 15 | local i = 1 16 | 17 | function onValueChanged(key) 18 | -- when touch down 19 | if key == 'touch' and self.values.touch == true then 20 | 21 | -- store delta time 22 | local deltaT = getMillis() - last 23 | 24 | -- update old time 25 | last = getMillis() 26 | 27 | -- only count a beat if time difference is smaller 3 sec. 28 | if deltaT < 3000 then 29 | 30 | -- write time difference into the ring buffer list 31 | ring[i] = deltaT 32 | 33 | -- use modulo to get a looping index 34 | i = (i % 5) + 1 35 | 36 | local avg = 0 37 | 38 | -- calculate the current average of the whole ringbuffer 39 | for j = 1,#ring do 40 | avg = avg + ring[j] 41 | end 42 | 43 | -- apply value to label, round to one decimal place and calculate BPM from milliseconds 44 | self.parent.children.label1.values.text = math.floor( 60000 / (avg / #ring) * 10 )/10 .. " bpm" 45 | 46 | end 47 | end 48 | end 49 | 50 | ``` 51 | 52 | --- 53 | -------------------------------------------------------------------------------- /examples/bpm_tap/bpm_tap_01.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/bpm_tap/bpm_tap_01.tosc -------------------------------------------------------------------------------- /examples/bpm_tap/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/bpm_tap/pics/preview.gif -------------------------------------------------------------------------------- /examples/bpm_tap/pics/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/bpm_tap/pics/script.png -------------------------------------------------------------------------------- /examples/copy_value/README.md: -------------------------------------------------------------------------------- 1 | ## Example for copying values by local messages and lua script 2 | 3 | ![moving faders](pics/preview.gif) 4 | 5 | Here you can see the local messages (with scaling) for changing fader4 and fader5, and the script doing the same for fader2 and fader3. 6 | 7 | ![moving faders](pics/preview2.png) 8 | 9 | Script example taken from Jörn Lengwenings, syntax inspired by Max Anderson. 10 | -------------------------------------------------------------------------------- /examples/copy_value/copy_value.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/copy_value/copy_value.tosc -------------------------------------------------------------------------------- /examples/copy_value/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/copy_value/pics/preview.gif -------------------------------------------------------------------------------- /examples/copy_value/pics/preview2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/copy_value/pics/preview2.png -------------------------------------------------------------------------------- /examples/date_time/README.md: -------------------------------------------------------------------------------- 1 | ## ![using date() and time()](date_time_clock.tosc) 2 | 3 | ### Overview 4 | 5 | This example shows how to utilize the getDate() and getTime() function, and applies it to 2 separate labels, showing Date in non US and time in 24hrs format. 6 | It also includes a useless clock, reading all 4 values from getTime(). 7 | 8 | 9 | ![overview](pics/preview_1.gif) 10 | 11 | 12 | --- 13 | -------------------------------------------------------------------------------- /examples/date_time/date_time_clock.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/date_time/date_time_clock.tosc -------------------------------------------------------------------------------- /examples/date_time/pics/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/date_time/pics/preview_1.gif -------------------------------------------------------------------------------- /examples/delayed_and_repetitive_actions/README.md: -------------------------------------------------------------------------------- 1 | ## ![Example to achieve delayed and repetitive actions](delayed_and_repetitive_actions.tosc) 2 | 3 | Implements different repetitive and delayed actions via scripting, utilising a timer based on getMillis() and the update() function for non blocking functionality. 4 | 5 | ![delayed repetive actions](pics/preview_1.gif) 6 | 7 | 8 | Here is the script from the first button, implementing two actions with delay. 9 | 10 | ![script1](pics/script_1.png) 11 | 12 | Some hard- or software (like the Behringer X32) need continuous polling or subscription renewal in a given timeframe, the second button implents this: 13 | 14 | ![script1](pics/script_2.png) 15 | -------------------------------------------------------------------------------- /examples/delayed_and_repetitive_actions/delayed_and_repetitive_actions.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/delayed_and_repetitive_actions/delayed_and_repetitive_actions.tosc -------------------------------------------------------------------------------- /examples/delayed_and_repetitive_actions/pics/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/delayed_and_repetitive_actions/pics/preview_1.gif -------------------------------------------------------------------------------- /examples/delayed_and_repetitive_actions/pics/script_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/delayed_and_repetitive_actions/pics/script_1.png -------------------------------------------------------------------------------- /examples/delayed_and_repetitive_actions/pics/script_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/delayed_and_repetitive_actions/pics/script_2.png -------------------------------------------------------------------------------- /examples/fade_example/README.md: -------------------------------------------------------------------------------- 1 | ## Example for automatic fades 2 | 3 | Two buttons, one fader. First example fadwes between 0 and 1, second example fades between last stored x value and 0. 4 | 5 | ![fader and buttons](pics/preview.gif) 6 | 7 | 8 | The scripts make use of 'findByName()', 'onReceiveNotify()', 'update()', 'onValueChanged()'. 9 | 10 | -------------------------------------------------------------------------------- /examples/fade_example/fade_example.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fade_example/fade_example.tosc -------------------------------------------------------------------------------- /examples/fade_example/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fade_example/pics/preview.gif -------------------------------------------------------------------------------- /examples/fader_incdec/README.md: -------------------------------------------------------------------------------- 1 | ## Example for incrementing and decrementing a fader in 127 MIDI steps 2 | 3 | 4 | ![incdec](pics/preview.gif) 5 | 6 | 7 | For further explanation, see the commented scripts on the buttons in the template. 8 | -------------------------------------------------------------------------------- /examples/fader_incdec/fader_incdec.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fader_incdec/fader_incdec.tosc -------------------------------------------------------------------------------- /examples/fader_incdec/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fader_incdec/pics/preview.gif -------------------------------------------------------------------------------- /examples/fader_two_value_responsefactor/README.md: -------------------------------------------------------------------------------- 1 | ## Example for fader with user-definable two-value coarse / fine control. 2 | 3 | One fader, two levels of control precision. 4 | 5 | ![coarse / fine control fader](pics/fader_two_value_responsefactor_preview.gif) 6 | 7 | Using easy user-defined variables, you can set up a fader with precision side and a 1:1 movement side with a customisable split point. 8 | 9 | The split runs along the movement direction of the fader, so can work in any orientation. 10 | 11 | ![testing ground for the fader](pics/fader_two_value_responsefactor_testing_ground.gif) 12 | 13 | Included in the file is a Testing fader with controls for quickly trying out different responseFactors on the left or right, setting the split point, choosing your orientation, and a helpful overlay on the Testing fader to see how the split point and left / right responseFactors are applied to the fader. 14 | 15 | The Production fader can be easily set up in the Script by setting the rF_left, rF_right and rF_split. This fader can then be copied to any project and the output x value can be used in the normal way via MIDI messages, OSC messages, or Local messages. 16 | 17 | Further information is included in the Script itself, with comments to help break down what is going on. 18 | -------------------------------------------------------------------------------- /examples/fader_two_value_responsefactor/fader_dynamic_responsefactor.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fader_two_value_responsefactor/fader_dynamic_responsefactor.tosc -------------------------------------------------------------------------------- /examples/fader_two_value_responsefactor/pics/fader_two_value_responsefactor_preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fader_two_value_responsefactor/pics/fader_two_value_responsefactor_preview.gif -------------------------------------------------------------------------------- /examples/fader_two_value_responsefactor/pics/fader_two_value_responsefactor_testing_ground.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/fader_two_value_responsefactor/pics/fader_two_value_responsefactor_testing_ground.gif -------------------------------------------------------------------------------- /examples/find&findAll/README.md: -------------------------------------------------------------------------------- 1 | ## ![find() and findAll() to create references to single or multiple objects](find&findAll.tosc) 2 | 3 | This example shows how to use use the different 'find' functions. 4 | 5 | ![find](pics/preview.png) 6 | 7 | The 'findAll' function returns a list of all found elements that can be iterated: 8 | 9 | ![script1](pics/script.png) 10 | 11 | 'find' and 'findAll' accept an optional boolean parameter, that will make the search descending recursively into all child elements from where it was called. Combining the recursive search with the 'root' reference will allow for a comfortable and complete template wide search from any point in your template. 12 | 13 | ![script2](pics/script2.png) 14 | 15 | 16 | Also take a look at another example about adressing controls by using 'parent.children...' https://github.com/F-l-i-x/TouchOSC/tree/main/examples/address_controls 17 | 18 | See also https://hexler.net/touchosc/manual/script-objects-control for further information. 19 | 20 | --- 21 | -------------------------------------------------------------------------------- /examples/find&findAll/find&findAll.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/find&findAll/find&findAll.tosc -------------------------------------------------------------------------------- /examples/find&findAll/pics/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/find&findAll/pics/preview.png -------------------------------------------------------------------------------- /examples/find&findAll/pics/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/find&findAll/pics/script.png -------------------------------------------------------------------------------- /examples/find&findAll/pics/script2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/find&findAll/pics/script2.png -------------------------------------------------------------------------------- /examples/grid_label/GRID_switchable_exclusive_mode.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/GRID_switchable_exclusive_mode.tosc -------------------------------------------------------------------------------- /examples/grid_label/Grid_label.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/Grid_label.tosc -------------------------------------------------------------------------------- /examples/grid_label/README.md: -------------------------------------------------------------------------------- 1 | ## GRID Script Tutorial 2 | 3 | ### General concept 4 | 5 | GRIDs are basically grouped controls but they feature some already built in functionality like adaptive resizing and an exclusive mode for buttons. 6 | The script of a GRID is inherited to its children and will also be executed in their context. See the scripting log when a simple ```print(self.name)``` is put in a GRIDs script and the template is run: 7 | 8 | 9 | ![script1](pics/g_01.png) 10 | 11 | If you want to implement different fuctionality to different children of the GRID you can use the name as a condition: 12 | ```lua 13 | if self.name == "2" then -- only executed in control 2 14 | self.color.g = 1 -- set green to 1 15 | end 16 | ``` 17 | ![script1](pics/g_05.png) 18 | 19 | Or if you want to have it executed when a particular controls value changes: 20 | ```lua 21 | function onValueChanged(key) 22 | if key == "x" then -- only when x changes 23 | if self.name == "2" then -- only executed in control 2 24 | self.color.g = self.values.x -- change green to controls value 25 | end 26 | end 27 | end 28 | ``` 29 | 30 | ![script1](pics/g_06.gif) 31 | 32 | 33 | 34 | ### GRID with individual labels: 35 | 36 | To ensure that a grid will keep the individual values of its childrens (especially labels), make sure to unlock "current" from "default" values as seen in the follwing picture: 37 | 38 | 39 | 40 | 41 | ![gridlock](pics/grid_text_lock.png) 42 | 43 | ### ![Grid_label.tosc :](Grid_label.tosc) 44 | 45 | This example shows how to use LUA to iterate over the children of a group (in this case a GRID, but behaves the same), and how to index and access their properties or values. 46 | 47 | ![gridlabel](pics/preview_1.gif) 48 | 49 | The button to trigger the labeling notifies the grid with a given name, that the user can set in the script. 50 | 51 | ![button](pics/script_button.png) 52 | 53 | The grid then interates over all of its childs and prepends the name to the index number, thus creating numbered labels. 54 | 55 | ![gridscript](pics/script_grid.png) 56 | 57 | 58 | ### ![SIMPLE_set_GRID_label_texts-3.tosc :](SIMPLE_set_GRID_label_texts-3.tosc) 59 | 60 | A similar functionality, but done by directly adressing the lables from the buttons and without any iteration. 61 | 62 | ![gridlabel](pics/preview_2.gif) 63 | 64 | ![gridlabel](pics/script_direct.png) 65 | -------------------------------------------------------------------------------- /examples/grid_label/SIMPLE_set_GRID_label_texts.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/SIMPLE_set_GRID_label_texts.tosc -------------------------------------------------------------------------------- /examples/grid_label/pics/g_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/g_01.png -------------------------------------------------------------------------------- /examples/grid_label/pics/g_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/g_05.png -------------------------------------------------------------------------------- /examples/grid_label/pics/g_06.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/g_06.gif -------------------------------------------------------------------------------- /examples/grid_label/pics/grid_text_lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/grid_text_lock.png -------------------------------------------------------------------------------- /examples/grid_label/pics/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/preview_1.gif -------------------------------------------------------------------------------- /examples/grid_label/pics/preview_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/preview_2.gif -------------------------------------------------------------------------------- /examples/grid_label/pics/script_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/script_button.png -------------------------------------------------------------------------------- /examples/grid_label/pics/script_direct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/script_direct.png -------------------------------------------------------------------------------- /examples/grid_label/pics/script_grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/grid_label/pics/script_grid.png -------------------------------------------------------------------------------- /examples/group_iterator/README.md: -------------------------------------------------------------------------------- 1 | ## ![single and recursive iterations over groups ](group_iterator.tosc) 2 | 3 | Both examples in one template. 4 | 5 | ### simple single layer solution 6 | 7 | A for loop iterating over the list of group elements setting a color value. 8 | 9 | ![group_iterator](pics/preview_1.gif) 10 | 11 | 12 | ![group_script](pics/script_1.png) 13 | 14 | 15 | ### a recursive function solution to traverse trough all subgroups 16 | 17 | ![group_iterator](pics/preview_2.gif) 18 | 19 | ![group_script](pics/script_2.png) 20 | 21 | The same functionality could be achieved using 'findAll(xxx, true)' at https://github.com/F-l-i-x/TouchOSC/tree/main/examples/find%26findAll 22 | 23 | --- 24 | -------------------------------------------------------------------------------- /examples/group_iterator/group_iterator.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/group_iterator/group_iterator.tosc -------------------------------------------------------------------------------- /examples/group_iterator/pics/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/group_iterator/pics/preview_1.gif -------------------------------------------------------------------------------- /examples/group_iterator/pics/preview_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/group_iterator/pics/preview_2.gif -------------------------------------------------------------------------------- /examples/group_iterator/pics/script_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/group_iterator/pics/script_1.png -------------------------------------------------------------------------------- /examples/group_iterator/pics/script_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/group_iterator/pics/script_2.png -------------------------------------------------------------------------------- /examples/many_properties/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Example for setting different properties by local messages and lua script 2 | 3 | ![moving faders](many_properties.PNG) 4 | 5 | Not all properties go together, e.g. a triangle can't have round corners. 6 | 7 | by Jörn Lengwenings 8 | -------------------------------------------------------------------------------- /examples/many_properties/many_properties.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/many_properties/many_properties.PNG -------------------------------------------------------------------------------- /examples/many_properties/many_properties.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/many_properties/many_properties.tosc -------------------------------------------------------------------------------- /examples/master_fader_mix/README.md: -------------------------------------------------------------------------------- 1 | ## Example for controlling faders relatively by a master fader 2 | 3 | 4 | ![mix](preview.gif) 5 | 6 | 7 | For further explanation, see the commented scripts on the buttons in the template. 8 | -------------------------------------------------------------------------------- /examples/master_fader_mix/master_fader_mix.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/master_fader_mix/master_fader_mix.tosc -------------------------------------------------------------------------------- /examples/master_fader_mix/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/master_fader_mix/preview.gif -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/README.md: -------------------------------------------------------------------------------- 1 | ## Increment - decrement for MIDI messages 2 | 3 | ### ![pgm_incdec.tosc :](pgm_incdec.tosc) 4 | 5 | Makes use of the 'tag' property of a button, to store a number beeing used in MIDI or other messages. 6 | Uses local messages between the buttons and the label to update the current variable, and a little script for the in- and decrement of the number in the tags. 7 | 8 | ![properties_localmessages](pics/preview.gif) 9 | 10 | Here you can see how 'tag' is used as a value in MIDI messages. 11 | 12 | ![tag_in_PGM.png](pics/tag_in_PGM.png) 13 | 14 | Here is another example using the tag as a CC value: 15 | 16 | ![tag_in_CC_value.png](pics/tag_in_CC_value.png) 17 | 18 | ### ![pgm_incdec_lua_only.tosc :](pgm_incdec_lua_only.tosc) 19 | 20 | The same funtionality, but without any local messages and without the 'tag' workaround. Therefore MIDI messages must be sent from script aswell. 21 | The first button stores the number as a local variable and does all the job of in/dec and sending the midi messages. The second button just notifys the first to do something. 22 | 23 | ![lua_only.png](pics/lua_only.png) -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/pgm_incdec.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/midi_pgm_incdec/pgm_incdec.tosc -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/pgm_incdec_lua_only.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/midi_pgm_incdec/pgm_incdec_lua_only.tosc -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/pics/lua_only.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/midi_pgm_incdec/pics/lua_only.png -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/midi_pgm_incdec/pics/preview.gif -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/pics/tag_in_CC_value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/midi_pgm_incdec/pics/tag_in_CC_value.png -------------------------------------------------------------------------------- /examples/midi_pgm_incdec/pics/tag_in_PGM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/midi_pgm_incdec/pics/tag_in_PGM.png -------------------------------------------------------------------------------- /examples/multitoggle_1d/Multitoggle_Radio_Grid.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/multitoggle_1d/Multitoggle_Radio_Grid.tosc -------------------------------------------------------------------------------- /examples/multitoggle_1d/Multitoggle_from_MK1.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/multitoggle_1d/Multitoggle_from_MK1.tosc -------------------------------------------------------------------------------- /examples/multitoggle_1d/README.md: -------------------------------------------------------------------------------- 1 | ## Multitoggle examples (exclusive mode) 2 | 3 | ### ![Multitoggle_Radio_Grid.tosc](Multitoggle_Radio_Grid.tosc) 4 | 5 | Dedicated but not restricted to MIDI. All MIDI messages can be set in the scripts individually. Shows the use of arrays, indexing and sending MIDI messages. 6 | 7 | ![multitoggle](preview_2.gif) 8 | 9 | You can see the script interface here: 10 | 11 | ![script](radio_grid_script.png) 12 | 13 | 14 | 15 | ### ![Multitoggle_from_MK1.tosc](Multitoggle_from_MK1.tosc) 16 | 17 | A simple multitoggle derived from a copied control from TouchOSC Mk1. Each button can have its own and independent MIDI messages. 18 | Not convenient, not scaleable but usable. Includes scripts to unset the other buttons for 'exclusive mode'. 19 | 20 | ![multitoggle](preview_1.gif) 21 | 22 | Exclusive mode: When clicked, a button in the group sends its index to its parent (the group)), and the group then 23 | iterates over all of its children (the buttons) and unsets them except for the one which triggered it. -------------------------------------------------------------------------------- /examples/multitoggle_1d/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/multitoggle_1d/preview_1.gif -------------------------------------------------------------------------------- /examples/multitoggle_1d/preview_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/multitoggle_1d/preview_2.gif -------------------------------------------------------------------------------- /examples/multitoggle_1d/radio_grid_script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/multitoggle_1d/radio_grid_script.png -------------------------------------------------------------------------------- /examples/randomizer/README.md: -------------------------------------------------------------------------------- 1 | ## randomizer for a set of controls 2 | 3 | This example shows how to create a randomizer for a set of controls by using their 'tag' property 4 | 5 | ![randomizer](pics/preview_1.gif) 6 | 7 | The script doeas a global recursive search for a certain 'tag' property and stores the references in a list, which is then iterated and each controls x value is set to random between 0. and 1. 8 | 9 | ![randomizer](pics/script.png) 10 | 11 | See also https://github.com/F-l-i-x/TouchOSC/tree/main/examples/find%26findAll and https://hexler.net/touchosc/manual/script-objects-control for further information. 12 | 13 | --- 14 | -------------------------------------------------------------------------------- /examples/randomizer/pics/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/randomizer/pics/preview_1.gif -------------------------------------------------------------------------------- /examples/randomizer/pics/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/randomizer/pics/script.png -------------------------------------------------------------------------------- /examples/randomizer/randomizer.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/randomizer/randomizer.tosc -------------------------------------------------------------------------------- /examples/shuffle_table/README.md: -------------------------------------------------------------------------------- 1 | ## ![Shuffling the contents of a table](shuffle_table.tosc) 2 | 3 | ### Overview 4 | 5 | This example implements a Fisher-Yates- aka Knuth- aka Durstenfeld-shuffle algorithm to efficiently and randomly shuffle the contents of a table. 6 | 7 | ![shuffle_pic](pics/preview_1.gif) 8 | 9 | ### Background: 10 | Shuffling a table or an array of values is a classical optimization problem in computer science and often used to teach time complexity of algorithms. Most quick and dirty solutions won't be much better then O(n²), which means the time cost (cpu time) to solve the problem will scale quadratic to the number of elements in the array/table. 11 | In 1964 Richard Durstenfeld described an efficient (and elegant) algorithm that brought time complexity down to linear behaviour, O(n). But since his algorithm was very close to an older description from two statisticians from the 1930s, its mostly called the "Fisher-Yates"-shuffle and also known as "Knuth"-shuffle after Donald Knuth who made Durstenfelds algorithm popular in 1969. 12 | These topics are a whole research field on its own, called linear programming, and are very very important for the technological advancements in mostly all engineering fields today. 13 | 14 | ### The algorithm 15 | Durstenfeld achieved his linear inplace shuffle by iterating from the end of the table to the beginning, and for each index selecting a random element out of the remaining range and swapping it with the indexed one. 16 | The implementation here is doing a copy of the table first to keep the original data available. 17 | 18 | ![script_pic](pics/script.png) 19 | 20 | One interresting takeaway for LUA beginners should be the line `tbl[i], tbl[j] = tbl[j], tbl[i]` : 21 | Because LUA allows for multiple assignments in the same line but firstly evaluates all values before it executes them, we can swap the fields without needing a third temporary storage field. 22 | 23 | --- 24 | 25 | For further information see also: 26 | - https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle 27 | - https://bost.ocks.org/mike/shuffle/ 28 | - https://blog.codinghorror.com/the-danger-of-naivete/ 29 | 30 | --- 31 | -------------------------------------------------------------------------------- /examples/shuffle_table/pics/preview_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/shuffle_table/pics/preview_1.gif -------------------------------------------------------------------------------- /examples/shuffle_table/pics/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/shuffle_table/pics/script.png -------------------------------------------------------------------------------- /examples/shuffle_table/shuffle_table.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/shuffle_table/shuffle_table.tosc -------------------------------------------------------------------------------- /examples/simple_properties/README.md: -------------------------------------------------------------------------------- 1 | ## Two examples for setting properties by local messages and lua script 2 | 3 | [properties_localmessage.tosc (no Lua):](properties_localmessage.tosc) 4 | 5 | ![properties_localmessages](preview_sp.gif) 6 | 7 | 8 | [size_color_position_LuaAndLocal.tosc :](size_color_position_LuaAndLocal.tosc) 9 | 10 | ![setbuttonsizeandposition](preview_sbsap.gif) 11 | 12 | 13 | Bundled local messages must be set to CONSTANT and its conversion to STRING. 14 | 15 | Color bundles must be provided in HEX. (RRGGBBAA) 16 | Frame bundles for local messages must be 4 values (x;y;w;h) separated by semicolons. 17 | Frame bundles for Lua can be packed by the Rectangle() function. E.g: Rectangle(300,100,50,50) 18 | 19 | ![properties_localmessages](lm_bundle.png) -------------------------------------------------------------------------------- /examples/simple_properties/lm_bundle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/simple_properties/lm_bundle.png -------------------------------------------------------------------------------- /examples/simple_properties/preview_sbsap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/simple_properties/preview_sbsap.gif -------------------------------------------------------------------------------- /examples/simple_properties/preview_sp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/simple_properties/preview_sp.gif -------------------------------------------------------------------------------- /examples/simple_properties/properties_localmessage.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/simple_properties/properties_localmessage.tosc -------------------------------------------------------------------------------- /examples/simple_properties/size_color_position_LuaAndLocal.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/examples/simple_properties/size_color_position_LuaAndLocal.tosc -------------------------------------------------------------------------------- /modules/README.md: -------------------------------------------------------------------------------- 1 | # A collection of reusable modules 2 | 3 | ## Overview 4 | 5 | The modules here are an early approach to achieve reusability of user made TOSC controls for different applications. 6 | They are free to use and can easily be copied into your own project. 7 | ENJOY! 8 | 9 | 10 | --- 11 | 12 | ## ![Dropdown menu scrollable](dropdown_scroll/) 13 | 14 | An easy to use scrollable dropdown menu with up to 10 elements, configurable unfold size and two different outputmodes usable for local, MIDI and OSC messages. 15 | Parameters are set by script but there is no scripting knowledge necessary to use it. 16 | 17 | ![dropdown_scroll](dropdown_scroll/pics/preview.gif) 18 | 19 | --- 20 | 21 | ## ![Dropdown menu static](dropdown_static/) 22 | 23 | An easy to use static dropdown menu with up to 10 elements and two different outputmodes usable for local, MIDI and OSC messages. 24 | Parameters are set by script but there is no scripting knowledge necessary to use it. 25 | 26 | ![dropdown_static](dropdown_static/pics/preview.gif) 27 | 28 | --- 29 | 30 | ## ![Exclusive multitoggles](multitoggle/) 31 | 32 | Known from TouchOSC Mk1, this are 4 different implementations of exclusive multitoggles. 33 | 34 | ![multitoggles](multitoggle/pics/Animation.gif) 35 | 36 | --- 37 | 38 | ## ![The Numpad](numpad/) 39 | 40 | A foldable numpad to change other controls or to directly send the local, MIDI or OSC commands of your desire. 41 | 42 | ![numpad](numpad/pics/preview3.gif) 43 | 44 | 45 | --- 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /modules/dropdown_scroll/README.md: -------------------------------------------------------------------------------- 1 | # A basic scrollable dropdown menu module for reuse in other projects 2 | 3 | ## Overview 4 | 5 | A scrollable dropdown menu with user settable elements, two different outpumodes and a definable size when unfolded. The scrollbar will automatically adapt to the set size. 6 | 7 | It can simply be pasted to your project from the ![dropdown_scroll.tosc :](dropdown_scroll.tosc) template. 8 | 9 | ![numpad](pics/preview.gif) 10 | 11 | ## Interface 12 | 13 | ### To other controls 14 | 15 | The dropdown is a group control and can interface to to other controls trough local messages via its tag property. The tag will be updated when an element is selected after opening the menu, as well as the touch value, to trigger the events in local messages. 16 | 17 | ### Direct MIDI and OSC messages 18 | 19 | Like the local messages, the dropdown can also send MIDI or OSC messages directly. The user just needs to use touch as trigger and tag as the source. Here is a shot from the examples in the template. 20 | 21 | ![directmidiosc](pics/direct_midi_osc.png) 22 | 23 | 24 | ## Settings 25 | 26 | ![setelements](pics/settings.png) 27 | 28 | ### Changing the list elements 29 | 30 | Just add elements to the list as you like but keep the format of the syntax: {"element1", "element2", ...} 31 | 32 | ### Changing the outputmode 33 | 34 | The outputmode can either be "number" OR "text". Since the concept is to store the result in the 'tag' of the group and use it further from there, it does not allow for both. But this could be extended by scripting from the groups script. 35 | 36 | ### Changing the size when dropped down 37 | 38 | The number of elements to show when dropped down (unfolded) can be set by the 'unfoldsize' variable. 39 | 40 | ### Changing the appearance 41 | 42 | Changing the color is done by entering the group and changing the color of all elements. Same for the Fontsize and color. Changing the size needs to adjust the variables and constants in the script of the switch button inside the group. 43 | 44 | --- 45 | There are some workarounds implemented to prevent current issues of Touch OSC, but i can not guarantee 100% functionality or reliability. 46 | This is a first proof of concept prototype for user modules, with a somehow defined interface, but my aim is to extend or change this to a practical, understandable and reliable almost standard, a userbase can agree on and progress with. 47 | Using the 'tag' is a very limited workaround, that fits the use case of this numpad, but also is the only practical one to achieve local messages with, so far. Which i think is madatory for the acceptance of basic modules for users with no experience or interest in scripting. 48 | --- 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /modules/dropdown_scroll/dropdown_scroll.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_scroll/dropdown_scroll.tosc -------------------------------------------------------------------------------- /modules/dropdown_scroll/pics/direct_midi_osc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_scroll/pics/direct_midi_osc.png -------------------------------------------------------------------------------- /modules/dropdown_scroll/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_scroll/pics/preview.gif -------------------------------------------------------------------------------- /modules/dropdown_scroll/pics/preview_scrollable.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_scroll/pics/preview_scrollable.gif -------------------------------------------------------------------------------- /modules/dropdown_scroll/pics/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_scroll/pics/settings.png -------------------------------------------------------------------------------- /modules/dropdown_static/README.md: -------------------------------------------------------------------------------- 1 | # A basic dropdown menu module for reuse in other projects 2 | 3 | ## Overview 4 | 5 | A dropdown menu with user settable elments and two different outpumodes. Automatically scales it unfolded size to the number of elements. 6 | 7 | It can simply be pasted to your project from the ![dropdown_basic.tosc :](dropdown_basic.tosc) template. 8 | 9 | ![numpad](pics/preview.gif) 10 | 11 | ## Interface 12 | 13 | ### To other controls 14 | 15 | The dropdown is a group control and can interface to to other controls trough local messages via its tag property. The tag will be updated when an element is selected after opening the menu, as well as the touch value, to trigger the events in local messages. 16 | 17 | ### Direct MIDI and OSC messages 18 | 19 | Like the local messages, the dropdown can also send MIDI or OSC messages directly. The user just needs to use touch as trigger and tag as the source. Here is a shot from the examples in the template. 20 | 21 | ![directmidiosc](pics/direct_midi_osc.png) 22 | 23 | 24 | ## Settings 25 | 26 | ![setelements](pics/settings.png) 27 | 28 | ### Changing the list elements 29 | 30 | Just add elements to the list as you like but keep the format of the syntax: {"element1", "element2", ...} 31 | 32 | ### Changing the outputmode 33 | 34 | The outputmode can either be "number" OR "text". Since the concept is, to store the result in the 'tag' of the group and use it further from there, it does not allow for both. But this could be extended by scripting from the groups script. 35 | 36 | ### Changing the appearance 37 | 38 | Changing the color is done by entering the group and changing the color of all elements. Same for the Fontsize and color. Changing the size needs to adjust the variables and constants in the script of the switch button inside the group. 39 | 40 | --- 41 | There are some workarounds implemented to prevent current issues of Touch OSC, but i can not guarantee 100% functionality or reliability. 42 | This is a first proof of concept prototype for user modules, with a somehow defined interface, but my aim is to extend or change this to a practical, understandable and reliable almost standard, a userbase can agree on and progress with. 43 | Using the 'tag' is a very limited workaround, that fits the use case of this numpad, but also is the only practical one to achieve local messages with, so far. Which i think is madatory for the acceptance of basic modules for users with no experience or interest in scripting. 44 | --- 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /modules/dropdown_static/dropdown_static.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_static/dropdown_static.tosc -------------------------------------------------------------------------------- /modules/dropdown_static/pics/direct_midi_osc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_static/pics/direct_midi_osc.png -------------------------------------------------------------------------------- /modules/dropdown_static/pics/preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_static/pics/preview.gif -------------------------------------------------------------------------------- /modules/dropdown_static/pics/preview_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_static/pics/preview_small.gif -------------------------------------------------------------------------------- /modules/dropdown_static/pics/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/dropdown_static/pics/settings.png -------------------------------------------------------------------------------- /modules/multitoggle/Multitoggle_MIDI.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/multitoggle/Multitoggle_MIDI.tosc -------------------------------------------------------------------------------- /modules/multitoggle/Multitoggle_OSC.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/multitoggle/Multitoggle_OSC.tosc -------------------------------------------------------------------------------- /modules/multitoggle/ReadMe.md: -------------------------------------------------------------------------------- 1 | # 4 variations of a multitoggle in exclusive mode 2 | 3 | Can send individual MIDI/OSC messages when a button is turned on, superseded and turned off. 4 | Can additionally send a MIDI/OSC message when ANY button is turned on or off. 5 | Messages and target connections (per message) can be set in the script. 6 | 7 | ![multitoggle](pics/Animation.gif) 8 | 9 | To understand which messages are sent in which situation try the OSC version of the multitoggles 10 | as the demo OSC messages contain "on / super(seded) / off" which is easier to follow than with cryptic MIDI messages. 11 | 12 | Look at the scripts for further explanations. 13 | 14 | Read more on the syntax for MIDI messages [here](https://hexler.net/touchosc/manual/script-examples#sending-midi-messages) and on available MIDI message types [here](https://hexler.net/touchosc/manual/script-enumerations#midimessagetype). 15 | Read more on the syntax for OSC messages [here](https://hexler.net/touchosc/manual/script-examples#sending-osc-messages). 16 | 17 | The predecessor - a simple multitoggle example - can be found [here](https://github.com/F-l-i-x/TouchOSC/tree/main/examples/multitoggle_1d) 18 | 19 | by Jörn Lengwenings 20 | 21 | -------------------------------------------------------------------------------- /modules/multitoggle/pics/Animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/multitoggle/pics/Animation.gif -------------------------------------------------------------------------------- /modules/numpad/Numpad_basic.tosc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/Numpad_basic.tosc -------------------------------------------------------------------------------- /modules/numpad/README.md: -------------------------------------------------------------------------------- 1 | # A basic integer numberpad module for reuse in other projects 2 | 3 | ## Overview 4 | 5 | The design of this module is a first approach to achieve reusability of user generated templates within the new version of TouchOSC. 6 | 7 | It features a user definable range, a delete for single digits and a clear function and a variable hide functionality which will shrink the numpad to a very small or bigger button. 8 | 9 | It can simply be pasted to your project from the ![numpad_basic.tosc :](numpad_basic.tosc) template. 10 | 11 | ![numpad](pics/numpad.gif) 12 | 13 | ## Interface 14 | 15 | ### To other controls 16 | 17 | The numpad is a group control and can interface to to other controls trough local messages via its tag property. The tag will be updated when SEND is pressed, as well as the touch value, to trigger the events in the local messages. 18 | Here is an example from the template where you can see how to use the tag to set a label (and other controls). 19 | 20 | ![taginterface](pics/tag_interface.png) ![taginterface](pics/tag_interface.gif) 21 | 22 | 23 | ### Direct MIDI and OSC messages 24 | 25 | Like the local messages, the numpad can also send MIDI or OSC messages directly. The user just needs to use touch as trigger and tag as the source. Here is a shot from the examples in the template. 26 | 27 | ![directmidiosc](pics/direct_midi_osc.png) 28 | 29 | 30 | ### Hide functionality 31 | 32 | When the number display is clicked, the numpad will shrink to one of two possible settings, big or small. This allows for slick integration in other templates without wasting too much space. 33 | 34 | ![hidesmall](pics/hidesmall.gif) --------- ![hidebig](pics/hidebig.gif) 35 | 36 | The size is stored inside of the control and the last state will persist even when switching from edit to live mode and back. 37 | 38 | 39 | ## Settings 40 | 41 | ### Changing the number range and the size of the button when hidden 42 | 43 | The numpads range can be set in the script. It is limited to positive integers at the moment. 44 | The hideButtonSize defines how small the group should geht when hidden. 45 | 46 | ![setlimit](pics/set_limit_size.png) 47 | 48 | --- 49 | There are some workarounds implemented to prevent current issues of Touch OSC, but i can not guarantee 100% functionality or reliability. 50 | This is a first proof of concept prototype for user modules, with a somehow defined interface, but my aim is to extend or change this to a practical, understandable and reliable almost standard, a userbase can agree on and progress with. 51 | Using the 'tag' is a very limited workaround, that fits the use case of this numpad, but also is the only practical one to achieve local messages with, so far. Which i think is madatory for the acceptance of basic modules for users with no experience or interest in scripting. 52 | --- 53 | 54 | Many thanks to Bryan Day for the inspiration of building such a module and the idea of including the hiding functionality. Additional thanks to Jörn Lengwenings for the useful feedback. 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /modules/numpad/pics/direct_midi_osc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/direct_midi_osc.png -------------------------------------------------------------------------------- /modules/numpad/pics/hidebig.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/hidebig.gif -------------------------------------------------------------------------------- /modules/numpad/pics/hidesmall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/hidesmall.gif -------------------------------------------------------------------------------- /modules/numpad/pics/numpad.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/numpad.gif -------------------------------------------------------------------------------- /modules/numpad/pics/numpad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/numpad.png -------------------------------------------------------------------------------- /modules/numpad/pics/preview3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/preview3.gif -------------------------------------------------------------------------------- /modules/numpad/pics/set_limit_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/set_limit_size.png -------------------------------------------------------------------------------- /modules/numpad/pics/tag_interface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/tag_interface.gif -------------------------------------------------------------------------------- /modules/numpad/pics/tag_interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/F-l-i-x/TouchOSC/d54362a0b3e6c10ad030d6b5ddad1f1572516482/modules/numpad/pics/tag_interface.png --------------------------------------------------------------------------------