Skip to content

StreamPlayer not working anymore #1835

@Skelbti

Description

@Skelbti

music21 version

9.9.1

Operating System(s) checked
macOS Sequoia 15.7.1 (Apple Silicon, M2)


Problem summary
music21.midi.realtime.StreamPlayer fails on macOS ARM (Apple Silicon) with Python 3.14, even when pygame is correctly installed.
It raises StreamPlayerException('StreamPlayer requires pygame. Install first') although import pygame works fine.


Steps to reproduce

from music21 import *

b = corpus.parse('bwv66.6')
sp = midi.realtime.StreamPlayer(b)
sp.play()

Full traceback

Traceback (most recent call last):
  File "test.py", line 5, in <module>
    sp = midi.realtime.StreamPlayer(b)
  File "/music21/midi/realtime.py", line 94, in __init__
    raise StreamPlayerException('StreamPlayer requires pygame.  Install first')
music21.midi.realtime.StreamPlayerException: StreamPlayer requires pygame.  Install first

Expected vs. actual behavior

Expected: StreamPlayer should detect pygame and allow real-time playback.
Actual: Raises an exception claiming pygame is missing even though it’s installed.

More information

  • Python version: 3.14.0 (via Homebrew but it's the same with normal installer)
  • music21 version: 9.9.1
  • pygame version: 2.6.1 (pip show pygame confirms installation)
  • Architecture: ARM64 (Apple Silicon)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions