We investigate the spectral properties of one-dimensional lattices with position-dependent hopping amplitudes and on-site potentials that are smooth bounded functions of position. We find an exact integral form for the density of states (DOS) in the limit of an infinite number of sites, which we derive using a mixed Bloch-Wannier basis consisting of piecewise Wannier functions. Next, we provide an exact solution for the inverse problem of constructing the position-dependence of hopping in a lattice model yielding a given DOS. We confirm analytic results by comparing them to numerics obtained by exact diagonalization for various incarnations of position-dependent hoppings and on-site potentials. Finally, we generalize the DOS integral form to multi-orbital tight-binding models with longer-range hoppings and in higher dimensions.