every code usually describes how they formulate the Response spectrum (can be based on ductility or damping). Try to read through the commentary, hopefully you get the formula.
If you know the standard earthquake records used in seismic design for you area, you may use SPECTRA ( part of ruaumoko).