Discussion:
[haskell-art] asound not found during Euterpea installation
CK Kashyap
2012-07-06 04:12:03 UTC
Permalink
Hi all,

I tried to install Euterpea on ubuntu 12.04 and ran into this problem. Can someone tell me the exact package name that I need to install using apt-get to solve this problem?

Resolving dependencies...
Configuring PortMidi-0.1.3...
cabal: Missing dependency on a foreign library:
* Missing C library: asound
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
Euterpea-1.0.0 depends on PortMidi-0.1.3 which failed to install.
PortMidi-0.1.3 failed during the configure step. The exception was:
ExitFailure 1

Regards,
Kashyap
Henning Thielemann
2012-07-07 07:50:53 UTC
Permalink
Post by CK Kashyap
Hi all,
I tried to install Euterpea on ubuntu 12.04 and ran into this problem. Can someone tell me the exact package
name that I need to install using apt-get to solve this problem?
Resolving dependencies...
Configuring PortMidi-0.1.3...
* Missing C library: asound
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
apt-get install libasound2-dev


(found with: dpkg --search alsa/pcm.h )
CK Kashyap
2012-07-08 15:28:58 UTC
Permalink
Yippee!!!! ... Euterpea got built and installed correctly. Thanks for the asound help.

After this, I tried to do "play childSong6" - nothing happened - my sound card probably does not support midi. So I installed timidity and
ran it as follows "timidity -iA -Os&" - I re-ran ghci and found that it still did not play the music. So did a "" and generated the midi file. timidity played it beautifully!!!!

I still cannot believe "the quality of synthesis" .... does timidity synthesize the instruments or it has stored samples???

Anyway, it'll be nice if you could give me some pointers on how I could get my timidity to work such that I am able to alter music from GHCI and listen to it directly!!!

Regards,
Kashyap
________________________________
Sent: Saturday, July 7, 2012 1:20 PM
Subject: Re: [haskell-art] asound not found during Euterpea installation
Post by CK Kashyap
Hi all,
I tried to install Euterpea on ubuntu 12.04 and ran into this problem. Can someone tell me the exact package
name that I need to install using apt-get to solve this problem?
Resolving dependencies...
Configuring PortMidi-0.1.3...
* Missing C library: asound
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
apt-get install libasound2-dev
(found with: dpkg --search alsa/pcm.h )
Henning Thielemann
2012-07-08 16:52:54 UTC
Permalink
This post might be inappropriate. Click to display it.
CK Kashyap
2012-07-09 10:18:27 UTC
Permalink
Thanks a lot Henning,

aconnect 'Midi Through' TiMidity  was the missing step. 


I'm going to play with it for a bit and get back. Btw ... is there a really simple example I could start off with ...

say ... 2 tracks  ... one Piano and one Drums ....Just playing CDEFGAB and with a "tick tick tick on the drum"

childSong6 seems really huge!

Regards,
Kashyap
________________________________
Sent: Sunday, July 8, 2012 10:22 PM
Subject: Re: [haskell-art] asound not found during Euterpea installation
Post by CK Kashyap
After this, I tried to do "play childSong6" - nothing happened - my sound card probably does not support
midi. So I installed timidity and
ran it as follows "timidity -iA -Os&" - I re-ran ghci and found that it still did not play the music. So did
a "" and generated the midi file. timidity played it beautifully!!!!
Are you on Linux? 'play' is part of the SoX package and should only play pcm audio files. It may try to play the MIDI data as raw pcm data, though.
As a first test you can play a MIDI file using simply 'timidity file.mid'.
If you run timidity with -iA option, then it is in server mode and may be controlled by other programs like an external keyboard, 'pmidi', our live-sequencer or some Haskell code from GHCi like reactive-balsa. In order to actually control timidity by another program you must connect the controlling program and the controlled program either from the command-line with 'aconnect' or from a GUI like 'patchage', 'qjackctl', 'alsa-patch-bay' or 'kaconnect'. With 'pmidi -l' or 'aconnect -o -i' you can list servers and clients with their ALSA address.
$ aconnect 'Midi Through' TiMidity
Post by CK Kashyap
I still cannot believe "the quality of synthesis" .... does timidity synthesize the instruments or it has
stored samples???
TiMidity is a sampling synthesizer. If you want better samples you may install package fluid-soundfont-gm. (For real sound synthesis in Haskell I can assist building synthesizer-llvm. :-)
Hudak, Paul
2012-07-10 02:34:28 UTC
Permalink
This post might be inappropriate. Click to display it.
CK Kashyap
2012-07-10 10:56:25 UTC
Permalink
Thank you very much Dr Hudak,

