MarcTheSpark / scamp

a Suite in Python for Computer-Assisted Music [MIRROR of https://git.sr.ht/~marcevanstein/scamp]
http://scamp.marcevanstein.com
GNU General Public License v3.0
121 stars 11 forks source link

`s.stop_transcribing().to_score().show()` fails with "Guile signaled an error..." #7

Open xcoderreal opened 1 year ago

xcoderreal commented 1 year ago

Hey! Not sure if this is the right way to report a bug, but here's one I came across when I tried to do basically:

s = scamp.Session()
s.tempo = TEMPO
scamp.playback_settings.recording_file_path = "some.wav"

piano = s.new_part("piano")
piano.send_midi_cc(64, 0.5)
s.start_transcribing()
# Play notes with `piano.play_note(..., blocking=False)`, along with some `scamp.wait()` calls
s.stop_transcribing().to_score().show()

The sound plays fine, but it fails to show the score:

/opt/homebrew/Cellar/lilypond/2.24.1/share/lilypond/2.24.1/ly/init.ly:65:2: error: Guile signaled an error for the expression beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
Throw to key `ly-file-failed' with args `()'.

What I already tried:

jvinto01 commented 1 year ago

Perhaps a similar problem... I receive the following error message with longer scores:

lilypond' is not recognized as an internal or external command, operable program or batch file.

It works with short scores with less than 20 notes or so.

MarcTheSpark commented 1 year ago

Hi! Sorry for the slow response here.

That error is a bit mysterious. Can you try to replicate it with the latest version of scamp (0.9.2), which works with the latest version of abjad (3.18)?

If you install those and it still appears, try running:

import abjad
abjad.show(abjad.Note("c'"))

If the error still appears then it's a issue with abjad/lilypond, not scamp. If it doesn't appear, then SCAMP might be the issue, in which case, take the script where you’re getting that error, and then, instead of writing:

score.show()

Do:

score.print_lilypond()

And let me know what it prints!