.TH ORCA 1.SH NAMEorca \- an esoteric programming language designed to quickly create procedural sequencers.SH SYNOPSIS.B games/orca[.I -i] [.I -p] [.I -bpm bpm] [.I -s WxH] [.I -r random_seed] [.I -c cursor] [.I -l undo_limit] [.I -n] [.I file].SH DESCRIPTION.I Orcais not a synthesizer, but a flexible livecodingenvironment capable of sending MIDI, OSC & UDP to your audio/visualinterfaces..PPEvery letter of the alphabet is an operation, where lowercase lettersoperate on bang, uppercase letters operate each frame. Extensivedocumentation of the language is available on the project's GitHub webpage, see.B SOURCEsection..PPThere are a number of options:.TP.B -iDestination IP address for UDP and OSC messages..TP.B -uPort number for UDP messages to be delivered to..TP.B -mPath to MIDI device for output..TP.B -sSet initial dimensions of the grid to.IR Wx.IR H ..TP.B -pStarts.I Orcain paused state..TP.B -rStarts with a specific random seed..TP.B -bSets initial "beats per minute" value..TP.B -cSets the cursor character..TP.B -lSets the maximum number of undo steps. Default is 100..TP.B -nForces the use of.I nsec()instead of relying on RDTSC..PP.SH KEYS.TP.B 'Enter rectangle.I selectionmode, use arrows to extend it..TP.B Ctrl+i InsertToggle between.I appendand.I insert(overwrite) mode..TP.B EscapeReturn to normal mode or deselect..TP.B ´ ` ~Toggle.I slidemode, use arrows to move the selected text around..TP.B SpaceToggle pause..TP.B Ctrl+rReset frame counter..TP.B Ctrl+fForward one frame, useful in paused mode..TP.B Ctrl+c Ctrl+xSnarf/cut the selected text..TP.B Ctrl+vPaste from the snarf buffer..TP.B Ctrl+Shift+vPaste from the snarf buffer, ignoring empty cells within it, thus notoverwriting what's been at the destination if possible..TP.B Ctrl+zUndo..TP.B Ctrl+yRedo..TP.B Ctrl+u Ctrl+lConvert selected text to upper/lower case..TP.B Ctrl+a Ctrl+eJump to the beginning/end of the line..TP.B Home EndJump to the first/last line..TP.B Delete Backspace Ctrl+hKeys to remove text..TP.B #Comment/uncomment selected text..TP.B Ctrl+kEnter a command. See.B COMMANDSsection for more information..TP.B Alt+arrowMove selected text..TP.B Shift+arrowExtend the selection. Works only in drawterm..TP.B Ctrl+arrowJump by the number of cells set for the rulers..TP.B < >Adjust BPM..TP.B ( ) _ +Adjust grid size..TP.B [ ] { }Adjust rulers..TP.B Ctrl+sSave to file..SH MOUSEMouse buttons works as one expects it. Left button selects arectangle on the grid. Snarf and paste are available by the usualmeans. Right button held opens a menu..PPHolding.I Shiftand pressing left mouse button will extend the selection withoutchanging the cursor position..PPHolding.I Altand pressing left mouse button will move the selection to the newcursor position, the cell under the mouse pointer..SH COMMANDSCommands can be entered into Orca either manually with.B Ctrl+kor with a.B $operator. Arguments may be separated with a (semi)colon as well asany whitespace characters.All commands except.I undo,.I redoand.I colorhave a shorthand equivalent to their first two characters..PPAny command can start with.I ,(comma) to select the entire grid before executing the command..TP.B |cmd arg...Pipe the selected text to a shell command and paste its output backinto the grid. Dots are replaced with spaces before feeding the inputto the command, and the other way around when it comes to command'soutput..TP.B <cmd arg...Execute a shell command and paste its output into the grid. Dots arereplaced with spaces..TP.B >cmd arg...Pipe the selected text to a shell command. Dots are replaced with spaces..TP.B playResume..TP.B stopPause..TP.B runForward one frame..TP.B copyCopy the selection to the snarf buffer..TP.B pastePaste from the snarf buffer..TP.B eraseErase the selected cells..TP.B bpm NUMBERSet new BPM value..TP.B apm NUMBERAnimate BPM to the value..TP.B frame NUMBERSet frame value..TP.B skip NUMERIncrease frame value..TP.B rewind NUMBERDecrease frame value..TP.B ip ADDRSet UDP/OSC destination IP address..TP.B udp NUMBER|PATHSet UDP destination port. Parameter is treated as a filename if it'san absolute path..TP.B midi PATHSet MIDI output path..TP.B printPrint selected rectangle to.IR stdout ..TP.B write TEXT [X] [Y]Writes the text at the cursor position or at.I X,Yif specified..TP.B inject FILE [X] [Y]Injects a file at the cursor position or at.I X,Yif specified.TP.B select X Y [W] [H]Select the specified rectangle..TP.B color [rrggbb ...]Change colors. Without any parameters it prints the current values..PP.I Orcatreats.I stdinas a stream of commands, you can run it like so:.EXaux/listen1 -t tcp!127.0.0.1!49160 games/orca.EE.PPThen start the following in a separate "command" window:.EXtelnet tcp!127.0.0.1!49160.EE.PP.SH PLUMBINGOrca supports injecting files at the current cursor position byplumbing. Add this to your plumbing rules to get it working:.EXtype is textdata matches '[a-zA-Z¡-0-9_\-.,/]+'data matches '([a-zA-Z¡-0-9_\-.,/]+)\.orca'arg isfile $0data set $fileplumb to orcaplumb start window games/orca $file.EE.PP.SH SOURCEhttps://git.sr.ht/~ft/orca
.TH ORCA 1
.SH NAME
orca \- an esoteric programming language designed to quickly create procedural sequencers
.SH SYNOPSIS
.B games/orca
[
.I -i
] [
.I -p
] [
.I -bpm bpm
] [
.I -s WxH
] [
.I -r random_seed
] [
.I -c cursor
] [
.I -l undo_limit
] [
.I -n
] [
.I file
]
.SH DESCRIPTION
.I Orca
is not a synthesizer, but a flexible livecoding
environment capable of sending MIDI, OSC & UDP to your audio/visual
interfaces.
.PP
Every letter of the alphabet is an operation, where lowercase letters
operate on bang, uppercase letters operate each frame. Extensive
documentation of the language is available on the project's GitHub web
page, see
.B SOURCE
section.
.PP
There are a number of options:
.TP
.B -i
Destination IP address for UDP and OSC messages.
.TP
.B -u
Port number for UDP messages to be delivered to.
.TP
.B -m
Path to MIDI device for output.
.TP
.B -s
Set initial dimensions of the grid to
.IR W
x
.IR H .
.TP
.B -p
Starts
.I Orca
in paused state.
.TP
.B -r
Starts with a specific random seed.
.TP
.B -b
Sets initial "beats per minute" value.
.TP
.B -c
Sets the cursor character.
.TP
.B -l
Sets the maximum number of undo steps. Default is 100.
.TP
.B -n
Forces the use of
.I nsec()
instead of relying on RDTSC.
.PP
.SH KEYS
.TP
.B '
Enter rectangle
.I selection
mode, use arrows to extend it.
.TP
.B Ctrl+i Insert
Toggle between
.I append
and
.I insert
(overwrite) mode.
.TP
.B Escape
Return to normal mode or deselect.
.TP
.B ´ ` ~
Toggle
.I slide
mode, use arrows to move the selected text around.
.TP
.B Space
Toggle pause.
.TP
.B Ctrl+r
Reset frame counter.
.TP
.B Ctrl+f
Forward one frame, useful in paused mode.
.TP
.B Ctrl+c Ctrl+x
Snarf/cut the selected text.
.TP
.B Ctrl+v
Paste from the snarf buffer.
.TP
.B Ctrl+Shift+v
Paste from the snarf buffer, ignoring empty cells within it, thus not
overwriting what's been at the destination if possible.
.TP
.B Ctrl+z
Undo.
.TP
.B Ctrl+y
Redo.
.TP
.B Ctrl+u Ctrl+l
Convert selected text to upper/lower case.
.TP
.B Ctrl+a Ctrl+e
Jump to the beginning/end of the line.
.TP
.B Home End
Jump to the first/last line.
.TP
.B Delete Backspace Ctrl+h
Keys to remove text.
.TP
.B #
Comment/uncomment selected text.
.TP
.B Ctrl+k
Enter a command. See
.B COMMANDS
section for more information.
.TP
.B Alt+arrow
Move selected text.
.TP
.B Shift+arrow
Extend the selection. Works only in drawterm.
.TP
.B Ctrl+arrow
Jump by the number of cells set for the rulers.
.TP
.B < >
Adjust BPM.
.TP
.B ( ) _ +
Adjust grid size.
.TP
.B [ ] { }
Adjust rulers.
.TP
.B Ctrl+s
Save to file.
.SH MOUSE
Mouse buttons works as one expects it. Left button selects a
rectangle on the grid. Snarf and paste are available by the usual
means. Right button held opens a menu.
.PP
Holding
.I Shift
and pressing left mouse button will extend the selection without
changing the cursor position.
.PP
Holding
.I Alt
and pressing left mouse button will move the selection to the new
cursor position, the cell under the mouse pointer.
.SH COMMANDS
Commands can be entered into Orca either manually with
.B Ctrl+k
or with a
.B $
operator. Arguments may be separated with a (semi)colon as well as
any whitespace characters.
All commands except
.I undo
,
.I redo
and
.I color
have a shorthand equivalent to their first two characters.
.PP
Any command can start with
.I ,
(comma) to select the entire grid before executing the command.
.TP
.B |cmd arg...
Pipe the selected text to a shell command and paste its output back
into the grid. Dots are replaced with spaces before feeding the input
to the command, and the other way around when it comes to command's
output.
.TP
.B <cmd arg...
Execute a shell command and paste its output into the grid. Dots are
replaced with spaces.
.TP
.B >cmd arg...
Pipe the selected text to a shell command. Dots are replaced with spaces.
.TP
.B play
Resume.
.TP
.B stop
Pause.
.TP
.B run
Forward one frame.
.TP
.B copy
Copy the selection to the snarf buffer.
.TP
.B paste
Paste from the snarf buffer.
.TP
.B erase
Erase the selected cells.
.TP
.B bpm NUMBER
Set new BPM value.
.TP
.B apm NUMBER
Animate BPM to the value.
.TP
.B frame NUMBER
Set frame value.
.TP
.B skip NUMER
Increase frame value.
.TP
.B rewind NUMBER
Decrease frame value.
.TP
.B ip ADDR
Set UDP/OSC destination IP address.
.TP
.B udp NUMBER|PATH
Set UDP destination port. Parameter is treated as a filename if it's
an absolute path.
.TP
.B midi PATH
Set MIDI output path.
.TP
.B print
Print selected rectangle to
.IR stdout .
.TP
.B write TEXT [X] [Y]
Writes the text at the cursor position or at
.I X,Y
if specified.
.TP
.B inject FILE [X] [Y]
Injects a file at the cursor position or at
.I X,Y
if specified
.TP
.B select X Y [W] [H]
Select the specified rectangle.
.TP
.B color [rrggbb ...]
Change colors. Without any parameters it prints the current values.
.PP
.I Orca
treats
.I stdin
as a stream of commands, you can run it like so:
.EX
aux/listen1 -t tcp!127.0.0.1!49160 games/orca
.EE
.PP
Then start the following in a separate "command" window:
.EX
telnet tcp!127.0.0.1!49160
.EE
.PP
.SH PLUMBING
Orca supports injecting files at the current cursor position by
plumbing. Add this to your plumbing rules to get it working:
.EX
type is text
data matches '[a-zA-Z¡-0-9_\-.,/]+'
data matches '([a-zA-Z¡-0-9_\-.,/]+)\.orca'
arg isfile $0
data set $file
plumb to orca
plumb start window games/orca $file
.EE
.PP
.SH SOURCE
https://git.sr.ht/~ft/orca