[PD-cvs] pd/src d_misc.c, 1.3, 1.4 d_soundfile.c, 1.7, 1.8 d_ugen.c, 1.4, 1.5 g_array.c, 1.8, 1.9 g_canvas.c, 1.9, 1.10 g_canvas.h, 1.10, 1.11 g_editor.c, 1.10, 1.11 g_template.c, 1.11, 1.12 g_text.c, 1.9, 1.10 m_glob.c, 1.5, 1.6 m_imp.h, 1.3, 1.4 m_pd.h, 1.7, 1.8 makefile, 1.17, 1.18 notes.txt, 1.18, 1.19 s_inter.c, 1.12, 1.13 s_main.c, 1.16, 1.17 s_midi_alsa.c, 1.3, 1.4 t_tkcmd.c, 1.4, 1.5 u_main.tk, 1.15, 1.16 x_list.c, 1.2, 1.3

Miller Puckette millerpuckette at users.sourceforge.net
Sat Aug 20 01:28:05 CEST 2005


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3418/pd/src

Modified Files:
	d_misc.c d_soundfile.c d_ugen.c g_array.c g_canvas.c 
	g_canvas.h g_editor.c g_template.c g_text.c m_glob.c m_imp.h 
	m_pd.h makefile notes.txt s_inter.c s_main.c s_midi_alsa.c 
	t_tkcmd.c u_main.tk x_list.c 
Log Message:
Version 0.39-0test5.  Bug fixes and more care about closing dirty windows
and quitting.




Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** m_pd.h	18 May 2005 04:28:51 -0000	1.7
--- m_pd.h	19 Aug 2005 23:28:03 -0000	1.8
***************
*** 516,519 ****
--- 516,520 ----
  EXTERN void canvas_resume_dsp(int oldstate);
  EXTERN void canvas_update_dsp(void);
