diff -ur csound5~/InOut/widgets.cpp csound5/InOut/widgets.cpp --- csound5~/InOut/widgets.cpp 2012-08-29 23:05:54.000000000 +0200 +++ csound5/InOut/widgets.cpp 2012-08-29 23:08:18.000000000 +0200 @@ -1517,7 +1517,7 @@ *p->inum_val = numfields; // number of snapshots if (*p->ifn >= 1) { // if the table number is valid FUNC *ftp; // store the snapshot into the table - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) { + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) { MYFLT *table = ftp->ftable; for (int j = 0; j < numfields; j++) { table[index*numfields+j] = snap.fields[j].value; @@ -3377,7 +3377,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexp); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) { p->table = ftp->ftable; p->tablen = ftp->flen; } @@ -3428,23 +3428,23 @@ } } else { - if (LIKELY((ftp = csound->FTFind(csound, p->ioutable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ioutable)) != NULL)) outable = ftp->ftable + (long) *p->ioutablestart_ndx; else return NOTOK; } if ((int) *p->iminmaxtable > 0) { - if (LIKELY((ftp = csound->FTFind(csound, p->iminmaxtable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iminmaxtable)) != NULL)) minmaxtable = ftp->ftable; else return NOTOK; } if ((int) *p->iexptable > 0) { - if (LIKELY((ftp = csound->FTFind(csound, p->iexptable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iexptable)) != NULL)) exptable = ftp->ftable; else return NOTOK; } if ((int) *p->itypetable > 0) { - if (LIKELY((ftp = csound->FTFind(csound, p->itypetable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->itypetable)) != NULL)) typetable = ftp->ftable; else return NOTOK; } @@ -3565,7 +3565,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexp); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) p->slider_data[j].table = ftp->ftable; else return NOTOK; p->slider_data[j].tablen = ftp->flen; @@ -3651,7 +3651,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexpx); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) { p->tablex = ftp->ftable; p->tablenx = ftp->flen; } @@ -3685,7 +3685,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexpy); - if (LIKELY((ftp = csound->FTFind(csound, &fnum)) != NULL)) { + if (LIKELY((ftp = csound->FTnp2Find(csound, &fnum)) != NULL)) { p->tabley = ftp->ftable; p->tableny = ftp->flen; } @@ -3798,7 +3798,7 @@ FUNC *ftp; p->min = *p->imin; MYFLT fnum = abs(iexp); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) { p->table = ftp->ftable; p->tablen = ftp->flen; } @@ -4186,7 +4186,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexp); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) { p->table = ftp->ftable; p->tablen = ftp->flen; } @@ -4398,7 +4398,7 @@ if (*p->ifn > 0) { // mapping values p->flag = 1; - if (LIKELY((ftp = csound->FTFind(csound,p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound,p->ifn)) != NULL)) p->table = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -4505,23 +4505,23 @@ } } else { - if (LIKELY((ftp = csound->FTFind(csound, p->ioutable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ioutable)) != NULL)) outable = ftp->ftable + (long) *p->ioutablestart_ndx; else return NOTOK; } if ((int) *p->iminmaxtable > 0) { - if (LIKELY((ftp = csound->FTFind(csound, p->iminmaxtable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iminmaxtable)) != NULL)) minmaxtable = ftp->ftable; else return NOTOK; } if ((int) *p->iexptable > 0) { - if (LIKELY((ftp = csound->FTFind(csound, p->iexptable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iexptable)) != NULL)) exptable = ftp->ftable; else return NOTOK; } if ((int) *p->itypetable > 0) { - if (LIKELY((ftp = csound->FTFind(csound, p->itypetable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->itypetable)) != NULL)) typetable = ftp->ftable; else return NOTOK; } @@ -4651,7 +4651,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexp); - if (LIKELY((ftp = csound->FTFind(csound, &fnum)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, &fnum)) != NULL)) p->slider_data[j].table = ftp->ftable; else return NOTOK; p->slider_data[j].tablen = ftp->flen; @@ -4718,12 +4718,12 @@ } } else { - if ((ftp = csound->FTFind(csound, p->ioutable)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->ioutable)) != NULL) outable = ftp->ftable + (long) *p->ioutablestart_ndx; else return NOTOK; } - if((ftp = csound->FTFind(csound, p->iconfigtable)) != NULL) + if((ftp = csound->FTnp2Find(csound, p->iconfigtable)) != NULL) configtable = ftp->ftable; else return NOTOK; @@ -4829,7 +4829,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexp); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) p->slider_data[j].table = ftp->ftable; else return NOTOK; p->slider_data[j].tablen = ftp->flen; @@ -4897,12 +4897,12 @@ } } else { - if ((ftp = csound->FTFind(csound, p->ioutable)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->ioutable)) != NULL) outable = ftp->ftable + (long) *p->ioutablestart_ndx; else return NOTOK; } - if((ftp = csound->FTFind(csound, p->iconfigtable)) != NULL) + if((ftp = csound->FTnp2Find(csound, p->iconfigtable)) != NULL) configtable = ftp->ftable; else return NOTOK; @@ -5009,7 +5009,7 @@ { FUNC *ftp; MYFLT fnum = abs(iexp); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) p->slider_data[j].table = ftp->ftable; else return NOTOK; p->slider_data[j].tablen = ftp->flen; @@ -5060,7 +5060,7 @@ int startInd = (int)*p->startInd; int startSlid = (int)*p->startSlid; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) table = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5073,7 +5073,7 @@ } FLSLIDERBANK *q = (FLSLIDERBANK *)ST(AddrSetValue)[ (int) *p->ihandle].opcode; - if (LIKELY((ftp = csound->FTFind(csound, q->ioutable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, q->ioutable)) != NULL)) outable = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5126,7 +5126,7 @@ int startInd = (int)*p->startInd; int startSlid = (int)*p->startSlid; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) table = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5140,7 +5140,7 @@ FLSLIDERBANK2 *q = (FLSLIDERBANK2 *)ST(AddrSetValue)[ (int) *p->ihandle].opcode; - if (LIKELY((ftp = csound->FTFind(csound, q->ioutable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, q->ioutable)) != NULL)) outable = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5204,7 +5204,7 @@ p->startind = (int)*p->startInd; p->startslid = (int)*p->startSlid; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->table = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5217,7 +5217,7 @@ } p->q = (FLSLIDERBANK2 *) ST(AddrSetValue)[ (int) *p->ihandle].opcode; - if (LIKELY((ftp = csound->FTFind(csound, p->q->ioutable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->q->ioutable)) != NULL)) p->outable = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5292,7 +5292,7 @@ p->startind = (int)*p->startInd; p->startslid = (int)*p->startSlid; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->table = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5305,7 +5305,7 @@ } p->q = (FLSLIDERBANK *) ST(AddrSetValue)[ (int) *p->ihandle].opcode; - if (LIKELY((ftp = csound->FTFind(csound, p->q->ioutable)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->q->ioutable)) != NULL)) p->outable = ftp->ftable; else { return csound->InitError(csound, "%s", @@ -5399,7 +5399,7 @@ { FUNC *ftp; MYFLT fnum = abs(p->expx); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) { p->tablex = ftp->ftable; p->tablenx = ftp->flen; } @@ -5425,7 +5425,7 @@ { FUNC *ftp; MYFLT fnum = abs(p->expy); - if ((ftp = csound->FTFind(csound, &fnum)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, &fnum)) != NULL) { p->tabley = ftp->ftable; p->tableny = ftp->flen; } diff -ur csound5~/OOps/midiops.c csound5/OOps/midiops.c --- csound5~/OOps/midiops.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/midiops.c 2012-08-29 23:08:18.000000000 +0200 @@ -116,7 +116,7 @@ int basekeymidi; MYFLT basefreq, factor, interval; - if (UNLIKELY((ftp = csound->FTFind(csound, p->tablenum)) == NULL)) { + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->tablenum)) == NULL)) { return csound->InitError(csound, Str("cpstabm: invalid modulator table")); } func = ftp->ftable; @@ -254,7 +254,7 @@ amp = csound->curip->m_veloc / FL(128.0); /* amp = normalised veloc */ if ((fno = (int32)*p->ifn) > 0) { /* if valid ftable, */ - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; /* use amp as index */ amp = *(ftp->ftable + (int32)(amp * ftp->flen)); } diff -ur csound5~/OOps/pstream.c csound5/OOps/pstream.c --- csound5~/OOps/pstream.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/pstream.c 2012-08-29 23:08:18.000000000 +0200 @@ -466,7 +466,7 @@ p->fout->framecount = 1; p->lastframe = 0; } - p->maskfunc = csound->FTFind(csound, p->ifn); + p->maskfunc = csound->FTnp2Find(csound, p->ifn); if (UNLIKELY(p->maskfunc==NULL)) return NOTOK; @@ -582,7 +582,7 @@ csound->Die(csound, Str("pvsftw: bad value for ifna.\n")); if (UNLIKELY(*p->ifnf < 0.0f)) /* 0 = notused */ csound->Die(csound, Str("pvsftw: bad value for ifnf.\n")); - p->outfna = csound->FTFind(csound, p->ifna); + p->outfna = csound->FTnp2Find(csound, p->ifna); if (UNLIKELY(p->outfna==NULL)) return NOTOK; if (UNLIKELY(p->fsrc->sliding)) @@ -602,7 +602,7 @@ /* freq table? */ if ((int32) *p->ifnf >= 1) { - p->outfnf = csound->FTFind(csound, p->ifnf); + p->outfnf = csound->FTnp2Find(csound, p->ifnf); if (UNLIKELY(p->outfnf==NULL)) return NOTOK; ftablef = p->outfnf->ftable; @@ -689,7 +689,7 @@ otherwise, there is no change! */ if ((int32) *p->ifna != 0) { - p->infna = csound->FTFind(csound, p->ifna); + p->infna = csound->FTnp2Find(csound, p->ifna); if (UNLIKELY(p->infna==NULL)) return NOTOK; p->ftablea = p->infna->ftable; @@ -708,7 +708,7 @@ /* freq table? */ if ((int32) *p->ifnf >= 1) { - p->infnf = csound->FTFind(csound, p->ifnf); + p->infnf = csound->FTnp2Find(csound, p->ifnf); if (UNLIKELY(p->infnf==NULL)) return NOTOK; p->ftablef = p->infnf->ftable; diff -ur csound5~/OOps/schedule.c csound5/OOps/schedule.c --- csound5~/OOps/schedule.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/schedule.c 2012-08-29 23:16:00.000000000 +0200 @@ -518,7 +518,7 @@ int trigseq_set(CSOUND *csound, TRIGSEQ *p) /* by G.Maldonado */ { FUNC *ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->kfn)) == NULL)) { + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->kfn)) == NULL)) { return csound->InitError(csound, Str("trigseq: incorrect table number")); } p->done = 0; diff -ur csound5~/OOps/ugens2.c csound5/OOps/ugens2.c --- csound5~/OOps/ugens2.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/ugens2.c 2012-08-29 23:09:14.000000000 +0200 @@ -194,7 +194,7 @@ static int itblchk(CSOUND *csound, TABLE *p) { - if (UNLIKELY((p->ftp = csound->FTFind(csound, p->xfn)) == NULL)) + if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->xfn)) == NULL)) return NOTOK; /* Although TABLE has an integer variable for the table number diff -ur csound5~/OOps/ugens2a.c csound5/OOps/ugens2a.c --- csound5~/OOps/ugens2a.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/ugens2a.c 2012-08-29 23:08:18.000000000 +0200 @@ -37,7 +37,7 @@ static int itblchk(CSOUND *csound, TABLE *p) { - if (UNLIKELY((p->ftp = csound->FTFind(csound, p->xfn)) == NULL)) + if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->xfn)) == NULL)) return csound->InitError(csound, Str("table does not exist")); /* Although TABLE has an integer variable for the table number diff -ur csound5~/OOps/ugens6.c csound5/OOps/ugens6.c --- csound5~/OOps/ugens6.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/ugens6.c 2012-08-29 23:08:18.000000000 +0200 @@ -993,7 +993,7 @@ { FUNC *ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; p->ftp = ftp; p->xmul = (*p->imode == FL(0.0) ? FL(1.0) : (MYFLT)ftp->flen); diff -ur csound5~/OOps/vdelay.c csound5/OOps/vdelay.c --- csound5~/OOps/vdelay.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/OOps/vdelay.c 2012-08-29 23:08:18.000000000 +0200 @@ -905,7 +905,7 @@ FUNC *ftCombs; p->numCombs = (int) *p->inumCombs; /* Get user-defined set of comb constants from table */ - if (UNLIKELY((ftCombs = csound->FTFind(csound, p->ifnCombs)) == NULL)) + if (UNLIKELY((ftCombs = csound->FTnp2Find(csound, p->ifnCombs)) == NULL)) return NOTOK; if (UNLIKELY(ftCombs->flen < p->numCombs * 2)) { return csound->InitError(csound, Str("reverbx; Combs ftable must have " @@ -937,7 +937,7 @@ else { /* Have user-defined set of alpas constants */ FUNC *ftAlpas; p->numAlpas = (int) *p->inumAlpas; - if (UNLIKELY((ftAlpas = csound->FTFind(csound, p->ifnAlpas)) == NULL)) + if (UNLIKELY((ftAlpas = csound->FTnp2Find(csound, p->ifnAlpas)) == NULL)) return NOTOK; if (UNLIKELY(ftAlpas->flen < p->numAlpas * 2)) { return csound->InitError(csound, Str("reverbx; Alpas ftable must have" diff -ur csound5~/Opcodes/OSC.c csound5/Opcodes/OSC.c --- csound5~/Opcodes/OSC.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/OSC.c 2012-08-29 23:08:18.000000000 +0200 @@ -235,7 +235,7 @@ if (UNLIKELY(p->XSTRCODE&msk)) return csound->PerfError(csound, Str("String not expected")); /* make sure fn exists */ - if (LIKELY((ftp=csound->FTFind(csound,arg[i]))!=NULL)) { + if (LIKELY((ftp=csound->FTnp2Find(csound,arg[i]))!=NULL)) { data = ftp->ftable; len = ftp->flen-1; /* and set it up */ } diff -ur csound5~/Opcodes/babo.c csound5/Opcodes/babo.c --- csound5~/Opcodes/babo.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/babo.c 2012-08-29 23:08:18.000000000 +0200 @@ -722,7 +722,7 @@ int n = 0; if (p->expert_values > 0) - ftp = csound->FTFind(csound, &(p->expert_values)); + ftp = csound->FTnp2Find(csound, &(p->expert_values)); p->decay = load_value_or_default(ftp, n++, BABO_DEFAULT_DECAY); p->hidecay = load_value_or_default(ftp, n++, BABO_DEFAULT_HIDECAY); diff -ur csound5~/Opcodes/bilbar.c csound5/Opcodes/bilbar.c --- csound5~/Opcodes/bilbar.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/bilbar.c 2012-08-29 23:08:18.000000000 +0200 @@ -266,13 +266,13 @@ c = (double *)p->auxch.auxp; if (*p->rattle_tab==FL(0.0) || - (ftp=csound->FTFind(csound, p->rattle_tab)) == NULL) p->rattle_num = 0; + (ftp=csound->FTnp2Find(csound, p->rattle_tab)) == NULL) p->rattle_num = 0; else { p->rattle_num = (int)(*ftp->ftable); p->rattle = (RATTLE*)(&((MYFLT*)ftp->ftable)[1]); } if (*p->rubber_tab==FL(0.0) || - (ftp=csound->FTFind(csound, p->rubber_tab)) == NULL) p->rubber_num = 0; + (ftp=csound->FTnp2Find(csound, p->rubber_tab)) == NULL) p->rubber_num = 0; else { p->rubber_num = (int)(*ftp->ftable); p->rubber = (RUBBER*)(&((MYFLT*)ftp->ftable)[1]); diff -ur csound5~/Opcodes/compress.c csound5/Opcodes/compress.c --- csound5~/Opcodes/compress.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/compress.c 2012-08-29 23:08:18.000000000 +0200 @@ -190,7 +190,7 @@ double b; FUNC *ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) return NOTOK; + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; p->ftp = ftp; p->maxphs = (MYFLT)ftp->flen; /* set ftable params */ p->midphs = p->maxphs * FL(0.5); diff -ur csound5~/Opcodes/cross2.c csound5/Opcodes/cross2.c --- csound5~/Opcodes/cross2.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/cross2.c 2012-08-29 23:08:18.000000000 +0200 @@ -335,7 +335,7 @@ p->in1 = b; b += 2 * flen; p->in2 = b; b += 2 * flen; - if ((ftp = csound->FTFind(csound, p->iwin)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iwin)) != NULL) p->win = ftp; else return NOTOK; diff -ur csound5~/Opcodes/crossfm.c csound5/Opcodes/crossfm.c --- csound5~/Opcodes/crossfm.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/crossfm.c 2012-08-29 23:08:18.000000000 +0200 @@ -28,8 +28,8 @@ int xfmset(CSOUND *csound, CROSSFM *p) { - FUNC *ftp1 = csound->FTFind(csound, p->ifn1); - FUNC *ftp2 = csound->FTFind(csound, p->ifn2); + FUNC *ftp1 = csound->FTnp2Find(csound, p->ifn1); + FUNC *ftp2 = csound->FTnp2Find(csound, p->ifn2); if (UNLIKELY(ftp1 == NULL || ftp2 == NULL)) { return csound->InitError(csound, Str("crossfm: ftable not found")); } diff -ur csound5~/Opcodes/fm4op.c csound5/Opcodes/fm4op.c --- csound5~/Opcodes/fm4op.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/fm4op.c 2012-08-29 23:08:18.000000000 +0200 @@ -145,7 +145,7 @@ make_ADSR(&p->adsr[2]); make_ADSR(&p->adsr[3]); make_TwoZero(&p->twozero); - if (UNLIKELY((ftp = csound->FTFind(csound, p->vifn)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->vifn)) == NULL)) goto err1; p->vibWave = ftp; p->baseFreq = FL(440.0); @@ -169,13 +169,13 @@ { FUNC *ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn0)) == NULL)) goto err1; + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn0)) == NULL)) goto err1; p->waves[0] = ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn1)) == NULL)) goto err1; + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn1)) == NULL)) goto err1; p->waves[1] = ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn2)) == NULL)) goto err1; + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn2)) == NULL)) goto err1; p->waves[2] = ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn3)) == NULL)) goto err1; + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn3)) == NULL)) goto err1; p->waves[3] = ftp; p->w_time[0] = p->w_time[1] = p->w_time[2] = p->w_time[3] = FL(0.0); return OK; diff -ur csound5~/Opcodes/ftconv.c csound5/Opcodes/ftconv.c --- csound5~/Opcodes/ftconv.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/ftconv.c 2012-08-29 23:08:18.000000000 +0200 @@ -161,7 +161,7 @@ return csound->InitError(csound, Str("ftconv: invalid impulse response " "partition length")); } - ftp = csound->FTFind(csound, p->iFTNum); + ftp = csound->FTnp2Find(csound, p->iFTNum); if (UNLIKELY(ftp == NULL)) return NOTOK; /* ftfind should already have printed the error message */ /* calculate total length / number of partitions */ diff -ur csound5~/Opcodes/gab/hvs.c csound5/Opcodes/gab/hvs.c --- csound5~/Opcodes/gab/hvs.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/gab/hvs.c 2012-08-29 23:08:18.000000000 +0200 @@ -60,11 +60,11 @@ { FUNC *ftp; - if ((ftp = csound->FTFind(csound, p->iOutTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iOutTab)) != NULL) p->outTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->iPositionsTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iPositionsTab)) != NULL) p->posTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->iSnapTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iSnapTab)) != NULL) p->snapTable = ftp->ftable; if (*p->inumPointsX < 2 ) return csound->InitError(csound, Str("hvs1: a line segment must be " @@ -73,7 +73,7 @@ if (*p->iConfigTab == 0) p->iconfFlag = 0; else { - if ((ftp = csound->FTFind(csound, p->iConfigTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iConfigTab)) != NULL) p->outTable = ftp->ftable; p->iconfFlag = 1; } @@ -142,11 +142,11 @@ { FUNC *ftp; - if ((ftp = csound->FTFind(csound, p->iOutTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iOutTab)) != NULL) p->outTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->iPositionsTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iPositionsTab)) != NULL) p->posTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->iSnapTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iSnapTab)) != NULL) p->snapTable = ftp->ftable; if (*p->inumlinesX < 2 || *p->inumlinesY < 2) return csound->InitError(csound, Str("hvs2: a square area must be " @@ -155,7 +155,7 @@ if (*p->iConfigTab == 0) p->iconfFlag = 0; else { - if ((ftp = csound->FTFind(csound, p->iConfigTab)) != NULL) { + if ((ftp = csound->FTnp2Find(csound, p->iConfigTab)) != NULL) { p->outTable = ftp->ftable; } p->iconfFlag = 1; @@ -238,11 +238,11 @@ { FUNC *ftp; - if ((ftp = csound->FTFind(csound, p->iOutTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iOutTab)) != NULL) p->outTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->iPositionsTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iPositionsTab)) != NULL) p->posTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->iSnapTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iSnapTab)) != NULL) p->snapTable = ftp->ftable; if (*p->inumlinesX < 2 || *p->inumlinesY < 2) return csound->InitError(csound, Str("hvs3: a square area must be " @@ -252,7 +252,7 @@ if (*p->iConfigTab == 0) p->iconfFlag = 0; else { - if ((ftp = csound->FTFind(csound, p->iConfigTab)) != NULL) + if ((ftp = csound->FTnp2Find(csound, p->iConfigTab)) != NULL) p->outTable = ftp->ftable; p->iconfFlag = 1; } diff -ur csound5~/Opcodes/gab/newgabopc.c csound5/Opcodes/gab/newgabopc.c --- csound5~/Opcodes/gab/newgabopc.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/gab/newgabopc.c 2012-08-29 23:16:59.000000000 +0200 @@ -36,7 +36,7 @@ static int mtable1_set(CSOUND *csound, MTABLE1 *p) /* mtab by G.Maldonado */ { FUNC *ftp; - if ((ftp = csound->FTFind(csound, p->xfn)) == NULL) + if ((ftp = csound->FTnp2Find(csound, p->xfn)) == NULL) return csound->InitError(csound, Str("vtable1: incorrect table number")); p->ftable = ftp->ftable; p->nargs = p->INOCOUNT-1; @@ -236,7 +236,7 @@ { FUNC *ftp; int nelems = (int) *p->inumElems; - if ((ftp = csound->FTFind(csound, p->idestTab)) == NULL) + if ((ftp = csound->FTnp2Find(csound, p->idestTab)) == NULL) return csound->InitError(csound, Str("copyTabElems: incorrect destination table number")); @@ -247,7 +247,7 @@ "or number of elements to copy too big")); p->dTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->isourceTab)) == NULL) + if ((ftp = csound->FTnp2Find(csound, p->isourceTab)) == NULL) return csound->InitError(csound, Str("copyTabElems: incorrect source table number")); @@ -291,7 +291,7 @@ FUNC *ftp; int nelems = (int) *p->inumElems, dLen, sLen; MYFLT *sTable, *dTable; - if ((ftp = csound->FTFind(csound, p->idestTab)) == NULL) + if ((ftp = csound->FTnp2Find(csound, p->idestTab)) == NULL) return csound->InitError(csound, Str("copyTabElems: incorrect destination " "table number")); @@ -301,7 +301,7 @@ Str("copyTabElems: destination table too short " "or number of elements to copy too big")); dTable = ftp->ftable; - if ((ftp = csound->FTFind(csound, p->isourceTab)) == NULL) + if ((ftp = csound->FTnp2Find(csound, p->isourceTab)) == NULL) return csound->InitError(csound, Str("copyTabElems: incorrect source table number")); sLen = ftp->flen; diff -ur csound5~/Opcodes/gab/sliderTable.c csound5/Opcodes/gab/sliderTable.c --- csound5~/Opcodes/gab/sliderTable.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/gab/sliderTable.c 2012-08-29 23:08:18.000000000 +0200 @@ -55,7 +55,7 @@ FUNC *outftp, **ftp = p->ftp; \ MYFLT *chanblock = (MYFLT *) csound->m_chnbp[chan]->ctl_val; \ \ - if((outftp = csound->FTFind(csound, p->ioutfn)) != NULL) \ + if((outftp = csound->FTnp2Find(csound, p->ioutfn)) != NULL) \ p->outTable = outftp->ftable; \ while (j < 8) { \ int t = (int) *sld->ifn; \ @@ -110,7 +110,7 @@ default: /* TABLE */ \ value = value; /* unchanged, value must be in the 0 to 1 range, */ \ /* representing the phase of the table */ \ - if (*sld->ifn > 0) *ftp = csound->FTFind(csound, sld->ifn); \ + if (*sld->ifn > 0) *ftp = csound->FTnp2Find(csound, sld->ifn); \ } \ chanblock[*slnum++] = (MYFLT)((int)(value * f7bit + FL(0.5))); \ min++; max++; ftp++; j++; sld++; \ @@ -268,7 +268,7 @@ MYFLT *yt1 = p->yt1, *c1=p->c1, *c2=p->c2; \ \ \ - if((outftp = csound->FTFind(csound, p->ioutfn)) != NULL) \ + if((outftp = csound->FTnp2Find(csound, p->ioutfn)) != NULL) \ p->outTable = outftp->ftable; \ while (j < n) { \ int t = (int) *sld->ifn; \ @@ -310,7 +310,7 @@ default: /* TABLE */ \ value = value; /* unchanged, value must be in the 0 to 1 range, */ \ /* representing the phase of the table */ \ - if (*sld->ifn > 0) *ftp = csound->FTFind(csound, sld->ifn); \ + if (*sld->ifn > 0) *ftp = csound->FTnp2Find(csound, sld->ifn); \ if (value >= 1 || value < 0) { \ sprintf(sbuf, Str("sliderXtable: illegal initvalue at " \ "position %d. When using table indexing," \ @@ -512,7 +512,7 @@ sprintf(sbuf, Str("illegal initvalue at position n.%d"), j); return csound->InitError(csound, sbuf); } - if (*sld->ifn > 0) *ftp++ = csound->FTFind(csound, sld->ifn); + if (*sld->ifn > 0) *ftp++ = csound->FTnp2Find(csound, sld->ifn); else *ftp++ = NULL; value = (*(sld++)->initvalue - *min) / (*max++ - *min); min++; @@ -569,7 +569,7 @@ else p->ctlno = ctlno; if (*p->ifn > 0) { - if (((p->ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) p->flag = 0; /* invalid ftable */ else p->flag= 1; } diff -ur csound5~/Opcodes/gab/tabmorph.c csound5/Opcodes/gab/tabmorph.c --- csound5~/Opcodes/gab/tabmorph.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/gab/tabmorph.c 2012-08-29 23:08:18.000000000 +0200 @@ -39,7 +39,7 @@ numOfTabs = p->numOfTabs =((p->INCOUNT-4)); /* count segs & alloc if nec */ argp = p->argums; for (j=0; j< numOfTabs; j++) { - if (UNLIKELY((ftp = csound->FTFind(csound, *argp++)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, *argp++)) == NULL)) return csound->InitError(csound, Str("tabmorph: invalid table number")); if (UNLIKELY(ftp->flen != flength && flength != 0)) return diff -ur csound5~/Opcodes/grain4.c csound5/Opcodes/grain4.c --- csound5~/Opcodes/grain4.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/grain4.c 2012-08-29 23:08:18.000000000 +0200 @@ -52,7 +52,7 @@ MYFLT pitch[4]; /* call ftfind() to get the function table...*/ - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) { + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) { p->ftp = ftp; } else { @@ -62,7 +62,7 @@ /* call ftfind() to get the function table for the envelop...*/ if (*p->ifnenv > 0) { - if (LIKELY((ftp_env = csound->FTFind(csound, p->ifnenv)) != NULL)) { + if (LIKELY((ftp_env = csound->FTnp2Find(csound, p->ifnenv)) != NULL)) { p->ftp_env = ftp_env; } else { diff -ur csound5~/Opcodes/linuxjoystick.c csound5/Opcodes/linuxjoystick.c --- csound5~/Opcodes/linuxjoystick.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/linuxjoystick.c 2012-08-29 23:08:18.000000000 +0200 @@ -55,7 +55,7 @@ stick->initme = 1; } if (UNLIKELY(*stick->ktable != stick->table)) { - if (UNLIKELY((void *)(stick->ftp = csound->FTFind(csound, stick->ktable)) + if (UNLIKELY((void *)(stick->ftp = csound->FTnp2Find(csound, stick->ktable)) == NULL)) { csound->Warning(csound, Str("linuxjoystick: No such table %f"), stick->ktable); diff -ur csound5~/Opcodes/mandolin.c csound5/Opcodes/mandolin.c --- csound5~/Opcodes/mandolin.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/mandolin.c 2012-08-29 23:08:18.000000000 +0200 @@ -76,7 +76,7 @@ { FUNC *ftp; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) p->soundfile = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->soundfile = ftp; else { /* Expect pluck wave */ return csound->InitError(csound, Str("No table for Mandolin")); } diff -ur csound5~/Opcodes/metro.c csound5/Opcodes/metro.c --- csound5~/Opcodes/metro.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/metro.c 2012-08-29 23:08:18.000000000 +0200 @@ -101,7 +101,7 @@ */ FUNC *ftp; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) { + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) { return csound->InitError(csound, Str("splitrig: incorrect table number")); } p->table = ftp->ftable; @@ -148,7 +148,7 @@ FUNC *ftp; MYFLT *table; int j; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) return NOTOK; + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; table = p->table = ftp->ftable; p->numParm = p->INOCOUNT-2; /* ? */ for (j = 0; j < ftp->flen; j+= p->numParm) { diff -ur csound5~/Opcodes/midiops2.c csound5/Opcodes/midiops2.c --- csound5~/Opcodes/midiops2.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/midiops2.c 2012-08-29 23:08:18.000000000 +0200 @@ -60,7 +60,7 @@ else { value = (MYFLT)(csound->curip->m_chnbp->ctl_val[ctlno] * oneTOf7bit); if (*p->ifn > 0) { - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; /* if valid ftable, use value as index */ value = *(ftp->ftable + (int32)(value*ftp->flen)); /* no interpolation */ } @@ -77,7 +77,7 @@ } else p->ctlno = ctlno; if (*p->ifn > 0) { - if (((p->ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) p->flag = FALSE; /* invalid ftable */ else p->flag= TRUE; } @@ -131,7 +131,7 @@ MYFLT diff; int32 length; - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; /* if valid ftable,use value as index */ phase = value * (length = ftp->flen); diff = phase - (int32) phase; @@ -156,7 +156,7 @@ p->ctlno1 = ctlno1; p->ctlno2 = ctlno2; if (*p->ifn > 0) { - if (UNLIKELY(((p->ftp = csound->FTFind(csound, p->ifn)) == NULL))) + if (UNLIKELY(((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL))) p->flag = FALSE; /* invalid ftable */ else p->flag= TRUE; } @@ -226,7 +226,7 @@ * oneTOf21bit); if (*p->ifn > 0) { /* linear interpolation routine */ - FUNC *ftp = csound->FTFind(csound, p->ifn); /* gab-A1 */ + FUNC *ftp = csound->FTnp2Find(csound, p->ifn); /* gab-A1 */ MYFLT phase; MYFLT *base; if (UNLIKELY(ftp == NULL)) @@ -255,7 +255,7 @@ p->ctlno2 = ctlno2; p->ctlno3 = ctlno3; if (*p->ifn > 0) { - if (UNLIKELY(((p->ftp = csound->FTFind(csound, p->ifn)) == NULL))) + if (UNLIKELY(((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL))) p->flag = FALSE; /* invalid ftable */ else p->flag= TRUE; @@ -318,7 +318,7 @@ value = (MYFLT) (csound->m_chnbp[(int) *p->ichan-1]->ctl_val[ctlno] * oneTOf7bit); if (*p->ifn > 0) { - if (UNLIKELY((ftp = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; /* if valid ftable,use value as index */ value = *(ftp->ftable + (int32)(value*ftp->flen)); /* no interpolation */ } @@ -341,7 +341,7 @@ /*else if (midi_in_p_num < 0) midi_in_error("ctrl7");*/ else p->ctlno = ctlno; if (*p->ifn > 0) { - if (UNLIKELY(((p->ftp = csound->FTFind(csound, p->ifn)) == NULL))) + if (UNLIKELY(((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL))) p->flag = FALSE; /* invalid ftable */ else p->flag= TRUE; } @@ -381,7 +381,7 @@ if (*p->ifn > 0) { /* linear interpolation routine */ - FUNC *ftp = csound->FTFind(csound, p->ifn); + FUNC *ftp = csound->FTnp2Find(csound, p->ifn); MYFLT phase; MYFLT *base; if (UNLIKELY(ftp == NULL)) @@ -411,7 +411,7 @@ p->ctlno1 = ctlno1; p->ctlno2 = ctlno2; if (*p->ifn > 0) { - if (UNLIKELY(((p->ftp = csound->FTFind(csound, p->ifn)) == NULL))) + if (UNLIKELY(((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL))) p->flag = FALSE; /* invalid ftable */ else p->flag= TRUE; } @@ -463,7 +463,7 @@ if (*p->ifn > 0) { /* linear interpolation routine */ - FUNC *ftp = csound->FTFind(csound, p->ifn); + FUNC *ftp = csound->FTnp2Find(csound, p->ifn); MYFLT phase; MYFLT *base; if (UNLIKELY(ftp == NULL)) @@ -496,7 +496,7 @@ p->ctlno2 = ctlno2; p->ctlno3 = ctlno3; if (*p->ifn > 0) { - if (UNLIKELY(((p->ftp = csound->FTFind(csound, p->ifn)) == NULL))) + if (UNLIKELY(((p->ftp = csound->FTnp2Find(csound, p->ifn)) == NULL))) p->flag = FALSE; /* invalid ftable */ else p->flag= TRUE; diff -ur csound5~/Opcodes/midiops3.c csound5/Opcodes/midiops3.c --- csound5~/Opcodes/midiops3.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/midiops3.c 2012-08-29 23:08:18.000000000 +0200 @@ -65,7 +65,7 @@ j); \ return csound->InitError(csound, sbuf); \ } \ - if (*sld->ifn > 0) *ftp++ = csound->FTFind(csound, sld->ifn); \ + if (*sld->ifn > 0) *ftp++ = csound->FTnp2Find(csound, sld->ifn); \ else *ftp++ = NULL; \ value = (*(sld++)->initvalue - *min) / (*max++ - *min); \ min++; \ @@ -168,7 +168,7 @@ Str("illegal initvalue at position n.%d"), j); \ return csound->InitError(csound, sbuf); \ } \ - if (*sld->ifn > 0) *ftp++ = csound->FTFind(csound, sld->ifn); \ + if (*sld->ifn > 0) *ftp++ = csound->FTnp2Find(csound, sld->ifn); \ else *ftp++ = NULL; \ value = (*sld->initvalue - *min) / (*max++ - *min); \ min++;; \ @@ -275,7 +275,7 @@ } \ value = chanblock[slnum] * oneTOf7bit; \ if (*sld->ifn > 0) { \ - ftp = csound->FTFind(csound, sld->ifn); \ + ftp = csound->FTnp2Find(csound, sld->ifn); \ value = *( ftp->ftable + (int32)(value * ftp->flen)); \ /* no interpolation */ \ } \ @@ -347,7 +347,7 @@ Str("illegal initvalue at position n.%d"), j); \ return csound->InitError(csound, sbuf); \ } \ - if (*sld->ifn > 0) *ftp++ = csound->FTFind(csound, sld->ifn); \ + if (*sld->ifn > 0) *ftp++ = csound->FTnp2Find(csound, sld->ifn); \ else *ftp++ = NULL; \ intvalue = (int) (((*(sld++)->initvalue - *min) / (*max++ - *min)) \ * f14bit+FL(0.5)); \ @@ -440,7 +440,7 @@ value = (MYFLT)((chanblock[slnum_msb] * 128 \ + chanblock[slnum_lsb]) * oneTOf14bit); \ if (*sld->ifn > 0) { /* linear interpolation routine */ \ - FUNC *ftp= csound->FTFind(csound, sld->ifn); \ + FUNC *ftp= csound->FTnp2Find(csound, sld->ifn); \ MYFLT phase = value * ftp->flen; \ MYFLT *base = ftp->ftable + (int32)(phase); \ value = *base + (*(base + 1) - *base) * (phase - (int32) phase); \ diff -ur csound5~/Opcodes/modal4.c csound5/Opcodes/modal4.c --- csound5~/Opcodes/modal4.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/modal4.c 2012-08-29 23:08:18.000000000 +0200 @@ -40,7 +40,7 @@ { FUNC *ftp; - if (LIKELY((ftp = csound->FTFind(csound,ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound,ifn)) != NULL)) m->vibr = ftp; else { /* Expect sine wave */ return csound->PerfError(csound, Str("No table for Modal4 case")); @@ -240,7 +240,7 @@ int itemp; FUNC *ftp; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->m4.wave = ftp; else { /* Expect an impulslything */ return csound->InitError(csound, Str("No table for Marimba strike")); @@ -355,7 +355,7 @@ MYFLT temp; FUNC *ftp; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->m4.wave = ftp; /* Expect an impulslything */ else { return csound->InitError(csound, Str("No table for Vibraphone strike")); @@ -437,7 +437,7 @@ MYFLT temp; /* Expect an impulslything */ - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) p->m4.wave = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->m4.wave = ftp; else { return csound->InitError(csound, Str("No table for Agogobell strike")); } diff -ur csound5~/Opcodes/moog1.c csound5/Opcodes/moog1.c --- csound5~/Opcodes/moog1.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/moog1.c 2012-08-29 23:08:18.000000000 +0200 @@ -163,13 +163,13 @@ make_FormSwep(&p->filters[0]); make_FormSwep(&p->filters[1]); - if (LIKELY((ftp = csound->FTFind(csound, p->iatt)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iatt)) != NULL)) p->attk.wave = ftp; /* mandpluk */ else return NOTOK; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn )) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn )) != NULL)) p->loop.wave = ftp; /* impuls20 */ else return NOTOK; - if (LIKELY((ftp = csound->FTFind(csound, p->ivfn)) != NULL)) + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ivfn)) != NULL)) p->vibr.wave = ftp; /* sinewave */ else return NOTOK; p->attk.time = p->attk.phase = FL(0.0); diff -ur csound5~/Opcodes/physmod.c csound5/Opcodes/physmod.c --- csound5~/Opcodes/physmod.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/physmod.c 2012-08-29 23:08:18.000000000 +0200 @@ -117,7 +117,7 @@ { FUNC *ftp; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) p->vibr = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->vibr = ftp; else { /* Expect sine wave */ return csound->InitError(csound, Str("No table for Clarinet")); } @@ -279,7 +279,7 @@ FUNC *ftp; int32 length; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) p->vibr = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->vibr = ftp; else { /* Expect sine wave */ return csound->InitError(csound, Str("No table for Flute")); } @@ -477,7 +477,7 @@ FUNC *ftp; MYFLT amp = (*p->amp)*AMP_RSCALE; /* Normalise */ - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) p->vibr = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->vibr = ftp; else { /* Expect sine wave */ return csound->InitError(csound, Str("No table for wgbow vibrato")); } @@ -752,7 +752,7 @@ FUNC *ftp; MYFLT amp = (*p->amp)*AMP_RSCALE; /* Normalise */ - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) p->vibr = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) p->vibr = ftp; else { /* Expect sine wave */ return csound->InitError(csound, Str("No table for Brass")); } diff -ur csound5~/Opcodes/pvsbasic.c csound5/Opcodes/pvsbasic.c --- csound5~/Opcodes/pvsbasic.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/pvsbasic.c 2012-08-29 23:08:18.000000000 +0200 @@ -1933,7 +1933,7 @@ return csound->InitError(csound, Str("pvstencil: signal format " "must be amp-phase or amp-freq.")); } - p->func = csound->FTFind(csound, p->ifn); + p->func = csound->FTnp2Find(csound, p->ifn); if (p->func == NULL) return OK; diff -ur csound5~/Opcodes/pvsbuffer.c csound5/Opcodes/pvsbuffer.c --- csound5~/Opcodes/pvsbuffer.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/pvsbuffer.c 2012-08-29 23:08:18.000000000 +0200 @@ -279,13 +279,13 @@ if (p->scnt >= overlap) { float *frame1, *frame2; frames = handle->frames-1; - ftab = csound->FTFind(csound, p->strt); + ftab = csound->FTnp2Find(csound, p->strt); if (ftab->flen < N/2+1) csound->PerfError(csound, Str("table length too small: needed %d, got %d\n"), N/2+1, ftab->flen); tab = tab1 = ftab->ftable; - ftab = csound->FTFind(csound, p->end); + ftab = csound->FTnp2Find(csound, p->end); if (ftab->flen < N/2+1) csound->PerfError(csound, Str("table length too small: needed %d, got %d\n"), diff -ur csound5~/Opcodes/scansyn.c csound5/Opcodes/scansyn.c --- csound5~/Opcodes/scansyn.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/scansyn.c 2012-08-29 23:08:18.000000000 +0200 @@ -43,7 +43,7 @@ */ static int scsnu_initw(CSOUND *csound, PSCSNU *p) { - FUNC *fi = csound->FTFind(csound, p->i_init); + FUNC *fi = csound->FTnp2Find(csound, p->i_init); if (UNLIKELY(fi == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifnnit ftable")); @@ -68,7 +68,7 @@ /* Get table */ //if (UNLIKELY(tabFTFind(csound, &tab)) == NULL)) { + if (UNLIKELY((fi = csound->FTnp2Find(csound, &tab)) == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifninit ftable")); } @@ -199,7 +199,7 @@ int len; /* Mass */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_m)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_m)) == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifnmass table")); } @@ -207,7 +207,7 @@ p->m = f->ftable; /* Centering */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_c)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_c)) == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifncentr table")); } @@ -217,7 +217,7 @@ p->c = f->ftable; /* Damping */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_d)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_d)) == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifndamp table")); } @@ -231,7 +231,7 @@ int i, j; /* Get the table */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_f)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_f)) == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifnstiff table")); } @@ -291,7 +291,7 @@ /* Velocity gets presidential treatment */ { int i; - FUNC *f = csound->FTFind(csound, p->i_v); + FUNC *f = csound->FTnp2Find(csound, p->i_v); if (UNLIKELY(f == NULL)) { return csound->InitError(csound, Str("scanu: Could not find ifnvel table")); @@ -458,7 +458,7 @@ p->p = listget(csound, (int) *p->i_id); /* Get trajectory matrix */ - t = csound->FTFind(csound, p->i_trj); + t = csound->FTnp2Find(csound, p->i_trj); if (UNLIKELY(t == NULL)) { return csound->InitError(csound, Str("scans: Could not find " "the ifntraj table")); diff -ur csound5~/Opcodes/scansynx.c csound5/Opcodes/scansynx.c --- csound5~/Opcodes/scansynx.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/scansynx.c 2012-08-29 23:08:18.000000000 +0200 @@ -83,7 +83,7 @@ static int scsnux_initw(CSOUND *csound, PSCSNUX *p) { int32 len = p->len; - FUNC *fi = csound->FTFind(csound, p->i_init); + FUNC *fi = csound->FTnp2Find(csound, p->i_init); if (UNLIKELY(fi == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifnnit ftable")); @@ -118,7 +118,7 @@ /* Get table */ //if (UNLIKELY(tabFTFind(csound, &tab)) == NULL)) { + if (UNLIKELY((fi = csound->FTnp2Find(csound, &tab)) == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifninit ftable")); } @@ -224,7 +224,7 @@ int i; /* Mass */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_m)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_m)) == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifnmass table")); } @@ -232,7 +232,7 @@ p->m = f->ftable; /* Centering */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_c)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_c)) == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifncentr table")); } @@ -242,7 +242,7 @@ p->c = f->ftable; /* Damping */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_d)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_d)) == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifndamp table")); } @@ -256,7 +256,7 @@ int j, ilen; /* Get the table */ - if (UNLIKELY((f = csound->FTFind(csound, p->i_f)) == NULL)) { + if (UNLIKELY((f = csound->FTnp2Find(csound, p->i_f)) == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifnstiff table")); } @@ -396,7 +396,7 @@ /* Velocity gets presidential treatment */ { - FUNC *f = csound->FTFind(csound, p->i_v); + FUNC *f = csound->FTnp2Find(csound, p->i_v); if (UNLIKELY(f == NULL)) { return csound->InitError(csound, Str("scanux: Could not find ifnvel table")); @@ -571,7 +571,7 @@ { int i; int oscil_interp = (int)*p->interp; - FUNC *t = csound->FTFind(csound, p->i_trj); + FUNC *t = csound->FTnp2Find(csound, p->i_trj); if (UNLIKELY(t == NULL)) { return csound->InitError(csound, Str("scans: Could not find " "the ifntraj table")); diff -ur csound5~/Opcodes/seqtime.c csound5/Opcodes/seqtime.c --- csound5~/Opcodes/seqtime.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/seqtime.c 2012-08-29 23:16:31.000000000 +0200 @@ -49,7 +49,7 @@ int32 start, loop; int32 *ndx = &p->ndx; p->pfn = (int32) *p->kfn; - if (UNLIKELY((ftp = csound->FTFind(csound, p->kfn)) == NULL)) { + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->kfn)) == NULL)) { return csound->InitError(csound, Str("seqtime: incorrect table number")); } @@ -154,7 +154,7 @@ int32 start, loop; int32 *ndx = &p->ndx; p->pfn = (int32) *p->kfn; - if (UNLIKELY((ftp = csound->FTFind(csound, p->kfn)) == NULL)) { + if (UNLIKELY((ftp = csound->FTnp2Find(csound, p->kfn)) == NULL)) { return csound->InitError(csound, Str("seqtim: incorrect table number")); } *ndx = (int32) *p->kinitndx; diff -ur csound5~/Opcodes/sfont.c csound5/Opcodes/sfont.c --- csound5~/Opcodes/sfont.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/sfont.c 2012-08-29 23:08:18.000000000 +0200 @@ -2243,7 +2243,7 @@ } } p->spltNum = spltNum; - if (*p->ifn2 != 0) p->efunc = csound->FTFind(csound, p->ifn2); + if (*p->ifn2 != 0) p->efunc = csound->FTnp2Find(csound, p->ifn2); else p->efunc = NULL; if (*p->iskip == 0){ diff -ur csound5~/Opcodes/singwave.c csound5/Opcodes/singwave.c --- csound5~/Opcodes/singwave.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/singwave.c 2012-08-29 23:08:18.000000000 +0200 @@ -80,7 +80,7 @@ { FUNC *ftp; - if ((ftp = csound->FTFind(csound,i)) != NULL) + if ((ftp = csound->FTnp2Find(csound,i)) != NULL) p->wave = ftp; else { /* Expect sine wave */ return csound->InitError(csound, Str("No table for Modulatr")); @@ -123,7 +123,7 @@ { FUNC *ftp; - if (LIKELY((ftp = csound->FTFind(csound,ifn)) != NULL)) p->wave = ftp; + if (LIKELY((ftp = csound->FTnp2Find(csound,ifn)) != NULL)) p->wave = ftp; else { return csound->InitError(csound, Str("No table for Singwave")); } diff -ur csound5~/Opcodes/sndwarp.c csound5/Opcodes/sndwarp.c --- csound5~/Opcodes/sndwarp.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/sndwarp.c 2012-08-29 23:08:18.000000000 +0200 @@ -53,12 +53,12 @@ } p->exp = (WARPSECTION *)auxp; - if (UNLIKELY((ftpSamp = csound->FTFind(csound, p->isampfun)) == NULL)) + if (UNLIKELY((ftpSamp = csound->FTnp2Find(csound, p->isampfun)) == NULL)) return NOTOK; p->ftpSamp = ftpSamp; p->sampflen = ftpSamp->flen; - if (UNLIKELY((ftpWind = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftpWind = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; p->ftpWind = ftpWind; p->flen = ftpWind->flen; @@ -212,12 +212,12 @@ } p->exp = (WARPSECTION *)auxp; - if (UNLIKELY((ftpSamp = csound->FTFind(csound, p->isampfun)) == NULL)) + if (UNLIKELY((ftpSamp = csound->FTnp2Find(csound, p->isampfun)) == NULL)) return NOTOK; p->ftpSamp = ftpSamp; p->sampflen=ftpSamp->flen; - if (UNLIKELY((ftpWind = csound->FTFind(csound, p->ifn)) == NULL)) + if (UNLIKELY((ftpWind = csound->FTnp2Find(csound, p->ifn)) == NULL)) return NOTOK; p->ftpWind = ftpWind; p->flen=ftpWind->flen; diff -ur csound5~/Opcodes/syncgrain.c csound5/Opcodes/syncgrain.c --- csound5~/Opcodes/syncgrain.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/syncgrain.c 2012-08-29 23:08:18.000000000 +0200 @@ -40,7 +40,7 @@ static int syncgrain_init(CSOUND *csound, syncgrain *p) { int size; - p->efunc = csound->FTFind(csound, p->ifn2); + p->efunc = csound->FTnp2Find(csound, p->ifn2); if (UNLIKELY(p->efunc == NULL)) return NOTOK; @@ -179,7 +179,7 @@ static int syncgrainloop_init(CSOUND *csound, syncgrainloop *p) { - p->efunc = csound->FTFind(csound, p->ifn2); + p->efunc = csound->FTnp2Find(csound, p->ifn2); if (UNLIKELY(p->efunc == NULL)) return NOTOK; @@ -387,7 +387,7 @@ return csound->InitError(csound, Str("diskgrain: invalid number of channels")); } - p->efunc = csound->FTFind(csound, p->ifn2); + p->efunc = csound->FTnp2Find(csound, p->ifn2); if (UNLIKELY(p->efunc == NULL)) return NOTOK; diff -ur csound5~/Opcodes/tabsum.c csound5/Opcodes/tabsum.c --- csound5~/Opcodes/tabsum.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/tabsum.c 2012-08-29 23:08:18.000000000 +0200 @@ -36,7 +36,7 @@ static int tabsuminit(CSOUND *csound, TABSUM *p) { - if (UNLIKELY((p->ftp = csound->FTFind(csound, p->itab)) == NULL)) { + if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->itab)) == NULL)) { return csound->InitError(csound, Str("tabsum: No table")); } return OK; diff -ur csound5~/Opcodes/ugens8.c csound5/Opcodes/ugens8.c --- csound5~/Opcodes/ugens8.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/ugens8.c 2012-08-29 23:08:18.000000000 +0200 @@ -99,7 +99,7 @@ } if (*p->igatefun > 0) - if (UNLIKELY((AmpGateFunc = csound->FTFind(csound, p->igatefun)) == NULL)) + if (UNLIKELY((AmpGateFunc = csound->FTnp2Find(csound, p->igatefun)) == NULL)) return NOTOK; p->AmpGateFunc = AmpGateFunc; diff -ur csound5~/Opcodes/ugmoss.c csound5/Opcodes/ugmoss.c --- csound5~/Opcodes/ugmoss.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/ugmoss.c 2012-08-29 23:08:18.000000000 +0200 @@ -40,7 +40,7 @@ FUNC *ftp; p->len = (int)*p->isize; - if (LIKELY((ftp = csound->FTFind(csound, p->ifn)) != NULL)) { /* find table */ + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ifn)) != NULL)) { /* find table */ p->ftp = ftp; if ((unsigned)ftp->flen < p->len) p->len = ftp->flen; /* correct len if flen shorter */ @@ -507,14 +507,14 @@ int j = 0; unsigned int len; /* make sure resfn exists and set it up */ - if (LIKELY((ftp = csound->FTFind(csound, p->iresfn)) != NULL)) { + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iresfn)) != NULL)) { p->resfn = ftp, len = p->resfn->flen; } else { return csound->InitError(csound, Str("iresfn for ftmorf does not exist")); } /* make sure ftfn exists and set it up */ - if (LIKELY((ftp = csound->FTFind(csound, p->iftfn)) != NULL)) { + if (LIKELY((ftp = csound->FTnp2Find(csound, p->iftfn)) != NULL)) { p->ftfn = ftp; } else { @@ -522,7 +522,7 @@ } do { /* make sure tables in ftfn exist and are right size*/ - if (LIKELY((ftp = csound->FTFind(csound, p->ftfn->ftable + j)) != NULL)) { + if (LIKELY((ftp = csound->FTnp2Find(csound, p->ftfn->ftable + j)) != NULL)) { if (UNLIKELY((unsigned int)ftp->flen != len)) { return csound->InitError(csound, Str("table in iftfn for ftmorf wrong size")); @@ -551,8 +551,8 @@ f = *p->kftndx - i; if (p->ftndx != *p->kftndx) { p->ftndx = *p->kftndx; - ftp1 = csound->FTFind(csound, p->ftfn->ftable + i++); - ftp2 = csound->FTFind(csound, p->ftfn->ftable + i--); + ftp1 = csound->FTnp2Find(csound, p->ftfn->ftable + i++); + ftp2 = csound->FTnp2Find(csound, p->ftfn->ftable + i--); do { *(p->resfn->ftable + j) = (*(ftp1->ftable + j) * (1-f)) + (*(ftp2->ftable + j) * f); diff -ur csound5~/Opcodes/wave-terrain.c csound5/Opcodes/wave-terrain.c --- csound5~/Opcodes/wave-terrain.c 2012-08-29 23:05:54.000000000 +0200 +++ csound5/Opcodes/wave-terrain.c 2012-08-29 23:08:18.000000000 +0200 @@ -34,8 +34,8 @@ static int wtinit(CSOUND *csound, WAVETER *p) { /* DECLARE */ - FUNC *ftpx = csound->FTFind(csound, p->i_tabx); - FUNC *ftpy = csound->FTFind(csound, p->i_taby); + FUNC *ftpx = csound->FTnp2Find(csound, p->i_tabx); + FUNC *ftpy = csound->FTnp2Find(csound, p->i_taby); /* CHECK */ if (UNLIKELY((ftpx == NULL)||(ftpy == NULL))) { @@ -106,8 +106,8 @@ int srcpos = 0; int dstpos = (int)MYFLT2LONG(*p->ipos); - FUNC *fsrc = csound->FTFind(csound, p->isrc); /* Source table */ - FUNC *fdst = csound->FTFind(csound, p->idst); /* Destination table */ + FUNC *fsrc = csound->FTnp2Find(csound, p->isrc); /* Source table */ + FUNC *fdst = csound->FTnp2Find(csound, p->idst); /* Destination table */ if (UNLIKELY(fsrc->flen > fdst->flen)) { return csound->InitError(csound, Str( @@ -138,11 +138,11 @@ static int scantinit(CSOUND *csound, SCANTABLE *p) { /* DECLARE */ - FUNC *fpoint = csound->FTFind(csound, p->i_point); - FUNC *fmass = csound->FTFind(csound, p->i_mass); - FUNC *fstiff = csound->FTFind(csound, p->i_stiff); - FUNC *fdamp = csound->FTFind(csound, p->i_damp); - FUNC *fvel = csound->FTFind(csound, p->i_vel); + FUNC *fpoint = csound->FTnp2Find(csound, p->i_point); + FUNC *fmass = csound->FTnp2Find(csound, p->i_mass); + FUNC *fstiff = csound->FTnp2Find(csound, p->i_stiff); + FUNC *fdamp = csound->FTnp2Find(csound, p->i_damp); + FUNC *fvel = csound->FTnp2Find(csound, p->i_vel); /* CHECK */ if (UNLIKELY(fpoint == NULL)) {