musescore does not play sounds (Not a valid SNDFILE* pointer)

  • Done
  • quality assurance status badge
Details
3 participants
  • Giovanni Biscuolo
  • Leo Prikler
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Giovanni Biscuolo
Severity
normal
G
G
Giovanni Biscuolo wrote on 28 Jul 2021 10:33
(address . bug-guix@gnu.org)
877dhasuqz.fsf@xelera.eu
Hello,

I'm using Guix on top of Debian 10, this version:

Toggle snippet (9 lines)
Generation 123 lug 26 2021 18:28:56 (current)
guix 151c546
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 151c54609b74f27f6954768d72fdb67525b1f784


If I run musescore from the command line, I get a lot of messages
(removed repeating lines with OMISSIS):

Toggle snippet (27 lines)
giovanni@roquette: musescore
Internal error: shortcut <file-part-export> not found
cannot find shortcut <file-part-export>
Initializing sequencer and audio driver…
Loading SoundFonts…
Initializing workspace…
Creating main window…
ZoomBox::setLogicalZoom(): Formatting logical zoom level as 100% (rounded from 1.000000)
Reading translations…
Initializing main window…
ZoomBox::setLogicalZoom(): Formatting logical zoom level as 100% (rounded from 1.000000)
qrc:/qml/palettes/PaletteTree.qml:772:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/qml/palettes/Palette.qml:766:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[OMISSIS - repeated 381 times]
qrc:/qml/palettes/PalettesWidgetHeader.qml:225:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Restoring session…
Loading scores…
Sample::decompressOggVorbis: open failed: Not a valid SNDFILE* pointer.
[OMISSIS - repeated 163 times]
Initializing tours…
qrc:/qml/palettes/Palette.qml:766:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[OMISSIS - repeated 342 times]
ScoreFont::draw: invalid sym 0


So it seems that musescore is loading SoundFonts without an error but
later it fails opening them with "Sample::decompressOggVorbis: open
failed: Not a valid SNDFILE* pointer."

If I try to export I get this error on stdout:

Toggle snippet (9 lines)
Fluid:loadSoundFonts: already loaded
MasterSynthesizer::setState: unknown <>
open soundfile failed: File contains data in an unimplemented format.
Could not write to device
QMutex: destroying locked mutex


It seems a bug with the soudfile (soundfont?).

Thanks! Gio'

--
Giovanni Biscuolo

Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmEBFlQMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSAk0P/0JhJBlJY1Jr8Xl8fDy0QCqoi5ROe1mJk8ZEljGx
JqbkvXpmjaOw+QJnNOxpIF0oJOtW/MDKGC9C0aH0cEA5tAu5Bsib4pDWPa5AsjMk
kr1tmpp+ODfYKp7fEzpFNFq/LLVSYQfoYQA55465RhAB90V9E1on1HQbt+om0KG6
H58du/XUCAa6M0ea+yxCWQSNAu/rp2uqq37qR0HvJeXUSY8O8lj4mdoqcmC/0snU
W6P8sXSwt1KBtEsU8vuCrvzWl/qD5xJw3UQQOSzix5D+6UlzZJURIdJ9l09IbKQT
eITBDrvtc6qLvPSTlXPO13SyOATXHg+S9dkC7cQz7vtTqSnazBIYBKAFbnFIdL2P
ekkDNykMm/wBjwujUNMQJfM6WVKYqX0O9cRAGTEWQnefv8UwexDDqk0V1vsaOKeZ
oDG3DCYsngKylcDI2CmBryVnrH7yZ4nUbYHJLKZCsnORqYhq2fIZHGvnDF2eB1Xm
Gb/6UiLZ7+KK9zGhbw/gp8xmeLM8FDs+nj46de+vUs+Vm+Sa/J8qAKmoc21/6dxA
tD1QMqThSb/tdl9xtTKvbNQF0FzCTjd4g1NG04K9EqhKUcEb5wvF3mT+EkS4nT2e
gVJwJ0ZObUaDrBb49vTXTuLw3QSs9NsKLCwko+UiQD7BOrgWmu0f38ghZ7kYuCwS
mPPB
=nx4x
-----END PGP SIGNATURE-----

L
L
Leo Prikler wrote on 28 Jul 2021 12:25
8db3c98ce43cca86fb2baa914230a3cfd477b49d.camel@student.tugraz.at
Hi,

