{-showAmp amp = "amp@"++(printf "%.2f" $ ampScale amp)
showFreq freq = "freq@" ++ (printf "%.0f" $ freqScale freq)
showFreqP freq = "freq@" ++ (printf "%.0f" $ freqScalePitchShift freq)
showDelay d = "delay@" ++ (printf "%.2f" $ delayScale d)
-}

checkStructureThen :: Filter -> Filter -> a -> a-> a
checkStructureThen f1 f2 defaultVal a = 
  if sameStructure f1 f2
  then a
  else 
     -- TODO this shouldn't happen, 
     -- but for now we just result defaultVal (whatever that is)
     -- so that the program doesnt crash
     defaultVal
checkStructureThen :: Filter -> Filter -> a -> a-> a
checkStructureThen f1 f2 defaultVal a = 
  if sameStructure f1 f2
  then a
  else 
     -- TODO this shouldn't happen, 
     -- but for now we just result defaultVal (whatever that is)
     -- so that the program doesnt crash
     defaultVal
checkStructureThen f1 f2 defaultVal a = 
  if sameStructure f1 f2
  then a
  else 
     -- TODO this shouldn't happen, 
     -- but for now we just result defaultVal (whatever that is)
     -- so that the program doesnt crash
     defaultVal