[SCM] snd/master: remove deleted files from branch

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Tue Aug 30 18:41:55 UTC 2011


The following commit has been merged in the master branch:
commit 26643eee93281f2bd56e5340ba1ea7dcc385d728
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Tue Aug 30 20:31:40 2011 +0200

    remove deleted files from branch

diff --git a/tutorial/1_intro_and_build_snd.html~ b/tutorial/1_intro_and_build_snd.html~
deleted file mode 100644
index 33bb087..0000000
--- a/tutorial/1_intro_and_build_snd.html~
+++ /dev/null
@@ -1,211 +0,0 @@
-<html>
-<body bgcolor="#FFFFFF">
-
-<center><h3>Developing And Using Snd</h3></center>
-<center><h4>A Simple Guide And Tutorial For Editing Sound Under Linux</h4></center>
-<center><h4>by</h4></center>
-<center><h4><a href=mailto:dlphilp at bright.net>Dave Phillips</a></h4></center>
-<p>
-
-<u><b>INTRODUCTION TO SOUNDFILE EDITORS</b></u>
-<p>
-
-A soundfile editor (aka an audio editor) is one of the standard tools of the digital sound and music trades. Audio editors work on soundfiles in ways that are analogous to the actions of text and graphics editors upon their respective file types. Typically a modern soundfile editor includes the common cut/copy/paste routines along with a complement of signal processing and mixing modules. A graphic interface and waveform display is usually encountered (though text-mode audio editors do exist for UNIX/Linux), and point & click is the expected mode of user interaction.
-<p>
-
-As Linux grows in popularity among artists working in media such as audio/video and animation we can expect to see more interest in the system's audio capabilities and its available sound and music software. Sound workers migrating from Windows or the Mac will look for tools similar to what they have enjoyed using on their previous platforms, and one of their most frequently asked questions is "What Linux audio editor will most completely take the place of Cool Edit ?". 
-<p>
-
-<a href=http://www.syntrillium.com/cooledit/>Cool Edit</a> [Figure 1] is perhaps the most popular soundfile editor available for the Windows OS family. It has been in continuous development for more than ten years: programmer David Johnston originally wrote Cool Edit as shareware for Windows 3.1, and in 1995 the Syntrillium corporation began managing the commercial development of the program (the company still maintains and distributes the shareware version available on the Internet).
-<p>
-
-<center> <img src="images/jpg/1_01-ce2000.jpg">
-<p>
-<b>Figure 1.</b> Cool Edit 2000 (courtesy Dmitri Touretsky)
-</center>
-<p>
-
-Cool Edit is a wonderful program. Its interface is easy to navigate and invites experimentation with a powerful editing and processing toolkit. I used it extensively from its earliest versions through Cool Edit 96, and when I finally stopped using Windows Cool Edit was one of the few programs I truly missed. 
-<p>
-
-For various reasons it has been rather difficult to advise Cool Edit users on a Linux equivalent. While there are many soundfile editors available for Linux none are up to Cool Edit's standard, particularly with regards to transparency and ease of use. In response to this challenge I decided to work on extending and enhancing Snd, a powerful audio editor for Linux and other UNIX platforms (see Table 1 for a complete list).
-<p>
-
-<pre>
-********************************
-*                              *
-* Table 1: Supported platforms *
-*                              *
-********************************
-
-   Cool Edit: Windows 95/98/ME, NT/2000, or higher
-
-   Snd: DEC Alpha, SGI, HP-UX, mkLinux, Linux, PPC, SCO, Solaris, *BSD, Mac OSX
-</pre>
-<p>
-
-Like Cool Edit, Snd has been in lengthy development. Snd author Bill Schottstaedt has programmed it continuously since 1996, but his involvement with writing soundfile editors dates back to the late 1970s when he wrote the Dpysnd audio editor for the PDP-10 minicomputer. However, Snd's user interface and other basic design differences are problematic for Cool Edit users, and it is easy to miss Snd's great power and utility. I decided to expose more of that power to the novice and to try to create a working environment similar to Cool Edit. This article will relate how that work has been accomplished so far and will indicate the work that remains.
-<p>
-
-The differences and similarities between Cool Edit and Snd led me to many considerations regarding interface design and its necessary trade-offs. Cool Edit's interface is uniformly designed for editing and processing soundfiles. Almost every action and function in the program can be accessed and controlled by the mouse, and users can navigate their way through the entire program by pointing and clicking. Thanks to this uniform interface a novice easily learns and remembers the program's behavior and more quickly moves into actually working with the program. On the other hand, Snd has been designed to function within a rich sound processing and music composition software environment developed at <a href=http://www-ccrma.stanford.edu/>CCRMA</a>, Stanford University's Center for Computer Research in Music and Acoustics. That environment includes the Common LISP Music (CLM) sound synthesis language, the Common Music (CM) scoring tools for CLM and other output formats (such as Csound and MIDI), and the Common Music Notation (CMN) package. Indeed, Snd could be considered as a graphic display front-end for CLM: the standard build incorporates CLM as a built-in module, Snd provides a window called the Listener for entering code to access the module's synthesis and processing functions, and the interface provides various ways to play and represent the newly synthesized sound. 
-<p>
-
-In contrast to the uniformity of Cool Edit, Snd's user interface could be thought of as "multiform" by design. In the default GUI the mouse is extensively employed, but far more program control is available through Snd's Emacs-style keyboard commands. And while considerable processing power lurks under its surface access to that power has been restricted to users willing to learn the necessary scripting language. Thus, in order to use Snd to its fullest potential the user must learn to manage Snd's more complex control interface and acquire some proficiency in the Guile/Scheme language. With that proficiency he can customize the program's appearance and behavior, warping it into quite a different Snd, something more like Cool Edit but definitely still Snd. 
-<p>
-
-This article describes how such a warping has been achieved by a user with very little programming skill (I'm really a musician) and virtually no experience with LISP or Scheme. It is not a shoot-out between Cool Edit and Snd. It is actually a status report of an on-going project to externalize Snd's great internal power, using Cool Edit as a model for developing Snd's user interface. I must also note that Cool Edit 2000 has been my measuring rod, not its bigger brother Cool Edit Pro: I have focused on Snd's utility as a soundfile editor, and I consider Cool Edit Pro to be more of a multitrack hard-disk recording environment. So with this undertanding let's get into Snd... 
-<p>
-
-
-<u><b>GETTING STARTED WITH SND</b></u>
-<p>
-
-<b>Requirements</b>
-<p>
-
-To build the version of Snd presented in this article you will need to install the following support software:
-<p>
-
-<pre>
-  Guile 1.5.x
-  OpenMotif 2.1
-  ALSA 0.9.x with OSS emulation enabled
-  LADSPA and its various plugins
-  the Scheme customization files included in the snd-5/contrib/dlp directory
-</pre>
-<p>
-
-See the Resources section for the download locations for these packages. It is beyond the scope of this profile to give instructions on installing this software, but the documentation for each package will lead you through their respective build and install procedures. Any other requirements should be fulfilled by libraries and other software included in most mainstream Linux distributions. 
-<p>
-
-The ALSA driver packages are not strictly required. You can build Snd perfectly well with either the kernel sound modules (aka OSS/Free) installed or with the excellent OSS/Linux commercial drivers from 4Front Technologies.
-<p>
-
-<b>Getting It, Building It, Installing It</b>
-<p>
-
-Prebuilt binaries for Linux i386, LinuxPPC, and Sun are available from the Snd home page. Source and binary RPMs have been prepared and are available for the i386 and PPC Linux versions. To install Snd from those packages simply follow the usual method of installing RPMs. For example, this command:
-<p>
-
-<pre>
-	rpm -ivh snd-5-1.ppc.rpm
-</pre>
-<p>
-
-will install the LinuxPPC package (you will probably need root status to install the RPM file).
-<p>
-
-<i>Note: The instructions and descriptions throughout this article refer to Snd built for the i386 architecture. I was unable to test my build configuration on any other system, but I would like to hear from anyone running Snd on other platforms, particularly LinuxPPC.</i>
-<p>
-
-To build Snd yourself first download the source package (currently snd-5.tar.gz) from the <a href=http://www-ccrma.stanford.edu/software/snd/>CCRMA Snd Home Page</a> to your home directory. Unpack it with 'tar xzvf snd-n.tar.gz' (where n is the major version number), then enter your newly created snd-n directory and read the README.Snd file for the latest installation instructions and details. Run './configure --help' for a list of configuration options: This list includes options for your choice of user interface (Motif, GTK, none), soundcard driver support (ALSA, OSS, Esound), the use of Ruby instead of Guile for Snd's extension language, and support for LADSPA plugins. I use the following command options to compile Snd:
-<p>
-
-<p>
-<pre>
-	./configure --with-motif --with-ladspa --with-static-xm
-</pre>
-<p>
-
-This configuration builds Snd with a Motif 2.1 GUI, support for the LADSPA audio plugins, and built-in support for the graphics routines within Snd's Motif module (xm.so, if built separately). Default values are accepted for all other configuration options, including Snd's default support for the OSS/Free kernel sound API.
-<p>
-
-After configuring the build, run 'make' and wait for the compiler to finish building your new Snd. Become superuser (su root) and run 'make install'. The binary will be installed in /usr/local/bin and a manual page will be placed in /usr/local/man/man1. 
-<p>
-
-Snd is also available via CVS. Please see the Snd home page for the details of accessing and downloading using CVS.
-<p>
-
-<!--
-<b>Why Not Native ALSA ?</b>
-<p>
-
-My build configuration includes Snd's default support for the OSS/Free kernel sound API. Including the --with-alsa option will build Snd with native ALSA support (either 0.5.x or the 0.9.x beta series), but the state of the ALSA API is rather mercurial at this time (though quickly closing in on its long-anticipated 1.0 release). Depending on your soundcard, Snd's ALSA support may not be in sync with the most current API. Running Snd with ALSA 0.5.11 native support for my SBLive Value crashed the program when trying to record, but the same driver package works perfectly (via ALSA's OSS/Free emulation mode) with Snd compiled for OSS support. However, native ALSA support and OSS emulation both worked fine for my SB PCI128. I also encountered no problems with recording or playback using the OSS/Linux drivers.
-<p>
-
-<i>Note: Fernando Lopez-Lezcano has recently hacked a work-around that allows recording in Snd under native ALSA with my SBLive. Preliminary tests indicate that the hack works well with mic, line, and CD input, but it is problematic recording from my mixer's master output channel. Hopefully a complete solution will be found soon, and I should emphasize that Snd's ALSA support is already quite functional.</i>
-<p>
--->
-
-<b>Why Motif Instead Of GTK ?</b>
-<p>
-
-Snd can be configured for a build using either Motif or the GTK graphics libraries or for a build with no GUI at all. Some users may wonder why I chose to build Snd with Motif instead of the more modern GTK. As a matter of fact I did build Snd with GTK a few times, but I prefer the amenities of Motif, particularly the keyboard acceleration. More importantly, my interface enhancements depend on the xm.so module. Work proceeds on bringing the GTK version to the same level of customization as the Motif build, but it's not there yet. A final consideration was the fact that Motif 2.1 is now freely available from the <a href=http://www.opengroup.org/openmotif/>OpenMotif</a> group, while the well-known LessTif (replaces Motif 1.2) is also available for free and is usually included with most mainstream Linux distributions. However, Snd may exhibit some odd behavior with LessTif, and author Bill Schottstaedt has indicated that he would rather not bother with Snd + LessTif problems, so I recommend the OpenMotif package.
-<p>
-
-<b>The Test System</b>
-<p>
-
-Here are the hardware specfications of the system used throughout this article:
-<p>
-
-<pre>
-        800 MHz AMD Duron
-        512 MB memory
-        two 15 GB Maxtor IDE hard-disks
-        Voodoo3 video card with 19" monitor
-        SBLive Value and SB PCI128 soundcards
-</pre>
-<p>
-
-System software includes Linux kernel 2.4.5 patched for low-latency (for more information please see my article about <a href=http://linux.oreillynet.com/pub/a/linux/2000/11/17/low_latency.html>setting up the Linux kernel for low-latency</a> published by the O'Reilly Network) and the soundcard drivers from ALSA 0.9.0beta10. I built the ALSA package with the OSS emulation enabled and Snd is quite content with that arrangement.
-<p>
-
-The reader might notice that the test machine is rather "loaded". Processing digital audio consumes system resources, so for best results you'll want a fast CPU, lots of RAM, a large fast hard-disk, and a good video system, preferably with at least a 17" monitor (multichannel displays quickly eat up viewing area, even on a 19" monitor in high-resolution modes). You can work with Snd with less powerful resources, but your mileage will certainly vary from the test system.
-<p>
-
-
-<b>Firing Up</b>
-<p>
-
-Start Snd by entering <i>snd</i> at an xterm prompt. With no command-line options or flags you will see Snd's default opening display [Figure 2]. Cool Edit users will immediately wonder what's going on here. They are accustomed to seeing a complete display when Cool Edit starts, not this rather stark and uninformative box. Expanding the window only opens up a blank grey canvas, nothing like the visual array of icons, meters, and timers in Cool Edit. 
-<p>
-
-<center> <img src="images/jpg/1_02-snd_default_open.jpg">
-<p>
-<b>Figure 2.</b> Snd opened with no soundfiles loaded 
-</center>
-<p>
-
-Snd has evolved within the UNIX domain, and more pointedly it has evolved in the world of computer music and sound synthesis programming languages running on UNIX machines. Unlike Cool Edit, Snd expects the user to learn and understand how to use an underlying programming language to tap the full extent of Snd's capabilities, and this factor often proves to be the major stumbling point for migrating Cool Edit users. Despite the relative ease of learning the Scheme or Ruby scripting language, users coming from Windows or the Mac simply do not expect to meet with such a requirement for the full use of the software. When a user is already proficient at the task, learning a programming language in order to use an audio editor seems not only a daunting endeavor but a pointless one as well.
-<p>
-
-The next formidable block for Cool Edit users is the management of a combined keyboard/mouse interface. As I mentioned earlier, Cool Edit is almost entirely mouse-operated. Text entry is supported, but at almost every point the mouse is the designated input device for selecting files and other data, choosing processing options and other menu items, and even setting data values (with spinboxes, sliders, and other data entry widgets).
-<p>
-
-By comparison, the default Snd is far more keyboard-intensive. Emacs users will be pleased to find that Snd's keyboard control is based on the Emacs keyboard layout, but that will be little comfort to Cool Edit users (or to <b>vi</b> adherents like myself). Control and Alt key combinations are normally used to operate the default Snd, and I advise new users to learn at least the following keystroke commands:
-<p>
-
-<pre>
-  C-a position cursor at beginning of the display
-  C-e position cursor at the end of the display
-  C-v position cursor at the midpoint of the file 
-
-  C-l moves cursor to mid-display
-  C-j position cursor on the next mark
-
-  C-t stop playback
-  C-g stop all processing
-
-  C-i sends a report to the minibuffer on the status of the soundfile at the cursor position. 
-</pre>
-
-Press the space bar to pause playback; press it again to continue playback from the pause point.
-<p>
-
-The following key combinations provide more precise cursor movement:
-<p>
-
-<pre>
-  C-b move cursor back one sample
-  C-f move cursor forward one sample
-</pre>
-
-These particular movements are especially valuable when zoomed into a file to single-sample resolution.
-<p>
-
-There are many other keyboard controls for cursor movement. Fortunately, most of the other basic operations of the program (opening and closing files, starting and stopping playback, accessing menus and menu items, navigating the display, exiting the program) can be controlled by mouse actions. The new user should have no trouble learning a dozen key combinations, but for the seriously keystroke-challenged I have provided graphic controls for positioning the cursor. 
-<p>
-
-</body>
-</html>
diff --git a/tutorial/files/misc.scm.txt~ b/tutorial/files/misc.scm.txt~
deleted file mode 100644
index acd3941..0000000
--- a/tutorial/files/misc.scm.txt~
+++ /dev/null
@@ -1,303 +0,0 @@
-; this is a comment
-
-(load "/home/dlphilp/snd-5/snd-motif.scm")
-(load "/home/dlphilp/snd-5/examp.scm")
-(load "/home/dlphilp/snd-5/extensions.scm")
-(load "/home/dlphilp/snd-5/dsp.scm")
-(load "/home/dlphilp/snd-5/draw.scm")
-(load "/home/dlphilp/snd-5/env.scm")
-(load "/home/dlphilp/snd-5/enved.scm")
-(load "/home/dlphilp/snd-5/marks.scm")
-(load "/home/dlphilp/snd-5/mix.scm")
-(load "/home/dlphilp/snd-5/moog.scm")
-(load "/home/dlphilp/snd-5/popup.scm")
-(load "/home/dlphilp/snd-5/rubber.scm")
-(load "/home/dlphilp/my_scm/special-menu.scm") 
-(load "/home/dlphilp/my_scm/my_backgrounds.scm") 
-(load "/home/dlphilp/my_scm/marks-menu.scm") 
-(load "/home/dlphilp/my_scm/new-effects.scm") 
-(load "/home/dlphilp/my_scm/panic.scm") 
-
-(title-with-date)
-(keep-file-dialog-open-upon-ok)
-(make-hidden-controls-dialog)
-(check-for-unsaved-edits #t)
-(add-hook! after-open-hook show-disk-space)
-
-(define wd (make-pixmap (|Widget (cadr (main-widgets))) rough))
-(for-each-child (|Widget (cadr (main-widgets))) (lambda (w) (|XtSetValues w (list |XmNbackgroundPixmap wd))))
-
-;;; uncomment the next line to add meters to the main window
-;;; (with-level-meters 2)
-
-(add-mark-pane)
-
-(add-sound-file-extension "SF2")
-(add-sound-file-extension "mp3")
-(add-sound-file-extension "MP3")
-(add-sound-file-extension "W01")
-(add-sound-file-extension "W02")
-(add-sound-file-extension "W03")
-(add-sound-file-extension "W04")
-(add-sound-file-extension "W05")
-(add-sound-file-extension "W06")
-(add-sound-file-extension "W07")
-(add-sound-file-extension "W08")
-(add-sound-file-extension "W09")
-
-;;; I might eventually use these for cursor control
-;;; (add-very-useful-icons)
-
-;;;
-;;; main menu additions
-;;;
-
-;;; -------- add delete and rename options to the file menu
-
-(define (add-delete-option)
-  (add-to-menu 0 "Delete" ; add Delete option to File menu
-	       (lambda ()
-		 ;; close current sound and delete it (after requesting confirmation)
-		 (if (>= (selected-sound) 0)
-		     (let ((filename (file-name)))
-		       (close-sound)
-		       (if (yes-or-no? (format #f "delete ~S?" filename))
-			   (delete-file filename)))))
-	       8)) ; place after File:New
-
-(define (add-rename-option)
-  (let ((rename-dialog #f)
-	(rename-text #f))
-    (add-to-menu 0 "Rename" 
-      (lambda ()
-	;; open dialog to get new name, save-as that name, open
-	(if (not rename-dialog)
-	    ;; make a standard dialog
-	    (let* ((xdismiss (|XmStringCreate "Dismiss" |XmFONTLIST_DEFAULT_TAG))
-		   (xhelp (|XmStringCreate "Help" |XmFONTLIST_DEFAULT_TAG))
-		   (xok (|XmStringCreate "DoIt" |XmFONTLIST_DEFAULT_TAG))
-		   (titlestr (|XmStringCreate "Rename" |XmFONTLIST_DEFAULT_TAG))
-		   (new-dialog (|XmCreateTemplateDialog
-				 (|Widget (cadr (main-widgets))) "Rename"
-				 (list |XmNcancelLabelString   xdismiss
-				       |XmNhelpLabelString     xhelp
-				       |XmNokLabelString       xok
-				       |XmNautoUnmanage        #f
-				       |XmNdialogTitle         titlestr
-				       |XmNresizePolicy        |XmRESIZE_GROW
-				       |XmNnoResize            #f
-				       |XmNbackground          (|Pixel (snd-pixel (basic-color)))
-				       |XmNtransient           #f))))
-	      (for-each
-	       (lambda (button)
-		 (|XtVaSetValues
-		   (|XmMessageBoxGetChild new-dialog button)
-		   (list |XmNarmColor   (|Pixel (snd-pixel (pushed-button-color)))
-			 |XmNbackground (|Pixel (snd-pixel (basic-color))))))
-	       (list |XmDIALOG_HELP_BUTTON |XmDIALOG_CANCEL_BUTTON |XmDIALOG_OK_BUTTON))
-    
-	      (|XtAddCallback new-dialog |XmNcancelCallback 
-			      (lambda (w c i) (|XtUnmanageChild w)))
-	      
-	      (|XtAddCallback new-dialog |XmNhelpCallback 
-			      (lambda (w c i)
-				(help-dialog "Rename" "Give a new file name to rename the currently selected sound.")))
-
-	      (|XtAddCallback new-dialog |XmNokCallback 
-			      (lambda (w c i)
-				(let ((new-name (|XmTextFieldGetString rename-text)))
-				  (if (and (string? new-name)
-					   (> (string-length new-name) 0)
-					   (>= (selected-sound) 0))
-				      (let ((current-name (file-name)))
-					(save-sound-as new-name)
-					(close-sound)
-					(rename-file current-name new-name)
-					(open-sound new-name)
-					(|XtUnmanageChild w))))))
-	      (|XmStringFree xhelp)
-	      (|XmStringFree xok)
-	      (|XmStringFree xdismiss)
-	      (|XmStringFree titlestr)
-	      (set! rename-dialog new-dialog)
-	      (let* ((mainform (|XtCreateManagedWidget "formd" |xmRowColumnWidgetClass rename-dialog
-				     (list |XmNleftAttachment      |XmATTACH_FORM
-					   |XmNrightAttachment     |XmATTACH_FORM
-					   |XmNtopAttachment       |XmATTACH_FORM
-					   |XmNbottomAttachment    |XmATTACH_WIDGET
-					   |XmNbottomWidget        (|XmMessageBoxGetChild rename-dialog |XmDIALOG_SEPARATOR)
-					   |XmNorientation         |XmVERTICAL
-					   |XmNbackground          (|Pixel (snd-pixel (basic-color))))))
-		     (label (|XtCreateManagedWidget "new name:" |xmLabelWidgetClass mainform
-				     (list |XmNleftAttachment      |XmATTACH_FORM
-					   |XmNrightAttachment     |XmATTACH_NONE
-					   |XmNtopAttachment       |XmATTACH_FORM
-					   |XmNbottomAttachment    |XmATTACH_FORM
-					   |XmNbackground          (|Pixel (snd-pixel (basic-color)))))))
-		(set! rename-text 
-		      (|XtCreateManagedWidget "newname" |xmTextFieldWidgetClass mainform
-				     (list |XmNleftAttachment      |XmATTACH_WIDGET
-					   |XmNleftWidget          label
-					   |XmNrightAttachment     |XmATTACH_FORM
-					   |XmNtopAttachment       |XmATTACH_FORM
-					   |XmNbottomAttachment    |XmATTACH_FORM
-					   |XmNbackground          (|Pixel (snd-pixel (basic-color))))))
-		(|XtAddEventHandler rename-text |EnterWindowMask #f
-				    (lambda (w context ev flag)
-				      (|XmProcessTraversal w |XmTRAVERSE_CURRENT)
-				      (|XtSetValues w (list |XmNbackground (white-pixel)))))
-		(|XtAddEventHandler rename-text |LeaveWindowMask #f
-				    (lambda (w context ev flag)
-				      (|XtSetValues w (list |XmNbackground (|Pixel (snd-pixel (basic-color))))))))))
-	(if (not (|XtIsManaged rename-dialog))
-	    (|XtManageChild rename-dialog)
-	    (raise-dialog rename-dialog)))
-      8)))
-
-(install-searcher-with-colors (lambda (file) #t))
-(add-delete-option)
-(add-rename-option)
-
-;;;
-;;; popup menu stuff
-;;;
-
-(change-graph-popup-color "pink")
-
-
-(define (change-selection-popup-color new-color)
-  ;; new-color can be the color name, an xm Pixel, a snd color, or a list of rgb values (as in Snd's make-color)
-  (let ((color-pixel
-         (if (string? new-color) ; assuming X11 color names here
-             (let* ((shell (|Widget (cadr (main-widgets))))
-                    (dpy (|XtDisplay shell))
-                    (scr (|DefaultScreen dpy))
-                    (cmap (|DefaultColormap dpy scr))
-                    (col (|XColor)))
-               (if (= (|XAllocNamedColor dpy cmap new-color col col) 0)
-                   (snd-error "can't allocate ~S" new-color)
-                   (|pixel col)))
-             (if (color? new-color)
-                 (|Pixel (snd-pixel new-color))
-                 (if (|Pixel? new-color)
-                     new-color
-                     ;; assume a list of rgb vals?
-                     (|Pixel (snd-pixel (apply make-color new-color))))))))
-    (for-each-child
-     selection-popup-menu
-     (lambda (n)
-       (|XmChangeColor n color-pixel)))))
-(change-selection-popup-color "coral")
-
-(define (change-fft-popup-color new-color)
-  (let ((color-pixel
-         (if (string? new-color) ; assuming X11 color names here
-             (let* ((shell (|Widget (cadr (main-widgets))))
-                    (dpy (|XtDisplay shell))
-                    (scr (|DefaultScreen dpy))
-                    (cmap (|DefaultColormap dpy scr))
-                    (col (|XColor)))
-               (if (= (|XAllocNamedColor dpy cmap new-color col col) 0)
-                   (snd-error "can't allocate ~S" new-color)
-                   (|pixel col)))
-             (if (color? new-color)
-                 (|Pixel (snd-pixel new-color))
-                 (if (|Pixel? new-color)
-                     new-color
-                     ;; assume a list of rgb vals?
-                     (|Pixel (snd-pixel (apply make-color new-color))))))))
-    (for-each-child
-     fft-popup-menu
-     (lambda (n)
-       (|XmChangeColor n color-pixel)))))
-(change-fft-popup-color "orange")
-
-(change-listener-popup-color "red")
-
-;;;
-;;; additions to Edit menu
-;;;
-
-(add-to-menu 1 #f #f) ; separator
-
-;;; -------- cut selection -> new file
-
-(define (cut-selection->new)
-  (if (selection?)
-      (let ((new-file-name (format #f "sel-~D.snd" selctr)))
-	(set! selctr (+ selctr 1))
-	(save-selection new-file-name)
-	(delete-selection)
-	(open-sound new-file-name))))
-
-(add-to-menu 1 "Cut Selection -> New" cut-selection->new)
-
-;;; -------- append sound (and append selection for lafs)
-
-(define (append-sound name)
-  ;; appends sound file
-  (insert-sound name (frames)))
-
-(define (append-selection)
-  (if (selection?)
-      (insert-selection (frames))))
-
-(add-to-menu 1 "Append Selection" append-selection)
-
-;;; Replace with selection
-;;;
-
-(define (replace-with-selection)
-  (let ((beg (cursor))
-        (len (selection-length)))
-    (delete-samples beg len)
-    (insert-selection beg)))
-
-(add-to-menu 1 "Replace with Selection" replace-with-selection)
-
-;;; (add-to-menu 1 #f #f)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;
-;;; open and convert stereo MP3 files automatically
-;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(add-hook! open-raw-sound-hook
-           (lambda (file choices)
-             (list 2 44100 (if (little-endian?) mus-lshort mus-bshort))))
-
-(add-hook! open-hook
-           (lambda (filename)
-             (if (= (mus-sound-header-type filename) mus-raw)
-                 (let ((rawfile (string-append filename ".raw")))
-                   (system (format #f "mpg123 -s ~A > ~A" filename rawfile))
-                   rawfile)
-                 #f)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;
-;;; set up a region play list
-;;; TODO: a GUI for this feature !
-;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(define (region-play-list data)
-  ;; data is list of lists (list (list time region)...), time in secs
-  (for-each
-   (lambda (tone)
-     (let ((time (* 1000 (car tone)))
-           (region (cadr tone)))
-       (if (region? region)
-           (in time (lambda () (play-region region))))))
-   data))
-
-;;; (region-play-list (list (list 0.0 0) (list 0.5 1) (list 1.0 2) (list 1.0 0)))
-
-;;; Deselect function
-;;;
-
-(define (deselect-all)
-  (if (selection?)
-      (set! (selection-member? #t) #f)))
-

-- 
snd packaging



More information about the pkg-multimedia-commits mailing list