Am Mittwoch, den 28.07.2021, 10:33 +0200 schrieb Giovanni Biscuolo:
Toggle quote (4 lines)
> So it seems that musescore is loading SoundFonts without an error but
> later it fails opening them with "Sample::decompressOggVorbis: open
> failed: Not a valid SNDFILE* pointer."

For the record, which SoundFont are you using here? Last time I
checked, the one that was bundled with MuseScore itself ought to work,
but perhaps you need a little configuration magic to make it find that.

Regards,
L
L
Leo Prikler wrote on 28 Jul 2021 15:44
MuseScore's default SoundFont is broken (Was: Re: musescore does not play sounds (Not a valid SNDFILE* pointer))
(name . Giovanni Biscuolo)(address . g@xelera.eu)(address . 49753@debbugs.gnu.org)
5fe72b15f20bf3ff1e57b18e06f195723beaa2fb.camel@student.tugraz.at
Hi,

Don't forget to keep the ML in the address line.

Am Mittwoch, den 28.07.2021, 15:15 +0200 schrieb Giovanni Biscuolo:
Toggle quote (67 lines)
> > Am Mittwoch, den 28.07.2021, 10:33 +0200 schrieb Giovanni Biscuolo:
> > > So it seems that musescore is loading SoundFonts without an error
> > > but
> > > later it fails opening them with "Sample::decompressOggVorbis:
> > > open
> > > failed: Not a valid SNDFILE* pointer."
> >
> > For the record, which SoundFont are you using here?
>
> AFAIU the one shipped with our musescore package, starting musescore
> in debug mode I get:
>
> --8<---------------cut here---------------start------------->8---
>
> global share: </gnu/store/jc95nlf4y7yz8vhb6xgm8nafd6llb2vd-musescore-
> 3.6.2/share/mscore-3.6/>
> [...]
> Loading SoundFonts…
>
> --8<---------------cut here---------------end--------------->8---
>
> I guess the font that is loaded is the one provided in the package:
> /gnu/store/jc95nlf4y7yz8vhb6xgm8nafd6llb2vd-musescore-
> 3.6.2/share/mscore-3.6/sound/MuseScore_General.sf3
>
> In fact if I check the synth configuration (View->Synthesiser) I see
> "MuseScore_General.sf3" is loaded.
>
> I've tried to convert a sample midi of mine using fluidsynth, this
> way:
>
> --8<---------------cut here---------------start------------->8---
>
> giovanni@roquette: fluidsynth -nli -r 48000 -o synth.cpu-cores=2 -T
> wav -F bohemian.wav /gnu/store/jc95nlf4y7yz8vhb6xgm8nafd6llb2vd-
> musescore-3.6.2/share/mscore-3.6/sound/MuseScore_General.sf3
> bohemian.mid
> FluidSynth runtime version 2.1.8
> Copyright (C) 2000-2021 Peter Hanappe and others.
> Distributed under the LGPL license.
> SoundFont(R) is a registered trademark of E-mu Systems, Inc.
>
> fluidsynth: warning: Failed to set thread to high priority
> fluidsynth: error: File contains data in an unimplemented format.
> fluidsynth: error: Failed to load sample 'Sine-Triangle-12000'
> fluidsynth: error: Unable to load all sample data
> fluidsynth: error: Failed to load SoundFont
> "/gnu/store/jc95nlf4y7yz8vhb6xgm8nafd6llb2vd-musescore-
> 3.6.2/share/mscore-3.6/sound/MuseScore_General.sf3"
> Failed to load the SoundFont
> /gnu/store/jc95nlf4y7yz8vhb6xgm8nafd6llb2vd-musescore-
> 3.6.2/share/mscore-3.6/sound/MuseScore_General.sf3
> fluidsynth: error: fluid_sfloader_load(): Failed to open
> '/gnu/store/9d4srpavq94ha5ial9047yrrz99wf7iq-fluidsynth-
> 2.1.8/share/soundfonts/default.sf2': File does not exist.
> fluidsynth: error: Unable to open file
> '/gnu/store/9d4srpavq94ha5ial9047yrrz99wf7iq-fluidsynth-
> 2.1.8/share/soundfonts/default.sf2'
> fluidsynth: error: Failed to load SoundFont
> "/gnu/store/9d4srpavq94ha5ial9047yrrz99wf7iq-fluidsynth-
> 2.1.8/share/soundfonts/default.sf2"
> Rendering audio to file 'bohemian.wav'..
>
> --8<---------------cut here---------------end--------------->8---
>
> So it seems that also fluidsynth is not able to load that SoundFont
> [1]
Ah, yes, I recall not being able to load that font with FluidSynth as
well. Back then I thought it was an error in FluidSynth, but it does
appear to be an issue with the SoundFont then if not even MuseScore
loads it.

