Modulation of the x-ray source in computed tomography (CT) by a designated filter to achieve a desired distribution of photon flux has been greatly advanced in recent years. In this work, we present a densely sampled spectral modulation (DSSM) as a promising low-cost solution to quantitative CT imaging in the presence of scatter. By leveraging a special stationary filter (namely a spectral modulator) and a flying focal spot, DSSM features a strong correlation in the scatter distributions across focal spot positions and sees no substantial projection sparsity or misalignment in data sampling, making it possible to simultaneously correct for scatter and spectral effects in a unified framework. Methods: The concept of DSSM is first introduced, followed by an analysis of the design and benefits of using the stationary spectral modulator with a flying focal spot (SMFFS) that dramatically changes the data sampling and its associated data processing. With an assumption that the scatter distributions across focal spot positions have strong correlation, a scatter estimation and spectral correction algorithm from DSSM is then developed, where a dual-energy modulator along with two flying focal spot positions is of interest. Finally, a phantom study on a tabletop cone-beam CT system is conducted to understand the feasibility of DSSM by SMFFS, using a copper modulator and by moving the x-ray tube position in the X direction to mimic the flying focal spot. Results: Based on our analytical analysis of the DSSM by SMFFS, the misalignment of low-and high-energy projection rays can be reduced by a factor of more than 10 when compared with a stationary modulator only. With respect to modulator design, metal materials such as copper, molybdenum, silver, and tin could be good candidates in terms of energy separation at a given attenuation of photon flux. Physical experiments using a Catphan phantom as well as an anthropomorphic chest phantom demonstrate the effectiveness of DSSM by SMFFS with much better CT number accuracy and less image artifacts. The root mean squared error was reduced from 297.9 to 6.5 Hounsfield units (HU) for the Catphan phantom and from 409.3 to 39.2 HU for the chest phantom. Conclusions: The concept of DSSM using a SMFFS is proposed. Phantom results on its scatter estimation and spectral correction performance validate our main ideas and key assumptions, demonstrating its potential and feasibility for quantitative CT imaging.