Re: binaryencode question

2020-12-07 Thread jbv via use-livecode
ens a binary file (actually a .wav) file, converts binary data to hex, do some processing on parts of the data, and then saves the result as a new .wav file. I managed to convert the binary data to hex and do the processing, but now I'm stuck trying to convert hex back to binary using the bi

binaryencode question

2020-12-07 Thread jbv via use-livecode
t hex back to binary using the binaryencode function, to get a playable .wav file. Here's the code that works so far : put "/sounds/my.wav" into path open file path for binary read read from file path at 45 for 200 close file path put it into mybin put "

Re: BinaryEncode

2012-01-15 Thread Rick Harrison
Hi Michael, Ok, I'll try to put in that missing step. Thank you for taking a look at the code, and making your suggestion for the correction. Rick On Jan 15, 2012, at 10:39 PM, Michael Kann wrote: > Rick, > > A little more explanation. The numToChar function takes an integer. In your > case

Re: BinaryEncode

2012-01-15 Thread Michael Kann
ck without any warning. Mike on mouseUp put numToChar("01110111") into x put numToChar(119) into y put x && y into fld 1 end mouseUp fld 1 will then contain "_ w" --- On Sun, 1/15/12, Rick Harrison wrote: From: Rick Harrison Subject: BinaryEncode To: &quo

Re: BinaryEncode

2012-01-15 Thread Michael Kann
ouseUp fld 1 will then contain "_ w" --- On Sun, 1/15/12, Rick Harrison wrote: From: Rick Harrison Subject: BinaryEncode To: "How to use LiveCode" Date: Sunday, January 15, 2012, 6:44 PM I was trying some tests with binary numbers. If I put in "w" and c

BinaryEncode

2012-01-15 Thread Rick Harrison
charToNum(tChar) into theNum put baseConvert(theNum,10,2) into tBaseConverted put char -8 to -1 of ("" & tBaseConverted ) into tBaseConverted put tBaseConverted into tConverted end repeat answer "tConverted = " & tConverted