summaryrefslogtreecommitdiff
path: root/mix.scm
diff options
context:
space:
mode:
authorAlessio Treglia <quadrispro@ubuntu.com>2010-01-08 18:21:56 +0100
committerAlessio Treglia <quadrispro@ubuntu.com>2010-01-08 18:21:56 +0100
commitf369f1bdb2b9efc5b7ed3b74a0b4b51642086e18 (patch)
tree67d9e1386cd8c7b0fae976ca5c426dc43f54ed15 /mix.scm
parent8b022ab680a3f5e374a44f2c05c1671cfb2bc799 (diff)
Imported Upstream version 11.2
Diffstat (limited to 'mix.scm')
-rw-r--r--mix.scm34
1 files changed, 16 insertions, 18 deletions
diff --git a/mix.scm b/mix.scm
index 890559d..353a8a0 100644
--- a/mix.scm
+++ b/mix.scm
@@ -11,10 +11,8 @@
;;; check-mix-tags tries to move mix tags around to avoid collisions
-(use-modules (ice-9 common-list))
(provide 'snd-mix.scm)
-
(define (tree-for-each func tree)
"(tree-for-each func tree) applies func to every leaf of 'tree'"
(cond ((null? tree) '())
@@ -53,8 +51,8 @@
(mixes)))))
-(define* (find-mix sample :optional snd chn)
- "(find-mix sample :optional snd chn) returns the mix at the given sample, or #f"
+(define* (find-mix sample snd chn)
+ "(find-mix sample snd chn) returns the mix at the given sample, or #f"
(let ((mix-list (mixes (or snd (selected-sound) (car (sounds))) (or chn (selected-channel snd) 0))))
(call-with-exit
(lambda (found-it)
@@ -373,7 +371,7 @@ last end of the mixes in 'mix-list'"
(mus-sound-close-output fd (* (mus-bytes-per-sample mus-out-format) (length data))))))
-(if (not (provided? 'snd-env.scm)) (load-from-path "env.scm"))
+(if (not (provided? 'snd-env.scm)) (load "env.scm"))
(define (env-mixes mix-list overall-amp-env)
"(env-mixes mix-list amp-env) applies 'amp-env' as a global amplitude envelope to the mixes in 'mix-list'"
@@ -397,9 +395,9 @@ last end of the mixes in 'mix-list'"
mix-list)))))
-(define* (sync-all-mixes :optional (new-sync 1))
+(define* (sync-all-mixes (new-sync 1))
;; a replacement for set-all-tracks in snd-8
- "(sync-all-mixes :optional (new-sync 1)) sets the mix-sync field of every active mix to new-sync"
+ "(sync-all-mixes (new-sync 1)) sets the mix-sync field of every active mix to new-sync"
(for-each
(lambda (snd-m)
(for-each
@@ -448,9 +446,9 @@ last end of the mixes in 'mix-list'"
;;; -------- pan-mix --------
-(define* (pan-mix name beg pan :optional snd (chn 0) auto-delete)
+(define* (pan-mix name beg pan snd (chn 0) auto-delete)
- "(pan-mix file start pan-env :optional snd (chn 0) (auto-delete #f)) mixes 'file' into the sound 'snd'
+ "(pan-mix file start pan-env snd (chn 0) (auto-delete #f)) mixes 'file' into the sound 'snd'
starting at 'start' (in samples) using 'pan-env' to decide how to split the sound between the output channels (0: all chan 0, 1: all chan 1).
So, (pan-mix \"oboe.snd\" 0 '(0 0 1 1)) goes from all chan 0 to all chan 1.
'auto-delete' determines whether the in-coming file should be treated as a temporary file and deleted when the mix
@@ -541,9 +539,9 @@ panning operation."
#f)))))))))
-(define* (pan-mix-selection beg pan :optional snd chn)
+(define* (pan-mix-selection beg pan snd chn)
- "(pan-mix-selection start pan-env :optional snd chn) mixes the current selection into the sound 'snd'
+ "(pan-mix-selection start pan-env snd chn) mixes the current selection into the sound 'snd'
starting at 'start' (in samples) using 'pan-env' to pan (0: all chan 0, 1: all chan 1)."
(if (not (selection?))
@@ -551,9 +549,9 @@ starting at 'start' (in samples) using 'pan-env' to pan (0: all chan 0, 1: all c
(pan-mix (save-selection (snd-tempnam)) beg pan snd chn #t)))
-(define* (pan-mix-region reg beg pan :optional snd chn)
+(define* (pan-mix-region reg beg pan snd chn)
- "(pan-mix-region reg start pan-env :optional snd chn) mixes the given region into the sound 'snd'
+ "(pan-mix-region reg start pan-env snd chn) mixes the given region into the sound 'snd'
starting at 'start' (in samples) using 'pan-env' to pan (0: all chan 0, 1: all chan 1)."
(if (not (region? reg))
@@ -561,9 +559,9 @@ starting at 'start' (in samples) using 'pan-env' to pan (0: all chan 0, 1: all c
(pan-mix (save-region reg (snd-tempnam)) beg pan snd chn #t)))
-(define* (pan-mix-vct v beg pan :optional snd chn)
+(define* (pan-mix-vct v beg pan snd chn)
- "(pan-mix-vct v start pan-env :optional snd chn) mixes the vct data into the sound 'snd'
+ "(pan-mix-vct v start pan-env snd chn) mixes the vct data into the sound 'snd'
starting at 'start' (in samples) using 'pan-env' to pan (0: all chan 0, 1: all chan 1)."
(let* ((temp-file (snd-tempnam))
@@ -576,8 +574,8 @@ starting at 'start' (in samples) using 'pan-env' to pan (0: all chan 0, 1: all c
;;; -------- delay-channel-mixes
-(define* (delay-channel-mixes beg dur :optional snd chn)
- "(delay-channel-mixes beg dur :optional snd chn) adds dur (which can be negative) to the \
+(define* (delay-channel-mixes beg dur snd chn)
+ "(delay-channel-mixes beg dur snd chn) adds dur (which can be negative) to the \
begin time of each mix that starts after beg in the given channel"
(for-each
(lambda (m)
@@ -591,7 +589,7 @@ begin time of each mix that starts after beg in the given channel"
;;; -------- check-mix-tags
(define* (check-mix-tags snd chn)
- "(check-mix-tags :optional snd chn) tries to move mix tags around to avoid collisions"
+ "(check-mix-tags snd chn) tries to move mix tags around to avoid collisions"
(if (not snd)
(for-each check-mix-tags (sounds))
(if (not chn)