PDA

View Full Version : reading data from a text file , can it be done ?


Dmaxer
04-28-2011, 08:27 PM
A few years back I wrote a small dos program that reads a wave file and passes the data to a fft algorithm it then outputs that data to a text file (see below). I then wrote a small plugin using Max Script to read this data to animate a set of objects in 3d studio max.

so I would like to use this same program to do the same sort of thing in nukex .

so can I get nukex to read data from a text file and set a load of keyframes ?

Thanks for reading guys



output from fft dos program

1 7 4 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 9 5 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 10 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 21 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 13 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

alexx
04-29-2011, 03:37 PM
sure, just fire up some few lines in python and there you are.

cheers

alex

Dmaxer
04-29-2011, 05:14 PM
Thanks for the reply alexx looks like I need to read up on python then :)

alexx
05-05-2011, 11:06 AM
so you perfectly got my intention :)

and since python is something like a standard in the industry i guess its a good idea anyway for someone capable to program.

cheers

alex

Dmaxer
05-05-2011, 06:13 PM
I may well look into python anywqay but I worked out today that you can just read the data from the text file without having to progrm anything :)
I just used the "import file time+value ascii"

CGTalk Moderation
05-05-2011, 06:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.