+ EXTERN int canvas_dspstate;
  
  /*   up/downsampling */

Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** g_text.c	24 Jul 2005 19:41:14 -0000	1.9
--- g_text.c	19 Aug 2005 23:28:03 -0000	1.10
***************
*** 348,355 ****
  static void message_adddollar(t_message *x, t_floatarg f)
  {
      int n = f;
      if (n < 0)
          n = 0;
-     t_atom a;
      SETDOLLAR(&a, n);
      binbuf_add(x->m_text.te_binbuf, 1, &a);
--- 348,355 ----
  static void message_adddollar(t_message *x, t_floatarg f)
  {
+     t_atom a;
      int n = f;
      if (n < 0)
          n = 0;
      SETDOLLAR(&a, n);
      binbuf_add(x->m_text.te_binbuf, 1, &a);

Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** d_soundfile.c	29 Jul 2005 19:01:20 -0000	1.7
--- d_soundfile.c	19 Aug 2005 23:28:03 -0000	1.8
***************
*** 1977,1987 ****
              x->x_fileerror = 0;
  
!                 /* if there's already a file open, close it */
              if (x->x_fd >= 0)
              {
                  pthread_mutex_unlock(&x->x_mutex);
!                 close (x->x_fd);
                  pthread_mutex_lock(&x->x_mutex);
                  x->x_fd = -1;
                  if (x->x_requestcode != REQUEST_BUSY)
                      continue;
--- 1977,2008 ----
              x->x_fileerror = 0;
  
!                 /* if there's already a file open, close it.  This
!                 should never happen since writesf_open() calls stop if
!                 needed and then waits until we're idle. */
              if (x->x_fd >= 0)
              {
+                 int bytesperframe = x->x_bytespersample * x->x_sfchannels;
+                 int bigendian = x->x_bigendian;
+                 char *filename = x->x_filename;
+                 int fd = x->x_fd;
+                 int filetype = x->x_filetype;
+                 int itemswritten = x->x_itemswritten;
+                 int swap = x->x_swap;
                  pthread_mutex_unlock(&x->x_mutex);
!                 
!                 soundfile_finishwrite(x, filename, fd,
!                     filetype, 0x7fffffff, itemswritten,
!                     bytesperframe, swap);
!                 close (fd);
! 
                  pthread_mutex_lock(&x->x_mutex);
                  x->x_fd = -1;
+ #ifdef DEBUG_SOUNDFILE
+                 {
+                     char s[1000];
+                     sprintf(s, "bug??? ditched %d\n", itemswritten);
+                     pute(s);
+                 }
+ #endif  
                  if (x->x_requestcode != REQUEST_BUSY)
                      continue;
***************
*** 2088,2094 ****
                  x->x_itemswritten +=
                      sysrtn / (x->x_bytespersample * x->x_sfchannels);
-                 sprintf(boo, "after: head %d, tail %d\n", 
-                     x->x_fifohead, x->x_fifotail);
  #ifdef DEBUG_SOUNDFILE
                  pute(boo);
  #endif
--- 2109,2115 ----
                  x->x_itemswritten +=
                      sysrtn / (x->x_bytespersample * x->x_sfchannels);
  #ifdef DEBUG_SOUNDFILE
+                 sprintf(boo, "after: head %d, tail %d written %d\n", 
+                     x->x_fifohead, x->x_fifotail, x->x_itemswritten);
                  pute(boo);
  #endif
***************
*** 2264,2267 ****
--- 2285,2292 ----
      long onset, nframes;
      float samplerate;
+     if (x->x_state != STATE_IDLE)
+     {
+         writesf_stop(x);
+     }
      if (soundfiler_writeargparse(x, &argc,
          &argv, &filesym, &filetype, &bytespersamp, &swap, &bigendian,
***************
*** 2277,2280 ****
--- 2302,2310 ----
          pd_error(x, "extra argument(s) to writesf~: ignored");
      pthread_mutex_lock(&x->x_mutex);
+     while (x->x_requestcode != REQUEST_NOTHING)
+     {
+         sfread_cond_signal(&x->x_requestcondition);
+         sfread_cond_wait(&x->x_answercondition, &x->x_mutex);
+     }
      x->x_bytespersample = bytespersamp;
      x->x_swap = swap;

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** s_main.c	16 Aug 2005 04:06:28 -0000	1.16
--- s_main.c	19 Aug 2005 23:28:03 -0000	1.17
***************
*** 3,7 ****
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
  
! char pd_version[] = "Pd version 0.39 TEST 4c\n";
  char pd_compiletime[] = __TIME__;
  char pd_compiledate[] = __DATE__;
--- 3,7 ----
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
  
! char pd_version[] = "Pd version 0.39 TEST 5\n";
  char pd_compiletime[] = __TIME__;
  char pd_compiledate[] = __DATE__;

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** u_main.tk	29 Jul 2005 19:01:21 -0000	1.15
--- u_main.tk	19 Aug 2005 23:28:03 -0000	1.16
***************
*** 43,48 ****
  
  if {$pd_nt == 2} {
! # turn on James Tittle II's fast drawing (wait until I can test this...):
! #   set tk::mac::useCGDrawing 1
      # set minimum line size for anti-aliasing.  If set to 1 or 0, then every
      # line will be anti-aliased.  While this makes connections and circles in
--- 43,48 ----
  
  if {$pd_nt == 2} {
! # turn on James Tittle II's fast drawing
!     set tk::mac::useCGDrawing 1
      # set minimum line size for anti-aliasing.  If set to 1 or 0, then every
      # line will be anti-aliased.  While this makes connections and circles in
***************
*** 57,72 ****
      load $pd_guidir/bin/libPdTcl.dylib
      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]
! 		  }
! 	 }
  }
  
--- 57,80 ----
      load $pd_guidir/bin/libPdTcl.dylib
      set pd_tearoff 0
!     global pd_macready
!     set pd_macready 0
!     global pd_macdropped
!     set pd_macdropped ""
!     # 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} {
!         global pd_macready pd_macdropped
!         foreach file $args {
!             if {$pd_macready != 0} {
!                 pd [concat pd open [pdtk_enquote [file tail $file]] \
! 		    [pdtk_enquote  [file dirname $file]] \;]
! 		    menu_doc_open [file dirname $file] [file tail $file]
!             } else {
!                 set pd_macdropped $args
!             }
!         }
!     }
  }
  
***************
*** 234,242 ****
  }
  
! proc pdtk_check {x message} {
!     set answer [tk_messageBox \-message $x \-type yesno \-icon question]
!     switch $answer {
!     	yes {pd $message} }
! #    	no {tk_messageBox \-message "cancelled" \-type ok}
  }
  
--- 242,250 ----
  }
  
! ##### routine to ask user if OK and, if so, send a message on to Pd ######
! proc pdtk_check {x message default} {
!     set answer [tk_messageBox \-message $x \-type yesno -default $default \
!         \-icon question]
!     if {$answer == yes}  {pd $message}
  }
  
***************
*** 328,332 ****
  proc menu_really_quit {} {pd {pd quit;}}
  
! proc menu_quit {} {pdtk_check {Really quit?} {pd quit;}}
  
  ######### the "Pd" menu command, which puts the Pd window on top ########
--- 336,340 ----
  proc menu_really_quit {} {pd {pd quit;}}
  
! proc menu_quit {} {pd {pd verifyquit;}}
  
  ######### the "Pd" menu command, which puts the Pd window on top ########
***************
*** 570,574 ****
  proc menu_close {name} {
      pdtk_canvas_checkgeometry $name
!     pd [concat $name menuclose \;]
  }
  
