Converting values to analog output

I'll try to be as brief as I can in order to explain what I'm doing and what I want to achieve.
I'm interfacing my Arduino Uno with Pure Data installed on Raspberry Pi by using the Firmata firmware and matching Pd object.
All I want to do is to have an analog input on my patch in order to be able to alter some sound files. So far so good. I've been able to get analog inputs from a two-axis joystick and do whatever I wanted.
For some irrelevant technical reason, I had to switch to a bigger arcade joystick which only triggers buttons on its 4 edges whenever the handle is manipulated. For this reason, I'm thinking of setting a timer that initiates whenever one button is being held. At this point, I want this value to be sent to Pure Data.
Since the Arduino object on PD only deals with analog or digital input, I was wondering whether I could convert the value of the timer into an analog output on the Arduino script.
The question can have a more general frame: Can I convert any values into an analog output with an Arduino script?
I tried to give an overview of what I'm currently doing to take advantage of possible suggestions on how to move on. I hope I made everything clear and I thank you in advance!

When you installed Firmata on the Arduino, you rendered it too stupid to do ANYTHING on it's own. That includes responding in any meaningful way to a timer, since the Arduino can not push data.

was wondering whether I could convert the value of the timer into an analog output

What "value" does the timer have? What analog output would 27 seconds correspond to?

Can PureData read data from PWM pins, in any meaningful way? PWM is the only way to have analog output.

Can I convert any values into an analog output

Yes.

with an Arduino script?

You mean "with the Firmata script", and the answer to that is no.

Even if you could convert the timer's time into an analog output, and PureData could read the PWM pin to get an average voltage, how would that communicate the state of one of the switches?

PaulS:
What "value" does the timer have? What analog output would 27 seconds correspond to?

I would have a timer that counts the milliseconds the button is being held. Can't I map the values into a 0-1023 scale? lets' say 10 secs would be my 1023 output value and anything in between 0 and 10000 ms scaled accordingly. Whatever value greater than 10 secs I wouldn't consider it.

PaulS:
PWM is the only way to have analog output.

What I understand from your answer is that I can't do the thing I was planning to.

Can't I map the values into a 0-1023 scale?

You could. But, then what? Analog pins are input only. The only "variable output" that the Arduino can do it altering the duty cycle of the PWM pins.

What I understand from your answer is that I can't do the thing I was planning to.

Oh, good. I was afraid I might have been too subtle.

Thanks for the reply!
I fixed what I wanted in another way. I simply decided to initiate a metro object on the PD patch whenever one of the buttons of the joystick is pressed. The metro object will trigger a counter which will stop whenever the button is released. This way I accomplished what I was looking for. I just wrote it for the sake of those few people who might be looking for the same thing.

Cheers