Jump to content

Read .chn


Div

Recommended Posts

Hi,

I want to write a script able to read the data in a chn file, exported from a Dynamic CHOP, in order to import the data and use it in xsi... But I don't know how to do this, i mean i wrote in the past few scripts to export data ( i know it's easier ;- ) but never to import data... How can i do this ?? Which is the easier language, between vbs, javascript or python, to code this... Which one have the best tools to read a file and extract the variables ???

Thanks

Link to comment
Share on other sites

If someone could explain me the values (for tx) found in the chn format :

segment { length = 0.0399999991059303 value = 3.10962414741516 3.2357189655304 accel = 0.0133333 0.0133333 expr = cubic() }

I don't know why there is 2 value, for both value and accel parameter...

Edited by Div
Link to comment
Share on other sites

check out the help for chkey

chkey [-f frame] [-t time] [-v lvalue] [-m lslope] [-a laccel] [-V rvalue] [-M rslope] [-A raccel] [-T tielist] [-F function] channel_patterns

Options

-v lvalue

The value entering the key.

-m lslope

The slope entering the key.

-a laccel

The acceleration entering the key.

-V lvalue

The value leaving the key.

-M lslope

The slope leaving the key.

-A raccel

The acceleration leaving the key.

-T tielist

Ties the options specified in the tielist, which is a list of characters ("amvAMV") correspoding to the accel, slope, and value in and out options. Both the right and left settings will be locked together.

-F function

The expression function for the segment following the key.

Link to comment
Share on other sites

I will check, thanks

You might find it easier to deal with if you read a .chn into a File CHOP and write out a .chan format with all the columns you need. Many packages are able to read columns of baked data pretty easily so this might be the route of least resistance perhaps?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...