From: Jim Peters (jim_at_uazu.net)
Date: 2002-01-23 09:24:06
John Morrison wrote:
> Before we decide the Stage 1 output format, I'd like to
> see the output protocols for more machines including
> different types of machines.
>
> I agree but whatever format we use it’ll have to take account for all
> machines so maybe time stamps or at least a header containing the sampling
> rate should be added to the DataStream or set up directions.
John, do you think you could quote what other people say using
something that shows up in the plain-text version of your messages ?
As it is, it looks like you're talking to yourself, and the posting is
almost unreadable.
> That is the idea we create a Standard Format for the stream no matter what
> machine is providing the input.
> This way from Stage 2 up can be written no matter what EEG is plugged in,
> :-)
It doesn't have to be so complex. Why not just have standard input
and output functions that can read/write several different formats ?
Whenever a new format comes up, it only has to be coded once.
Also, using a short string to describe a format can be a useful
approach. For instance, this is from the code making up my first
attempt at a pitch-shifter:
<file-format> is a string of characters representing the input file
format. First come (optionally) digits to give the number of bytes
to skip at the front of the file, then a sequence of characters out
of the following set. Each character may be followed by digits to
give a repeat-count for that character:
_ Dummy byte to ignore
u Unsigned byte data value (128 centre)
b Signed byte data value (0 centre)
s Little-endian 2-byte signed value
S Big-endian 2-byte signed value
(e.g. "3_u4" for skip 3, then expect repeating 5-byte sections of 1
dummy byte and 4 unsigned data bytes). If there are several channels
of data, then they are all processed, and are spread across the stereo
width from left to right.
The format-string goes on the command-line, so you can easily adapt to
whatever different format comes along.
Unfortunately, this doesn't fully work on Jim Meissner's files because
there is some sync loss, so we'd need some code to check for sync
bytes and so on. If it gets too complex, it would be much easier to
just code up each different type of format as an option with a name,
rather than try and create a flexible solution.
Jim
-- Jim Peters (_)/=\~/_(_) Uazú (_) /=\ ~/_ (_) jim@ (_) /=\ ~/_ (_) www. uazu.net (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:36 BST