aboutsummaryrefslogtreecommitdiff
path: root/pd
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2005-05-18 04:28:51 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2005-05-18 04:28:51 +0000
commit388f7a1df37afeed0dd120f8091614a7f6dd91ab (patch)
tree8a439951a1c190b1fc786abc4f69b23181c54168 /pd
parentbb13717ae41bfa317e7b84625201279a5a2a09d9 (diff)
Damn, edited this before and lost the update. More data features.
Took about 12 patches. svn path=/trunk/; revision=3006
Diffstat (limited to 'pd')
-rw-r--r--pd/doc/1.manual/fig1.1.pngbin1980 -> 3586 bytes
-rw-r--r--pd/doc/1.manual/fig11.1.pngbin5542 -> 14795 bytes
-rw-r--r--pd/doc/1.manual/fig11.2.pngbin2887 -> 4333 bytes
-rw-r--r--pd/doc/1.manual/index.htm15
-rw-r--r--pd/doc/1.manual/x2.htm12
-rw-r--r--pd/doc/1.manual/x3.htm383
-rw-r--r--pd/doc/1.manual/x5.htm56
-rw-r--r--pd/doc/4.fft.examples/00.INTRO.txt60
-rw-r--r--pd/doc/5.reference/plot-help.pd52
-rw-r--r--pd/doc/5.reference/rpole~-help.pd52
-rw-r--r--pd/doc/7.stuff/data-structures/2.getting.data.pd42
-rw-r--r--pd/doc/7.stuff/data-structures/5.array.pd15
-rw-r--r--pd/doc/7.stuff/tools/testtone.pd54
-rw-r--r--pd/doc/sound/voice2.wavbin78194 -> 78194 bytes
-rw-r--r--pd/extra/hilbert~.pd21
-rw-r--r--pd/portmidi_osx/README2
-rw-r--r--pd/portmidi_osx/pmdarwin.c2
-rw-r--r--pd/portmidi_osx/pmmacosx.c2
-rw-r--r--pd/portmidi_osx/ptdarwin.c2
-rw-r--r--pd/src/CHANGELOG.txt23
-rw-r--r--pd/src/configure.in8
-rw-r--r--pd/src/d_filter.c27
-rw-r--r--pd/src/d_mayer_fft.c3
-rw-r--r--pd/src/g_all_guis.c5
-rw-r--r--pd/src/g_array.c126
-rw-r--r--pd/src/g_canvas.c54
-rw-r--r--pd/src/g_canvas.h18
-rw-r--r--pd/src/g_editor.c2
-rw-r--r--pd/src/g_graph.c29
-rw-r--r--pd/src/g_scalar.c28
-rw-r--r--pd/src/g_template.c504
-rw-r--r--pd/src/g_text.c8
-rw-r--r--pd/src/m_obj.c7
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/m_sched.c12
-rw-r--r--pd/src/makefile6
-rw-r--r--pd/src/makefile.dependencies938
-rw-r--r--pd/src/makefile.in4
-rw-r--r--pd/src/notes.txt65
-rw-r--r--pd/src/s_audio_alsa.c25
-rw-r--r--pd/src/s_audio_alsamm.c8
-rw-r--r--pd/src/s_audio_pablio.c2
-rw-r--r--pd/src/s_file.c26
-rw-r--r--pd/src/s_inter.c22
-rw-r--r--pd/src/s_loader.c14
-rw-r--r--pd/src/s_main.c17
-rw-r--r--pd/src/s_path.c16
-rw-r--r--pd/src/s_print.c18
-rw-r--r--pd/src/u_main.tk806
49 files changed, 1655 insertions, 1938 deletions
diff --git a/pd/doc/1.manual/fig1.1.png b/pd/doc/1.manual/fig1.1.png
index a2399935..483a1e8c 100644
--- a/pd/doc/1.manual/fig1.1.png
+++ b/pd/doc/1.manual/fig1.1.png
Binary files differ
diff --git a/pd/doc/1.manual/fig11.1.png b/pd/doc/1.manual/fig11.1.png
index c8283cdb..1a32fe4f 100644
--- a/pd/doc/1.manual/fig11.1.png
+++ b/pd/doc/1.manual/fig11.1.png
Binary files differ
diff --git a/pd/doc/1.manual/fig11.2.png b/pd/doc/1.manual/fig11.2.png
index 1fcfd7e7..38990aac 100644
--- a/pd/doc/1.manual/fig11.2.png
+++ b/pd/doc/1.manual/fig11.2.png
Binary files differ
diff --git a/pd/doc/1.manual/index.htm b/pd/doc/1.manual/index.htm
index c403ae99..519a5102 100644
--- a/pd/doc/1.manual/index.htm
+++ b/pd/doc/1.manual/index.htm
@@ -93,14 +93,13 @@ can be found at:
<LI> <a href="x3.htm" name=s3> getting Pd to run </A>
<OL>
- <LI> <a href="x3.htm"> Overview </A>
- <LI> <a href="x3.htm#s1.1">Installing Pd in Microsoft Windows </A>
- <LI> <a href="x3.htm#s1.2">Installing Pd in Linux </A>
- <LI> <a href="x3.htm#s1.3">Installing Pd in MacOS X </A>
- <LI> <a href="x3.htm#s1.4">Installing Pd in IRIX (SGI) </A>
- <LI> <a href="x3.htm#s3"> graphics rendering using GEM </A>
- <LI> <a href="x3.htm#s4"> The Pd command line </A>
- <LI> <a href="x3.htm#s5"> dealing with files </A>
+ <LI> <a href="x3.htm#s1.0"> audio and MIDI </A>
+ <LI> <a href="x3.htm#s1.1">installing Pd in Microsoft Windows </A>
+ <LI> <a href="x3.htm#s1.2">installing Pd in Linux </A>
+ <LI> <a href="x3.htm#s1.3">installing Pd in MacOS X </A>
+ <LI> <a href="x3.htm#s1.4">installing Pd in IRIX (SGI) </A>
+ <LI> <a href="x3.htm#s4"> preferences and startup options </A>
+ <LI> <a href="x3.htm#s5"> how Pd searches for files </A>
</OL>
<LI> <a href="x4.htm" name=s4> writing Pd objects in C </A>
diff --git a/pd/doc/1.manual/x2.htm b/pd/doc/1.manual/x2.htm
index f68dfe0a..dd33b149 100644
--- a/pd/doc/1.manual/x2.htm
+++ b/pd/doc/1.manual/x2.htm
@@ -51,9 +51,9 @@ shows up as an input level; many cards have DC levels which show up in the
50s. To see an RMS audio level, select "test audio and MIDI" from the Media
menu. The main window display is intended only to help you avoid clipping
on input and output. You can turn the peak meters on and off using the
-control at bottom left.
+control at lower left.
-<P> At bottom right is a control to turn audio processing on and off
+<P> At lower right is a control to turn audio processing on and off
globally. Turning audio off stops the computation and relinquishes any audio
devices Pd is using. The "Media" menu is also provided, with accelerators
"Control-." to turn audio computation off and "Control-/" to turn it on. When
@@ -70,6 +70,9 @@ computation runs late (so that the DAC FIFOs fill and/or the ADC FIFOs empty)
or if audio input and output are not running at the same rate. See
<a href="x3.htm#s2"> audio and MIDI support </A>.
+<P> The bottom part of the Pd window is an area for printout from objects in
+patches, and/or for messages from Pd itself.
+
<P> Pd documents are called "patches" or "canvases."
Each open document has one main window and any number of
sub-windows. The sub-windows can be opened and closed but are always running
@@ -86,9 +89,8 @@ have zero or more inputs and/or outputs, with the inputs on top and the outputs
on bottom.
<P>
-Pd's printout appears on its standard output. Normally, you'll run Pd in a
-"shell" or "terminal" window which you'll keep open to see any printout or
-error messages.
+Pd's printout appears on the main ``Pd" window,
+unless you redirect it elsewhere.
<H3> <A name="s1.2"> 2.1.2. object boxes </A> </H3>
<P> Pd patches can have four types of boxes: <I> object, message, GUI, </I>
diff --git a/pd/doc/1.manual/x3.htm b/pd/doc/1.manual/x3.htm
index 5f4f178f..9bc0f537 100644
--- a/pd/doc/1.manual/x3.htm
+++ b/pd/doc/1.manual/x3.htm
@@ -33,6 +33,8 @@ In case of trouble also consult the Pd mailing list archive on
, which often has late-breaking news about configuration problems and solutions.
The rest of this section describes how to get audio and MIDI to work.
+<H3> <A name=s1.0> 3.1. Audio and MIDI </A> </H3>
+
<P>
To test audio and MIDI, start Pd and select "test Audio and MIDI" from the
"Media" menu. You should see a window like this:
@@ -132,35 +134,36 @@ more than one, hit "use multiple devices" and you'll be allowed up to 4
in and 4 out. Each audio device is 2 channels by default, but you may
specify more if your hardware supports it.
-<H3> <A name=s1.1> 3.1. Installing Pd in Microsoft Windows </A> </H3>
+Other parameters may be tweaked using the command line; see under
+<A href=#s4> preferences and startup options </A>.
-<P> Pd is compiled under NT, but should work under any version of Windows since
-95. Pd will appear as a self-extracting archive (a ".exe" file). Run this and
-select a destination directory when prompted, such as "\pd" or "Program
-Files\pd".
+<H6> MIDI </H6>
-<P>
-If for example you put Pd in "C:Program Files\pd", the executable program will be
-"C:Program Files\pd\bin\pd". You can simply adjust your path to include
-C:\pd\bin and then
-invoke "pd" in a command prompt window. You can also make a shortcut to the
-executable program (left-click on it and drag to the desktop, for example.)
+<A> The "channel message" midi objects in Pd
+such as notein or pgmout will take channels 1-16 to mean the first open MIDI
+port, 17-32 the second one, and so on. The midiin, sysexin, midiout objects
+give you a separate inlet to specify which of the open MIDI port numbers
+you want.
+
+<P> System exclusive MIDI message input and output is theoretically supported
+in version 0.37 but does not work correctly on windows, even in 0.38.
-<P> Pd requires "TCP/IP networking" to be turned on. This doesn't mean you
-have to be on a real network, but simply that Pd actually consists of two
-programs that make a "network link" (locally) to intercommunicate.
-<H4> The vanishing window </H4>
+<H3> <A name=s1.1> 3.2. Installing Pd in Microsoft Windows </A> </H3>
-<P> Pd is a "command line" program. Most error and diagnostic
-messages from Pd appear on the command prompt window Pd runs from.
+<P> Pd should work under any version of Windows since 95. You can download as
+a self-extracting archive (a ".exe" file). Run this and select a destination
+directory when prompted, such as "\pd" or "Program Files\pd".
-<P> If you start Pd from the "run" menu or as a shortcut, and if there's
-a problem with run-time flags (see the Pd command line below), Pd will
-print an error and exit. You won't see this error unless you arrange for the
-"command prompt" or "msdos" window to stay open after Pd exits. One way
-to do this is to make a "batch" file ("run.bat", say) containing the Pd
-command line.
+<P> If for example you put Pd in "C:Program Files\pd", the executable program
+will be "C:Program Files\pd\bin\pd". You can simply adjust your path to
+include C:\pd\bin and then invoke "pd" in a command prompt window. You can also
+make a shortcut to the executable program (left-click on it and drag to the
+desktop, for example.)
+
+<P> Pd requires "TCP/IP networking" to be turned on. This doesn't mean you
+have to be on a real network, but simply that Pd actually consists of two
+programs that make a "network link" (locally) to intercommunicate.
<H4> Audio in Microsoft Windows </H4>
@@ -169,7 +172,8 @@ You can ask for a list of audio and MIDI devices by typing
"pd -listdev"; you can then specify which audio and MIDI device to use.
Type "pd -help" (or make any mistake) to get the syntax for specifying
which device to use. You can modify the Pd shortcut (or batch file) to
-set these.
+set these, or else use the "startup" dialog (file menu) to specify
+startup arguments.
<P>
Alternatively, (and especially when just starting out) you can experiment
@@ -190,10 +194,6 @@ simply terrible. W98, with either audio input or output suppressed, offers
fairly good MIDI timing (~5 msec jitter). The "first edition" used to crash
occasionally; this might be fixed in the "second edition".
-<P> Some NT and W98 drivers greet you with a constant trail of "resyncing
-audio" messages. Sometimes you can fix this by invoking Pd with the "-noresync"
-flag.
-
<H4> ASIO </H4>
<P> As of version 0.35 Pd supports ASIO. Invoke Pd as "pd -asio" and, if
@@ -203,7 +203,7 @@ from the default (256 samples) and "-audiobuf" in milliseconds. Pd will
round this down to a power of two buffers, each of "-blocksize" in sample
frames.
-<H3> <A name=s1.2> 3.2. Installing Pd in Linux </A> </H3>
+<H3> <A name=s1.2> 3.3. Installing Pd in Linux </A> </H3>
<P> What to do depends on which flavor of Linux you are running (e.g., Debian
or Red Hat). The instructions here should work for Pd 0.33 and up regardless of
@@ -311,14 +311,9 @@ audio latency your audio system can handle.
<P>
Be forewarned: installing and testing audio and MIDI drivers in Linux can take
days or weeks. There apears to be no single place where you can get detailed
-information on Linux audio.
-
-<P>
-Depending on your hardware and software, you might or might not be able to
-run "full duplex," i.e., use audio input and output at the same time. For
-many applications it's important to be able to do this, but if by any chance
-you don't need simultaneous input and output you will have much less trouble
-than if you do.
+information on Linux audio. One good source of information lives at:
+<A href=http://www.djcj.org/LAU/guide/index.php>
+http://www.djcj.org/LAU/guide/index.php </A>.
<P>
There are two widely-used driver sets, called "OSS" and "ALSA". OSS is
@@ -331,95 +326,24 @@ releases. You can get ALSA from
<P> ALSA is able to emulate OSS, so that you can usually run Pd using the
default "OSS" settings even if it's actually ALSA that's running.
-
-<H4> Installing and configuring FREE OSS </H4>
-
-<P>
-OSS is really a collection of loadable device drivers. The commands
-for loading and unloading the drivers are "insmod" and "rmmod".
-You can see if the audio drivers are
-running using "lsmod" (as root.) If you see something like:
-<PRE>
-
-Module Pages Used by
-eepro100 3 1 (autoclean)
-opl3 3 0
-opl3sa2 1 0
-ad1848 4 [opl3sa2] 0
-mpu401 5 [opl3sa2] 0
-sound 15 [opl3 opl3sa2 ad1848 mpu401] 0
-soundcore 1 [sound] 6
-soundlow 1 [sound] 0
-aic7xxx 23 2
-
-</PRE>
-
-<P>then OSS is running, and if all you see is:
-
-<PRE>
-
-eepro100 3 1 (autoclean)
-aic7xxx 23 2
-
-</PRE>
-<P>then it isn't. You can turn OSS off by running "rmmod" repeatedly, starting
-with "opl3" (or whatever) so as not to remove any module before you remove
-all the modules that depend on it. In the above listing, "opl3*" is device
-dependent and you might see different names.
-
-<P>
-The file, "/etc/modules.conf" apparently controls which sound drivers are
-started at boot time. The sndconfig program updates this file but you can
-also change things manually, for instance to switch between two different sound
-cards. In Redhat 6.x and earlier, the file is named "conf.modules."
-
-<P> Here is a modules.conf file for OSS:
-
-<PRE>
-
-alias eth0 e100
-alias parport_lowlevel parport_pc
-alias char-major-81 bttv
-alias usb-controller usb-uhci
-alias sound-slot-0 i810_audio
-alias sound-slot-1 es1371
-
-</PRE>
-
-<P>Here the two sound cards are the (motherboard resident) i810 driver and an
-ensoniq es1371.
-
-<P> In RedHat at least, the "sndconfig" program tries to automatically search
-for your soundcard. Unfortunlately it only finds the "first" one which is
-often not the one you want to use!
-
-<P> Under OSS, programs can stream sound using either
-"block" or "stream" mode. Stream mode is the more modern and better of the
-two, but the majority of drivers, even for new sound cards, only
-support "block." Pd makes "block" the default.
-
-<H4> ALSA (Advanced Linux Sound Architecture) </H4>
-
-<P> ALSA is newer, hence less stable and harder to use, than OSS.
-Alsa comes in a "finished" version (0.5.x) and a
-different, redesigned, "beta" version, 0.9. Installing ALSA can be tricky
-and/or confusing.
-
-<P> As of version 0.37 Pd works only with 0.9.x versions.
-The RPM version of Pd is compiled for 0.9.x.
+ALSA is newer, hence less stable and harder to use, than OSS.
+Installing ALSA can be tricky and/or confusing.
<P> By default, Pd uses OSS. If you are running ALSA, Pd will use ALSA's OSS
emulation. To make Pd use ALSA "natively", i.e., the way ALSA is designed
-to be used, include the "-alsa" flag in the command line.
+to be used, include the "-alsa" flag in the command line or bang on the "media"
+menu items.
-<P> In ALSA, you can specify which sound card to use using the "-alsadev"
-flag. So, for instance, "-alsadev 3" means your third card, counting from
-one. You can also specify it the ALSA way: "-alsadev hw:3,0".
+<P> You can add ALSA devices by name on the Pd command line:
+<PRE>
+ pd -alsaadd loupgarou
+</PRE>
+instructs Pd to offer the 'loupgarou' audio device in the Audio Settings panel.
-<H4> Which sound card? </H4>
+<H4> Experiences with particular soudcards </H4>
<P>
-Here's a rundown on my experiences with sound cards so far. See
+Here are some of my own experiences with sound cards so far. See
also the Pd mailing list archives.
<H6> RME 9652 (Hammerfall) </H6>
@@ -429,60 +353,54 @@ I/O ports and one SPDIF. There is a "baby hammerfall" also, which I think is
the "9632." DO NOT CONFUSE THE 9652/9632 WITH OTHER RME BOARDS WHICH MIGHT
NOT WORK WITH PD.
-<P> Word on the Pd mailing list is that the only way at present (7/04) to use
-Hammerfall boards in Pd is via ALSA and jack.
+<P> The easiest way to use
+Hammerfall boards in Pd is via ALSA and jack; but you can use ALSA alone:
+<PRE>
+ pd -alsa -channels 26
+</PRE>
+works for me. If you don't specify the number of channels correctly Pd crashes.
<H6> MIDIMAN </H6>
<P>Midiman sells PCI devices (delta 44, 66, 1010, and 1010LT)
with between 4 and 10 channels in and out, for
-which there are ALSA drivers. The driver name is "ice1712".
+which there are ALSA drivers. These are also very good, and they are a
+bit cheaper than Hammerfalls. The driver name is "ice1712".
<P> Alsa provides an "envy24control" program (in "utils". You should run
this and check that your ice1712's sync source is internal if you have no
SPDIF input, or "SPDIF" if you do. I think the default is now "internal"
but don't take it for granted...
-<H6> i810/i815 </H6>
+<H6> warning about i810/i815 drivers...</H6>
-<P>In RedHat 7.0, motherboards with native i810 audio systems don't work in
-full duplex (they crash linux). Either run Pd -noadc or else (better) install
-ALSA.
+<P>As of RedHat 7.0, motherboards with native i810 audio systems didn't work in
+full duplex (they crashed linux). Either run Pd -noadc or else (better)
+install ALSA. This ought to be fixed by now...
-<H3> <A name="s1.3"> 3.3. Installing Pd in Macintosh OSX </A> </H3>
+<H3> <A name="s1.3"> 3.4. Installing Pd in Macintosh OSX </A> </H3>
<P>Pd version 0.35 and up support Macintosh OSX. You need the OSX Jaguar
distribution (10.2) or later.
-<P> To install Pd you can always just download
-the sources and compile them yourself, or (easier)
-find a MacOSX-style "package". The first package was put together by Adam
-Lindsay; the most current one is by Hans-Christof Steiner
-on
-<A http://puredata.info/Members/hans">
-http://puredata.info/Members/hans</A>.
-The package simply installs itself
-and you needn't follow the directions below.
-</P>
+<P> To install Pd you can always just download the sources and compile them
+yourself, or (easier) just download the Mac binary from the download page:
+
+<A href="http://crca.ucsd.edu/~msp/software.html">
+http://crca.ucsd.edu/~msp/software.html</A>.
-<H4> To install on OSX from the binary tarball: </H4>
+This is in the form of a compressed Tar archive; just click on it and the Max
+will extract the Pd application. Open this and you should be running.
-<P> The binary tarballs on
-<A HREF="http://www.crca.ucsd.edu/~msp/software.html">
-http://www.crca.ucsd.edu/~msp/software.html</A>
-take more steps to install but are more "official". To install them:
+<P> The package by Hans-Christoph Steiner, on
-<P> If you haven't already, first download and install Tcl/Tk; there are pointers on
-Hans's page, or try: http://tcltkaqua.sourceforge.net/
-<A href="http://tcltkaqua.sourceforge.net/">
-http://tcltkaqua.sourceforge.net/</A>. Double click on what you
-get (a disk image opens) and then double click on the "package" icon, and the
-installer should tell you how to proceed from there.
+<A href="http://at.or.at/hans/pd/installers.html">
+http://at.or.at/hans/pd/installers.html</A>,
-<P> Then download a tarball like pd-0.37-0.mac.tar.gz, and expand it
-(I think that's done just by clicking on the thing in OSX.) You can install
-it into your home directory for example. Then start a shell window and
-type "~/pd/bin/pd" to it, and pd should start.
+has many updates and extensions
+which are not included in the original Pd distribution. Download this and
+follow the (simple) instructions found there.
+</P>
<H4> To install on OSX from source: </H4>
@@ -497,7 +415,10 @@ specifically in
/Applications/Wish Shell.app
and /Library/Frameworks/Tk.framework and /Library/Frameworks/Tcl.framework.
-<P> First download and install TK for OSX as described above.
+<P> First download and install TK for OSX. I get it from:
+<A href=http://tcltkaqua.sourceforge.net/>
+http://tcltkaqua.sourceforge.net/. </A>
+
<P> Then, just as for linux, just unload pd-whatever.tar.gz into a directory
such as ~/pd-0.36-0, cd to pd-0.36-0/src, type "./configure"
@@ -509,7 +430,8 @@ and "make". Then type ~/pd-0.36-0/bin/pd to a shell and enjoy!
alias pd ~/pd/bin/pd
</pre>
-<P>in the file, ~/.tcshrc, so that you can later just type "pd" to a shell. (The
+<P>in the file, ~/.tcshrc, so that you can later just type "pd" to a shell.
+(The
shell only reads the ~/.tcshrc file on startup, so this won't take effect in
any existing shells unless you specially type
<pre>
@@ -517,23 +439,14 @@ any existing shells unless you specially type
</pre>
<P>to them.)
-<P> In some cases you have to explicitly give "-soundindev" and "-soundoutdev"
-flags for Pd to open audio correctly; "pd -listdev" should show you the
-correct device numbers.
+<P> Follow the general directions above for testing audio and/or MIDI
+as needed.
<P> To get MIDI working, you have to do the Mac OSX magic to get a USB
MIDI interface installed. I've seen this done with Midisport devices and
I think you just download the OSX driver and follow directions.
-<P> On the machine I tried, it was necessary to type,
-
-<pre>
- pd -midiindev 1 -midioutdev 2
-</pre>
-
-<P>to get MIDI working.
-
-<H3> <A name=s1.4> 3.4. Installing Pd in IRIX (SGI machines) </A> </H3>
+<H3> <A name=s1.4> 3.5. Installing Pd in IRIX (SGI machines) </A> </H3>
<P> (NOTE: as of release 0.35 I haven't had an IRIX machine to compile
Pd on. Soeren Bovbjerg has kindly compiled 0.35 and 0.36 for IRIX;
@@ -636,20 +549,66 @@ Opcode Studio 3 interface but in principle any Mac-compatible one should work.
The O2 apparently has RS232 ports, not RS422. I think SGI's web site says
something about how to deal with this.
+<H3> <A name=s4> 3.6. Preferences and startup options </A> </H3>
-<H3> <A name=s3> 3.5. graphics rendering using GEM </A> </H3>
+<P> Pd's behavior may be customized to instruct it where to find files, which
+audio devices to open, what font size to use, and so on. Most of
+these may also be changed using the various dialogs you can open from Pd's
+menus. Others take effect only when Pd starts up; some of these appear
+on the ``startup" dialog and some of them, too cranky to put in a GUI, must
+be typed as <I> command line arguments </I>.
-<P>
-GEM, originally by Mark Danks but now supported by Iohannes Zmoelnig, is essentially an extension of Pd that allows you to do OpenGL programming
-using a suite of "GEM objects" roughly parallel to the tilde objects built
-into Pd for audio. Find out more from
-<a href="http://iem.kug.ac.at/~zmoelnig/index.html"> Johannes's page</a>.
+<P> In addition to the Audio and MIDI settings (see
+<A href="#s1.0"> Audio and MIDI </A>), you can customize font size (from the
+``edit" menu), directories to search for files (see
+<A href="#s5"> How Pd searches for files </A>), and additional startup
+parameters described below.
+<P> All of these settings may be saved automatically between Pd sessions.
+It is also possible to specify settings directly via the <I> command
+line </I>. (A third mechanism, using configuration files, is deprecated and
+isn't described here.) The Pd command line is described in the next
+section. Command line settings, if given, each override the corresponding
+setting that was saved from Pd.
-<H3> <A name=s4> 3.6. The Pd command line </A> </H3>
+<P> The startup settings (i.e., those that take effect only when Pd is started)
+are controlled using the ``startup..." dialog from the File menu. The
+dialog appears as follows:
-<P>Pd is a "command line" program. The best way to run it is from your
-"terminal emulator," "shell," or "MSDOS prompt." The command line is:
+<CENTER><P>
+ <IMG src="fig11.3.png" ALT="startup dialog">
+</P></CENTER>
+
+The slots at top each specify a binary ``library" for Pd to load on startup.
+These may be for Gem, pdp, zexy, iemlib, cyclone, and so on. Typically, a
+single binary object (an ``extern") is left for Pd to load automatically;
+startup library loading is appropriate for collections of many objects
+specified by a single binary library.
+
+<P> The ``defeat real-time scheduling" contol, if enabled, makes Pd run without
+its usual effort to become a real-time process (whatever this means in the
+operating system you are using.) In Unix, Pd must usually be setuid to allow
+real-time scheduling at all.
+
+<P> The ``startup flags" allow you to add to Pd's command line on startup. This
+is specified as described below, except that the initial word, ``pd", is
+understood. For example, putting ``-rt" in this field sets real-time
+scheduling; ``-sleepgrain 1" sets the sleep grain to 1 (see under MIDI below),
+and typing "-rt -sleepgrain 1" does both.
+
+<P> You may save the current settings for future Pd sessions with the
+``save all settings" button; this saves not only the path but all other
+settings as well.
+
+<H6> Command line arguments </A> </H3>
+
+<P>Pd may be run as a "command line" program from your "terminal emulator,"
+"shell," or "MSDOS prompt." In Windows, if Pd is started using a "shortcut"
+it is also run from a command line which you can edit using the ``properties"
+dialog for the shortcut. In any operating system, Pd can be called from a
+script (called a <I> batch file </I> on Windows or a <I> shell script </I>
+on OSX or unix). The command line is just a line of text, which should be
+of the form:
<PRE>
@@ -702,6 +661,8 @@ MIDI configuration flags:
general flags:
-path &lt;path&gt; -- add to file search path
+-nostdpath -- don't search standard ("extra") directory
+-stdpath -- search standard directory (true by default)
-helppath &lt;path&gt; -- add to help search path
-open &lt;file&gt; -- open file(s) on startup
-lib &lt;file&gt; -- load object library(s)
@@ -710,10 +671,13 @@ general flags:
-version -- don't run Pd; just print out which version it is
-d &lt;n&gt; -- specify debug level
-noloadbang -- suppress all loadbangs
+-stderr -- send printout to standard error instead of GUI
-nogui -- suppress starting the GUI
+-guiport &lt;n&gt; -- connect to pre-existing GUI over port 'n'
-guicmd "cmd..." -- substitute another GUI program (e.g., rsh)
-send "msg..." -- send a message at startup (after patches are loaded)
-rt or -realtime -- use real-time priority (needs root privilege)
+-nrt -- don't use real-time priority
</PRE>
@@ -739,7 +703,7 @@ and input devices are running at different rates, Pd will constantly drop frames
to re-sync them, which will sound bad. You can disable input or output if this
is a problem.
-<H4> audio buffer size, block size, and sleep grain. </H4>
+<H4> audio buffer size and block size </H4>
<P>You can specify an audio buffer size in milliseconds, typically between 10 and
300, depending on how responsive your OS and drivers are. If this is set too
@@ -747,26 +711,10 @@ low there will be audio I/O errors ("data late"). The higher the value is,
on the other hand, the more throughput delay you will hear from the audio
and/or control inputs (MIDI, GUI) and the audio coming out.
-<P> You can also specify the audio block size in sample
-frames. This is 64 by default (except for MMIO for which it's 256), and may
-be 64, 128, or 256.
-
-
-<P> The "sleepgrain" controls how long (in milliseconds) Pd sleeps between
-periods of computation. This is normally the audio buffer divided by 4, but
-no less than 0.1 and no more than 5. On most OSes, ingoing and outgoing MIDI
-is quantized to this value, so if you care about MIDI timing, reduce this to 1.
+<P> You can also specify the audio block size in sample frames. This is 64 by
+default (except for MMIO for which it's 256), and may be 64, 128, or 256.
-<H4> MIDI </H4>
-
-<A> The "channel message" midi objects in Pd
-such as notein or pgmout will take channels 1-16 to mean the first open MIDI
-port, 17-32 the second one, and so on. The midiin, sysexin, midiout objects
-give you a separate inlet to specify which of the open MIDI port numbers
-you want.
-
-<P> System exclusive MIDI message inupt and output is theoretically supported
-in version 0.37 but has not been tested.
+<H4> MIDI and sleepgrain</H4>
<P> In Linux, if you
ask for "pd -midioutdev 1" for instance, you get /dev/midi0 or /dev/midi00
@@ -775,7 +723,13 @@ number 0 is the "MIDI mapper", which is the default MIDI device you selected
from the control panel; counting from one, the device numbers are card
numbers as listed by "pd -listdev."
-<H3> <A name="s5"> 3.7. dealing with files </A> </H3>
+<P> The "sleepgrain" controls how long (in milliseconds) Pd sleeps between
+periods of computation. This is normally the audio buffer divided by 4, but
+no less than 0.1 and no more than 5. On most OSes, ingoing and outgoing MIDI
+is quantized to this value, so if you care about MIDI timing, reduce this to 1
+or less.
+
+<H3> <A name="s5"> 3.7. How Pd searches for files </A> </H3>
<P>Pd has a search path feature; you specify the path on the command line
using the "-path" option. Paths may contain any number of files. If you
@@ -783,15 +737,26 @@ specify several files in a single "-path" option they're separated by colons
in unix or semicolons in NT.
<P> You can see and edit the path while Pd is running using the "path..."
-item in the "File" menu. The path must be correctly set before you load
-a patch or it may fail to find abstractions, etc., that are needed to
-construct the patch.
+item in the "File" menu:
+
+<CENTER><P>
+ <IMG src="fig11.4.png" ALT="startup dialog">
+</P></CENTER>
-<P>When Pd searches for an abstraction or an
+<P> The path must be correctly set before you load
+a patch or it may fail to find abstractions, etc., that are needed to
+construct the patch. When Pd searches for an abstraction or an
"extern" it uses the path to try to find the necessary file. The "read"
-messages to qlists and arrays (aka tables) work the same way. NO SPACES MAY
-APPEAR ANYWHERE IN THE SEARCH PATH, e.g., "c:\my nonsense\goobers" won't
-work.
+messages to qlists and arrays (aka tables) do this too.
+
+<P> If ``use standard extensions" is enabled, the usual ``extras" directory
+is also searched. This contains standard external objects like ``expr" and
+``fiddle", and perhaps much more depending on the distribution of Pd
+you're using.
+
+<P> You may save the current settings for future Pd sessions with the
+``save all settings" button; this saves not only the path but all other
+settings as well.
<P> Path entries may be relative to the patch directory; for instance,
if your path has an item, "../sound", and your patch is in "my stuff/all mine",
@@ -801,9 +766,9 @@ you have a patch and supporting files (even a supporting snapshot of pd)
that you want to distribute or carry around together.
<P> Regardless of path, Pd should look first in the directory containing
-the patch before searching down the path. (However, sometimes, for
-reasons I can't explain yet, you have to put the entry "." in the
-search path for this to happen, as least within linux!)
+the patch before searching down the path. Pd does not automatically look
+in the <I> current directory </I> however; to enable that, include ``." in
+the path. The ``extra" directory, if enabled, is searched last.
<P> Filenames in Pd are always separated by (unix-style) forward slashes, even
if you're on Windows (which uses backslashes). This is so that patches can be
@@ -813,11 +778,11 @@ separator should agree with the operating system. <BR>
<P> If a filename specified in a patch has any "/" characters in it, the "path"
is not used; thus, "../sounds/sample1.wav" causes Pd only to look relative to
-the directory containing the patch. (You may also invoke externs that way.)
+the directory containing the patch. You may also invoke externs that way.
<P> As of version 0.35, there may be spaces in the path to Pd itself; also,
-the "openpanel" and "savepanel" objects can handle spaces. But still not
-the search path.
+the "openpanel" and "savepanel" objects can handle spaces. Spaces in the
+path should work as of version 0.38.
</BODY>
</HTML>
diff --git a/pd/doc/1.manual/x5.htm b/pd/doc/1.manual/x5.htm
index 1a1b2e2f..990893b1 100644
--- a/pd/doc/1.manual/x5.htm
+++ b/pd/doc/1.manual/x5.htm
@@ -20,6 +20,62 @@
<H3> <A name="s2"> 5.1. release notes </A> </H3>
+<P> ------------------ 0.38.1 --------------------------
+
+Fixed two bugs that crashed Pd when deleting number boxes in certain
+situations.
+
+<P> ------------------ 0.38.0 --------------------------
+
+<P> The big change is queued graphics updates, which apply (so far)
+to tables and number/symbol boxes. The IEM GUIS aren't enqueued yet.
+This along with a better graphics update buffering scheme makes Pd's
+graphics run much better.
+
+<P> Support for cutting/copying/pasting text between boxes and between Pd and
+other applications.
+
+<P> Dialogs for setting and saving path, libs-to-load-on-startup, and some
+other things. This and the audio settings can be saved automatically to
+the appropriate repository (.pdsettings on linux; registry on MS windows;
+"Preferences" on Mac.)
+
+<P> "Print" printout goes to the Pd window by default. You can revert to
+the old (standard error) behavior with the "-stderr" startup flag.
+
+<P> The "gui" TK script can now start Pd up (previously Pd had to be
+started first.) This is needed for Pd to work as an "App" on Mac.
+
+<P> new filter objects: cpole~, fpole~, etc... these will get used in the
+upcoming Techniques chapter 8.
+
+<P> Objects whose creation failed get a distinctive outline; if they are
+already inside a patch they sprout inlets and outlets as necessary to
+preserve connections.
+
+<P> Filenames in the "search path", etc., now may contain spaces, commas,
+and semicolons.
+
+<P> bug fix: click on minaturized subpatch failed to "vis" it
+
+<P> bug fix: font size change crash reported by CK
+
+<P> Key bindings like control-Q now work even from within most dialogs.
+
+<P> The audio settings dialog now permits turning audio input and/or output
+off without forgetting how many channels it should be when on.
+
+<P> RME Hammerfall ALSA support from Winfried -- but specify the number of
+channels correctly or else Pd crashes.
+
+<P> portaudio (e.g., Mac) audio support fixed for inchans != outchans,
+so the emi emagic can now be used 2-in. 6-out, for example.
+
+<P> (linux) The configure script can set the setuid flag on "make install".
+The "-enable" flags to ./configure should now work correctly too.
+
+<P> atan2 had its inlets switched to conform to standard usage
+
<P> ------------------ 0.37.3 --------------------------
<P> Oops- added __i386__ macro to windows makefile so it would test for
diff --git a/pd/doc/4.fft.examples/00.INTRO.txt b/pd/doc/4.fft.examples/00.INTRO.txt
index b5218793..c27120b8 100644
--- a/pd/doc/4.fft.examples/00.INTRO.txt
+++ b/pd/doc/4.fft.examples/00.INTRO.txt
@@ -1,63 +1,11 @@
-These patches demonstrate how to use Pd's short-time Fourier transform objects,
-rfft~ and rifft~, to do a variety of things. The patches can be quite
-expensive; the phase vocoder, for instance, requires a 300MHz Pentium 2 to run
-at 44100 Hz. By default Pd runs at 44100 Hz, but you can specify a different
-sample rate on the command line, for instance:
-
-pd -r 16000 09.pvoc.pd
-
-On SGI, Pd will check whether your audio system is running at the correct
-sample rate and will print out a warning if not. In NT or W95, Pd's behavior
-will depend on your audio driver. In Linux Pd usually tries to set the rate
-of the conversion hardware.
-
-Included in this directory are:
-
-01.fftanalysis.pd -- does a windowed FFT analysis and resynthesis of a sine
-tone, showing how to specify block size and overlap.
-
-02.noisefft.pd -- Fourier analysis of white noise. This patch also shows how
-you can average power spectra over time.
-
-03.denoise.pd -- using the technique from the previous patch, finds the noise
-floor in a recorded sample and attempts to scrub it away.
-
-04.shifts.pd -- tests the leftshift and rightshift "externs" used in the next
-patch.
-
-05.sheepgoat.pd -- tries to discriminate between "pitched" and "unpitched"
-components of a sound.
-
-06.sheepgoat2.pd -- another attempt at the same thing.
-
-07.tinbell.pd -- a spectral flattener, which can make the sound of a large bell
-turn into the sound of a tamtam.
-
-08.convobros.pd -- spectral cross synthesis between two sounds
-
-09.pvoc.pd -- phase vocoder
-
----------- after this point, the patches haven't been cleaned up -----------
-
-10.phaselockedvoc.pd -- phase locked vocoder; see Laroche&Dolson in ICMC97 for
-a discussion of something that works better than this.
-
-11.pianorev.pd -- an attempt at a phase-coherent reverberation algorithm to
-imitate the "piano reverb" obtained by putting a speaker under the sound board
-of a piano and picking up the sympathetic vibrations.
+Most of the patches here have moved to section I of the audio examples.
+The remaining ones are due for an update but will probably join the
+"data" examples.
12.sinedecomposer.pd -- estimate the frequencies and amplitudes of the
components of a sound
-13.tracemaker.pd -- show how to use Pd to combine snapshots of a spectrum into
-continuous spectral traces.
-
-14.partialtracer.pd -- sinusoidal analysis/resynthesis of a time-verying sound.
-
-15.waveformgrab.pd -- bash a sample into phase-coherent windows and make a
-pitched resynthesis.
-
-
+13.partialtracer.pd -- sinusoidal analysis/resynthesis of a time-verying sound.
diff --git a/pd/doc/5.reference/plot-help.pd b/pd/doc/5.reference/plot-help.pd
index 050418d2..7d22d06c 100644
--- a/pd/doc/5.reference/plot-help.pd
+++ b/pd/doc/5.reference/plot-help.pd
@@ -4,44 +4,42 @@ array array2 help-plot-array2-template array array3 help-plot-array3-template
#N struct help-plot-array1-template float y;
#N struct help-plot-array2-template float x float y;
#N struct help-plot-array3-template float y float w;
-#N canvas 398 0 516 229 12;
-#N canvas 288 75 606 588 help-plot-template 1;
-#X text 35 30 creation arguments:;
-#X text 51 48 - RGB color (0=black \, 999=white \, 900=red \, 90=green
+#N canvas 477 38 516 229 12;
+#N canvas 486 0 622 558 help-plot-template 0;
+#X text 29 34 creation arguments:;
+#X text 49 94 - RGB color (0=black \, 999=white \, 900=red \, 90=green
\, 9=blue \, 555=grey \, etc.);
-#X text 50 97 - relative x and y location;
-#X text 50 114 - x spacing;
-#X text 40 150 This first example plots the red trace (500) \, width
+#X text 47 52 - OPTIONAL word "curve" to specify bezier;
+#X text 47 121 - line width;
+#X text 47 137 - relative x and y location;
+#X text 48 153 - x spacing;
+#X obj 40 240 plot curve array2 70 3 100 0;
+#X obj 31 331 plot curve array3 9 1 120 50 20;
+#X obj 45 12 plot array1 500 1 10 15 20;
+#X text 30 170 This first example plots the red trace (500) \, width
1 \, at point (10 \, 15) \, with horizontal spacing 20 The black diamonds
come from the template of the array1 element itself.;
-#X text 44 327 If a "w" variable is present in the template as for
+#X text 51 351 If a "w" variable is present in the template as for
array3 \, it is added to the line width.;
-#X obj 37 493 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10;
-#X text 34 454 To see the data itself \, select "properties" for the
+#X obj 28 524 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10;
+#X text 28 477 To see the data itself \, select "properties" for the
scalar by right clicking on the purple square.;
-#X obj 36 390 struct help-plot-template float x float y array array1
+#X obj 25 410 struct help-plot-template float x float y array array1
help-plot-array1-template array array2 help-plot-array2-template array
array3 help-plot-array3-template;
-#X text 45 369 here's the "struct" for all this:;
-#X obj 51 8 plot array1 500 1 10 15 20 1;
-#X obj 39 217 plot array2 70 3 100 0 0 2;
-#X text 30 542 obsolete feature: the arguments can be preceded by the
-word "curve" to specify bezier curves. This will be phased out.;
-#X text 52 80 - line width in pixels;
-#X text 51 130 - style (0 for points \, 1 for polygon \, 2 for Bezier
-curve);
-#X text 40 236 This is the green spiral (color 70 \, line width 3 \,
+#X text 34 389 here's the "struct" for all this:;
+#X text 46 73 - field to plot (the array);
+#X text 63 262 This is the green spiral (color 70 \, line width 3 \,
location (100 \, 0). Since the template for array2 contains an "x"
-cariable \, play ignores x spacing requests and takes x from the data
-itself. The style is 2 for a Bezier curve.;
-#X obj 43 309 plot array3 9 1 120 50 20 1;
+variable \, play ignores x spacing requests and takes x from the data
+itself.;
#X restore 243 78 pd help-plot-template;
#N canvas 196 292 273 120 help-plot-array1-template 0;
#X obj 30 71 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5;
-#X obj 32 27 template float y;
+#X obj 32 27 struct help-plot-array1-template float y;
#X restore 242 101 pd help-plot-array1-template;
#N canvas 161 163 273 120 help-plot-array2-template 0;
-#X obj 32 26 template float x float y;
+#X obj 32 26 struct help-plot-array2-template float x float y;
#X restore 243 123 pd help-plot-array2-template;
#N canvas 0 0 411 207 help-plot-data 1;
#X scalar help-plot-template 39 73 \; 0 \; 20 \; 0 \; 30 \; 0 \; \;
@@ -50,12 +48,12 @@ itself. The style is 2 for a Bezier curve.;
#X restore 242 57 pd help-plot-data;
#X text 23 139 see also:;
#X obj 30 184 drawnumber;
-#X obj 29 163 template;
#X obj 35 22 plot;
#X text 87 21 -- draw array elements of scalars;
#X obj 29 206 drawpolygon;
#N canvas 161 163 273 120 help-plot-array3-template 0;
-#X obj 43 32 template float y float w;
+#X obj 43 32 struct help-plot-array3-template float y float w;
#X restore 242 144 pd help-plot-array3-template;
#X text 8 79 explanation is in here-->;
#X text 264 203 updated for Pd version 0.35;
+#X obj 29 163 struct;
diff --git a/pd/doc/5.reference/rpole~-help.pd b/pd/doc/5.reference/rpole~-help.pd
index 07d50267..011a2b5d 100644
--- a/pd/doc/5.reference/rpole~-help.pd
+++ b/pd/doc/5.reference/rpole~-help.pd
@@ -1,37 +1,37 @@
-#N canvas 56 7 526 510 12;
+#N canvas 56 7 669 542 12;
#X floatatom 118 172 0 0 0 0 - - -;
#X obj 54 85 osc~ 100;
#X msg 69 117 clear;
-#X obj 77 483 lop~;
-#X text 8 483 see also:;
+#X obj 96 512 lop~;
+#X text 10 512 see also:;
#X obj 52 7 rpole~;
#X text 114 7 real one-pole (recursive) filter \, raw;
#X text 8 35 Rpole~ filters an audio signal (left inlet) via a one-pole
real filter \, whose coefficient is controlled by a creation argument
or by an audio signal (right inlet).;
-#X text 331 482 updated for Pd version-0.38;
-#X obj 84 430 rzero~;
-#X obj 35 450 cpole~;
-#X obj 35 430 rpole~;
-#X obj 133 430 rzero_rev~;
-#X obj 84 450 czero~;
-#X obj 133 450 czero_rev~;
-#X text 211 430 real;
-#X text 210 451 complex;
-#X text 32 414 1-pole;
-#X text 81 414 1-zero;
-#X text 131 414 1-zero \, reversed;
-#X text 57 399 summary of raw filters:;
+#X text 413 511 updated for Pd version-0.38;
+#X obj 95 441 rzero~;
+#X obj 35 463 cpole~;
+#X obj 35 441 rpole~;
+#X obj 154 441 rzero_rev~;
+#X obj 95 463 czero~;
+#X obj 154 463 czero_rev~;
+#X text 253 441 real;
+#X text 252 464 complex;
+#X text 32 425 1-pole;
+#X text 92 425 1-zero;
+#X text 142 425 1-zero \, reversed;
+#X text 57 410 summary of raw filters:;
#X msg 71 143 set 1;
-#X text 117 143 <-- set internal state;
-#X text 118 86 <-- signal to filter;
-#X text 142 173 <-- filter coefficient (may be a signal);
-#X text 129 198 <-- creation argument initializes filter coefficient
+#X text 119 142 <-- set internal state;
+#X text 132 86 <-- signal to filter;
+#X text 150 173 <-- filter coefficient (may be a signal);
+#X text 150 195 <-- creation argument initializes filter coefficient
;
#X text 73 252 y[n] = y[n-1] + a[n] * x[n];
-#X text 10 302 The transfer function is H(Z) = 1/(1 - aZ^-1).;
-#X text 113 116 <-- clear internal state to zero;
-#X text 8 270 where y[n] is the output \, x[n] the input \, and a[n]
+#X text 10 310 The transfer function is H(Z) = 1/(1 - aZ^-1).;
+#X text 121 117 <-- clear internal state to zero;
+#X text 11 272 where y[n] is the output \, x[n] the input \, and a[n]
the filter coefficient. The filter is unstable if/when |a[n]|>1.;
#X obj 53 195 rpole~ 0.9;
#X text 14 230 The action of rpole~ is:;
@@ -67,9 +67,9 @@ the filter coefficient. The filter is unstable if/when |a[n]|>1.;
#X connect 12 0 10 0;
#X connect 12 0 10 1;
#X connect 13 0 12 1;
-#X restore 457 416 pd test;
-#X text 111 483 etc.: user-friendly filters;
-#X text 8 320 (Pd also provides a suite of user-friendly filters. This
+#X restore 457 427 pd test;
+#X text 136 512 etc.: user-friendly filters;
+#X text 8 331 (Pd also provides a suite of user-friendly filters. This
and other raw filters are provided for situations which the user-friendly
ones can't handle. See Chapter 8 of http://crca.ucsd.edu/~msp/techniques
for an introduction to the necessary theory.);
diff --git a/pd/doc/7.stuff/data-structures/2.getting.data.pd b/pd/doc/7.stuff/data-structures/2.getting.data.pd
index 123b869f..4b200052 100644
--- a/pd/doc/7.stuff/data-structures/2.getting.data.pd
+++ b/pd/doc/7.stuff/data-structures/2.getting.data.pd
@@ -1,40 +1,40 @@
-#N struct template2 float x float y float z float q;
-#N canvas 363 11 630 603 12;
-#X text 311 559 updated for Pd version 0.32.;
+#N struct template2 float x float y float z float q float zz;
+#N canvas 138 2 630 580 12;
+#X text 345 543 updated for Pd version 0.32.;
#N canvas 42 312 598 266 stuff 0;
#X obj 353 159 pointer;
#X obj 117 103 t b b b;
#X msg 117 62 bang;
#X obj 117 31 loadbang;
-#X text 151 62 click here to re-initialize;
-#X text 126 206 Explained later...;
-#X msg 20 139 50 250 30 9 \, 200 200 -20 900 \, 100 200 -50 30;
-#X obj 20 162 append template2 x y z q;
+#X text 163 62 click here to re-initialize;
+#X text 127 242 Explained later...;
+#X obj 28 208 append template2 x y z q;
#X msg 353 101 \; pd-data2 clear;
#X msg 353 137 traverse pd-data2 \, bang;
-#X connect 0 0 7 4;
-#X connect 1 0 6 0;
-#X connect 1 1 9 0;
-#X connect 1 2 8 0;
+#X msg 28 185 50 150 30 9 \, 200 100 -20 900 \, 100 100 -50 30;
+#X connect 0 0 6 4;
+#X connect 1 0 9 0;
+#X connect 1 1 8 0;
+#X connect 1 2 7 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
-#X connect 6 0 7 0;
-#X connect 9 0 0 0;
+#X connect 8 0 0 0;
+#X connect 9 0 6 0;
#X restore 506 310 pd stuff;
#X text 506 242 subpatches:;
#X obj 15 303 pointer;
#X msg 27 271 next;
#X text 75 301 <- object that outputs pointers to scalars;
-#N canvas 13 22 345 271 data2 1;
-#X scalar template2 53 202 30 9 \;;
-#X scalar template2 203 152 -20 900 \;;
-#X scalar template2 103 152 -50 30 \;;
+#N canvas 13 22 307 198 data2 1;
+#X scalar template2 50 150 30 9 0 \;;
+#X scalar template2 200 100 -20 900 0 \;;
+#X scalar template2 100 100 -50 30 0 \;;
#X restore 506 265 pd data2;
-#N canvas 15 278 554 155 template2 0;
-#X obj 15 46 filledpolygon 244 q 5 0 0 20 z 40 0;
+#N canvas 315 125 554 155 template2 1;
#X text 13 79 The template for the two scalars \, as in the last patch
;
-#X obj 15 21 struct template2 float x float y float z float q;
+#X obj 15 46 filledpolygon 244 q 5 0 0 20 z 40 0;
+#X obj 14 21 struct template2 float x float y float z float q;
#X restore 506 288 pd template2;
#X obj 15 355 get template2 x y z q;
#X floatatom 15 384 5 0 0 0 - - -;
@@ -43,7 +43,7 @@
#X floatatom 199 385 5 0 0 0 - - -;
#X msg 15 246 traverse pd-data2;
#X obj 59 330 print;
-#X text 100 330 <- this gets a bang when we reach the end;
+#X text 111 331 <- this gets a bang when we reach the end;
#X text 211 353 <- this takes incoming pointers;
#X text 214 367 and outputs the values of x \, y \, z \, and q.;
#X text 172 245 <- go to head of list (click first);
diff --git a/pd/doc/7.stuff/data-structures/5.array.pd b/pd/doc/7.stuff/data-structures/5.array.pd
index 9f11e17c..15e43d22 100644
--- a/pd/doc/7.stuff/data-structures/5.array.pd
+++ b/pd/doc/7.stuff/data-structures/5.array.pd
@@ -13,14 +13,13 @@
#X obj 318 163 pointer;
#X msg 449 194 bang;
#N canvas 0 0 384 196 data5 1;
-#X scalar template5 50 150 30 9 \; 6 \; 10 \; 12 \; 14 \; 20 \; 26
-\; 32 \; 31 \; 26 \; 26 \; 23 \; 19 \; 15 \; 11 \; 7 \; 5 \; -55 \;
--56 \; -58 \; -1 \; -1 \; -6 \; -7 \; -8 \; -10 \; -11.3333 \; -12.6667
-\; -14 \; -18 \; -20 \; -22 \; -24 \; -26 \; -28 \; -31 \; -35 \; -37
-\; -37 \; -37 \; -37 \; -38 \; -39 \; -40 \; -41 \; -42 \; -43 \; -47
-\; -49 \; -51 \; -52 \; \;;
+#X scalar template5 60 109 30 9 \; 0 \; 0 \; 0 \; 0 \; 0 \; 3 \; 0
+\; 0 \; 0 \; 7 \; -60 \; -66 \; -68 \; -70 \; -88 \; -100 \; -100 \;
+14 \; 12 \; 8 \; 6 \; 2 \; -4 \; -26 \; -34 \; -58 \; -60 \; -66 \;
+-66 \; -66 \; -66 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0
+\; 0 \; 0 \; 0 \; 0 \; 43 \; 0 \; 0 \; 0 \; 0 \; \;;
#X restore 508 314 pd data5;
-#N canvas 90 339 646 260 template5 1;
+#N canvas 470 534 646 260 template5 1;
#X obj 8 91 filledpolygon 244 q 3 0 0 20 z 40 0;
#X text 6 44 this declares an array named "bazoo" whose elements are
described by "template5-element." Array declarations take three arguments
@@ -32,7 +31,7 @@ spaced 4 apart.;
variable---see the help window for "plot".;
#X obj 6 8 struct template5 float x float y float z float q array bazoo
template5-element;
-#X obj 8 113 plot bazoo 700 3 30 10 4 1;
+#X obj 8 113 plot bazoo 700 3 30 40 4;
#X restore 508 337 pd template5;
#N canvas 65 248 568 128 template5-element 0;
#X text 12 36 This says that array elements will have a single floating-point
diff --git a/pd/doc/7.stuff/tools/testtone.pd b/pd/doc/7.stuff/tools/testtone.pd
index 257422f9..c5eae9af 100644
--- a/pd/doc/7.stuff/tools/testtone.pd
+++ b/pd/doc/7.stuff/tools/testtone.pd
@@ -1,4 +1,4 @@
-#N canvas 182 142 581 402 12;
+#N canvas 99 78 581 402 12;
#X floatatom 83 307 3 0 0 0 - - -;
#X obj 33 257 notein;
#X obj 33 283 stripnote;
@@ -61,9 +61,9 @@ started" in the Help menu.;
but is free for you to use for any reasonable purpose. See the file
\, LICENSE.txt in the distribution.;
#X obj 135 117 tgl 20 0 tone-ch1 tone-ch1 1 5 -8 0 12 -262144 -1 -1
-1 1;
+0 1;
#X obj 160 117 tgl 20 0 tone-ch2 tone-ch2 2 5 -8 0 12 -262144 -1 -1
-1 1;
+0 1;
#X obj 236 282 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
1;
#X obj 394 110 tgl 20 0 tone-monitor set-tone-monitor monitor 25 10
@@ -93,13 +93,13 @@ but is free for you to use for any reasonable purpose. See the file
#X obj 393 148 tgl 20 0 tone-hipass set-tone-hipass input-hipass 25
10 0 12 -262144 -1 -1 0 1;
#X obj 185 117 tgl 20 0 tone-ch3 tone-ch3 3 5 -8 0 12 -262144 -1 -1
-1 1;
+0 1;
#X obj 210 117 tgl 20 0 tone-ch4 tone-ch4 4 5 -8 0 12 -262144 -1 -1
-1 1;
+0 1;
#X obj 235 117 tgl 20 0 tone-ch5 tone-ch5 5 5 -8 0 12 -262144 -1 -1
-1 1;
+0 1;
#X obj 260 117 tgl 20 0 tone-ch6 tone-ch6 6 5 -8 0 12 -262144 -1 -1
-1 1;
+0 1;
#X obj 331 108 bng 15 250 50 0 tone-all empty ALL 20 8 0 12 -262144
-1 -1;
#X obj 331 129 bng 15 250 50 0 tone-none empty NONE 20 8 0 12 -262144
@@ -122,7 +122,7 @@ but is free for you to use for any reasonable purpose. See the file
#X obj 379 256 print~;
#X obj 438 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 162 353 903 462 -------audio----------- 0;
+#N canvas 0 114 903 462 -------audio----------- 0;
#X obj 186 95 hip~ 5;
#X obj 194 172 outlet;
#X obj 194 146 int;
@@ -161,18 +161,18 @@ but is free for you to use for any reasonable purpose. See the file
#X obj 28 165 s tone-hip;
#X obj 28 114 r tone-hipass;
#N canvas 499 63 548 519 glue+loadbang 0;
-#X obj 171 21 loadbang;
-#X obj 171 176 r tone-all;
-#X msg 171 204 \; tone-ch1 1 \; tone-ch2 1 \; tone-ch3 1 \; tone-ch4
-1 \; tone-ch5 1 \; tone-ch6 1;
-#X obj 168 323 r tone-none;
-#X msg 168 352 \; tone-ch1 0 \; tone-ch2 0 \; tone-ch3 0 \; tone-ch4
-0 \; tone-ch5 0 \; tone-ch6 0;
-#X msg 171 49 \; pd dsp 1 \; tone-pitch 69 \; tone-radio 2 \; tone-radio-set
+#X obj 8 20 loadbang;
+#X obj 175 18 r tone-all;
+#X obj 285 16 r tone-none;
+#X msg 8 48 \; pd dsp 1 \; tone-pitch 69 \; tone-radio 2 \; tone-radio-set
2 \; tone-type 1 \; tone-type-set 1 \; tone-all 1 \;;
-#X connect 0 0 5 0;
-#X connect 1 0 2 0;
-#X connect 3 0 4 0;
+#X msg 175 46 \; tone-ch1 1 \; tone-ch2 1 \; tone-ch3 1 \; tone-ch4
+1 \; tone-ch5 1 \; tone-ch6 1 \; tone-ch7 1 \; tone-ch8 1;
+#X msg 285 47 \; tone-ch1 0 \; tone-ch2 0 \; tone-ch3 0 \; tone-ch4
+0 \; tone-ch5 0 \; tone-ch6 0 \; tone-ch7 0 \; tone-ch8 0;
+#X connect 0 0 3 0;
+#X connect 1 0 4 0;
+#X connect 2 0 5 0;
#X restore 22 332 pd glue+loadbang;
#X obj 428 96 hip~ 5;
#X obj 436 173 outlet;
@@ -320,12 +320,12 @@ but is free for you to use for any reasonable purpose. See the file
#X obj 1029 355 *~;
#X obj 1019 385 +~;
#X obj 1027 68 r tone-hip;
-#X obj 918 278 r tone-ch5;
-#X obj 1038 277 r tone-ch6;
#X obj 899 43 adc~ 7;
#X obj 1019 42 adc~ 8;
#X obj 899 411 dac~ 7;
#X obj 1019 410 dac~ 8;
+#X obj 918 278 r tone-ch7;
+#X obj 1038 277 r tone-ch8;
#X connect 0 0 7 0;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
@@ -425,7 +425,7 @@ but is free for you to use for any reasonable purpose. See the file
#X connect 106 0 104 0;
#X connect 107 0 108 0;
#X connect 108 0 109 1;
-#X connect 109 0 127 0;
+#X connect 109 0 125 0;
#X connect 110 0 99 1;
#X connect 111 0 117 0;
#X connect 111 0 114 0;
@@ -437,12 +437,12 @@ but is free for you to use for any reasonable purpose. See the file
#X connect 118 0 116 0;
#X connect 119 0 120 0;
#X connect 120 0 121 1;
-#X connect 121 0 128 0;
+#X connect 121 0 126 0;
#X connect 122 0 111 1;
-#X connect 123 0 106 0;
-#X connect 124 0 118 0;
-#X connect 125 0 99 0;
-#X connect 126 0 111 0;
+#X connect 123 0 99 0;
+#X connect 124 0 111 0;
+#X connect 127 0 106 0;
+#X connect 128 0 118 0;
#X restore 139 159 pd -------audio-----------;
#X floatatom 335 186 3 0 0 0 - - -;
#X floatatom 368 186 3 0 0 0 - - -;
diff --git a/pd/doc/sound/voice2.wav b/pd/doc/sound/voice2.wav
index 9bd9d484..d5d944b1 100644
--- a/pd/doc/sound/voice2.wav
+++ b/pd/doc/sound/voice2.wav
Binary files differ
diff --git a/pd/extra/hilbert~.pd b/pd/extra/hilbert~.pd
index 5bc7a550..dfafc942 100644
--- a/pd/extra/hilbert~.pd
+++ b/pd/extra/hilbert~.pd
@@ -1,12 +1,15 @@
-#N canvas 451 128 556 360 12;
-#X obj 117 129 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1;
-#X obj 117 103 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1;
-#X obj 98 186 biquad~ -0.02569 0.260502 -0.260502 0.02569 1;
-#X obj 98 212 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1;
-#X obj 98 76 inlet~;
-#X obj 117 158 outlet~;
-#X obj 98 239 outlet~;
-#X text 105 273 This is a pair of all-pass filters whose outputs somehow manage to be about 90 degrees out of phase from each other. I don't know what phase relation they have with the original signal. I adapted this from a 4X patch by Emmanuel Favreau \, circa 1982;
+#N canvas 269 0 593 306 12;
+#X obj 113 68 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1;
+#X obj 113 42 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1;
+#X obj 94 125 biquad~ -0.02569 0.260502 -0.260502 0.02569 1;
+#X obj 94 151 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1;
+#X obj 94 15 inlet~;
+#X obj 113 97 outlet~;
+#X obj 94 178 outlet~;
+#X text 32 210 This is a pair of 4th-order all-pass filters whose outputs
+somehow manage to be about 90 degrees out of phase from each other.
+Both have different phases from the original. Adapted from a 4X patch
+by Emmanuel Favreau \, circa 1982;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
diff --git a/pd/portmidi_osx/README b/pd/portmidi_osx/README
index a5416b56..d8a47719 100644
--- a/pd/portmidi_osx/README
+++ b/pd/portmidi_osx/README
@@ -1,6 +1,6 @@
PortMidi for MacOS X / Darwin
Jon Parise <jparise@cmu.edu>
-$Date: 2004-11-28 21:20:42 $
+$Date: 2005-05-18 04:28:50 $
This is the MacOS X / Darwin port of the PortMidi library from the Carnegie
Mellon Computer Music Group. It is based on the Apple CoreAudio MIDI
diff --git a/pd/portmidi_osx/pmdarwin.c b/pd/portmidi_osx/pmdarwin.c
index d8d6df31..01863368 100644
--- a/pd/portmidi_osx/pmdarwin.c
+++ b/pd/portmidi_osx/pmdarwin.c
@@ -2,7 +2,7 @@
* PortMidi OS-dependent interface for Darwin (MacOS X)
* Jon Parise <jparise@cmu.edu>
*
- * $Id: pmdarwin.c,v 1.7 2004-11-28 21:20:42 millerpuckette Exp $
+ * $Id: pmdarwin.c,v 1.8 2005-05-18 04:28:50 millerpuckette Exp $
*
* CHANGE LOG:
* 03Jul03 - X. J. Scott (xjs):
diff --git a/pd/portmidi_osx/pmmacosx.c b/pd/portmidi_osx/pmmacosx.c
index 5acb2210..57e3ed7f 100644
--- a/pd/portmidi_osx/pmmacosx.c
+++ b/pd/portmidi_osx/pmmacosx.c
@@ -3,7 +3,7 @@
*
* Jon Parise <jparise@cmu.edu>
*
- * $Id: pmmacosx.c,v 1.7 2004-11-28 21:20:42 millerpuckette Exp $
+ * $Id: pmmacosx.c,v 1.8 2005-05-18 04:28:50 millerpuckette Exp $
*
* 27Jun02 XJS (X. J. Scott)
* - midi_length():
diff --git a/pd/portmidi_osx/ptdarwin.c b/pd/portmidi_osx/ptdarwin.c
index acb95dd7..be34eb6b 100644
--- a/pd/portmidi_osx/ptdarwin.c
+++ b/pd/portmidi_osx/ptdarwin.c
@@ -3,7 +3,7 @@
*
* Jon Parise <jparise@cmu.edu>
*
- * $Id: ptdarwin.c,v 1.7 2004-11-28 21:20:42 millerpuckette Exp $
+ * $Id: ptdarwin.c,v 1.8 2005-05-18 04:28:50 millerpuckette Exp $
*/
#include <stdio.h>
diff --git a/pd/src/CHANGELOG.txt b/pd/src/CHANGELOG.txt
index c8cc8f49..39eefbef 100644
--- a/pd/src/CHANGELOG.txt
+++ b/pd/src/CHANGELOG.txt
@@ -3,6 +3,29 @@ user appears in the "release notes" instead.
0.38.0
+finally figured out how to do "-enable-", etc., flags in the configure
+script correctly.
+
+The scheduler now has a hook (set_so you can add polling routines) :
+ sys_idlehook().
+
+I'm now uploading directly to CVS repository ("main" and "stable_0_38"
+branches.) There are still problems keeping CVS's and my versions of
+portaudio the same (CVS bashes the "ident" lines).
+
+t_int to int in binbuf_addv prototype
+
+64-bit fix to externs makefiles
+
+Pd now uses portaudio out-of-the-box; customized files are moved to
+"src" directory.
+
+All "tags" are printf'd as %lx to make 64-bit safe.
+
+GUI queueing mechanism added: sys_queuegui() etc.
+
+massive rewrite of array code to unify arrays and scalars.
+
fixed empty lists automatically to call "bang" method if one is supplied.
rewrote the "namelist" stuff to facilitate preference saving (s_stuff.h,
diff --git a/pd/src/configure.in b/pd/src/configure.in
index 0f9fa291..5428eafb 100644
--- a/pd/src/configure.in
+++ b/pd/src/configure.in
@@ -152,9 +152,11 @@ dnl This should be fixed so Pd can use ALSA shared libraries where appropriate.
dnl Checking for JACK
- AC_CHECK_LIB(rt,shm_open,LIBS="$LIBS -lrt")
- AC_CHECK_LIB(jack,jack_set_xrun_callback,LIBS="$LIBS -ljack";jack=xrun,jack=no)
- AC_CHECK_LIB(jack,jack_set_error_function,LIBS="$LIBS -ljack";jack=yes,jack=no)
+ if test x$jack == xyes; then
+ AC_CHECK_LIB(rt,shm_open,LIBS="$LIBS -lrt")
+ AC_CHECK_LIB(jack,jack_set_xrun_callback,LIBS="$LIBS -ljack";jack=xrun,jack=no)
+ AC_CHECK_LIB(jack,jack_set_error_function,LIBS="$LIBS -ljack";jack=yes,jack=no)
+ fi
LDFLAGS="-Wl,-export-dynamic"
if test "$static" = "yes"; then
diff --git a/pd/src/d_filter.c b/pd/src/d_filter.c
index 7a5649ee..39cc9f6f 100644
--- a/pd/src/d_filter.c
+++ b/pd/src/d_filter.c
@@ -549,10 +549,11 @@ t_class *sigrpole_class;
static void *sigrpole_new(t_float f)
{
t_sigrpole *x = (t_sigrpole *)pd_new(sigrpole_class);
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
+ pd_float(
+ (t_pd *)inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal),
+ f);
outlet_new(&x->x_obj, &s_signal);
x->x_last = 0;
- x->x_f = f;
return (x);
}
@@ -571,6 +572,8 @@ static t_int *sigrpole_perform(t_int *w)
float coef = *in2++;
*out++ = last = coef * last + next;
}
+ if (PD_BIGORSMALL(last))
+ last = 0;
x->x_last = last;
return (w+6);
}
@@ -619,10 +622,11 @@ t_class *sigrzero_class;
static void *sigrzero_new(t_float f)
{
t_sigrzero *x = (t_sigrzero *)pd_new(sigrzero_class);
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
+ pd_float(
+ (t_pd *)inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal),
+ f);
outlet_new(&x->x_obj, &s_signal);
x->x_last = 0;
- x->x_f = f;
return (x);
}
@@ -690,10 +694,11 @@ t_class *sigrzero_rev_class;
static void *sigrzero_rev_new(t_float f)
{
t_sigrzero_rev *x = (t_sigrzero_rev *)pd_new(sigrzero_rev_class);
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
+ pd_float(
+ (t_pd *)inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal),
+ f);
outlet_new(&x->x_obj, &s_signal);
x->x_last = 0;
- x->x_f = f;
return (x);
}
@@ -800,6 +805,10 @@ static t_int *sigcpole_perform(t_int *w)
lastim = *outim++ = nextim + lastre * coefim + lastim * coefre;
lastre = tempre;
}
+ if (PD_BIGORSMALL(lastre))
+ lastre = 0;
+ if (PD_BIGORSMALL(lastim))
+ lastim = 0;
x->x_lastre = lastre;
x->x_lastim = lastim;
return (w+9);
@@ -975,8 +984,10 @@ static t_int *sigczero_rev_perform(t_int *w)
float nextim = *inim1++;
float coefre = *inre2++;
float coefim = *inim2++;
- *outre++ = lastre - nextre * coefre + nextim * coefim;
- *outim++ = lastim - nextre * coefim - nextim * coefre;
+ /* transfer function is (A bar) - Z^-1, for the same
+ frequency response as 1 - AZ^-1 from czero_tilde. */
+ *outre++ = lastre - nextre * coefre - nextim * coefim;
+ *outim++ = lastim - nextre * coefim + nextim * coefre;
lastre = nextre;
lastim = nextim;
}
diff --git a/pd/src/d_mayer_fft.c b/pd/src/d_mayer_fft.c
index 0e2242b7..da77e048 100644
--- a/pd/src/d_mayer_fft.c
+++ b/pd/src/d_mayer_fft.c
@@ -54,6 +54,9 @@
#pragma warning( disable : 4101 ) /* unused local variables */
#endif
+/* the following is needed only to declare pd_fft() as exportable in MSW */
+#include "m_pd.h"
+
#define REAL float
#define GOOD_TRIG
diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c
index 72382de8..da83c2ab 100644
--- a/pd/src/g_all_guis.c
+++ b/pd/src/g_all_guis.c
@@ -402,6 +402,11 @@ void iemgui_label(void *x, t_iemgui *iemgui, t_symbol *s)
int pargc, tail_len, nth_arg;
t_atom *pargv;
+ /* tb: fix for empty label { */
+ if (s == gensym(""))
+ s = gensym("empty");
+ /* tb } */
+
lab = iemgui_raute2dollar(s);
iemgui->x_lab_unexpanded = lab;
iemgui->x_lab = lab = canvas_realizedollar(iemgui->x_glist, lab);
diff --git a/pd/src/g_array.c b/pd/src/g_array.c
index dd1e88f2..ce91eb6e 100644
--- a/pd/src/g_array.c
+++ b/pd/src/g_array.c
@@ -245,6 +245,12 @@ static t_array *garray_getarray_floatonly(t_garray *x,
return (a);
}
+ /* get the array's name */
+t_symbol *garray_getname(t_garray *x)
+{
+ return (x->x_name);
+}
+
/* if there is one garray in a graph, reset the graph's coordinates
to fit a new size and style for the garray */
static void garray_fittograph(t_garray *x, int n, int style)
@@ -553,6 +559,7 @@ void array_redraw(t_array *a, t_glist *glist)
void array_getcoordinate(t_glist *glist,
char *elem, int xonset, int yonset, int wonset, int indx,
float basex, float basey, float xinc,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
float *xp, float *yp, float *wp)
{
float xval, yval, ypix, wpix;
@@ -562,25 +569,29 @@ void array_getcoordinate(t_glist *glist,
if (yonset >= 0)
yval = *(float *)(elem + yonset);
else yval = 0;
- ypix = glist_ytopixels(glist, basey + yval);
+ ypix = glist_ytopixels(glist, basey +
+ fielddesc_cvttocoord(yfielddesc, yval));
if (wonset >= 0)
{
/* found "w" field which controls linewidth. */
float wval = *(float *)(elem + wonset);
- wpix = glist_ytopixels(glist, basey + yval + wval) - ypix;
+ wpix = glist_ytopixels(glist, basey +
+ fielddesc_cvttocoord(yfielddesc, yval) +
+ fielddesc_cvttocoord(wfielddesc, wval)) - ypix;
if (wpix < 0)
wpix = -wpix;
}
else wpix = 1;
- *xp = glist_xtopixels(glist, basex + xval);
+ *xp = glist_xtopixels(glist, basex +
+ fielddesc_cvttocoord(xfielddesc, xval));
*yp = ypix;
*wp = wpix;
}
static float array_motion_xcumulative;
static float array_motion_ycumulative;
-static t_symbol *array_motion_xfield;
-static t_symbol *array_motion_yfield;
+static t_fielddesc *array_motion_xfield;
+static t_fielddesc *array_motion_yfield;
static t_glist *array_motion_glist;
static t_scalar *array_motion_scalar;
static t_array *array_motion_array;
@@ -602,25 +613,23 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy)
{
array_motion_xcumulative += dx * array_motion_xperpix;
array_motion_ycumulative += dy * array_motion_yperpix;
- if (*array_motion_xfield->s_name)
+ if (array_motion_xfield)
{
/* it's an x, y plot; can drag many points at once */
int i;
- char *charword = (char *)array_motion_wp;
for (i = 0; i < array_motion_npoints; i++)
{
- t_word *thisword = (t_word *)(charword + i * array_motion_elemsize);
- if (*array_motion_xfield->s_name)
- {
- float xwas = template_getfloat(array_motion_template,
- array_motion_xfield, thisword, 1);
- template_setfloat(array_motion_template,
- array_motion_xfield, thisword, xwas + dx, 1);
- }
- if (*array_motion_yfield->s_name)
+ t_word *thisword = (t_word *)(((char *)array_motion_wp) +
+ i * array_motion_elemsize);
+ float xwas = fielddesc_getcoord(array_motion_xfield,
+ array_motion_template, thisword, 1);
+ float ywas = (array_motion_yfield ?
+ fielddesc_getcoord(array_motion_yfield,
+ array_motion_template, thisword, 1) : 0);
+ fielddesc_setcoord(array_motion_xfield,
+ array_motion_template, thisword, xwas + dx, 1);
+ if (array_motion_yfield)
{
- float ywas = template_getfloat(array_motion_template,
- array_motion_yfield, thisword, 1);
if (array_motion_fatten)
{
if (i == 0)
@@ -628,30 +637,30 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy)
float newy = ywas + dy * array_motion_yperpix;
if (newy < 0)
newy = 0;
- template_setfloat(array_motion_template,
- array_motion_yfield, thisword, newy, 1);
+ fielddesc_setcoord(array_motion_yfield,
+ array_motion_template, thisword, newy, 1);
}
}
else
{
- template_setfloat(array_motion_template,
- array_motion_yfield, thisword,
+ fielddesc_setcoord(array_motion_yfield,
+ array_motion_template, thisword,
ywas + dy * array_motion_yperpix, 1);
}
}
}
}
- else
+ else if (array_motion_yfield)
{
/* a y-only plot. */
- int thisx = array_motion_initx +
- array_motion_xcumulative, x2;
+ int thisx = array_motion_initx + array_motion_xcumulative, x2;
int increment, i, nchange;
- char *charword = (char *)array_motion_wp;
float newy = array_motion_ycumulative,
- oldy = template_getfloat(
- array_motion_template, array_motion_yfield,
- (t_word *)(charword + array_motion_elemsize * array_motion_lastx), 1);
+ oldy = fielddesc_getcoord(array_motion_yfield,
+ array_motion_template,
+ (t_word *)(((char *)array_motion_wp) +
+ array_motion_elemsize * array_motion_lastx),
+ 1);
float ydiff = newy - oldy;
if (thisx < 0) thisx = 0;
else if (thisx >= array_motion_npoints)
@@ -661,10 +670,10 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy)
for (i = 0, x2 = thisx; i < nchange; i++, x2 += increment)
{
- template_setfloat(array_motion_template,
- array_motion_yfield,
- (t_word *)(charword + array_motion_elemsize * x2),
- newy, 1);
+ fielddesc_setcoord(array_motion_yfield,
+ array_motion_template,
+ (t_word *)(((char *)array_motion_wp) +
+ array_motion_elemsize * x2), newy, 1);
if (nchange > 1)
newy -= ydiff * (1./(nchange - 1));
}
@@ -688,6 +697,7 @@ static int array_doclick_element(t_array *array, t_glist *glist,
t_scalar *sc, t_array *ap,
t_symbol *elemtemplatesym,
float linewidth, float xloc, float xinc, float yloc,
+ t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
t_canvas *elemtemplatecanvas;
@@ -697,8 +707,9 @@ static int array_doclick_element(t_array *array, t_glist *glist,
if (elemtemplatesym == &s_float)
return (0);
if (array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
- return (0);
+ &elemtemplate, &elemsize, xfield, yfield, wfield,
+ &xonset, &yonset, &wonset))
+ return (0);
/* if it has more than 2000 points, just check 300 of them. */
if (array->a_n < 2000)
incr = 1;
@@ -714,10 +725,12 @@ static int array_doclick_element(t_array *array, t_glist *glist,
return (0);
}
- /* LATER move this and others back into plot parentwidget code. */
+ /* LATER move this and others back into plot parentwidget code, so
+ they can be static (look in g_canvas.h for candidates). */
int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
t_symbol *elemtemplatesym,
float linewidth, float xloc, float xinc, float yloc,
+ t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
t_canvas *elemtemplatecanvas;
@@ -725,7 +738,8 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
int elemsize, yonset, wonset, xonset, i;
if (!array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize, xfield, yfield, wfield,
+ &xonset, &yonset, &wonset))
{
float best = 100;
int incr;
@@ -738,7 +752,7 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
float pxpix, pypix, pwpix, dx, dy;
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, xloc, yloc, xinc,
- &pxpix, &pypix, &pwpix);
+ xfield, yfield, wfield, &pxpix, &pypix, &pwpix);
if (pwpix < 4)
pwpix = 4;
dx = pxpix - xpix;
@@ -763,15 +777,16 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
}
if (best > 8)
return (array_doclick_element(array, glist, sc, ap,
- elemtemplatesym, linewidth,
- xloc, xinc, yloc, xpix, ypix, shift, alt, dbl, doit));
+ elemtemplatesym, linewidth, xloc, xinc, yloc,
+ xfield, yfield, wfield,
+ xpix, ypix, shift, alt, dbl, doit));
best += 0.001; /* add truncation error margin */
for (i = 0; i < array->a_n; i += incr)
{
float pxpix, pypix, pwpix, dx, dy, dy2, dy3;
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, xloc, yloc, xinc,
- &pxpix, &pypix, &pwpix);
+ xfield, yfield, wfield, &pxpix, &pypix, &pwpix);
if (pwpix < 4)
pwpix = 4;
dx = pxpix - xpix;
@@ -827,15 +842,16 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
}
if (xonset >= 0)
{
- array_motion_xfield = gensym("x");
+ array_motion_xfield = xfield;
array_motion_xcumulative =
- *(float *)((elem + elemsize * i) + xonset);
+ fielddesc_getcoord(xfield, array_motion_template,
+ (t_word *)(elem + i * elemsize), 1);
array_motion_wp = (t_word *)(elem + i * elemsize);
array_motion_npoints = array->a_n - i;
}
else
{
- array_motion_xfield = &s_;
+ array_motion_xfield = 0;
array_motion_xcumulative = 0;
array_motion_wp = (t_word *)elem;
array_motion_npoints = array->a_n;
@@ -846,20 +862,23 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
}
if (array_motion_fatten)
{
- array_motion_yfield = gensym("w");
+ array_motion_yfield = wfield;
array_motion_ycumulative =
- *(float *)((elem + elemsize * i) + wonset);
- array_motion_yperpix *= array_motion_fatten;
+ fielddesc_getcoord(wfield, array_motion_template,
+ (t_word *)(elem + i * elemsize), 1);
+ array_motion_yperpix *= -array_motion_fatten;
}
else if (yonset >= 0)
{
- array_motion_yfield = gensym("y");
+ array_motion_yfield = yfield;
array_motion_ycumulative =
- *(float *)((elem + elemsize * i) + yonset);
+ fielddesc_getcoord(yfield, array_motion_template,
+ (t_word *)(elem + i * elemsize), 1);
+ /* *(float *)((elem + elemsize * i) + yonset); */
}
else
{
- array_motion_yfield = &s_;
+ array_motion_yfield = 0;
array_motion_ycumulative = 0;
}
glist_grab(glist, 0, array_motion, 0, xpix, ypix);
@@ -887,7 +906,7 @@ static void array_getrect(t_array *array, t_glist *glist,
int elemsize, yonset, wonset, xonset, i;
if (!array_getfields(array->a_templatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize, 0, 0, 0, &xonset, &yonset, &wonset))
{
int incr;
/* if it has more than 2000 points, just check 300 of them. */
@@ -900,6 +919,7 @@ static void array_getrect(t_array *array, t_glist *glist,
array_getcoordinate(glist, (char *)(array->a_vec) +
i * elemsize,
xonset, yonset, wonset, i, 0, 0, 1,
+ 0, 0, 0,
&pxpix, &pypix, &pwpix);
if (pwpix < 2)
pwpix = 2;
@@ -1267,7 +1287,7 @@ static void garray_list(t_garray *x, t_symbol *s, int argc, t_atom *argv)
if (argc <= 0) return;
}
for (i = 0; i < argc; i++)
- *((float *)(array->a_vec + elemsize * i) + yonset)
+ *((float *)(array->a_vec + elemsize * (i + firstindex)) + yonset)
= atom_getfloat(argv + i);
}
garray_redraw(x);
@@ -1403,6 +1423,8 @@ void garray_resize(t_garray *x, t_floatarg f)
template_findbyname(x->x_scalar->sc_template),
gensym("style"), x->x_scalar->sc_vec, 1));
array_resize_and_redraw(array, x->x_glist, n);
+ if (x->x_usedindsp)
+ canvas_update_dsp();
}
static void garray_print(t_garray *x)
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index c34e1502..2607c1b2 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -519,7 +519,7 @@ int glist_isgraph(t_glist *x)
static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2)
{
int heightwas = y2 - y1;
- int heightchange = y2 - y1 - (x->gl_screeny2 - x->gl_screeny1);
+ int heightchange = y2 - y1 - (x->gl_screeny2 - x->gl_screeny1);
if (x->gl_screenx1 == x1 && x->gl_screeny1 == y1 &&
x->gl_screenx2 == x2 && x->gl_screeny2 == y2)
return;
@@ -527,7 +527,6 @@ static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2)
x->gl_screeny1 = y1;
x->gl_screenx2 = x2;
x->gl_screeny2 = y2;
- /* post("set bounds %d %d %d %d", x1, y1, x2, y2); */
if (!glist_isgraph(x) && (x->gl_y2 < x->gl_y1))
{
/* if it's flipped so that y grows upward,
@@ -753,6 +752,7 @@ void canvas_vis(t_canvas *x, t_floatarg f)
canvas_create_editor(x, 0);
return;
}
+ sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
glist_noselect(x);
if (glist_isvisible(x))
canvas_map(x, 0);
@@ -1326,8 +1326,8 @@ void glist_redrawitem(t_glist *owner, t_gobj *gobj)
/* redraw all "scalars" (do this if a drawing command is changed.)
LATER we'll use the "template" information to select which ones we
- redraw. */
-static void glist_redrawall(t_glist *gl)
+ redraw. Action = 0 for redraw, 1 for draw only, 2 for erase. */
+static void glist_redrawall(t_glist *gl, int action)
{
t_gobj *g;
int vis = glist_isvisible(gl);
@@ -1335,19 +1335,55 @@ static void glist_redrawall(t_glist *gl)
{
t_class *cl;
if (vis && g->g_pd == scalar_class)
- glist_redrawitem(gl, g);
+ {
+ if (action == 1)
+ {
+ if (glist_isvisible(gl))
+ gobj_vis(g, gl, 1);
+ }
+ else if (action == 2)
+ {
+ if (glist_isvisible(gl))
+ gobj_vis(g, gl, 0);
+ }
+ else glist_redrawitem(gl, g);
+ }
else if (g->g_pd == canvas_class)
- glist_redrawall((t_glist *)g);
+ glist_redrawall((t_glist *)g, action);
}
}
- /* public interface for above */
-void canvas_redrawallfortemplate( t_template *template)
+ /* public interface for above. */
+void canvas_redrawallfortemplate(t_template *template, int action)
{
t_canvas *x;
/* find all root canvases */
for (x = canvas_list; x; x = x->gl_next)
- glist_redrawall(x);
+ glist_redrawall(x, action);
+}
+
+ /* find the template defined by a canvas, and redraw all elements
+ for that */
+void canvas_redrawallfortemplatecanvas(t_canvas *x, int action)
+{
+ t_gobj *g;
+ t_template *tmpl;
+ t_symbol *s1 = gensym("struct");
+ for (g = x->gl_list; g; g = g->g_next)
+ {
+ t_object *ob = pd_checkobject(&g->g_pd);
+ t_atom *argv;
+ if (!ob || ob->te_type != T_OBJECT ||
+ binbuf_getnatom(ob->te_binbuf) < 2)
+ continue;
+ argv = binbuf_getvec(ob->te_binbuf);
+ if (argv[0].a_type != A_SYMBOL || argv[1].a_type != A_SYMBOL
+ || argv[0].a_w.w_symbol != s1)
+ continue;
+ tmpl = template_findbyname(argv[1].a_w.w_symbol);
+ canvas_redrawallfortemplate(tmpl, action);
+ }
+ canvas_redrawallfortemplate(0, action);
}
/* ------------------------------- setup routine ------------------------ */
diff --git a/pd/src/g_canvas.h b/pd/src/g_canvas.h
index cdd0b242..6d4527b0 100644
--- a/pd/src/g_canvas.h
+++ b/pd/src/g_canvas.h
@@ -73,6 +73,9 @@ EXTERN_STRUCT _tscalar;
EXTERN_STRUCT _canvasenvironment;
#define t_canvasenvironment struct _canvasenvironment
+EXTERN_STRUCT _fielddesc;
+#define t_fielddesc struct _fielddesc
+
typedef struct _selection
{
t_gobj *sel_what;
@@ -453,7 +456,8 @@ EXTERN t_inlet *canvas_addinlet(t_canvas *x, t_pd *who, t_symbol *sym);
EXTERN void canvas_rminlet(t_canvas *x, t_inlet *ip);
EXTERN t_outlet *canvas_addoutlet(t_canvas *x, t_pd *who, t_symbol *sym);
EXTERN void canvas_rmoutlet(t_canvas *x, t_outlet *op);
-EXTERN void canvas_redrawallfortemplate( t_template *tmpl);
+EXTERN void canvas_redrawallfortemplate(t_template *tmpl, int action);
+EXTERN void canvas_redrawallfortemplatecanvas(t_canvas *x, int action);
EXTERN void canvas_zapallfortemplate(t_canvas *tmpl);
EXTERN void canvas_setusedastemplate(t_canvas *x);
EXTERN t_canvas *canvas_getcurrent(void);
@@ -553,16 +557,19 @@ EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey);
EXTERN int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
t_symbol *elemtemplatesym,
float linewidth, float xloc, float xinc, float yloc,
+ t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
int xpix, int ypix, int shift, int alt, int dbl, int doit);
EXTERN void array_getcoordinate(t_glist *glist,
char *elem, int xonset, int yonset, int wonset, int indx,
float basex, float basey, float xinc,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
float *xp, float *yp, float *wp);
EXTERN int array_getfields(t_symbol *elemtemplatesym,
t_canvas **elemtemplatecanvasp,
t_template **elemtemplatep, int *elemsizep,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
int *xonsetp, int *yonsetp, int *wonsetp);
/* --------------------- templates ------------------------- */
@@ -583,6 +590,8 @@ EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
EXTERN t_template *gtemplate_get(t_gtemplate *x);
EXTERN t_template *template_findbyname(t_symbol *s);
EXTERN t_canvas *template_findcanvas(t_template *tmpl);
+EXTERN void template_notify(t_template *template,
+ t_symbol *s, int argc, t_atom *argv);
EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname,
t_word *wp, int loud);
@@ -592,6 +601,13 @@ EXTERN t_symbol *template_getsymbol(t_template *x, t_symbol *fieldname,
t_word *wp, int loud);
EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
t_word *wp, t_symbol *s, int loud);
+EXTERN t_float fielddesc_getcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, int loud);
+EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, float pix, int loud);
+EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val);
+EXTERN float fielddesc_cvtfromcoord(t_fielddesc *f, float coord);
+
/* ----------------------- guiconnects, g_guiconnect.c --------- */
EXTERN t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym);
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 02fe7726..82e43acc 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -1911,6 +1911,7 @@ static void canvas_cut(t_canvas *x)
canvas_undo_set_cut(x, UCUT_CUT), "cut");
canvas_copy(x);
canvas_doclear(x);
+ sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
}
}
@@ -1949,6 +1950,7 @@ static void canvas_dopaste(t_canvas *x, t_binbuf *b)
paste_canvas = 0;
canvas_resume_dsp(dspstate);
canvas_dirty(x, 1);
+ sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
glist_donewloadbangs(x);
}
diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c
index 1c9afc30..3b26d477 100644
--- a/pd/src/g_graph.c
+++ b/pd/src/g_graph.c
@@ -10,6 +10,7 @@ to this file... */
#include "m_pd.h"
#include "t_tk.h"
#include "g_canvas.h"
+#include "s_stuff.h" /* for sys_hostfontsize */
#include <stdio.h>
#include <string.h>
@@ -40,7 +41,7 @@ void glist_add(t_glist *x, t_gobj *y)
gobj_vis(y, x, 1);
if (class_isdrawcommand(y->g_pd))
canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
- glist_getcanvas(x)->gl_name)));
+ glist_getcanvas(x)->gl_name)), 0);
}
/* this is to protect against a hairy problem in which deleting
@@ -91,6 +92,11 @@ void glist_delete(t_glist *x, t_gobj *y)
}
}
}
+ /* if we're a drawing command, erase all scalars now, before deleting
+ it; we'll redraw them once it's deleted below. */
+ if (drawcommand)
+ canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
+ glist_getcanvas(x)->gl_name)), 2);
gobj_delete(y, x);
if (glist_isvisible(canvas))
gobj_vis(y, x, 0);
@@ -107,7 +113,7 @@ void glist_delete(t_glist *x, t_gobj *y)
if (chkdsp) canvas_update_dsp();
if (drawcommand)
canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
- glist_getcanvas(x)->gl_name)));
+ glist_getcanvas(x)->gl_name)), 1);
canvas_setdeleting(canvas, wasdeleting);
x->gl_valid = ++glist_valid;
}
@@ -644,6 +650,8 @@ void glist_redraw(t_glist *x)
/* --------------------------- widget behavior ------------------- */
extern t_widgetbehavior text_widgetbehavior;
+t_symbol *garray_getname(t_garray *x);
+
/* Note that some code in here would also be useful for drawing
graph decorations in toplevels... */
@@ -694,13 +702,26 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
{
int i;
float f;
-
+ t_gobj *g;
+ t_symbol *arrayname;
/* draw a rectangle around the graph */
sys_vgui(".x%lx.c create line\
%d %d %d %d %d %d %d %d %d %d -tags %s\n",
glist_getcanvas(x->gl_owner),
x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
-
+
+ /* if there's just one "garray" in the graph, write its name
+ along the top */
+ if ((g = x->gl_list) && !g->g_next && (g->g_pd == garray_class))
+ {
+ int ymin = (y1 < y2 ? y1 : y2);
+ t_symbol *s = garray_getname((t_garray *)g);
+ sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor sw\
+ -font -*-courier-bold--normal--%d-* -tags %s\n",
+ (long)glist_getcanvas(x), x1, ymin, s->s_name,
+ sys_hostfontsize(glist_getfont(x)), tag);
+ }
+
/* draw ticks on horizontal borders. If lperb field is
zero, this is disabled. */
if (x->gl_xtick.k_lperb)
diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c
index 3a61a39d..d091108c 100644
--- a/pd/src/g_scalar.c
+++ b/pd/src/g_scalar.c
@@ -156,7 +156,6 @@ static void scalar_getrect(t_gobj *z, t_glist *owner,
int *xp1, int *yp1, int *xp2, int *yp2)
{
t_scalar *x = (t_scalar *)z;
- int hit = 0;
t_template *template = template_findbyname(x->sc_template);
t_canvas *templatecanvas = template_findcanvas(template);
int x1 = 0x7fffffff, x2 = -0x7fffffff, y1 = 0x7fffffff, y2 = -0x7fffffff;
@@ -171,7 +170,6 @@ static void scalar_getrect(t_gobj *z, t_glist *owner,
}
else
{
- int hit = 0;
x1 = y1 = 0x7fffffff;
x2 = y2 = -0x7fffffff;
for (y = templatecanvas->gl_list; y; y = y->g_next)
@@ -182,16 +180,13 @@ static void scalar_getrect(t_gobj *z, t_glist *owner,
(*wb->w_parentgetrectfn)(y, owner,
x->sc_vec, template, basex, basey,
&nx1, &ny1, &nx2, &ny2);
- if (hit)
- {
- if (nx1 < x1) x1 = nx1;
- if (ny1 < y1) y1 = ny1;
- if (nx2 > x2) x2 = nx2;
- if (ny2 > y2) y2 = ny2;
- }
- else x1 = nx1, y1 = ny1, x2 = nx2, y2 = ny2, hit = 1;
+ if (nx1 < x1) x1 = nx1;
+ if (ny1 < y1) y1 = ny1;
+ if (nx2 > x2) x2 = nx2;
+ if (ny2 > y2) y2 = ny2;
}
- if (!hit) x1 = y1 = x2 = y2 = 0;
+ if (x2 < x1 || y2 < y1)
+ x1 = y1 = x2 = y2 = 0;
}
/* post("scalar x1 %d y1 %d x2 %d y2 %d", x1, y1, x2, y2); */
*xp1 = x1;
@@ -208,6 +203,17 @@ static void scalar_select(t_gobj *z, t_glist *owner, int state)
if (state)
{
int x1, y1, x2, y2;
+ t_symbol *templatesym = x->sc_template;
+ t_template *tmpl;
+ t_atom at;
+ t_gpointer gp;
+ gpointer_init(&gp);
+ gpointer_setglist(&gp, owner, x);
+ SETPOINTER(&at, &gp);
+ if (tmpl = template_findbyname(templatesym))
+ template_notify(tmpl, gensym("select"), 1, &at);
+ gpointer_unset(&gp);
+
scalar_getrect(z, owner, &x1, &y1, &x2, &y2);
x1--; x2++; y1--; y2++;
sys_vgui(".x%lx.c create line %d %d %d %d %d %d %d %d %d %d \
diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index 74926ecb..3654b678 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -336,7 +336,7 @@ static void template_conformarray(t_template *tfrom, t_template *tto,
int *conformaction, t_array *a)
{
int i, j;
- t_template *scalartemplate;
+ t_template *scalartemplate = 0;
if (a->a_templatesym == tfrom->t_sym)
{
/* the array elements must all be conformed */
@@ -358,6 +358,7 @@ static void template_conformarray(t_template *tfrom, t_template *tto,
a->a_vec = newarray;
freebytes(oldarray, oldelemsize * a->a_n);
}
+ else scalartemplate = template_findbyname(a->a_templatesym);
/* convert all arrays and sublist fields in each element of the array */
for (i = 0; i < a->a_n; i++)
{
@@ -448,16 +449,15 @@ void template_conform(t_template *tfrom, t_template *tto)
if (doit)
{
t_glist *gl;
- /* post("conforming template '%s' to new structure",
+ post("conforming template '%s' to new structure",
tfrom->t_sym->s_name);
for (i = 0; i < nto; i++)
- post("... %d", conformaction[i]); */
+ post("... %d", conformaction[i]);
for (gl = canvas_list; gl; gl = gl->gl_next)
template_conformglist(tfrom, tto, gl, conformaction);
}
freebytes(conformaction, sizeof(int) * nto);
freebytes(conformedfrom, sizeof(int) * nfrom);
- canvas_redrawallfortemplate(tto);
}
t_template *template_findbyname(t_symbol *s)
@@ -476,6 +476,12 @@ t_canvas *template_findcanvas(t_template *template)
/* return ((t_canvas *)pd_findbyclass(template->t_sym, canvas_class)); */
}
+void template_notify(t_template *template, t_symbol *s, int argc, t_atom *argv)
+{
+ if (template->t_list)
+ outlet_anything(template->t_list->x_obj.ob_outlet, s, argc, argv);
+}
+
/* call this when reading a patch from a file to declare what templates
we'll need. If there's already a template, check if it matches.
If it doesn't it's still OK as long as there are no "struct" (gtemplate)
@@ -581,6 +587,7 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv)
/* if there's none, we just replace the template with
our own and conform it. */
t_template *y = template_new(&s_, argc, argv);
+ canvas_redrawallfortemplate(t, 2);
/* Unless the new template is different from the old one,
there's nothing to do. */
if (!template_match(t, y))
@@ -592,6 +599,7 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv)
}
pd_free(&y->t_pdobj);
t->t_list = x;
+ canvas_redrawallfortemplate(t, 1);
}
}
else
@@ -600,12 +608,12 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv)
x->x_template = t = template_new(sym, argc, argv);
t->t_list = x;
}
+ outlet_new(&x->x_obj, 0);
return (x);
}
static void *gtemplate_new(t_symbol *s, int argc, t_atom *argv)
{
- t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class);
t_symbol *sym = atom_getsymbolarg(0, argc, argv);
if (argc >= 1)
argc--; argv++;
@@ -615,7 +623,6 @@ static void *gtemplate_new(t_symbol *s, int argc, t_atom *argv)
/* old version (0.34) -- delete 2003 or so */
static void *gtemplate_new_old(t_symbol *s, int argc, t_atom *argv)
{
- t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class);
t_symbol *sym = canvas_makebindsym(canvas_getcurrent()->gl_name);
static int warned;
if (!warned)
@@ -638,6 +645,7 @@ static void gtemplate_free(t_gtemplate *x)
t_template *t = x->x_template;
if (x == t->t_list)
{
+ canvas_redrawallfortemplate(t, 2);
if (x->x_next)
{
/* if we were first on the list, and there are others on
@@ -651,6 +659,7 @@ static void gtemplate_free(t_gtemplate *x)
z->t_list = x->x_next;
}
else t->t_list = 0;
+ canvas_redrawallfortemplate(t, 1);
}
else
{
@@ -684,7 +693,7 @@ want to cache the offset of the field so we don't have to search for it
every single time we draw the object.
*/
-typedef struct _fielddesc
+struct _fielddesc
{
char fd_type; /* LATER consider removing this? */
char fd_var;
@@ -694,14 +703,76 @@ typedef struct _fielddesc
t_symbol *fd_symbol; /* the field is a constant symbol */
t_symbol *fd_varsym; /* the field is variable and this is the name */
} fd_un;
-} t_fielddesc;
+ float fd_v1; /* min and max values */
+ float fd_v2;
+ float fd_screen1; /* min and max screen values */
+ float fd_screen2;
+ float fd_quantum; /* quantization in value */
+};
+
+static void fielddesc_setfloat_const(t_fielddesc *fd, float f)
+{
+ fd->fd_type = A_FLOAT;
+ fd->fd_var = 0;
+ fd->fd_un.fd_float = f;
+ fd->fd_v1 = fd->fd_v2 = fd->fd_screen1 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+}
+
+static void fielddesc_setsymbol_const(t_fielddesc *fd, t_symbol *s)
+{
+ fd->fd_type = A_SYMBOL;
+ fd->fd_var = 0;
+ fd->fd_un.fd_symbol = s;
+ fd->fd_v1 = fd->fd_v2 = fd->fd_screen1 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+}
-#define FIELDDESC_SETFLOAT(x, f) \
- ((x)->fd_type = A_FLOAT, (x)->fd_var = 0, (x)->fd_un.fd_float = (f))
-#define FIELDDESC_SETSYMBOL(x, s) \
- ((x)->fd_type = A_SYMBOL, (x)->fd_var = 0, (x)->fd_un.fd_symbol = (s))
-#define FIELDDESC_SETVAR(x, s, type) \
- ((x)->fd_type = type, (x)->fd_var = 1, (x)->fd_un.fd_varsym = (s))
+static void fielddesc_setfloat_var(t_fielddesc *fd, t_symbol *s)
+{
+ char *s1, *s2, *s3, strbuf[MAXPDSTRING];
+ int i;
+ fd->fd_type = A_FLOAT;
+ fd->fd_var = 1;
+ if (!(s1 = strchr(s->s_name, '(')) || !(s2 = strchr(s->s_name, ')'))
+ || (s1 > s2))
+ {
+ fd->fd_un.fd_varsym = s;
+ fd->fd_v1 = fd->fd_v2 = fd->fd_screen1 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+ }
+ else
+ {
+ int cpy = s1 - s->s_name, got;
+ if (cpy > MAXPDSTRING-5)
+ cpy = MAXPDSTRING-5;
+ strncpy(strbuf, s->s_name, cpy);
+ strbuf[cpy] = 0;
+ fd->fd_un.fd_varsym = gensym(strbuf);
+ got = sscanf(s1, "(%f:%f)(%f:%f)(%f)",
+ &fd->fd_v1, &fd->fd_v2, &fd->fd_screen1, &fd->fd_screen2,
+ &fd->fd_quantum);
+ if (got < 2)
+ goto fail;
+ if (got == 3 || (got < 4 && strchr(s2, '(')))
+ goto fail;
+ if (got < 5 && (s3 = strchr(s2, '(')) && strchr(s3+1, '('))
+ goto fail;
+ if (got == 4)
+ fd->fd_quantum = 0;
+ else if (got == 2)
+ {
+ fd->fd_quantum = 0;
+ fd->fd_screen1 = fd->fd_v1;
+ fd->fd_screen2 = fd->fd_v2;
+ }
+ return;
+ fail:
+ post("parse error: %s", s->s_name);
+ fd->fd_v1 = fd->fd_screen1 = fd->fd_v2 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+ }
+}
#define CLOSED 1
#define BEZ 2
@@ -709,20 +780,26 @@ typedef struct _fielddesc
static void fielddesc_setfloatarg(t_fielddesc *fd, int argc, t_atom *argv)
{
- if (argc <= 0) FIELDDESC_SETFLOAT(fd, 0);
+ if (argc <= 0) fielddesc_setfloat_const(fd, 0);
else if (argv->a_type == A_SYMBOL)
- FIELDDESC_SETVAR(fd, argv->a_w.w_symbol, A_FLOAT);
- else FIELDDESC_SETFLOAT(fd, argv->a_w.w_float);
+ fielddesc_setfloat_var(fd, argv->a_w.w_symbol);
+ else fielddesc_setfloat_const(fd, argv->a_w.w_float);
}
static void fielddesc_setarrayarg(t_fielddesc *fd, int argc, t_atom *argv)
{
- if (argc <= 0) FIELDDESC_SETFLOAT(fd, 0);
+ if (argc <= 0) fielddesc_setfloat_const(fd, 0);
else if (argv->a_type == A_SYMBOL)
- FIELDDESC_SETVAR(fd, argv->a_w.w_symbol, A_ARRAY);
- else FIELDDESC_SETFLOAT(fd, argv->a_w.w_float);
+ {
+ fd->fd_type = A_ARRAY;
+ fd->fd_var = 1;
+ fd->fd_un.fd_varsym = argv->a_w.w_symbol;
+ }
+ else fielddesc_setfloat_const(fd, argv->a_w.w_float);
}
+ /* getting and setting values via fielddescs -- note confusing names;
+ the above are setting up the fielddesc itself. */
static t_float fielddesc_getfloat(t_fielddesc *f, t_template *template,
t_word *wp, int loud)
{
@@ -740,6 +817,47 @@ static t_float fielddesc_getfloat(t_fielddesc *f, t_template *template,
}
}
+ /* convert a variable's value to a screen coordinate via its fielddesc */
+t_float fielddesc_cvttocoord(t_fielddesc *f, float val)
+{
+ float coord, pix, extreme, div;
+ if (f->fd_v2 == f->fd_v1)
+ return (val);
+ div = (f->fd_screen2 - f->fd_screen1)/(f->fd_v2 - f->fd_v1);
+ coord = f->fd_screen1 + (val - f->fd_v1) * div;
+ extreme = (f->fd_screen1 < f->fd_screen2 ?
+ f->fd_screen1 : f->fd_screen2);
+ if (coord < extreme)
+ coord = extreme;
+ extreme = (f->fd_screen1 > f->fd_screen2 ?
+ f->fd_screen1 : f->fd_screen2);
+ if (coord > extreme)
+ coord = extreme;
+ return (coord);
+}
+
+ /* read a variable via fielddesc and convert to screen coordinate */
+t_float fielddesc_getcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, int loud)
+{
+ if (f->fd_type == A_FLOAT)
+ {
+ if (f->fd_var)
+ {
+ float val = template_getfloat(template,
+ f->fd_un.fd_varsym, wp, loud);
+ return (fielddesc_cvttocoord(f, val));
+ }
+ else return (f->fd_un.fd_float);
+ }
+ else
+ {
+ if (loud)
+ error("symbolic data field used as number");
+ return (0);
+ }
+}
+
static t_symbol *fielddesc_getsymbol(t_fielddesc *f, t_template *template,
t_word *wp, int loud)
{
@@ -757,6 +875,45 @@ static t_symbol *fielddesc_getsymbol(t_fielddesc *f, t_template *template,
}
}
+ /* convert from a screen coordinate to a variable value */
+float fielddesc_cvtfromcoord(t_fielddesc *f, float coord)
+{
+ float val;
+ if (f->fd_screen2 == f->fd_screen1)
+ val = coord;
+ else
+ {
+ float div = (f->fd_v2 - f->fd_v1)/(f->fd_screen2 - f->fd_screen1);
+ float extreme;
+ val = f->fd_v1 + (coord - f->fd_screen1) * div;
+ if (f->fd_quantum != 0)
+ val = ((int)((val/f->fd_quantum) + 0.5)) * f->fd_quantum;
+ extreme = (f->fd_v1 < f->fd_v2 ?
+ f->fd_v1 : f->fd_v2);
+ if (val < extreme) val = extreme;
+ extreme = (f->fd_v1 > f->fd_v2 ?
+ f->fd_v1 : f->fd_v2);
+ if (val > extreme) val = extreme;
+ }
+ return (val);
+ }
+
+void fielddesc_setcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, float coord, int loud)
+{
+ if (f->fd_type == A_FLOAT && f->fd_var)
+ {
+ float val = fielddesc_cvtfromcoord(f, coord);
+ template_setfloat(template,
+ f->fd_un.fd_varsym, wp, val, loud);
+ }
+ else
+ {
+ if (loud)
+ error("attempt to set constant or symbolic data field to a number");
+ }
+}
+
/* ---------------- curves and polygons (joined segments) ---------------- */
/*
@@ -790,22 +947,22 @@ static void *curve_new(t_symbol *classsym, t_int argc, t_atom *argv)
classname += 6;
flags |= CLOSED;
if (argc) fielddesc_setfloatarg(&x->x_fillcolor, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_outlinecolor, 0);
+ else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
}
else classname += 4;
if (classname[0] == 'c') flags |= BEZ;
x->x_flags = flags;
if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_outlinecolor, 0);
+ else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_width, 1);
+ else fielddesc_setfloat_const(&x->x_width, 1);
if (argc < 0) argc = 0;
nxy = (argc + (argc & 1));
x->x_npoints = (nxy>>1);
x->x_vec = (t_fielddesc *)t_getbytes(nxy * sizeof(t_fielddesc));
for (i = 0, fd = x->x_vec; i < argc; i++, fd++, argv++)
fielddesc_setfloatarg(fd, 1, argv);
- if (argc & 1) FIELDDESC_SETFLOAT(fd, 0);
+ if (argc & 1) fielddesc_setfloat_const(fd, 0);
return (x);
}
@@ -823,9 +980,9 @@ static void curve_getrect(t_gobj *z, t_glist *glist,
for (i = 0, f = x->x_vec; i < n; i++, f += 2)
{
int xloc = glist_xtopixels(glist,
- basex + fielddesc_getfloat(f, template, data, 0));
+ basex + fielddesc_getcoord(f, template, data, 0));
int yloc = glist_ytopixels(glist,
- basey + fielddesc_getfloat(f+1, template, data, 0));
+ basey + fielddesc_getcoord(f+1, template, data, 0));
if (xloc < x1) x1 = xloc;
if (xloc > x2) x2 = xloc;
if (yloc < y1) y1 = yloc;
@@ -892,6 +1049,20 @@ static void curve_vis(t_gobj *z, t_glist *glist,
int flags = x->x_flags, closed = (flags & CLOSED);
float width = fielddesc_getfloat(&x->x_width, template, data, 1);
char outline[20], fill[20];
+ int pix[200];
+ if (n > 100)
+ n = 100;
+ /* calculate the pixel values before we start printing
+ out the TK message so that "error" printout won't be
+ interspersed with it. Only show up to 100 points so we don't
+ have to allocate memory here. */
+ for (i = 0, f = x->x_vec; i < n; i++, f += 2)
+ {
+ pix[2*i] = glist_xtopixels(glist,
+ basex + fielddesc_getcoord(f, template, data, 1));
+ pix[2*i+1] = glist_ytopixels(glist,
+ basey + fielddesc_getcoord(f+1, template, data, 1));
+ }
if (width < 1) width = 1;
numbertocolor(
fielddesc_getfloat(&x->x_outlinecolor, template, data, 1),
@@ -904,18 +1075,10 @@ static void curve_vis(t_gobj *z, t_glist *glist,
sys_vgui(".x%lx.c create polygon\\\n",
glist_getcanvas(glist));
}
- else sys_vgui(".x%lx.c create line\\\n",
- glist_getcanvas(glist));
- for (i = 0, f = x->x_vec; i < n; i++, f += 2)
- {
- float xloc = glist_xtopixels(glist,
- basex + fielddesc_getfloat(f, template, data, 1));
- float yloc = glist_ytopixels(glist,
- basey + fielddesc_getfloat(f+1, template, data, 1));
- sys_vgui("%d %d\\\n", (int)xloc, (int)yloc);
- }
- sys_vgui("-width %f\\\n",
- fielddesc_getfloat(&x->x_width, template, data, 1));
+ else sys_vgui(".x%lx.c create line\\\n", glist_getcanvas(glist));
+ for (i = 0; i < n; i++)
+ sys_vgui("%d %d\\\n", pix[2*i], pix[2*i+1]);
+ sys_vgui("-width %f\\\n", width);
if (flags & CLOSED) sys_vgui("-fill %s -outline %s\\\n",
fill, outline);
else sys_vgui("-fill %s\\\n", outline);
@@ -953,21 +1116,17 @@ static void curve_motion(void *z, t_floatarg dx, t_floatarg dy)
t_fielddesc *f = x->x_vec + curve_motion_field;
curve_motion_xcumulative += dx;
curve_motion_ycumulative += dy;
- if (f->fd_var)
+ if (f->fd_var && (dx != 0))
{
- template_setfloat(curve_motion_template,
- f->fd_un.fd_varsym,
- curve_motion_wp,
+ fielddesc_setcoord(f, curve_motion_template, curve_motion_wp,
curve_motion_xbase + curve_motion_xcumulative * curve_motion_xper,
- 1);
+ 1);
}
- if ((f+1)->fd_var)
+ if ((f+1)->fd_var && (dy != 0))
{
- template_setfloat(curve_motion_template,
- (f+1)->fd_un.fd_varsym,
- curve_motion_wp,
+ fielddesc_setcoord(f+1, curve_motion_template, curve_motion_wp,
curve_motion_ybase + curve_motion_ycumulative * curve_motion_yper,
- 1);
+ 1);
}
if (curve_motion_scalar)
glist_redrawitem(curve_motion_glist, &curve_motion_scalar->sc_gobj);
@@ -984,13 +1143,13 @@ static int curve_click(t_gobj *z, t_glist *glist,
int i, n = x->x_npoints;
int bestn = -1;
int besterror = 0x7fffffff;
- t_fielddesc *f = x->x_vec;
+ t_fielddesc *f;
for (i = 0, f = x->x_vec; i < n; i++, f += 2)
{
- int xloc = glist_xtopixels(glist,
- basex + fielddesc_getfloat(f, template, data, 0));
- int yloc = glist_ytopixels(glist,
- basey + fielddesc_getfloat(f+1, template, data, 0));
+ int xval = fielddesc_getcoord(f, template, data, 0),
+ xloc = glist_xtopixels(glist, basex + xval);
+ int yval = fielddesc_getcoord(f+1, template, data, 0),
+ yloc = glist_ytopixels(glist, basey + yval);
int xerr = xloc - xpix, yerr = yloc - ypix;
if (!f->fd_var && !(f+1)->fd_var)
continue;
@@ -1002,10 +1161,10 @@ static int curve_click(t_gobj *z, t_glist *glist,
xerr = yerr;
if (xerr < besterror)
{
+ curve_motion_xbase = xval;
+ curve_motion_ybase = yval;
besterror = xerr;
bestn = i;
- curve_motion_xbase = fielddesc_getfloat(f, template, data, 0);
- curve_motion_ybase = fielddesc_getfloat(f+1, template, data, 0);
}
}
if (besterror > 10)
@@ -1016,7 +1175,8 @@ static int curve_click(t_gobj *z, t_glist *glist,
- glist_pixelstox(glist, 0);
curve_motion_yper = glist_pixelstoy(glist, 1)
- glist_pixelstoy(glist, 0);
- curve_motion_xcumulative = curve_motion_ycumulative = 0;
+ curve_motion_xcumulative = 0;
+ curve_motion_ycumulative = 0;
curve_motion_glist = glist;
curve_motion_scalar = sc;
curve_motion_array = ap;
@@ -1064,6 +1224,8 @@ t_class *plot_class;
typedef struct _plot
{
t_object x_obj;
+ int x_vis;
+ t_canvas *x_canvas;
t_fielddesc x_outlinecolor;
t_fielddesc x_width;
t_fielddesc x_xloc;
@@ -1071,37 +1233,79 @@ typedef struct _plot
t_fielddesc x_xinc;
t_fielddesc x_style;
t_fielddesc x_data;
+ t_fielddesc x_xpoints;
+ t_fielddesc x_ypoints;
+ t_fielddesc x_wpoints;
} t_plot;
static void *plot_new(t_symbol *classsym, t_int argc, t_atom *argv)
{
t_plot *x = (t_plot *)pd_new(plot_class);
int defstyle = PLOTSTYLE_POLY;
- int nxy, i;
- t_fielddesc *fd;
- t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
- if (!strcmp(firstarg->s_name, "curve"))
+ x->x_vis = 1;
+ x->x_canvas = canvas_getcurrent();
+
+ fielddesc_setfloat_var(&x->x_xpoints, gensym("x"));
+ fielddesc_setfloat_var(&x->x_ypoints, gensym("y"));
+ fielddesc_setfloat_var(&x->x_wpoints, gensym("w"));
+
+ while (1)
{
- defstyle = PLOTSTYLE_BEZ;
- argc--, argv++;
+ t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
+ if (!strcmp(firstarg->s_name, "curve") ||
+ !strcmp(firstarg->s_name, "-c"))
+ {
+ defstyle = PLOTSTYLE_BEZ;
+ argc--, argv++;
+ }
+ else if (!strcmp(firstarg->s_name, "-n"))
+ {
+ x->x_vis = 0;
+ argc--; argv++;
+ }
+ else if (!strcmp(firstarg->s_name, "-x") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_xpoints, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else if (!strcmp(firstarg->s_name, "-y") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_ypoints, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else if (!strcmp(firstarg->s_name, "-w") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_wpoints, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else break;
}
if (argc) fielddesc_setarrayarg(&x->x_data, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_data, 1);
+ else fielddesc_setfloat_const(&x->x_data, 1);
if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_outlinecolor, 0);
+ else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_width, 1);
+ else fielddesc_setfloat_const(&x->x_width, 1);
if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_xloc, 1);
+ else fielddesc_setfloat_const(&x->x_xloc, 1);
if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_yloc, 1);
+ else fielddesc_setfloat_const(&x->x_yloc, 1);
if (argc) fielddesc_setfloatarg(&x->x_xinc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_xinc, 1);
+ else fielddesc_setfloat_const(&x->x_xinc, 1);
if (argc) fielddesc_setfloatarg(&x->x_style, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_style, defstyle);
+ else fielddesc_setfloat_const(&x->x_style, defstyle);
return (x);
}
+void plot_float(t_plot *x, t_floatarg f)
+{
+ if ((f != 0 && x->x_vis) || (f == 0 && !x->x_vis))
+ return;
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
+ x->x_vis = (f!= 0);
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
+}
+
/* -------------------- widget behavior for plot ------------ */
@@ -1110,7 +1314,8 @@ static void *plot_new(t_symbol *classsym, t_int argc, t_atom *argv)
static int plot_readownertemplate(t_plot *x,
t_word *data, t_template *ownertemplate,
t_symbol **elemtemplatesymp, t_array **arrayp,
- float *linewidthp, float *xlocp, float *xincp, float *ylocp, float *stylep)
+ float *linewidthp, float *xlocp, float *xincp, float *ylocp, float *stylep,
+ t_fielddesc **xfield, t_fielddesc **yfield, t_fielddesc **wfield)
{
int arrayonset, type;
t_symbol *elemtemplatesym;
@@ -1141,6 +1346,9 @@ static int plot_readownertemplate(t_plot *x,
*stylep = fielddesc_getfloat(&x->x_style, ownertemplate, data, 1);
*elemtemplatesymp = elemtemplatesym;
*arrayp = array;
+ *xfield = &x->x_xpoints;
+ *yfield = &x->x_ypoints;
+ *wfield = &x->x_wpoints;
return (0);
}
@@ -1149,11 +1357,12 @@ static int plot_readownertemplate(t_plot *x,
int array_getfields(t_symbol *elemtemplatesym,
t_canvas **elemtemplatecanvasp,
t_template **elemtemplatep, int *elemsizep,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
int *xonsetp, int *yonsetp, int *wonsetp)
{
int arrayonset, elemsize, yonset, wonset, xonset, type;
t_template *elemtemplate;
- t_symbol *dummy;
+ t_symbol *dummy, *varname;
t_canvas *elemtemplatecanvas = 0;
/* the "float" template is special in not having to have a canvas;
@@ -1172,13 +1381,22 @@ int array_getfields(t_symbol *elemtemplatesym,
return (-1);
}
elemsize = elemtemplate->t_n * sizeof(t_word);
- if (!template_find_field(elemtemplate, gensym("y"), &yonset, &type, &dummy)
+ if (yfielddesc && yfielddesc->fd_var)
+ varname = yfielddesc->fd_un.fd_varsym;
+ else varname = gensym("y");
+ if (!template_find_field(elemtemplate, varname, &yonset, &type, &dummy)
|| type != DT_FLOAT)
yonset = -1;
- if (!template_find_field(elemtemplate, gensym("x"), &xonset, &type, &dummy)
+ if (xfielddesc && xfielddesc->fd_var)
+ varname = xfielddesc->fd_un.fd_varsym;
+ else varname = gensym("x");
+ if (!template_find_field(elemtemplate, varname, &xonset, &type, &dummy)
|| type != DT_FLOAT)
xonset = -1;
- if (!template_find_field(elemtemplate, gensym("w"), &wonset, &type, &dummy)
+ if (wfielddesc && wfielddesc->fd_var)
+ varname = wfielddesc->fd_un.fd_varsym;
+ else varname = gensym("w");
+ if (!template_find_field(elemtemplate, varname, &wonset, &type, &dummy)
|| type != DT_FLOAT)
wonset = -1;
@@ -1203,14 +1421,17 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
t_symbol *elemtemplatesym;
float linewidth, xloc, xinc, yloc, style, xsum, yval;
t_array *array;
- float x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff;
+ int x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff;
int i;
float xpix, ypix, wpix;
-
- if (!plot_readownertemplate(x, data, template,
- &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style) &&
+ t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
+ if (x->x_vis && !plot_readownertemplate(x, data, template,
+ &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
+ &xfielddesc, &yfielddesc, &wfielddesc) &&
!array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize,
+ xfielddesc, yfielddesc, wfielddesc,
+ &xonset, &yonset, &wonset))
{
for (i = 0, xsum = 0; i < array->a_n; i++)
{
@@ -1219,7 +1440,7 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
/* get the coords of the point proper */
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, basex + xloc, basey + yloc, xinc,
- &xpix, &ypix, &wpix);
+ xfielddesc, yfielddesc, wfielddesc, &xpix, &ypix, &wpix);
if (xpix < x1)
x1 = xpix;
if (xpix > x2)
@@ -1231,14 +1452,15 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
/* check also the drawing instructions for the scalar */
if (xonset >= 0)
- usexloc = basex + xloc +
- *(float *)(((char *)(array->a_vec) + elemsize * i) + xonset);
+ usexloc = basex + xloc + fielddesc_cvttocoord(xfielddesc,
+ *(float *)(((char *)(array->a_vec) + elemsize * i)
+ + xonset));
else usexloc = basex + xsum, xsum += xinc;
if (yonset >= 0)
yval = *(float *)(((char *)(array->a_vec) + elemsize * i)
+ yonset);
else yval = 0;
- useyloc = basey + yloc + yval;
+ useyloc = basey + yloc + fielddesc_cvttocoord(yfielddesc, yval);
for (y = elemtemplatecanvas->gl_list; y; y = y->g_next)
{
int xx1, xx2, yy1, yy2;
@@ -1300,10 +1522,16 @@ static void plot_vis(t_gobj *z, t_glist *glist,
t_array *array;
int nelem;
char *elem;
+ t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
+
+ if (!x->x_vis)
+ return;
if (plot_readownertemplate(x, data, template,
- &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style) ||
+ &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
+ &xfielddesc, &yfielddesc, &wfielddesc) ||
array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize, xfielddesc, yfielddesc, wfielddesc,
+ &xonset, &yonset, &wonset))
return;
nelem = array->a_n;
elem = (char *)array->a_vec;
@@ -1323,20 +1551,22 @@ static void plot_vis(t_gobj *z, t_glist *glist,
{
usexloc = basex + xloc +
*(float *)((elem + elemsize * i) + xonset);
- ixpix = glist_xtopixels(glist, usexloc);
+ ixpix = glist_xtopixels(glist,
+ fielddesc_cvttocoord(xfielddesc, usexloc));
inextx = ixpix + 2;
}
else
{
usexloc = xsum;
xsum += xinc;
- ixpix = glist_xtopixels(glist, usexloc);
- inextx = glist_xtopixels(glist, xsum);
+ ixpix = glist_xtopixels(glist,
+ fielddesc_cvttocoord(xfielddesc, usexloc));
+ inextx = glist_xtopixels(glist,
+ fielddesc_cvttocoord(xfielddesc, xsum));
}
if (yonset >= 0)
- yval = basey + yloc +
- *(float *)((elem + elemsize * i) + yonset);
+ yval = yloc + *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
if (yval > maxyval)
maxyval = yval;
@@ -1347,9 +1577,11 @@ static void plot_vis(t_gobj *z, t_glist *glist,
sys_vgui(
".x%lx.c create rectangle %d %d %d %d -fill black -width 0 -tags plot%lx\n",
glist_getcanvas(glist),
- ixpix, (int)glist_ytopixels(glist, minyval),
- inextx, (int)(glist_ytopixels(glist, maxyval)
- + linewidth), data);
+ ixpix, (int)glist_ytopixels(glist,
+ basey + fielddesc_cvttocoord(yfielddesc, minyval)),
+ inextx, (int)(glist_ytopixels(glist,
+ basey + fielddesc_cvttocoord(yfielddesc, maxyval))
+ + linewidth), data);
ndrawn++;
minyval = 1e20;
maxyval = -1e20;
@@ -1383,13 +1615,16 @@ static void plot_vis(t_gobj *z, t_glist *glist,
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
wval = *(float *)((elem + elemsize * i) + wonset);
- xpix = glist_xtopixels(glist, basex + usexloc);
+ xpix = glist_xtopixels(glist,
+ basex + fielddesc_cvttocoord(xfielddesc, usexloc));
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
{
sys_vgui("%d %f \\\n", ixpix,
glist_ytopixels(glist,
- basey + yloc + yval - wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) -
+ fielddesc_cvttocoord(wfielddesc,wval)));
ndrawn++;
}
lastpixel = ixpix;
@@ -1407,12 +1642,15 @@ static void plot_vis(t_gobj *z, t_glist *glist,
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
wval = *(float *)((elem + elemsize * i) + wonset);
- xpix = glist_xtopixels(glist, basex + usexloc);
+ xpix = glist_xtopixels(glist,
+ basex + fielddesc_cvttocoord(xfielddesc, usexloc));
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
{
sys_vgui("%d %f \\\n", ixpix, glist_ytopixels(glist,
- basey + yloc + yval + wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) +
+ fielddesc_cvttocoord(wfielddesc, wval)));
ndrawn++;
}
lastpixel = ixpix;
@@ -1423,9 +1661,13 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (ndrawn < 4)
{
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
- basey + yloc + yval + wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) +
+ fielddesc_cvttocoord(wfielddesc, wval)));
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
- basey + yloc + yval - wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) -
+ fielddesc_cvttocoord(wfielddesc, wval)));
}
ouch:
sys_vgui(" -width 1 -fill %s -outline %s\\\n",
@@ -1451,12 +1693,15 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (yonset >= 0)
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
- xpix = glist_xtopixels(glist, basex + usexloc);
+ xpix = glist_xtopixels(glist,
+ basex + fielddesc_cvttocoord(xfielddesc, usexloc));
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
{
sys_vgui("%d %f \\\n", ixpix,
- glist_ytopixels(glist, basey + yloc + yval));
+ glist_ytopixels(glist,
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval)));
ndrawn++;
}
lastpixel = ixpix;
@@ -1465,7 +1710,8 @@ static void plot_vis(t_gobj *z, t_glist *glist,
/* TK will complain if there aren't at least 2 points... */
if (ndrawn == 0) sys_vgui("0 0 0 0 \\\n");
else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix + 10,
- glist_ytopixels(glist, basey + yloc + yval));
+ glist_ytopixels(glist, basey +
+ fielddesc_cvttocoord(yfielddesc, yloc + yval)));
sys_vgui("-width %f\\\n", linewidth);
sys_vgui("-fill %s\\\n", outline);
@@ -1489,7 +1735,7 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (yonset >= 0)
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
- useyloc = basey + yloc + yval;
+ useyloc = basey + fielddesc_cvttocoord(yfielddesc, yloc + yval);
for (y = elemtemplatecanvas->gl_list; y; y = y->g_next)
{
t_parentwidgetbehavior *wb = pd_getparentwidget(&y->g_pd);
@@ -1522,7 +1768,6 @@ static void plot_vis(t_gobj *z, t_glist *glist,
}
}
-
static int plot_click(t_gobj *z, t_glist *glist,
t_word *data, t_template *template, t_scalar *sc, t_array *ap,
float basex, float basey,
@@ -1532,13 +1777,16 @@ static int plot_click(t_gobj *z, t_glist *glist,
t_symbol *elemtemplatesym;
float linewidth, xloc, xinc, yloc, style;
t_array *array;
+ t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
if (!plot_readownertemplate(x, data, template,
- &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style))
+ &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
+ &xfielddesc, &yfielddesc, &wfielddesc))
{
return (array_doclick(array, glist, sc, ap,
elemtemplatesym,
linewidth, basex + xloc, xinc, basey + yloc,
+ xfielddesc, yfielddesc, wfielddesc,
xpix, ypix, shift, alt, dbl, doit));
}
else return (0);
@@ -1557,8 +1805,9 @@ t_parentwidgetbehavior plot_widgetbehavior =
static void plot_setup(void)
{
plot_class = class_new(gensym("plot"), (t_newmethod)plot_new, 0,
- sizeof(t_plot), CLASS_NOINLET, A_GIMME, 0);
+ sizeof(t_plot), 0, A_GIMME, 0);
class_setdrawcommand(plot_class);
+ class_addfloat(plot_class, plot_float);
class_setparentwidget(plot_class, &plot_widgetbehavior);
}
@@ -1577,12 +1826,14 @@ t_class *drawnumber_class;
typedef struct _drawnumber
{
t_object x_obj;
+ int x_vis; /* LATER incorporate into flags field below? */
t_fielddesc x_value;
t_fielddesc x_xloc;
t_fielddesc x_yloc;
t_fielddesc x_color;
t_symbol *x_label;
int x_flags;
+ t_canvas *x_canvas;
} t_drawnumber;
static void *drawnumber_new(t_symbol *classsym, t_int argc, t_atom *argv)
@@ -1590,17 +1841,30 @@ static void *drawnumber_new(t_symbol *classsym, t_int argc, t_atom *argv)
t_drawnumber *x = (t_drawnumber *)pd_new(drawnumber_class);
char *classname = classsym->s_name;
int flags = 0;
+
if (classname[4] == 's')
flags |= DRAW_SYMBOL;
x->x_flags = flags;
+ x->x_vis = 1;
+ x->x_canvas = canvas_getcurrent();
+ while (1)
+ {
+ t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
+ if (!strcmp(firstarg->s_name, "-n"))
+ {
+ x->x_vis = 0;
+ argc--; argv++;
+ }
+ else break;
+ }
if (argc) fielddesc_setfloatarg(&x->x_value, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_value, 0);
+ else fielddesc_setfloat_const(&x->x_value, 0);
if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_xloc, 0);
+ else fielddesc_setfloat_const(&x->x_xloc, 0);
if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_yloc, 0);
+ else fielddesc_setfloat_const(&x->x_yloc, 0);
if (argc) fielddesc_setfloatarg(&x->x_color, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_color, 1);
+ else fielddesc_setfloat_const(&x->x_color, 1);
if (argc)
x->x_label = atom_getsymbolarg(0, argc, argv);
else x->x_label = &s_;
@@ -1608,6 +1872,15 @@ static void *drawnumber_new(t_symbol *classsym, t_int argc, t_atom *argv)
return (x);
}
+void drawnumber_float(t_drawnumber *x, t_floatarg f)
+{
+ if ((f != 0 && x->x_vis) || (f == 0 && !x->x_vis))
+ return;
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
+ x->x_vis = (f!= 0);
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
+}
+
/* -------------------- widget behavior for drawnumber ------------ */
#define DRAWNUMBER_BUFSIZE 80
@@ -1626,6 +1899,12 @@ static void drawnumber_getrect(t_gobj *z, t_glist *glist,
{
t_drawnumber *x = (t_drawnumber *)z;
t_atom at;
+ if (!x->x_vis)
+ {
+ *xp1 = *yp1 = 0x7fffffff;
+ *xp2 = *yp2 = -0x7fffffff;
+ return;
+ }
int xloc = glist_xtopixels(glist,
basex + fielddesc_getfloat(&x->x_xloc, template, data, 0));
int yloc = glist_ytopixels(glist,
@@ -1671,6 +1950,8 @@ static void drawnumber_vis(t_gobj *z, t_glist *glist,
{
t_drawnumber *x = (t_drawnumber *)z;
+ if (!x->x_vis)
+ return;
if (vis)
{
t_atom at;
@@ -1768,8 +2049,9 @@ static void drawnumber_setup(void)
{
drawnumber_class = class_new(gensym("drawnumber"),
(t_newmethod)drawnumber_new, (t_method)drawnumber_free,
- sizeof(t_drawnumber), CLASS_NOINLET, A_GIMME, 0);
+ sizeof(t_drawnumber), 0, A_GIMME, 0);
class_setdrawcommand(drawnumber_class);
+ class_addfloat(drawnumber_class, drawnumber_float);
class_addcreator((t_newmethod)drawnumber_new, gensym("drawsymbol"),
A_GIMME, 0);
class_setparentwidget(drawnumber_class, &drawnumber_widgetbehavior);
diff --git a/pd/src/g_text.c b/pd/src/g_text.c
index cabe22d7..30735918 100644
--- a/pd/src/g_text.c
+++ b/pd/src/g_text.c
@@ -752,12 +752,10 @@ static void gatom_vis(t_gobj *z, t_glist *glist, int vis)
sys_hostfontsize(glist_getfont(glist)),
"black");
}
- else
- {
- sys_vgui(".x%lx.c delete %lx.l\n", glist_getcanvas(glist), x);
- sys_unqueuegui(x);
- }
+ else sys_vgui(".x%lx.c delete %lx.l\n", glist_getcanvas(glist), x);
}
+ if (!vis)
+ sys_unqueuegui(x);
}
void canvas_atom(t_glist *gl, t_atomtype type,
diff --git a/pd/src/m_obj.c b/pd/src/m_obj.c
index b5839003..ff2ff249 100644
--- a/pd/src/m_obj.c
+++ b/pd/src/m_obj.c
@@ -62,6 +62,13 @@ t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1, t_symbol *s2)
return (x);
}
+t_inlet *signalinlet_new(t_object *owner, t_float f)
+{
+ t_inlet *x = inlet_new(owner, &owner->ob_pd, &s_signal, &s_signal);
+ x->i_un.iu_floatsignalvalue = f;
+ return (x);
+}
+
static void inlet_wrong(t_inlet *x, t_symbol *s)
{
pd_error(x->i_owner, "inlet: expected '%s' but got '%s'",
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index e2c1972c..234ee3d7 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -337,6 +337,7 @@ EXTERN t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1,
EXTERN t_inlet *pointerinlet_new(t_object *owner, t_gpointer *gp);
EXTERN t_inlet *floatinlet_new(t_object *owner, t_float *fp);
EXTERN t_inlet *symbolinlet_new(t_object *owner, t_symbol **sp);
+EXTERN t_inlet *signalinlet_new(t_object *owner, t_float f);
EXTERN void inlet_free(t_inlet *x);
EXTERN t_outlet *outlet_new(t_object *owner, t_symbol *s);
@@ -436,6 +437,7 @@ EXTERN void postfloat(float f);
EXTERN void postatom(int argc, t_atom *argv);
EXTERN void endpost(void);
EXTERN void error(const char *fmt, ...);
+EXTERN void verbose(int level, const char *fmt, ...);
EXTERN void bug(const char *fmt, ...);
EXTERN void pd_error(void *object, const char *fmt, ...);
EXTERN void sys_logerror(const char *object, const char *s);
diff --git a/pd/src/m_sched.c b/pd/src/m_sched.c
index 7a82b3eb..82c4c5d7 100644
--- a/pd/src/m_sched.c
+++ b/pd/src/m_sched.c
@@ -412,8 +412,18 @@ int m_scheduler( void)
waitfortick:
if (sched_usedacs)
{
+#ifdef THREAD_LOCKING
+ /* T.Grill - send_dacs may sleep ->
+ unlock thread lock make that time available
+ - could messaging do any harm while sys_send_dacs is running?
+ */
+ sys_unlock();
+#endif
timeforward = sys_send_dacs();
-
+#ifdef THREAD_LOCKING
+ /* T.Grill - done */
+ sys_unlock();
+#endif
/* if dacs remain "idle" for 1 sec, they're hung up. */
if (timeforward != 0)
idlecount = 0;
diff --git a/pd/src/makefile b/pd/src/makefile
index e591f2c2..a2a70c79 100644
--- a/pd/src/makefile
+++ b/pd/src/makefile
@@ -19,7 +19,7 @@ GLIB = -ltk8.4 -ltcl8.4 -lX11 -L/usr/X11R6/lib -lrt
LDFLAGS = -Wl,-export-dynamic -lasound
LIB = -ldl -lpthread -lasound
-OPT_CFLAGS = -g
+OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
ARCH_CFLAGS = -DPD
@@ -162,7 +162,9 @@ distclean: clean
tags: $(SRC) $(GSRC); ctags *.[ch]
-depend:
+depend: makefile.dependencies
+
+makefile.dependencies: makefile
$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
uninstall:
diff --git a/pd/src/makefile.dependencies b/pd/src/makefile.dependencies
index 6a895c1a..e69de29b 100644
--- a/pd/src/makefile.dependencies
+++ b/pd/src/makefile.dependencies
@@ -1,938 +0,0 @@
-g_canvas.o: g_canvas.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- m_imp.h s_stuff.h g_canvas.h /usr/include/string.h g_all_guis.h
-g_graph.o: g_graph.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h t_tk.h \
- g_canvas.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h
-g_text.o: g_text.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h m_imp.h \
- s_stuff.h t_tk.h g_canvas.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-g_rtext.o: g_rtext.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h s_stuff.h g_canvas.h t_tk.h
-g_array.o: g_array.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-g_template.o: g_template.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- s_stuff.h g_canvas.h
-g_io.o: g_io.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h g_canvas.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h
-g_scalar.o: g_scalar.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h
-g_traversal.o: g_traversal.c /usr/include/stdlib.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h
-g_guiconnect.o: g_guiconnect.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h g_canvas.h
-g_readwrite.o: g_readwrite.c /usr/include/stdlib.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h /usr/include/string.h
-g_editor.o: g_editor.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- m_imp.h s_stuff.h g_canvas.h /usr/include/string.h
-g_all_guis.o: g_all_guis.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_bang.o: g_bang.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_hdial.o: g_hdial.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_hslider.o: g_hslider.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_mycanvas.o: g_mycanvas.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_numbox.o: g_numbox.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_toggle.o: g_toggle.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_vdial.o: g_vdial.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-g_vslider.o: g_vslider.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_vumeter.o: g_vumeter.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-m_pd.o: m_pd.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h m_imp.h
-m_class.o: m_class.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- s_stuff.h /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/string.h
-m_obj.o: m_obj.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h
-m_atom.o: m_atom.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h
-m_memory.o: m_memory.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- m_pd.h m_imp.h
-m_binbuf.o: m_binbuf.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h s_stuff.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
- /usr/include/bits/fcntl.h /usr/include/string.h
-m_conf.o: m_conf.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-m_glob.o: m_glob.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h
-m_sched.o: m_sched.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- s_stuff.h /usr/include/pthread.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/sched.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h \
- /usr/include/bits/sched.h /usr/include/bits/time.h \
- /usr/include/signal.h /usr/include/bits/sigset.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/initspin.h \
- /usr/include/bits/sigthread.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-s_main.o: s_main.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- s_stuff.h /usr/include/sys/types.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/sys/stat.h /usr/include/bits/stat.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/stdlib.h \
- /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-s_inter.o: s_inter.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- m_imp.h g_canvas.h /usr/include/unistd.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/sys/socket.h /usr/include/sys/uio.h \
- /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/bits/uio.h /usr/include/bits/socket.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
- /usr/include/asm/socket.h /usr/include/asm/sockios.h \
- /usr/include/netinet/in.h /usr/include/stdint.h \
- /usr/include/bits/wchar.h /usr/include/bits/in.h \
- /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
- /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
- /usr/include/stdlib.h /usr/include/alloca.h /usr/include/sys/time.h \
- /usr/include/sys/mman.h /usr/include/bits/mman.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/signal.h /usr/include/bits/signum.h \
- /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
- /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
- /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/string.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/gconv.h /usr/include/bits/stdio_lim.h \
- /usr/include/bits/sys_errlist.h /usr/include/sched.h
-s_file.o: s_file.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/stdlib.h /usr/include/sys/types.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h \
- /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/fcntl.h \
- /usr/include/bits/fcntl.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-s_print.o: s_print.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/sys/types.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h s_stuff.h
-s_loader.o: s_loader.c /usr/include/dlfcn.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/dlfcn.h /usr/include/stdlib.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/string.h m_pd.h s_stuff.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-s_path.o: s_path.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/sys/stat.h /usr/include/bits/stat.h \
- /usr/include/string.h m_pd.h m_imp.h s_stuff.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/ctype.h
-s_entry.o: s_entry.c
-s_audio.o: s_audio.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/sys/resource.h \
- /usr/include/bits/resource.h /usr/include/stdlib.h \
- /usr/include/sys/types.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/string.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h
-s_midi.o: s_midi.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- m_imp.h /usr/include/unistd.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/string.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/signal.h /usr/include/bits/signum.h \
- /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
- /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
- /usr/include/bits/sigstack.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/bits/sigthread.h
-d_ugen.o: d_ugen.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/sys/types.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h
-d_ctl.o: d_ctl.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-d_arithmetic.o: d_arithmetic.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-d_osc.o: d_osc.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h
-d_filter.o: d_filter.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-d_dac.o: d_dac.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h
-d_misc.o: d_misc.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h
-d_math.o: d_math.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-d_fft.o: d_fft.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-d_mayer_fft.o: d_mayer_fft.c
-d_fftroutine.o: d_fftroutine.c /usr/include/stdio.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h
-d_array.o: d_array.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/endian.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/endian.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h
-d_global.o: d_global.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h
-d_delay.o: d_delay.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-d_resample.o: d_resample.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-x_arithmetic.o: x_arithmetic.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-x_connective.o: x_connective.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/stdio.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-x_interface.o: x_interface.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-x_midi.o: x_midi.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-x_misc.o: x_misc.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/stdio.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/sys/time.h \
- /usr/include/sys/times.h /usr/include/sys/param.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/linux/param.h \
- /usr/include/asm/param.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-x_time.o: x_time.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-x_acoustics.o: x_acoustics.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-x_net.o: x_net.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/sys/types.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/string.h /usr/include/sys/socket.h /usr/include/sys/uio.h \
- /usr/include/bits/uio.h /usr/include/bits/socket.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
- /usr/include/asm/socket.h /usr/include/asm/sockios.h \
- /usr/include/netinet/in.h /usr/include/stdint.h \
- /usr/include/bits/wchar.h /usr/include/bits/in.h \
- /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
- /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-x_qlist.o: x_qlist.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-x_gui.o: x_gui.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-d_soundfile.o: d_soundfile.c /usr/include/unistd.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
- /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/pthread.h /usr/include/sched.h /usr/include/signal.h \
- /usr/include/bits/initspin.h /usr/include/bits/sigthread.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h m_pd.h
-s_midi_oss.o: s_midi_oss.c /usr/include/stdio.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
- /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h m_pd.h s_stuff.h
-s_audio_oss.o: s_audio_oss.c /usr/include/linux/soundcard.h \
- /usr/include/linux/ioctl.h /usr/include/asm/ioctl.h m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/errno.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h \
- /usr/include/stdio.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/sys/time.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
- /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
- /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sched.h \
- /usr/include/sys/mman.h /usr/include/bits/mman.h
-s_audio_alsa.o: s_audio_alsa.c /usr/include/alsa/asoundlib.h \
- /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/assert.h \
- /usr/include/sys/poll.h /usr/include/bits/poll.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/alsa/asoundef.h \
- /usr/include/alsa/version.h /usr/include/alsa/global.h \
- /usr/include/alsa/input.h /usr/include/alsa/output.h \
- /usr/include/alsa/error.h /usr/include/alsa/conf.h \
- /usr/include/alsa/pcm.h /usr/include/alsa/rawmidi.h \
- /usr/include/alsa/timer.h /usr/include/alsa/hwdep.h \
- /usr/include/alsa/control.h /usr/include/alsa/mixer.h \
- /usr/include/alsa/seq_event.h /usr/include/alsa/seq.h \
- /usr/include/alsa/seqmid.h /usr/include/alsa/seq_midi_event.h \
- /usr/include/alsa/conv.h /usr/include/alsa/instr.h m_pd.h s_stuff.h \
- /usr/include/sys/time.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
- /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
- /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
- /usr/include/sys/ttydefaults.h /usr/include/sched.h \
- /usr/include/sys/mman.h /usr/include/bits/mman.h s_audio_alsa.h
-s_audio_alsamm.o: s_audio_alsamm.c /usr/include/alsa/asoundlib.h \
- /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/assert.h \
- /usr/include/sys/poll.h /usr/include/bits/poll.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/alsa/asoundef.h \
- /usr/include/alsa/version.h /usr/include/alsa/global.h \
- /usr/include/alsa/input.h /usr/include/alsa/output.h \
- /usr/include/alsa/error.h /usr/include/alsa/conf.h \
- /usr/include/alsa/pcm.h /usr/include/alsa/rawmidi.h \
- /usr/include/alsa/timer.h /usr/include/alsa/hwdep.h \
- /usr/include/alsa/control.h /usr/include/alsa/mixer.h \
- /usr/include/alsa/seq_event.h /usr/include/alsa/seq.h \
- /usr/include/alsa/seqmid.h /usr/include/alsa/seq_midi_event.h \
- /usr/include/alsa/conv.h /usr/include/alsa/instr.h m_pd.h s_stuff.h \
- /usr/include/sys/time.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
- /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
- /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
- /usr/include/sys/ttydefaults.h /usr/include/sched.h s_audio_alsa.h
diff --git a/pd/src/makefile.in b/pd/src/makefile.in
index ae8ccffc..f525bae3 100644
--- a/pd/src/makefile.in
+++ b/pd/src/makefile.in
@@ -162,7 +162,9 @@ distclean: clean
tags: $(SRC) $(GSRC); ctags *.[ch]
-depend:
+depend: makefile.dependencies
+
+makefile.dependencies: makefile
$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
uninstall:
diff --git a/pd/src/notes.txt b/pd/src/notes.txt
index 7e7e8569..c70616a2 100644
--- a/pd/src/notes.txt
+++ b/pd/src/notes.txt
@@ -1,62 +1,31 @@
---------------- dolist --------------------
-done:
-plug-in support
-atan2 inlets switched
-queued graphics updates for tables, number boxes
-cut/paste text (needs more testing)
-add standard bindings (ctl-o, etc) to dialogs
-separate audio on/off from nchans
-setuid flag in configure script
-settings saver (registry in Windows; .pdrc in linux; defaults system in OSX?)
- audio API
- MIDI -- fix to read MIDI on startup (rest works?)
- path
- startup flags
- libs
-better params:
- extra flag for path
- startup flags
- startup libraries
-printout to pd window
-startup from GUI
-%x to %lx in all "tags" to make 64-bit safe
-portaudio_pd files into src
-t_int to int in binbuf_addv
-64-bit fix to externs makefiles
-new filter objects: cpole~, fpole~, etc.
-put in Wini's RME ALSA code; there are still bugs...
-portaudio fixed for inchans != outchans, e.g., emi emagic (2/6)
-sprout inlets/outlets on objects whose creation failed.
-uploaded to CVS
-bug fix: click on minaturized subpatch fails to "vis" it
-bug fix: CK on Oct. 4 (crash changing font size)
-sched_idle hook
-fixed startup flags, path, etc. so that spaces, "," chars, etc., are allowed
-configure script fixed to handle enable- and disable- correctly
-
-0.39:
+done for 0.39:
arrays are now first-class data
array elements can be clicked on, etc
+fixed array onset bug
+At the source level, "regular" arrays and arrays withing data structures
+are now the same thing. The main user-visible effect of this is that now
+"arrays" may be graphed as "bezier curves".
-bug bandaids:
-d_delay.c confusion
-'$' and help broken in OSX?
+------------ 0.39 ---------
garray change:
make a gobj_redraw that schedules the redraw
put two radio button banks side by side
-re-range tables when arrays change size (again)
array_resize etc., should redraw the array directly? Or should "setsize"
and "garray_resize" do it instead? check it's queued correctly.
-
doc:
document env~ second argument (and why is it no less than 1/10 of first???)
vibrato example
block resampling arguments
+document tabwrite~_start
problems:
+check if there's a problem loading libs on startup if superuser
+tk errors for large tables?
+wierdly small hotspot on lines
'[' in numbox label breaks it (Yury Sept. 3)
soundfiles with 3-byte samples buzz for the first readsf buffer (bug/x.pd)
read xx.txt in "bad" gives warnings
@@ -65,21 +34,21 @@ Also writesf~ acts differently if DSP is off when "open" is sent?
qlist - 'next 1' seems not to work
Krzysztof's qlist_next reentrancy bug
don't draw in/outlets on gui objects in graph-on-parent
+reasonable font size default for GUIs
font size should depend on subpatch/abstraction
-moving a bang toward top of window creates problem
+moving a bang toward top of window creates problem (invisible label)
check what happens when going back and forth between graph-on-parent
get rid of messages causing renaming; try to prevent patches closing themselves.
dac~/ adc~/ block~ incompatibility
scofo reports error on reading score1.txt
rfft~ loses nyquist bin -- see "to hell with it" comment in d_fft.c
-open_via_path() followed by close() fails in windows? [can't reproduce]
loading e-mailed patches without removing headers crashes pd
pd $1 bug ($1 is saved as it was evaluated, not as '$1')
-data copy/paste doesn't check templates aren't changed
-figure out why Pd sometimes crashes when you close example after adding fields
check if _vsnprintf with zero argument in windows works any better...
-next release:
+features:
+flag to suppress printing array name above graph
+rename windowname-pd instead of pd-windowname
fix copyright notices
update portmusic to latest
IEM guis to use queued updates
@@ -94,7 +63,6 @@ tables:
object to get/set table size; random; quantile
flag to hide array names
queued graphics updates for IEMGUIs and scalars
-document tabwrite~_start
think of a way to embed abstractions in a patch
make watchdog work for MACOSX
GOP bounding box object
@@ -111,6 +79,8 @@ expr to parse exponential notation
data:
+data copy/paste doesn't check templates aren't changed
+figure out why Pd sometimes crashes when you close example after adding fields
arrays of non-existent templates crash
allow field(1,5,0,100) etc. in drawing commands
vget, vset traversal objects
@@ -157,7 +127,6 @@ check that -blocksize really reflects in audiobuf calc for Hammerfall
makefile to have make install depend on make local.
Float method for random
figure out list, message objects
-separate control over alsaindev and alsaoutdev
put in something for tilde order forcing
extensible "toolbar" so people can add external GUI objects
allow spaces in paths
diff --git a/pd/src/s_audio_alsa.c b/pd/src/s_audio_alsa.c
index 27188a72..eb9bdc10 100644
--- a/pd/src/s_audio_alsa.c
+++ b/pd/src/s_audio_alsa.c
@@ -63,19 +63,28 @@ static void check_error(int err, const char *why)
static int alsaio_canmmap(t_alsa_dev *dev)
{
snd_pcm_hw_params_t *hw_params;
- int err;
+ int err1, err2;
snd_pcm_hw_params_alloca(&hw_params);
- err = snd_pcm_hw_params_any(dev->a_handle, hw_params);
- if (err < 0) {
- check_error(err,"Broken configuration: no configurations available");
+ err1 = snd_pcm_hw_params_any(dev->a_handle, hw_params);
+ if (err1 < 0) {
+ check_error(err1,"Broken configuration: no configurations available");
return (0);
}
-
- err = snd_pcm_hw_params_set_access(dev->a_handle,
- hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED);
- return (err >= 0);
+ err1 = snd_pcm_hw_params_set_access(dev->a_handle,
+ hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
+ if (err1 < 0)
+ {
+ err2 = snd_pcm_hw_params_set_access(dev->a_handle,
+ hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED);
+ }
+ else err2 = -1;
+#if 0
+ post("err 1 %d (%s), err2 %d (%s)", err1, snd_strerror(err1),
+ err2, snd_strerror(err2));
+#endif
+ return ((err1 < 0) && (err2 >= 0));
}
static int alsaio_setup(t_alsa_dev *dev, int out, int *channels, int *rate,
diff --git a/pd/src/s_audio_alsamm.c b/pd/src/s_audio_alsamm.c
index 0378c4b4..33c44755 100644
--- a/pd/src/s_audio_alsamm.c
+++ b/pd/src/s_audio_alsamm.c
@@ -218,6 +218,8 @@ int alsamm_open_audio(int rate)
alsa_indev[i].a_synced=alsa_outdev[i].a_synced=0;
alsa_indev[i].a_channels=alsa_outdev[i].a_channels=0;
}
+ alsamm_inchannels = 0;
+ alsamm_outchannels = 0;
/* opening alsa debug channel */
err = snd_output_stdio_attach(&alsa_stdout, stdout, 0);
@@ -251,8 +253,6 @@ int alsamm_open_audio(int rate)
for(i=0;i<alsa_noutdev;i++)
{
-
-
/* post("open audio out %d, of %lx, %d",i,&alsa_device[i],
alsa_outdev[i].a_handle); */
if((err = set_hwparams(alsa_outdev[i].a_handle, hw_params,
@@ -357,6 +357,8 @@ int alsamm_open_audio(int rate)
fflush(stdout);
#endif
+ sys_setchsr(alsamm_inchannels, alsamm_outchannels, alsamm_sr);
+
alsamm_start();
/* report success */
@@ -773,9 +775,9 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams, int pl
#ifdef ALSAMM_DEBUG
if(sys_verbose)
post("set sw finished");
+#endif
#else
post("alsa: need version 1.0 or above for mmap operation");
-#endif
#endif /* ALSAAPI9 */
return 0;
}
diff --git a/pd/src/s_audio_pablio.c b/pd/src/s_audio_pablio.c
index 37b2ecd3..3bd626ee 100644
--- a/pd/src/s_audio_pablio.c
+++ b/pd/src/s_audio_pablio.c
@@ -1,5 +1,5 @@
/*
- * $Id: s_audio_pablio.c,v 1.5 2004-11-28 21:20:43 millerpuckette Exp $
+
* pablio.c
* Portable Audio Blocking Input/Output utility.
*
diff --git a/pd/src/s_file.c b/pd/src/s_file.c
index 34992e01..9705bac3 100644
--- a/pd/src/s_file.c
+++ b/pd/src/s_file.c
@@ -152,38 +152,30 @@ static void sys_donesavepreferences( void)
static void sys_initloadpreferences( void)
{
- fprintf(stderr, "here 1\n");
}
static int sys_getpreference(const char *key, char *value, int size)
{
- HKEY **hkey;
+ HKEY hkey;
DWORD bigsize = size;
- char *val2 = value;
LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Pd", 0, KEY_QUERY_VALUE, &hkey);
if (err != ERROR_SUCCESS)
{
- fprintf(stderr, "here 3\n");
- return (0);
+ return (0);
}
err = RegQueryValueEx(hkey, key, 0, 0, value, &bigsize);
if (err != ERROR_SUCCESS)
{
- fprintf(stderr, "here 4\n");
- RegCloseKey(hkey);
+ RegCloseKey(hkey);
return (0);
}
- fprintf(stderr, "here 5\n");
- if (val2 != value)
- fprintf(stderr, "string moved for registry key %s", key);
- RegCloseKey(hkey);
+ RegCloseKey(hkey);
return (1);
}
static void sys_doneloadpreferences( void)
{
- fprintf(stderr, "here 2\n");
}
static void sys_initsavepreferences( void)
@@ -192,7 +184,7 @@ static void sys_initsavepreferences( void)
static void sys_putpreference(const char *key, const char *value)
{
- HKEY **hkey;
+ HKEY hkey;
LONG err = RegCreateKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Pd", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE,
NULL, &hkey, NULL);
@@ -362,11 +354,11 @@ void sys_loadpreferences( void)
if (sys_getpreference("defeatrt", prefbuf, MAXPDSTRING))
sscanf(prefbuf, "%d", &sys_defeatrt);
if (sys_getpreference("flags", prefbuf, MAXPDSTRING))
- {
- if (strcmp(prefbuf, "."))
- sys_flags = gensym(prefbuf);
+ {
+ if (strcmp(prefbuf, "."))
+ sys_flags = gensym(prefbuf);
}
- sys_doflags();
+ sys_doflags();
if (sys_defeatrt)
sys_hipriority = 0;
diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c
index 15d7e11c..3a659080 100644
--- a/pd/src/s_inter.c
+++ b/pd/src/s_inter.c
@@ -27,6 +27,7 @@ that didn't really belong anywhere. */
#include <fcntl.h>
#include <process.h>
#include <winsock.h>
+#include <windows.h>
typedef int pid_t;
typedef int socklen_t;
#define EADDRINUSE WSAEADDRINUSE
@@ -85,6 +86,7 @@ struct _socketreceiver
extern char pd_version[];
extern int sys_guisetportnumber;
+extern char sys_font[]; /* tb: typeface */
static int sys_nfdpoll;
static t_fdpoll *sys_fdpoll;
@@ -162,6 +164,11 @@ static int sys_domicrosleep(int microsec, int pollem)
FD_ZERO(&exceptset);
for (fp = sys_fdpoll, i = sys_nfdpoll; i--; fp++)
FD_SET(fp->fdp_fd, &readset);
+#ifdef MSW
+ if (sys_maxfd == 0)
+ Sleep(microsec/1000);
+ else
+#endif
select(sys_maxfd+1, &readset, &writeset, &exceptset, &timout);
for (i = 0; i < sys_nfdpoll; i++)
if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset))
@@ -173,6 +180,11 @@ static int sys_domicrosleep(int microsec, int pollem)
}
else
{
+#ifdef MSW
+ if (sys_maxfd == 0)
+ Sleep(microsec/1000);
+ else
+#endif
select(0, 0, 0, 0, &timout);
return (0);
}
@@ -617,6 +629,11 @@ void sys_vgui(char *fmt, ...)
msglen = vsnprintf(sys_guibuf + sys_guibufhead,
sys_guibufsize - sys_guibufhead, fmt, ap);
va_end(ap);
+ if(msglen < 0)
+ {
+ fprintf(stderr, "Pd: buffer space wasn't sufficient for long GUI string\n");
+ return;
+ }
if (msglen >= sys_guibufsize - sys_guibufhead)
{
int msglen2, newsize = sys_guibufsize + 1 +
@@ -777,7 +794,7 @@ void sys_unqueuegui(void *client)
if (gq2->gq_client == client)
{
gq->gq_next = gq2->gq_next;
- t_freebytes(gq, sizeof(*gq));
+ t_freebytes(gq2, sizeof(*gq2));
break;
}
}
@@ -1183,7 +1200,8 @@ int sys_startgui(const char *guidir)
sys_gui("pdtk_watchdog\n");
#endif
sys_get_audio_apis(buf);
- sys_vgui("pdtk_pd_startup {%s} %s\n", pd_version, buf);
+ sys_vgui("pdtk_pd_startup {%s} %s {%s}\n", pd_version, buf,
+ sys_font);
}
return (0);
diff --git a/pd/src/s_loader.c b/pd/src/s_loader.c
index 75f638f1..461b9a97 100644
--- a/pd/src/s_loader.c
+++ b/pd/src/s_loader.c
@@ -134,8 +134,18 @@ int sys_load_lib(char *dirname, char *classname)
return 0;
}
ret = NSLinkModule( image, filename,
- NSLINKMODULE_OPTION_BINDNOW + NSLINKMODULE_OPTION_PRIVATE);
-
+ NSLINKMODULE_OPTION_BINDNOW |
+ //NSLINKMODULE_OPTION_PRIVATE |
+ NSLINKMODULE_OPTION_RETURN_ON_ERROR);
+
+ if (ret == NULL) {
+ int err;
+ const char *fname, *errt;
+ NSLinkEditErrors c;
+ NSLinkEditError(&c, &err, &fname, &errt);
+ post("link error %d %s %s", err, fname, errt);
+ return 0;
+ }
s = NSLookupSymbolInModule(ret, symname);
if (s)
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 8e818a79..82fc48e4 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -2,7 +2,7 @@
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-char pd_version[] = "Pd version 0.39 TEST 0\n";
+char pd_version[] = "Pd version 0.39 TEST 2\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;
@@ -60,6 +60,7 @@ int sys_nmidiin = 1;
int sys_midiindevlist[MAXMIDIINDEV] = {1};
int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
+char sys_font[] = "courier"; /* tb: font name */
static int sys_main_srate;
static int sys_main_advance;
@@ -254,7 +255,7 @@ int sys_main(int argc, char **argv)
#ifndef MSW
sys_rcfile(); /* parse the startup file */
#endif
- if (sys_argparse(argc, argv)) /* parse cmd line */
+ if (sys_argparse(argc-1, argv+1)) /* parse cmd line */
return (1);
sys_afterargparse(); /* post-argparse settings */
if (sys_verbose || sys_version) fprintf(stderr, "%scompiled %s %s\n",
@@ -358,6 +359,7 @@ static char *(usagemessage[]) = {
"-open <file> -- open file(s) on startup\n",
"-lib <file> -- load object library(s)\n",
"-font <n> -- specify default font size in points\n",
+"-typeface <name> -- specify default font (default: courier)\n",
"-verbose -- extra printout on startup and when searching for files\n",
"-version -- don't run Pd; just print out which version it is \n",
"-d <n> -- specify debug level\n",
@@ -507,7 +509,6 @@ int sys_argparse(int argc, char **argv)
{
char sbuf[MAXPDSTRING];
int i;
- argc--; argv++;
while ((argc > 0) && **argv == '-')
{
if (!strcmp(*argv, "-r") && argc > 1 &&
@@ -712,9 +713,17 @@ int sys_argparse(int argc, char **argv)
argc -= 2;
argv += 2;
}
+ /* tb: font name { */
+ else if (!strcmp(*argv, "-typeface") && argc > 1)
+ {
+ strcpy(sys_font,*(argv+1));
+ argc -= 2;
+ argv += 2;
+ }
+ /* } tb */
else if (!strcmp(*argv, "-verbose"))
{
- sys_verbose = 1;
+ sys_verbose++;
argc--; argv++;
}
else if (!strcmp(*argv, "-version"))
diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index bce151f6..076f2822 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -359,13 +359,13 @@ void open_via_helppath(const char *name, const char *dir)
/* Startup file reading for linux and MACOSX. As of 0.38 this will be
deprecated in favor of the "settings" mechanism */
+int sys_argparse(int argc, char **argv);
+
#ifndef MSW
#define STARTUPNAME ".pdrc"
#define NUMARGS 1000
-int sys_argparse(int argc, char **argv);
-
int sys_rcfile(void)
{
FILE* file;
@@ -420,7 +420,7 @@ int sys_rcfile(void)
}
else post("no RC file arguments found");
}
- if (sys_argparse(rcargc, rcargv))
+ if (sys_argparse(rcargc-1, rcargv+1))
{
post("error parsing RC arguments");
return (1);
@@ -434,13 +434,12 @@ void sys_doflags( void)
int i, beginstring = 0, state = 0, len = strlen(sys_flags->s_name);
int rcargc = 0;
char *rcargv[MAXPDSTRING];
-
if (len > MAXPDSTRING)
{
post("flags: %s: too long", sys_flags->s_name);
return;
}
- for (i = 0; i < len; i++)
+ for (i = 0; i < len+1; i++)
{
int c = sys_flags->s_name[i];
if (state == 0)
@@ -464,11 +463,12 @@ void sys_doflags( void)
rcargc++;
if (rcargc >= MAXPDSTRING)
break;
+ state = 0;
}
}
}
if (sys_argparse(rcargc, rcargv))
- post("error parsing RC arguments");
+ post("error parsing startup arguments");
}
/* undo pdtl_encodedialog. This allows dialogs to send spaces, commas,
@@ -480,7 +480,7 @@ t_symbol *sys_decodedialog(t_symbol *s)
if (*sp != '+')
bug("sys_decodedialog: %s", sp);
else sp++;
- for (i = 0; i < MAXPDSTRING-1; i++)
+ for (i = 0; i < MAXPDSTRING-1; i++, sp++)
{
if (!sp[0])
break;
@@ -497,8 +497,8 @@ t_symbol *sys_decodedialog(t_symbol *s)
else if (sp[1] == 'd')
buf[i] = '$', sp++;
else buf[i] = sp[0];
- sp++;
}
+ else buf[i] = sp[0];
}
buf[i] = 0;
return (gensym(buf));
diff --git a/pd/src/s_print.c b/pd/src/s_print.c
index aefd89ba..1d7695d1 100644
--- a/pd/src/s_print.c
+++ b/pd/src/s_print.c
@@ -110,6 +110,24 @@ void error(const char *fmt, ...)
dopost(buf);
}
+void verbose(int level, const char *fmt, ...)
+{
+ char buf[MAXPDSTRING];
+ va_list ap;
+ t_int arg[8];
+ int i;
+ if(level>sys_verbose)return;
+ dopost("verbose(");
+ postfloat((float)level);
+ dopost("):");
+
+ va_start(ap, fmt);
+ vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
+ va_end(ap);
+ strcat(buf, "\n");
+ dopost(buf);
+}
+
/* here's the good way to log errors -- keep a pointer to the
offending or offended object around so the user can search for it
later. */
diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk
index dcb1e31b..7e11b5f3 100644
--- a/pd/src/u_main.tk
+++ b/pd/src/u_main.tk
@@ -50,6 +50,18 @@ if {$pd_nt == 2} {
set pd_guidir $pd_gui2/..
load $pd_guidir/bin/pdtcl
set pd_tearoff 0
+
+ # tk::mac::OpenDocument is called with the filenames put into the
+ # var args whenever docs are either dropped on the Pd.app icon or
+ # opened from the Finder.
+ # It uses menu_doc_open so it can handles numerous file types.
+ proc tk::mac::OpenDocument {args} {
+ foreach file $args {
+ pd [concat pd open [pdtk_enquote [file tail $file]] \
+ [pdtk_enquote [file dirname $file]] \;]
+ menu_doc_open [file dirname $file] [file tail $file]
+ }
+ }
}
# hack so you can easily test-run this script in linux... define pd_guidir
@@ -74,6 +86,8 @@ bind Text <Control-s> {}
# puts stderr [bind all]
################## set up main window #########################
+# the menus are instantiated here for the main window
+# for the patch windows, they are created by pdtk_canvas_new
menu .mbar
canvas .dummy -height 2p -width 6c
@@ -88,13 +102,25 @@ menu .mbar.audio -tearoff $pd_tearoff
if {$pd_nt != 2} {
.mbar add cascade -label "Windows" -menu .mbar.windows
.mbar add cascade -label "Media" -menu .mbar.audio
+# a menu on the main menubar named $whatever.help while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+ menu .mbar.help -tearoff $pd_tearoff
+ .mbar add cascade -label "Help" -menu .mbar.help
} else {
-# Perhaps this is silly, but Mac HIG want "Window Help" as the last menus
+ menu .mbar.apple -tearoff 0
+ .mbar add cascade -label "Apple" -menu .mbar.apple
+# arrange menus according to Apple HIG
.mbar add cascade -label "Media" -menu .mbar.audio
- .mbar add cascade -label "Windows" -menu .mbar.windows
+ .mbar add cascade -label "Window" -menu .mbar.windows
+# a menu on the main menubar named "$whatever.help" while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+# Apple doesn't allow cascading menus in their Help so I had to call this
+# one $mbar.docs # <hans@at.or.at>
+ menu .mbar.docs -tearoff $pd_tearoff
+ .mbar add cascade -label "Help" -menu .mbar.docs
}
-menu .mbar.help -tearoff $pd_tearoff
-.mbar add cascade -label "Help" -menu .mbar.help
set ctrls_audio_on 0
set ctrls_meter_on 0
@@ -263,22 +289,26 @@ proc menu_new {} {
proc menu_open {} {
global pd_opendir
-
set filename [tk_getOpenFile -defaultextension .pd \
-filetypes { {{pd files} {.pd}} {{max files} {.pat}}} \
-initialdir $pd_opendir]
+ if {$filename != ""} {open_file $filename}
+}
- if {$filename != ""} {
- set directory [string range $filename 0 \
- [expr [string last / $filename ] - 1]]
- set pd_opendir $directory
- set basename [string range $filename \
- [expr [string last / $filename ] + 1] end]
-
-# pd_debug [concat file $filename base $basename dir $directory]
+proc open_file {filename} {
+ global pd_opendir
+ set directory [string range $filename 0 [expr [string last / $filename] - 1]]
+ set pd_opendir $directory
+ set basename [string range $filename [expr [string last / $filename] + 1] end]
+ if {[string last .pd $filename] >= 0} {
+ pd "pd open [pdtk_enquote $basename] [pdtk_enquote $directory] ;"
+ }
+}
- pd [concat pd open [pdtk_enquote $basename] \
- [pdtk_enquote $directory]\;]
+catch {
+ package require tkdnd
+ dnd bindtarget . text/uri-list <Drop> {
+ foreach file %D {open_file $file}
}
}
@@ -311,13 +341,15 @@ proc menu_audio {flag} {pd [concat pd dsp $flag \;]}
set doc_number 1
+# open text docs in a Pd window
proc menu_opentext {filename} {
global doc_number
global pd_guidir
global pd_myversion
+ global pd_font3
set name [format ".help%d" $doc_number]
toplevel $name
- text $name.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \
+ text $name.text -relief raised -bd 2 -font $pd_font3 \
-yscrollcommand "$name.scroll set" -background white
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
@@ -334,15 +366,34 @@ proc menu_opentext {filename} {
set doc_number [expr $doc_number + 1]
}
+# open HTML docs from the menu using the OS-default HTML viewer
+proc menu_openhtml {filename} {
+ global pd_nt
+
+ if {$pd_nt == 0} {
+ exec sh -c \
+ [format "firefox file:%s || mozilla file:%s &\n" \
+ $filename $filename]
+ } elseif {$pd_nt == 2} {
+ puts stderr [format "open %s" $filename]
+ exec sh -c [format "open %s" $filename]
+ } else {
+ exec rundll32 url.dll,FileProtocolHandler \
+ [format "file:%s" $filename] &
+ }
+}
+
set help_directory $pd_guidir/doc
+set help_top_directory $pd_guidir/doc
proc menu_documentation {} {
global help_directory
global pd_nt
+ global pd_guidir
if {$pd_nt == 2} {
exec rm -rf /tmp/pd-documentation
- exec cp -pr $help_directory /tmp/pd-documentation
+ exec cp -pr $pd_guidir/doc /tmp/pd-documentation
set filename [tk_getOpenFile -defaultextension .pd \
-filetypes { {{documentation} {.pd .txt .htm}} } \
-initialdir /tmp/pd-documentation]
@@ -355,18 +406,7 @@ proc menu_documentation {} {
if {[string first .txt $filename] >= 0} {
menu_opentext $filename
} elseif {[string first .htm $filename] >= 0} {
- if {$pd_nt == 0} {
- exec sh -c \
- [format "mozilla file:%s || netscape file:%s &\n" \
- $filename $filename]
- } elseif {$pd_nt == 2} {
- puts stderr [format "open %s" $filename]
- exec sh -c \
- [format "open %s" $filename]
- } else {
- exec rundll32 url.dll,FileProtocolHandler \
- [format "file:%s" $filename] &
- }
+ menu_openhtml $filename
} else {
set help_directory [string range $filename 0 \
[expr [string last / $filename ] - 1]]
@@ -383,18 +423,43 @@ proc menu_doc_open {subdir basename} {
set dirname $pd_guidir/$subdir
- if {[string first .txt $basename] >= 0} {
+ if {[regexp ".*\.(txt|c)$" $basename]} {
menu_opentext $dirname/$basename
+ } elseif {[regexp ".*\.html?$" $basename]} {
+ menu_openhtml $dirname/$basename
} else {
pd [concat pd open [pdtk_enquote $basename] \
[pdtk_enquote $dirname] \;]
}
}
-############# routine to add audio and help menus ###############
+proc doc_submenu {helpmenu subdir} {
+ global help_top_directory pd_tearoff
+
+ set menudir $help_top_directory/$subdir
+
+ regsub -all "\\\." $subdir "" submenu
+
+ menu $helpmenu.$submenu -tearoff $pd_tearoff
+ regsub -all "\\\." $subdir " " submenuname
+ $helpmenu add cascade -label $submenuname \
+ -menu $helpmenu.$submenu
+ catch {
+# use this glob pattern to exclude the supporting files
+# foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ]
+ foreach file [ lsort [ glob -dir $menudir * ] ] {
+ set filename ""
+ regsub {.*/(.*\..+$)} $file {\1} filename
+ $helpmenu.$submenu add command -label $filename \
+ -command "menu_doc_open doc/$subdir $filename"
+ }
+ }
+}
+
+############# routine to add media, help, and apple menu items ###############
proc menu_addstd {mbar} {
- global pd_apilist
+ global pd_apilist pd_nt pd_tearoff
# the "Audio" menu
$mbar.audio add command -label {audio ON} -accelerator [accel_munge "Ctrl+/"] \
-command {menu_audio 1}
@@ -406,21 +471,66 @@ proc menu_addstd {mbar} {
-value [lindex [lindex $pd_apilist $x] 1]\
-command {pd [concat pd audio-setapi $pd_whichapi \;]}
}
+ if {$pd_nt != 2} {
$mbar.audio add command -label {Audio settings...} \
-command {pd pd audio-properties \;}
-
$mbar.audio add command -label {MIDI settings...} \
-command {pd pd midi-properties \;}
+ }
+
$mbar.audio add command -label {Test Audio and MIDI} \
-command {menu_doc_open doc/7.stuff/tools testtone.pd}
$mbar.audio add command -label {Load Meter} \
-command {menu_doc_open doc/7.stuff/tools load-meter.pd}
+# the MacOS X app menu
+
+# The menu on the main menubar named $whatever.apple while be treated
+# as a special menu on MacOS X. Tcl/Tk assigns the $whatever.apple menu
+# to the app-specific menu in MacOS X that is named after the app,
+# so in our case, the Pd menu. <hans@at.or.at>
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+ if {$pd_nt == 2} {
+ $mbar.apple add command -label "About Pd..." -command \
+ {menu_doc_open doc/1.manual 1.introduction.txt}
+ menu $mbar.apple.preferences -tearoff 0
+ $mbar.apple add cascade -label "Preferences" -menu $mbar.apple.preferences
+ $mbar.apple.preferences add command -label "Path..." \
+ -command {pd pd start-path-dialog \;}
+ $mbar.apple.preferences add command -label "Startup..." \
+ -command {pd pd start-startup-dialog \;}
+ $mbar.apple.preferences add command -label "Audio Settings..." \
+ -command {pd pd audio-properties \;}
+ $mbar.apple.preferences add command -label "MIDI settings..." \
+ -command {pd pd midi-properties \;}
+ }
+
+
# the "Help" menu
+ if {$pd_nt != 2} {
+# a menu on the main menubar named "$whatever.help" while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
$mbar.help add command -label {About Pd} \
-command {menu_doc_open doc/1.manual 1.introduction.txt}
$mbar.help add command -label {Pure Documentation...} \
-command {menu_documentation}
+ # add menu items for each section instead of using Pd patches
+ $mbar.help add separator
+ set helpmenuname help
+ } else {
+# Apple doesn't allow cascading menus in their Help so I had to call this
+# one "docs" <hans@at.or.at>
+ set helpmenuname docs
+ }
+
+ $mbar.$helpmenuname add command -label {1 manual...} \
+ -command {menu_doc_open doc/1.manual index.htm}
+ doc_submenu $mbar.$helpmenuname 2.control.examples
+ doc_submenu $mbar.$helpmenuname 3.audio.examples
+ doc_submenu $mbar.$helpmenuname 4.fft.examples
+ doc_submenu $mbar.$helpmenuname 5.reference
+ doc_submenu $mbar.$helpmenuname 6.externs
}
#################### the "File" menu for the Pd window ##############
@@ -432,16 +542,20 @@ proc menu_addstd {mbar} {
.mbar.file add separator
.mbar.file add command -label Message -command {menu_send} \
-accelerator [accel_munge "Ctrl+m"]
+# On MacOS X, these are in the standard HIG locations
+# i.e. the Preferences menu under "Pd"
+if {$pd_nt != 2} {
.mbar.file add command -label Path... \
-command {pd pd start-path-dialog \;}
.mbar.file add command -label Startup... \
-command {pd pd start-startup-dialog \;}
+}
.mbar.file add separator
.mbar.file add command -label Quit -command {menu_quit} \
-accelerator [accel_munge "Ctrl+q"]
#################### the "Find" menu for the Pd window ##############
-.mbar.find add command -label {last error?} -command {menu_finderror}
+.mbar.find add command -label {Find last error} -command {menu_finderror}
########### functions for menu functions on document windows ########
@@ -466,6 +580,7 @@ proc menu_print {name} {
}
proc menu_close {name} {
+ pdtk_canvas_checkgeometry $name
pd [concat $name menuclose \;]
}
@@ -721,8 +836,22 @@ proc pdtk_canvas_new {name width height geometry editable} {
global pd_nt
toplevel $name -menu $name.m
-# puts stderr [concat geometry: $geometry]
- wm geometry $name $geometry
+
+# slide offscreen windows into view
+ set geometry [split $geometry +]
+ set i 1
+ foreach geo {width height} {
+ set screen($geo) [winfo screen$geo .]
+ if {[expr [lindex $geometry $i] + [set $geo]] > $screen($geo)} {
+ set pos($geo) [expr $screen($geo) - [set $geo]]
+ if {$pos($geo) < 0} {set pos($geo) 0}
+ lset geometry $i $pos($geo)
+ }
+ incr i
+ }
+ set geometry [join $geometry +]
+
+ wm geometry $name $geometry
canvas $name.c -width $width -height $height -background white \
-yscrollcommand "$name.scrollvert set" \
-xscrollcommand "$name.scrollhort set" \
@@ -739,6 +868,9 @@ proc pdtk_canvas_new {name width height geometry editable} {
wm geometry $name $geometry
# the file menu
+# The menus are instantiated here for the patch windows.
+# For the main window, they are created on load, at the
+# top of this file.
menu $name.m
menu $name.m.file -tearoff $pd_tearoff
$name.m add cascade -label File -menu $name.m.file
@@ -753,11 +885,15 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.file add command -label Message -command {menu_send} \
-accelerator [accel_munge "Ctrl+m"]
+ # arrange menus according to Apple HIG
+ # these are now part of Preferences...
+ if {$pd_nt != 2 } {
$name.m.file add command -label Path... \
-command {pd pd start-path-dialog \;}
$name.m.file add command -label Startup... \
-command {pd pd start-startup-dialog \;}
+ }
$name.m.file add separator
$name.m.file add command -label Close \
@@ -823,6 +959,18 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.edit add separator
+# Apple, Microsoft, and others put find functions in the Edit menu.
+ $name.m.edit add command -label {Find...} \
+ -accelerator [accel_munge "Ctrl+f"] \
+ -command [concat menu_findobject $name]
+ $name.m.edit add command -label {Find Again} \
+ -accelerator [accel_munge "Ctrl+g"] \
+ -command [concat menu_findagain $name]
+ $name.m.edit add command -label {Find last error} \
+ -command [concat menu_finderror]
+
+ $name.m.edit add separator
+
############iemlib##################
# instead of "red = #BC3C60" we take "grey85", so there is no difference,
# if widget is selected or not.
@@ -834,9 +982,242 @@ proc pdtk_canvas_new {name width height geometry editable} {
if { $editable == 0 } {
$name.m.edit entryconfigure "Edit mode" -indicatoron false }
+
############iemlib##################
+
+# the put menu
+ menu $name.m.put -tearoff $pd_tearoff
+ $name.m add cascade -label Put -menu $name.m.put
+
+ $name.m.put add command -label Object \
+ -command [concat menu_object $name 0] \
+ -accelerator [accel_munge "Ctrl+1"]
+
+ $name.m.put add command -label Message \
+ -command [concat menu_message $name 0] \
+ -accelerator [accel_munge "Ctrl+2"]
+
+ $name.m.put add command -label Number \
+ -command [concat menu_floatatom $name 0] \
+ -accelerator [accel_munge "Ctrl+3"]
+
+ $name.m.put add command -label Symbol \
+ -command [concat menu_symbolatom $name 0] \
+ -accelerator [accel_munge "Ctrl+4"]
+
+ $name.m.put add command -label Comment \
+ -command [concat menu_comment $name 0] \
+ -accelerator [accel_munge "Ctrl+5"]
+
+ $name.m.put add separator
+
+############iemlib##################
+
+ $name.m.put add command -label Bang \
+ -command [concat menu_bng $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+b"]
+
+ $name.m.put add command -label Toggle \
+ -command [concat menu_toggle $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+t"]
+
+ $name.m.put add command -label Number2 \
+ -command [concat menu_numbox $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+n"]
+
+ $name.m.put add command -label Vslider \
+ -command [concat menu_vslider $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+v"]
+
+ $name.m.put add command -label Hslider \
+ -command [concat menu_hslider $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+h"]
+
+ $name.m.put add command -label Vradio \
+ -command [concat menu_vradio $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+d"]
+
+ $name.m.put add command -label Hradio \
+ -command [concat menu_hradio $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+i"]
+
+ $name.m.put add command -label VU \
+ -command [concat menu_vumeter $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+u"]
+
+ $name.m.put add command -label Canvas \
+ -command [concat menu_mycnv $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+c"]
+
+############iemlib##################
+
+ $name.m.put add separator
+
+ $name.m.put add command -label Graph \
+ -command [concat menu_graph $name]
+
+ $name.m.put add command -label Array \
+ -command [concat menu_array $name]
+
+# the find menu
+# Apple, Microsoft, and others put find functions in the Edit menu.
+# But in order to move these items to the Edit menu, the Find menu
+# handling needs to be dealt with, including this line in g_canvas.c:
+# sys_vgui(".mbar.find delete %d\n", i);
+# <hans@at.or.at>
+ menu $name.m.find -tearoff $pd_tearoff
+ $name.m add cascade -label Find -menu $name.m.find
+
+ $name.m.find add command -label {Find...} \
+ -accelerator [accel_munge "Ctrl+f"] \
+ -command [concat menu_findobject $name]
+ $name.m.find add command -label {Find Again} \
+ -accelerator [accel_munge "Ctrl+g"] \
+ -command [concat menu_findagain $name]
+ $name.m.find add command -label {Find last error} \
+ -command [concat menu_finderror]
+
+# the window menu
+ menu $name.m.windows -postcommand [concat menu_fixwindowmenu $name] \
+ -tearoff $pd_tearoff
+
+ $name.m.windows add command -label {parent window}\
+ -command [concat menu_windowparent $name]
+ $name.m.windows add command -label {Pd window} -command menu_pop_pd
+ $name.m.windows add separator
+
+# the audio menu
+ menu $name.m.audio -tearoff $pd_tearoff
+
+ if {$pd_nt != 2} {
+ $name.m add cascade -label Windows -menu $name.m.windows
+ $name.m add cascade -label Media -menu $name.m.audio
+ } else {
+ $name.m add cascade -label Media -menu $name.m.audio
+ $name.m add cascade -label Window -menu $name.m.windows
+# the MacOS X app menu
+ menu $name.m.apple -tearoff $pd_tearoff
+ $name.m add cascade -label "Apple" -menu $name.m.apple
+ }
+
+# the help menu
+
+# a menu on the main menubar named "$whatever.help" while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+ if {$pd_nt != 2} {
+ menu $name.m.help -tearoff $pd_tearoff
+ $name.m add cascade -label Help -menu $name.m.help
+ } else {
+ # Apple doesn't allow cascading menus in their Help
+ # so I had to call this one "docs". <hans@at.or.at>
+ menu $name.m.docs -tearoff $pd_tearoff
+ $name.m add cascade -label Help -menu $name.m.docs
+ }
+
+ menu_addstd $name.m
+
+# the popup menu
+ menu $name.popup -tearoff false
+ $name.popup add command -label {Properties} \
+ -command [concat popup_action $name 0]
+ $name.popup add command -label {Open} \
+ -command [concat popup_action $name 1]
+ $name.popup add command -label {Help} \
+ -command [concat popup_action $name 2]
+
+# WM protocol
+ wm protocol $name WM_DELETE_WINDOW [concat menu_close $name]
+
+# bindings.
+# this is idiotic -- how do you just sense what mod keys are down and
+# pass them on? I can't find it anywhere.
+# Here we encode shift as 1, control 2, alt 4, in agreement
+# with definitions in g_canvas.c. The third button gets "8" but we don't
+# bother with modifiers there.
+# We don't handle multiple clicks yet.
+
+ bind $name.c <Button> {pdtk_canvas_click %W %x %y %b 0}
+ bind $name.c <Shift-Button> {pdtk_canvas_click %W %x %y %b 1}
+ bind $name.c <Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 3}
+ # Alt key is called Option on the Mac
+ if {$pd_nt == 2} {
+ bind $name.c <Option-Button> {pdtk_canvas_click %W %x %y %b 4}
+ bind $name.c <Option-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
+ bind $name.c <Option-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
+ bind $name.c <Option-Control-Shift-Button> \
+ {pdtk_canvas_click %W %x %y %b 7}
+ } else {
+ bind $name.c <Alt-Button> {pdtk_canvas_click %W %x %y %b 4}
+ bind $name.c <Alt-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
+ bind $name.c <Alt-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
+ bind $name.c <Alt-Control-Shift-Button> \
+ {pdtk_canvas_click %W %x %y %b 7}
+ }
+ global pd_nt
+# button 2 is the right button on Mac; on other platforms it's button 3.
+ if {$pd_nt == 2} {
+ bind $name.c <Button-2> {pdtk_canvas_click %W %x %y %b 8}
+ bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 8}
+ } else {
+ bind $name.c <Button-3> {pdtk_canvas_click %W %x %y %b 8}
+ bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 2}
+ }
+#on linux, button 2 "pastes" from the X windows clipboard
+ if {$pd_nt == 0} {
+ bind $name.c <Button-2> {\
+ pdtk_canvas_click %W %x %y %b 0;\
+ pdtk_canvas_mouseup %W %x %y %b;\
+ pdtk_pastetext}
+ }
+
+ bind $name.c <ButtonRelease> {pdtk_canvas_mouseup %W %x %y %b}
+ bind $name.c <Control-Key> {pdtk_canvas_ctrlkey %W %K 0}
+ bind $name.c <Control-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
+# bind $name.c <Mod1-Key> {puts stderr [concat mod1 %W %K %A]}
+ if {$pd_nt == 2} {
+ bind $name.c <Mod1-Key> {pdtk_canvas_ctrlkey %W %K 0}
+ bind $name.c <Mod1-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
+ }
+ bind $name.c <Key> {pdtk_canvas_key %W %K %A 0}
+ bind $name.c <Shift-Key> {pdtk_canvas_key %W %K %A 1}
+ bind $name.c <KeyRelease> {pdtk_canvas_keyup %W %K %A}
+ bind $name.c <Motion> {pdtk_canvas_motion %W %x %y 0}
+ bind $name.c <Control-Motion> {pdtk_canvas_motion %W %x %y 2}
+ if {$pd_nt == 2} {
+ bind $name.c <Option-Motion> {pdtk_canvas_motion %W %x %y 4}
+ } else {
+ bind $name.c <Alt-Motion> {pdtk_canvas_motion %W %x %y 4}
+ }
+ bind $name.c <Map> {pdtk_canvas_map %W}
+ bind $name.c <Unmap> {pdtk_canvas_unmap %W}
+ focus $name.c
+
+ switch $pd_nt { 0 {
+ bind $name.c <Button-4> "pdtk_canvas_scroll $name.c y -1"
+ bind $name.c <Button-5> "pdtk_canvas_scroll $name.c y +1"
+ bind $name.c <Shift-Button-4> "pdtk_canvas_scroll $name.c x -1"
+ bind $name.c <Shift-Button-5> "pdtk_canvas_scroll $name.c x +1"
+ } default {
+ bind $name.c <MouseWheel> \
+ "pdtk_canvas_scroll $name.c y \[expr -abs(%D)/%D\]"
+ bind $name.c <Shift-MouseWheel> \
+ "pdtk_canvas_scroll $name.c x \[expr -abs(%D)/%D\]"
+ }}
+
+ catch {
+ dnd bindtarget $name.c text/uri-list <Drop> \
+ "pdtk_canvas_makeobjs $name %D %x %y"
+ }
+
+# puts stderr "all done"
+# after 1 [concat raise $name]
+ global pdtk_canvas_mouseup_name
+ set pdtk_canvas_mouseup_name ""
+}
+
#### jsarlo #####
proc pdtk_array_listview_setpage {arrayName page} {
global pd_array_listview_page
@@ -1041,203 +1422,6 @@ proc pdtk_array_listview_close {id arrayName} {
}
##### end jsarlo #####
-# the put menu
- menu $name.m.put -tearoff $pd_tearoff
- $name.m add cascade -label Put -menu $name.m.put
-
- $name.m.put add command -label Object \
- -command [concat menu_object $name 0] \
- -accelerator [accel_munge "Ctrl+1"]
-
- $name.m.put add command -label Message \
- -command [concat menu_message $name 0] \
- -accelerator [accel_munge "Ctrl+2"]
-
- $name.m.put add command -label Number \
- -command [concat menu_floatatom $name 0] \
- -accelerator [accel_munge "Ctrl+3"]
-
- $name.m.put add command -label Symbol \
- -command [concat menu_symbolatom $name 0] \
- -accelerator [accel_munge "Ctrl+4"]
-
- $name.m.put add command -label Comment \
- -command [concat menu_comment $name 0] \
- -accelerator [accel_munge "Ctrl+5"]
-
- $name.m.put add separator
-
-############iemlib##################
-
- $name.m.put add command -label Bang \
- -command [concat menu_bng $name 0] \
- -accelerator [accel_munge "Alt+b"]
-
- $name.m.put add command -label Toggle \
- -command [concat menu_toggle $name 0] \
- -accelerator [accel_munge "Alt+t"]
-
- $name.m.put add command -label Number2 \
- -command [concat menu_numbox $name 0] \
- -accelerator [accel_munge "Alt+n"]
-
- $name.m.put add command -label Vslider \
- -command [concat menu_vslider $name 0] \
- -accelerator [accel_munge "Alt+v"]
-
- $name.m.put add command -label Hslider \
- -command [concat menu_hslider $name 0] \
- -accelerator [accel_munge "Alt+h"]
-
- $name.m.put add command -label Vradio \
- -command [concat menu_vradio $name 0] \
- -accelerator [accel_munge "Alt+d"]
-
- $name.m.put add command -label Hradio \
- -command [concat menu_hradio $name 0] \
- -accelerator [accel_munge "Alt+i"]
-
- $name.m.put add command -label VU \
- -command [concat menu_vumeter $name 0] \
- -accelerator [accel_munge "Alt+u"]
-
- $name.m.put add command -label Canvas \
- -command [concat menu_mycnv $name 0] \
- -accelerator [accel_munge "Alt+c"]
-
-############iemlib##################
-
- $name.m.put add separator
-
- $name.m.put add command -label Graph \
- -command [concat menu_graph $name]
-
- $name.m.put add command -label Array \
- -command [concat menu_array $name]
-
-# the find menu
- menu $name.m.find -tearoff $pd_tearoff
- $name.m add cascade -label Find -menu $name.m.find
-
- $name.m.find add command -label {Find...} \
- -accelerator [accel_munge "Ctrl+f"] \
- -command [concat menu_findobject $name]
- $name.m.find add command -label {Find Again} \
- -accelerator [accel_munge "Ctrl+g"] \
- -command [concat menu_findagain $name]
- $name.m.find add command -label {Find last error} \
- -command [concat menu_finderror]
-
-# the window menu
- menu $name.m.windows -postcommand [concat menu_fixwindowmenu $name] \
- -tearoff $pd_tearoff
-
- $name.m.windows add command -label {parent window}\
- -command [concat menu_windowparent $name]
- $name.m.windows add command -label {Pd window} -command menu_pop_pd
- $name.m.windows add separator
-
-# the audio menu
- menu $name.m.audio -tearoff $pd_tearoff
-
- if {$pd_nt != 2} {
- $name.m add cascade -label Windows -menu $name.m.windows
- $name.m add cascade -label Media -menu $name.m.audio
- } else {
- $name.m add cascade -label Media -menu $name.m.audio
- $name.m add cascade -label Window -menu $name.m.windows
- }
-
-# the help menu
- menu $name.m.help -tearoff $pd_tearoff
- $name.m add cascade -label Help -menu $name.m.help
-
- menu_addstd $name.m
-
-# the popup menu
- menu $name.popup -tearoff false
- $name.popup add command -label {Properties} \
- -command [concat popup_action $name 0]
- $name.popup add command -label {Open} \
- -command [concat popup_action $name 1]
- $name.popup add command -label {Help} \
- -command [concat popup_action $name 2]
-
-# WM protocol
- wm protocol $name WM_DELETE_WINDOW [concat menu_close $name]
-
-# bindings.
-# this is idiotic -- how do you just sense what mod keys are down and
-# pass them on? I can't find it anywhere.
-# Here we encode shift as 1, control 2, alt 4, in agreement
-# with definitions in g_canvas.c. The third button gets "8" but we don't
-# bother with modifiers there.
-# We don't handle multiple clicks yet.
-
- bind $name.c <Button> {pdtk_canvas_click %W %x %y %b 0}
- bind $name.c <Shift-Button> {pdtk_canvas_click %W %x %y %b 1}
- bind $name.c <Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 3}
- # Alt key is called Option on the Mac
- if {$pd_nt == 2} {
- bind $name.c <Option-Button> {pdtk_canvas_click %W %x %y %b 4}
- bind $name.c <Option-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
- bind $name.c <Option-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
- bind $name.c <Option-Control-Shift-Button> \
- {pdtk_canvas_click %W %x %y %b 7}
- } else {
- bind $name.c <Alt-Button> {pdtk_canvas_click %W %x %y %b 4}
- bind $name.c <Alt-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
- bind $name.c <Alt-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
- bind $name.c <Alt-Control-Shift-Button> \
- {pdtk_canvas_click %W %x %y %b 7}
- }
- global pd_nt
-# button 2 is the right button on Mac; on other platforms it's button 3.
- if {$pd_nt == 2} {
- bind $name.c <Button-2> {pdtk_canvas_click %W %x %y %b 8}
- bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 8}
- } else {
- bind $name.c <Button-3> {pdtk_canvas_click %W %x %y %b 8}
- bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 2}
- }
-#on linux, button 2 "pastes" from the X windows clipboard
- if {$pd_nt == 0} {
- bind $name.c <Button-2> {\
- pdtk_canvas_click %W %x %y %b 0;\
- pdtk_canvas_mouseup %W %x %y %b;\
- pdtk_pastetext}
- }
-
- bind $name.c <ButtonRelease> {pdtk_canvas_mouseup %W %x %y %b}
- bind $name.c <Control-Key> {pdtk_canvas_ctrlkey %W %K 0}
- bind $name.c <Control-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
- if {$pd_nt == 2} {
- bind $name.c <Option-Key> {pdtk_canvas_altkey %W %K %A}
- } else {
- bind $name.c <Alt-Key> {pdtk_canvas_altkey %W %K %A}
- }
-# bind $name.c <Mod1-Key> {puts stderr [concat mod1 %W %K %A]}
- if {$pd_nt == 2} {
- bind $name.c <Mod1-Key> {pdtk_canvas_ctrlkey %W %K 0}
- bind $name.c <Mod1-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
- }
- bind $name.c <Key> {pdtk_canvas_key %W %K %A 0}
- bind $name.c <Shift-Key> {pdtk_canvas_key %W %K %A 1}
- bind $name.c <KeyRelease> {pdtk_canvas_keyup %W %K %A}
- bind $name.c <Motion> {pdtk_canvas_motion %W %x %y 0}
- bind $name.c <Control-Motion> {pdtk_canvas_motion %W %x %y 2}
- if {$pd_nt == 2} {
- bind $name.c <Option-Motion> {pdtk_canvas_motion %W %x %y 4}
- } else {
- bind $name.c <Alt-Motion> {pdtk_canvas_motion %W %x %y 4}
- }
- bind $name.c <Map> {pdtk_canvas_map %W}
- bind $name.c <Unmap> {pdtk_canvas_unmap %W}
- focus $name.c
-# puts stderr "all done"
-# after 1 [concat raise $name]
-}
-
#################### event binding procedures ################
#get the name of the toplevel window for a canvas; this is also
@@ -1376,49 +1560,11 @@ proc pdtk_canvas_keyup {name key iso} {
}
}
-proc pdtk_canvas_altkey {name key iso} {
-# puts stderr [concat alt-key $iso]
-############iemlib##################
- set topname [string trimright $name .c]
- if {$key == "b" || $key == "B"} {menu_bng $topname 1}
- if {$key == "t" || $key == "T"} {menu_toggle $topname 1}
- if {$key == "n" || $key == "N"} {menu_numbox $topname 1}
- if {$key == "v" || $key == "V"} {menu_vslider $topname 1}
- if {$key == "h" || $key == "H"} {menu_hslider $topname 1}
- if {$key == "i" || $key == "I"} {menu_hradio $topname 1}
- if {$key == "d" || $key == "D"} {menu_vradio $topname 1}
- if {$key == "u" || $key == "U"} {menu_vumeter $topname 1}
- if {$key == "c" || $key == "C"} {menu_mycnv $topname 1}
-############iemlib##################
-}
-
proc pdtk_canvas_ctrlkey {name key shift} {
# first get rid of ".c" suffix; we'll refer to the toplevel instead
set topname [string trimright $name .c]
# puts stderr [concat ctrl-key $key $topname]
- if {$key == "n" || $key == "N"} {menu_new}
- if {$key == "o" || $key == "O"} {menu_open}
- if {$key == "m" || $key == "M"} {menu_send}
- if {$key == "q" || $key == "Q"} {
- if {$shift == 1} {menu_really_quit} else {menu_quit}
- }
- if {$key == "s" || $key == "S"} {
- if {$shift == 1} {menu_saveas $topname} else {menu_save $topname}
- }
- if {$key == "z" || $key == "Z"} {
- if {$shift == 1} {menu_redo $topname} else {menu_undo $topname}
- }
- if {$key == "w" || $key == "W"} {menu_close $topname}
- if {$key == "p" || $key == "P"} {menu_print $topname}
- if {$key == "x" || $key == "X"} {menu_cut $topname}
- if {$key == "c" || $key == "C"} {menu_copy $topname}
- if {$key == "v" || $key == "V"} {menu_paste $topname}
- if {$key == "d" || $key == "D"} {menu_duplicate $topname}
- if {$key == "a" || $key == "A"} {menu_selectall $topname}
- if {$key == "t" || $key == "T"} {menu_texteditor $topname}
- if {$key == "f" || $key == "F"} {menu_findobject $topname}
- if {$key == "g" || $key == "G"} {menu_findagain $topname}
if {$key == "1"} {menu_object $topname 1}
if {$key == "2"} {menu_message $topname 1}
if {$key == "3"} {menu_floatatom $topname 1}
@@ -1426,7 +1572,42 @@ proc pdtk_canvas_ctrlkey {name key shift} {
if {$key == "5"} {menu_comment $topname 1}
if {$key == "slash"} {menu_audio 1}
if {$key == "period"} {menu_audio 0}
- if {$key == "e" || $key == "E"} {menu_editmode $topname}
+ if {$shift == 1} {
+ if {$key == "q" || $key == "Q"} {menu_really_quit}
+ if {$key == "s" || $key == "S"} {menu_saveas $topname}
+ if {$key == "z" || $key == "Z"} {menu_redo $topname}
+ if {$key == "b" || $key == "B"} {menu_bng $topname 1}
+ if {$key == "t" || $key == "T"} {menu_toggle $topname 1}
+ if {$key == "n" || $key == "N"} {menu_numbox $topname 1}
+ if {$key == "v" || $key == "V"} {menu_vslider $topname 1}
+ if {$key == "h" || $key == "H"} {menu_hslider $topname 1}
+ if {$key == "i" || $key == "I"} {menu_hradio $topname 1}
+ if {$key == "d" || $key == "D"} {menu_vradio $topname 1}
+ if {$key == "u" || $key == "U"} {menu_vumeter $topname 1}
+ if {$key == "c" || $key == "C"} {menu_mycnv $topname 1}
+ } else {
+ if {$key == "e" || $key == "E"} {menu_editmode $topname}
+ if {$key == "q" || $key == "Q"} {menu_quit}
+ if {$key == "s" || $key == "S"} {menu_save $topname}
+ if {$key == "z" || $key == "Z"} {menu_undo $topname}
+ if {$key == "n" || $key == "N"} {menu_new}
+ if {$key == "o" || $key == "O"} {menu_open}
+ if {$key == "m" || $key == "M"} {menu_send}
+ if {$key == "w" || $key == "W"} {menu_close $topname}
+ if {$key == "p" || $key == "P"} {menu_print $topname}
+ if {$key == "x" || $key == "X"} {menu_cut $topname}
+ if {$key == "c" || $key == "C"} {menu_copy $topname}
+ if {$key == "v" || $key == "V"} {menu_paste $topname}
+ if {$key == "d" || $key == "D"} {menu_duplicate $topname}
+ if {$key == "a" || $key == "A"} {menu_selectall $topname}
+ if {$key == "t" || $key == "T"} {menu_texteditor $topname}
+ if {$key == "f" || $key == "F"} {menu_findobject $topname}
+ if {$key == "g" || $key == "G"} {menu_findagain $topname}
+ }
+}
+
+proc pdtk_canvas_scroll {canvas xy distance} {
+ $canvas [list $xy]view scroll $distance units
}
proc pdtk_canvas_motion {name x y mods} {
@@ -1447,6 +1628,16 @@ proc pdtk_canvas_unmap {name} {
pd [canvastosym $name] map 0 \;
}
+proc pdtk_canvas_makeobjs {name files x y} {
+ set c 0
+ for {set n 0} {$n < [llength $files]} {incr n} {
+ if {[regexp {.*/(.+).pd$} [lindex $files $n] file obj] == 1} {
+ pd $name obj $x [expr $y + ($c * 30)] [pdtk_enquote $obj] \;
+ incr c
+ }
+ }
+}
+
set saveas_dir nowhere
############ pdtk_canvas_saveas -- run a saveas dialog ##############
@@ -2908,7 +3099,7 @@ proc dodata_ok {name} {
}
proc pdtk_data_dialog {name stuff} {
-
+ global pd_font3
toplevel $name
wm title $name {Atom}
wm protocol $name WM_DELETE_WINDOW [concat dodata_cancel $name]
@@ -2923,7 +3114,7 @@ proc pdtk_data_dialog {name stuff} {
pack $name.buttonframe.ok -side left -expand 1
text $name.text -relief raised -bd 2 -height 40 -width 60 \
- -yscrollcommand "$name.scroll set" -font -*-courier-bold--normal--12-*
+ -yscrollcommand "$name.scroll set" -font pd_font3
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
pack $name.text -side left -fill both -expand 1
@@ -2948,8 +3139,20 @@ proc pdtk_canvas_editval {name value} {
proc pdtk_text_new {canvasname myname x y text font color} {
# if {$font < 13} {set fontname [format -*-courier-bold----%d-* $font]}
# if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]}
+
+ global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
+ switch -- $font {
+ 8 { set typeface $pd_font1 }
+ 10 { set typeface $pd_font2 }
+ 12 { set typeface $pd_font3 }
+ 14 { set typeface $pd_font4 }
+ 16 { set typeface $pd_font5 }
+ 24 { set typeface $pd_font6 }
+ 36 { set typeface $pd_font7 }
+ }
+
$canvasname create text $x $y \
- -font [format -*-courier-bold--normal--%d-* $font] \
+ -font $typeface \
-tags $myname -text $text -fill $color -anchor nw
# pd [concat $myname size [$canvasname bbox $myname] \;]
}
@@ -2980,31 +3183,36 @@ proc pdtk_pd_ctrlkey {name key shift} {
# asked pd to open something. Also, get character width and height for
# font sizes 8, 10, 12, 14, 16, and 24.
-proc pdtk_pd_startup {version apilist} {
+# tb: user defined typefaces
+proc pdtk_pd_startup {version apilist fontname} {
+# puts stderr [concat $version $apilist $fontname]
global pd_myversion pd_apilist
set pd_myversion $version
set pd_apilist $apilist
-
- set width1 [font measure -*-courier-bold--normal--8-* x]
- set height1 [lindex [font metrics -*-courier-bold--normal--8-*] 5]
-
- set width2 [font measure -*-courier-bold--normal--10-* x]
- set height2 [lindex [font metrics -*-courier-bold--normal--10-*] 5]
-
- set width3 [font measure -*-courier-bold--normal--12-* x]
- set height3 [lindex [font metrics -*-courier-bold--normal--12-*] 5]
-
- set width4 [font measure -*-courier-bold--normal--14-* x]
- set height4 [lindex [font metrics -*-courier-bold--normal--14-*] 5]
-
- set width5 [font measure -*-courier-bold--normal--16-* x]
- set height5 [lindex [font metrics -*-courier-bold--normal--16-*] 5]
-
- set width6 [font measure -*-courier-bold--normal--24-* x]
- set height6 [lindex [font metrics -*-courier-bold--normal--24-*] 5]
-
- set width7 [font measure -*-courier-bold--normal--36-* x]
- set height7 [lindex [font metrics -*-courier-bold--normal--36-*] 5]
+ global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
+
+ set pd_font1 [format -*-%s-bold--normal--8-* $fontname]
+ set pd_font2 [format -*-%s-bold--normal--10-* $fontname]
+ set pd_font3 [format -*-%s-bold--normal--12-* $fontname]
+ set pd_font4 [format -*-%s-bold--normal--14-* $fontname]
+ set pd_font5 [format -*-%s-bold--normal--16-* $fontname]
+ set pd_font6 [format -*-%s-bold--normal--24-* $fontname]
+ set pd_font7 [format -*-%s-bold--normal--36-* $fontname]
+
+ set width1 [font measure $pd_font1 x]
+ set height1 [lindex [font metrics $pd_font1] 5]
+ set width2 [font measure $pd_font2 x]
+ set height2 [lindex [font metrics $pd_font2] 5]
+ set width3 [font measure $pd_font3 x]
+ set height3 [lindex [font metrics $pd_font3] 5]
+ set width4 [font measure $pd_font4 x]
+ set height4 [lindex [font metrics $pd_font4] 5]
+ set width5 [font measure $pd_font5 x]
+ set height5 [lindex [font metrics $pd_font5] 5]
+ set width6 [font measure $pd_font6 x]
+ set height6 [lindex [font metrics $pd_font6] 5]
+ set width7 [font measure $pd_font7 x]
+ set height7 [lindex [font metrics $pd_font7] 5]
set tclpatch [info patchlevel]
if {$tclpatch == "8.3.0" || \
@@ -3088,7 +3296,7 @@ proc texteditor_ok {name} {
proc pdtk_pd_texteditor {stuff} {
- global edit_number
+ global edit_number pd_font3
set name [format ".text%d" $edit_number]
set edit_number [expr $edit_number + 1]
@@ -3105,7 +3313,7 @@ proc pdtk_pd_texteditor {stuff} {
pack $name.buttons.ok -side left -expand 1
text $name.text -relief raised -bd 2 -height 12 -width 60 \
- -yscrollcommand "$name.scroll set" -font -*-courier-bold--normal--12-*
+ -yscrollcommand "$name.scroll set" -font $pd_font3
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
pack $name.text -side left -fill both -expand 1