Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52956 closed defect (fixed)

freepats .cfg files must specify the installation directory

Reported by: RJVB (René Bertin) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: freepats

Description

I've been getting TiMidity++ to work on OS X, which requires freepats.

It recognises the instrument assignments in the selected freepats.cfg file, but doesn't find them unless that file also specifies the freepats installation directory. (On Linux this is also done.)

The attached patch adds a patch file and reinplace statement to add the missing info to the cfg files.

Attachments (1)

freepats.diff (1.7 KB) - added by RJVB (René Bertin) 8 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by RJVB (René Bertin)

Attachment: freepats.diff added

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Cc: mojca removed
Owner: changed from macports-tickets@… to mojca
Status: newassigned

comment:2 Changed 8 years ago by mojca (Mojca Miklavec)

Thanks a lot.

See also #51842. I guess that your patch removes the need for my ugly hack in TiMidity++?

post-destroot {
    set sharedir ${destroot}${prefix}/share/${name}
    xinstall -d -m 0755 ${sharedir}
    ln -sf "../freepats/Drum_000"     ${sharedir}/
    ln -sf "../freepats/Tone_000"     ${sharedir}/
    ln -sf "../freepats/freepats.cfg" ${sharedir}/timidity.cfg
}

Do you have any link to your draft port for TiMidity++ or can you attach it to the ticket in the link? I would like to get the idea how you solved the packaging. I didn't really invest much time, I just wanted something that could play midi files and no other software on Mac seemed to work.

(Un)related: do you have any clue how to make FreePats 2 work?

comment:3 in reply to:  2 ; Changed 8 years ago by RJVB (René Bertin)

Replying to mojca:

See also #51842. I guess that your patch removes the need for my ugly hack in TiMidity++?

Yes... I was afraid that you had a reason not to do the appropriate configuration in the .cfg files but I guess you simply didn't have the reflex or opportunity to peek at how they're set up on a Linux system with a working timidity installed.

Do you have any link to your draft port for TiMidity++ or can you attach it to the ticket in the link? I would like to get the idea how you solved the packaging.

I'm looking into a final thing that somehow doesn't work, but I was planning to point you to the port. I had no idea you were working on one too. In fact I was planning to throw in a point for DrumStick too, but it's cross-platform features are not as complete as I'd like.

BTW, how did you approach the interface thing in TiMidity++? Someone has been trying to be overly native and build the modules with a .bundle extension. In my first installed build attempt that didn't seem to work so I went for a static build which does work fine. A priori there's no one else who's likely to use timidity's GUI modules so linking them into the player should be fine, right?

I didn't really invest much time, I just wanted something that could play midi files and no other software on Mac seemed to work.

Actually, if you can find a copy of Quicktime Player 7, it plays MIDI. I hadn't realised that MIDI support was among the brunt of the traditional QT functionality they sacrificed on the AVFoundation altar...

Fluidsynth also works, but you need to give it a sound font file on each invocation.

(Un)related: do you have any clue how to make FreePats 2 work?

To tell the truth, I hadn't heard of FreePats at all until yesterday when this all started because I thought KDE's Minuet would make a nice addition to my KF5 ports. What's the problem with the new version?

comment:4 in reply to:  3 Changed 8 years ago by RJVB (René Bertin)

As a matter of fact, looking at https://www.midi.org/specifications/item/gm-level-1-sound-set I notice a number of discrepancies in the Freepats config files. I'll see if I can make a better aligned version and attach it here.

comment:5 Changed 8 years ago by RJVB (René Bertin)

https://github.com/RJVB/macstrop/tree/master/audio/timidity

If you're OK with it I can put you as co- or principal maintainer.

