head	1.5;
access;
symbols
	rel-0-2-1:1.4
	before_adj_struct:1.3.2.1
	jack:1.3.0.2
	rel-0-1-0:1.2
	rel-0-0-0:1.1;
locks; strict;
comment	@ * @;


1.5
date	2007.03.22.20.55.43;	author robertatwood;	state Exp;
branches;
next	1.4;

1.4
date	2006.04.05.21.53.36;	author robertatwood;	state Exp;
branches;
next	1.3;

1.3
date	2005.08.20.18.26.42;	author robertatwood;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2005.04.03.20.05.39;	author robertatwood;	state Exp;
branches;
next	1.1;

1.1
date	2004.04.16.11.36.56;	author robertatwood;	state Exp;
branches;
next	;

1.3.2.1
date	2006.01.04.00.06.03;	author robertatwood;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Updated GPL text to reflect new address of Free Software foundation
Prepare to move repository to savannah.nongnu.org
@
text
@/**************************************************************
This file is part of the Variseq program.
Variseq -- a variable pitch and step sample sequencer
Copyright (C) 2004  Robert Atwood r.atwood (at) imperial (dot) ac (dot) uk

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 
See the file COPYING for more information
**************************************************************/


#ifndef NOTES_H
#define NOTES_H
#include <stdio.h>
#include "mysound.h"
#include "samples.h"

#define N_NONE -1
class pattern;

typedef struct notepub_str {
   public:

   int samplenum; /* which sample */
   int notelevel;   /* which stretced version */

   int my_num;     /* where this note is in the pattern */

   float vol;     /* volume of the note */
   float clip;    /* clipping of the note */
   float pan;     /* balance left-right of the note */
   int smooth;    /* end-smoothing of the note */

   int slen; /* length of the stretched sample wanted here */
   int rlen; /* length of the beat to fill (frames) */
   int tlen; /* total lenght (frames) */
   int oldtlen; /* old total length if changed */
   int nover; /* number of sequence slots  overflow */
   int oldnover; /* old number of sequence slots overflow */
   int startframe;
   int starttick;
   int ticks;

   int state; /* is the note selected to be played? */
   int noteoctave; /* octave of the note */
}notepub;
class note:public notepub {
   public:
   note * next;
   note *prev;
   pattern * parent;
   sbuf * mybuf;
   
   /* constructors */ 
   note(){
       samplenum = N_NONE;
       notelevel = N_NONE;
       noteoctave = D_OCT;
       rlen = 44100;
       vol=1.0;
       pan=0.5;
       clip = 1.0;
       my_num=0;
       state=0;
       mybuf=NULL;
   }
   note(int newnum){
       samplenum = N_NONE;
       notelevel = N_NONE;
       noteoctave = D_OCT;
       rlen = 44100;
       vol=1.0;
       pan=0.5;
       clip = 1.0;
       state=0;
       my_num = newnum;
       mybuf=NULL;
   }
   ~note(){}

   /* write the note into the loop buffer */
   void write (sbuf * buf);     /* first pass */
   void overwrite (sbuf * buf); /* second pass, fix overwritten notes */

   /* functions to set the user-selected values */
   /* obtained from the interface */
   void setsample(int snum ,int nnum);
   void setsample (int snum);
   void setoctave(int oct);
   void setnote (int nnum);
   void setvol(float v){ vol = v;};
   void setclip(float v){ clip = v;};
   void setpan(float p){pan=p;};
   void setsmooth(float sm) ;

   /* functions to alter or access the internal values */
   void setframes(int fpt);
   void setticks (int nticks){ticks = nticks;};
   void setstarttick(int st){starttick = st;};
   void setstate(int s){state=s;};
   int mynum(){return my_num;};
   int mynum (int newnum){ my_num = newnum; return my_num;}
   void setparent(pattern * pat){parent = pat;};
   /* input/output functions */
   void savenote(FILE * fp);
   void loadnote(FILE * fp);
   void dumpnote(FILE * fp);



   };
   #endif

/* $Id: notes.h,v 1.4 2006/04/05 21:53:36 robertatwood Exp $ */
@


1.4
log
@Jack version is the main branch now
@
text
@d18 1
a18 1
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
d22 1
d125 1
a125 1
/* $Id: notes.h,v 1.3.2.1 2006/01/04 00:06:03 robertatwood Exp $ */
@


1.3
log
@Added a save/restore workspace function
Added window to display names of samples
@
text
@d75 1
d87 1
d124 1
a124 1
/* $Id: notes.h,v 1.3 2005/04/03 19:05:10 robert Exp $ */
@


1.3.2.1
log
@Jack input as well, and scrambling in compile-time option
@
text
@a74 1
       mybuf=NULL;
a85 1
       mybuf=NULL;
d122 1
a122 1
/* $Id: notes.h,v 1.3 2005/08/20 18:26:42 robertatwood Exp $ */
@


1.2
log
@Changed the buffer writing so that samples extend into unused notes.
Altered file choose usage to correctly use the FLTK chooser
@
text
@@


1.1
log
@Initial version uploaded to Sourceforge
@
text
@d39 4
a42 4
   float vol;
   float clip;
   float pan;
   int smooth;
d46 4
d55 1
a55 1
   int noteoctave;
d59 3
a62 1
   pattern * parent;
d64 1
d89 6
a98 3
   void write (sbuf * buf);


d103 2
d112 1
d116 3
d122 1
a122 1
/* $Id: notes.h,v 1.7 2004/04/12 13:22:33 robert Exp $ */
@

