From 46e4ff23d3c65719774e42c06d52ad6286f58796 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 27 Mar 2019 14:38:29 +0100 Subject: [PATCH] docs: formatting --- resources/docs/docs/advanced-property-syntax.md | 11 +++++------ resources/docs/docs/midi.md | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/resources/docs/docs/advanced-property-syntax.md b/resources/docs/docs/advanced-property-syntax.md index c276a8ef..98c6d3b4 100644 --- a/resources/docs/docs/advanced-property-syntax.md +++ b/resources/docs/docs/advanced-property-syntax.md @@ -23,27 +23,26 @@ If the retreived property is an object (`[] / {}`), a subset can be defined by a !!! note "" The root panel's `id` is `root`. -### Using the value +#### Using the value The special property name `value` refers to a widget's current value (which can be affected by its `value` *property*). When omitted, the property name defaults to `value` : `@{widgetId}` => `@{widgetId.value}` -### Dynamic properties +#### Dynamic properties Some properties, when changed, trigger a complete widget recreation that ends any ongoing user interaction. Also, updating these properties continuously (e.g. when linked to a slider's dynamic value) can be very cpu expensive. Some properties have much cheaper update routines and can be considered as `dynamic`, as in performance safe. These properties are marked in the documentation with a ` `. -### Circular references cases +#### Circular references cases - container widgets can inherit their children's properties only to define `dynamic` properties - widgets can inherit their own `value` property only to define `dynamic` properties ----- -### Nesting +#### Nesting The inheritance syntax supports 1-level nesting : `@{fader_@{toggle_1}}` @@ -94,7 +93,7 @@ Additionnal functions: - `indexOf(a, x)`: returns index of item `x` in array `a` - `unpack(x)`: remove an array's brackets (`unpack([1,2])` returns `"1, 2"`) -- `pad(x, padding)`: add leading zeros if the length the integer part of `x` is smaller than `padding` (`pad(1,2)` returns `"01"`) +- `pad(x, padding)`: add leading zeros if the length of the integer part of `x` is smaller than `padding` (`pad(1,2)` returns `"01"`) - `length(x)`: returns the length of an array or string - `keys(x)`: returns an array of a given object's property names (from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)) - `values(x)`: returns an array of a given object's own enumerable property values (from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values)) diff --git a/resources/docs/docs/midi.md b/resources/docs/docs/midi.md index 9734b221..422ba7a6 100644 --- a/resources/docs/docs/midi.md +++ b/resources/docs/docs/midi.md @@ -33,7 +33,7 @@ In order to send MIDI messages, a widget must have at least one `target` formatt -### `/note channel note velocity` +#### `/note channel note velocity` NoteOn event or noteOff if velocity equals `0`. @@ -51,7 +51,7 @@ A push button might be configured as follows in order to send a MIDI note whose - `off`: 0 (to send a noteOff on button release) - `target`: ["midi:device_name"] (where device_name is one of the declared midi devices defined during [setup](#setup)) -### `/control channel cc value` +#### `/control channel cc value` Control change event. @@ -68,21 +68,21 @@ A fader might be configured as follows in order to send a MIDI control message ( - `range`: {"min": 0, "max": 127} (MIDI values are encoded in this range) - `target`: ["midi:device_name"] -### `/program channel program` +#### `/program channel program` Program change event. - `channel`: integer between 1 and 16 - `program`: integer between 0 and 127 -### `/pitch channel pitch` +#### `/pitch channel pitch` PitchWheel event. - `channel`: integer between 1 and 16 - `pitch`: integer between 0 and 16383 -### `/sysex msg v1 .. vN` +#### `/sysex msg v1 .. vN` System exclusive message.