Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution: how to run Cecilia5 on modern macs #119

Open
funxiun opened this issue Aug 22, 2024 · 6 comments
Open

Solution: how to run Cecilia5 on modern macs #119

funxiun opened this issue Aug 22, 2024 · 6 comments

Comments

@funxiun
Copy link

funxiun commented Aug 22, 2024

Hi

I was fiddling around today to get Cecilia5 working again on my Mac Mini M1.
This is what I found:

Don't use the release packages from their website (ajaxsoundstudio.com) but use the source code provided here on Github.

First, open a terminal window and install homebrew :

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

When homebrew is installed, install these packages:
brew install git flac libogg libvorbis libopusenc mpg123 lame portmidi

Create a directory called git and enter it:

mkdir git
cd git

Clone the Cecilia5 source code:
git clone https://github.com/belangeo/cecilia5.git

Enter the cecilia5 directory and run Cecilia5:

cd cecilia5
./Cecilia5.py

In my case, Cecilia5 runs :)
Maybe this can be extended by Mac experts how to add a nice icon etc and to avoid entering the terminal window to use Cecilia5.

Hope this helps!

@oivindi
Copy link

oivindi commented Aug 24, 2024

Running on modern Macs hasn't really been the problem - it seems the OS, in this case Sonoma, has been the problem. Are you running Sonoma? :)

@mark-summ
Copy link

mark-summ commented Nov 16, 2024

Running into all kinds of trouble on Sequoia 15.1, we desperately need a packaged ARM app. One can only dream...

EDIT: Managed to get a packaged app working on an M4 running Sequoia 15.1. Only took 6 hours of trying everything under the sun!

  1. cd into the cloned git repo.
  2. Downgrade to Python 3.11 (ensures compatibility with the pyo module, as it provides pre-built wheels for this version)
  3. install packages:
pip install wxPython
pip install pyo
  1. It should now run python cecilia5.py

To package it into an .app:

  1. Run pip install setuptools==57.5.0
  2. Change setup.py to what I've pasted below.
  3. Run python setup.py py2app (ensure py2app is installed)
  4. The .app in the dist folder should work. :)

setup.py:

from setuptools import setup

APP = ['Cecilia5.py']
APP_NAME = 'Cecilia5'
DATA_FILES = ['Resources/']
OPTIONS = {
    'argv_emulation': False,
    'strip': False,  # For debugging purposes.
    'iconfile': 'Resources/Cecilia5.icns',
    'includes': [
        'wx.adv',
        'wx.html',
        'wx.xml',
        'jaraco.text',
        'pkg_resources',
        'packaging',
        'backports.tarfile',
    ],
    'excludes': [
        'setuptools._vendor',
    ],
}

setup(
    name=APP_NAME,
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

@julienrobert
Copy link

Hi, I tried your instructions and did not succeed.
I was not able to run python without python3, maybe that's the problem. I had to run

pip3 install wxPython
pip3 install pyo

When I run python3 cecilia5.py, I get this error:

Traceback (most recent call last):
File "/Users/jrls/Downloads/cecilia5-5.4.0/Cecilia5.py", line 25, in
from Resources.Variables import loadBitmaps
File "/Users/jrls/Downloads/cecilia5-5.4.0/Resources/Variables.py", line 24, in
from pyo import pa_get_default_devices_from_host
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/init.py", line 27, in
from .lib import analysis as analysis
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/lib/analysis.py", line 30, in
from ._core import *
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/lib/_core.py", line 47, in
from .._pyo import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/_pyo.cpython-311-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/flac/lib/libFLAC.12.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyo/libsndfile.1.dylib
Reason: tried: '/opt/homebrew/opt/flac/lib/libFLAC.12.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/flac/lib/libFLAC.12.dylib' (no such file), '/opt/homebrew/opt/flac/lib/libFLAC.12.dylib' (no such file), '/usr/lib/libFLAC.12.dylib' (no such file, not in dyld cache)

@mark-summ
Copy link

mark-summ commented Dec 6, 2024

file),

Looks like you need to install the pyo dependencies first?

brew install portaudio flac libsndfile

@julienrobert
Copy link

Ok thanks.

Now I'm getting these errors

Preferences file not found. Using defaults...

/Users/jrls/Downloads/cecilia5-5.4.0/Resources/CeciliaPlot.py:971: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if self._xSpec is not 'none':
/Users/jrls/Downloads/cecilia5-5.4.0/Resources/CeciliaPlot.py:977: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if self._ySpec is not 'none':
/Users/jrls/Downloads/cecilia5-5.4.0/Resources/CeciliaPlot.py:1496: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if self._xSpec is not 'none':
/Users/jrls/Downloads/cecilia5-5.4.0/Resources/CeciliaPlot.py:1519: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if self._ySpec is not 'none':

Traceback (most recent call last):
File "/Users/jrls/Downloads/cecilia5-5.4.0/Cecilia5.py", line 115, in
sp = CeciliaSplashScreen(None, img=CeciliaLib.ensureNFD(SPLASH_FILE_PATH), callback=onStart)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jrls/Downloads/cecilia5-5.4.0/Resources/splash.py", line 53, in init
self.w, self.h = self.bmp.GetWidth(), self.bmp.GetHeight()
^^^^^^^^^^^^^^^^^^^
wx._core.wxAssertionError: C++ assertion ""IsOk()"" failed at /private/var/folders/w4/hp1my1ln4216vrmvp2_w45dm0000gn/T/pip-req-build-i0obld2n/ext/wxWidgets/src/osx/core/bitmap.cpp(1407) in GetWidth(): invalid bitmap

@marzaugen
Copy link

sorry, I'm not a programmer... so for me it's a bit hard to follow you.
But I have been a total fan of Cecilia for 20 years.
is anyone able to create a patch to let Cecilia run on modern macs? I think many of us will be thankful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@oivindi @julienrobert @funxiun @mark-summ @marzaugen and others