module Sound.MED.Raw.SynthWF where

import Sound.MED.Basic.Amiga

data SynthWF = SynthWF
  { len2   :: UWORD
  , wfdata :: [ BYTE ]
  }
  deriving (Show)

peek :: MEM -> PTR -> IO SynthWF
peek m p = do
  len2'   <- peekUWORD m (p+0)
  wfdata' <- mapM (peekBYTE m) $ pointerRangeGen (p+2) 1 (len2'*2)
  return $ SynthWF
    len2' wfdata'