[Stk] question about Mesh2D

Gary Scavone gary@ccrma.Stanford.EDU
Wed, 12 Feb 2003 09:05:15 -0800 (PST)


Hi Stefan,

Off the top of my head, I would expect one more junction than delays.  
Take the 1D string ... one delay (or two bidirectional delays) and two 
junctions (one at each end).

But I'm saying this with almost no experience with 2D structures.  The 
Mesh2D class was essentially written by Julius Smith ... I just fixed 
it up for the 4.0 release.

--gary

On 11 Feb 2003, Stefan T. Tomic wrote:

>>Anyone who is familiar with the Mesh2D instrument could probably
>>answer this really quickly.
>>
>>I'm looking at the tick0 and tick1 functions and see that at the
>>unit delay line arrays vxp1,vxm1, etc. only range from (0..NX-1) and
>>(0..NY-1).  However, as I understand the model, it seems like they
>>should range (0..NX) and (0..NY) since there should be one more
>>delay in each dimension than there are junctions in that dimension.  
>>So if the junctions run from (0..NX-1) and (0..NY-1), the delay
>>lines should run from (0..NX) and (0..NY).  Is the waveguide
>>reflection happening one sample early?  Any advice is appreciated.
>>
>>Thanks,
>>
>>Stefan Tomic
>>
>>
>>Here's the code I'm looking at:
>>
>>MY_FLOAT Mesh2D :: tick0()
>>
>>.....
>>.....
>>
>>  for (y=0; y<NY-1; y++) {
>>    vxp1[0][y] = filterY[y]->tick(vxm[0][y]);
>>    vxm1[NX-1][y] = vxp[NX-1][y];
>>  }
>>  for (x=0; x<NX-1; x++) {
>>    vyp1[x][0] = filterX[x]->tick(vym[x][0]);
>>    vym1[x][NY-1] = vyp[x][NY-1];
>>  }
>>
>>....
>>....
>>}