Dmaxer
08-26-2005, 05:47 PM
I’m trying to read in data from a text file
If I have the data in the format below with just “On” it works fine
46080 On ch=1 n=65 v=0
46080 On ch=1 n=65 v=100
61440 On ch=1 n=65 v=0
But I now need the change my code so it will read this format
15360 Off ch=1 n=65 v=0
15360 On ch=1 n=65 v=100
30720 Off ch=1 n=65 v=0
30720 On ch=1 n=65 v=100
Heres part of the code Im using
QTime = readValue dpFileStream -- Time = ticks
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
note = readValue dpFileStream -- Note value
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
notevol = readValue dpFileStream -- note volume value
before I was just using the last value for on off info but now I need to know
if there’s a On or Off in the line
Can this be done , if so can someone help me out Please
Thanks for Reading
If I have the data in the format below with just “On” it works fine
46080 On ch=1 n=65 v=0
46080 On ch=1 n=65 v=100
61440 On ch=1 n=65 v=0
But I now need the change my code so it will read this format
15360 Off ch=1 n=65 v=0
15360 On ch=1 n=65 v=100
30720 Off ch=1 n=65 v=0
30720 On ch=1 n=65 v=100
Heres part of the code Im using
QTime = readValue dpFileStream -- Time = ticks
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
note = readValue dpFileStream -- Note value
nop = readChars dpFileStream 1 -- dont use this data
nop = readChars dpFileStream 1 -- dont use this data
notevol = readValue dpFileStream -- note volume value
before I was just using the last value for on off info but now I need to know
if there’s a On or Off in the line
Can this be done , if so can someone help me out Please
Thanks for Reading
