Re: Re: Music to Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg47231] Re: Re: Music to Mathematica*From*: "Steve Luttrell" <steve1 at _removemefirst_luttrell.org.uk>*Date*: Wed, 31 Mar 2004 02:59:04 -0500 (EST)*References*: <c4bdh5$6sg$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Why is my ABC suggestion not a solution to your problem? It doesn't involve writing notes in classical notation on paper. Granted, it is a bit roundabout, and it will involve some programming work on your part to decode the ABC format using Mathematica, but it should work. Here is what the ABC format file looks like for "Harvest Home" (a traditional tune). I imported (into TablEdit ) a MIDI file that I happened to have, then exported it in ABC format. X:1 T:Harvest Home C: L:1/8 Q:300 M:2/2 K:D "Traditional"afda fada | fad'e' f'e'd'c' | bae'a f'ag'a | f'a(3e'f'e' (3d'c'b(3aba | \ (3gfeda fada | fad'e' f'e'd'c' | bae'a f'ag'e' | c'e'd'2 f'2d'2 | afda fada | fad'e' f'e'd'c' | \ bae'a f'ag'a | f'a(3e'f'e' (3d'c'b(3aba | (3gfeda fada | fad'e' f'e'd'c' | bae'a f'ag'e' | \ c'e'd'2 f'2d'2 | \ W:Created with TablEdit http://www.tabledit.com/ The time signature is the "M:2/2", the key signature is the "K:D", and the note data follows the "Traditional" and is truncated at the 16th bar because the unregistered version of TablEdit saves only the first 16 bars. The f'a(3e'f'e' (3d'c'b(3aba uses 3's to indicate triplets, and the d'2 f'2d'2 towards the end of the second line indicates notes of 2 times the basic length, and so on. Alternatively, you could define your own ABC notation to use for directly inputting music to Mathematica. Maybe something like {{M -> {2, 2}, K -> "D"}, {note data goes here}} would do. You would then need to write a bit of code to convert this into pleasing musical sounds. Steve Luttrell <Matthias.Bode at oppenheim.de> wrote in message news:c4bdh5$6sg$1 at smc.vnet.net... > Hello Steve, hello Marc, > > sorry, I wanted to be concise but was imprecise. > > 1. I have music notes (a song) on paper (classical five line system). > > 2. I identify (the key) the note(s) and pauses; e.g. "a" (= 440 Hz). (I can > calculate the frequency for each note.) > > 3. How to input this information into Mathematica in order to make it *play* > the music? > > 4. I do *not* want to write notes in classical notation on paper using > Mathematica. > > 5. I used "Scale" and entered frequencies: Unsatisfactory and clumsy because > a longer note has to be put in several times, speed is a problem as well. > > Best regards, > Matthias Bode. > > > > -----Ursprüngliche Nachricht----- > Von: Steve Luttrell [mailto:steve1 at _removemefirst_luttrell.org.uk] > Gesendet: Sonntag, 28. März 2004 07:08 > An: mathgroup at smc.vnet.net > Betreff: Re: Music to Mathematica > > > You could try creating your music using some notation software, saving it in > ABC format, reading this ABC file using Mathematica, and converting the > input data to your choice of musical objects in Mathematica. > > If you haven't got a notation package that does this then you could try > using TablEdit which is at http://www.tabledit.com/. You can save up to 16 > bars worth in the unregistered version. The ABC format looks to be easily > decodable. > > Steve Luttrell > > <Matthias.Bode at oppenheim.de> wrote in message > news:c437hs$ecj$1 at smc.vnet.net... > > Dear Colleagues, > > > > I try to input music in classical notation (five horizontal lines &c.) > into > > Mathematica. My attempts using "Scale" are very clumsy. Is there an > elegant > > method? > > > > Best regards, > > Matthias Bode > > Sal. Oppenheim jr. & Cie. KGaA > > Koenigsberger Strasse 29 > > D-60487 Frankfurt am Main > > GERMANY > > Tel.: +49(0)69 71 34 53 80 > > Mobile: +49(0)172 6 74 95 77 > > Fax: +49(0)69 71 34 95 380 > > E-mail: matthias.bode at oppenheim.de > > Internet: http://www.oppenheim.de > > >