--- 578,587 ----
  proc menu_close {name} {
      pdtk_canvas_checkgeometry $name
!     pd [concat $name menuclose 0 \;]
! }
! 
! proc menu_really_close {name} {
!     pdtk_canvas_checkgeometry $name
!     pd [concat $name menuclose 1 \;]
  }
  
***************
*** 1554,1557 ****
--- 1567,1571 ----
      if {$shift == 1} {
          if {$key == "q" || $key == "Q"} {menu_really_quit}
+         if {$key == "w" || $key == "W"} {menu_really_close $topname}
          if {$key == "s" || $key == "S"} {menu_saveas $topname}
          if {$key == "z" || $key == "Z"} {menu_redo $topname}
***************
*** 3267,3270 ****
--- 3281,3294 ----
      menu_addstd .mbar 
  
+     global pd_nt
+     if {$pd_nt == 2} {
+         global pd_macdropped pd_macready
+         set pd_macready 1
+         foreach file $pd_macdropped {
+             pd [concat pd open [pdtk_enquote [file tail $file]] \
+                 [pdtk_enquote  [file dirname $file]] \;]
+ 		menu_doc_open [file dirname $file] [file tail $file]
+         }
+     }
  }
  
***************
*** 4187,4188 ****
--- 4211,4213 ----
      focus $id.f0
  }
+ 

Index: g_canvas.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** g_canvas.h	16 Aug 2005 04:06:28 -0000	1.10
--- g_canvas.h	19 Aug 2005 23:28:03 -0000	1.11
***************
*** 584,588 ****
  EXTERN t_template *template_findbyname(t_symbol *s);
  EXTERN t_canvas *template_findcanvas(t_template *tmpl);
! EXTERN void template_notify(t_template *,
      t_symbol *s, int argc, t_atom *argv);
  
--- 584,588 ----
  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);
  
***************
*** 595,601 ****
  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 *,
      t_word *wp, int loud);
! EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *,
      t_word *wp, float pix, int loud);
  EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val);
--- 595,601 ----
  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);

Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** s_inter.c	29 Jul 2005 19:01:21 -0000	1.12
--- s_inter.c	19 Aug 2005 23:28:03 -0000	1.13
***************
*** 175,179 ****
--- 175,185 ----
              if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset))
          {
+ #ifdef THREAD_LOCKING
+             sys_lock();
+ #endif
              (*sys_fdpoll[i].fdp_fn)(sys_fdpoll[i].fdp_ptr, sys_fdpoll[i].fdp_fd);
+ #ifdef THREAD_LOCKING
+             sys_unlock();
+ #endif
              didsomething = 1;
          }
***************
*** 281,288 ****
  #ifdef _POSIX_MEMLOCK
      /* tb: force memlock to physical memory { */
!     struct rlimit mlock_limit;
!     mlock_limit.rlim_cur=0;
!     mlock_limit.rlim_max=0;
!     setrlimit(RLIMIT_MEMLOCK,&mlock_limit);
      /* } tb */
      if (mlockall(MCL_FUTURE) != -1) 
--- 287,296 ----
  #ifdef _POSIX_MEMLOCK
      /* tb: force memlock to physical memory { */
!     {
!         struct rlimit mlock_limit;
!         mlock_limit.rlim_cur=0;
!         mlock_limit.rlim_max=0;
!         setrlimit(RLIMIT_MEMLOCK,&mlock_limit);
!     }
      /* } tb */
      if (mlockall(MCL_FUTURE) != -1) 
***************
*** 1088,1092 ****
              }
              if (sys_verbose) fprintf(stderr, "%s", sys_guicmd);
!             execl("/bin/sh", "sh", "-c", sys_guicmd, 0);
              perror("pd: exec");
              _exit(1);
--- 1096,1100 ----
              }
              if (sys_verbose) fprintf(stderr, "%s", sys_guicmd);
!             execl("/bin/sh", "sh", "-c", sys_guicmd, (char*)0);
              perror("pd: exec");
              _exit(1);
***************
*** 1172,1176 ****
              sprintf(cmdbuf, "%s/pd-watchdog\n", guidir);
              if (sys_verbose) fprintf(stderr, "%s", cmdbuf);
!             execl("/bin/sh", "sh", "-c", cmdbuf, 0);
              perror("pd: exec");
              _exit(1);
--- 1180,1184 ----
              sprintf(cmdbuf, "%s/pd-watchdog\n", guidir);
              if (sys_verbose) fprintf(stderr, "%s", cmdbuf);
!             execl("/bin/sh", "sh", "-c", cmdbuf, (char*)0);
              perror("pd: exec");
              _exit(1);

