OSCR

A novel music-based real-time fMRI neurofeedback interface modulates interhemispheric connectivity and enhances mood.

Code ↔ Paper

4 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

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. [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. [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. [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. [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

  1. # %% [markdown]
  2. # # Pleasantness ratings aquired during the localizer
  3. # %%
  4. import os
  5. import pandas as pd
  6. from src.my_settings import settings
  7. sett = settings()
  8. # %%
  9. csv_path = os.path.join(sett["git_path"], "data", "psychopy")
  10. # find all csv files in csv_path
  11. files = [f for f in os.listdir(csv_path) if f.endswith(".csv")]
  12. # print the number of files found
  13. print(f"Found {len(files)} csv files in {csv_path}")
  14. # %%
  15. # Iterate over all files and extract the relevant information
  16. # create empty dataframe to store all data
  17. df = pd.DataFrame()
  18. for file in files:
  19. # read in csv file
  20. data = pd.read_csv(os.path.join(csv_path, file))
  21. # extract relevant information
  22. data = data[["image_rating_idx", "music_samples", "participant"]]
  23. # remove rows with NaNs
  24. data = data.dropna()
  25. # extract the music type from the music_samples column by extracting the third element after spliting by '_'
  26. data["music_type"] = data["music_samples"].apply(lambda x: x.split("_")[2])
  27. # remove the music_samples column
  28. data = data.drop("music_samples", axis=1)
  29. # concat data to df
  30. df = pd.concat([df, data])
  31. # %%
  32. df
  33. # %%
  34. # find unique values for image_rating_idx
  35. df["image_rating_idx"].unique()
  36. # %%
  37. # | label: fig:behav-loc-report
  38. # # stat test
  39. from statannotations.Annotator import Annotator
  40. # violin plot the ratings for each music type (p and n)
  41. import seaborn as sns
  42. import matplotlib.pyplot as plt
  43. ax = sns.violinplot(
  44. x="music_type", y="image_rating_idx", data=df, palette="Set2", hue="music_type"
  45. )
  46. annotator = Annotator(
  47. ax, [("p", "n")], data=df, x="music_type", y="image_rating_idx", order=["p", "n"]
  48. )
  49. annotator.configure(test="Mann-Whitney", text_format="star", loc="inside")
  50. annotator.apply_and_annotate()
  51. # edit y ticks and labels
  52. plt.yticks(
  53. [1, 2, 3, 4, 5],
  54. ["Unpleasant", "Slightly unpleasant", "Neutral", "Slighly pleasant", "Pleasant"],
  55. )
  56. plt.ylabel("Participants' ratings")
  57. plt.xlabel("Chord type")
  58. plt.xticks([0, 1], ["Pleasant", "Unpleasant"])
  59. plt.show()

Localizer_Report.ipynb at commit 8885204, under GPL-3.0 · at the source

Overview

Authors: Alexandre Sayal1,2, João Pereira1,2,3, Bruno Direito1,2,4, Teresa Sousa1,2,5,6, Miguel Castelo-Branco1,2,3,5,6
ORCID iDs: Teresa Sousa
  1. Coimbra Institute for Biomedical Imaging and Translational Research (CIBIT), University of Coimbra, Coimbra, Portugal
  2. University of Minho, Intelligent Systems Associate Laboratory (LASI), Guimarães, Portugal
  3. Department of Cognitive Neuroscience, Maastricht Brain Imaging Center, Maastricht University, Maastricht, Netherlands
  4. Centre for Informatics and Systems (CISUC), University of Coimbra, Coimbra, Portugal
  5. Institute of Physiology, Faculty of Medicine, University of Coimbra, Coimbra, Portugal
  6. Institute of Nuclear Sciences Applied to Health (ICNAS), University of Coimbra, Coimbra, Portugal
Institutions: University of Coimbra (Portugal); University of Minho (Portugal); Maastricht University (Netherlands)
Journal: Frontiers in psychiatry, volume 17, article 1757213
Dates: received 29 November 2025; accepted 19 March 2026; published online 30 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3389/fpsyt.2026.1757213 · PMID 42147020 · PMCID PMC13171857 · OpenAlex W7159764871
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: fMRI (modality), human (organism), cognitive (subfield)
Methods: Statistics, Preprocessing, fMRI & imaging, Spectral & time-frequency, Physiology & signal measures
Keywords: immersive, interface, music, neurofeedback, reward
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 59 references in the paper

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

License: GPL-3.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 888520458bdf2cce02dffca2aef3cda88ad64ee4, 20 February 2026
Languages: Jupyter (33), Python (21), MATLAB (9)
Size: 146 files, 63 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: README, license file, environment (environment.yml, setup.py), tests, continuous integration, 34 notebooks
Not found: CITATION.cff, documentation
Tools: NumPy (9 files), Matplotlib (4 files), Nilearn (4 files), pandas (4 files), SciPy (3 files), seaborn (3 files), statannotations (2 files), Dcm2Bids (1 file), FSL (1 file), TemplateFlow (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
34 files

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

Data availability statement

All code used in this study is available in the GitHub repository (https://github.com/CIBIT-UC/musicnf-novelinterface). The dataset, formatted in BIDS, can be accessed at Zenodo (https://doi.org/10.5281/zenodo.14803374). This study was preregistered on OSF (https://doi.org/10.17605/OSF.IO/AHXNB).

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://doi.org/10.3389/fpsyt.2026.1757213

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/fpsyt.2026.1757213},
url = {https://doi.org/10.3389/fpsyt.2026.1757213},
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/04/30
VL - 17
SP - 1757213
SN - 1664-0640
PB - Frontiers Media SA
DO - 10.3389/fpsyt.2026.1757213
UR - https://doi.org/10.3389/fpsyt.2026.1757213
LA - en
ER -

CSL-JSON

{
"id": "10.3389/fpsyt.2026.1757213",
"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": "Front Psychiatry",
"volume": "17",
"page": "1757213",
"DOI": "10.3389/fpsyt.2026.1757213",
"PMID": "42147020",
"PMCID": "PMC13171857",
"ISSN": "1664-0640",
"publisher": "Frontiers Media SA",
"URL": "https://doi.org/10.3389/fpsyt.2026.1757213",
"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: Mindfulness
In 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 neuroscience
In 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 reports
In 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 psychiatry
In 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: NeuroImage
In 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 neuroscience
In 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: eLife
In 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 mapping
In 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.3389/fpsyt.2026.1757213.svg)](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:end
HTML
<!-- 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.