  A composition of $n\in\NN$ is an ordered collection of one or more positive
integers whose sum is $n$. The number of summands is called the number of parts
of the composition. A palindromic composition of $n$ is a composition of $n$ in
which the summands are the same in the given or in reverse order. In this paper
we study the generating function for the number of compositions (respectively
palindromic compositions) of $n$ with $m$ parts in a given set $A\subseteq\NN$
with respect to the number of rises, levels, and drops. As a consequence, we
derive all the previously known results for this kind of problem, as well as
many new results.
