~$/>>%<>==?<=->=+,#@ All Sunya Commands At Your Command Press Enter once to call for comprompt. From here we can type in all commands. Sunya commands sinthax uses somewhat universal symbols to construct operations to be performed at every heart beat. A Sunya heartbeat takes 60 miliseconds to complete which is the time we give the machine to perform all the tasks demanded. The machine heat can be monitored by recalling its value using a command: ~/memheat Sunya allows 2 commands at maximum per orb request to perform at every heart beat. Commands can be a single keyword, or a series of keywords separated by the symbol '/' and other symbols to specify what we want to do with the data accessed by the commands. Orbs are memory structures used by the program to organize access. Orbs hold data lines and beats created to be accessed anytime using the required combination of keywords. Orbs purpuse and tools available are determined by their Aspect. Each aspect can work with specific keys to perform different operations. There are 7 Aspects fo far. There is: text, script, circle, rectangle, image, oscillator and audio. Sinthax Polarity Polarity can increase or decrease values on orbs containers designed to hold numbers. We use polarity commands to operate on most orbs aspects parameters. The sinthax is generally built like this: On the left side of '>>' we can type in '+' or '-' , which can be followed by a number . examples: '+23', '-456' , '+' , '-' , '+100' . We call these polarity signals, we use numbers to modify data inside target orbs. On the right side after '>>' , there goes the polarity signal access key to work on the target. Complete commands would look like: +45>>orbname/x -100>>~/x +14>>orbname/image/2/x We can use polarity signals combined with number values that already exist on a specified text line, and use this number to add into a target, we can say: +/orb/line>>orb2/line So now the value on the orb line will be used to add to the target orb2 on the specified line. If the target is an orb/text , then polarity will act on all text lines of the target at once This command will add 23 to all lines on target text orb as long as lines have numeric values. +23>>orb/text Signal , Source and Target Signals are commands which work with a different number of targets. Some signals can take numbers and use '/' to specify where the signal wil extract Its source from. Simple signals general structure looks like this: signal>>target Signals start with a keyword and may or not take specifications using '/' and a sourcetext to get such specifications. A Target is an Orb name. We can extract orb names from a text as well. Signals always go on the left side of '>>'. examples: unseal>>Orb1 rmline>>Orb2/text/3 delete>>Orb3 Some signals can be slightly modified to work with multiple lines or numbers stored on other text containers. Signals and Texts Many signals work with texts and specified lines. A source text orb name and line with which we want to work with goes after the signal on the left side of the instruction, and the target goes on the right side: signal/source/line>>target A target could be a single orb name, or a text orb holding multiple orb names. Containers, Keys, And Formated lines We can access orbs containers and keys by typing its name and the symbol '/' on the comprompt: orbname/aspect By replacing 'aspect' with 'text', 'circle', 'script', or any other Aspect, we can request all beats stored in the Aspect container. Containers can hold many beat lines. When we want to access a specific beat on the container, we use a key: orb/aspect/key We replace 'key' with a number to access the line number that holds the beat we are interested in. We can also replace 'key' with the words 'current', 'last', and 'cn'. 'current' will access the beat that is active in this heartbeat. 'last' will access the last beat on the container. And 'cn' returns a number, which is the line number of the dataline that is currently beating. On its own, this command would return a beat formated dataline or a number for us to work with.. But we can use even another keyword on this command chain which can be used to retrieve a specific parameter on the reffered beat. orb/aspect/key/param We replace 'param' with any parameter we would like to access from the beat. examples; orb/circle/5/radius orb/rectangle/2/w Transfering Data Commands that begin with the name of an existing orb are access commmands. We can retrieve data as a single line or a multiliner from orbs using one or more specifications with '/'. Commands that return a value or a list of values can be copied into a target container. Here are some examples: This command will take all beats on the circle Aspect of orb1, create a list of circle beats formated in text lines, and fill orb2 text with them so we can see the beats in a text format. orb1/circle>>orb2/text We can then modify this text and put it back into orb1/circle, so now the circle will use each line we just modified to create a different , modified circle animation. orb2/text>>orb1/circle And this is how every Aspect can be configured to create its animation or perform an activity by using the lines stored on its beat container. All beats can be tranformed into text format, edited, and used to replace the previous beats to modify the aspects tasks. Literals We can also use '#' to create literals and change values on Aspects containers or keys directly. This line will place the value 'loop' on the orb1/circle/run container key 'orb1/circle/run'. And so the animation will begin to loop. #loop>>orb1/circle/run These containers we call 'keys'. Keys are numbers or keywords we use to work with Aspects. Values stored on keys control how the Aspect will manifest its content. We can create these literal values from comprompt and store them into our target orb key or container using the hashtag symbol. example: #This line will now be stored on the container after the arrow symbol, the fifth line of the orb1 text container>>orb1/text/5 Literals always ignore sinthax and simply go into the container or key after the last double arrow '>>' of the instruction. A literal can be used to create another literal like this: ##loop>>orb1/script/run>>orb2/script/new This line will push a new script instruction into orb2 script container. If this instruction is executed by orb2 at some point, it will store the literal word 'loop' into the orb1 script run key. Conditions and Connectors We can retrieve 2 values using retrieve commands and compare them to check if they are equal, '==', greater or equal than '>=' or less or equal than '<=' the other, and use this result to unlock an instruction specified after a connector '<>'. examples: orb1/text/3==orb2/circle/3/x<>orb3/text/1>>orb4/rectangle/2/w orb1/text/1<=orb1/text/2<>#we can create a literal here to go into>>orb2/text/10 Conditions always require a connector to work properly. But we can also use connectors to run a second instruction with a single line as long as the first instruction was able to be executed succesfully. orb1/x>>orb2/x<>#If both orbs exist and transfering x value was succesful, then this line will go into>>orb2/text/2 The Grid Sunya takes advantage of Javascript Canvas API to perform all its visual operations. We use the canvas provided with its coordinates grid as is. Normally users running the program offline will have their screen located initially at x:0 y:0 . To displace to the right, we would have to add positive numbers to our 'x' container, and negative values to move to the left. 'y' moves structures down with positive values while moving up with negative values. So; +100>>~/x displaces the screen to the right by 100 pixels. -100>>~/x moves the screen to the left. +100>>~/y moves the screen down. -100>>~/y moves the screen up. All Aspects structures in Sunya use this same grid logic for consistency. Special symbols and Multiple instructions We can transfer data to multiple orbs at once using triple arrow sinthax and a text list with targets like this: orb1/text/3>>>orb2/text orb2 needs to be a text and have valid access keys listed in, so the content on text 3 of orb1 will be copied and stored into every specified access keys on the list: orb3/rectangle/run orb4/circle/run orb5/image/run If orb1/text/3 holds the value of 'play', then this command would make all orbs start their animations at the same time. We only use '>>>' with transfer commands. Signals dont need triple arrows to work with multiple orbs at once. Commands Here is a complete list of the system commands with examples. Some commands are simple words with no '/' , these create very specific effects. Many signal commands can use orbs texts to perform operations on datalines to be used by other aspects animations as well. loadimage Loads an image into the browser for orbs with the image Aspect unsealed to request in order to create animations. Sprites are convenient to work with but any image will do. Once an image is loaded into the browser, orbs that want to use it must transfer the image name into their image 'file' key and they are ready to go. filename>>orbname/image/file To request for data lines holding all names of currently loaded images we can use the command ~/limage We can put loaded images names into a text and then use the dataline holding the name we want to set up the image orb. ~/limage>>orb/text<>orb/text/1>>orb2/image/file loadaudio Loads audio into browser for orbs to use. ...(incomplete) kaoz This command will prevent sunya from clearing up the screen at every heartbeat. Use it to unlock your artistic potential zai This command will make sunya clear the screen at every heartbeat. Use it to help you think with clarity. wev A command to toggle between script activity feedback animations on. vew Sets off script activity feedback animations. @aspect>>neworbname Create a named orb with its aspect unsealed. A memory structure designed to contain data lines with diferent formats to instruct various operations on the visual and audio elements in the program. Replace 'aspect' with any of the 7 aspects to create an specialized orb. Orbs are asigned a name inmediately after they have manifested, sealing and coupling their destiny to their creator. An orb can also be named using a data line from an orb text like this: @text>>orb/text/1 If we use a multiliner, we can create multiple orbs with a specified Aspect with a single command, using each line in the text as an orb new name: @circle>>orb/text delete>>orbname Deletes the target orb if possible. We can use a text from a line to select our target. like this delete>>orb/text/line We can also delete multiple orbs using a multiliner if we have orb names to be used as targets on the text. delete>>orb/text rmline>>orbname/aspect/line Remove a target line or beat from an orb. If we wanted to remove the third line from a specific Orb text we could say: rmline>>orb/text/3 We can remove the currently selected line by typing in: rmline>>orb/text/current To remove any number of lines we can do: rmline>>orb/text/3-15 .. to remove from line 3 to line 15 at once. We can also remove beats from aspects just the same: rmline>>orb/circle/4 unseal>>targetorb We can unseal an orb Aspect. When an Aspect is unsealed, it becomes fully active. Not only we can modify the aspect keys and containers but they fill reflect changes instantly, run animations, and create sounds. We can unseal multiple targets at once by storing orbs names on a target text. unseal>>orb/text seal>>targetorb When an aspect is sealed, it will retain the data concerning the aspect so we still might be able to modify it but animations and sounds will not be produced. We can seal multiple targets at once the same as unseal. seal>>orb/text jsonout>>target Stringify orb from a target or a target list, to be available to be copied from input box jsonout>>orb/text Use a list of orbs from the target to be stringified. jsonin Makes input box receptive to read json orbs or sunya states in json. A "Sunya state" is all orbs running on a moment in the past. Its a "clear all orbs and recreate this moment" instruction. Use with caution. scan/formorb/sourcetext>>target scan is a signal that works with 2 texts and 1 form: A circle or a rectangle orb. Checks for every orb by name on a source list text orb, and asks if its located inside the area of the form. If so, it pushes the names into the target text orb list. append/source/line>>target append works with 2 text orbs. Grabs a single line from a source text orb, and appends the text into everyline on the target text orb. random/source/line>>orb/text/line random takes 2 numbers counting frm the specified line on source, and uses them as min and max to produce a random value in between. percent/percentsource/line/totalsource/line>>target/text/line percent grabs a desired percent number from percentsource, to calculate from totalsource, and puts the result on target. screenxy/source/line>>orb , orb/text screenxy is used to work with the screen position using percentages. it uses 2 lines from a source, both percentages desired. First line corresponds to x, second line corresponds to y. The result can be applied directly on an orb position, or it can be stored as 2 lines,x and y, in a text orb. swap>>orbtext swap works with pairs of lines contained in a text. All lines in the target text should hold script orbs names to be swaped in order to change the order of execution. algo01/source>>orb/text algo01 works with 2 text orbs. Grabs 6 lines from a source orb and produces 2 values x and y. tldr; Change parameters from source to produces wifferent positions. somewhat experimental. Entity Keys The symbol we use to reffer to the entity is the squigly line '~' . Commands retrieve or modify their values depending on which side of the double arrow composed symbol '>>' are written. If we wanted to see the value of the center of the screen x and print it on an orb text we would say: ~/x>>orb/text But if we wanted to modify this same value to a specified new value then we could say: #200>>~/x ..to make user screen go to x 200. We could also use polarity signals like this: +120/x>>~ .. to displace the user screen by 120 pixels to the right. ~ Returns all data from the entity on a single text with multiple data lines. ~/name read. write. The name of the entity ~/orbs read. A list of all orbs names currently in control of the entity. We can specify aspect to only look for aspect match orbs or all to look for in all aspects: ~/orbs/text ~/orbs/all We can then use a pattern to match orb names partially: ~/orbs/all/Star This command will look for all orbs that have the pattern 'Star' somewhere on written on their names and print it. NorthStar, Starless, EastStar .. all these would be printed. ~/stance read. write. Holds the orb name of the current stance. Change this value to change the entity stance. ~/dsignat read. write. Holds a single partial beat to colour all new forms that demand it, to be used once created by the entity. A signature. ~/in read. The value sent using inprompt. Clears at the end of every heartbeat ~/out read. The value sent using comprompt. Clear at the end of every heartbeat. ~/inline read. write. The current value on inprompt at any moment. ~/comline read. write.The current value on comprompt at any moment. ~/limage Returns all names of loaded image files on the browser on a text list. ~/laudio Returns all names of loaded audio files on the browser on a text list as well. ~/x read. write. Entity x coordinate. The center of the user screen. ~/y read. write. Entity y coordinate. The center as well. ~/skeys read. write. A list of shortcut keys to asign commands into keyboard symbols or buttons for touchscreen users. We can modify these lines and put them back to effectively modify all user keys shortcuts. ~/skeys/new We can use 'new' on this command to add a new shortcut to the list. example: #name,MyButton,key,Digit4,com1,~/orbs>>~/skeys/new ~/screenx Returns the x coordinate of the top left corner of the screen at any moment. ~/screeny Returns the y coordinate of the top left corner of the screen at any moment. ~/screenw Returns the width of the screen in pixels. ~/screenh Returns the height of the screen in pixels. Orb Keys $ Access data from the orb currently running the command. If an orb runs a script and uses this symbol, then the symbol will hold the value of the orb name that is running the script. If the current stance holds the name of an orb with its text Aspect unsealed, then this command will print data on this orb text container inmediately. % Access data from the orb currently on entity stance. If an orb runs a script and uses this symbol, the symbol will now hold the value of the entity stance orb at any moment. If the current stance holds the name of an orb with its text Aspect unsealed, then this command will print data on the stance orb text container inmediately. orbname Returns most relevant data from the named orb on a multiliner. If the current stance holds the name of an orb with its text Aspect unsealed, then this command will print data of the named orb on the stance text container inmediately. We can also redirect the data requested into any other orb with text aspect unsealed to be printed by it. example: orbname>>orb2/text orb/name read, write. Returns the Orb name to be used somewhere else. Takes a value to replace a target orb name if used like this: #newname>>orb/name orb/aspect Returns the aspect of the orb. orb/x , y read,write We can access or modify the position of the orb center of activity. All aspects use these values as refference to construct its animations. Text Aspect The text aspect allows Orbs to manage,contain, and manipulate text and numbers. Text aspect can be used to retrieve values stored in other orbs to work with. When the entity ~/stance key matches the name of an existing orb, we say this is the entity stance. When the stance orb has its text Aspect unsealed, we can call inprompt and write a text line into the currently selected line. Also, if we execute commands that retrieve data without using '>>' , then the content retrieved is dumped in the stance text right away. like this; Create a text orb and make it the entity stance inmediately after by chaining a second instruction using the '<>' symbol and '#' with the literal name of the orb: @text>>MyOrb<>#MyOrb>>~/stance Now press call inprompt and type in some some words and then enter. You just created a line in the text. Now press Enter once, and try using any retrieving comands; ~, $, $/name, ~/x... and so on. orb/text read, write. Returns or rewrites all text lines at once. We can dump any kind of data into a text orb. We can also retrieve all lines of text in the orb at once. examples: orb/text>>orb2/text Will copy all text lines from orb to orb2. ~/orbs>>orb/text Will dump a list of Orbs into an orb text target for us to see. orb/text/x>>orb2/text Will overwrite and put the value of orb text x into orb2 text. orb/in read, Returns input produced when the entity sends a line into a text orb from inprompt. It can also be used to write a line into the orb currently selected line position like this: #some words here>>orb/in The literal will now go into the selected line position on the target orb and will also be available for any other orb listening to this input for a heartbeat. orb/text/cn read, write. The number of the active, currently selected line on the orb text. Change this number to change the value of the current line. orb/text/1..2..3..4..1-5..4-12..last..current read, write. Access lines by number or by keywords . "last" , and "current" . When we dump a data line into a specific target like this, then the previous line is overwriten. example: #these eleven words will replace or insert the fifth line on orb1 text>>orb1/text/5 orb/text/new We can add the 'new' key like this in order to specify that we want to create a new line at the end or the text. We only use this key when the command is writen on the right side of '>>' ; #This fourteen words will be added at the end of the target orb text>>target/text/new Text Beats 'beats' is a special container that can be accessed after the 'line' key. This contaner holds beat formated lines. They look like this: r,34,g,70,b,43,a,0.7 The beat format line has parameters followed by their value and they are all separated by comas. We only need to specify the changes we want to see. orb/text/1..2..3..last..current/beats read, write. Access or returns all beats of a specific line key. Each line has beats to determine how the line will look. We can control rgba values and layer directly on every beat. orb/text/1..2..last..current/1..2..last..current..cn read, Returns a single text line beat formated properly from the specified line using a number or a keyword, "last" or "current". orb/text/1..2..last..current/mirror write, Creates a mirror image using data from location and a custom beat. To create a mirror state image that lasts a hearbeat, we feed a beat formated line into this command to use the state reffered by the line key as base , and modify it with the changes specified. example: This command will create an exact copy of the currently selected line state of the orb and modify its red parameter by adding 23, and substracting 67 to its green parameter. The copy will last for a heartbeat. r,23,g,-67>>orb/text/current/mirror Script Aspect The script aspect allows Orbs to execute commands sequentially , one line per heartbeat , independently and or in response to possible events and conditions. All commands stored in the orb/script container will be executed one after the other depending on the value stored or the 'run' key. orb/script/run. orb/script read, write. Returns or rewrites all command lines stored in the orb at once. orb/out read only. Returns data concerning the command currently being executed by the orb. orb/script/run read , write, The value in this orb key will determine the behavior of the script. 'off' ,'once' and 'loop'. 'off' will stop the execution of the script. 'once' will execute the script contained in the orb once. 'loop' will execute over and over in a loop. orb/script/cn read, write. The number of the active line. Current number line that contains the instruction being executed. orb/script/1..2..3..4.. last..current read, write. Access command lines on script container. orb/script/new write. append a new command line at the end of the script. Circle Aspect The circle aspect allows Orbs to excert control over a circular area in the canvas, affecting pixels, and scanning for other specified target. A circle can be used to delimit a specific effect or sound. The circle beat in line format with all its possible parameters defined and functioning looks like this: r,255,g,255,b,255,x,100,y,100,cx,0,cy,0,a,1,layer,2,inside,empty,radius,100 Each parameter is followed by a coma and then the value we want to asign to it. Values that cannot be used will cause the beat not to render the circle form. The order of the parameter and value pairs is not important as long as the parameter is followed by its desired value. orb/circle read, write. Holds all circle aspect beats formated lines only. orb/circle/run read , write, The value in this orb key will determine the behavior of the circle animation. 'off' ,'once' and 'loop'. 'off' will stop the execution of the circle animation. 'once' will execute the circle animatino contained in the orb once. 'loop' will execute over and over in a loop. orb/circle/cn read, write,toggle. The number of the active beat line. Holds the value of the circle current beat number. orb/circle/1..2..3..4.. last.. current read, write. Retrieve beat format line or write a beat into it to modify the beat parameters of the circle. orb/cirle/1..2..last..current/mirror write. Create a mirror state using beat accessed data and a beat format text line. Rectangle Aspect The rectangle aspect allows Orbs to excert control over a rectangle. orb/rectangle read, write. Holds all rectangle aspect beats formated lines only. The rectangle beat format line with all its possible parameters defined looks like this: x,0,y,0,w,200,h,200,r,255,g,255,b,255,a,1,layer,2,inside,empty orb/rectangle/run read , write, The value in this orb key will determine the behavior of the rectangle animation. 'off' ,'once' and 'loop'. 'off' will stop the execution of the rectangle animation. 'once' will execute the rectangle animatino contained in the orb once. 'loop' will execute over and over in a loop. orb/rectangle/cn read, write,toggle. The number of the active beat line. Holds the value of the rectangle current beat number. orb/rectangle/1..2..3..4.. last.. current read, write. Retrieve beat format line or write a beat into it to modify the beat parameters of the rectangle. orb/rectangle/1..2..last..current/mirror write. Create a mirror state using beat accessed data and a beat format text line. Image Aspect The image aspect allows Orbs to create animations using image files loaded into the browser. The image beat format line with all its possible parameters defined with an example value look like this: x,0,y,0,w,200,h.200,px,0,py,0,pw,200,ph,200,cx,0,cy,0,a,1,layer,2 Image beats need a few more specifications than a rectangle beat. x and y parameters determines the coordinate from which we will extract the part of the image that concerns us. w and h will determine the size of this extracted part. We then use cx and cy to locate the center point from which we will start drawing the extracted image part into the canvas. cx and xy are used to create a refference point from which we can work with the animation. Once the animation is ready we can relocate the whole animation by changing these values again. pw and ph are used to determine the size if we want to expand or reduce the image part already extracted. px and py are values in pixel unit to determine how much we want to get away or get close to from the image center refferenced by cx and cy. orb/image read, write. Holds all beat formated lines only. orb/image/file read,write Image buffer. Holds the image file name to synch orb image Aspect with beats stored on /image. If the name does not match a name of a file already uploaded to the browser, then the beats wont draw anything. orb/image/run read, write. 'off' 'once' 'loop'. Same as circle and rectangle aspects. orb/image/cn read, write,toggle. The number of the active beat line. current number orb/image/1..2..3..4.. last.. current read, write. Retrieve beat format line or write a beat format line into it to modify it. orb/image/1..2..last..current/mirror write. Create a mirror state using beat accessed line and a beat in text line format provided by the data on the left side of '>>'. example: x,230,y,456>>targetorb/image/current/mirror Oscillator Aspect Oscillator aspect is able to manifest the capacity of orbs to build oscilators to be run on demand. Audio aspects differenciate from visual Aspects because Audio would be limited if we could only synch using the heartbeat of Sunya. Due to human audio sensitivity, audio scripts can be programmed in miliseconds and tone lines(the beat line of oscilator orbs) are all run at once when the script is executed. But we can specifify all timmings at once or modify an oscilator parameter once its playing. (incomplete) orb/osc read,write All oscillator lines at once. Tone lines. orb/osc/run read,write . We use 'off' to set all tones off. We use 'play' to create all tones at once stored on the oscillator container. As long as tone lines are playing, orb/osc/run will return 'play'. orb/osc/1..2../gain read,write We can adress a specific tone line playing to modify its parameters in real time. gain range possible value.... incomplete orb/osc/1..2../freq read, write The frequency of the tone. Audio Aspect Audio aspect is used to manage audio structures created using Audio files loaded into the browser (incomplete) ~$/%#?>>==<>~$/%#?>>>==<>~$/%#?>>==<>~$/%#?>>>==<>~$/%#?>>==<>~$/%#?>>==<>~$/%#?>>==<>~$/%#?>>>==<>~$/%#?>>==<>~$/%#?>>>==<>~$/%#?>>==<>~$/%#?>>==<>