POV-Ray : Newsgroups : povray.advanced-users : Binary file I/O? Server Time
25 Nov 2024 07:35:51 EST (-0500)
  Binary file I/O? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Andrew Coppin
Subject: Binary file I/O?
Date: 13 Apr 2003 09:08:50
Message: <3e996162@news.povray.org>
Just a quick one... Would it be possible to get POV-Ray to read/write binary
files? (As opposed to plain text?)

I think I remember seeing  character <==> ASCII code conversion functions
somewhere in the docs... POV-Ray doesn't do anything weird to the ASCII
codes you ask it to write does it? (Like LF -> CR/LF conversions and stuff.)

Why am I asking? Well, not content with making a microprocessor emulator
with the SDL, I'm now thinking about making a sound synthesiser, so I want
to be able to write .WAV files (which are of course binary!) I'm planning to
make an animation, and I want POV-Ray to synthesise the soundtrack...

Thanks.
Andrew.

(Inspired by "just a rhythemic doodle" - I can't quote the author's name
because my useless news reader has kindly deleted the thread for me.
[mutters random Micro$oft hate phrases])


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Binary file I/O?
Date: 13 Apr 2003 09:31:41
Message: <3e9966bd@news.povray.org>
Andrew Coppin wrote:
> Why am I asking? Well, not content with making a microprocessor emulator
> with the SDL, I'm now thinking about making a sound synthesiser, so I want
> to be able to write .WAV files (which are of course binary!) I'm planning to
> make an animation, and I want POV-Ray to synthesise the soundtrack...

You're a sick, sick puppy.

On the other hand, if POV could read binary files, you could use it to
make a rendering OF the wav file...

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Andrew Coppin
Subject: Re: Binary file I/O?
Date: 13 Apr 2003 10:00:54
Message: <3e996d96@news.povray.org>
> You're a sick, sick puppy.

Thankyou. I already know that...

> On the other hand, if POV could read binary files, you could use it to
> make a rendering OF the wav file...

Oh, I intend to do that too ;-)

Andrew.


Post a reply to this message

From: Apache
Subject: Re: Binary file I/O?
Date: 13 Apr 2003 17:54:24
Message: <3e99dc90@news.povray.org>
There are those people who manage to write synthesizer-like stuff in flash
(.swf) applets.


Post a reply to this message

From: Thomas Willhalm
Subject: Re: Binary file I/O?
Date: 17 Apr 2003 09:34:01
Message: <3e9ead49@news.povray.org>
Andrew Coppin wrote:

> Just a quick one... Would it be possible to get POV-Ray to read/write
> binary files? (As opposed to plain text?)
> 
> Why am I asking? Well, not content with making a microprocessor emulator
> with the SDL, I'm now thinking about making a sound synthesiser, so I want
> to be able to write .WAV files 

What about using an ASCII sound format. According to the manual, sox
(http://sox.sourceforge.net/) can read and write DAT files, which are
a text representation of audio data. This is perhaps easier than
discussing this binary data subject again.

I hope this helps
Thomas


Post a reply to this message

From: Andrew Coppin
Subject: Re: Binary file I/O?
Date: 17 Apr 2003 10:03:07
Message: <3e9eb41b@news.povray.org>
That's a fine idea... Thanx!

Andrew.


Post a reply to this message

From: nospam
Subject: Re: Binary file I/O?
Date: 17 Apr 2003 23:17:33
Message: <3e9f45a9.10506312@localhost>
On Sun, 13 Apr 2003 09:46:43 +0100, "Andrew Coppin"
<orp### [at] btinternetcom> wrote:

>Just a quick one... Would it be possible to get POV-Ray to read/write binary
>files? (As opposed to plain text?)
>
>I think I remember seeing  character <==> ASCII code conversion functions
>somewhere in the docs... POV-Ray doesn't do anything weird to the ASCII
>codes you ask it to write does it? (Like LF -> CR/LF conversions and stuff.)
>

Have povray write the bianry data as a uuencoded txt file.  Then
run through a separate uudecoder after thr render.

>Why am I asking? Well, not content with making a microprocessor emulator
>with the SDL, I'm now thinking about making a sound synthesiser, so I want
>to be able to write .WAV files (which are of course binary!) I'm planning to
>make an animation, and I want POV-Ray to synthesise the soundtrack...
>
>Thanks.
>Andrew.
>

I want to do this as well.  It's fun to use POV-Ray for completely
non-graphical tasks.  I even wrote a program to auto-generate
game levels in POV-RAy.  :)

It's fun to write .bat files from POV-Ray.  :) :) :)


Post a reply to this message

From: Andrew Coppin
Subject: Re: Binary file I/O?
Date: 21 Apr 2003 16:20:13
Message: <3ea4527d$1@news.povray.org>
> Have povray write the bianry data as a uuencoded txt file.  Then
> run through a separate uudecoder after thr render.

Hey, now that's using your noodle...

> I want to do this as well.  It's fun to use POV-Ray for completely
> non-graphical tasks.  I even wrote a program to auto-generate
> game levels in POV-RAy.  :)
>
> It's fun to write .bat files from POV-Ray.  :) :) :)

Mmm... and I thought I was crazy for writing DOS scripts that write DOS
scripts...

Andrew.


Post a reply to this message

From: Andrew Coppin
Subject: Re: Binary file I/O?
Date: 23 Apr 2003 13:57:50
Message: <3ea6d41e$1@news.povray.org>
> Have povray write the bianry data as a uuencoded txt file.  Then
> run through a separate uudecoder after thr render.

Actually... can anyone name a utility to do the decode? (Someone sent me
some email the other day, but somehow the attachment is now BASE-64 encoded
and the mailler thinks it's normal text, not an encoded attachment. Bloomin
daft thing...) I know various email clients do it as part of showing you
your email, but is there any utility which will do it for arbitary files?

Thanks.
Andrew.

PS. Is uuencode and BASE-64 the same or different?


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Binary file I/O?
Date: 24 Apr 2003 03:51:48
Message: <3ea79794$1@news.povray.org>
In article <3ea6d41e$1@news.povray.org> , "Andrew Coppin" 
<orp### [at] btinternetcom> wrote:

> PS. Is uuencode and BASE-64 the same or different?

Different.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.