├── .DS_Store ├── .coverage ├── .gitattributes ├── .github └── workflows │ └── tests.yaml ├── .gitignore ├── .nojekyll ├── LICENSE ├── README.md ├── docs ├── .DS_Store ├── Makefile ├── api.rst ├── api │ ├── 1-ElementEnums.rst │ ├── 2-ControlEnums.rst │ ├── shortcuts.rst │ ├── tglobals.rst │ └── tosclib.tosc.rst ├── build │ ├── .buildinfo │ ├── .doctrees │ │ ├── api.doctree │ │ ├── api │ │ │ ├── 1-ElementEnums.doctree │ │ │ ├── 2-ControlEnums.doctree │ │ │ ├── ControlEnums.doctree │ │ │ ├── ElementEnums.doctree │ │ │ ├── shortcuts.doctree │ │ │ ├── tglobals.doctree │ │ │ └── tosclib.tosc.doctree │ │ ├── demos.doctree │ │ ├── demos │ │ │ ├── 1-custom-property.doctree │ │ │ ├── 2-copy-scripts.doctree │ │ │ ├── 3-from-json.doctree │ │ │ ├── 4-image-converter.doctree │ │ │ ├── 5-reaper-tosclib.doctree │ │ │ └── 6-numpad.doctree │ │ ├── environment.pickle │ │ ├── guide.doctree │ │ ├── guide │ │ │ ├── 1-tosc-files.doctree │ │ │ ├── 2-tosc-msgs.doctree │ │ │ ├── 3-tosclib.doctree │ │ │ ├── 4-tosc-valid.doctree │ │ │ └── 5-tosc-msg.doctree │ │ ├── index.doctree │ │ ├── modules.doctree │ │ └── modules │ │ │ └── modules.doctree │ ├── _images │ │ ├── msg1.JPG │ │ ├── numpad1.GIF │ │ ├── reaper_python.JPG │ │ ├── reaper_tosc_demo_output.JPG │ │ ├── reaper_www_settings.JPG │ │ ├── toscMidiMsg.JPG │ │ ├── toscOtherElements.JPG │ │ ├── toscTree.JPG │ │ ├── tosclib-property1.GIF │ │ └── tosclib-property2.GIF │ ├── _modules │ │ ├── index.html │ │ ├── tosclib │ │ │ ├── controls.html │ │ │ ├── elements.html │ │ │ └── tosc.html │ │ └── typing.html │ ├── _sources │ │ ├── api.rst.txt │ │ ├── api │ │ │ ├── 1-ElementEnums.rst.txt │ │ │ ├── 2-ControlEnums.rst.txt │ │ │ ├── ControlEnums.rst.txt │ │ │ ├── ElementEnums.rst.txt │ │ │ ├── shortcuts.rst.txt │ │ │ ├── tglobals.rst.txt │ │ │ └── tosclib.tosc.rst.txt │ │ ├── demos.rst.txt │ │ ├── demos │ │ │ ├── 1-custom-property.rst.txt │ │ │ ├── 2-copy-scripts.rst.txt │ │ │ ├── 3-from-json.rst.txt │ │ │ ├── 4-image-converter.rst.txt │ │ │ ├── 5-reaper-tosclib.rst.txt │ │ │ └── 6-numpad.rst.txt │ │ ├── guide.rst.txt │ │ ├── guide │ │ │ ├── 1-tosc-files.rst.txt │ │ │ ├── 2-tosc-msgs.rst.txt │ │ │ ├── 3-tosclib.rst.txt │ │ │ ├── 4-tosc-valid.rst.txt │ │ │ └── 5-tosc-msg.rst.txt │ │ ├── index.rst.txt │ │ ├── modules.rst.txt │ │ └── modules │ │ │ └── modules.rst.txt │ ├── _static │ │ ├── basic.css │ │ ├── check-solid.svg │ │ ├── clipboard.min.js │ │ ├── copy-button.svg │ │ ├── copybutton.css │ │ ├── copybutton.js │ │ ├── copybutton_funcs.js │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery-3.5.1.js │ │ ├── jquery.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── scripts │ │ │ ├── furo-extensions.js │ │ │ ├── furo.js │ │ │ ├── furo.js.LICENSE.txt │ │ │ └── furo.js.map │ │ ├── searchtools.js │ │ ├── styles │ │ │ ├── furo-extensions.css │ │ │ ├── furo-extensions.css.map │ │ │ ├── furo.css │ │ │ └── furo.css.map │ │ ├── underscore-1.13.1.js │ │ └── underscore.js │ ├── api.html │ ├── api │ │ ├── 1-ElementEnums.html │ │ ├── 2-ControlEnums.html │ │ ├── ControlEnums.html │ │ ├── ElementEnums.html │ │ ├── shortcuts.html │ │ ├── tglobals.html │ │ └── tosclib.tosc.html │ ├── demos.html │ ├── demos │ │ ├── 1-custom-property.html │ │ ├── 2-copy-scripts.html │ │ ├── 3-from-json.html │ │ ├── 4-image-converter.html │ │ ├── 5-reaper-tosclib.html │ │ └── 6-numpad.html │ ├── doctrees │ │ ├── api.doctree │ │ ├── api │ │ │ ├── 1-ElementEnums.doctree │ │ │ ├── 2-ControlEnums.doctree │ │ │ ├── shortcuts.doctree │ │ │ ├── tglobals.doctree │ │ │ └── tosclib.tosc.doctree │ │ ├── demos.doctree │ │ ├── demos │ │ │ ├── 1-custom-property.doctree │ │ │ ├── 2-copy-scripts.doctree │ │ │ ├── 3-from-json.doctree │ │ │ ├── 4-image-converter.doctree │ │ │ ├── 5-reaper-tosclib.doctree │ │ │ └── 6-numpad.doctree │ │ ├── environment.pickle │ │ ├── guide.doctree │ │ ├── guide │ │ │ ├── 1-tosc-files.doctree │ │ │ ├── 2-tosc-msgs.doctree │ │ │ ├── 3-tosclib.doctree │ │ │ ├── 4-tosc-valid.doctree │ │ │ └── 5-tosc-msg.doctree │ │ ├── index.doctree │ │ ├── modules.doctree │ │ └── modules │ │ │ └── modules.doctree │ ├── genindex.html │ ├── guide.html │ ├── guide │ │ ├── 1-tosc-files.html │ │ ├── 2-tosc-msgs.html │ │ ├── 3-tosclib.html │ │ ├── 4-tosc-valid.html │ │ └── 5-tosc-msg.html │ ├── html │ │ ├── .buildinfo │ │ ├── _images │ │ │ ├── msg1.JPG │ │ │ ├── numpad1.GIF │ │ │ ├── reaper_python.JPG │ │ │ ├── reaper_tosc_demo_output.JPG │ │ │ ├── reaper_www_settings.JPG │ │ │ ├── toscMidiMsg.JPG │ │ │ ├── toscOtherElements.JPG │ │ │ ├── toscTree.JPG │ │ │ ├── tosclib-property1.GIF │ │ │ └── tosclib-property2.GIF │ │ ├── _modules │ │ │ ├── index.html │ │ │ └── tosclib │ │ │ │ ├── controls.html │ │ │ │ ├── elements.html │ │ │ │ └── tosc.html │ │ ├── _sources │ │ │ ├── api.rst.txt │ │ │ ├── api │ │ │ │ ├── 1-ElementEnums.rst.txt │ │ │ │ ├── 2-ControlEnums.rst.txt │ │ │ │ ├── shortcuts.rst.txt │ │ │ │ ├── tglobals.rst.txt │ │ │ │ └── tosclib.tosc.rst.txt │ │ │ ├── demos.rst.txt │ │ │ ├── demos │ │ │ │ ├── 1-custom-property.rst.txt │ │ │ │ ├── 2-copy-scripts.rst.txt │ │ │ │ ├── 3-from-json.rst.txt │ │ │ │ ├── 4-image-converter.rst.txt │ │ │ │ ├── 5-reaper-tosclib.rst.txt │ │ │ │ └── 6-numpad.rst.txt │ │ │ ├── guide.rst.txt │ │ │ ├── guide │ │ │ │ ├── 1-tosc-files.rst.txt │ │ │ │ ├── 2-tosc-msgs.rst.txt │ │ │ │ ├── 3-tosclib.rst.txt │ │ │ │ ├── 4-tosc-valid.rst.txt │ │ │ │ └── 5-tosc-msg.rst.txt │ │ │ ├── index.rst.txt │ │ │ ├── modules.rst.txt │ │ │ └── modules │ │ │ │ └── modules.rst.txt │ │ ├── _static │ │ │ ├── basic.css │ │ │ ├── check-solid.svg │ │ │ ├── clipboard.min.js │ │ │ ├── copy-button.svg │ │ │ ├── copybutton.css │ │ │ ├── copybutton.js │ │ │ ├── copybutton_funcs.js │ │ │ ├── doctools.js │ │ │ ├── documentation_options.js │ │ │ ├── file.png │ │ │ ├── jquery-3.5.1.js │ │ │ ├── jquery.js │ │ │ ├── language_data.js │ │ │ ├── minus.png │ │ │ ├── plus.png │ │ │ ├── pygments.css │ │ │ ├── scripts │ │ │ │ ├── furo-extensions.js │ │ │ │ ├── furo.js │ │ │ │ ├── furo.js.LICENSE.txt │ │ │ │ └── furo.js.map │ │ │ ├── searchtools.js │ │ │ ├── styles │ │ │ │ ├── furo-extensions.css │ │ │ │ ├── furo-extensions.css.map │ │ │ │ ├── furo.css │ │ │ │ └── furo.css.map │ │ │ ├── underscore-1.13.1.js │ │ │ └── underscore.js │ │ ├── api.html │ │ ├── api │ │ │ ├── 1-ElementEnums.html │ │ │ ├── 2-ControlEnums.html │ │ │ ├── shortcuts.html │ │ │ ├── tglobals.html │ │ │ └── tosclib.tosc.html │ │ ├── demos.html │ │ ├── demos │ │ │ ├── 1-custom-property.html │ │ │ ├── 2-copy-scripts.html │ │ │ ├── 3-from-json.html │ │ │ ├── 4-image-converter.html │ │ │ ├── 5-reaper-tosclib.html │ │ │ └── 6-numpad.html │ │ ├── genindex.html │ │ ├── guide.html │ │ ├── guide │ │ │ ├── 1-tosc-files.html │ │ │ ├── 2-tosc-msgs.html │ │ │ ├── 3-tosclib.html │ │ │ ├── 4-tosc-valid.html │ │ │ └── 5-tosc-msg.html │ │ ├── index.html │ │ ├── modules.html │ │ ├── modules │ │ │ └── modules.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── search.html │ │ └── searchindex.js │ ├── index.html │ ├── modules.html │ ├── modules │ │ └── modules.html │ ├── objects.inv │ ├── py-modindex.html │ ├── search.html │ └── searchindex.js ├── conf.py ├── demos.rst ├── demos │ ├── 1-custom-property.py │ ├── 1-custom-property.rst │ ├── 2-copy-scripts.py │ ├── 2-copy-scripts.rst │ ├── 3-from-json.py │ ├── 3-from-json.rst │ ├── 4-image-converter.py │ ├── 4-image-converter.rst │ ├── 5-reaper-tosclib.py │ ├── 5-reaper-tosclib.rst │ ├── 6-numpad.py │ ├── 6-numpad.rst │ ├── files │ │ ├── Numpad_basic.tosc │ │ ├── Numpad_basic.xml │ │ ├── Numpad_modded.tosc │ │ ├── Pro-C 2 (FabFilter).json │ │ ├── controls.tosc │ │ ├── controls.xml │ │ ├── customProp.tosc │ │ ├── logo.jpg │ │ ├── messages.tosc │ │ ├── messages.xml │ │ ├── msgs.tosc │ │ ├── msgs.xml │ │ ├── newTemplate.tosc │ │ ├── newTemplate.xml │ │ ├── o_custom.tosc │ │ ├── o_custom.xml │ │ ├── out.tosc │ │ ├── peak_meter_1.tosc │ │ ├── stoic.tosc │ │ ├── stoic.xml │ │ ├── test.tosc │ │ ├── test.xml │ │ ├── test1.lua │ │ └── test2.tosc │ ├── numpad.prof │ ├── numpad.tosc │ └── old │ │ ├── copy-scripts.py │ │ ├── custom-property.py │ │ ├── genericUI.py │ │ ├── image-tosc.py │ │ └── styles.py ├── guide.rst ├── guide │ ├── 1-tosc-files.rst │ ├── 2-tosc-msgs.rst │ ├── 3-tosclib.rst │ ├── 4-tosc-valid.rst │ └── 5-tosc-msg.rst ├── images │ ├── msg1.JPG │ ├── numpad1.gif │ ├── reaper_python.JPG │ ├── reaper_tosc_demo_output.JPG │ ├── reaper_www_settings.JPG │ ├── toscMidiMsg.JPG │ ├── toscOtherElements.JPG │ ├── toscTree.JPG │ ├── tosclib-property1.gif │ └── tosclib-property2.gif ├── index.rst ├── make.bat ├── modules.rst └── modules │ └── modules.rst ├── index.html ├── notes.txt ├── pyproject.toml ├── pytest.ini ├── pytest.txt ├── requirements-dev.txt ├── requirements-docs.txt ├── requirements.txt ├── setup.py ├── src └── tosclib │ ├── __init__.py │ ├── controls.py │ ├── elements.py │ ├── layout.py │ ├── py.typed │ └── tosc.py ├── tests ├── .DS_Store ├── __init__.py ├── deleteme.py ├── deleteme.tosc ├── profiler.py ├── profiler │ ├── test_basics.prof │ ├── test_collisions.prof │ ├── test_constants.prof │ ├── test_copiers.prof │ ├── test_io.prof │ ├── test_layout.prof │ └── test_parsers.prof ├── test_basics.py ├── test_collisions.py ├── test_constants.py ├── test_copiers.py ├── test_io.py ├── test_layout.py ├── test_layout.tosc └── test_parsers.py └── tox.ini /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/.DS_Store -------------------------------------------------------------------------------- /.coverage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/.coverage -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/tests.yaml: -------------------------------------------------------------------------------- 1 | name: tosclib 2 | 3 | on: 4 | - push 5 | - pull_request 6 | 7 | jobs: 8 | test: 9 | runs-on: ${{ matrix.os }} 10 | strategy: 11 | matrix: 12 | os: [ubuntu-latest, windows-latest] 13 | python-versions: ["3.8", "3.9", "3.10"] 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Set up Python ${{ matrix.python-version }} 18 | uses: actions/setup-python@v2 19 | with: 20 | python-version: ${{ matrix.python-version }} 21 | - name: Install dependencies 22 | run: | 23 | python -m pip install --upgrade pip 24 | python -m pip install tox tox-gh-actions 25 | - name: Test with tox 26 | run: tox -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | dist 3 | src/tosclib.egg-info 4 | .pytest_cache 5 | .tox 6 | venv 7 | .vscode 8 | htmlcov 9 | test.prof -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 AlbertoV5 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tosclib 2 | Generate and edit Touch OSC templates with XML trees through a few custom classes and functions that help navigate the structure of the .tosc file. 3 | 4 | **Disclaimer**: This project has no relation to Hexler, the developer of TouchOSC. Backup your templates before editing them with third party tools. 5 | 6 | ![Test](https://github.com/albertov5/tosclib/actions/workflows/tests.yaml/badge.svg) ![pypi](https://img.shields.io/pypi/v/tosclib) 7 | ![License](https://img.shields.io/github/license/albertov5/tosclib) 8 | ![Pages](https://github.com/AlbertoV5/tosclib/actions/workflows/pages/pages-build-deployment/badge.svg) 9 | 10 | ## [Documentation here!](https://albertov5.github.io/tosclib) 11 | 12 | ```console 13 | $ pip install tosclib 14 | ``` 15 | 16 | # Contribute: 17 | 18 | Feel free to make a fork and contribute to the tosclib or documentation or whatever. 19 | 20 | Requirements dev: 21 | 22 | ```python 23 | tox==3.25.0 24 | numpy==1.22.3 25 | Pillow==9.1.1 26 | pytest==7.1.2 27 | setuptools==61.2.0 28 | pytest-cov==3.0.0 29 | ``` 30 | Requirements docs: 31 | ```python 32 | sphinx==4.5.0 33 | furo==2022.4.7 34 | sphinx_copybutton==0.5.0 35 | ``` 36 | For testing run: 37 | ```console 38 | $ tox 39 | ``` 40 | 41 | # Design: 42 | **0.3.0:** 43 | 44 | elements -> controls -> tosc -> layout 45 | 46 | - Elements are mostly data classes and enums (named tuples) that define the basic xml element parts, like valid attributes, children elements like: Property, Values, OSC and MIDI messages, etc. 47 | - Controls are classes with specific attributes that are analogous to Touch OSC's Controls, like Fader, Button, Label, Group, etc. can be used as templates to construct xml trees. 48 | - ElementTOSC is the wrapper class that handles the Control's xml tree: Node->(Properties, Messages, Values and Children). Tosclib is sort of built around it. 49 | - Layout contains functions that help manipulate many ElementTOSC objects like automatic children arrangement, color gradients, copying properties, etc. 50 | 51 | Those are the basics, the goal is to build on top of that and have a solid 1.0 version with plenty of layout features and that can be fun to use. 52 | 53 | In the future this could have "modules" or "templates" on top of "layout" which would consist of a few templates that can be built programatically with custom parameters, for example a pop up menu for entering digits or a radial menu for settings, etc. 54 | 55 | # Demo Projects: 56 | 57 | ## New location for Demo Projects is [here](https://albertov5.github.io/tosclib/docs/build/html/demos.html). 58 | 59 | 60 | ## custom-property.py 61 | You can insert your own XML elements into Touch OSC files and the Editor will respect them. This means you can access those properties in lua and they will keep their values after you save and exit the Touch OSC editor. For example: 62 | ```lua 63 | --This is lua code inside the touch osc editor-- 64 | function onValueChanged(key, value) 65 | if key == "touch" and self.values.touch == true then 66 | print(self.parent.CustomProperty) 67 | self.parent.CustomProperty = self.parent.children.label2.values.text 68 | end 69 | end 70 | ``` 71 | You can use custom-property.py to insert new properties in your .tosc file and use them as globals or config parameters. Console: 72 | 73 | 74 | ## image-tosc.py 75 | 76 | Convert a .jpg image to .tosc using small boxes as pixels. This will look for a Target group object to place the boxes into. 77 | 78 | This means the image will be scaled down to 64x64 but the "pixel" boxes in Touch OSC will be of size 8. 79 | I don't recommend going above 256x256 for image_size as performance and filesize take a hit. Plus the XML tree is stored in memory, not streamed, so it can cause issues when generating it. 80 | 81 | ### Example output: 82 | 83 | ![deleteme](https://user-images.githubusercontent.com/58243333/168332352-cb848b15-13fc-4573-861d-27b47f6da2ee.jpg) 84 | -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/.DS_Store -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/api.rst: -------------------------------------------------------------------------------- 1 | API 2 | =================================== 3 | 4 | .. toctree:: 5 | :glob: 6 | 7 | api/* -------------------------------------------------------------------------------- /docs/api/1-ElementEnums.rst: -------------------------------------------------------------------------------- 1 | Element Enumerations 2 | ===================================== 3 | 4 | .. autoclass:: tosclib.elements.ControlElements 5 | :members: 6 | 7 | .. autoclass:: tosclib.elements.ControlType 8 | :members: 9 | 10 | .. autoclass:: tosclib.elements.PropertyType 11 | :members: 12 | 13 | .. autoclass:: tosclib.elements.Property 14 | :members: 15 | 16 | .. autoclass:: tosclib.elements.Value 17 | :members: 18 | 19 | .. autoclass:: tosclib.elements.OSC 20 | :members: 21 | 22 | .. autoclass:: tosclib.elements.MIDI 23 | :members: 24 | 25 | .. autoclass:: tosclib.elements.LOCAL 26 | :members: -------------------------------------------------------------------------------- /docs/api/2-ControlEnums.rst: -------------------------------------------------------------------------------- 1 | Control Enumerations 2 | ============================== 3 | 4 | .. autoclass:: tosclib.controls.Control 5 | :members: 6 | 7 | 8 | .. autoclass:: tosclib.controls.ControlConverter 9 | :members: 10 | 11 | 12 | .. autoclass:: tosclib.controls.XmlFactory 13 | :members: 14 | -------------------------------------------------------------------------------- /docs/api/shortcuts.rst: -------------------------------------------------------------------------------- 1 | Shortcuts 2 | =============== 3 | 4 | Property shortcuts: 5 | 6 | .. autofunction:: tosclib.tosc.ElementTOSC.setName 7 | 8 | .. autofunction:: tosclib.tosc.ElementTOSC.setColor 9 | 10 | .. autofunction:: tosclib.tosc.ElementTOSC.setFrame 11 | 12 | .. autofunction:: tosclib.tosc.ElementTOSC.setScript 13 | 14 | .. autofunction:: tosclib.tosc.ElementTOSC.setTag 15 | 16 | .. autofunction:: tosclib.tosc.ElementTOSC.setBackground -------------------------------------------------------------------------------- /docs/api/tglobals.rst: -------------------------------------------------------------------------------- 1 | Globals 2 | ============================== 3 | 4 | .. autofunction:: tosclib.tosc.createTemplate 5 | 6 | .. autofunction:: tosclib.tosc.findKey 7 | 8 | .. autofunction:: tosclib.tosc.getTextValueFromKey 9 | 10 | .. autofunction:: tosclib.tosc.pullValueFromKey 11 | 12 | .. autofunction:: tosclib.tosc.pullValueFromKey2 13 | 14 | .. autofunction:: tosclib.tosc.showElement 15 | -------------------------------------------------------------------------------- /docs/api/tosclib.tosc.rst: -------------------------------------------------------------------------------- 1 | tosclib.tosc 2 | ============ 3 | 4 | .. automodule:: tosclib.tosc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | .. rubric:: Functions 13 | 14 | .. autosummary:: 15 | 16 | createTemplate 17 | findKey 18 | getTextValueFromKey 19 | load 20 | pullValueFromKey 21 | pullValueFromKey2 22 | showElement 23 | write 24 | 25 | 26 | 27 | 28 | 29 | .. rubric:: Classes 30 | 31 | .. autosummary:: 32 | 33 | ControlElements 34 | ControlType 35 | ElementTOSC 36 | OSC 37 | Partial 38 | Property 39 | PropertyType 40 | Trigger 41 | Value 42 | tosclib.controls.Box 43 | tosclib.controls.Button 44 | tosclib.controls.Encoder 45 | tosclib.controls.Fader 46 | tosclib.controls.Grid 47 | tosclib.controls.Group 48 | tosclib.controls.Label 49 | tosclib.controls.Page 50 | tosclib.controls.Pager 51 | tosclib.controls.Radar 52 | tosclib.controls.Radial 53 | tosclib.controls.Radio 54 | tosclib.controls.Text 55 | tosclib.controls.Xy 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /docs/build/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 62286736e39f735c0677047dbefc746f 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/build/.doctrees/api.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/1-ElementEnums.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/1-ElementEnums.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/2-ControlEnums.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/2-ControlEnums.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/ControlEnums.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/ControlEnums.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/ElementEnums.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/ElementEnums.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/shortcuts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/shortcuts.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/tglobals.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/tglobals.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/api/tosclib.tosc.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/api/tosclib.tosc.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos/1-custom-property.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos/1-custom-property.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos/2-copy-scripts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos/2-copy-scripts.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos/3-from-json.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos/3-from-json.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos/4-image-converter.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos/4-image-converter.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos/5-reaper-tosclib.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos/5-reaper-tosclib.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/demos/6-numpad.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/demos/6-numpad.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/build/.doctrees/guide.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/guide.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/guide/1-tosc-files.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/guide/1-tosc-files.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/guide/2-tosc-msgs.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/guide/2-tosc-msgs.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/guide/3-tosclib.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/guide/3-tosclib.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/guide/4-tosc-valid.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/guide/4-tosc-valid.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/guide/5-tosc-msg.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/guide/5-tosc-msg.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/index.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/modules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/modules.doctree -------------------------------------------------------------------------------- /docs/build/.doctrees/modules/modules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/.doctrees/modules/modules.doctree -------------------------------------------------------------------------------- /docs/build/_images/msg1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/msg1.JPG -------------------------------------------------------------------------------- /docs/build/_images/numpad1.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/numpad1.GIF -------------------------------------------------------------------------------- /docs/build/_images/reaper_python.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/reaper_python.JPG -------------------------------------------------------------------------------- /docs/build/_images/reaper_tosc_demo_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/reaper_tosc_demo_output.JPG -------------------------------------------------------------------------------- /docs/build/_images/reaper_www_settings.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/reaper_www_settings.JPG -------------------------------------------------------------------------------- /docs/build/_images/toscMidiMsg.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/toscMidiMsg.JPG -------------------------------------------------------------------------------- /docs/build/_images/toscOtherElements.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/toscOtherElements.JPG -------------------------------------------------------------------------------- /docs/build/_images/toscTree.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/toscTree.JPG -------------------------------------------------------------------------------- /docs/build/_images/tosclib-property1.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/tosclib-property1.GIF -------------------------------------------------------------------------------- /docs/build/_images/tosclib-property2.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlbertoV5/tosclib/ac0fb2cfcbef1c00b923ff7741fc407def8cb686/docs/build/_images/tosclib-property2.GIF -------------------------------------------------------------------------------- /docs/build/_sources/api.rst.txt: -------------------------------------------------------------------------------- 1 | API 2 | =================================== 3 | 4 | .. toctree:: 5 | :glob: 6 | 7 | api/* -------------------------------------------------------------------------------- /docs/build/_sources/api/1-ElementEnums.rst.txt: -------------------------------------------------------------------------------- 1 | Element Enumerations 2 | ===================================== 3 | 4 | .. autoclass:: tosclib.elements.ControlElements 5 | :members: 6 | 7 | .. autoclass:: tosclib.elements.ControlType 8 | :members: 9 | 10 | .. autoclass:: tosclib.elements.PropertyType 11 | :members: 12 | 13 | .. autoclass:: tosclib.elements.Property 14 | :members: 15 | 16 | .. autoclass:: tosclib.elements.Value 17 | :members: 18 | 19 | .. autoclass:: tosclib.elements.OSC 20 | :members: 21 | 22 | .. autoclass:: tosclib.elements.MIDI 23 | :members: 24 | 25 | .. autoclass:: tosclib.elements.LOCAL 26 | :members: -------------------------------------------------------------------------------- /docs/build/_sources/api/2-ControlEnums.rst.txt: -------------------------------------------------------------------------------- 1 | Control Enumerations 2 | ============================== 3 | 4 | .. autoclass:: tosclib.controls.Control 5 | :members: 6 | 7 | 8 | .. autoclass:: tosclib.controls.ControlConverter 9 | :members: 10 | 11 | 12 | .. autoclass:: tosclib.controls.XmlFactory 13 | :members: 14 | -------------------------------------------------------------------------------- /docs/build/_sources/api/ControlEnums.rst.txt: -------------------------------------------------------------------------------- 1 | Control Enumerations 2 | ============================== 3 | 4 | .. autoclass:: tosclib.controls.Control 5 | :members: 6 | 7 | 8 | .. autoclass:: tosclib.controls.ControlConverter 9 | :members: 10 | 11 | 12 | .. autoclass:: tosclib.controls.XmlFactory 13 | :members: 14 | -------------------------------------------------------------------------------- /docs/build/_sources/api/ElementEnums.rst.txt: -------------------------------------------------------------------------------- 1 | Element Enumerations 2 | ===================================== 3 | 4 | .. autoclass:: tosclib.elements.ControlElements 5 | :members: 6 | 7 | .. autoclass:: tosclib.elements.ControlType 8 | :members: 9 | 10 | .. autoclass:: tosclib.elements.PropertyType 11 | :members: 12 | 13 | .. autoclass:: tosclib.elements.Property 14 | :members: 15 | 16 | .. autoclass:: tosclib.elements.Value 17 | :members: 18 | 19 | .. autoclass:: tosclib.elements.OSC 20 | :members: 21 | 22 | .. autoclass:: tosclib.elements.MIDI 23 | :members: 24 | 25 | .. autoclass:: tosclib.elements.LOCAL 26 | :members: -------------------------------------------------------------------------------- /docs/build/_sources/api/shortcuts.rst.txt: -------------------------------------------------------------------------------- 1 | Shortcuts 2 | =============== 3 | 4 | Property shortcuts: 5 | 6 | .. autofunction:: tosclib.tosc.ElementTOSC.setName 7 | 8 | .. autofunction:: tosclib.tosc.ElementTOSC.setColor 9 | 10 | .. autofunction:: tosclib.tosc.ElementTOSC.setFrame 11 | 12 | .. autofunction:: tosclib.tosc.ElementTOSC.setScript 13 | 14 | .. autofunction:: tosclib.tosc.ElementTOSC.setTag 15 | 16 | .. autofunction:: tosclib.tosc.ElementTOSC.setBackground -------------------------------------------------------------------------------- /docs/build/_sources/api/tglobals.rst.txt: -------------------------------------------------------------------------------- 1 | Globals 2 | ============================== 3 | 4 | .. autofunction:: tosclib.tosc.createTemplate 5 | 6 | .. autofunction:: tosclib.tosc.findKey 7 | 8 | .. autofunction:: tosclib.tosc.getTextValueFromKey 9 | 10 | .. autofunction:: tosclib.tosc.pullValueFromKey 11 | 12 | .. autofunction:: tosclib.tosc.pullValueFromKey2 13 | 14 | .. autofunction:: tosclib.tosc.showElement 15 | -------------------------------------------------------------------------------- /docs/build/_sources/api/tosclib.tosc.rst.txt: -------------------------------------------------------------------------------- 1 | tosclib.tosc 2 | ============ 3 | 4 | .. automodule:: tosclib.tosc 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | .. rubric:: Functions 13 | 14 | .. autosummary:: 15 | 16 | createTemplate 17 | findKey 18 | getTextValueFromKey 19 | load 20 | pullValueFromKey 21 | pullValueFromKey2 22 | showElement 23 | write 24 | 25 | 26 | 27 | 28 | 29 | .. rubric:: Classes 30 | 31 | .. autosummary:: 32 | 33 | ControlElements 34 | ControlType 35 | ElementTOSC 36 | OSC 37 | Partial 38 | Property 39 | PropertyType 40 | Trigger 41 | Value 42 | tosclib.controls.Box 43 | tosclib.controls.Button 44 | tosclib.controls.Encoder 45 | tosclib.controls.Fader 46 | tosclib.controls.Grid 47 | tosclib.controls.Group 48 | tosclib.controls.Label 49 | tosclib.controls.Page 50 | tosclib.controls.Pager 51 | tosclib.controls.Radar 52 | tosclib.controls.Radial 53 | tosclib.controls.Radio 54 | tosclib.controls.Text 55 | tosclib.controls.Xy 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /docs/build/_sources/demos.rst.txt: -------------------------------------------------------------------------------- 1 | Demos 2 | =================================== 3 | 4 | .. toctree:: 5 | :glob: 6 | 7 | demos/* -------------------------------------------------------------------------------- /docs/build/_sources/demos/1-custom-property.rst.txt: -------------------------------------------------------------------------------- 1 | Custom Property 2 | ------------------- 3 | 4 | Add a new custom Property to the parent Node. 5 | 6 | .. literalinclude:: 1-custom-property.py 7 | :language: python 8 | 9 | 10 | Then you can access that Property in Touch OSC Editor with .lua like this: 11 | 12 | .. code-block:: lua 13 | 14 | --This is lua code inside the touch osc editor-- 15 | function onValueChanged(key, value) 16 | if key == "touch" and self.values.touch == true then 17 | print(self.parent.CustomProperty) 18 | self.parent.CustomProperty = self.parent.children.label2.values.text 19 | end 20 | end 21 | 22 | **Demo Files:** 23 | 24 | - `Input .tosc `_ 25 | - `Output .tosc `_ 26 | 27 | 28 | **GIFS** 29 | 30 | 1. Call script that changes the Custom Property, then call another one that sets the label text to the Custom Property. 31 | 32 | .. image:: ../images/tosclib-property1.GIF 33 | 34 | 2. Save and close the template. Then load it again and you'll see the label text remains, as it sets its value to the Custom Property on init. 35 | 36 | .. image:: ../images/tosclib-property2.GIF 37 | 38 | 39 | .. code-block:: lua 40 | :caption: This is the lua code in the label 41 | 42 | function init() 43 | self.parent.children.label3.values.text = self.parent.CustomProperty 44 | end 45 | 46 | function onValueChanged(key, value) 47 | if key == "touch" and self.values.touch == true then 48 | print(self.parent.CustomProperty) 49 | self.parent.children.label3.values.text = self.parent.CustomProperty 50 | end 51 | end -------------------------------------------------------------------------------- /docs/build/_sources/demos/2-copy-scripts.rst.txt: -------------------------------------------------------------------------------- 1 | Copy Scripts 2 | ------------------- 3 | 4 | Copy Scripts of one Element to all the Child Elements of another. 5 | 6 | .. literalinclude:: 2-copy-scripts.py 7 | :language: python 8 | 9 | **Demo Files:** 10 | 11 | - `Input .tosc `_ 12 | - `Output .tosc `_ -------------------------------------------------------------------------------- /docs/build/_sources/demos/3-from-json.rst.txt: -------------------------------------------------------------------------------- 1 | Elements from Json 2 | ------------------- 3 | 4 | This creates a new .tosc template from scratch, then creates a new GROUP Node with n FADER children and gives them Properties from the .json file. 5 | 6 | .. literalinclude:: 3-from-json.py 7 | :language: python 8 | 9 | 10 | **Demo Files:** 11 | 12 | - `Json Input `_ 13 | - `Output .tosc `_ -------------------------------------------------------------------------------- /docs/build/_sources/demos/4-image-converter.rst.txt: -------------------------------------------------------------------------------- 1 | Image Converter 2 | ------------------- 3 | 4 | This pixelates a .jpg image using Pillow and creates new BOX children with the Properties of the pixels from the image. 5 | 6 | .. literalinclude:: 4-image-converter.py 7 | :language: python 8 | 9 | **Demo Files:** 10 | 11 | - `JPG input `_ 12 | - `Input .tosc `_ 13 | - `Output .tosc `_ -------------------------------------------------------------------------------- /docs/build/_sources/demos/5-reaper-tosclib.rst.txt: -------------------------------------------------------------------------------- 1 | Reaper to Touch OSC 2 | ---------------------- 3 | 4 | This asks REAPER to execute a few scripts via Web Interface. The result is a .tosc file generated from the FX Params of the Last Touched FX. 5 | 6 | 1. Install Reaper, Reapack and SWS Extensions. 7 | 2. Import this repository to your Reapack: 8 | 9 | .. code-block:: 10 | 11 | https://raw.githubusercontent.com/AlbertoV5/ReaperTools/master/index.xml 12 | 13 | 3. Install all LISZT scripts from AlbertoV5-ReaperTools. 14 | 4. Setup Python in Reaper* and install dependencies. 15 | 16 | .. code-block:: 17 | 18 | tosclib>=0.1.10 19 | aiohttp==3.8.1 20 | 21 | 5. Setup Reaper Web Interface.** 22 | 6. Load up an FX and run this script. 23 | 24 | .. literalinclude:: 5-reaper-tosclib.py 25 | :language: python 26 | 27 | The result will be a template with Faders named as the FX Parameters with OSC messages named after them: 28 | 29 | Feel free to make your own version of liszt-generate.py to fit your needs. 30 | 31 | .. image:: ../images/reaper_tosc_demo_output.JPG 32 | 33 | Here is more info on how to set up stuff: 34 | 35 | .. raw:: html 36 | 37 |
38 | 39 | *Set up Python in Reaper: 40 | 41 | 42 | .. code-block:: 43 | 44 | $ where python 45 | 46 | Avoid using Anaconda environments in Windows as they have issues with Reaper. Set the path here: 47 | 48 | .. image:: ../images/reaper_python.JPG 49 | 50 | .. raw:: html 51 | 52 |
53 | 54 | .. raw:: html 55 | 56 |
57 | 58 | **Web Interface settings: 59 | 60 | 61 | The only thing you need is the port. If you are running this script from another local machine then change the host to the Reaper machine IP or use the Access URL. 62 | 63 | .. image:: ../images/reaper_www_settings.JPG 64 | 65 | .. raw:: html 66 | 67 |
68 | 69 | 70 | `LISZT SCRIPTS `_ 71 | 72 | -------------------------------------------------------------------------------- /docs/build/_sources/demos/6-numpad.rst.txt: -------------------------------------------------------------------------------- 1 | Numpad Module Recreation 2 | ---------------------------- 3 | 4 | This is a re-construction of the integer numpad from `Felix `_ here: https://github.com/F-l-i-x/TouchOSC/tree/main/modules/numpad#readme 5 | 6 | Original: 7 | 8 | .. image:: https://github.com/F-l-i-x/TouchOSC/raw/main/modules/numpad/pics/numpad.gif 9 | 10 | Result: 11 | 12 | .. image:: ../images/numpad1.GIF 13 | 14 | Code: 15 | 16 | .. literalinclude:: 6-numpad.py 17 | :language: python 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/build/_sources/guide.rst.txt: -------------------------------------------------------------------------------- 1 | Guide 2 | =================================== 3 | .. toctree:: 4 | :glob: 5 | 6 | guide/* -------------------------------------------------------------------------------- /docs/build/_sources/guide/1-tosc-files.rst.txt: -------------------------------------------------------------------------------- 1 | Understanding .tosc files 2 | ----------------------------- 3 | 4 | Touch OSC uses zlib to compress XML tree files into .tosc. 5 | 6 | The Touch OSC editor can access all the Elements and provides tools to edit them as well as an UI. 7 | However, it only displays the Elements that its designed to handle. 8 | 9 | This section will try to describe those Elements and how they are organized in the .tosc file. 10 | 11 | Let's start with the XML header and the root: 12 | 13 | .. code-block:: xml 14 | 15 | 16 | 17 | 18 | .. code-block:: xml 19 | :caption: The root holds the parent Node, which in turn, holds a few key SubElements: 20 | 21 | 22 | |__ 23 | |__ 24 | | |__ 25 | | |__ 26 | | | |__text 27 | | |__ 28 | | |__text 29 | | |__ 30 | | |__text 31 | |__ 32 | | |__ 33 | | |__ 34 | | | |__text 35 | | |__ 36 | | | |__text 37 | | |__ 38 | | | |__text 39 | | |__ 40 | | | |__text 41 | | |__ 42 | | |__text 43 | |__ 44 | | |__ 45 | | |__ 46 | | |__ 47 | |__ 48 | |__ 49 | 50 | 51 | 52 | The editor tree view only displays the Nodes in each Children SubElement. 53 | 54 | .. figure:: ../images/toscTree.JPG 55 | 56 | The rest of the Elements are displayed in the Control, Values, Messages and Script tabs. 57 | 58 | .. figure:: ../images/toscOtherElements.JPG 59 | 60 | `Here `_ is a list of the available Properties and Values. -------------------------------------------------------------------------------- /docs/build/_sources/guide/2-tosc-msgs.rst.txt: -------------------------------------------------------------------------------- 1 | Message Elements 2 | ----------------------------- 3 | 4 | We are going to take a closer look to how each message type is constructed: 5 | 6 | **Editor view:** 7 | 8 | .. figure:: ../images/msg1.JPG 9 | 10 | 11 | **OSC Messages:** 12 | 13 | .. code-block:: xml 14 | 15 | 16 | |__ 17 | | |__ 18 | | | |__ 19 | | | | |__text 20 | | | |__ 21 | | | | |__text 22 | | | |__ 23 | | | | |__text 24 | | | |__ 25 | | | | |__text 26 | | | |__ 27 | | | | |__text 28 | | | |__ 29 | | | | |__ 30 | | | | |__ 31 | | | | | |__text 32 | | | | |__ 33 | | | | |__text 34 | | | |__ 35 | | | | |__ 36 | | | | | |__ 37 | | | | | | |__text 38 | | | | | |__ 39 | | | | | | |__text 40 | | | | | |__ 41 | | | | | | |__text 42 | | | | | |__ 43 | | | | | | |__text 44 | | | | | |__ 45 | | | | | | |__text 46 | | | | |__ 47 | | | |__ 48 | | | | |__ 49 | | | | | |__ 50 | | | | | | |__text 51 | | | | | |__ 52 | | | | | | |__text 53 | | | | | |__ 54 | | | | | | |__text 55 | | | | | |__ 56 | | | | | | |__text 57 | | | | | |__ 58 | | | | | | |__text 59 | | | | |__ 60 | | | | | |__etc etc 61 | |__ 62 | |__ 63 | 64 | **LOCAL messages:** 65 | 66 | .. code-block:: xml 67 | 68 | 69 | |__ 70 | | |__ 71 | | | |__ 72 | | | | |__text 73 | | | |__ 74 | | | | |__ 75 | | | | |__ 76 | | | | | |__text 77 | | | | |__ 78 | | | | |__text 79 | | | |__ 80 | | | | |__text 81 | | | |__ 82 | | | | |__text 83 | | | |__ 84 | | | | |__text 85 | | | |__ 86 | | | | |__text 87 | | | |__ 88 | | | | |__text 89 | | | |__ 90 | | | | |__text 91 | | | |__ 92 | | | | |__text 93 | | | |__ 94 | | | | |__text 95 | |__ 96 | |__ 97 | 98 | 99 | Here is how the midi message looks like in the editor: 100 | 101 | .. figure:: ../images/toscMidiMsg.JPG 102 | 103 | And here is the diagram: 104 | 105 | **MIDI messages:** 106 | 107 | .. code-block:: xml 108 | 109 | 110 | |__ 111 | | |__ 112 | | | |__ 113 | | | | |__text 114 | | | |__ 115 | | | | |__text 116 | | | |__ 117 | | | | |__text 118 | | | |__ 119 | | | | |__text 120 | | | |__ 121 | | | | |__text 122 | | | |__ 123 | | | | |__ 124 | | | | |__ 125 | | | | | |__text 126 | | | | |__ 127 | | | | |__text 128 | | | |__ 129 | | | | |__ 130 | | | | | |__text 131 | | | | |__ 132 | | | | | |__text 133 | | | | |__ 134 | | | | | |__text 135 | | | | |__ 136 | | | | |__text 137 | | | |__ 138 | | | | |__ 139 | | | | |__ 140 | | | | | |__text 141 | | | | |__ 142 | | | | | |__text 143 | | | | |__ 144 | | | | | |__text 145 | | | | |__ 146 | | | | |__text 147 | |__ 148 | |__ 149 | 150 | 151 | Work in progress! 152 | -------------------------------------------------------------------------------- /docs/build/_sources/guide/3-tosclib.rst.txt: -------------------------------------------------------------------------------- 1 | Working with .tosc files 2 | ================================= 3 | 4 | Once you have learned the structure of the .tosc file and tosclib, it becomes easier to focus on the algorithm of whatever you want to do rather than dealing with raw XML Element Tree functions and parsing. 5 | 6 | The basic concept is to load a regular XML Element and create a new ElementTOSC instance with it. Then you can handle it with **tosclib** and regular **xml**. 7 | 8 | .. code-block:: 9 | :caption: We can start by loading a root Element and passing it's first child to ElementTOSC. 10 | 11 | import tosclib as tosc 12 | 13 | root = tosc.load("docs/demos/files/test.tosc") 14 | parent = tosc.ElementTOSC(root[0]) 15 | 16 | .. code-block:: 17 | :caption: Then we can use ElementTOSC methods to find navigate through the tree. 18 | 19 | target = tosc.ElementTOSC(parent.findChild("target")) 20 | target.showProperty("color") 21 | 22 | .. code-block:: 23 | :caption: Finally we can modify the Elements, for example changing the 'color' Property. 24 | 25 | colors = {"r":"0", "g":"0", "b":"1", "a":"1"} 26 | target.setProperty("color", params = colors) 27 | 28 | .. code-block:: 29 | :caption: Alternatively, we can use a shortcut instead to set the color property directly: 30 | 31 | target.setColor((1, 0, 0, 1)) 32 | target.showProperty("color") 33 | 34 | .. code-block:: 35 | :caption: In order to write back to .tosc, we use the original root Element with the tosclib write function. 36 | 37 | tosc.write(root, "docs/demos/files/out.tosc") 38 | 39 | 40 | Classes and Functions 41 | ----------------------------- 42 | 43 | Here are more details on the functions and methods we used: 44 | 45 | .. autofunction:: tosclib.tosc.load 46 | 47 | .. autoclass:: tosclib.tosc.ElementTOSC 48 | 49 | .. autoclass:: tosclib.tosc.Property 50 | :noindex: 51 | 52 | .. autofunction:: tosclib.tosc.ElementTOSC.createProperty 53 | 54 | .. autofunction:: tosclib.tosc.ElementTOSC.setColor 55 | :noindex: 56 | 57 | .. autofunction:: tosclib.tosc.write -------------------------------------------------------------------------------- /docs/build/_sources/guide/4-tosc-valid.rst.txt: -------------------------------------------------------------------------------- 1 | Valid Elements 2 | ================================= 3 | 4 | Touch OSC allows you to add any new Property to a .tosc file. It doesn't allow adding new Values or Sub Element categories. This means that you can't add a :guilabel:`