Is there a general form for heat capacity?

Can you derive a general form (not keeping either volume or pressure constant) for heat capacity from the first law of thermodynamics? Do you have to make any assumptions to do so?

It sounds trival, but I can't seem to work something out:

$$dU = \delta Q - PdV$$

$$dU = \left( \frac{\partial U}{\partial T} \right) dT + \left( \frac{\partial U}{\partial V} \right) dV + \left( \frac{\partial U}{\partial P} \right) dP$$

$$dV = \left( \frac{\partial V}{\partial T} \right)_P dT + \left( \frac{\partial V}{\partial P} \right)_T dP$$

$$\delta Q = \left( \left( \frac{\partial U}{\partial T} \right) + P \left( \frac{\partial V}{\partial T} \right) \right) dT + \left( \left( \frac{\partial U}{\partial P} \right) + P \left( \frac{\partial V}{\partial P} \right) \right) dP + \left( \frac{\partial U}{\partial T}\right)dV$$

But from there, don't you end up having to hold P and V constant to get $\frac{\partial Q}{\partial T}$ (the heat capacity)?

There are closed formulae for the heat capacities of a Gibbsian substance which is desribed by two equations of the form $T=f(p,V), S=g(p,V)$. They are $C_V=\frac{fg_p}{f_p}$ and $C_p=\frac{fg_V}{f_V}$ where I am using subscripts to indicate partial derivatives. The details can be found in the arXiv paper 1102.1540 (of which I am a co-author) which also displays a simple Mathematica programme which allows one to compute all thermodynamic quantities of a Gibbsian substace (e.g., the van der Waals or the Feynman gas) from the inputs $f$ and $g$.