Hi Matt, Pedro, Aere and all,

your tips have been very helpful. It's easy to use sox to play raw files generated by fluidsynth and to convert them into everything I want including mp3, the latter requiring lame of course. A three line shell script (.bat file under windows) minimizes typing.

Luckily there is no need for me to compile fluidsynth with libsndfile. Otherwise it would have been tedious: Although I believe having copied the files from the libsndfile win32 package into the correct dirs as Pedro described, the linker terminates with errors after generating the dll.a file. By the way, I believe the pkg-config.pc is not entirely correct apart from the wrong filename (libsndfile instead of libsndfile-1): the '-l' option should arguably be separated from the name: "-l libsndfile-1), but this is so obvious that it is hardly worth mentioning. Or am I messing all up?

Anyway. Below is the transcript post compiling, but I don't feel like digging deeper right now as I can do everything I want.

Cheers,

Leo


**************************************************************
Summary:
libsndfile:            yes (with ogg vorbis support)
D-Bus:                 no
PulseAudio:            no
JACK:                  no
ALSA:                  no
PortAudio:             no
OSS:                   no
MidiShare:             no
CoreAudio:             no
CoreMIDI:              no
Windows:               yes
LADSPA support:        no
LASH support:          no
LADCCA support:        no
OS/2 DART support:     no
Audio to file driver:  yes
Readline:              no
Samples type=float:    no (using double)
Profiling:             no
Debug:                 no
Trap on FPE (debug):   no
Check FPE (debug):     no
**************************************************************


CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x10c): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x141): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x173): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x4c6): undefined reference to `sf_format_check'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x519): undefined reference to `sf_open'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x56c): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x592): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x5e9): undefined reference to `sf_close'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x5fd): undefined reference to `sf_error_number'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x6b7): undefined reference to `sf_writef_float'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x6d3): undefined reference to `sf_strerror'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x95b): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x98d): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0x9f8): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0xa2a): undefined reference to `sf_command'
CMakeFiles\libfluidsynth.dir/objects.a(fluid_filerenderer.c.obj):fluid_filerende
rer.c:(.text+0xa4e): undefined reference to `sf_format_check'
collect2: ld gab 1 als Ende-Status zurĀ³ck
mingw32-make[2]: *** [src/libfluidsynth.dll] Error 1
mingw32-make[1]: *** [src/CMakeFiles/libfluidsynth.dir/all] Error 2
mingw32-make: *** [all] Error 2

C:\fluidsynth\build>







Am 10.03.2012 23:03, schrieb Matt Giuca:

Hi, I'm on holiday right now so I can't test this suggestion, but from memory, here's what I do.

FluidSynth has an option to set the sampling rate of the output. Sox has an option to specify the sampling rate of the input. Just set them both to the same value (an appropriate one is 44000, IIRC) and it will work. Check the respective man pages to find the options.

I'm not sure if Fluid can directly do WAV output, but I don't use it. The reason you need to specify the sampling rate is that RAW doesn't include meta-information so you have to specify it yourself -- this makes it the simplest format for a program to read or write.

Matt

On Mar 11, 2012 8:07 AM, "Dr.Leo" <fhaxbo...@googlemail.com <mailto:fhaxbo...@googlemail.com>> wrote:



    thanks. As MinGW does the trick, I am not so keen to recompile it on
    MSVC9. I just wanted to share a potential problem. But I realise that
    the main problem is in my head rather than in fluidsynth's
    repository. I
    understand that you don't want to officially release windows binaries
    for the reasons you mention. But I think it would still be useful.
    If I
    had a website I would probably do it myself, well I have a project on
    Google code, but this is unrelated to music.

    I've tried the -F option. A .raw file is created but I cannot play it.
    SoX reports an error as the sampling rate is not specified. I
    guess this
    is a feature, not a bug. Still I want to use sndfile, but I don't know
    how.  The docs are tacit on this. There is a Windows binary of sndfile
    alongside with the tarball. I tried to compile the tarball
    successfully.
    but I don't know how to include it in FluidSynth. I thought I'd just
    copy sndfile.h in FluidSynth's include dir and the dll and def
    files of
    libfluidsynth in the MinGW lib dir. I know this is very basic and
    should not be on this list. So I would also appreciate any link to
    a concise recipe on compiling multiple libraries etc. but my only
    goal so far is to create wav from midi.


    Any further tips?

    Leo


    Am 10.03.2012 16:42, schrieb Pedro Lopez-Cabanillas:

        On Saturday 10 March 2012, Dr.Leo wrote:

            1. MSVC9

            I did not manage to build it. It does not even build
            libfluidsynth.lib.
            Is there something wrong with the SLN file? Well, cmake
            produced an
            error at some point that did not look serious but may have
            disrupted the
            build process. If anyone is interested I'll send the log
            files etc.

        I would try to help if you post a brief message containing the
        error messages,
        and the exact versions of the software packages involved.

        By the way, I've built FluidSynth SVN with VC++ 2010 Express
        just now,
        successfully. I've used:

         From http://www.cmake.org/cmake/resources/software.html
        - CMake 2.8.7,

         From http://www.gtk.org/download/win32.php
        - GLib 2.28.8 (Run-time, Dev)
        - gettext-runtime 0.18.1.1 (Run-time, Dev)
        - pkg-config 0.26 (Tool)

        CMake complains about the VC Redist runtime files, which are
        not included in
        Express anymore, but it is a warning not affecting the build
        at all.

            Strangely enough, MSVC9 did not complain about a missing
            dsound.h etc.

        The DirectX SDK is included in Visual Studio, even in VS Express.

            I think it would be very useful to host a zip archive with
            the binaries
            on sf. If you haven't got a Win32 build environment I'd
            happily send you
            my .exe and .dll plus a readme file.

        The problem is that we don't want to decide a particular
        configuration and
        compiler version to distribute an official Windows build. We
        don't do that for
        Mac OSX or Linux either. Building all permutations is out of
        the question:
        there are two compilers (VC++ and MinGW), two main
        architectures (32 and 64
        bit), and several optional dependencies...

        Building the binaries depends on the exact requirements of
        each program/user
        using FluidSynth. For instance, including Readline changes the
        license of the
        resulting library from LGPL to GPL, and this may be
        discouraging for some
        users. Other optional components in Windows can be Sndfile,
        Portaudio, and
        Jack. Each one has specific use cases and drawbacks, which are
        justified if
        you really need the functionality (for instance, if you
        include some of them
        you need to distribute also their runtime DLL as well.)

            3. fast-render

            I don't understand the syntax. I tried from the cmd line:

            fluidsynth r3.sf2 -f=output.raw input.mid

            and it just plays the midi file without writing anything.
            Any hint would
            be much appreciated.

        The short argument for fast render is "-F", with a capital F
        letter. In this
        case, followed by an space and the name of the output file
        name. The long
        argument is "--fast-render", followed by an equal sign ("=")
        and the output
        file name. Without the help of Readline, the command line
        options must go
        before the soundfont and midi file names. So, two correct
        commands would be:

               fluidsynth -F output.raw r3.sf2 input.mid

        or

               fluidsynth --fast-render=output.raw r3.sf2 input.mid

        Regards,
        Pedro


    _______________________________________________
    fluid-dev mailing list
    fluid-dev@nongnu.org <mailto:fluid-dev@nongnu.org>
    https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to