From 372d9426bf5a76048952c19398bfc9bb7c6014de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20Fr=C3=BChsch=C3=BCtz?= Date: Wed, 21 Apr 2021 10:41:52 +0000 Subject: [PATCH] Readme: Added OSC wildcards --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 50ee659..846e79e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ This is a DLL extension for [AutoHotkey](https://www.autohotkey.com/) that enabl ## Work in progress While most functions should already work as intended, there may still be some bugs. If you encounter some possibly wrong behaviour, please let us know! * OSC address wildcards are supported now but probably need some testing -* Documentation could be improved (sending functions) ## Installation Just download the latest version of OSC2AHK.dll from the [releases page](https://files.eleton-audio.de/gitea/Ludwig/OSC2AHK/releases) and place it in the same directory as your AutoHotkey scripts. Maybe you also want to check out the provided [usage examples](https://files.eleton-audio.de/gitea/Ludwig/OSC2AHK/src/branch/master/examples). @@ -105,6 +104,18 @@ msghandlerTest1(oscType, data, msgID, hwnd) ``` Note that you may add many listeners, for any combination of the same/different OSC addresses, datatypes and system message IDs. Also, in AutoHotkey you may add multiple callback functions for the same system message ID or multiple system message IDs to the same callback function. This creates a big flexibility but to keep it less clutterd, such multiple routing paths should be avoided where possible. +For advanced usage, the address pattern passed to `addListener()` supports standard OSC wildcards, so one listener can match multiple messages that share some simliarities. These wildcards are supported by the OSC 1.0 standard: + +> * '?' in the OSC Address Pattern matches any single character +> * '*' in the OSC Address Pattern matches any sequence of zero or more characters +> * A string of characters in square brackets (e.g., "[string]") in the OSC Address Pattern matches any character in the string. Inside square brackets, the minus sign (-) and exclamation point (!) have special meanings: +> * two characters separated by a minus sign indicate the range of characters between the given two in ASCII collating sequence. (A minus sign at the end of the string has no special meaning.) +> * An exclamation point at the beginning of a bracketed string negates the sense of the list, meaning that the list matches any character not in the list. (An exclamation point anywhere besides the first character after the open bracket has no special meaning.) +> * A comma-separated list of strings enclosed in curly braces (e.g., "{foo,bar}") in the OSC Address Pattern matches any of the strings in the list. +> * Any other character in an OSC Address Pattern can match only the same character. +> +> -- [http://opensoundcontrol.org/] + #### Remove listener Of course, listeners also can be removed in a similar way: ```cpp