Have you seen the Haskell School of Expression book by Paul Hudak?   <br><br>The book is available on line, Ch 9 and 10 talks about music.<br><br><a href="http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf">http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf</a><br>
<br>Daryoush<br><br><br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap <span dir="ltr">&lt;<a href="mailto:ck_kashyap@yahoo.com">ck_kashyap@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Thanks Don,<br><br>I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation.<br>
<br>The DSL I want to start with is a music generation DSL ... It should generate a wave file<br>with music data as input -&gt; for example the input could contain<br>C3 D3 E3 ... -&gt; should output a wave file with those notes ... some kind of mnemonics for tempo will also be there.<br>
Later I&#39;d like to incorporate parallel sequence generation -&gt; where I could get chord effect etc ...<br>I had done a rudimentary implementation in C a while back -&gt; <br><span><a href="http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html" target="_blank">http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html</a></span><br>
<br>I&#39;d appreciate
 it very much if you could give me some pointers on getting started.<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Regards,<br><font color="#888888">Kashyap<br></font><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">
<div class="hm"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Don Stewart &lt;<a href="mailto:dons@galois.com" target="_blank">dons@galois.com</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> CK Kashyap &lt;<a href="mailto:ck_kashyap@yahoo.com" target="_blank">ck_kashyap@yahoo.com</a>&gt;<br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a><br><b><span style="font-weight: bold;">Sent:</span></b> Mon, November 16, 2009 12:57:54 AM<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Haskell-cafe] DSL in Haskell<br></font></div><div class="im"><br>
ck_kashyap:<br>&gt; Hi All,<br>&gt; I was reading a Ruby book and in that it was mentioned that its capability to<br>&gt; dynamically query and modify classes makes it suitable for implementing DSL&#39;s<br>&gt; ... I am referring to Ruby&#39;s reflection and methods like &quot;method_missing&quot; here.<br>
&gt; It can allow things like not having to define constants for all possible<br>&gt; unicode code points etc...For example, first use of U0123 could bring such a<br>&gt; constant definition into existence etc<br>&gt; <br>
&gt; I see multiple search hits when I look for Haskell and DSL - can someone please<br>&gt; point me to a good primer or explain to me how equivalent of above mentioned<br>&gt; features in Ruby can be done in Haskell ... or the Haskell alternative for it.<br>
<br>The Haskell equivalent would be overloading, primarily via type classes.<br><br>See Lennart Augusston&#39;s BASIC for an example of this in the extreme:<br><br><span>    <a href="http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html" target="_blank">http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html</a></span><br>
<br>That&#39;s BASIC syntax, in Haskell, relying on overloading numbers, strings<br>etc. And all statically typed.<br><br>For a survey of some of the more recent EDSLs in Haskell, see this brief<br>overview,<br><br><span>    <a href="http://www.galois.com/%7Edons/papers/stewart-2009-edsls.pdf" target="_blank">http://www.galois.com/~dons/papers/stewart-2009-edsls.pdf</a></span><br>
<br>-- Don<br></div></div></div>

</div><br>

      </div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br><br>