producing frequency notes
Timothée Giet
animtim at gmail.com
Tue Jul 31 16:18:56 BST 2018
Le 31/07/2018 à 15:37, Emmanuel Charruau a écrit :
> Hi,
>
> I found this example
> https://github.com/jordan9001/SpectrumDraw
>
> Which produces notes from frequency which would have allowed to play
> sounds without storing huge wav files and from the needed length. The
> result is not nice to hear :(
>
> We need to find an other solution :(
>
> Emmanuel
Hi,
To answer your questions from irc,
I think in the old gtk version, each sample correspond to the longest
note that can be played for each note.
And then the program stops playback earlier for shorter notes.
About the question regarding ogg/wav, I guess the sources are in wav and
were converted to ogg/mp3/aac depending on the platform for package
creation.
And again, note that for us ogg is not an option because only wav files
are supported by the qml element used there, and the other one
supporting compressed formats is completely not "realtime" enough to be
used here.
I agree best solution would be to have a light soft synth playing the
notes, but that requires some coding to create a clean synth with good
sound in C++ and to integrate with qml after.
Other possibility would be to use a library like fluidsynth to play
soundfont (which is a sort of file format embedding wav files, which are
defined for some notes and other notes can reuse those and stretch a
little to adapt the tone.. standard "instrument sample collection" file
format), but this can be more complicated to make cross-platform.
Timothée
More information about the GCompris-devel
mailing list