page46
© Hit’n’Mix Ltd 2009-2021
46
DeepAudio: RipScript Editor
Audioshop and tools such as the Clone Pitch/Sound Tool
and Volume Mapper are all RipScripts, which are based on
the easy and popular Python 3 programming language. It is
possible to write your own RipScripts with the RipScript
Editor which can be opened from the Tools/RipScripts
menu. From the same menu, an introduction to RipScripts
can be viewed by clicking Create RipScript…, selecting
Introduction to RipScripts and clicking OK.
Please email RipScripts to
ripscripts@hitnmix.com
. The most useful ones will be featured on our website.
Notes about some features of the editor:
Indents
RipScripts run in a computer language called Python 3. It requires that code uses
indentation rather than brackets for grouping instructions, and each indent can be
either 4 spaces or 1 tab. The RipScript editor enters 1 tab each time the Tab key is
pressed, which particularly for beginners, prevents any confusion that the correct
number of spaces has been entered. It is however possible to enter spaces using the
Spacebar instead, although they cannot be mixed with usage of tabs in a RipScript.
Code indented using spaces copied & pasted into your RipScript will be automatically
converted to use tabs if it already uses tabs for indentation.
Auto-complete
As you type, the editor will predict what you want to enter and offer a list of
selections. The more you type, the shorter the list will become. Click on an item to
enter, or use the keyboard Up & Down arrows and press Enter.
Object descriptions
As you move through different predictions in Auto-complete, RipX will also show you a
description of the function or attribute and often provide sample code which you can
insert into your RipScript. To do this, click & drag over the code snippet to select it.
Then, on macOS, copy by right-clicking over the text and choosing Copy from the
menu; on Windows, press Ctrl+C. Finally, paste into your RipScript by placing the caret
at the position you’d like to insert, and using Edit>Paste from the menu bar or
X
/Ctrl-
V. Descriptions are also shown when you hover the mouse pointer over function
names, attributes, and some Python keywords in RipScripts.
Placeholders
After selecting a function (followed by brackets) from the auto-complete list, it is
entered into the RipScript and, depending on the function, will be followed by a list of
arguments to fill in. Press Tab to jump to the next argument to fill (for example, if you
are finished with entering one, or do not need to enter a value). Shift-Tab jumps to
the previous argument. Enter finishes entering of arguments and places the cursor
after the final bracket.
Arguments that must be filled in are followed by the equals sign:
=
Arguments that are optional are followed by this sign:
≈
RipScript reference
For a tree diagram showing how various RipScript objects are related to each other,
with links to a complete online reference of the full API: When the RipScript editor is
open, choose How To Create RipScripts from the menu (macOS: the menu bar Help
menu; Windows: the pop-up menu, by right-clicking over the editing section of the
editor window).