Main > Software Forum
LED Animation Editor - question for all the LED-Wiz Devs...
arzoo:
--- Quote from: headkaze on July 21, 2007, 03:32:19 pm ---Obviously the way to deal with xml is to read the entire file into some nice OO class then write it out again when the user saves the animation. I don't think you should ever be reading and writing to an xml file directly, that is what RAM is for, you have an array of frames in memory and the user can alter them using the editor whilst they are in memory.
I don't agree with much of what Youki says about xml, I think it's a great format and I don't think the speed or size issues warrant any care. These are insignificant amounts here unless were talking files larger than 1 gig.
--- End quote ---
The data is read into memory - regardless of the file format.
headkaze:
--- Quote from: arzoo on July 21, 2007, 09:18:23 pm ---
--- Quote from: headkaze on July 21, 2007, 03:32:19 pm ---Obviously the way to deal with xml is to read the entire file into some nice OO class then write it out again when the user saves the animation. I don't think you should ever be reading and writing to an xml file directly, that is what RAM is for, you have an array of frames in memory and the user can alter them using the editor whilst they are in memory.
I don't agree with much of what Youki says about xml, I think it's a great format and I don't think the speed or size issues warrant any care. These are insignificant amounts here unless were talking files larger than 1 gig.
--- End quote ---
The data is read into memory - regardless of the file format.
--- End quote ---
I'm sure you understood the concept, it's just when you called xml a "random access readable data format" that put me off. It's not. You read it sequentially. In fact in my example you don't really need the frame number since you just read the file in the order the frames appear in the file and write them back again in the frame order.
loadman:
--- Quote from: headkaze on July 22, 2007, 12:44:29 am ---
--- Quote from: arzoo on July 21, 2007, 09:18:23 pm ---
--- Quote from: headkaze on July 21, 2007, 03:32:19 pm ---Obviously the way to deal with xml is to read the entire file into some nice OO class then write it out again when the user saves the animation. I don't think you should ever be reading and writing to an xml file directly, that is what RAM is for, you have an array of frames in memory and the user can alter them using the editor whilst they are in memory.
I don't agree with much of what Youki says about xml, I think it's a great format and I don't think the speed or size issues warrant any care. These are insignificant amounts here unless were talking files larger than 1 gig.
--- End quote ---
The data is read into memory - regardless of the file format.
--- End quote ---
I'm sure you understood the concept, it's just when you called xml a "random access readable data format" that put me off. It's not. You read it sequentially. In fact in my example you don't really need the frame number since you just read the file in the order the frames appear in the file and write them back again in the frame order.
--- End quote ---
I like the frame number ;D
It means anyone could manually make adjustments with notepad :laugh2:
second thought maybe its not such a good idea. If you quickly wanted to extend a animation you could cut and paste a section using notepad or whatever and randomly copy it into places...
headkaze:
--- Quote from: loadman on July 22, 2007, 04:05:37 am ---
--- Quote from: headkaze on July 22, 2007, 12:44:29 am ---
--- Quote from: arzoo on July 21, 2007, 09:18:23 pm ---
--- Quote from: headkaze on July 21, 2007, 03:32:19 pm ---Obviously the way to deal with xml is to read the entire file into some nice OO class then write it out again when the user saves the animation. I don't think you should ever be reading and writing to an xml file directly, that is what RAM is for, you have an array of frames in memory and the user can alter them using the editor whilst they are in memory.
I don't agree with much of what Youki says about xml, I think it's a great format and I don't think the speed or size issues warrant any care. These are insignificant amounts here unless were talking files larger than 1 gig.
--- End quote ---
The data is read into memory - regardless of the file format.
--- End quote ---
I'm sure you understood the concept, it's just when you called xml a "random access readable data format" that put me off. It's not. You read it sequentially. In fact in my example you don't really need the frame number since you just read the file in the order the frames appear in the file and write them back again in the frame order.
--- End quote ---
I like the frame number ;D
It means anyone could manually make adjustments with notepad :laugh2:
second thought maybe its not such a good idea. If you quickly wanted to extend a animation you could cut and paste a section using notepad or whatever and randomly copy it into places...
--- End quote ---
It's actually easier without frame numbers, if you know they are in frame order, like you say you could just cut and paste frames in notepad into any order you wanted.
arzoo:
--- Quote from: headkaze on July 22, 2007, 12:44:29 am ---I'm sure you understood the concept, it's just when you called xml a "random access readable data format" that put me off. It's not. You read it sequentially. In fact in my example you don't really need the frame number since you just read the file in the order the frames appear in the file and write them back again in the frame order.
--- End quote ---
There's no reason this thread should put anyone off - sorry if I did. XML provides for random access, a flat file such as the current LWA format does not. I'm totally fine with using xml for the animation files.
So let's finalize the schema. I agree - there's no need for the frame number. If anything, it could confuse things. I'd like to add a command which allows a group of frames to be repeated. And Youki has a FAD (fade) command. Maybe we need a FrameType value.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version