summaryrefslogtreecommitdiff
path: root/extsnd.html
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2010-09-22 11:13:01 +0200
committerAlessio Treglia <alessio@debian.org>2010-09-22 11:13:01 +0200
commit21c0acaad1b1fa3d17c911ff7e4ad05d63310195 (patch)
tree78c71c4b3e27b7e107e5023c67123a3cacc018de /extsnd.html
parent6d99b2e313fc5878ab1ac115460f0e85595825a0 (diff)
Imported Upstream version 11.9
Diffstat (limited to 'extsnd.html')
-rw-r--r--extsnd.html138
1 files changed, 30 insertions, 108 deletions
diff --git a/extsnd.html b/extsnd.html
index 9fb624b..8770cc1 100644
--- a/extsnd.html
+++ b/extsnd.html
@@ -779,7 +779,7 @@ There are also "unscaled" versions of the floating point types, and "normalized"
This is the default header type when a new file is created,
or a save dialog is opened. (The default, <code>mus-next</code>, stands for the NeXT/Sun sound file header).
The available output header-types are:
-<pre onmouseout="UnTip()" onmouseover="Tip('mus-riff is our name for Microsoft wav,<br>mus-rf64 is the EBU 64-bit RIFF-replacement header,<br>mus-nist refers to NIST-SPHERE files,<br>mus-next and mus-sun are the same,<br>mus-aiff is the obsolete predecessor to mus-aifc,<br>mus-bicsf and mus-ircam are extensions of mus-next headers,<br>mus-raw means &quot;headerless&quot;,<br>mus-soundfont refers to Emu\'s extension of mus-riff files,<br>mus-voc refers to Creative Voice File,<br>mus-svx refers to 8SVX headers.<br>Many other headers are supported read-only.')">
+<pre onmouseout="UnTip()" onmouseover="Tip('mus-riff is our name for Microsoft wave,<br>mus-rf64 is the EBU 64-bit RIFF-replacement header,<br>mus-nist refers to NIST-SPHERE files,<br>mus-next and mus-sun are the same,<br>mus-aiff is the obsolete predecessor to mus-aifc,<br>mus-bicsf and mus-ircam are extensions of mus-next headers,<br>mus-raw means &quot;headerless&quot;,<br>mus-soundfont refers to Emu\'s extension of mus-riff files,<br>mus-voc refers to Creative Voice File,<br>mus-svx refers to 8SVX headers.<br>Many other headers are supported read-only.')">
mus-next mus-aifc mus-riff mus-rf64 mus-nist mus-raw mus-ircam mus-aiff
mus-soundfont mus-bicsf mus-voc mus-svx mus-caff
</pre>
@@ -790,7 +790,8 @@ The available output header-types are:
<tr><td colspan=2 bgcolor="#f2f4ff"><code><a class=def name="defaultoutputsrate">default-output-srate</a></code></td>
<td bgcolor="#f2f4ff"><code>44100</code></td></tr><tr><td></td><td colspan=2>
This is the default sampling rate when a new or temporary file is created,
-or a save dialog is opened.
+or a save dialog is opened. It also sets the default CLM srate (*clm-srate* in ws.scm),
+so all CLM generators use it outside with-sound.
</td></tr><tr><td colspan=3 height=16></td></tr>
@@ -910,7 +911,7 @@ See the function html in index.scm.
<!-- just-sounds -->
<tr><td colspan=2 bgcolor="#f2f4ff"><code><a class=def name="justsounds">just-sounds</a></code></td>
-<td bgcolor="#f2f4ff"><code>#f</code></td></tr><tr><td></td><td colspan=2>
+<td bgcolor="#f2f4ff"><code>#t</code></td></tr><tr><td></td><td colspan=2>
If just-sounds is #t,
the file lists displayed by the file selection dialogs are filtered to show just
sound files (see <a href="#addsoundfileextension">add-sound-file-extension</a>).
@@ -1096,8 +1097,8 @@ a sine wave at (say) 55 Hz, then <code>(<a class=quiet href="#srcsound" onmouseo
<!-- snd-version -->
<tr><td colspan=2 bgcolor="#f2f4ff"><code><a class=def name="sndversion">snd-version</a></code></td>
-<td bgcolor="#f2f4ff"><code>"1-Jun-06" etc</code></td></tr><tr><td></td><td colspan=2>
-This is a string giving the current Snd version, normally a date.
+<td bgcolor="#f2f4ff"><code>"Snd 11.7, 9-Aug-10"</code></td></tr><tr><td></td><td colspan=2>
+This is a string giving the current Snd version.
</td></tr><tr><td colspan=3 height=16></td></tr>
@@ -1794,7 +1795,7 @@ See <a href="sndscm.html#withlevelmeters">with-level-meters</a> in snd-motif.scm
<tr><td colspan=3 bgcolor="#f2f4ff">
<code><a class=def name="drawmarkhook">draw-mark-hook</a> (mark)</code> [<b>progn</b>]
</td></tr><tr><td></td><td colspan=2>
-This hook is called before a mark is drawn (in XOR mode except in cairo). If the hook function returns #t, the mark is not drawn.
+This hook is called before a mark is drawn. If the hook function returns #t, the mark is not drawn.
<a href="sndscm.html#marksynccolor">mark-sync-color</a>
in snd-motif.scm uses this hook to draw sync'd marks in some other color than the current <a href="#markcolor">mark-color</a>.
</td></tr><tr><td colspan=3 height=16></td></tr>
@@ -6588,7 +6589,7 @@ Scheme delete funcs: remove-if assoc-remove! hash-remove! delete-if! delete! str
<code><a class=def name="deletesamples">delete-samples</a> samp samps <em class=narg>snd chn edpos</em></code>
</td></tr><tr><td></td><td>
This deletes a block of samples. The deleted portion starts at sample 'samp' and runs for 'samps' samples.
-See <a href="#deletetozero">delete-to-zero</a> or delete-selection-and-smooth in extensions.scm.
+See delete-selection-and-smooth in extensions.scm.
</td></tr><tr><td colspan=2 height=18></td></tr>
@@ -6885,18 +6886,13 @@ Scheme srfi-1 filter function: %filter.<br>
</td></tr><tr><td></td><td>
This function finds the sample that satisfies the function 'proc'. 'sample'
determines where to start the search.
-If 'proc' returns some non-#f value, find-channel returns a list with that value (if optimization is off) and the sample number.
-In the find dialog and in C-s or C-r searches, if the value returned is an integer, the cursor is offset by that number of samples.
<pre>
&gt;<em class=typing>(find-channel (lambda (y) (&gt; y .1)))</em>
-<em class=listener>(#t 4423)</em>
-
-&gt;<em class=typing>(find-channel (lambda (y) (and (&gt; y .1) 'a-big-sample)))</em>
-<em class=listener>(a-big-sample 4423)</em> ; if optimization is on, this will be (#t 4423)
+<em class=listener>4423</em>
&gt;<em class=typing>lambda: &lt;{ y }&gt; 0.1 y f&lt; ; find-channel</em>
-<em class=listener>'( #t 4423 )</em>
+<em class=listener>4423</em>
</pre>
I didn't bring out the search direction (find-channel is built on scan-channel which assumes it is
@@ -6929,7 +6925,6 @@ Search via continuation: <a href="#scanagain">scan-again</a><br>
Explicit access to search procedures: <a href="#searchprocedure">search-procedure</a><br>
The Find dialog: <a href="snd.html#editoperations">Find</a> or <a href="#finddialog">find-dialog</a><br>
find silence: <a href="#mapsilence">map-silence</a>, scramble-channel in examp.scm<br>
-find zero crossing: <a href="#newcp">find-zero</a><br>
find any difference between two chans: <a href="sndscm.html#channelsequal">channels-equal</a><br>
see also <a href="#countmatches">count-matches</a> and <a href="#scanchannel">scan-channel</a><br>
search a multichannel sound: <a href="sndscm.html#scansound">scan-sound</a><br>
@@ -8760,14 +8755,13 @@ It is the old ("irregular") version of <a href="#scanchannel">scan-channel</a>.
scan-channel "scans" the data in the specified channel between the given sample numbers (the default
is the entire sound) by applying 'func' to each sample.
If 'func' returns something other than #f, the scan is halted,
-and a list is returned
-containing that value and the current sample position of the
-scan. The following call scans the
+and the current sample number is returned.
+The following call scans the
current channel from sample 0 to the end looking for any sample greater than
.1:<br>
<pre>
&gt;<em class=typing>(scan-channel (lambda (y) (&gt; y .1)))</em>
-<em class=listener>(#t 4423)</em>
+<em class=listener>4423</em>
</pre>
In this case, we found such a sample at position 4423.<br>
<pre>
@@ -8775,7 +8769,7 @@ In this case, we found such a sample at position 4423.<br>
(lambda (proc)
(let ((baddy (<em class=red>scan-channel</em> (lambda (y)
(not (proc y))))))
- (if baddy (set! (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>) (cadr baddy)))
+ (if baddy (set! (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>) baddy))
(not baddy))))
&gt;<em class=typing>(every-sample? (lambda (y) (&lt; y .5)))</em>
@@ -8784,7 +8778,7 @@ In this case, we found such a sample at position 4423.<br>
To scan all the channels of a multichannel sound in parallel, see
<a href="sndscm.html#scansound">scan-sound</a>.
<br><br>
-In scan-chan, scan-channel, find, and count-matches (all the same underlying procedure), an attempt to jump back
+In scan-channel, find, and count-matches (all the same underlying procedure), an attempt to jump back
into a previous call will not work. That is,
<table border=0 cellpadding=5 vspace=10><tr><td><pre>
@@ -9384,16 +9378,16 @@ how long the resultant note will be given an src envelope:
(define (<a class=quiet NAME="exsrcduration">src-duration</a> e)
(let* ((len (length e))
- (ex0 (car e))
- (ex1 (list-ref e (- len 2)))
+ (ex0 (e 0))
+ (ex1 (e (- len 2)))
(all-x (- ex1 ex0))
(dur 0.0))
(do ((i 0 (+ i 2)))
((&gt;= i (- len 2)) dur)
- (let* ((x0 (list-ref e i))
- (x1 (list-ref e (+ i 2)))
- (y0 (list-ref e (+ i 1))) ; 1/x x points
- (y1 (list-ref e (+ i 3)))
+ (let* ((x0 (e i))
+ (x1 (e (+ i 2)))
+ (y0 (e (+ i 1))) ; 1/x x points
+ (y1 (e (+ i 3)))
(area (if (&lt; (abs (- y0 y1)) .0001)
(/ (- x1 x0) (* y0 all-x))
(* (/ (- (log y1) (log y0))
@@ -12169,67 +12163,13 @@ A similar set rebinds the arrow keys to give much more precise window position a
(lambda ()
"zoom out one pixel"
(zoom-one-pixel (<a class=quiet href="#selectedsound" onmouseout="UnTip()" onmouseover="Tip(extsnd_selectedsound_tip)">selected-sound</a>) (<a class=quiet href="#selectedchannel" onmouseout="UnTip()" onmouseover="Tip(extsnd_selectedchannel_tip)">selected-channel</a>) #f)))
+
(<em class=red>bind-key</em> "Down" 0 ;down arrow
(lambda ()
"zoom in one pixel"
(zoom-one-pixel (<a class=quiet href="#selectedsound" onmouseout="UnTip()" onmouseover="Tip(extsnd_selectedsound_tip)">selected-sound</a>) (<a class=quiet href="#selectedchannel" onmouseout="UnTip()" onmouseover="Tip(extsnd_selectedchannel_tip)">selected-channel</a>) #t)))
</pre></td></tr></table>
-The emacs-style line-oriented commands C-p, C-n, and C-k aren't very useful in Snd,
-since there's no reason for 128 samples to consititute the audio analog of a line of text.
-In the next example, we rebind them to treat same-sense zero-crossings as line markers:
-
-<table border=0 cellpadding=5 vspace=10><tr><td><pre>
-(define (<A NAME="newcp">find-zero</a> forwards)
- (let* ((loc (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>))
- (twice #f)
- (dir (if forwards 1 -1))
- (reader (<a class=quiet href="#makesampler" onmouseout="UnTip()" onmouseover="Tip(extsnd_makesampler_tip)">make-sampler</a> loc #f #f dir))
- (val (<a class=quiet href="#readsample" onmouseout="UnTip()" onmouseover="Tip(extsnd_readsample_tip)">read-sample</a>)))
- (while (not (or (<a class=quiet href="#cgp" onmouseout="UnTip()" onmouseover="Tip(extsnd_cgp_tip)">c-g?</a>)
- (and forwards (<a class=quiet href="#sampleratendQ" onmouseout="UnTip()" onmouseover="Tip(extsnd_sampleratendQ_tip)">sampler-at-end?</a> reader))
- (and (not forwards) (= loc 0))))
- (let ((newval (<a class=quiet href="#readsample" onmouseout="UnTip()" onmouseover="Tip(extsnd_readsample_tip)">read-sample</a> reader)))
- (set! loc (+ loc dir))
- (if (or (and (&gt;= val 0.0) (&lt; newval 0.0))
- (and (&lt; val 0.0) (&gt;= newval 0.0)))
- (if twice
- (break loc)
- (begin
- (set! val newval)
- (set! twice #t))))))
- loc))
-
-(define (<A NAME="deletetozero">delete-to-zero</a> forwards)
- (let ((loc (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>))
- (zero-loc (find-zero forwards)))
- (if (not (= loc zero-loc))
- (if forwards
- (<a class=quiet href="#deletesamples" onmouseout="UnTip()" onmouseover="Tip(extsnd_deletesamples_tip)">delete-samples</a> (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>) (- zero-loc loc))
- (begin
- (<a class=quiet href="#deletesamples" onmouseout="UnTip()" onmouseover="Tip(extsnd_deletesamples_tip)">delete-samples</a> zero-loc (- loc zero-loc))
- (set! (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>) zero-loc))))))
-
-(define (go-to-zero forwards)
- (set! (<a class=quiet href="#cursor" onmouseout="UnTip()" onmouseover="Tip(extsnd_cursor_tip)">cursor</a>) (find-zero forwards)))
-
-(<em class=red>bind-key</em> #\k 4 (lambda (arg)
- "delete to next zero crossing"
- (do ((i 0 (+ 1 i)))
- ((= i (abs arg)))
- (delete-to-zero (&gt; arg 0)))))
-(<em class=red>bind-key</em> #\n 4 (lambda (arg)
- "go to next zero crossing"
- (do ((i 0 (+ 1 i)))
- ((= i (abs arg)))
- (go-to-zero (&gt; arg 0)))))
-(<em class=red>bind-key</em> #\p 4 (lambda (arg)
- "go to previous zero crossing"
- (do ((i 0 (+ 1 i)))
- ((= i (abs arg)))
- (go-to-zero (&lt; arg 0)))))
-</pre></td></tr></table>
-
Most of the predefined key definitions are given in <a href="snd.html#builtinkeys">Keyboard Commands</a>.
The key bindings set by bind-key are active only when the active widget is a graph; when the listener is receiving
key strokes, the underlying text widget interprets them itself (using Emacs as a vague guide). You can change the listener's interpretation
@@ -12294,7 +12234,7 @@ in either Motif or Gtk:
#f #f)
#f))
</pre></td></tr></table>
-See edit123.scm, snd_conffile.scm, and snd_frg.scm for many more examples of bind-key.
+
</td></tr><tr><td colspan=2 height=16></td></tr>
@@ -13014,12 +12954,6 @@ are:</p>
<tr><td><code><a class=def name="datacolor">data-color</a></code></td><td></td>
<td><code>black</code></td><td></td>
<td>color of data in unselected graph.</td></tr>
-<tr><td bgcolor="#f2f4ff"><code><a class=def name="doitbuttoncolor">doit-button-color</a></code></td><td bgcolor="#f2f4ff"></td>
- <td bgcolor="#f2f4ff"><code>palegreen2</code></td><td bgcolor="#f2f4ff"></td>
- <td bgcolor="#f2f4ff">color of Ok and Apply buttons.</td></tr>
-<tr><td><code><a class=def name="doitagainbuttoncolor">doit-again-button-color</a></code></td><td></td>
- <td><code>darkolivegreen1</code></td><td></td>
- <td>color of Undo&amp;Apply buttons.</td></tr>
<tr><td bgcolor="#f2f4ff"><code><em class=emdef>enved-waveform-color</em></code></td><td bgcolor="#f2f4ff"></td>
<td bgcolor="#f2f4ff"><code>blue</code></td><td bgcolor="#f2f4ff"></td>
<td bgcolor="#f2f4ff">color of waveform displayed in envelope editor.</td></tr>
@@ -13029,9 +12963,6 @@ are:</p>
<tr><td bgcolor="#f2f4ff"><code><a class=def name="graphcolor">graph-color</a></code></td><td bgcolor="#f2f4ff"></td>
<td bgcolor="#f2f4ff"><code>white</code></td><td bgcolor="#f2f4ff"></td>
<td bgcolor="#f2f4ff">background color of unselected graph.</td></tr>
-<tr><td><code><a class=def name="helpbuttoncolor">help-button-color</a></code></td><td></td>
- <td><code>lightsteelblue2</code></td><td></td>
- <td>color of Help buttons.</td></tr>
<tr><td bgcolor="#f2f4ff"><code><a class=def name="highlightcolor">highlight-color</a></code></td><td bgcolor="#f2f4ff"></td>
<td bgcolor="#f2f4ff"><code>ivory1</code></td><td bgcolor="#f2f4ff"></td>
<td bgcolor="#f2f4ff">highlighting color.</td></tr>
@@ -13050,15 +12981,6 @@ are:</p>
<tr><td><code><a class=def name="positioncolor">position-color</a></code></td><td></td>
<td><code>ivory3</code></td><td></td>
<td>position slider color</td></tr>
-<tr><td bgcolor="#f2f4ff"><code><a class=def name="pushedbuttoncolor">pushed-button-color</a></code></td><td bgcolor="#f2f4ff"></td>
- <td bgcolor="#f2f4ff"><code>lightsteelblue1</code></td><td bgcolor="#f2f4ff"></td>
- <td bgcolor="#f2f4ff">color of pushed button.</td></tr>
-<tr><td><code><a class=def name="quitbuttoncolor">quit-button-color</a></code></td><td></td>
- <td><code>indianred</code></td><td></td>
- <td>color of Dismiss and Cancel buttons.</td></tr>
-<tr><td bgcolor="#f2f4ff"><code><a class=def name="resetbuttoncolor">reset-button-color</a></code></td><td bgcolor="#f2f4ff"></td>
- <td bgcolor="#f2f4ff"><code>goldenrod1</code></td><td bgcolor="#f2f4ff"></td>
- <td bgcolor="#f2f4ff">color of Reset buttons.</td></tr>
<tr><td><code><a class=def name="sashcolor">sash-color</a></code></td><td></td>
<td><code>lightgreen</code></td><td></td>
<td>color of paned window sashes.</td></tr>
@@ -13235,7 +13157,7 @@ of FractInt's royal colormap):
<tr><td colspan=2 bgcolor="#f2f4ff">
<code><a class=def name="backgroundgradient">background-gradient</a></code>
</td></tr><tr><td></td><td>
-<p>In Gtk+Cairo versions of Snd, this is the amount of background color gradient in the channel graphs (0.0, the default, means
+<p>In Gtk versions of Snd, this is the amount of background color gradient in the channel graphs (0.0, the default, means
no gradient).
</p>
<img src="pix/bggrad.png" alt="graph with background gradient" vspace=10>
@@ -13708,13 +13630,13 @@ This is the graphics context for XOR drawing in the selection color. (An intege
snd-color returns a Snd built-in color (as a Pixel/GdkPixel); it simplifies
code that wants to follow whatever the current Snd color choices are. The choices are:
<pre>
- 0: white 12: listener-color 24: pushed-button-color
+ 0: white 12: listener-color
1: black 13: listener-text-color 25: sash-color
- 2: red 14: basic-color 26: help-button-color
- 3: yellow 15: selection-color 27: doit-button-color
- 4: green 16: zoom-color 28: doit-again-button-color
- 5: light-blue 17: position-color 29: quit-button-color
- 6: lighter-blue 18: highlight-color 30: reset-button-color
+ 2: red 14: basic-color
+ 3: yellow 15: selection-color
+ 4: green 16: zoom-color
+ 5: light-blue 17: position-color
+ 6: lighter-blue 18: highlight-color
7: data-color 19: enved-waveform-color 31: grid-color
8: selected-data-color 20: cursor-color 32: selected-grid-color
9: mark-color 21: text-focus-color 33: axis-color