Index: makefile
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** makefile	16 Aug 2005 04:06:28 -0000	1.17
--- makefile	19 Aug 2005 23:28:03 -0000	1.18
***************
*** 25,29 ****
  ARCH_CFLAGS = -DPD 
  
! CFLAGS = -Werror $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)
  
  # the sources
--- 25,29 ----
  ARCH_CFLAGS = -DPD 
  
! CFLAGS = -Werror -Wdeclaration-after-statement $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)
  
  # the sources

Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** g_canvas.c	16 Aug 2005 04:06:28 -0000	1.9
--- g_canvas.c	19 Aug 2005 23:28:03 -0000	1.10
***************
*** 37,41 ****
  extern t_pd *newest;
  t_class *canvas_class;
! static int canvas_dspstate;         /* whether DSP is on or off */  
  t_canvas *canvas_editing;           /* last canvas to start text edting */ 
  t_canvas *canvas_whichfind;         /* last canvas we did a find in */ 
--- 37,41 ----
  extern t_pd *newest;
  t_class *canvas_class;
! int canvas_dspstate;                /* whether DSP is on or off */  
  t_canvas *canvas_editing;           /* last canvas to start text edting */ 
  t_canvas *canvas_whichfind;         /* last canvas we did a find in */ 

Index: m_imp.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_imp.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** m_imp.h	6 Sep 2004 20:20:35 -0000	1.3
--- m_imp.h	19 Aug 2005 23:28:03 -0000	1.4
***************
*** 78,82 ****
  EXTERN void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
  EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
! 
  #define __m_imp_h_
  #endif /* __m_imp_h_ */
--- 78,82 ----
  EXTERN void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
  EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
! EXTERN void glob_quit(void *dummy);
  #define __m_imp_h_
  #endif /* __m_imp_h_ */

Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** notes.txt	16 Aug 2005 04:06:28 -0000	1.18
--- notes.txt	19 Aug 2005 23:28:03 -0000	1.19
***************
*** 21,37 ****
  bug fix (tcl error messages when starting open dialogs)
  pointer rewind (also check if send-window documented?)
! 
! 
! ------------ 0.39 ---------
! problems:
! "list" to signal inlet (e.g., "*~") complains
! "find" doesn't open GOPs correctly
  save dirty abstractions on close
  close dirty patches on quit
! stop vis-ing subpatches of abstractions
! when retyping abstractions, offer to save dirty one
! don't filter locked click() through getrect
! better hit detection (getrect is too greedy; try just sending it through)
  thread-unsafe callbacks from sys_microsleep()
  
  windows:
--- 21,34 ----
  bug fix (tcl error messages when starting open dialogs)
  pointer rewind (also check if send-window documented?)
! stop vis-ing subpatches of abstractions
  save dirty abstractions on close
  close dirty patches on quit
! "find" fixed to open GOPs correctly
! cheat to speed up mouse motion over arrays
! fix samplerate~ to figure out blocking
  thread-unsafe callbacks from sys_microsleep()
+ writesf -- "open" without "0" misses closing the previous file.
+ 
+ ------------ 0.39 ---------
  
  windows:
***************
*** 40,44 ****
  mac:
    load libraries first before opening patches on drag-and-drop
-   writing 3-byte soundfiles distorts???
  
  check:
--- 37,40 ----
***************
*** 46,74 ****
  blechman patch for s_inter.c
  check what happens when going back and forth between graph-on-parent
- 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:
  TK commands to nonexistent windows? (occasionally still happens)
- array name changes don't show up on parent
  arrays that don't fit in bounds don't update (same as red rectangle problem?)
  look in d_resample.pd to understand inlet~ upsampling...
- flag for array to suppress printing name
- fix samplerate~ to figure out blocking
  patcher inlets don't deal with scalars (zbug.pd)
  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
- writesf -- "open" without "0" misses closing the previous file.
- 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
--- 42,67 ----
  blechman patch for s_inter.c
  check what happens when going back and forth between graph-on-parent
  
  doc:
+ object list
  document env~ second argument (and why is it no less than 1/10 of first???)
  vibrato example
  block resampling arguments
  document tabwrite~_start
+ "list" to signal inlet (e.g., "*~") or float inlet (f) complains.
  
  problems:
+ don't filter locked click() through getrect
+ better scalar hit detection (getrect is too greedy)
+ when retyping abstractions, offer to save dirty one
+ should linux stop grabbing focus on vis?  Is there a way to detect whether
+     the mouse is in a window when it opens?
  TK commands to nonexistent windows? (occasionally still happens)
  arrays that don't fit in bounds don't update (same as red rectangle problem?)
  look in d_resample.pd to understand inlet~ upsampling...
  patcher inlets don't deal with scalars (zbug.pd)
  check if there's a problem loading libs on startup if superuser
  '[' in numbox label breaks it (Yury Sept. 3)
  read xx.txt in "bad" gives warnings
  qlist - 'next 1' seems not to work
  Krzysztof's qlist_next reentrancy bug
