Complexity Explorer Santa Few Institute

Functions and Iterations

Lead instructor: David Feldman

Your progress is not being saved! Enroll now or log in to track your progress or submit homework.

Music Computation and Complexity

Håkon Sjøvik Olsen
27 Mar 2025 2:15pm UTC
15
in Music Computation and Complexity

Hi,
I encountered an issue during the installation tutorial of the musicntwrk library. I downloaded all suggested packages in the install.txt file, but then I get an issue when I try "import pyo" in the Python interactive shell. It seems the reason is because I have an M2 MacBook, which runs on ARM64, while pyo might only be available for x86_64? How do I resolve this issue?

Shiyan Shahriar
28 Mar 2025 12:33am UTC
in Music Computation and Complexity

I followed the instructions below and successfully ran import pyo https://belangeo.github.io/pyo/compiling.html

Håkon Sjøvik Olsen
28 Mar 2025 8:56am UTC
in Music Computation and Complexity

Thanks! But I actually managed by making sure the environment runs in x86_64. Do you know if you're running on ARM64? If so, I'll consider your approach.

Shiyan Shahriar
28 Mar 2025 10:05am UTC
in Music Computation and Complexity

Yes, I'm running it on M1 Macbook

Marco Buongiorno Nardelli
29 Mar 2025 1:17am UTC
in Music Computation and Complexity

Hi, sorry about your problem. I can confirm that I have installed successfully on M1, M2 and M3 (the video I made for the instructions was on a M2 Mac).

david familan
04 Apr 2025 2:09am UTC
in Music Computation and Complexity

when i tried to install from source everything went fine but it didn't show up in pip list. i then just used pip install pyo and it worked fine but this does not work s = pyo.Server(nchnls=nch,ichnls=ich).boot() Pyo warning: Portmidi warning: no midi device found!
Portmidi closed.

david familan
04 Apr 2025 2:09am UTC
in Music Computation and Complexity

when i tried to install from source everything went fine but it didn't show up in pip list. i then just used pip install pyo and it worked fine but this does not work s = pyo.Server(nchnls=nch,ichnls=ich).boot() Pyo warning: Portmidi warning: no midi device found!
Portmidi closed.

david familan
04 Apr 2025 2:20am UTC
in Music Computation and Complexity

here is the code i nmeed following the pyo web site
git clone https://github.com/belangeo/pyo.git

python -m build --config-setting="--build-option=--use-coreaudio" --config-setting="--build-option=--use-double" --config-setting="build-option=--use-jack"

installed fine but didn;t show in pip list.

Marco Buongiorno Nardelli
04 Apr 2025 2:51am UTC
in Music Computation and Complexity

portmidi in not needed for pyo to play sunds, so the installation should work fine. Did you manage to get a sound out?
You can try this code:

s = pyo.Server(nchnls=nch,ichnls=ich).boot()
s.start()
a = pyo.Sine(440,mul=0.5)
a.out()
time.sleep(2)
a.stop()

If you hear a sine wave all is good.

david familan
04 Apr 2025 3:41pm UTC
in Music Computation and Complexity

That worked! What is confusing about pyo is it got installed with pip install musicntwrk but later in the video you say that you need pyo with jack which implied you had to reinstall it

Marco Buongiorno Nardelli
04 Apr 2025 4:29pm UTC
in Music Computation and Complexity

well, it depends on which system you are running... Linux needs Jack, Mac or Windows do not. Glad it worked!

Robert Dyson
14 Apr 2025 10:45am UTC
in Music Computation and Complexity

I am installing anaconda python on windows 10. pyo did not get built because for some reason build_ext is not in the path - and there are two different versions of it. That will need some research. My criticism of the lesson is that there should have been text to go along with it as many important comments are not in the INSTALL file and the video resolution is sometimes fuzzy. I hope to get there in the end.

Marco Buongiorno Nardelli
14 Apr 2025 3:13pm UTC
in Music Computation and Complexity

Thanks for the suggestion. And sorry that you are having problems. As I mentioned, I do not use or even own a windows computer, but other students (in this course and in my own institution) have been successful. If you cannot figure it out, I might be able to put you in contact with somebody here at the University of North Texas.

Robert Dyson
14 Apr 2025 4:14pm UTC
in Music Computation and Complexity

Marco Buongiorno Nardelli - thank you for the reply. I will let you know. As the course has no specific schedule it's good for me to work it out if possible. I'm not in any rush.

Marco Buongiorno Nardelli
14 Apr 2025 5:09pm UTC
in Music Computation and Complexity

Let me know when you fix it. This is going to be important information for others ;-)!

Robert Dyson
19 Apr 2025 3:21pm UTC
in Music Computation and Complexity

Dear Marco Buongiorno Nardelli - It was trivial when I really got round to thinking about it after a fallow week on this topic. I installed python version 3.12.7. There is an error in your INSTALL file but I did "conda create --name compmus python=3.12.7" (for some reason you have "conda create --name complexp "). I realise now that all the needed bits may not be tagged for that version so I redid it all with "conda create --name compmus python=3.10.11" and all went well. I did use python until 12 years ago and this refresh on anaconda that I have never used has been useful as I am now familiar with commands. I can get on to the music bits soon :-) Best wishes.

Stephan Schulte
23 Mar 2025 5:15pm UTC
1
in Music Computation and Complexity

Hi,

did anyone get the notebook running on Windows 11?

When executing the displayNotes command I get the error message:

SubConverterException: Cannot find a path to the 'mscore' file at C:\Users\steph\Documents\Repositories\complexmusic\C:\Program Files\MuseScore 3\bin\MuseScore3.exe -- download MuseScore

I cannot find the file music21rc.txt anywhere in my file system. Is it called differently on Windows?

Any help would be appreciated

Stephan

Stephan Schulte
23 Mar 2025 5:52pm UTC
in Music Computation and Complexity

Hi again,

I found the solution by myself. The key is the file C:\User\\AppData\Roaming\music21-settings.xml. There you can adapt the directory to your MuseScore executable. Be careful there are two entries musescoreDirectPNGPath and musicxmlPath. The both should point to your MuseScore executable.

In case the file does not exist you can create one with python -m music21.configure

Hope this helps

Stephan