ScenicScript

(Working Title)

Behind Schéma is a frame based visual language with a very simple tree structure.

This kind of structure lends itself very well to formats like JSON or YAML to achieve human readability, editing, easy transport and other benefits. Separating the language itself out also opens up the discussion about runtimes on completely different platforms and what are core features of the language and what are various possible platform specific extensions.

This is how a a ScenicScript program in JSON might look like:

{
"metadata": {
"author": "John Doe",
"description": "An example stack",
"dependencies": ["Core"]
},
"root": {
"name": "Example",
"comment": "The beginning",
"behavior": "Operator.Merge",
"parameters": {},
"inputs": [{
"behavior": "Source.Value.LFO",
"parameters": {
"Period": 2
}
},
{
"behavior": "Source.Color.Color",
"parameters": {
"ColorArr": [0, 1, 0, 0.5]
}
},
{
"behavior": "Source.Color.Constant",
"drivers": {
"Value": {
"from": 0,
"to": 1,
"root": {
"behavior": "Source.Value.LFO",
"parameters": {
"Period": 1
}
}
}
}
},
{
"reference": "other.stack.json"
}
]
}
}

Or even less verbose in YAML, which might work better for editing but is less widely supported as a transport format. Easy conversion between the two is possible however.

---
metadata:
author: John Doe
description: An example stack
dependencies:
- Core
root:
name: Example
comment: The beginning
behavior: Operator.Merge
parameters: {}
inputs:
- behavior: Source.Value.LFO
parameters:
Period: 2
- behavior: Source.Color.Color
parameters:
ColorArr:
- 0
- 1
- 0
- 0.5
- behavior: Source.Color.Constant
drivers:
Value:
from: 0
to: 1
root:
behavior: Source.Value.LFO
parameters:
Period: 1
- reference: other.stack.json

Or even more succinct with behaviors as object keys

{
"Create.Color.Constant": {
"Color": "#FFFFFF",
"Value": {
"Create.Value.LFO": {
"Period": "10"
}
},
"in": [
{
"Create.Value.LFO": {
"Period": "10"
}
},
{
"Create.Value.LFO": {
"Period": "10"
}
}
]
}
}

In YAML

---
Create.Color.Constant:
Color: "#FFFFFF"
Value:
Create.Value.LFO:
Period: '10'
in:
- Create.Value.LFO:
Period: '10'
- Create.Value.LFO:
Period: '10'