| View previous topic :: View next topic |
| Author |
Message |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Tue Aug 11, 2009 2:57 pm Post subject: List Loadfile Help |
|
|
Hi
How do I load a file that contains hex data into a list? The file contains only hex numbers some of which are $00, the list sees this as a NULL termination and I only get a small fragment of the original file.
| Code: | list create,1
list loadfile,1,@env(userprofile)\desktop\pa_04.syx |
The .syx file is a standard way of storing MIDI instrument data and I want my app to use these rather than .txt files.
Thanks
David...
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 11, 2009 3:29 pm Post subject: |
|
|
Can you send an example of one of those files. I am not familiar with this file type.
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Wed Aug 12, 2009 8:28 am Post subject: |
|
|
Here is a typical syx file. You'll need to change the extension from .txt to .syx. If you look at it with a Hex editor you will see its proper format, it doesn't appear right in notebook.
Thanks
David...
| Description: |
|
 Download |
| Filename: |
PAA_04.txt |
| Filesize: |
63.98 KB |
| Downloaded: |
1108 Time(s) |
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Aug 13, 2009 4:18 pm Post subject: |
|
|
Ok first of all these files are not text only files. Actually they have only binary characters in them so you would not be able to read and write them with the VDS List commands and functions. If you are using VDS 5 or older you would use the BINFILE commands and functions. If you are using VDS 6 then you will need to use the new I/O commands and functions to read and write these files. There is a demo that comes with VDS that details how to read and write binary files. Look for a project in your demo folder that is called hexedit. The hexedit project will show you how to read and write binary files.
_________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|