[Csnd] access -t value in orchestra at init

How can I access the -t value inside the orchestra at init time?

if I do this:

instr 1
ktempo tempoval
prints "TEMPO %f \n", i(ktempo)
endin

i have 0.0.

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

The value of a k variable may not be meaningful at i-time. Check the manual example.

Prof. Victor Lazzarini
Maynooth University
Ireland

Yes, thank you.
The question is if there is a way to access the -t value inside the orchestra at init time, for exemple if I put "-t 0 135", is there a way to get “135” at init time?

You have to run at least 1 perf cycle. For example you can run the instrument twice and
in the second time, the k-var will hold the value it had when the instrument last run,
so if you print it, it will have the -t value at i-time.

instr 1
k1 tempoval
      print i(k1)
endin

schedule(1,0,1/kr)
schedule(1,1/kr,0)

There’s currently no i-time version of tempoval.