Toggle quote (9 lines)
> > Last time I checked, the one that was bundled with MuseScore itself
> > ought to work, but perhaps you need a little configuration magic to
> > make it find that.
>
> I installed a different SoundFont in my ~/MuseScore3/SoundFonts and
> loaded it in my synth config ("View | Synthesizer") and I'm now able
> to play the sounds.
>
> Could it be a bug in some library?
If so, then it's two different libraries, as MuseScore doesn't use
FluidSynth for MIDI synthesis – it's more likely that the font is
simply broken.

It would be nice to investigate when that font first broke or if it
ever worked. My personal hypothesis is that a font was a requirement
for building it, but that users used different fonts in practice and
thus never noticed.

Regards
G
G
Giovanni Biscuolo wrote on 28 Jul 2021 18:33
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 49753@debbugs.gnu.org)
87sfzyqtxm.fsf@xelera.eu
Hello Leo,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (2 lines)
> Don't forget to keep the ML in the address line.

Sorry I forgot it.

[...]

Toggle quote (8 lines)
>> So it seems that also fluidsynth is not able to load that SoundFont
>> [1]

> Ah, yes, I recall not being able to load that font with FluidSynth as
> well. Back then I thought it was an error in FluidSynth, but it does
> appear to be an issue with the SoundFont then if not even MuseScore
> loads it.

Please are you reproducing the same error?

I tried installing musescore3 (v. 3.2.3) from Debian stable and AFAIU
that SoundFont is loaded (with a lot of warnings):

