SCAMP 0.8.9 released!

Hi all! This is a pretty minor release — not much in the way of new features, but I fixed a few bugs and made a few improvements:

  • Updated the bundled libfluidsynth on MacOS to HEAD version (3.0.1) to fix CoreAudio issue on BigSur/M1 chip. (@aestephe, can you test this out on your machine? You should now be able to use the bundled version of libfluidsynth with CoreAudio without getting the bug you were getting. I’m trying to make it so that all you need to do to get things running on an M1 is install Rosetta 2.)
  • Rewrote “easy setup” section of documentation
  • Tested support for abjad 3.4. Currently both 3.3 and 3.4 should work with SCAMP, with very minor cosmetic differences in lilypond formatting.
  • Fixed an internal bug with scaling of MIDI CC messages. Statements like oboe.play_note(70, 0.7, 1.0, {"param_10": [0, 1, 0, 1, 0]}) should now work to have the note oscillate between left and right channels, since MIDI CC 10 is pan, and SCAMP works with ranges from 0 to 1. Thanks to @ubuntourist’s question about pan, which led to me discovering this bug.
  • Fixed bug with parsing of additional playback properties
  • Fix for minor bug when calculating staff length for staves with empty voices (@aestephe, I think this is the bug you were running into)

That’s all! Let me know if you have any issues with the new version.

1 Like

Whither expenvelope 0.6.8 (or later)?

$ pip install --user --upgrade scamp
Collecting scamp
  Using cached scamp-0.8.9-py3-none-any.whl (13.1 MB)
ERROR: Could not find a version that satisfies the requirement expenvelope>=0.6.8 (from scamp) (from versions: 0.1.0, 0.2.0, 0.3, 0.5, 0.6, 0.6.5, 0.6.6, 0.6.7)
ERROR: No matching distribution found for expenvelope>=0.6.8 (from scamp)

I see now that it’s available at ~marcevanstein/expenvelope - sourcehut git

So, not yet pushed out to pypi.org but available nonetheless.

Oops! Thanks for catching that. I’ve now uploaded it to PyPI.

1 Like

Sorry I’m so late to the party here! Yes, it looks like SCAMP’s bundled version of fluidsynth now works with CoreAudio on my M1 machine. As soon as I upgraded to 0.8.9, I ran the following code. It worked exactly as expected, and it didn’t throw any errors about failing to load CoreAudio/falling back to portaudio like it did when I first ran import scamp on 0.8.8.

>>> import scamp
>>> scamp.playback_settings

PlaybackSettings(named_soundfonts={'general_midi': 'Merlin.sf2'}, default_soundfont='general_midi', default_audio_driver='portaudio', default_midi_output_device=None, default_max_soundfont_pitch_bend=48, default_max_streaming_midi_pitch_bend=2, soundfont_volume_to_velocity_curve=Envelope((0, 40, 127), (0.1, 0.9), (0, 0), 0), streaming_midi_volume_to_velocity_curve=Envelope((0, 127), (1.0,), (0.0,), 0), osc_message_addresses={'change_parameter': 'change_parameter', 'change_pitch': 'change_pitch', 'change_volume': 'change_volume', 'end_note': 'end_note', 'start_note': 'start_note'}, adjustments=PlaybackAdjustmentsDictionary(articulations={'accent': NotePlaybackAdjustment(None, ParamPlaybackAdjustment(1.2, 0), None), 'marcato': NotePlaybackAdjustment(None, ParamPlaybackAdjustment(1.5, 0), None), 'staccatissimo': NotePlaybackAdjustment(None, None, ParamPlaybackAdjustment(0.3, 0)), 'staccato': NotePlaybackAdjustment(None, None, ParamPlaybackAdjustment(0.5, 0)), 'tenuto': NotePlaybackAdjustment(None, None, ParamPlaybackAdjustment(1.2, 0))}), try_system_fluidsynth_first=False, soundfont_search_paths=['%PKG/soundfonts'], resize_parameter_envelopes='lists', recording_file_path=None, recording_time_range=[0, 'inf'])

>>> s = scamp.Session()

>>> inst = s.new_part("flute")

Using preset Flute Gold for flute

>>> inst.play_note(60, volume = 0.5, length = 1)

Thanks so much, Marc! Let me know if there’s anything else I can do to help!

Hi Alex!

It looks like the playback_settings that you printed still had default_audio_driver='portaudio'? (The settings persist between upgrades.) Can you maybe run:

import scamp
scamp.playback_settings.default_audio_driver = "coreaudio"
s = scamp.Session()
inst = s.new_part("flute")
inst.play_note(60, volume = 0.5, length = 1)

Oops, sorry about that! I must have overlooked that somehow. Anyway, the code still runs just fine.

Awesome, thanks!

1 Like