Re: [Csnd] fout

The idea of naming the files generated with fout with the real date and time is simple but great at the same time!
I will study this code well.
Thanks John!

Enrico

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

yes i use this all the time for internal recording via fout. it is nice to use a UDO for it:

opcode GenDate, S, 0
  itim date
  Stim dates itim
  Syear strsub Stim, 20, 24
  Smonth strsub Stim, 4, 7
  Sday strsub Stim, 8, 10
  iday strtod Sday
  Shor strsub Stim, 11, 13
  Smin strsub Stim, 14, 16
  Ssec strsub Stim, 17, 19
  S_outfile sprintf "%s%s%02d__%s_%s_%s.wav", Syear, Smonth, iday, Shor,Smin, Ssec
  xout S_outfile
endop

and then in the code you can simply write:
fout GenDate(), ...

  j