gesellkammer / maelzel Goto Github PK
View Code? Open in Web Editor NEWA framework for computer music in python
Home Page: https://maelzel.readthedocs.io
License: GNU General Public License v3.0
A framework for computer music in python
Home Page: https://maelzel.readthedocs.io
License: GNU General Public License v3.0
Hello, I am new to Maelzel and am trying to begin with the tutorials. Right from the start in I'm getting the following Exception:
Traceback (most recent call last):
seq.show()
File "...\maelzel\core\mobj.py", line 683, in show
img = self._renderImage(backend=backend, fmt=fmt, scorestruct=scorestruct,
File "...\maelzel\core\mobj.py", line 864, in _renderImage
_renderImage(obj=self, outfile=outfile, backend=backend,
File "...\maelzel\core\mobj.py", line 1772, in _renderImage
tmpfile, renderer = _renderImageCached(obj=obj, fmt=fmt, config=config, backend=backend,
File "...\maelzel\core\mobj.py", line 1798, in _renderImageCached
renderer.write(outfile)
File "...\maelzel\scoring\renderlily.py", line 1161, in write
_util.imagefileAutocrop(tempout, cropfile, bgcolor="#ffffff")
AttributeError: module 'maelzel._util' has no attribute 'imagefileAutocrop'
It appears to happen when rendering the lilypond file, and I also get the following Error messages from lilypond:
[maelzel:lilytools.py:367:renderLily:ERROR] Error while running lilypond, failed to produce a png file: ...\AppData\Local\tmpk9ja2k6b\l6p69pgj.png
[maelzel:lilytools.py:368:renderLily:ERROR] Return code: 1
[maelzel:lilytools.py:369:renderLily:ERROR] Outfile: '...\AppData\Local\tmpk9ja2k6b\l6p69pgj.png', exists: False
[maelzel:lilytools.py:370:renderLily:ERROR] stdout:
[maelzel:lilytools.py:371:renderLily:ERROR] stderr:
!! 'C:\Program' is not recognized as an internal or external command,
!! operable program or batch file.
Could the _util.py file in the current version be older?
When Maelzel attempts to render the lilypond file, it runs into the following Exception:
Traceback (most recent call last):
File "...\testing.py", line 24, in <module>
seq.show()
File "...\maelzel\core\mobj.py", line 683, in show
img = self._renderImage(backend=backend, fmt=fmt, scorestruct=scorestruct,
File "...l\maelzel\core\mobj.py", line 864, in _renderImage
_renderImage(obj=self, outfile=outfile, backend=backend,
File "...\maelzel\core\mobj.py", line 1772, in _renderImage
tmpfile, renderer = _renderImageCached(obj=obj, fmt=fmt, config=config, backend=backend,
File "...\maelzel\core\mobj.py", line 1798, in _renderImageCached
renderer.write(outfile)
File "...\maelzel\scoring\renderlily.py", line 1162, in write
_imgtools.imagefileAutocrop(tempout, cropfile, bgcolor="#ffffff")
File "...\maelzel\_imgtools.py", line 45, in imagefileAutocrop
imgobj = imageAutocrop(imgfile, bgcolor=bgcolor)
File "...\maelzel\_imgtools.py", line 20, in imageAutocrop
imgobj = img if isinstance(img, Image.Image) else Image.open(img)
File "...\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PIL\Image.py", line 3431, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '...\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\Local\\tmphgk9m3a_\\ckbcgml5.png'
Fiddling around, I found the filepath sent to PIL.Image
is \AppData\Local\tmphgk9m3a_\ckbcgml5.png
, which is different from the one called in builtins.open
, so its likely changed in the os.path.realpath
segment of the `PIL.Image`` file.
I am not familiar enough with how maelzel creates and works with the temp files, or how PIL works to sort this out myself, do you have any recommendations?
Hi Eduardo,
Just trying to test maelzel and in the first exemple got stuck with this:
from maelzel.core import *
seq = Chain([
Note(60),
Note("c#4+"),
Note("4Eb"),
Note("4E+20"),
Note("4G-10hz"),
Note("442hz"),
])
seq.show()
Error:
Default path for soundfonts only defined in linux
The file /Users/mypath/Library/Caches/tmpm9x0s0g0/4_dexb2d.png does not exist.
I am on macbook M1 Pro, Sonoma 14.4.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.