#endif 
ConvertNote (MODNOTE * n){  UBYTE instrument, effect, effdat, note;  UWORD period;  UBYTE lastnote = 0;  /* extract the various information from the 4 bytes that make up a note */  instrument = (n->a & 0x10) | (n->c >> 4);  period = (((UWORD) n->a & 0xf) << 8) + n->b;  effect = n->c & 0xf;  effdat = n->d;  /* Convert the period to a note number */  note = 0;  if (period)    {      for (note = 0; note < 7 * OCTAVE; note++)	if (period >= npertab[note])	  break;      if (note == 7 * OCTAVE)	note = 0;      else	note++;    }  if (instrument)    {      /* if instrument does not exist, note cut */      if ((instrument > 31) || (!mh->samples[instrument - 1].length))	{	  UniPTEffect (0xc, 0);	  if (effect == 0xc)	    effect = effdat = 0;	}      else	{	  /* Protracker handling */	  if (modtype <= 2)	    {	      /* if we had a note, then change instrument... */	      if (note)		UniInstrument (instrument - 1);	      /* ...otherwise, only adjust volume... */	      else		{		  /* ...unless an effect was specified, which forces a new		     note to be played */		  if (effect || effdat)		    {		      UniInstrument (instrument - 1);		      note = lastnote;		    }		  else		    UniPTEffect (0xc, mh->samples[instrument - 1].volume & 0x7f);		}	    }	  else	    {	      /* Fasttracker handling */	      UniInstrument (instrument - 1);	      if (!note)		note = lastnote;	    }	}    }  if (note)    {      UniNote (note + 2 * OCTAVE - 1);      lastnote = note;    }  /* Convert pattern jump from Dec to Hex */  if (effect == 0xd)    effdat = (((effdat & 0xf0) >> 4) * 10) + (effdat & 0xf);  /* Volume slide, up has priority */  if ((effect == 0xa) && (effdat & 0xf) && (effdat & 0xf0))    effdat &= 0xf0;  /* Handle ``heavy'' volumes correctly */  if ((effect == 0xc) && (effdat > 0x40))    effdat = 0x40;  /* Ignore 100, 200 and 300 (there is no porta memory in mod files) */  if ((!effdat) && ((effect == 1)||(effect == 2)||(effect ==3)))    effect = 0;  UniPTEffect (effect, effdat);}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/ed69156e0ed245b2f4e439c0372d7406fe765443/load_mod.c/clean/libunimod/load_mod.c