A novel music-based real-time fMRI neurofeedback interface modulates interhemispheric connectivity and enhances mood.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 4 matches
- [1] § Methods › Statistical analysis › Behavioral data ↔ scripts/behavioral/POMS_Scoring.ipynb, lines 227 to 261 · score 0.67 · Wilcoxon signed rank, POMS scores, Behavioral · Report a mismatch
- [2] § Methods › Paradigms ↔ interface/tbvinterface/Main_BOLD.py, lines 166 to 224 · score 0.61 · beep sound, white noise, correlation, feedback, imagery, music · block
oscr:b:M5VGR5GAHNFSA-L· Report a mismatch - [3] § Methods › Statistical analysis › Behavioral data ↔ scripts/behavioral/Localizer_Report.ipynb, lines 52 to 80 · score 0.57 · Mann Whitney, unpleasant, inside, chord, localizer, Behavioral · Report a mismatch
- [4] § Methods › Paradigms ↔ scripts/behavioral/Localizer_Report.ipynb, lines 52 to 80 · score 0.52 · slightly unpleasant, neutral, pleasantness, chords, localizer, music · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 80 lines · 2 KB · GPL-3.0 · 2 matches
- # %% [markdown]
- # # Pleasantness ratings aquired during the localizer
- # %%
- import os
- import pandas as pd
- from src.my_settings import settings
- sett = settings()
- # %%
- csv_path = os.path.join(sett["git_path"], "data", "psychopy")
- # find all csv files in csv_path
- files = [f for f in os.listdir(csv_path) if f.endswith(".csv")]
- # print the number of files found
- print(f"Found {len(files)} csv files in {csv_path}")
- # %%
- # Iterate over all files and extract the relevant information
- # create empty dataframe to store all data
- df = pd.DataFrame()
- for file in files:
- # read in csv file
- data = pd.read_csv(os.path.join(csv_path, file))
- # extract relevant information
- data = data[["image_rating_idx", "music_samples", "participant"]]
- # remove rows with NaNs
- data = data.dropna()
- # extract the music type from the music_samples column by extracting the third element after spliting by '_'
- data["music_type"] = data["music_samples"].apply(lambda x: x.split("_")[2])
- # remove the music_samples column
- data = data.drop("music_samples", axis=1)
- # concat data to df
- df = pd.concat([df, data])
- # %%
- df
- # %%
- # find unique values for image_rating_idx
- df["image_rating_idx"].unique()
- # %%
- # | label: fig:behav-loc-report
- # # stat test
- from statannotations.Annotator import Annotator
- # violin plot the ratings for each music type (p and n)
- import seaborn as sns
- import matplotlib.pyplot as plt
- ax = sns.violinplot(
- x="music_type", y="image_rating_idx", data=df, palette="Set2", hue="music_type"
- )
- annotator = Annotator(
- ax, [("p", "n")], data=df, x="music_type", y="image_rating_idx", order=["p", "n"]
- )
- annotator.configure(test="Mann-Whitney", text_format="star", loc="inside")
- annotator.apply_and_annotate()
- # edit y ticks and labels
- plt.yticks(
- [1, 2, 3, 4, 5],
- ["Unpleasant", "Slightly unpleasant", "Neutral", "Slighly pleasant", "Pleasant"],
- )
- plt.ylabel("Participants' ratings")
- plt.xlabel("Chord type")
- plt.xticks([0, 1], ["Pleasant", "Unpleasant"])
- plt.show()
Localizer_Report.ipynb at commit 8885204, under GPL-3.0 · at the source
Overview
- Coimbra Institute for Biomedical Imaging and Translational Research (CIBIT), University of Coimbra, Coimbra, Portugal
- University of Minho, Intelligent Systems Associate Laboratory (LASI), Guimarães, Portugal
- Department of Cognitive Neuroscience, Maastricht Brain Imaging Center, Maastricht University, Maastricht, Netherlands
- Centre for Informatics and Systems (CISUC), University of Coimbra, Coimbra, Portugal
- Institute of Physiology, Faculty of Medicine, University of Coimbra, Coimbra, Portugal
- Institute of Nuclear Sciences Applied to Health (ICNAS), University of Coimbra, Coimbra, Portugal
Abstract
Introduction: Music is a universal language that transcends cultures and is deeply rooted in human evolutionary history. Its creation and appreciation recruit the limbic and reward systems, leading to the evocation of emotions ranging from happiness and sadness to tenderness and grief. Here, we investigate the potential of music as an interventional tool in a novel neurofeedback connectivity-based experiment.
Methods: This study proposes a musical interface for real-time functional magnetic resonance imaging neurofeedback that is adaptable to diverse experimental paradigms, namely the ones aiming at improving mood and other affective dimensions. Using a previously developed motor imagery connectivity-based approach, we evaluate its feasibility and efficacy by comparing the modulation of bilateral premotor cortex activity during functional runs with real versus sham (random) feedback in 22 healthy adults. We also assess its performance against a visual feedback interface. The experiment involves a 50-minute MRI session, including anatomical scans, a premotor cortex functional localizer run, and four neurofeedback runs (two with active feedback and two with sham feedback). Pre- and post-session questionnaires assess the neurobehavioral impact on mood, musical background (as a potential predictor of neurofeedback success), and subjective feedback experiences. During neurofeedback, participants perform motor imagery of finger-tapping, with feedback delivered as a dynamic, pre-validated chord progression that evolves or regresses based on the functional connectivity between left and right premotor cortex.
Results: We found that our implementation of music-based feedback was successful, with participants managing to modulate their own connectivity using the proposed interface. The modulation performance was similar for active and sham runs, possibly due to the power of music to boost neuromodulation, but the network recruitment was stronger for active neurofeedback, including in the insula, putamen, and target regions of interest. Behaviorally, we found a decrease in tension and an improvement in the overall mood of the participants after the session.
Discussion: When comparing our results to previous neurofeedback data with a visual interface, we found stronger brain activations, in particular in neurofeedback-relevant regions such as the insula and the putamen. This work shows that it is possible to directly modulate interhemispheric connectivity using a real-time functional magnetic resonance imaging musical interface with potential effects on mood and recruitment of saliency and learning networks.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.
CIBIT-UC/musicnf-novelinterface
888520458bdf2cce02dffca2aef3cda88ad64ee4, 20 February 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
34 files
- interface/
prt_creator/ , MATLAB, 46 linesMain_Localizer.m - interface/
prt_creator/ , MATLAB, 47 linesMain_Localizer_PostDisca rd.m - interface/
prt_creator/ , MATLAB, 43 linesMain_NF.m - interface/
prt_creator/ , MATLAB, 43 linesMain_NF_PostDiscard.m - interface/
prt_creator/ , MATLAB, 18 linesbuildIntervals.m - interface/
prt_creator/ , MATLAB, 60 linesgeneratePRT.m - interface/
tbvinterface/ , Python, 256 lines, 1 matchMain_BOLD.py - interface/
tbvinterface/ , Python, 288 linesTBVClient.py - interface/
tbvinterface/ , Python, 543 linesTBVNetworkInterface.py - interface/
tbvinterface/ , Python, 17 linescalc_signal_var.py - interface/
tbvinterface/ , Python, 9 linesclear_midi.py - interface/
tbvinterface/ , Python, 25 linesget_mean_roi.py - interface/
tbvinterface/ , Python, 86 linesmidi_functions.py - interface/
tbvinterface/ , Python, 48 linesparse_prt_file.py - interface/
tbvinterface/ , Python, 23 linesrec_chord_prog.py - interface/
tbvinterface/ , Python, 180 linestbv_functions.py - interface/
tbvinterface/ , Python, 27 linestest_chord_prog.py - interface/
tbvinterface/ , Jupyter, 26 linestest_prt_parse.ipynb - interface/
tbvinterface/ , Python, 68 lineswait_for_data.py - scripts/
behavioral/ , Jupyter, 80 lines, 2 matchesLocalizer_Report.ipynb - scripts/
behavioral/ , Jupyter, 391 lines, 1 matchPOMS_Scoring.ipynb - scripts/
behavioral/ , Jupyter, 10 linesReports_Binom.ipynb - scripts/
bids/ , Jupyter, 87 linesDICOM2BIDS.ipynb - scripts/
bids/ , Jupyter, 93 linesDeface.ipynb - scripts/
bids/ , Jupyter, 117 linesTSVCreator.ipynb - scripts/
bids/ , Jupyter, 113 linesTSVCreator_SplitWithBoop .ipynb - scripts/
correlations_behav_img/ , Jupyter, 212 linesBiomarker_Search.ipynb - scripts/
fmriprep/ , Jupyter, 41 linesApplyFuncMasks.ipynb - scripts/
glm/ , Jupyter, 115 linesCompareToVisual.ipynb - scripts/
glm/ , Jupyter, 78 linesFirstLevelGLM.ipynb - scripts/
glm/ , Jupyter, 59 linesSecondLevelGLM.ipynb - scripts/
glm/ , Jupyter, 817 linesSecondLevelGLM_Visualize Maps.ipynb - repository limit reached (2,000 files or 30 MB): the rest is at the source (31 files)
- COPYING, License, 674 lines
- README.md, Text, 13 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 32 scripts, each with its path and the digest of its content;
- 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- zenodo:14803374, at Zenodo; found in “Data availability statement”
Data availability statement
All code used in this study is available in the GitHub repository (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 5 authors, 5 keywords, 56 references.
Cite
This paper
Sayal, A., Pereira, J., Direito, B., Sousa, T., & Castelo-Branco, M. (2026). A novel music-based real-time fMRI neurofeedback interface modulates interhemispheric connectivity and enhances mood. Frontiers in psychiatry, 17, 1757213. https://
BibTeX
@article{sayal2026novel,
author = {Sayal, Alexandre and Pereira, João and Direito, Bruno and Sousa, Teresa and Castelo-Branco, Miguel},
title = {{A novel music-based real-time fMRI neurofeedback interface modulates interhemispheric connectivity and enhances mood}},
journal = {Frontiers in psychiatry},
year = {2026},
month = apr,
volume = {17},
pages = {1757213},
publisher = {Frontiers Media SA},
issn = {1664-0640},
doi = {10.3389/
url = {https://
pmid = {42147020},
pmcid = {PMC13171857}
}
RIS
TY - JOUR
AU - Sayal, Alexandre
AU - Pereira, João
AU - Direito, Bruno
AU - Sousa, Teresa
AU - Castelo-Branco, Miguel
TI - A novel music-based real-time fMRI neurofeedback interface modulates interhemispheric connectivity and enhances mood
T2 - Frontiers in psychiatry
J2 - Front Psychiatry
PY - 2026
DA - 2026/
VL - 17
SP - 1757213
SN - 1664-0640
PB - Frontiers Media SA
DO - 10.3389/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3389/
"type": "article-journal",
"title": "A novel music-based real-time fMRI neurofeedback interface modulates interhemispheric connectivity and enhances mood",
"container-title": "Frontiers in psychiatry",
"author": [
{
"family": "Sayal",
"given": "Alexandre"
},
{
"family": "Pereira",
"given": "João"
},
{
"family": "Direito",
"given": "Bruno"
},
{
"family": "Sousa",
"given": "Teresa"
},
{
"family": "Castelo-Branco",
"given": "Miguel"
}
],
"container-title-short":
"volume": "17",
"page": "1757213",
"DOI": "10.3389/
"PMID": "42147020",
"PMCID": "PMC13171857",
"ISSN": "1664-0640",
"publisher": "Frontiers Media SA",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
30
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1007/s12671-025-02671-z [code]
- Neurofeedback Training Facilitates Awareness and Enhances Emotional Well-being Associated with Real-World Meditation Practice: A 7-T MRI Study.Journal: MindfulnessIn common: Dcm2Bids, fMRI, cognitive, 7 references
- [2] doi:10.1162/imag_a_00014
- Successful modulation of temporoparietal junction activity and stimulus-driven attention by fNIRS-based neurofeedback-A randomized controlled proof-of-concept study.Journal: Imaging neuroscience (Cambridge, Mass.)In common: cognitive, 9 references
- [3] doi:10.3389/fnins.2023.1286665 [code]
- Facing emotions: real-time fMRI-based neurofeedback using dynamic emotional faces to modulate amygdala activity.Journal: Frontiers in neuroscienceIn common: SciPy, Matplotlib, NumPy, fMRI, cognitive, 7 references
- [4] doi:10.1038/s41598-022-05860-1 [code]
- Depressive symptoms reduce when dorsolateral prefrontal cortex-precuneus connectivity normalizes after functional connectivity neurofeedback.Journal: Scientific reportsIn common: fMRI, 8 references
- [5] doi:10.1186/s12888-023-05223-8 [code]
- Mindfulness-based real-time fMRI neurofeedback: a randomized controlled trial to optimize dosing for depressed adolescents.Journal: BMC psychiatryIn common: Nilearn, FSL, pandas, 2 other tools, fMRI, 5 references
- [6] doi:10.1016/j.neuroimage.2023.120109 [code]
- Benchmarking explanation methods for mental state decoding with deep learning models.Journal: NeuroImageIn common: TemplateFlow, Nilearn, FSL, 5 other tools, 3 references
- [7] doi:10.1162/imag.a.6 [code]
- Evaluating lesion-specific preprocessing pipelines for rs-fMRI in stroke patients: Impact on functional connectivity and behavioral prediction.Journal: Imaging neuroscience (Cambridge, Mass.)In common: TemplateFlow, Nilearn, FSL, 5 other tools, fMRI, 2 references
- [8] doi:10.1016/j.dcn.2023.101337 [code]
- A multi-sample evaluation of the measurement structure and function of the modified monetary incentive delay task in adolescents.Journal: Developmental cognitive neuroscienceIn common: TemplateFlow, Nilearn, FSL, 5 other tools, fMRI, 2 references
- [9] doi:10.7554/elife.79277 [code]
- Neuroscout, a unified platform for generalizable and reproducible fMRI research.Journal: eLifeIn common: TemplateFlow, Nilearn, FSL, 5 other tools, fMRI, 2 references
- [10] doi:10.1002/hbm.25829 [code]
- ENIGMA HALFpipe: Interactive, reproducible, and efficient analysis for resting-state and task-based fMRI data.Journal: Human brain mappingIn common: TemplateFlow, Nilearn, FSL, 5 other tools, fMRI, 2 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 32 scripts, and 4 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:edba39dd40d706be…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.3389/fpsyt.2026.1757213)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.3389/fpsyt.2026.1757213.svg
:target: https://openscicode.org/badge/doi/10.3389/fpsyt.2026.1757213
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.3389/fpsyt.2026.1757213"><img src="https://openscicode.org/badge/doi/10.3389/fpsyt.2026.1757213.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
