aboutsummaryrefslogtreecommitdiff
path: root/site/udo/twist/transforms/general.udo
diff options
context:
space:
mode:
Diffstat (limited to 'site/udo/twist/transforms/general.udo')
-rwxr-xr-xsite/udo/twist/transforms/general.udo28
1 files changed, 28 insertions, 0 deletions
diff --git a/site/udo/twist/transforms/general.udo b/site/udo/twist/transforms/general.udo
new file mode 100755
index 0000000..b46f570
--- /dev/null
+++ b/site/udo/twist/transforms/general.udo
@@ -0,0 +1,28 @@
+#include "/twist/transform_api.udo"
+
+instr twst_tfi_reverse
+ $TWST_TRANSFORM
+ ileft, iright, istartsamp, iendsamp, idocut, ilength twst_tf_getstate
+ ifnL, ifnR twst_tfi_getfn
+ ioffline twst_tf_isoffline
+ apos linseg (iendsamp - istartsamp) - 1, ilength, 0
+ if (ileft == 1) then
+ if (ioffline == 1) then
+ ifntempL ftgentmp 0, 0, -ftlen(ifnL), -2, 0
+ tableicopy ifntempL, ifnL
+ aL table3 apos, ifntempL
+ else
+ aL table3 apos, ifnL
+ endif
+ endif
+ if (iright == 1) then
+ if (ioffline == 1) then
+ ifntempR ftgentmp 0, 0, -ftlen(ifnR), -2, 0
+ tableicopy ifntempR, ifnR
+ aR table3 apos, ifntempR
+ else
+ aR table3 apos, ifnR
+ endif
+ endif
+ outs aL, aR
+endin