[L2Ork-dev] Purr Data and MP3 Objects
Albert Graef
aggraef at gmail.com
Fri Sep 18 13:48:58 EDT 2020
tabread4~ does interpolation, but no on-the-fly resampling. soundfiler and
readsf~ do this (IIRC), but they only support a (very small) handful of
uncompressed file formats, one of which is dead already, but still seems to
get some use in the computer music community for historical reasons.
I always thought that we had an object in the library somewhere that
interfaces to libsndfile. Probably it's Tim Blechman's sndfiler~, but it
doesn't seem to be built right now, although we include the sources. So I
think that we should try to get this working, if only because libsndfile is
the queen of reading and writing sound files in FLOSS land, and supports an
abundance of audio file formats. Alas, there's one notable exception -- it
doesn't support mp3 at present either. But at least there's an open ticket
for it (https://github.com/erikd/libsndfile/issues/258) and there seems to
be some work going on, so there's a faint chance that we might get it
eventually.
Sorry, Joseph, I wish I had better news for you, but I think that the best
solution that you can offer right now is to point your customers to some
mp3 => ogg conversion tool. FLOSS developers just don't care much about
mp3, even though the patent expired, as we have ogg which was free from the
get-go (and many say that it's superior anyway). If your users want to take
advantage of open source, they should be aware of these sentiments and
willing to accommodate.
Best,
Albert
It looks to me
On Fri, Sep 18, 2020 at 5:28 PM Ivica Ico Bukvic <ico at vt.edu> wrote:
>
> On 9/18/2020 11:08 AM, Jonathan Wilkes wrote:
> > On Fri, Sep 18, 2020 at 11:00 AM Ivica Ico Bukvic <ico at vt.edu> wrote:
> >>
> >> On 9/18/2020 10:55 AM, Jonathan Wilkes wrote:
> >>> On Fri, Sep 18, 2020 at 10:12 AM Ivica Ico Bukvic <ico at vt.edu> wrote:
> >>>> Based on the help file this object needs a lot of love to be truly
> usable. See the transposing part on anything other than the 3 apparently
> hardcoded sampling rates...
> >>> So it can't play back vbr mp3s?
> >> Well, as of right now it can't do anything since it does not work :-).
> >> However, even if it did, it appears that vbr is not supported.
> >>
> >> From the help file:
> >>
> >> "The player supports mono and stereo MPEG Layer III files. Any bitrate
> >> is supported - but we have tested 128Kb/s and 32 Kb/s only.
> >>
> >> The sample rate of the output depends on the system sample rate of pd:
> >>
> >> If the sample rate of pd is set to 44100, files having the sample rates
> >> of 44100, 22050 and 11025 are correctly played, other files will be
> >> transposed."
> > How do `[tabplay~]` and `[readsf~]` handle this?
>
> I can only think off top my head how tabread4~ does it, which is via
> 4-point interpolation. Basically, if we can import the mp3 into array,
> all our problems will be solved. This would therefore limit our need to
> support the conversion/exporting part only, instead of also usability of
> yet another object that recreates much of the functionality. The would
> only leave the streaming part as a separate object that could
> potentially in-part piggy-back on the conversion thingy...
>
> >
> > -Jonathan
> >
> >>> -Jonathan
> >>>
> >>>> That said, it would be great to be able to support mp3 file
> manipulation. What would be even better if you could simply load it into an
> array natively and export from it, then all the problems this object
> already has would become moot.
> >>>>
> >>>> On 9/16/2020 7:06 PM, Linux ROUEN Normandie wrote:
> >>>>
> >>>> Le 17/09/2020 à 00:01, Jonathan Wilkes a écrit :
> >>>>
> >>>> On Wed, Sep 16, 2020 at 4:49 PM Linux ROUEN Normandie
> >>>> <linux.rouen at free.fr> wrote:
> >>>>
> >>>> Thanks Jonathan,
> >>>> But that means it's not usable by a standard project user.
> >>>>
> >>>> What means that?
> >>>>
> >>>> Well, translation from a poor French man speaking poor English (LOL):
> >>>> What I meant is that if you are not a guy who builds patchs/subpatchs
> using available objects but only a one who is using a ready-to-go project
> (assembly of patchs) built by someone else, you will never do what have
> been suggested. Not everybody is a developer-programmer, even I. So, what
> about a standard user of Purr Data / Pd Vanilla!
> >>>>
> >>>> You have to
> >>>> put your hands under the hood and then into the dirty engine.
> >>>> I just checked [mp3play~] with 'iemlib' r.1.17 properly installed and
> >>>> declared under Pd Vanilla v.0.50.2 and it's the same bad behavior than
> >>>> under Purr Data v.2.13.0. Even more, here 'mp3play~-help.pd' is not
> >>>> present at all.
> >>>>
> >>>> Do you know where the source code is for the version of mp3play~
> >>>> available through Vanilla?
> >>>>
> >>>> As I wrote it, it's not available under Pd Vanilla 0.5.2 / iemlib
> 1.17 but only under Purr Data, as far as my little experience.
> >>>> I attach to this email what I guess could be the main source file
> (mp3play~.c), but with no guarantee at all, awa its help file
> (mp3play~-help.pd).
> >>>> This 'C' file seems to have been tested/working only on: 'debugged
> for windows 013-03-2003' (line 13 of the file).
> >>>> These 2 files and few others can be found on your Git repository at:
> '/purr-data/externals/iemlib/iem_mp3/' (accordingly to the copy I have on
> my GNU/Linux PC).
> >>>>
> >>>> - Joseph
> >>>>
> >>>> -Jonathan
> >>>>
> >>>> -Joseph
> >>>> - - - - - - - - - - - - - - - - - - - -
> >>>> Le 16/09/2020 à 21:13, Jonathan Wilkes a écrit :
> >>>>
> >>>> On Wed, Sep 16, 2020 at 2:37 PM Linux ROUEN Normandie
> >>>> <linux.rouen at free.fr> wrote:
> >>>>
> >>>> Hello Folks,
> >>>>
> >>>> I'm looking for some advises regarding Recording and Playing MP3
> files -directly- inside Purr Data v2.13.0+ under GNU/Linux and Windows.
> >>>>
> >>>> In my MIDI/Audio projects under Purr Data I'm already using
> successfully:
> >>>> - [oggwrite~] / [oggread~] for .ogg (Vorbis) files (with lossy audio
> compression), and
> >>>> - [writesf~] / [readsf~] for .wav, .aif, .au and .snd files (with
> uncompressed linear pulse-code modulation).
> >>>>
> >>>> But some users are requesting, among other demands, the possibility
> to handle also MP3 (with lossy data-compression) for extending the number
> of compatible Audio equipment (like TVs) able to read them.
> >>>>
> >>>> After analysis I found only 2 objects -not tested yet- from the
> 'unauthorized' library being able to deal with MP3:
> >>>> - [mp3write~] an MP3 file recorder v.0.4, and
> >>>> - [mp3cast~] an MP3 streamer v.0.5.
> >>>> But there is nothing about an MP3 file reader/player.
> >>>>
> >>>> Despite the many libraries installed by default, Purr Data could not
> create any of the following objects (see towards the end of the link - FR):
> >>>> - [mp3amp~],
> >>>> - [graphic-mp3amp~],
> >>>> - [mp3live~],
> >>>> - [mp3streamout~],
> >>>> - [mp3streamin~],
> >>>> - [mp3fileout~], and
> >>>> - [mp3play~] from 'iemlib library'.
> >>>>
> >>>> * [mp3play~] should be in the 'iemlib' library but it's not there
> when its help file is well present in
> '/opt/purr-data/lib/pd-l2ork/extra/iemlib/mp3play~-help.pd'.
> >>>> One strange thing is that the 'mp3play~.c' file is well present on
> the Git copy I made from Jonathan's repo for my French translations in:
> >>>> - '/home/joe/GitLab/purr-data/externals/build/src/mp3play~.c' (47
> bytes), and
> >>>> - '/home/joe/GitLab/purr-data/externals/iemlib/iem_mp3/src/' (107 kB).
> >>>>
> >>>> mp3play~ is not currently getting built (and wasn't in Pd-extended,
> either).
> >>>>
> >>>> What a weirdo class structure! After compiling it, you must first
> create this:
> >>>>
> >>>> [iem_mp3]
> >>>>
> >>>> Which will then go in and trigger the setup routine for mp3play~, so
> >>>> that you can then do this:
> >>>>
> >>>> [mp3play~]
> >>>>
> >>>> Both will create properly. I was able to play the test file and it
> >>>> seemed to output something, though couldn't get my headphones to work
> >>>> so I don't know if it sounded right.
> >>>>
> >>>> It appears there are no dependencies for this object, so if we add it
> >>>> then it will work in the web app, too!
> >>>>
> >>>> I guess the first thing to do is look in Pd Vanilla and see if anyone
> >>>> has done work on this object since 2003.
> >>>>
> >>>> -Jonathan
> >>>>
> >>>> Any ideas - suggestions about an available and working [MP3 file
> reader/player] object?
> >>>> Thank you.
> >>>> - - - - - - - - - - - - - - - - - - - -
> >>>> Best,
> >>>> Joseph Gastelais
> >>>> LINUX ♥ ROUEN ♥ Normandie
> >>>> - - - - - - - - - - - - - - - - - - - -
> >>>> _______________________________________________
> >>>> L2Ork-dev mailing list
> >>>> L2Ork-dev at disis.music.vt.edu
> >>>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >>>>
> >>>> _______________________________________________
> >>>> L2Ork-dev mailing list
> >>>> L2Ork-dev at disis.music.vt.edu
> >>>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >>>>
> >>>> _______________________________________________
> >>>> L2Ork-dev mailing list
> >>>> L2Ork-dev at disis.music.vt.edu
> >>>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >>>>
> >>>> _______________________________________________
> >>>> L2Ork-dev mailing list
> >>>> L2Ork-dev at disis.music.vt.edu
> >>>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> L2Ork-dev mailing list
> >>>> L2Ork-dev at disis.music.vt.edu
> >>>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >>>>
> >>>> --
> >>>> Ivica Ico Bukvic, D.M.A.
> >>>> Director, Creativity + Innovation
> >>>> Co-Director, Human Centered Design iPhD
> >>>> Institute for Creativity, Arts, and Technology
> >>>>
> >>>> Virginia Tech
> >>>> Creative Technologies in Music
> >>>> School of Performing Arts – 0141
> >>>> Blacksburg, VA 24061
> >>>> (540) 231-6139
> >>>> ico at vt.edu
> >>>>
> >>>> www.icat.vt.edu
> >>>> www.performingarts.vt.edu
> >>>> l2ork.icat.vt.edu
> >>>> ico.bukvic.net
> >>>>
> >>>> _______________________________________________
> >>>> L2Ork-dev mailing list
> >>>> L2Ork-dev at disis.music.vt.edu
> >>>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >>> _______________________________________________
> >>> L2Ork-dev mailing list
> >>> L2Ork-dev at disis.music.vt.edu
> >>> https://disis.music.vt.edu/listinfo/l2ork-dev
> >> --
> >> Ivica Ico Bukvic, D.M.A.
> >> Director, Creativity + Innovation
> >> Co-Director, Human Centered Design iPhD
> >> Institute for Creativity, Arts, and Technology
> >>
> >> Virginia Tech
> >> Creative Technologies in Music
> >> School of Performing Arts – 0141
> >> Blacksburg, VA 24061
> >> (540) 231-6139
> >> ico at vt.edu
> >>
> >> www.icat.vt.edu
> >> www.performingarts.vt.edu
> >> l2ork.icat.vt.edu
> >> ico.bukvic.net
> >>
> >> _______________________________________________
> >> L2Ork-dev mailing list
> >> L2Ork-dev at disis.music.vt.edu
> >> https://disis.music.vt.edu/listinfo/l2ork-dev
> > _______________________________________________
> > L2Ork-dev mailing list
> > L2Ork-dev at disis.music.vt.edu
> > https://disis.music.vt.edu/listinfo/l2ork-dev
>
> --
> Ivica Ico Bukvic, D.M.A.
> Director, Creativity + Innovation
> Co-Director, Human Centered Design iPhD
> Institute for Creativity, Arts, and Technology
>
> Virginia Tech
> Creative Technologies in Music
> School of Performing Arts – 0141
> Blacksburg, VA 24061
> (540) 231-6139
> ico at vt.edu
>
> www.icat.vt.edu
> www.performingarts.vt.edu
> l2ork.icat.vt.edu
> ico.bukvic.net
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email: aggraef at gmail.com, web: https://agraef.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20200918/7f939c08/attachment-0001.html>
More information about the L2Ork-dev
mailing list