***************
*** 77,95 ****
  moving a bang toward top of window creates problem (invisible label)
  get rid of messages causing renaming; try to prevent patches closing themselves.
- dac~/ adc~/ block~ incompatibility
  scofo reports error on reading score1.txt
  loading e-mailed patches without removing headers crashes pd
  pd $1 bug ($1 is saved as it was evaluated, not as '$1')
  check if _vsnprintf with zero argument in windows works any better...
  
  features:
  flag to suppress printing array name above graph
  fix copyright notices
- IEM guis to use queued updates
  pixel font sizes
  pd to find running ones (pd -new to defeat)
  rename windowname-pd instead of pd-windowname
- "enter" into object box to create new one (also, changing borders? forking?)
- tab to jump to a connected object (first one?) (shift-tab to back up?)
  tables:
      if there's just one array, don't do stringent hit check.
--- 70,86 ----
  moving a bang toward top of window creates problem (invisible label)
  get rid of messages causing renaming; try to prevent patches closing themselves.
  scofo reports error on reading score1.txt
  loading e-mailed patches without removing headers crashes pd
  pd $1 bug ($1 is saved as it was evaluated, not as '$1')
  check if _vsnprintf with zero argument in windows works any better...
+ detect adc~ and dac~ reblocking
  
  features:
  flag to suppress printing array name above graph
+ flag to suppress scrollbars in canvases
  fix copyright notices
  pixel font sizes
  pd to find running ones (pd -new to defeat)
  rename windowname-pd instead of pd-windowname
  tables:
      if there's just one array, don't do stringent hit check.
***************
*** 98,106 ****
      object to get/set table size; random; quantile
      flag to hide array names 
- queued graphics updates for IEMGUIs and scalars
  think of a way to embed abstractions in a patch
  make watchdog work for MACOSX
  search path to include both calling patch and abstraction, if different
- abstraction reload shouldn't have to vis everyone
  pasting should look at current mouse location
  delete-in-rectangle message to Pds
--- 89,95 ----
***************
*** 110,113 ****
--- 99,110 ----
  expr to parse exponential notation
  pipe to handle symbols&pointers (just takes floats now???)
+ editing:
+     "enter" into object box to create new one (also, change border? forking?)
+     tab to jump to a connected object (first one?) (shift-tab to back up?)
+     arrow keys to shift connections left and right
+     menu item to connect selected objects
+     highlight connections (and I/Os) on mouse motion
+     select line and hit "insert" to interpolate an object
+     option-drag an outlet to make a new, connected object
  
  data:
***************
*** 147,154 ****
  netsend separate thread
  netreceive (and netsend?) message to set port number
- think about x and y scale preservation when changing between graph and object
- show outlines of objects even when graph is "open"
  graph_vis() to decorate graphs when they're toplevel (parent_glist == 0)
- get graphs to expand to hold their contents
  suita.chopin.edu.pl/~czaja/miXed/externs/xeq.html -- MIDI file reader
  in glist_delete, consider why this can't be just "vis 0" -- why do we need it?
--- 144,148 ----
***************
*** 157,175 ****
  makefile to have make install depend on make local.
  Float method for random
- figure out list, message objects
  put in something for tilde order forcing
  extensible "toolbar" so people can add external GUI objects
- allow spaces in paths
  variable send and receive -- check how max/MSP does it?
  number boxes to darken for typing and/or received messages
- dialog to change lib flag and path
  pique~ and fiddle~ unification (notice pique filtering is different!)
  new message box look
  figure out what to do when "pd sym" conflicts with window title as in Pluton?
- 
- MAX compatibilty:
- trigger 1 (on Pd, outputs 0; on Max?)
- 
- LATER
  bonk~ file path handling
  unify arrays and garrays
--- 151,161 ----

Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** g_array.c	16 Aug 2005 04:06:28 -0000	1.8
--- g_array.c	19 Aug 2005 23:28:03 -0000	1.9
***************
*** 430,433 ****
--- 430,441 ----
              x->x_realname = canvas_realizedollar(x->x_glist, argname);
              pd_bind(&x->x_gobj.g_pd, x->x_realname);
+                 /* redraw the whole glist, just so the name change shows up */
+             if (x->x_glist->gl_havewindow)
+                 canvas_redraw(x->x_glist);
+             else if (glist_isvisible(x->x_glist->gl_owner))
+             {
+                 gobj_vis(&x->x_glist->gl_gobj, x->x_glist->gl_owner, 0);
+                 gobj_vis(&x->x_glist->gl_gobj, x->x_glist->gl_owner, 1);
+             }
          }
          size = fsize;
