split docs, rename mac to osc
This commit is contained in:
parent
145a3058f3
commit
6e8e4b0de2
12 changed files with 223 additions and 181 deletions
40
resources/docs/session-reference.md
Normal file
40
resources/docs/session-reference.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
## Session file reference
|
||||
|
||||
A valid session file is a javascript file that returns, when eval'd, an array of tab objects. It can be written as a standard json file :
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
id:"my_tab_id", // [string] optional, default to unique 'tab_n'
|
||||
label:"My tab", // [string] default to id
|
||||
widgets: [], // [array] of widget objects
|
||||
tabs: [] // [array] of tab objects
|
||||
// A tab cannot contain widgets and tabs simultaneously
|
||||
},
|
||||
{
|
||||
// etc
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
It can also be a self invoking function that returns an array of objects :
|
||||
|
||||
```
|
||||
(function(){
|
||||
var tabs = []
|
||||
for (for i in [0,1,2,3]) {
|
||||
tabs.push({
|
||||
id:'tab'+i,
|
||||
widgets: [
|
||||
{
|
||||
id:'tab'+i+'fader',
|
||||
type:'fader'
|
||||
}
|
||||
// etc
|
||||
]
|
||||
})
|
||||
}
|
||||
return tabs
|
||||
}()
|
||||
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue