- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我按照这里的说明 http://www.euterpea.com用于安装 Euterpea(一种用于嵌入在 Haskell 中的计算机音乐应用程序的特定领域语言),并且我收到一条消息,指出某些软件包和东西无法安装(参见下面的代码)。如何安装剩余的软件包?
Mo-MacBook-Pro:~ Mo$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal install Euterpea
To revert to previous state run:
cabal update --index-state='2018-06-25T08:34:14Z'
Mo-MacBook-Pro:~ Mo$ cabal install Euterpea
clang: warning: argument unused during compilation: '-nopie' [-Wunused-
command-line-argument]
Resolving dependencies...
Downloading heap-1.0.4...
Downloading PortMidi-0.1.6.1...
Configuring PortMidi-0.1.6.1...
Downloading lazysmallcheck-0.6...
Configuring heap-1.0.4...
Downloading semigroups-0.18.5...
Configuring lazysmallcheck-0.6...
Configuring semigroups-0.18.5...
Building heap-1.0.4...
Building PortMidi-0.1.6.1...
Building lazysmallcheck-0.6...
Building semigroups-0.18.5...
Installed semigroups-0.18.5
Downloading stm-2.5.0.0...
Configuring stm-2.5.0.0...
Installed lazysmallcheck-0.6
Downloading HCodecs-0.5.1...
Installed heap-1.0.4
Downloading Stream-0.4.7.2...
Configuring HCodecs-0.5.1...
Configuring Stream-0.4.7.2...
Building stm-2.5.0.0...
Building HCodecs-0.5.1...
Building Stream-0.4.7.2...
Failed to install HCodecs-0.5.1
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/HCodecs-0.5.1-
BtnY8oBJJ5FGnsoQaqbvOm.log ):
cabal: Entering directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5294/HCodecs-0.5.1'
Configuring HCodecs-0.5.1...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-
command-line-argument]
Preprocessing library for HCodecs-0.5.1..
Building library for HCodecs-0.5.1..
<command line>: cannot satisfy -package-id random-1.1-
7T1TXpwb46H1j0av1OnVaD
(use -v for more information)
cabal: Leaving directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5294/HCodecs-0.5.1'
Failed to install Stream-0.4.7.2
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/Stream-0.4.7.2-
ES6rey5IgWg9tsXDghlP7Y.log ):
cabal: Entering directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5295/Stream-0.4.7.2'
Warning: Stream.cabal:6:4: Tabs used as indentation at 6:4, 12:4, 13:4,
14:4,
15:4, 16:4, 17:4
Configuring Stream-0.4.7.2...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-
command-line-argument]
Preprocessing library for Stream-0.4.7.2..
Building library for Stream-0.4.7.2..
<command line>: cannot satisfy -package-id QuickCheck-2.11.3-
4Q6LQ7mN6Tj8otrLuHN0se
(use -v for more information)
cabal: Leaving directory
'/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-
5295/Stream-0.4.7.2'
Installed PortMidi-0.1.6.1
Installed stm-2.5.0.0
cabal: Error: some packages failed to install:
Euterpea-2.0.6-LLo28S848YneLemh6QUkK depends on Euterpea-2.0.6 which
failed to
install.
HCodecs-0.5.1-BtnY8oBJJ5FGnsoQaqbvOm failed during the building phase.
The
exception was:
ExitFailure 1
Stream-0.4.7.2-ES6rey5IgWg9tsXDghlP7Y failed during the building phase.
The
exception was:
ExitFailure 1
arrows-0.4.4.2-GLke2GgDEro6Tzj3MGmTOB depends on arrows-0.4.4.2 which
failed
to install.
Mo-MacBook-Pro:~ Mo$ stack install Euterpea
Error: While constructing the build plan, the following exceptions were
encountered:
In the dependencies for Euterpea-2.0.6:
PortMidi must match ==0.1.6.1, but the stack configuration has no specified version (latest matching version is 0.1.6.1)
arrows must match >=0.4 && <0.5, but the stack configuration has no specified version (latest matching version is 0.4.4.2)
needed since Euterpea is a build target.
Some different approaches to resolving this:
* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
errors, but results may be unpredictable.
* Recommended action: try adding the following to your extra-deps in /Users/Mo/.stack/global-project/stack.yaml:
- PortMidi-0.1.6.1
- arrows-0.4.4.2
Plan construction failed.
cabal install random-1.1 --force-reinstalls
这产生了:
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
tf-random-0.5
QuickCheck-2.11.3
Continuing even though the plan contains dangerous reinstalls.
Configuring random-1.1...
Building random-1.1...
Installed random-1.1
Mo-MacBook-Pro:~ Mo$ cabal install Euterpea
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Resolving dependencies...
Configuring Stream-0.4.7.2...
Configuring HCodecs-0.5.1...
Building HCodecs-0.5.1...
Building Stream-0.4.7.2...
Failed to install HCodecs-0.5.1
Build log ( /Users/lukeburke/.cabal/logs/ghc-8.4.3/HCodecs-0.5.1- BtnY8oBJJ5FGnsoQaqbvOm.log ):
cabal: Entering directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20742/HCodecs- 0.5.1'
Configuring HCodecs-0.5.1...
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Preprocessing library for HCodecs-0.5.1..
Building library for HCodecs-0.5.1..
<command line>: cannot satisfy -package-id random-1.1- 7T1TXpwb46H1j0av1OnVaD
(use -v for more information)
cabal: Leaving directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20742/HCodecs- 0.5.1'
Failed to install Stream-0.4.7.2
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/Stream-0.4.7.2- ES6rey5IgWg9tsXDghlP7Y.log ):
cabal: Entering directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20743/Stream- 0.4.7.2'
Warning: Stream.cabal:6:4: Tabs used as indentation at 6:4, 12:4, 13:4, 14:4,
15:4, 16:4, 17:4
Configuring Stream-0.4.7.2...
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Preprocessing library for Stream-0.4.7.2..
Building library for Stream-0.4.7.2..
<command line>: cannot satisfy -package-id QuickCheck-2.11.3- 4Q6LQ7mN6Tj8otrLuHN0se
(use -v for more information)
cabal: Leaving directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-20743/Stream- 0.4.7.2'
cabal: Error: some packages failed to install:
Euterpea-2.0.6-LLo28S848YneLemh6QUkK depends on Euterpea-2.0.6 which failed to
install.
HCodecs-0.5.1-BtnY8oBJJ5FGnsoQaqbvOm failed during the building phase. The
exception was:
ExitFailure 1
Stream-0.4.7.2-ES6rey5IgWg9tsXDghlP7Y failed during the building phase. The
exception was:
ExitFailure 1
arrows-0.4.4.2-GLke2GgDEro6Tzj3MGmTOB depends on arrows-0.4.4.2 which failed
to install.
cabal install random tf-random QuickCheck Euterpea --force-reinstalls
。
cabal install random tf-random QuickCheck Euterpea --force-reinstalls
我收到以下代码:
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
QuickCheck-2.11.3
Continuing even though the plan contains dangerous reinstalls.
Downloading erf-2.0.0.0...
Configuring random-1.1...
Configuring erf-2.0.0.0...
Building random-1.1...
Building erf-2.0.0.0...
Installed erf-2.0.0.0
Installed random-1.1
Downloading tf-random-0.5...
Configuring tf-random-0.5...
Building tf-random-0.5...
Failed to install tf-random-0.5
Build log ( /Users/Mo/.cabal/logs/ghc-8.4.3/tf-random-0.5- ADZoyzEXgHe6hyR0Bycce0.log ):
cabal: Entering directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-21584/tf- random-0.5'
Configuring tf-random-0.5...
clang: warning: argument unused during compilation: '-nopie' [- Wunused-command-line-argument]
Preprocessing library for tf-random-0.5..
Building library for tf-random-0.5..
<command line>: cannot satisfy -package-id primitive-0.6.4.0- 9k41Y6ToOAE8KXK6VMGV2O
(use -v for more information)
cabal: Leaving directory '/var/folders/dy/q51p3v595kbd8_wclmt80v700000gn/T/cabal-tmp-21584/tf- random-0.5'
cabal: Error: some packages failed to install:
Euterpea-2.0.6-87WYqltNL8w8teqXOsc4TL depends on Euterpea-2.0.6 which failed
to install.
HCodecs-0.5.1-DrGKEnNk6EBHti2goL6KP5 depends on HCodecs-0.5.1 which. failed to
install.
QuickCheck-2.12.6.1-KuXpgimNOXzF2SmGPEs5LR depends on QuickCheck- 2.12.6.1
which failed to install.
Stream-0.4.7.2-FedzVSwUnWMDxlzmPNWt7x depends on Stream-0.4.7.2 which failed
to install.
arrows-0.4.4.2-EGvZPpby4BcD99TcXDoCg4 depends on arrows-0.4.4.2 which. failed
to install.
tf-random-0.5-ADZoyzEXgHe6hyR0Bycce0 failed during the building phase. The
exception was:
ExitFailure 1
最佳答案
安装 Euterpea 软件包
这个答案使用 LTS 12.26,因为我已经验证它可以工作,但这应该适用于大多数 LTS 版本(有关详细信息,请参阅步骤 2 的底部)。
stack new euter-test
cd euter-test
stack.yaml
并将 LTS 设置为 12.26 和 extra-deps
指定 LTS 中不存在但 Hackage 中存在的包的版本:resolver: lts-12.26
...
extra-deps:
- Euterpea-2.0.6
- PortMidi-0.1.6.1
- arrows-0.4.4.2
- Stream-0.4.7.2
- lazysmallcheck-0.6
stack build
并添加库直到构建成功。extra-deps
如上所述的软件包,您应该能够使其在任何 LTS 上运行。 package.yaml
并添加 Euterpea
到依赖项列表:dependencies:
...
- Euterpea
app/Main.hs
中的一个简单测试:module Main where
import Euterpea
main :: IO ()
main = play $ c 4 qn
stack build
:lazysmallcheck-0.6: download
heap-1.0.4: download
heap-1.0.4: configure
HCodecs-0.5.1: download
PortMidi-0.1.6.1: download
heap-1.0.4: build
lazysmallcheck-0.6: configure
lazysmallcheck-0.6: build
HCodecs-0.5.1: configure
HCodecs-0.5.1: build
PortMidi-0.1.6.1: configure
heap-1.0.4: copy/register
lazysmallcheck-0.6: copy/register
PortMidi-0.1.6.1: build
Stream-0.4.7.2: download
Stream-0.4.7.2: configure
Stream-0.4.7.2: build
Stream-0.4.7.2: copy/register
PortMidi-0.1.6.1: copy/register
arrows-0.4.4.2: download
arrows-0.4.4.2: configure
arrows-0.4.4.2: build
arrows-0.4.4.2: copy/register
HCodecs-0.5.1: copy/register
Euterpea-2.0.6: download
Euterpea-2.0.6: configure
Euterpea-2.0.6: build
Euterpea-2.0.6: copy/register
Building all executables for `euter' once. After a successful build of all of them, only specified executables will be rebuilt.
euter-0.1.0.0: configure (lib + exe)
Configuring euter-0.1.0.0...
euter-0.1.0.0: build (lib + exe)
Preprocessing library for euter-0.1.0.0..
Building library for euter-0.1.0.0..
[1 of 2] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Lib.o )
[2 of 2] Compiling Paths_euter ( .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/autogen/Paths_euter.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/Paths_euter.o )
Preprocessing executable 'euter-exe' for euter-0.1.0.0..
Building executable 'euter-exe' for euter-0.1.0.0..
[1 of 2] Compiling Main ( app/Main.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/euter-exe-tmp/Main.o )
[2 of 2] Compiling Paths_euter ( .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/autogen/Paths_euter.hs, .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/euter-exe-tmp/Paths_euter.o )
Linking .stack-work/dist/x86_64-linux/Cabal-2.2.0.1/build/euter-exe/euter-exe ...
euter-0.1.0.0: copy/register
Installing library in <...>
Installing executable euter-exe in <...>
Registering library for euter-0.1.0.0..
stack exec euter-test-exe
*** Exception: No MIDI outputs!
的错误,那么您没有运行 MIDI 合成器(见下文)。确保在后台运行它(例如在另一个终端中)。 devices
在 GHCI 中查看可用的输出,然后使用 playDev x
而不是 play
, 其中 x
是合成器输入端口的 OutputDeviceID。例如:> devices
Input devices:
InputDeviceID 1 Midi Through Port-0
Output devices:
OutputDeviceID 0 Midi Through Port-0
OutputDeviceID 2 Synth input port (25952:0)
> playDev 2 $ c 4 qn
devices
并且看不到任何合成器输入端口,但是您在后台运行了流体合成器,那么您可能需要重新启动 ghci
然后再试一次。 sudo apt install fluidsynth
, 在 mac 上可能是 brew install fluidsynth
- 有很多关于如何做到这一点的文章,如果有疑问,只需谷歌即可。 fluidsynth -s -a alsa -m alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2
alsa
作为音频驱动程序和alsa_seq
作为 MIDI 驱动程序,并使用 soundfont FluidR3_GM.sf2
(应该作为流体合成器安装的一部分安装)。fluidsynth -s -a coreaudio -m coremidi /usr/share/sounds/sf2/FluidR3_GM.sf2
FluidR3_GM.sf2
文件,那么它很可能已安装在不同的位置。作为最后的手段,您可以只下载一个 soundfont 文件并使用它,而不是 FluidSynth 提供的那个。关于haskell - 为计算机音乐应用程序和 Haskell 安装 Euterpea,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53977864/
启动Android游戏时,我试图让一些音乐淡出。音乐在主菜单中播放,然后在播放器单击播放时淡出。我可以停止播放音乐,只是不会消失。 我试图用这个淡出: using UnityEngine; using
我正在 XNA 中创建一个游戏,它可以使用大量的音乐循环,但我似乎无法同步这些声音。 我总是错过几毫秒你能帮我吗? 这是我第一次尝试同步声音。请注意,我需要处理数十种声音...... 这个同步问题可能
我使用以下代码播放了一首歌,但它有 11 分钟长,我该如何停止它? 此代码位于 jFrame 1 中。如何使其停止在 jFrame 2 中? Input
在阅读我的书并浏览一些 YouTube 教程后,我对标准化的理解是,重要的事情之一就是不要有重复的值。更具体地说,主键 (ID) 不应重复。 因此,如果我正在使用音乐/音乐会数据库中的某些表,那么以下
我正在用 java 创建一个应用程序/游戏,其中包含背景音乐/声音。一切都按预期工作。如果播放某些系统声音/媒体声音/其他声音,我想静音/停止。 有什么建议...?? 最佳答案 我建议不要关心这个问题
只是尝试从图像 (1080p .png) + 音乐 (320Kb mp3) 为 youtube 制作视频。 ffmpeg -loop 1 -i image.png -i music.mp3 -
我正在GW-Basic中开发游戏,我想向其中添加音乐,但问题是我无法在后台播放,但是当我添加声音时先播放声音,然后在开始执行游戏和vICE之后vERSA。而我希望这两件事同时播放..所以知道怎么做吗?
我正在使用Xcode的Sprite套件开发iPhone游戏,想知道是否有一种简单或最佳实践的方法可以通过编程方式消除所有声音效果/音乐?对我来说,最明显的方法是创建一些 bool(boolean) 变
关闭。这个问题需要更多 focused .它目前不接受答案。 想改进这个问题?更新问题,使其仅关注一个问题 editing this post . 3年前关闭。 Improve this questi
我正在设计一个 Android 应用程序,需要依次播放各种短音乐文件。 我设置了一个“onClick”监听器来运行一个循环,一遍又一遍地播放这些声音文件,它们可能会播放 100 多次。 但是 我需要用
我有一个网站,其中包含集成到布局中的 Flash 音乐播放器。我希望用户能够在不中断音乐的情况下浏览网站。我做了很多研究和思考,以下是我提出的选项(请记住,我希望尽可能对 SEO 友好)。有人有其他想
我可以即时生成一些音调并播放声音吗?例如,如果我想生成 DO RI MI FA SO LA XI 音调并播放它们? 似乎声音 API 都是为了播放现有的音频文件。谢谢! 最佳答案 参见 Matt Ga
我一直在尝试将音乐添加到我的应用程序中,但没有特别成功。我一直在尝试使用 AVFoundation,我的代码如下: //MUSIC var audioPlayer = AVAudioP
MPMediaPickerController 返回一个 MPMediaItem 如果返回本地 url,则可以播放声音。 如果音乐没有下载到本地,则assetURL为空。 如何在本地下载 MPMedi
有什么方法可以检测是否正在播放 iPod 应用以外的其他来源的音乐或媒体? 我知道我可以检测到从 ipod 播放的音乐: [[MPMusicPlayerController iPodMusicPlay
我刚刚安装了 music21,我正在尝试开始使用它。我安装了 Musescore3,但我无法使 show() 函数工作。 我试过按照我在网上找到的一些说明更改路径,但无济于事 from music21
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
我目前正在寻找某种方式来扩展SFML.Net以使用MP3。因此,ioctllr推荐了NLayer,我想尝试一下。这是我的方法: namespace AudioCuesheetEditor.AudioB
我包含了正确的库和所有内容,这部分代码由于某种原因给出了段错误: int numerator = atoi(&fraction[0]); int denominator = atoi(&fracti
是否可以播放 AVPLayer 实例(带有视频)并同时使用 MPMusicPlayerController 实例来播放 iTunes 播放列表? 我尝试了几种解决方案,但每次播放视频时音频都会停止,每
我是一名优秀的程序员,十分优秀!