
Dear list, the Show class is extremely useful for exploring Haskell in a terminal, but sometimes, I just want something fancier. For instance, I'm currently dabbling with sound generation and it is only natural that I want to hear the sound instead of seeing a textual representation. Another example would be graphics, that are simply drawn on screen whenever you evaluate their value. Of course, this is simple to implement with a class class Demonstrable a where demo :: a -> IO () instance Demonstrable Sound where demo = play instance Demonstrable Sound where demo = draw instance Demonstrable GUI where demo = run etc. However, I don't want to reinvent the wheel, small as it may be, hence my question: is there a package on hackage that already defines a class similar to Demonstrable ? Or any other projects in this direction, like, say, a fancy REPL built on wxHaskell? Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

Does this mean we're going to see music FRP examples soon?!
amindfv / Tom
On Feb 9, 2012 2:17 PM, "Heinrich Apfelmus"
Dear list,
the Show class is extremely useful for exploring Haskell in a terminal, but sometimes, I just want something fancier. For instance, I'm currently dabbling with sound generation and it is only natural that I want to hear the sound instead of seeing a textual representation. Another example would be graphics, that are simply drawn on screen whenever you evaluate their value.
Of course, this is simple to implement with a class
class Demonstrable a where demo :: a -> IO ()
instance Demonstrable Sound where demo = play instance Demonstrable Sound where demo = draw instance Demonstrable GUI where demo = run etc.
However, I don't want to reinvent the wheel, small as it may be, hence my question: is there a package on hackage that already defines a class similar to Demonstrable ? Or any other projects in this direction, like, say, a fancy REPL built on wxHaskell?
Best regards, Heinrich Apfelmus
-- http://apfelmus.nfshost.com
______________________________**_________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/**mailman/listinfo/haskell-cafehttp://www.haskell.org/mailman/listinfo/haskell-cafe

Tom Murphy wrote:
Heinrich Apfelmus wrote:
For instance, I'm currently dabbling with sound generation and it is only natural that I want to hear the sound instead of seeing a textual representation.
Does this mean we're going to see music FRP examples soon?!
I'm not so sure about the "soon" part, but yes, using FRP to make music is part of the plan. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

On Thu, Feb 9, 2012 at 3:04 PM, Heinrich Apfelmus wrote: I'm not so sure about the "soon" part, but yes, using FRP to make music is
part of the plan. you know, i've been thinking about this recently, and while i need more
haskell skillz if i want to do some sound synthesis, i think it would be
really spiffy to work on something like that! are you working on this
privately or do you have a public repo one can clone? a fully-haskell
sound synth program would be really spiffy!! (esp if one could code new
synths in real-time in haskell....)
hex
--
* my blog is cooler than yours: http://serialhex.github.com
* The wise man said: "Never argue with an idiot. They bring you down to
their level and beat you with experience."
* As a programmer, it is your job to put yourself out of business. What
you do today can be automated tomorrow. ~Doug McIlroy
No snowflake in an avalanche ever feels responsible.
---
CFO: “What happens if we train people and they leave?”
CTO: “What if we don’t and they stay?”

serialhex wrote:
Heinrich Apfelmus wrote:
I'm not so sure about the "soon" part, but yes, using FRP to make music is part of the plan.
you know, i've been thinking about this recently, and while i need more haskell skillz if i want to do some sound synthesis, i think it would be really spiffy to work on something like that! are you working on this privately or do you have a public repo one can clone? a fully-haskell sound synth program would be really spiffy!! (esp if one could code new synths in real-time in haskell....)
Folks have been doing sound synthesis in Haskell for a long time; in particular, I'm currently building on Rohan Drape's bindings to SuperCollider http://slavepianos.org/rd/ut/hsc3-texts/hsc3-tutorial.html There's also Henning Thielemann who managed to do real-time audio editing in Haskell by performing run-time compilation with LLVM http://hackage.haskell.org/package/synthesizer Still, I think there's a need (I certainly have it) for a simple-to-use package that makes it really easy to play with sound synthesis in Haskell, i.e. that supports instant gratification. I'm currently working on a project called 'tomato-rubato' that aims to do precisely that. I'll put up a github repo once I have something that is glued together by duct tape rather than spit. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com
participants (3)
-
Heinrich Apfelmus
-
serialhex
-
Tom Murphy