text: 'use strict'
  
  let gen  = require('./gen.js')
  
  let proto = {
    basename:'mstosamps',
  
    gen() {
      let out,
          inputs = gen.getInputs( this ),
          returnValue
  
      if( isNaN( inputs[0] ) ) {
        out = `  var ${this.name } = ${gen.samplerate} / 1000 * ${inputs[0]} \n\n`
       
        gen.memo[ this.name ] = out
        
        returnValue = [ this.name, out ]
      } else {
        out = gen.samplerate / 1000 * this.inputs[0]
  
        returnValue = out
      }    
  
      return returnValue
    }
  }
  
  module.exports = x => {
    let mstosamps = Object.create( proto )
  
    mstosamps.inputs = [ x ]
    mstosamps.name = proto.basename + gen.getUID()
  
    return mstosamps
  }
  