LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-27-2011, 08:38 PM   #1
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Rep: Reputation: 22
What package provides python:midi (audio/x-karaoke)?


I have installed and run recoll on my Fedora 15 x86_64 system. It works well, but reports a missing helper application "python:midi (audio/x-karaoke)". My package manager (yum) does not report a package python-midi or similar. I did install the nearest match I could find, which was python-portmidi.x86_64, but recoll still reports the missing helper. Can anyone tell me what I need to install to satisfy recoll?
 
Old 09-30-2011, 08:38 AM   #2
medoc
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Rep: Reputation: 7
For karaoke files, you need the midi module:
http://pypi.python.org/pypi/midi/0.2.1
And also chardet (charset and language recognition, the karaoke files are not too good at identifying this):
http://chardet.feedparser.org/

I try to keep up to date links to helper packages here:

http://www.lesbonscomptes.com/recoll/features.html

Happy singing !

Cheers,
jf
 
Old 10-01-2011, 10:09 PM   #3
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by medoc View Post
For karaoke files, you need the midi module:
http://pypi.python.org/pypi/midi/0.2.1
And also chardet (charset and language recognition, the karaoke files are not too good at identifying this):
http://chardet.feedparser.org/
Thank you for replying, medoc.

I have downloaded the files from the locations you gave. I unpacked the midi-0.2.1.tar.gz into directory midi-0.2.1, installed swig (which was a missing dependency the first time through), then ran "python setup.py install". The setup failed because of some missing files:
Code:
running install
running build
running build_py
running build_ext
building '_sequencer_alsa' extension
swigging src/sequencer_alsa/sequencer_alsa.i to src/sequencer_alsa/sequencer_alsa_wrap.c
swig -python -o src/sequencer_alsa/sequencer_alsa_wrap.c src/sequencer_alsa/sequencer_alsa.i
src/sequencer_alsa/sequencer_alsa.i:145: Error: Unable to find 'include/seq.h'
src/sequencer_alsa/sequencer_alsa.i:146: Error: Unable to find 'include/seqmid.h'
src/sequencer_alsa/sequencer_alsa.i:147: Error: Unable to find 'include/seq_event.h'
src/sequencer_alsa/sequencer_alsa.i:148: Error: Unable to find 'include/seq_midi_event.h'
src/sequencer_alsa/sequencer_alsa.i:149: Error: Unable to find 'include/error.h'
error: command 'swig' failed with exit status 1
I found that alsa-lib-devel provides all these headers under /usr/include/alsa/, so I installed that package. Unfortunately, that did not satisfy the dependencies, which is not surprising as the directory declaration is different. I found these files are referred to in ./src/sequencer_alsa/sequencer_alsa.i, so I edited that file to explicitly refer to /usr/include/alsa/[filename]. Now when I run the python installer, it throws a different error:
Code:
/usr/include/alsa/seq_event.h:260: Error: Syntax error in input(3).
error: command 'swig' failed with exit status 1
/usr/include/alsa/seq_event.h:260 is the last line (__attribute__ line) of this typedef:
Code:
/** external stored data */
typedef struct snd_seq_ev_ext {
        unsigned int len;               /**< length of data */
        void *ptr;                      /**< pointer to data (note: can be 64-bit) */
} __attribute__((packed)) snd_seq_ev_ext_t;
This looks to be a Swig problem, so I have subscribed to the Swig mailing list and posted the question there. If you happen to know what is needed to fix the error, however, feel free to reply <grin>.
 
Old 10-02-2011, 01:33 AM   #4
medoc
LQ Newbie
 
Registered: Dec 2010
Posts: 18

Rep: Reputation: 7
Hi, and sorry for the difficulties. You do not need the alsa interface to decode karaoke files.

I'm not sure I had tried this on Linux (the alsa interface build is not tried on other platforms), or maybe I forgot about this issue on Linux. I'm going to update the doc on the web site.

You can disable the alsa interface build (if you don't need it for driving midi hardware). I didn't find a command line way to do it, you have to edit setup.py but it's very simple: just change the platform name at line 37:

37c37
< if platform.startswith('linux'):
---
> if platform.startswith('NONE'):


The midi package should then build and install without a problem.

I'm not sure that the alsa interface is actually working anyway, the py-midi package seems to be unmaintained (last version 2006).

Cheers,
jf

P.S.: My build trace:

hautmedoc$ uname
Linux
hautmedoc$ python setup.py build
No sequencer available for 'linux2' platform.
running build
[...]
copying and adjusting scripts/mididump -> build/scripts-2.7
changing mode of build/scripts-2.7/mididump from 644 to 755
hautmedoc$ sudo python setup.py install
root's password:
No sequencer available for 'linux2' platform.
running install
[...]
Writing /usr/local/lib/python2.7/site-packages/midi-0.2.1-py2.7.egg-info
hautmedoc$
 
Old 10-02-2011, 02:27 AM   #5
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Original Poster
Rep: Reputation: 22
That is certainly a clue. Trouble is, I don't know how much of the package recoll needs in order to index midi files. I will see if the swig mailing list gives me any clues and, if not, I will try your suggestion.

Thanks again.
 
Old 10-02-2011, 03:06 AM   #6
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Original Poster
Rep: Reputation: 22
It turns out that swig does not understand __attribute__ lines. The fix is to edit the .i file and insert a line:
#define __attribute__(x).

That got me to the point that gcc complained about a missing Python.h, which required me to install python-devel.

All working now. Thanks for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I uninstall a python package installed with python setup.py install? milomak Linux - Software 1 11-16-2009 09:22 PM
Sound: MIDI decoder for python eantoranz Programming 2 10-24-2009 08:55 PM
What package for playing CD and midi file satimis Linux From Scratch 25 09-30-2005 09:57 PM
midi/audio sequencers? batgranny Linux - Software 2 02-06-2005 01:32 AM
audio/midi jimmmac Linux - Newbie 2 02-14-2003 05:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration