We propose here (the informed use) of a customised, data-driven machine-learning pipeline to analyse magnetoencephalography (MEG) in a theoretical source space, with respect to the processing of a regular beat. This hypothesis- and data-driven analysis pipeline allows us to extract the maximally relevant components in MEG source-space, with respect to the oscillatory power in the frequency band of interest and, most importantly, the beat-related modulation of that power. Our pipeline combines Spatio-Spectral Decomposition as a first step to seek activity in the frequency band of interest (SSD, [1]) with a Source Power Co-modulation analysis (SPoC; [2]), which extracts those components that maximally entrain their activity with the given target function, that is here with the periodicity of the beat in the frequency domain (hence, f-SPoC). MEG data (102 magnetometers) from 28 participants passively listening to a 5-min long regular tone sequence with a 400 ms beat period (the “target function” for SPoC) were segmented into epochs of two beat periods each to guarantee a sufficiently long time window. As a comparison pipeline to SSD and f-SpoC, we carried out a state-of-the-art cluster-based permutation analysis (CBPA, [3]). The time-frequency analysis (TFA) of the extracted activity showed clear regular patterns of periodically occurring peaks and troughs across the alpha and beta band (8-20 Hz) in the f-SPoC but not in the CBPA results, and both the depth and the specificity of modulation to the beat frequency yielded a significant advantage. Future applications of this pipeline will address target the relevance to behaviour and inform analogous analyses in the EEG, in order to finally work toward addressing dysfunctions in beat-based timing and their consequences.Author summaryWhen listening to a regular beat, oscillations in the brain have been shown to synchronise with the frequency of that given beat. This phenomenon is called entrainment and has in previous brain-imaging studies been shown in the form of one peak and trough per beat cycle in a range of frequency bands within 15-25 Hz (beta band). Using machine-learning techniques, we designed an analysis pipeline based on Source-Power Co-Modulation (SPoC) that enables us to extract spatial components in MEG recordings that show these synchronisation effects very clearly especially across 8-20 Hz. This approach requires no anatomical knowledge of the individual or even the average brain, it is purely data driven and can be applied in a hypothesis-driven fashion with respect to the “function” that we expect the brain to entrain with and the frequency band within which we expect to see this entrainment. We here apply our customised pipeline using “f-SPoC” to MEG recordings from 28 participants passively listening to a 5-min long tone sequence with a regular 2.5 Hz beat. In comparison to a cluster-based permutation analysis (CBPA) which finds sensors that show statistically significant power modulations across participants, our individually extracted f-SPoC components find a much stronger and clearer pattern of peaks and troughs within one beat cycle. In future work, this pipeline can be implemented to tackle more complex “target functions” like speech and music, and might pave the way toward rhythm-based rehabilitation strategies.