return function gen(  ){ 
  'use strict'
  let memory = gen.memory
  
  // smaplePlaybakc *******************
  // write head phase for in1
  let accum20_value = memory[0];
  memory[0] += 1
  if( memory[0] >= 44100 ) memory[0] -= 44100
  
  // read head phase for in1
  let sub21 = (accum20_value - gen.delayTime)
  let wrap22 = sub21
  if( wrap22 < 0 ) wrap22 += 44100
  else if( wrap22 > 44100 ) wrap22 -= 44100

  let peek23_dataIdx  = 1, // location in memory of sample memory
      peek23_phase = wrap22, 
      peek23_index = peek23_phase | 0,
      peek23_out = memory[ peek23_dataIdx + peek23_index ]  
    
  // delayLine 1 **************
  let accum6_value = memory[44101];
  memory[44101] += 1
  if( memory[44101] >= 106075 ) memory[44101] -= 106075

  let peek7_dataIdx  = 44102, 
      peek7_phase = accum6_value, 
      peek7_index = peek7_phase | 0,
      peek7_out = memory[ peek7_dataIdx + peek7_index ]
  
  // end delayLine1 **************
  
  // begin gate1 *****************
  let gate9_index = gen.feedbackRouter
  if( gate9_index != memory[ 150178 ] ) { // index for gate control
    memory[ memory[ 150178 ] + 150179  ] = 0 // gate value = 0
    memory[ 150178 ] = gen.feedbackRouter
  }
  memory[ 150179 + gen.feedbackRouter ] = memory[ 150177 ]  
  // end gate1 *****************
  
  // begin gate2 *****************
  let gate13_index = gen.feedbackRouter
  if( gate13_index != memory[ 150181 ] ) {
    memory[ memory[ 150181 ] + 150182  ] = 0 
    memory[ 150181 ] = gen.feedbackRouter
  }
  memory[ 150182 + gen.feedbackRouter ] = memory[ 150180 ]  
  // end gate2 ****************
  
  // write to delayLine1 cb.
  memory[ 1 + accum20_value ] = (peek7_out + memory[ 150179 ] + memory[ 150182 ])

  let sub49 = (1 - gen.damping)
  let sub45 = (1 - gen.damping3)
  gen.out[0]  = (((0.5 * (((peek23_out * sub49) + (memory[ 150177 ]  * gen.damping)))) * sub45) + (memory[ 150183 ]  * gen.damping3))
  
  // RIGHT CHANNEL *************************
  
  // write head for delayLine2
  let accum29_value = memory[150184];
  memory[150184] += 1
  if( memory[150184] >= 44100 ) memory[150184] -= 44100

  // read head for delayLine2
  let sub30 = (accum29_value - (gen.delayTime / 2))
  let wrap31 = sub30
  if( wrap31 < 0 ) wrap31 += 44100
  else if( wrap31 > 44100 ) wrap31 -= 44100

  let peek32_dataIdx  = 150185, // memory location for delay line 2
      peek32_phase = wrap31, 
      peek32_index = peek32_phase | 0,
      peek32_out = memory[ peek32_dataIdx + peek32_index ]
  // peek32_out = delay line 2 output

  // write to delay line 2 
  memory[ 150185 + accum29_value ] = (peek7_out + memory[ 194285 ] + memory[ 194286 ])
  // WRONG ADDRESSES! I think we need to memo the gate.outputs, these should be the same addresses (in a different order)
  // as the gate addresses for delayline1.

  let sub57 = (1 - gen.damping2)
  let sub53 = (1 - gen.damping3)
  gen.out[1]  = (((0.5 * (((peek32_out * sub57) + (memory[ 150180 ]  * gen.damping2)))) * sub53) + (memory[ 194287 ]  * gen.damping3))

  memory[ 150177 ] = ((peek23_out * sub49) + (memory[ 150177 ]  * gen.damping))
  memory[ 150180 ] = ((peek32_out * sub57) + (memory[ 150180 ]  * gen.damping2))
  memory[ 150183 ] = (((0.5 * (((peek23_out * sub49) + (memory[ 150177 ]  * gen.damping)))) * sub45) + (memory[ 150183 ]  * gen.damping3))
  memory[ 194287 ] = (((0.5 * (((peek32_out * sub57) + (memory[ 150180 ]  * gen.damping2)))) * sub53) + (memory[ 194287 ]  * gen.damping3))
  return gen.out
}