Fractional oscillator type equations are well-known model equations to describe several phenomenon in mathematical physics, engineering and biology. In this paper, a new method incorporated by the ultraspherical wavelet operational matrix of general order integration and block-pulse functions are adopted to investigate the solution of fractional oscillator type equations. To facilitate this, the ultraspherical wavelets are first presented and the corresponding operational matrix of fractional-order integration is derived by virtue of block pulse functions. The properties of ultraspherical wavelets and block pulse functions are used to transform the underlying problem to a system of algebraic equations which can be easily solved by any of the usual numerical methods. The efficiency and accuracy of the proposed method is demonstrated by presenting several benchmark test problems. Moreover, special attention is given to the comparison of the numerical results obtained by the new algorithm with those found by other known methods.