Yup it helps ... I was able to play it from GHCI ... I cannot describe my excitement in words!!!

Regards,

Kashyap
________________________________
Sent: Tuesday, July 10, 2012 8:04 AM
Subject: RE: [haskell-art] asound not found during Euterpea installation
Hi Kashyap.  There are many examples much simpler than Child Song 6 in the Haskell School of Music textbook (see
                                                
mel   = instrument AcousticGrandPiano $
         line [c 4 en, d 4 en, e 4 en, f 4 en, g 4 en, a 4 en, b 4 en, c 5 en]
drums = instrument Percussion $ timesM 8 $ perc LowTom en
mus   = mel :=: drums  
 
I hope this helps,
 
    -Paul
 
Sent: Monday, July 09, 2012 6:18 AM
To: Henning Thielemann
Subject: Re: [haskell-art] asound not found during Euterpea installation
 
Thanks a lot Henning,
 
aconnect 'Midi Through' TiMidity was the missing step. 
 
I'm going to play with it for a bit and get back. Btw ... is there a really simple example I could start off with ...
 
say ... 2 tracks  ... one Piano and one Drums ....Just playing CDEFGAB and with a "tick tick tick on the drum"
 
childSong6 seems really huge!
 
Regards,
Kashyap
 
________________________________
Sent: Sunday, July 8, 2012 10:22 PM
Subject: Re: [haskell-art] asound not found during Euterpea installation
Post by CK Kashyap
After this, I tried to do "play childSong6" - nothing happened - my sound card probably does not support
midi. So I installed timidity and
ran it as follows "timidity -iA -Os&" - I re-ran ghci and found that it still did not play the music. So did
a "" and generated the midi file. timidity played it beautifully!!!!
Are you on Linux? 'play' is part of the SoX package and should only play pcm audio files. It may try to play the MIDI data as raw pcm data, though.
As a first test you can play a MIDI file using simply 'timidity file.mid'.
If you run timidity with -iA option, then it is in server mode and may be controlled by other programs like an external keyboard, 'pmidi', our live-sequencer or some Haskell code from GHCi like reactive-balsa. In order to actually control timidity by another
program you must connect the controlling program and the controlled program either from the command-line with 'aconnect' or from a GUI like 'patchage', 'qjackctl', 'alsa-patch-bay' or 'kaconnect'. With 'pmidi -l' or 'aconnect -o -i' you can list servers and
clients with their ALSA address.
I assume that Euterpea uses PortMidi which uses ALSA but in order to be portable PortMidi does not integrate so nicely with the ALSA framework. A program using PortMidi does not appear as an ALSA client or server, it can only directly control other programs.
$ aconnect 'Midi Through' TiMidity
Post by CK Kashyap
I still cannot believe "the quality of synthesis" .... does timidity synthesize the instruments or it has
stored samples???
TiMidity is a sampling synthesizer. If you want better samples you may install package fluid-soundfont-gm. (For real sound synthesis in Haskell I can assist building synthesizer-llvm. :-)
Henning Thielemann
2012-07-10 12:48:11 UTC
Permalink
Post by CK Kashyap
Thank you very much Dr Hudak,
Yup it helps ... I was able to play it from GHCI ... I cannot describe my excitement in words!!!
... then express it with music! :-)

Loading...