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

wav produced by sfizz_render sounds like sustain pedal on #1072

Closed
andrewp907 opened this issue Jan 16, 2022 · 2 comments · Fixed by #1073
Closed

wav produced by sfizz_render sounds like sustain pedal on #1072

andrewp907 opened this issue Jan 16, 2022 · 2 comments · Fixed by #1073
Labels
bug Something isn't working
Milestone

Comments

@andrewp907
Copy link

Test sfz: https://github.com/sfzinstruments/karoryfer.meatbass
specifically https://github.com/sfzinstruments/karoryfer.meatbass/blob/master/Programs/arco_looped_basic_map.sfz
same results with another sfz: https://web.archive.org/web/20170119182726/http://patcharena.com/free-sampled-lush-strings-ensemble-instrument-warm-strings-sfz/

Test midis: any from mutopiaproject.org
for example, for midis generated during or after 2010, https://www.mutopiaproject.org/ftp/BachJS/BWV1004/bwv-1004_1/bwv-1004_1.mid
for example, for midis generated before 2010, https://www.mutopiaproject.org/ftp/LisztF/S.172/liszt-consolation-no4/liszt-consolation-no4.mid
midis generated by current Lilypond and Musescore behave like the midis on Mutopia from during or after 2010

Running on Ubuntu Unity 20.04 in a UTM virtual machine on M1 MacBook Air 2020
Run sfizz_render from the bash command line

Symptoms: Playing midis generated by Lilypond during or after 2010, sfizz_render does not recognize the ends of notes but holds notes down for the length of the sample (or loops the sample many times before letting go, resulting in a tone cluster of notes that have been played).
Using the same sfz on midis generated by Lilypond before 2010, sfizz_render plays them as expected (cuts off each note at the end of the note).

Reviewing the Lilypond version history, it looks like 2.12 was released December 2008 and the next version, 2.14, was released June 2011.
Reviewing the changelog at the time: http://lilypond.org/doc/v2.14/Documentation/changes/
but I'm not seeing anything relevant there:

"MIDI output has been improved

the option \set Score.midiChannelMapping = #'voice puts each voice on its own midi MIDI channel
the option \set Score.midiChannelMapping = #'instrument puts identical instruments on the same MIDI channel. This means that e.g. for a full orchestral score there are always 16 (15 plus percussion) differently sounding instruments available, unrestricted by the number of staves or voices. (Some MIDI players will cut off notes, however, if two voices play the same pitch simultaneously on the same channel.) This option also stores each voice in a separate track in the MIDI file.
the default, \set Score.midiChannelMapping = #'staff, assigns one MIDI channel per staff. This setting allows instrument changes (implemented as MIDI program changes) to re-use single MIDI channel.
dynamics are now rendered as note velocities, no longer as midi volume. This improves the sound on [high end] midi renderers. "
@paulfd paulfd added the bug Something isn't working label Jan 16, 2022
@paulfd paulfd added this to the 1.3.0 milestone Jan 16, 2022
@andrewp907
Copy link
Author

andrewp907 commented Jan 16, 2022

Used the midicsv utility to view a representation of the midi files. The difference between the two kinds of files is that one file contains the binary equivalent of "Note_off_c" after each note and one file does not. I'm not sure how I might automate turning one kind of file into the other or whether sfizz could be made more permissive.

@paulfd
Copy link
Member

paulfd commented Jan 17, 2022

After 2010 the files use note-on messages with velocity 0 to fake note-offs. It's pretty common in midi, I'm not sure why I didn't directly put it in sfizz-render. I'll put out a pull request shortly.

@paulfd paulfd modified the milestones: 1.3.0, 1.2.1 Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants