https://wiki.haskell.org/api.php?action=feedcontributions&user=Analytic&feedformat=atomHaskellWiki - User contributions [en]2024-03-29T05:09:43ZUser contributionsMediaWiki 1.35.5https://wiki.haskell.org/index.php?title=Haskore&diff=23016Haskore2008-09-20T12:33:59Z<p>Analytic: </p>
<hr />
<div>[http://www.haskell.org/haskore/ Haskore] is a set of Haskell modules for creating, analysing and manipulating music.<br />
Music can be made audible through various back-ends. (See below.)<br />
A more recent, but less stable version, is available as [[Darcs]] repository at http://darcs.haskell.org/haskore/.<br />
<br />
==Features==<br />
<br />
===Example===<br />
<br />
To get an impression how intuitive music composition with Haskore is, see the following example code (runs with revised Haskore):<br />
<haskell><br />
chords =<br />
(c 0 qn () =:= e 0 qn () =:= g 0 qn ()) +:+<br />
(c 0 qn () =:= f 0 qn () =:= a 0 qn ()) +:+<br />
(d 0 qn () =:= g 0 qn () =:= b 0 qn ())<br />
<br />
song =<br />
MidiMusic.fromMelodyNullAttr MidiMusic.AcousticGrandPiano<br />
(Music.transpose (-48) (Music.changeTempo 3 chords))<br />
</haskell><br />
<br />
The <hask>(=:=)</hask> means parallel composition and<br />
<hask>(+:+)</hask> means serial composition of musical objects.<br />
<br />
===Backends===<br />
<br />
Ideally you can compose a song once in Haskore, and then play it by several back-ends.<br />
Practically this is more difficult, since all back-ends have different functionality (otherwise there wouldn't be so many).<br />
<br />
These back-ends are currently supported:<br />
* [[MIDI]] (both file and realtime)<br />
* [[CSound]]<br />
* [[SuperCollider]]<br />
* [[Synthesizer|Audio files]] rendered by pure Haskell code.<br />
<br />
ToDo:<br />
* Notation output (Lilypond, partially done in CAEC, see below).<br />
<br />
==Community==<br />
<br />
There is no Haskore related mailing list, but Haskore related discussion is very welcome at the [[Haskell art]] mailing list.<br />
<br />
==Getting started==<br />
<br />
=== Platforms ===<br />
<br />
The core Haskore can run on both Linux and Windows.<br />
Only various back-ends and real-time functionality are critical.<br />
So far, real-time playback and use of [[SuperCollider]] is only usable on Linux.<br />
<br />
In future Haskore should consist of a small core for music composition, analysis and manipulation<br />
and separate packages for connecting to various back-ends and separated real-time stuff.<br />
The splitting made some progress, but is still not at its end.<br />
<br />
<!--<br />
==== UNIX/Linux ====<br />
<br />
The original Haskore was mainly developed on Windows,<br />
whereas the revised version was developed mainly in Linux.<br />
So least hassle is currently caused on Linux.<br />
<br />
==== Windows ====<br />
<br />
* http://www.haskell.org/pipermail/haskell-cafe/2008-June/043905.html<br />
* http://www.haskell.org/pipermail/haskell-cafe/2008-August/045911.html - Some hacks to get Haskore running on Windows quickly. The right thing to do would be to factor out the real-time stuff, since it is in general hard to port.<br />
--><br />
<br />
=== Installation using cabal ===<br />
<br />
(There are more detailed installation instructions [http://github.com/nfjinjing/haskore-guide/tree/master/doc/install.markdown here], if the following does not work)<br />
<br />
Prerequisites: You should be able to fetch a package using [[Darcs]] and configure/build/install it using [[Cabal/How_to_install_a_Cabal_package|cabal]].<br />
<br />
Step 0. Since it is the most convenient way of installation, try to install as many as possible packages from [[Hackage]] using cabal-install. Not all packages are available on Hackage because of their experimental state.<br />
<br />
cabal install midi # this will also install non-negative, event-list<br />
cabal install data-accessor<br />
cabal install markov-chain<br />
<br />
Step 1. Install the remaining packages such that at the end the following packages are installed:<br />
<br />
non-negative, event-list, data-accessor, markov-chain, midi, haskore<br />
<br />
If cabal-install worked, there should only <code>haskore</code> be left for installation.<br />
<br />
Step 2. Choose a folder where some haskell packages can be stored.<br />
<br />
Step 3. Get the packages. That is, for each PACKAGE call<br />
<br />
darcs get http://darcs.haskell.org/PACKAGE<br />
<br />
Step 4. Build and install the packages that you got by darcs. For each PACKAGE (in the order of above)<br />
<br />
cd PACKAGE<br />
runhaskell Setup.lhs configure (--prefix=/usr/local --user)<br />
runhaskell Setup.lhs build<br />
runhaskell Setup.lhs install<br />
<br />
Step 5. On Linux you may also wish to use SuperCollider.<br />
If you are uncertain, if it is worth the trouble, then listen to the examples given in the [[#Links|Links]] section.<br />
SuperCollider support requires installation of the packages <code>haskore-realtime</code> and <code>haskore-supercollider</code> in the way that is described above.<br />
<br />
Step 6. To get something to listen follow the hints in the [http://darcs.haskell.org/haskore/Readme Readme] file of the <code>haskore</code> package.<br />
<br />
==Projects==<br />
<br />
A lot of projects were initiated that use the Haskore framework or something in the spirit of Haskore.<br />
This page may help to keep an overview of all projects.<br />
All maintainers of Haskore related projects are encouraged to add their project here and keep the references up to date.<br />
<br />
{|<br />
| [http://www.techfak.uni-bielefeld.de/ags/pi/lehre/AuDIWS02/musik/ AuDi] || Peter Steffen || Course material for Algorithms and Data Structures I - A formula language for music ("Algorithmen und Datenstrukturen I - Eine Formelsprache fuer Musik")<br />
|-<br />
| [http://www.mpi-sb.mpg.de/~ratschan/autotrack/ AutoTrack] || Stefan Ratschan || A tool for creating practizing and demo tracks from chord charts. You feed the program with a chord chart, set the desired style (jazz, bossa, etc.), tempo, key etc. and it produces a simple MIDI file containing an according bass and drum track. Includes a lot of examples.<br />
|-<br />
| [http://darcs.haskell.org/haskore/related/etude/ CAEC] || Matt Munz || Computer-Aided Etude Composition in Haskell<br />
|-<br />
| [http://darcs.haskell.org/haskore/ Design experiments] || Henning Thielemann || Test of several changes of Haskore's design targetting at more flexibility and consistency<br />
|-<br />
| [http://www.netsoc.tcd.ie/~bermo/4ba3/report.pdf Emile] || Adam Bermingham || Eight-Bar Melody Generation in Haskell. Automatic composition based on two initial bars<br />
|-<br />
| [http://www.imn.htwk-leipzig.de/~waldmann/ Gore] || Johannes Waldmann || Convert a melody description in a string into the Haskore Music data structure. Thus simple melodies can be written much more condensed.<br />
|-<br />
| [http://meltin.net/hacks/haskell/ HasChorus] || Martin Schwenke || A set of Haskell modules written on top of Haskore to make it easier to sequence simple, repetitive music<br />
|-<br />
| [http://www.idiap.ch/~paiement/ Jazkore] || Jean-François Paiement || A model of melodic jazz improvisation in functional programming<br />
|-<br />
| Lilypond back-end || Jeffrey R. Lewis || A back-end for Haskore to produce Lilypond notation files.<br />
|-<br />
| [http://www.haskell.org/pipermail/haskell-cafe/2006-September/018144.html Microtonal music] || Magnus Jonsson || This is not Haskore related, though integration into Haskore would be nice<br />
|-<br />
| [http://haskell.cs.yale.edu/yale/papers/polymedia/hudak-RR-1259.pdf Polymorphic Temporal Media] || Paul Hudak || An Algebraic Theory of Polymorphic Temporal Media - A generalization of Haskore Music and MDL as well as Fran and FAL animation<br />
|-<br />
| [http://www.cafepress.com/haskore.13482964 T-shirt] || Fritz Ruehr || Haskore T-Shirt featuring the 8 laws of polymorphic temporal media<br />
|}<br />
<br />
== Papers ==<br />
<br />
* Paul Hudak: [http://haskell.cs.yale.edu/yale/papers/polymedia/hudak-RR-1259.pdf An Algebraic Theory of Polymorphic Temporal Media - A generalization of Haskore Music and MDL as well as Fran and FAL animation]<br />
* Henning Thielemann: [http://dafx04.na.infn.it/WebProc/Proc/P_201.pdf Audio Processing using Haskell]<br />
<br />
== Links ==<br />
* [http://github.com/nfjinjing/haskore-guide/tree/master/doc/index.markdown A dummy's guide to Haskore (GIT repository)]<br />
* [http://en.wikipedia.org/wiki/Haskore Wikipedia entry about Haskore]<br />
* [http://users.informatik.uni-halle.de/~thielema/Music/HAL2/ Various Haskore examples for CSound, MIDI, SuperCollider and Haskell-Synthesizer] presented on [http://www.iba-cg.de/haskell.html HAL2] by Henning Thielemann, also see the [http://video.google.de/videoplay?docid=-6594267962912965757&q=hal2+july+2007&total=7&start=0&num=50&so=0&type=search&plindex=3 video of the talk (German)]<br />
<br />
<br />
[[Category:Music]]<br />
[[Category:Packages]]</div>Analytic