[PD-cvs] externals/unauthorized/pianoroll CHANGES.LOG,1.1,1.2 Makefile,1.1,1.2 pianoroll.c,1.5,1.6
Yves Degoyon
sevyves at users.sourceforge.net
Wed Mar 2 03:46:26 CET 2005
- Previous message: [PD-cvs] externals/unauthorized/grid CHANGES.LOG,1.2,1.3 grid.c,1.6,1.7 help-grid.pd,1.3,1.4
- Next message: [PD-cvs] externals/unauthorized/playlist CHANGES.LOG,1.3,1.4 playlist.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/externals/unauthorized/pianoroll
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5299
Modified Files:
CHANGES.LOG Makefile pianoroll.c
Log Message:
Added GOP supoort
Index: pianoroll.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/pianoroll/pianoroll.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pianoroll.c 25 Sep 2003 20:58:54 -0000 1.5
--- pianoroll.c 2 Mar 2005 02:46:23 -0000 1.6
***************
*** 37,41 ****
#include <math.h>
#include <ctype.h>
! #include <m_pd.h>
#include "m_imp.h"
#include "g_canvas.h"
--- 37,41 ----
#include <math.h>
#include <ctype.h>
! #include "m_pd.h"
#include "m_imp.h"
#include "g_canvas.h"
***************
*** 61,65 ****
#define DEFAULT_SEQUENCER_PITCH_MAX 15
! static char *pianoroll_version = "pianoroll: a graphical sequencer controller, version 0.7 (ydegoyon at free.fr)";
t_widgetbehavior pianoroll_widgetbehavior;
--- 61,65 ----
#define DEFAULT_SEQUENCER_PITCH_MAX 15
! static char *pianoroll_version = "pianoroll: a graphical sequencer controller, version 0.9 (ydegoyon at free.fr)";
t_widgetbehavior pianoroll_widgetbehavior;
***************
*** 97,103 ****
static void pianoroll_draw_update(t_pianoroll *x, t_glist *glist)
{
! int si;
- t_canvas *canvas=glist_getcanvas(glist);
for ( si=0; si<x->x_nbsteps; si++ )
{
--- 97,103 ----
static void pianoroll_draw_update(t_pianoroll *x, t_glist *glist)
{
! t_int si;
! t_canvas *canvas=glist_getcanvas(glist);
for ( si=0; si<x->x_nbsteps; si++ )
{
***************
*** 114,118 ****
static void pianoroll_draw_new(t_pianoroll *x, t_glist *glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
// draw the grid
--- 114,118 ----
static void pianoroll_draw_new(t_pianoroll *x, t_glist *glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
// draw the grid
***************
*** 127,141 ****
SYS_VGUI9(".x%x.c create rectangle %d %d %d %d -fill #771623 -outline #998121 -tags %xPITCH%.4d%.4d\n",
canvas,
! x->x_obj.te_xpix+(int)(gi*xgstep),
! x->x_obj.te_ypix+(int)(gj*ygstep),
! x->x_obj.te_xpix+(int)(gi*xgstep)+(int)(2*xgstep/3),
! x->x_obj.te_ypix+(int)((gj+1)*ygstep),
x, gi, gj );
SYS_VGUI9(".x%x.c create rectangle %d %d %d %d -fill #562663 -outline #998121 -tags %xVOLUME%.4d%.4d\n",
canvas,
! x->x_obj.te_xpix+(int)(gi*xgstep)+(int)(2*xgstep/3),
! x->x_obj.te_ypix+(int)(gj*ygstep),
! x->x_obj.te_xpix+(int)((gi+1)*xgstep),
! x->x_obj.te_ypix+(int)((gj+1)*ygstep),
x, gi, gj );
}
--- 127,141 ----
SYS_VGUI9(".x%x.c create rectangle %d %d %d %d -fill #771623 -outline #998121 -tags %xPITCH%.4d%.4d\n",
canvas,
! text_xpix(&x->x_obj, glist)+(int)(gi*xgstep),
! text_ypix(&x->x_obj, glist)+(int)(gj*ygstep),
! text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3),
! text_ypix(&x->x_obj, glist)+(int)((gj+1)*ygstep),
x, gi, gj );
SYS_VGUI9(".x%x.c create rectangle %d %d %d %d -fill #562663 -outline #998121 -tags %xVOLUME%.4d%.4d\n",
canvas,
! text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3),
! text_ypix(&x->x_obj, glist)+(int)(gj*ygstep),
! text_xpix(&x->x_obj, glist)+(int)((gi+1)*xgstep),
! text_ypix(&x->x_obj, glist)+(int)((gj+1)*ygstep),
x, gi, gj );
}
***************
*** 146,159 ****
}
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xIN\n",
! canvas, x->x_obj.te_xpix, x->x_obj.te_ypix - 1,
! x->x_obj.te_xpix+7, x->x_obj.te_ypix,
x);
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTL\n",
! canvas, x->x_obj.te_xpix, x->x_obj.te_ypix + x->x_height+1,
! x->x_obj.te_xpix+7, x->x_obj.te_ypix + x->x_height+2,
x);
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTR\n",
! canvas, x->x_obj.te_xpix+x->x_width-7, x->x_obj.te_ypix + x->x_height+1,
! x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix + x->x_height+2,
x);
--- 146,159 ----
}
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xIN\n",
! canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 1,
! text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist),
x);
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTL\n",
! canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1,
! text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2,
x);
SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTR\n",
! canvas, text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1,
! text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2,
x);
***************
*** 163,167 ****
static void pianoroll_draw_move(t_pianoroll *x, t_glist *glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
// move the grid
--- 163,167 ----
static void pianoroll_draw_move(t_pianoroll *x, t_glist *glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
// move the grid
***************
*** 176,190 ****
SYS_VGUI9(".x%x.c coords %xPITCH%.4d%.4d %d %d %d %d\n",
canvas, x, gi, gj,
! x->x_obj.te_xpix+(int)(gi*xgstep),
! x->x_obj.te_ypix+(int)(gj*ygstep),
! x->x_obj.te_xpix+(int)(gi*xgstep)+(int)(2*xgstep/3),
! x->x_obj.te_ypix+(int)((gj+1)*ygstep)
);
SYS_VGUI9(".x%x.c coords %xVOLUME%.4d%.4d %d %d %d %d\n",
canvas, x, gi, gj,
! x->x_obj.te_xpix+(int)(gi*xgstep)+(int)(2*xgstep/3),
! x->x_obj.te_ypix+(int)(gj*ygstep),
! x->x_obj.te_xpix+(int)((gi+1)*xgstep),
! x->x_obj.te_ypix+(int)((gj+1)*ygstep)
);
}
--- 176,190 ----
SYS_VGUI9(".x%x.c coords %xPITCH%.4d%.4d %d %d %d %d\n",
canvas, x, gi, gj,
! text_xpix(&x->x_obj, glist)+(int)(gi*xgstep),
! text_ypix(&x->x_obj, glist)+(int)(gj*ygstep),
! text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3),
! text_ypix(&x->x_obj, glist)+(int)((gj+1)*ygstep)
);
SYS_VGUI9(".x%x.c coords %xVOLUME%.4d%.4d %d %d %d %d\n",
canvas, x, gi, gj,
! text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3),
! text_ypix(&x->x_obj, glist)+(int)(gj*ygstep),
! text_xpix(&x->x_obj, glist)+(int)((gi+1)*xgstep),
! text_ypix(&x->x_obj, glist)+(int)((gj+1)*ygstep)
);
}
***************
*** 192,205 ****
}
SYS_VGUI7(".x%x.c coords %xIN %d %d %d %d \n",
! canvas, x, x->x_obj.te_xpix, x->x_obj.te_ypix - 1,
! x->x_obj.te_xpix+7, x->x_obj.te_ypix
);
SYS_VGUI7(".x%x.c coords %xOUTL %d %d %d %d\n",
! canvas, x, x->x_obj.te_xpix, x->x_obj.te_ypix + x->x_height+1,
! x->x_obj.te_xpix+7, x->x_obj.te_ypix + x->x_height+2
);
SYS_VGUI7(".x%x.c coords %xOUTR %d %d %d %d\n",
! canvas, x, x->x_obj.te_xpix+x->x_width-7, x->x_obj.te_ypix + x->x_height+1,
! x->x_obj.te_xpix+x->x_width, x->x_obj.te_ypix + x->x_height+2
);
canvas_fixlinesfor( canvas, (t_text*)x );
--- 192,205 ----
}
SYS_VGUI7(".x%x.c coords %xIN %d %d %d %d \n",
! canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 1,
! text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist)
);
SYS_VGUI7(".x%x.c coords %xOUTL %d %d %d %d\n",
! canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1,
! text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2
);
SYS_VGUI7(".x%x.c coords %xOUTR %d %d %d %d\n",
! canvas, x, text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1,
! text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2
);
canvas_fixlinesfor( canvas, (t_text*)x );
***************
*** 208,213 ****
static void pianoroll_draw_erase(t_pianoroll* x,t_glist* glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
! int i;
SYS_VGUI3(".x%x.c delete %xIN\n", canvas, x);
--- 208,213 ----
static void pianoroll_draw_erase(t_pianoroll* x,t_glist* glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
! t_int i;
SYS_VGUI3(".x%x.c delete %xIN\n", canvas, x);
***************
*** 230,234 ****
static void pianoroll_draw_select(t_pianoroll* x,t_glist* glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
if(x->x_selected)
--- 230,234 ----
static void pianoroll_draw_select(t_pianoroll* x,t_glist* glist)
{
! t_canvas *canvas=glist_getcanvas(glist);
if(x->x_selected)
***************
*** 251,268 ****
t_pianoroll* x = (t_pianoroll*)z;
! *xp1 = x->x_obj.te_xpix;
! *yp1 = x->x_obj.te_ypix;
! *xp2 = x->x_obj.te_xpix+x->x_width;
! *yp2 = x->x_obj.te_ypix+x->x_height;
}
static void pianoroll_save(t_gobj *z, t_binbuf *b)
{
! t_pianoroll *x = (t_pianoroll *)z;
! int i;
// post( "saving pianoroll : %s", x->x_name->s_name );
binbuf_addv(b, "ssiissiiffiiifi", gensym("#X"),gensym("obj"),
! (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix,
gensym("pianoroll"), x->x_name, x->x_width, x->x_height,
x->x_pmin, x->x_pmax,
--- 251,268 ----
t_pianoroll* x = (t_pianoroll*)z;
! *xp1 = text_xpix(&x->x_obj, owner);
! *yp1 = text_ypix(&x->x_obj, owner);
! *xp2 = text_xpix(&x->x_obj, owner)+x->x_width;
! *yp2 = text_ypix(&x->x_obj, owner)+x->x_height;
}
static void pianoroll_save(t_gobj *z, t_binbuf *b)
{
! t_pianoroll *x = (t_pianoroll *)z;
! t_int i;
// post( "saving pianoroll : %s", x->x_name->s_name );
binbuf_addv(b, "ssiissiiffiiifi", gensym("#X"),gensym("obj"),
! (t_int)text_xpix(&x->x_obj, x->x_glist), (t_int)text_ypix(&x->x_obj, x->x_glist),
gensym("pianoroll"), x->x_name, x->x_width, x->x_height,
x->x_pmin, x->x_pmax,
***************
*** 282,287 ****
static void pianoroll_properties(t_gobj *z, t_glist *owner)
{
! char buf[800];
! t_pianoroll *x=(t_pianoroll *)z;
sprintf(buf, "pdtk_pianoroll_dialog %%s %s %d %d %.2f %.2f %d %d %d %d\n",
--- 282,287 ----
static void pianoroll_properties(t_gobj *z, t_glist *owner)
{
! char buf[800];
! t_pianoroll *x=(t_pianoroll *)z;
sprintf(buf, "pdtk_pianoroll_dialog %%s %s %d %d %.2f %.2f %d %d %d %d\n",
***************
*** 396,401 ****
{
t_pianoroll *x = (t_pianoroll *)z;
! int xold = x->x_obj.te_xpix;
! int yold = x->x_obj.te_ypix;
// post( "pianoroll_displace dx=%d dy=%d", dx, dy );
--- 396,401 ----
{
t_pianoroll *x = (t_pianoroll *)z;
! int xold = text_xpix(&x->x_obj, glist);
! int yold = text_ypix(&x->x_obj, glist);
// post( "pianoroll_displace dx=%d dy=%d", dx, dy );
***************
*** 412,417 ****
int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
! t_pianoroll* x = (t_pianoroll *)z;
! t_canvas *canvas=glist_getcanvas(glist);
if ( doit)
--- 412,417 ----
int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
! t_pianoroll* x = (t_pianoroll *)z;
! t_canvas *canvas=glist_getcanvas(glist);
if ( doit)
***************
*** 423,432 ****
t_float ygstep = x->x_height/x->x_nbgrades;
! si = ( xpix - x->x_obj.te_xpix ) / xgstep;
! gi = ( ypix - x->x_obj.te_ypix ) / ygstep;
// post( "pianoroll : step : %d : grade : %d", si, gi );
! if ( ( xpix - x->x_obj.te_xpix ) > ( si*xgstep+2*xgstep/3 ) )
{
{
--- 423,432 ----
t_float ygstep = x->x_height/x->x_nbgrades;
! si = ( xpix - text_xpix(&x->x_obj, glist) ) / xgstep;
! gi = ( ypix - text_ypix(&x->x_obj, glist) ) / ygstep;
// post( "pianoroll : step : %d : grade : %d", si, gi );
! if ( ( xpix - text_xpix(&x->x_obj, glist) ) > ( si*xgstep+2*xgstep/3 ) )
{
{
***************
*** 801,817 ****
pianoroll_widgetbehavior.w_visfn = pianoroll_vis;
pianoroll_widgetbehavior.w_clickfn = pianoroll_click;
! /*
! * <hans at eds.org>: As of 0.37, pd does not have these last
! * two elements in t_widgetbehavoir anymore.
! * see pd/src/notes.txt:
! * savefunction and dialog into class structure
! */
! #if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION)
pianoroll_widgetbehavior.w_propertiesfn = pianoroll_properties;
pianoroll_widgetbehavior.w_savefn = pianoroll_save;
- #else
- class_setsavefn(pianoroll_class, &pianoroll_save);
- class_setpropertiesfn(pianoroll_class, &pianoroll_properties);
#endif
class_setwidget(pianoroll_class, &pianoroll_widgetbehavior);
}
--- 801,814 ----
pianoroll_widgetbehavior.w_visfn = pianoroll_vis;
pianoroll_widgetbehavior.w_clickfn = pianoroll_click;
!
! #if PD_MINOR_VERSION >= 37
! class_setpropertiesfn(pianoroll_class, pianoroll_properties);
! class_setsavefn(pianoroll_class, pianoroll_save);
! #else
pianoroll_widgetbehavior.w_propertiesfn = pianoroll_properties;
pianoroll_widgetbehavior.w_savefn = pianoroll_save;
#endif
+
class_setwidget(pianoroll_class, &pianoroll_widgetbehavior);
+ class_sethelpsymbol(pianoroll_class, gensym("pianoroll.pd"));
}
Index: CHANGES.LOG
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/pianoroll/CHANGES.LOG,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CHANGES.LOG 16 Aug 2003 08:26:37 -0000 1.1
--- CHANGES.LOG 2 Mar 2005 02:46:23 -0000 1.2
***************
*** 1,2 ****
--- 1,6 ----
+ 0.9
+ added GOP support
+ 0.8
+ adapted for pd 0.37
0.7
added "pitch x y" and "volume x y" messages
Index: Makefile
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/pianoroll/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile 16 Aug 2003 08:26:21 -0000 1.1
--- Makefile 2 Mar 2005 02:46:23 -0000 1.2
***************
*** 68,72 ****
.c.pd_linux:
! ../tk2c.bash < $*.tk >$*.tk2c
cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
--- 68,72 ----
.c.pd_linux:
! ./tk2c.bash < $*.tk >$*.tk2c
cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
- Previous message: [PD-cvs] externals/unauthorized/grid CHANGES.LOG,1.2,1.3 grid.c,1.6,1.7 help-grid.pd,1.3,1.4
- Next message: [PD-cvs] externals/unauthorized/playlist CHANGES.LOG,1.3,1.4 playlist.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list