I noticed that there are also at least 2 commonly used soundfonts for fluidsynth (https://sourceforge.net/p/fluidsynth/wiki/SoundFont/) which provide a more complete and compliant set of MIDI patches. I'll see about shipping those as a fluidsynth subport (fluidsynth has no maintainer ATM), then we can add a variant to timidity to use them instead of freepats.

I also noticed qsynth.sourceforge.net . It looks pretty neat, I can look into building it against Qt5 if you like.

comment:6 Changed 8 years ago by RJVB (René Bertin)

I've added the aforementioned subports to fluidsynth:

https://github.com/RJVB/macstrop/tree/master/multimedia/fluidsynth

and added a variant to port:timidity to let it use fluid-soundfont-gm_gs subport. Maybe that should actually become the default variant as the result sounds nicer.

Note that the SoundFont from fluid-soundfont-gu_gs sounds even nicer but I don't know how to create a timidity .cfg file from it.

comment:7 Changed 8 years ago by mojca (Mojca Miklavec)

I added a link to the other ticket, but just for completeness, here's the direct link to my old attempt of creating a Portfile for TiMidity++.

I was afraid that you had a reason not to do the appropriate configuration in the .cfg files but I guess you simply didn't have the reflex or opportunity to peek at how they're set up on a Linux system with a working timidity installed.

Let's call that: I didn't want to spend days trying to figure out how to do things properly when all I needed at the time was the ability to play some MIDI files and I wasn't even sure which software to use.

BTW, how did you approach the interface thing in TiMidity++?

I'm not sure what your question is exactly. I added a tcl variant which works, but I don't find it too useful. I found a PPC GUI app with sources somewhere which I didn't bother investigating yet.

Actually, if you can find a copy of Quicktime Player 7, it plays MIDI.

I have that one installed, but I could only make it play piano and I couldn't make the sound louder (I can hardly hear it).

(Un)related: do you have any clue how to make FreePats 2 work?

To tell the truth, I hadn't heard of FreePats at all until yesterday when this all started because I thought KDE's Minuet would make a nice addition to my KF5 ports. What's the problem with the new version?

It seems to be completely different.

If you want to look at qsynth: go ahead.

I'm fully busy for the following few days, but I'll patch freepats and look at your other fluidsynt patches as well.

comment:8 in reply to:  7 Changed 8 years ago by RJVB (René Bertin)

Replying to mojca:

Let's call that: I didn't want to spend days trying to figure out how to do things properly when all I needed at the time was the ability to play some MIDI files and I wasn't even sure which software to use.

OK, then feel free to use my implementation if you want to, cleaning it up where you see fit.

I did notice 1 thing: playback speed is too high on Mac, but not on Linux with the same build settings. Fluidsynth doesn't show this issue.

I'm not sure what your question is exactly. I added a tcl variant which works, but I don't find it too useful. I found a PPC GUI app with sources somewhere which I didn't bother investigating yet.

Ah, no, I was referring to the choice of either building the optional interface modules to be loaded on-demand or to be included statically in the executable. I find the GTk2 interface slightly more useful and functional, but this is above all a commandline utility.

Actually, if you can find a copy of Quicktime Player 7, it plays MIDI.

I have that one installed, but I could only make it play piano and I couldn't make the sound louder (I can hardly hear it).

Are you sure that's not what the MIDI file asks for? FWIW, there's a system Audio/Midi setup interface in /Applications/Utilities. I don't think I ever looked at what kind of control it gives over MIDI playback parameters though.

To tell the truth, I hadn't heard of FreePats at all until yesterday when this all started because I thought KDE's Minuet would make a nice addition to my KF5 ports. What's the problem with the new version?

It seems to be completely different.

Indeed. It's implemented as a SoundFont, and doesn't come with a file (GUS format?) that can be used with TiMidity++. It might be interesting to add a variant to port:freepats that installs FreePats2-GM-20161107.sf2 into ${prefix}/share/sounds/sf2 as I understand the samples are of higher quality.

If you want to look at qsynth: go ahead.

I have already started, of course :) Annoyingly the version I built has the same unexpected behaviour as the latest pre-built Mac version: it doesn't play anything and logs errors in the System.log which clearly come from the underlying drivers, not the application or libfluidsynth. I'll have to see if I can figure out which internal parameters to change; it'll also need some tweaks to make it open MIDI files through the Finder.

comment:9 Changed 8 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: assignedclosed

In ea68c4d4/macports-ports:

freepats: proper path configuration

FreePats configuration files have to specify
the installation directory.

Closes: #52956

comment:10 Changed 8 years ago by mojca (Mojca Miklavec)

I committed the patch for freepats.

Let's move the rest of discussion to #51842 (or potentially another ticket about fluidsynth).

Note: See TracTickets for help on using tickets.