1
0
Fork 0

spelling and clarity

This commit is contained in:
Kevin Matz 2018-10-25 12:06:40 -04:00
parent 345c51e6ca
commit 5f808f4cf6
1 changed files with 27 additions and 19 deletions

View File

@ -1,21 +1,16 @@
# Bacon Script
A theoretical exersise to control a Hog 4 via OSC, with comment macros.
A theoretical exercise to control a Hog 4 via OSC, with comment macros.
The comment macro grammer described in `CommentMacro.g4` is based upon the Hog 3.9 manual, Chapter 22.4. The python3 implementation in `OscMacroDefinitions.py` is based on Chapter 24.2 in the same manual.
The comment macro grammar described in `CommentMacro.g4` is based upon the Hog 3.9 manual, Chapter 22.4. The python3 implementation in `OscMacroDefinitions.py` is based on Chapter 24.2 in the same manual.
Some macros are unsupported/unsupportable with this method. Some macro freatures, like timing, are not yet implemented. Refer to the **Features** table for specific notes.
Some macros are unsupported/unsupportable with this method. Some macro features, like timing, are not yet implemented. Refer to the **Features** table for specific notes.
## Installing
Install Python-OSC for output.
Install Antlr4 for input and Python-OSC for output.
```bash
$ pip install python-osc
```
Install Antlr4 for input.
```bash
$ pip install antlr4-python3-runtime
$ pip3 install antlr4-python3-runtime python-osc
```
Use git to retrieve a copy of the code.
@ -28,15 +23,20 @@ $ cd baconscript
Edit `server.cfg` to the correct values for your Hog4.
`comment.py` will accept macros on the command line, or will run an interactive prompt.
`comment.py` will accept macros on the command line, or will run an interactive prompt. Use the builtin command `exit` to quit the interactive prompt.
```bash
$ ./comment.py
comment#
Adding Hog device at net# 1
comment# GL1
(macro GL
(target
(number 1)))
Go on List 1
comment# exit
Goodbye.
```
Use the builtin command `exit` to quit the interacive prompt.
## Developing
You must also install the ANTLR tool. On a mac with homebrew, do:
@ -51,15 +51,21 @@ $ antlr -Dlanguage=Python3 CommentMacro.g4
## Features
Only features that are supported in both OSC and Comment Macros are able to be implimented in baconscript. This table lists all comment macros (as of 3.9) that are implimented in python.
Only features that are supported in both OSC and Comment Macros are able to be
implemented in baconscript. This table lists all comment macros (as of 3.9)
that are implimented in python.
| Grammar Feature | eg. | Supported |
| ----------------|-----|-----------|
| fade times | t5 | no |
| multiple targets | 1,2 | Yes |
| ranges | 1>4 | Yes, intigers only |
| ranges | 1>4 | Yes, integers only |
| multiple macros | GM1:GL3 | Yes |
| network devies | h4 | Yes, H devies only |
| network devices | h4 | Yes, H devices only |
Benefiting from the LL(*) parser provided by ANTLR, `multiple targets` and
`ranges` may be combined ad infinitum. This is a known deviation from the
Comment Macro syntax.
| Macro | Function | Supported | Notes |
|-------|----------|-----------|-------|
@ -67,7 +73,7 @@ Only features that are supported in both OSC and Comment Macros are able to be i
| HM | Halt Master | Yes | |
| AM | Assert Master | Partial | on current master only |
| RM | Release Master | Partial | on current master only |
| RA | Relase All | Yes | |
| RA | Release All | Yes | |
| RO | Release Others | no | |
| FM | Fade Master | Partial | no times, no * |
| FGM | Fade Grand Master | Partial | no times |
@ -100,6 +106,8 @@ Only features that are supported in both OSC and Comment Macros are able to be i
## Future Work
Pleas feel welcome to submit pull requests or patches that enable support for:
* Sending target ranges as OSC batches
* Sending target ranges as OSC arguments
* Hog4 does not support multiple agruments to a single path.
* Send multi-macro line as an OSC batch
* HogOS 3.9 has a bug involving batches. Whereby only every-other member of the batch will be interpreted.
* Timing on master fades