Hi all! I’ve been hard at work at a few new features, bug fixes, etc., and just released SCAMP 0.8.8 on PyPI (source code on source hut). Here’s what’s new:
- Added dynamics notation support, finally! It’s a simple as:
inst.play_note(pitch, volume, length, "dynamic: f")
or even justinst.play_note(pitch, volume, length, "f")
. (Note: this doesn’t affect playback, since that would require having some sort of global dynamic level for the part, and SCAMP treats volume on a note-by-note basis. I may implement part-level dynamic curves at some point in the future, but it’d be a major project.) - Made it possible to record the output of the default soundfont playback to a WAV file! (@musescore1983 and @punksterbass, I think you both have asked about this?) It’s as simple as adding this line right after the initial import of scamp:
playback_settings.recording_file_path = "output.wav"
. The truth is, it’s a bit of a hack behind-the-scenes (it runs a second, parallel, copy of fluidsynth), but it works really well as far as I can tell, and it also should be sample accurate, since it’s using the precise time-stamps from the clocks. - Updated the fluidsynth .dylibs that come bundled with SCAMP on Mac, so that they are the latest version. @aestephe, I’m super curious whether these work on your M1 machine using rosetta.
- Made it possible to use .sf3 soundfont files as well as .sf2. (These are just ogg-vorbis compressed .sf2 files.) This would be great, except that they take so long to load (I guess since they’re decompressing all the samples?), that it’s pretty much unusable, at least on my machine. Might be good for final rendering, now that you can record the output.
- Moved SCAMP settings outside of the SCAMP package and into the OS application data directory ("~/Library/Application Support/SCAMP" on mac, “~/.local/share/SCAMP” on Linux, and “C:\Users<username>\AppData\Local\SCAMP” on Windows). This has the advantage that avoids certain permissions problems that @shiihs was pointing out, and also lets the settings persist between upgrades.
- Added
playback_settings.open_json_file()
,engraving_settings.open_json_file()
, andquantization_settings.open_json_file()
, which just opens up the settings file in a text editor, so that you don’t have to root around for it. You can specify the command-line program to use as an argument (e.g.engraving_settings.open_json_file("atom")
) - Added
engraving_settings.export_note_velocities_to_xml
, an option to have SCAMP put the note velocities into exported MusicXML files. Unfortunately, this doesn’t necessarily translate the way you want it to when you open it up in another program. For instance, in MuseScore it works for piano, but not for sustained instruments like violin (for good reasons not worth going into). Because of this inconsistency, the setting is False by default. - Made string representations of
Session
,ScampInstrument
, andEnsemble
less horrendous and unhelpful - Fixed bug discovered by @mahatGma with 15/16 time signatures (Subdivision length does not neatly subdivide beat). It should work now!
- A bunch of other behind-the-scenes refactoring and clean-up. Good stuff, but not noticeable to the end user (hopefully!).
One other thing worth mentioning: I notice abjad came out with yet another new version (3.4), and I think there may be some tweaks I need to do to make SCAMP compatible with it. For now, version 3.3 is the version you want to install for compatibility with SCAMP.
Whew! Anyway, let me know if you have any issues with the new version. I suppose I should also plug my Liberapay, in case you want to support my ongoing efforts.