Post by CK KashyapI have not been able to figure out the way to dump the output into a midi file though.
file called "test.mid" in the working directory. However, to do this,
value and then write a .mid file. Unfortunately, Codec.Midi seems to have
readable by some programs but not others. If you are on Windows, SynthFont
(free) is usually able to open the files without problems.
Post by CK KashyapWow ... it looks much better now!!!
Thank you so much for your feedback Professor Hudak.
I have not been able to figure out the way to dump the output into a midi file though.
Regards,
Kashyap
------------------------------
*Sent:* Tuesday, March 5, 2013 11:04 AM
*Subject:* RE: [haskell-art] Review request
Hi Kashyap. Glad to see someone using Euterpea! Here are some comments
· Modify (Instrument Percussion) m can be written instrument
Percussion m.
· Similarly, Modify (Phrase [Dyn (Loudness 50)] m can be
written phrase [Dyn (Loudness 50)] m.
· When using a percussion instrument, instead of writing, for
example, gs 3 en, you can write perc PedalHiHat en, which, although
longer, is certainly more readable.
· line [] is the same as rest 0.
· There is a function timesM in Euterpea, so base n can be
eliminated, and you can just write timesM n base .
takeM (2*n) (repeatM (gs 3 en))
· I also wonder if you can take advantage of infinite music
values in Euterpea. There is a parallel composition operator (/:=) that
gives a result with duration equal to the shortest of its two arguments.
rest en :+: e 3 en :+: rest en))
<something similar for base>
music = (bnr :+: rhythm) /=: (rest 4 :+: t1 :+: t2) /=: base
I havent tested any of this, but I hope its helpful.
Best wishes, -Paul
Paul Hudak
Professor of Computer Science
Yale University, PO Box 208285
New Haven, CT 06520-8285, 203-432-1235
*Sent:* Monday, March 04, 2013 7:18 AM
*Subject:* [haskell-art] Review request
Hi,
I tried my hands at composition using Euterpea. It can be found here -
https://github.com/ckkashyap/LearningPrograms/blob/master/Haskell/haskore/drums.hs
I'd appreciate it very much if I get some feedback around the level of
abstraction that I am using.
Also, I have a quick question on how I could emit a midi file. I am using windows.
Regards,
Kashyap