Page  237 ï~~A LANGUAGE FOR C( Dan Hitt Computer Science Stanford University Stanford. California 94309 USA ABSTRACT This is a report on our resear composition. We are writing for users, impler tors of languages for musical purposes. Our and discussions of language features may be work. We outline some of our goals, and a Introduction. Our motivation in designing L certain compositional tasks in a way that is most that L will complement some of the interesting, exi Common Music [T;, etc. (just as TEX and PostSc designers of future languages can perhaps get some Goals Overall. Our overall goal, of which I for more than lust a signal nrocessor which gener

Page  238 ï~~means that our data structures should be as devicefrom midifile output to some other form should just the one in statement ( 21) below!eetm g goal Kvii some of the chores of Lisp; the sample session below Goal (i) is met by the recursive nature of fragrr possibility of eiaboratzon and abstraction: the resourc further structure if desired. As to goal (iv), analysis C y% the right means of transforming structures s be supplied to create or modify a structure. that c This, f show how common cores of data are expressed in di A Session with L. L is based on one primit functions for manipulating them. We illustrate thei by calling up Lisp. and then loading L Assurmngt are in a file with name "L", this would be done by t (load '1) Here, c:>)) is the prompt from Lisp. The primitive c to what is called a note in some languages. It has tude, formal duration, duration, timbre, and effects parameters are hung). The first five of these are g amplitude may have a non-numerical value to indit 7C 7^r1t7 0 -n lc rr 9 1A a A 7 - aa p nA mw a n - A- c^

Page  239 ï~~delta-time 1/16.time 0:timing 4/4 ) Statement (6) sets the context. As Long as the cont govern the actions of L (unless it is overridden). > (create-fragment y moO) which causes mO to hold a representation of Th r_".. 64 If desired, we can modify mO by a command such as (adjust-fragment mO:position 8: durations double ) Positions are counted from 0 at the beginning of a either scheme Sfrag now would hold -MOOOOV pwftw i T

Page  240 ï~~Statement 18 maxes a default file name (which can be is accessed); successive midi-dumps will generate files (commit-to-canvas bin) puts both fragments in our third data-structure; th structure which holds the context stack). The conten admmw a noo op f 0.I I Finally, we write to a file (write-midi-file); before doing At this point, we miay want to quit L software objects we've created. We do this with a cal (archive tmO) Statement (22) saves them to disk (where they can be that there is a distinction between writing the binary an ascii representation of the given objects.