***************
*** 449,453 ****
  void garray_arrayviewlist_new(t_garray *x)
  {
!     int i, xonset, yonset, type, elemsize;
      float yval;
      char cmdbuf[200];
--- 457,461 ----
  void garray_arrayviewlist_new(t_garray *x)
  {
!     int i, xonset=0, yonset=0, type=0, elemsize=0;
      float yval;
      char cmdbuf[200];
***************
*** 481,485 ****
                                     t_float page)
  {
!     int i, xonset, yonset, type, elemsize;
      float yval;
      char cmdbuf[200];
--- 489,493 ----
                                     t_float page)
  {
!     int i, xonset=0, yonset=0, type=0, elemsize=0;
      float yval;
      char cmdbuf[200];
***************
*** 752,760 ****
      {
          float best = 100;
!         int incr;
!             /* if it has more than 2000 points, just check 300 of them. */
!         if (array->a_n < 2000)
!             incr = 1;
!         else incr = array->a_n / 300;
          for (i = 0; i < array->a_n; i += incr)
          {
--- 760,765 ----
      {
          float best = 100;
!             /* if it has more than 2000 points, just check 1000 of them. */
!         int incr = (array->a_n <= 2000 ? 1 : array->a_n / 1000);
          for (i = 0; i < array->a_n; i += incr)
          {

Index: x_list.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_list.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** x_list.c	29 Jul 2005 19:01:22 -0000	1.2
--- x_list.c	19 Aug 2005 23:28:03 -0000	1.3
***************
*** 5,9 ****
--- 5,14 ----
  #include "m_pd.h"
  /* #include <string.h> */
+ #ifdef MSW
+ #include <malloc.h>
+ #else
  #include <alloca.h>
+ #endif
+ 
  extern t_pd *newest;
  

Index: s_midi_alsa.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_midi_alsa.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** s_midi_alsa.c	24 Jul 2005 19:41:14 -0000	1.3
--- s_midi_alsa.c	19 Aug 2005 23:28:03 -0000	1.4
***************
*** 47,50 ****
--- 47,51 ----
      int client;
      int i;
+     snd_seq_client_info_t *alsainfo;
      alsa_nmidiin = 0;
      alsa_nmidiout = 0;
***************
*** 92,96 ****
     
      if (nmidiout == 0 && nmidiin == 0) return;
-     snd_seq_client_info_t *alsainfo;
      snd_seq_client_info_malloc(&alsainfo);
      snd_seq_get_client_info(midi_handle,alsainfo);
--- 93,96 ----
***************
*** 185,189 ****
  void sys_alsa_poll_midi(void)
  {
!    char buf[20];
     int count, alsa_source;
     int i;
--- 185,189 ----
  void sys_alsa_poll_midi(void)
  {
!    unsigned char buf[20];
     int count, alsa_source;
     int i;

Index: t_tkcmd.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** t_tkcmd.c	29 Jul 2005 19:01:21 -0000	1.4
--- t_tkcmd.c	19 Aug 2005 23:28:03 -0000	1.5
***************
*** 433,437 ****
          fflush(debugfd);
  #endif
!         execl("/bin/sh", "sh", "-c", cmdbuf, 0);
          perror("pd: exec");
          _exit(1);
--- 433,437 ----
          fflush(debugfd);
  #endif
!         execl("/bin/sh", "sh", "-c", cmdbuf, (char*)0);
          perror("pd: exec");
          _exit(1);

Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** g_editor.c	16 Aug 2005 04:06:28 -0000	1.10
--- g_editor.c	19 Aug 2005 23:28:03 -0000	1.11
***************
*** 1044,1048 ****
      t_gobj *y;
      int shiftmod, runmode, altmod, doublemod = 0, rightclick;
!     int x1, y1, x2, y2, clickreturned = 0;
      
      if (!x->gl_editor)
--- 1044,1048 ----
      t_gobj *y;
      int shiftmod, runmode, altmod, doublemod = 0, rightclick;
!     int x1=0, y1=0, x2=0, y2=0, clickreturned = 0;
      
      if (!x->gl_editor)
***************
*** 1268,1274 ****
  void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
  {
!     int x11, y11, x12, y12;
      t_gobj *y1;
!     int x21, y21, x22, y22;
      t_gobj *y2;
      int xwas = x->gl_editor->e_xwas,
--- 1268,1274 ----
  void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
  {
!     int x11=0, y11=0, x12=0, y12=0;
      t_gobj *y1;
!     int x21=0, y21=0, x22=0, y22=0;
      t_gobj *y2;
      int xwas = x->gl_editor->e_xwas,
***************
*** 1629,1640 ****
  }
  
! void canvas_menuclose(t_canvas *x, t_floatarg force)
  {
!     if (x->gl_owner)
!         canvas_vis(x, 0);
!     else if ((force != 0) || (!x->gl_dirty))
          pd_free(&x->gl_pd);
!     else sys_vgui("pdtk_check {This window has been modified.  Close anyway?}\
!      {.x%lx menuclose 1;\n}\n", x);
  }
  
--- 1629,1706 ----
  }
  
!     /* find a dirty sub-glist, if any, of this one (including itself) */
! static t_glist *glist_finddirty(t_glist *x)
  {
!     t_gobj *g;
!     t_glist *g2;
!     if (x->gl_env && x->gl_dirty)
!         return (x);
!     for (g = x->gl_list; g; g = g->g_next)
!         if (pd_class(&g->g_pd) == canvas_class &&
!             (g2 = glist_finddirty((t_glist *)g)))
!                 return (g2);
!     return (0);
! }
! 
!     /* quit, after calling glist_finddirty() on all toplevels and verifying
!     the user really wants to discard changes  */
! void glob_verifyquit(void *dummy, t_floatarg f)
! {
!     t_glist *g, *g2;
!         /* find all root canvases */
!     for (g = canvas_list; g; g = g->gl_next)
!         if (g2 = glist_finddirty(g))
!     {
!         canvas_vis(g2, 1);
!         sys_vgui(
! "pdtk_check {Discard changes to this window??} {.x%lx menuclose 3;\n} no\n",
!                 g2);
!         return;
!     }
!     if (f == 0)
!         sys_vgui("pdtk_check {really quit?} {pd quit;\n} yes\n");
!     else glob_quit(0);
! }
! 
!     /* close a window (or possibly quit Pd), checking for dirty flags.
!     The "force" parameter is interpreted as follows:
!         0 - request from GUI to close, verifying whether clean or dirty
!         1 - request from GUI to close, no verification
!         2 - verified - mark this one clean, then continue as in 1
!         3 - verified - mark this one clean, then verify-and-quit
!     */
! void canvas_menuclose(t_canvas *x, t_floatarg fforce)
! {
!     int force = fforce;
!     t_glist *g;
!     if (x->gl_owner && (force == 0 || force == 1))
!         canvas_vis(x, 0);   /* if subpatch, just invis it */
!     else if (force == 0)    
!     {
!         g = glist_finddirty(x);
!         if (g)
!         {
!             canvas_vis(g, 1);
!             sys_vgui(
! "pdtk_check {Discard changes to this window??} {.x%lx menuclose 2;\n} no\n",
!                 g);
!             return;
!         }
!         else pd_free(&x->gl_pd);
!     }
!     else if (force == 1)
          pd_free(&x->gl_pd);
!     else if (force == 2)
!     {
!         canvas_dirty(x, 0);
!         while (x->gl_owner)
!             x = x->gl_owner;
!         canvas_menuclose(x, 0);
!     }
!     else if (force == 3)
!     {
!         canvas_dirty(x, 0);
!         glob_verifyquit(0, 1);
!     }
  }
  
***************
*** 1675,1679 ****
                          canvas_find_index2 = myindex2;
                          glist_noselect(x);
!                         canvas_vis(x, 1);
                          canvas_editmode(x, 1.);
                          glist_select(x, y);
--- 1741,1745 ----
                          canvas_find_index2 = myindex2;
                          glist_noselect(x);
!                         vmess(&x->gl_pd, gensym("menu-open"), "");
                          canvas_editmode(x, 1.);
                          glist_select(x, y);

Index: d_ugen.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_ugen.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** d_ugen.c	28 Nov 2004 21:20:42 -0000	1.4
--- d_ugen.c	19 Aug 2005 23:28:03 -0000	1.5
***************
*** 661,665 ****
      t_sigoutconnect *oc, *oc2;
      t_class *class = pd_class(&u->u_obj->ob_pd);
!     int i, n;
          /* suppress creating new signals for the outputs of signal
          inlets and subpatchs; except in the case we're an inlet and "blocking"
--- 661,665 ----
      t_sigoutconnect *oc, *oc2;
      t_class *class = pd_class(&u->u_obj->ob_pd);
!     int i, n, totnsig;
          /* suppress creating new signals for the outputs of signal
          inlets and subpatchs; except in the case we're an inlet and "blocking"
***************
*** 696,700 ****
          }
      }
!     insig = (t_signal **)getbytes((u->u_nin + u->u_nout) * sizeof(t_signal *));
      outsig = insig + u->u_nin;
      for (sig = insig, uin = u->u_in, i = u->u_nin; i--; sig++, uin++)
--- 696,701 ----
          }
      }
!     totnsig = u->u_nin + u->u_nout;
!     insig = (t_signal **)getbytes((totnsig ? totnsig : 1) * sizeof(t_signal *));
      outsig = insig + u->u_nin;
      for (sig = insig, uin = u->u_in, i = u->u_nin; i--; sig++, uin++)
***************
*** 731,734 ****
--- 732,740 ----
          (*sig)->s_refcount = uout->o_nconnect;
      }
+         /* if thre are no input or output signals, supply one fake signal so
+         the object can learn the sample rate and block size.  Used by the
+         samplerate~ object. */
+     if (!totnsig)
+         insig[0] = signal_new(dc->dc_vecsize, dc->dc_srate);
          /* now call the DSP scheduling routine for the ugen.  This
          routine must fill in "borrowed" signal outputs in case it's either
***************
*** 745,748 ****
--- 751,757 ----
              signal_makereusable(*sig);
      }
+         /* special case: no inputs or outputs: free the fake signal we made */
+     if (!totnsig)
+         signal_makereusable(insig[0]);
      if (ugen_loud)
      {

Index: d_misc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_misc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** d_misc.c	28 Nov 2004 21:20:42 -0000	1.3
--- d_misc.c	19 Aug 2005 23:28:03 -0000	1.4
***************
*** 135,143 ****
  {
      t_object x_obj;
  } t_samplerate;
  
  static void samplerate_tilde_bang(t_samplerate *x)
  {
!     outlet_float(x->x_obj.ob_outlet, sys_getsr());
  }
  
--- 135,156 ----
  {
      t_object x_obj;
+     float x_sr;
  } t_samplerate;
  
  static void samplerate_tilde_bang(t_samplerate *x)
  {
!     if (!canvas_dspstate)
!     {
!         post(
!           "NB: samplerate~ momentarily started DSP to learn sample rate");
!         canvas_resume_dsp(1);
!         canvas_suspend_dsp();
!     }
!     outlet_float(x->x_obj.ob_outlet, x->x_sr);
! }
! 
! static void samplerate_tilde_dsp(t_samplerate *x, t_signal **sp)
! {
!     x->x_sr = sp[0]->s_sr;
  }
  
***************
*** 154,157 ****
--- 167,172 ----
          (t_newmethod)samplerate_tilde_new, 0, sizeof(t_samplerate), 0, 0);
      class_addbang(samplerate_tilde_class, samplerate_tilde_bang);
+     class_addmethod(samplerate_tilde_class, (t_method)samplerate_tilde_dsp,
+         gensym("dsp"), A_CANT, 0);
  }
  

Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** g_template.c	16 Aug 2005 04:06:28 -0000	1.11
--- g_template.c	19 Aug 2005 23:28:03 -0000	1.12
***************
*** 1525,1529 ****
                  &xonset, &yonset, &wonset))
      {
!         for (i = 0, xsum = 0; i < array->a_n; i++)
          {
              float usexloc, useyloc;
--- 1525,1531 ----
                  &xonset, &yonset, &wonset))
      {
!             /* if it has more than 2000 points, just check 1000 of them. */
!         int incr = (array->a_n <= 2000 ? 1 : array->a_n / 1000);
!         for (i = 0, xsum = 0; i < array->a_n; i += incr)
          {
              float usexloc, useyloc;

Index: m_glob.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_glob.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** m_glob.c	16 Jul 2005 01:43:18 -0000	1.5
--- m_glob.c	19 Aug 2005 23:28:03 -0000	1.6
***************
*** 13,17 ****
  
  void glob_setfilename(void *dummy, t_symbol *name, t_symbol *dir);
! void glob_quit(void *dummy);
  void glob_dsp(void *dummy, t_symbol *s, int argc, t_atom *argv);
  void glob_meters(void *dummy, t_floatarg f);
--- 13,17 ----
  
  void glob_setfilename(void *dummy, t_symbol *name, t_symbol *dir);
! void glob_verifyquit(void *dummy, t_floatarg f);
  void glob_dsp(void *dummy, t_symbol *s, int argc, t_atom *argv);
  void glob_meters(void *dummy, t_floatarg f);
***************
*** 80,83 ****
--- 80,85 ----
          A_SYMBOL, A_SYMBOL, 0);
      class_addmethod(glob_pdobject, (t_method)glob_quit, gensym("quit"), 0);
+     class_addmethod(glob_pdobject, (t_method)glob_verifyquit,
+         gensym("verifyquit"), A_DEFFLOAT, 0);
      class_addmethod(glob_pdobject, (t_method)glob_foo, gensym("foo"), A_GIMME, 0);
      class_addmethod(glob_pdobject, (t_method)glob_dsp, gensym("dsp"), A_GIMME, 0);





More information about the Pd-cvs mailing list