Skip to content

A software synth programmed in Haskell. Partially a learning exercise in Haskell.

License

Notifications You must be signed in to change notification settings

orblivion/Haskell-Synth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d583961 · Mar 21, 2023

History

81 Commits
Mar 21, 2023
Apr 9, 2016
Apr 9, 2016
Apr 9, 2016
Apr 9, 2016
Apr 9, 2016
Mar 21, 2023
Apr 9, 2016
Apr 9, 2016
Apr 9, 2016
Apr 9, 2016
Jul 3, 2016

Repository files navigation

This is a synth in Haskell. It's still rather limited in feature, at this point it's just a fun project.

To get it working on Ubuntu Wily:

sudo apt-get install ghc6 c2hs cabal-install libpulse-dev libsndfile1-dev

c2hs ought to be gotten via cabal, but it didn't work with the stack snapshot I used. If somebody knows why I'd be happy to put it in my cabal package setup instead.

Then the usual for building:

cabal sandbox init
cabal install --dependencies-only
cabal build

As of now (unless I forgot to upgrade this README) the sound it outputs is hard coded. So, just run it, and you'll hear something, or it will generate a file.

Run it with default options. It should pause for a couple seconds, and then you should hear some sort of sound. Hopefully nothing to offensive to your ears, I make no promises though! (turn down your speakers)

dist/build/HaskellSynth/HaskellSynth

Try it in "realtime" mode. This one buffers the sound into small chunks, instead of the whole sound at once. This is of course a requirement it's set to output a sound that doesn't have a finite length. But, it may be choppy depending on how complicated the sound is, and how fast your computer is:

dist/build/HaskellSynth/HaskellSynth --realtime

Output the sound to a file:

dist/build/HaskellSynth/HaskellSynth outputfile.wav

Let me know if it doesn't work and I'll add the step I forgot!

Example Output:

I made various sounds over the course of making this. I lost track of what sound went with what version of this codebase. I don't think any of these correspond to the latest version of the code. I'm just going to post these here for posterity.

Warning, these might be a little loud.

About

A software synth programmed in Haskell. Partially a learning exercise in Haskell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published