use array instead of struct.unpack for getting wave values