Toggle snippet (11 lines)
Loading soundfont: /usr/share/mscore3-3.2/sound/sf3/MuseScore_General.sf3
Loading soundfont: /home/giovanni/MuseScore3/SoundFonts/GeneralUser GS v1.471.sf2
SoundFont(/home/giovanni/MuseScore3/SoundFonts/GeneralUser GS v1.471.sf2) Sample(Grand Piano-D1) start(0) startloop(35640) endloop(70786) end(70787) smaller than SoundFont 2.04 spec chapter 7.10 recommendation
[...]
Loading soundfont: /usr/share/mscore3-3.2/sound/sf3/MuseScore_General.sf3
SoundFont(/usr/share/mscore3-3.2/sound/sf3/MuseScore_General.sf3) Sample(Flute F#5) start(0) startloop(19435) endloop(29952) end(29955) smaller than SoundFont 2.04 spec chapter 7.10 recommendation
[...]


musescore installed from Debian plays sounds using MuseScore_General.sf3

[...]

Toggle quote (4 lines)
>> Could it be a bug in some library?

> If so, then it's two different libraries,

AFAIU the error

Toggle snippet (5 lines)
Sample::decompressOggVorbis: open failed: Not a valid SNDFILE* pointer.


/seems/ to come from libsndfile [1], an input for both fluidsynth and
musescore

Toggle quote (3 lines)
> as MuseScore doesn't use FluidSynth for MIDI synthesis – it's more
> likely that the font is simply broken.

AFAIU this is not the case

Toggle quote (3 lines)
> It would be nice to investigate when that font first broke or if it
> ever worked.

I'll try to do it in the coming days

[...]

Happy hacking! Gio'


SFE_BAD_SNDFILE_PTR


--
Giovanni Biscuolo

Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmEBhvUMHGdAeGVsZXJh
LmV1AAoJENN9DqfOzDkSqCAP/2cL+Fi47pY0FUnbx1Oh6sIPZF5PComWNsLiWCov
q7RJsXkQcqcT29EPh1680iTJSOQMaJdpRrt5PLCG6T14k4KLv/efJugqzw2R9H42
YZYsdd3IItM9Icj3HR8PG7e1tImp9G/Neoi/JRZ2+Ir95TMG5U9idWi+gL4aOaHF
DzNpVd/uzCm2J3YYrSIr/7JD/KDCmMMGwKWroRbuRdXyNBv9mHjIT3YdV+U1O/ik
2HgUKFUmdA0Vxqv3VsGCPHpRLSYZ4UGw3Ljp1ox+bST5/lk1LL0pZAg2xN8rolH7
FpYbJXowo1KWZ3/lDXmEyYgqyl+x/rphx4HfmgHSEVwZz3PoQfbaUHVFLI/Mjiwn
CSZQWscG0fkWbia9hR5YzbPsxBxdNBeIC9MTWjG5FaHxo8i5CLUFgnWrUwV4bif8
MqpQ/Bsk1DIKmccJQ/oEkT9/kME4tSJZmxfEsjAiwJNw07Uln8mxsqnEZ9PgZsfc
cZw/6dBIPQ9/f3rjK3/9hIbxQQWgzEwJN5r32TWKgbL1vcB2M2uEP8phfhpCP3e7
WwcnqR1ptyLlgYW9RUIIEfLwcsVV+CsXSv+SugKojopIoHpxgwM3JexfYN9IOhsZ
N0TMALXOr+zpQj8RwM+4C6IU5jt26hRmvrIoqI9VL0AnkNZ7OwdD8NHlFck/gHYd
nVNB
=Ymjx
-----END PGP SIGNATURE-----

L
L
Leo Prikler wrote on 28 Jul 2021 19:31
(name . Giovanni Biscuolo)(address . g@xelera.eu)(address . 49753@debbugs.gnu.org)
259c6ddaba362c9e05f8cd86ab0fdc4469038988.camel@student.tugraz.at
Hi,

Am Mittwoch, den 28.07.2021, 18:33 +0200 schrieb Giovanni Biscuolo:
Toggle quote (37 lines)
> > > So it seems that also fluidsynth is not able to load that
> > > SoundFont
> > > [1]
> > Ah, yes, I recall not being able to load that font with FluidSynth
> > as
> > well. Back then I thought it was an error in FluidSynth, but it
> > does
> > appear to be an issue with the SoundFont then if not even MuseScore
> > loads it.
>
> Please are you reproducing the same error?
>
> I tried installing musescore3 (v. 3.2.3) from Debian stable and AFAIU
> that SoundFont is loaded (with a lot of warnings):
>
> --8<---------------cut here---------------start------------->8---
>
> Loading soundfont: /usr/share/mscore3-
> 3.2/sound/sf3/MuseScore_General.sf3
> Loading soundfont: /home/giovanni/MuseScore3/SoundFonts/GeneralUser
> GS v1.471.sf2
> SoundFont(/home/giovanni/MuseScore3/SoundFonts/GeneralUser GS
> v1.471.sf2) Sample(Grand Piano-D1) start(0) startloop(35640)
> endloop(70786) end(70787) smaller than SoundFont 2.04 spec chapter
> 7.10 recommendation
> [...]
> Loading soundfont: /usr/share/mscore3-
> 3.2/sound/sf3/MuseScore_General.sf3
> SoundFont(/usr/share/mscore3-3.2/sound/sf3/MuseScore_General.sf3)
> Sample(Flute F#5) start(0) startloop(19435) endloop(29952) end(29955)
> smaller than SoundFont 2.04 spec chapter 7.10 recommendation
> [...]
>
> --8<---------------cut here---------------end--------------->8---
>
> musescore installed from Debian plays sounds using
> MuseScore_General.sf3
Ah, but that's Debian's MuseScore_General.sf3. Those two could be
different for all we know. Did you binary diff them or did you try
using the SoundFont from the Guix installation with Debian's MuseScore?

Toggle quote (17 lines)
> [...]
>
> > > Could it be a bug in some library?
> > If so, then it's two different libraries,
>
> AFAIU the error
>
> --8<---------------cut here---------------start------------->8---
>
> Sample::decompressOggVorbis: open failed: Not a valid SNDFILE*
> pointer.
>
> --8<---------------cut here---------------end--------------->8---
>
> /seems/ to come from libsndfile [1], an input for both fluidsynth and
> musescore

Good point, it might be that libsndfile was compiled without Vorbis
support. However, there is also a nonzero chance that Fluidsynth or
Musescore use libsndfile incorrectly, for instance w.r.t. Vorbis
support [1]. Aside from the broken file hypothesis, that is...

Toggle quote (4 lines)
> > as MuseScore doesn't use FluidSynth for MIDI synthesis – it's more
> > likely that the font is simply broken.
>
> AFAIU this is not the case
How so?

Toggle quote (9 lines)
> > It would be nice to investigate when that font first broke or if it
> > ever worked.
>
> I'll try to do it in the coming days
>
> [...]
>
> Happy hacking! Gio'

Don't stress too much about it and happy hacking :)

M
M
Maxim Cournoyer wrote on 22 Mar 2023 20:13
Re: bug#49753: musescore does not play sounds (Not a valid SNDFILE* pointer)
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
87mt44fvkq.fsf_-_@gmail.com
Hi,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (83 lines)
> Hi,
>
> Am Mittwoch, den 28.07.2021, 18:33 +0200 schrieb Giovanni Biscuolo:
>> > > So it seems that also fluidsynth is not able to load that
>> > > SoundFont
>> > > [1]
>> > Ah, yes, I recall not being able to load that font with FluidSynth
>> > as
>> > well. Back then I thought it was an error in FluidSynth, but it
>> > does
>> > appear to be an issue with the SoundFont then if not even MuseScore
>> > loads it.
>>
>> Please are you reproducing the same error?
>>
>> I tried installing musescore3 (v. 3.2.3) from Debian stable and AFAIU
>> that SoundFont is loaded (with a lot of warnings):
>>
>> --8<---------------cut here---------------start------------->8---
>>
>> Loading soundfont: /usr/share/mscore3-
>> 3.2/sound/sf3/MuseScore_General.sf3
>> Loading soundfont: /home/giovanni/MuseScore3/SoundFonts/GeneralUser
>> GS v1.471.sf2
>> SoundFont(/home/giovanni/MuseScore3/SoundFonts/GeneralUser GS
>> v1.471.sf2) Sample(Grand Piano-D1) start(0) startloop(35640)
>> endloop(70786) end(70787) smaller than SoundFont 2.04 spec chapter
>> 7.10 recommendation
>> [...]
>> Loading soundfont: /usr/share/mscore3-
>> 3.2/sound/sf3/MuseScore_General.sf3
>> SoundFont(/usr/share/mscore3-3.2/sound/sf3/MuseScore_General.sf3)
>> Sample(Flute F#5) start(0) startloop(19435) endloop(29952) end(29955)
>> smaller than SoundFont 2.04 spec chapter 7.10 recommendation
>> [...]
>>
>> --8<---------------cut here---------------end--------------->8---
>>
>> musescore installed from Debian plays sounds using
>> MuseScore_General.sf3
> Ah, but that's Debian's MuseScore_General.sf3. Those two could be
> different for all we know. Did you binary diff them or did you try
> using the SoundFont from the Guix installation with Debian's MuseScore?
>
>> [...]
>>
>> > > Could it be a bug in some library?
>> > If so, then it's two different libraries,
>>
>> AFAIU the error
>>
>> --8<---------------cut here---------------start------------->8---
>>
>> Sample::decompressOggVorbis: open failed: Not a valid SNDFILE*
>> pointer.
>>
>> --8<---------------cut here---------------end--------------->8---
>>
>> /seems/ to come from libsndfile [1], an input for both fluidsynth and
>> musescore
>
> Good point, it might be that libsndfile was compiled without Vorbis
> support. However, there is also a nonzero chance that Fluidsynth or
> Musescore use libsndfile incorrectly, for instance w.r.t. Vorbis
> support [1]. Aside from the broken file hypothesis, that is...
>
>> > as MuseScore doesn't use FluidSynth for MIDI synthesis – it's more
>> > likely that the font is simply broken.
>>
>> AFAIU this is not the case
> How so?
>
>> > It would be nice to investigate when that font first broke or if it
>> > ever worked.
>>
>> I'll try to do it in the coming days
>>
>> [...]
>>
>> Happy hacking! Gio'
>
> Don't stress too much about it and happy hacking :)

musescore is now at 4.0.2, and I gave it a try and it can play sounds
fine.

Closing, let us know if you still are having issues!

--
Thanks,
Maxim
Closed
?