Forums > MaxMSP

How to get the time tags out of an SDIF file in Max

February 1, 2007 | 5:17 am

Does anyone know how to get the time tags from each frame in an SDIF file into max as a set of numbers?

Each frame in a SDIF file has a time tag, which is a numerical value indicating the time location of that frame. I need to find a way to get these numerical values, for a patcher i’m working on (see this thread for a description of the patcher, if you’re interested: http://www.cycling74.com/forums/index.php?t=msg&th=24211&start=0&rid=4977&S=45b8c13f6614f1bd9802dd840e618351 )

None of the CNMAT objects seem to be able to do this. All that is really required is to access one number in each frame in a SDIF file. It should be simple enough, but I don’t have the C programming knowledge to write a program to do this.

Can anyone help?

(sorry for double posting, but I thought that this thread title may generate more responses)


February 1, 2007 | 5:53 am

Quote: maxplanck735@hotmail.com wrote on Wed, 31 January 2007 21:17
—————————————————-
> Does anyone know how to get the time tags from each frame in an SDIF file into max as a set of numbers?
>

You could use spew-sdif in the command line, and then put the resulting text in a coll.

http://www.cnmat.berkeley.edu/SDIF/alpha/

You could do something similar by running through SDIF-tuples and associating the output with the input time that generated. SDIF-tuples does not interpolate, by default, so you’ll only get "real" frame data.

I suspect there’s a solution with FTM, but I don’t have it at the tip of my fingers.

As far as I know, 1TRC SDIF frames don’t have anything like a "frame index number". So, SDIF-tuples can ask for the frame at "time 1.23", but not the 100th frame in the file.

Looking at the first few frames by sending the print command to SDIF-buffer gives you an idea of the time granularity you’re dealing with. Think about using the count output of Uzi * 0.01 to dump out all the frames, which you then pack with the proper time. (Sorry, I don’t have my Max computer. I hope my idea is clear.)

I’d love to see what you come up with.

mz


February 1, 2007 | 2:26 pm

Thanks for this info. I’m trying to get the exact time tags, for a good
reason that’s not worth going into now (explained in this thread if anyone
really wants to know why:
http://www.cycling74.com/forums/index.php?t=msg&th=24211&start=0&rid=4977&S=45b8c13f6614f1bd9802dd840e618351 )

I just spent the evening reading the FTM docs posted on the ircam website,
and playing with the FTM objects and their help files. If I use ftm.object
and type "track fmat" in the box, then send the text "import" from a
ftm.mess object to the track ftm.object and select a SDIF file from the menu
that pops up, then double click on the track ftm.object, then right click on
the display that pops up and select "View as list", the time tag values are
all listed here. However, I can’t seem to figure out how to get these
values out of the track ftm.object and into Max as a set of numbers. I
could copy by hand from the list, but I’m looking to automate the process…

Anyone know how to do this, or a better way to get an SDIF file’s time tags
into Max as a set of numbers?

—– Original Message —–
From: "mzed"
To:
Sent: Wednesday, January 31, 2007 11:53 PM
Subject: [maxmsp] Re: How to get the time tags out of an SDIF file in Max

>
> Quote: maxplanck735@hotmail.com wrote on Wed, 31 January 2007 21:17
> —————————————————-
>> Does anyone know how to get the time tags from each frame in an SDIF file
>> into max as a set of numbers?
>>
>
> You could use spew-sdif in the command line, and then put the resulting
> text in a coll.
>
> http://www.cnmat.berkeley.edu/SDIF/alpha/
>
> You could do something similar by running through SDIF-tuples and
> associating the output with the input time that generated. SDIF-tuples
> does not interpolate, by default, so you’ll only get "real" frame data.
>
> I suspect there’s a solution with FTM, but I don’t have it at the tip of
> my fingers.
>
> As far as I know, 1TRC SDIF frames don’t have anything like a "frame index
> number". So, SDIF-tuples can ask for the frame at "time 1.23", but not
> the 100th frame in the file.
>
> Looking at the first few frames by sending the print command to
> SDIF-buffer gives you an idea of the time granularity you’re dealing with.
> Think about using the count output of Uzi * 0.01 to dump out all the
> frames, which you then pack with the proper time. (Sorry, I don’t have my
> Max computer. I hope my idea is clear.)
>
> I’d love to see what you come up with.
>
> mz
>
> –
> || michael f. zbyszynski — molecular gastronimist
> || mzed@cnmat.berkeley.edu — +1.510.643.9990×314
> || http://www.cnmat.berkeley.edu/
> || http://www.mikezed.com/
>
>
>


February 15, 2007 | 2:41 pm

Erik Bowen wrote:
> Thanks for this info. I’m trying to get the exact time tags, for a good
> reason that’s not worth going into now (explained in this thread if
> anyone really wants to know why:
> http://www.cycling74.com/forums/index.php?t=msg&th=24211&start=0&rid=4977&S=45b8c13f6614f1bd9802dd840e618351
> )
>
> I just spent the evening reading the FTM docs posted on the ircam
> website, and playing with the FTM objects and their help files. If I
> use ftm.object and type "track fmat" in the box, then send the text
> "import" from a ftm.mess object to the track ftm.object and select a
> SDIF file from the menu that pops up, then double click on the track
> ftm.object, then right click on the display that pops up and select
> "View as list", the time tag values are all listed here. However, I
> can’t seem to figure out how to get these values out of the track
> ftm.object and into Max as a set of numbers. I could copy by hand from
> the list, but I’m looking to automate the process…

You could have read through the main ftm help patch to find:

[ftm.iter]

send it your track object and the time-indices come out the right outlet.

> Anyone know how to do this, or a better way to get an SDIF file’s time
> tags into Max as a set of numbers?
>
>
> —– Original Message —– From: "mzed"
> To:
> Sent: Wednesday, January 31, 2007 11:53 PM
> Subject: [maxmsp] Re: How to get the time tags out of an SDIF file in Max
>
>
>>
>> Quote: maxplanck735@hotmail.com wrote on Wed, 31 January 2007 21:17
>> —————————————————-
>>> Does anyone know how to get the time tags from each frame in an SDIF
>>> file into max as a set of numbers?
>>>
>>
>> You could use spew-sdif in the command line, and then put the
>> resulting text in a coll.
>>
>> http://www.cnmat.berkeley.edu/SDIF/alpha/
>>
>> You could do something similar by running through SDIF-tuples and
>> associating the output with the input time that generated.
>> SDIF-tuples does not interpolate, by default, so you’ll only get
>> "real" frame data.
>>
>> I suspect there’s a solution with FTM, but I don’t have it at the tip
>> of my fingers.
>>
>> As far as I know, 1TRC SDIF frames don’t have anything like a "frame
>> index number". So, SDIF-tuples can ask for the frame at "time 1.23",
>> but not the 100th frame in the file.
>>
>> Looking at the first few frames by sending the print command to
>> SDIF-buffer gives you an idea of the time granularity you’re dealing
>> with. Think about using the count output of Uzi * 0.01 to dump out
>> all the frames, which you then pack with the proper time. (Sorry, I
>> don’t have my Max computer. I hope my idea is clear.)
>>
>> I’d love to see what you come up with.
>>
>> mz
>>
>> —
>> || michael f. zbyszynski — molecular gastronimist
>> || mzed@cnmat.berkeley.edu — +1.510.643.9990×314
>> || http://www.cnmat.berkeley.edu/
>> || http://www.mikezed.com/
>>
>>
>>
>
>


…Diemo


Diemo Schwarz, PhD — http://diemo.concatenative.net
Real-Time Music Interaction Team — http://www.ircam.fr/equipes/temps-reel
IRCAM – Centre Pompidou — 1, place Igor-Stravinsky, 75004 Paris, France
Phone +33-1-4478-4879 — Fax +33-1-4478-1540


Viewing 4 posts - 1 through 4 (of 4 total)