MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Printing to file using >>> "file" & control structures

  • To: mathgroup at
  • Subject: [mg430] Printing to file using >>> "file" & control structures
  • From: clefort at (Clinton R Lefort)
  • Date: Wed, 25 Jan 1995 14:39:27 -0600


I am currently writing a routine that is connecting Macintosh Common Lisp with Mathematica , and using the data in Mathematica to generate a score file for use in Csound, a music synthesis program,developedat MIT.

I am having difficulty havng Mathematica print theresults in Tableformatted form to another file...this is my algorithm...

Inst[x_] := x+1 
Start[x_] :=  x 
Dur[x_] := x * .314 
Amp[x_] := If[x>44000, x/2,x*.314]
Freq[x_] := x * .314

OutputFormTableForm[{{Inst[0],Start[0], Dur[1],Amp[200],Freq[1000]},
		   {Inst[1],Start[1], Dur[3],Amp[400],Freq[4000]},
		   {Inst[4],Start[4], Dur[5],Amp[600],Freq[7000]},
		   {Inst[3],Start[3], Dur[7],Amp[800],Freq[4000]},
 TableHeadings ->{Automatic,{"I","S","D","A","F"}}]  

I would also like to have this algorithmgeneratea control loop in which at the end of each # of iterations it would print  to another file, start overagain, iterate a certain number of times and themn append to the previous file ...
isthis kind of control structure possible in MAthematica..any ideas will be appreciated...



  • Prev by Date: Re: control the messages
  • Next by Date: Re: Shortening Polynomials
  • Previous by thread: Re: control the messages
  • Next by thread: Inequalities