Re: mesh blend

2003-01-08 Thread chnexus
Mike Gralish wrote:
> I'm having a problem with a 3d mesh.
> It's a simple hard-coded mesh that makes a prism shape.
> It shows fine until i set the shader.blend to something besides 100.
> 
> When I set the blend to say 90, It will sometimes show pixelated yellow/red,
> light blue, white, or not at all.  This toggling happens dynamically when in
> the bounding rects of other moving objects.  But it displays poorly even
> when soloing in the world.
> 
> Once it blended beatifully... until I moved another object close to it, then
> the prism went a bright red.   All this with no change in the constructor
> code.  Changing the .visiblity (#both, #front, #back) doesn't seem to effect
> the blend problem.
> Is it mesh magic or am I gorking a parameter somewhere?

Working on a question arised about triangular extrusions in another Director list,
the way I found to get a prism free from magic was to add a fourth point to the
triangular end cap which, after having been extruded, defines the second end cap
as well as the six (+ 2) vertices of the prism (if I'm not wrong, your mesh
constructor is for a prism having triangles for end caps).

BTW the magic I experienced is a bit different from the one you reported. It is
essentially into the end caps that show, don't show, show in part and/or appear as
transparent. I don't think it's a problem of normals. Anyway their aspect is quite
phantasmal. The question is far from being definitely solved, at least for prisms
made up with eight faces. As I said, all problems seem vanish if both the triangular
ends are subdivided into three triangles each. This leads to a prism with 12 faces
and 8 vertices. I tried this type of prism also in a textured version, and it worked
well.

You may wish to give this code a shot. It builds the prism immediately in a new 3D
castmember, in the slot number five. In the case, copy the code below into a
movie script of a new movie internal cast, type buildColoredPrism() in the message
window and hit Enter. You should get a golden prism in the new 3D member that
is created in the slot #5. 

Some things to take into consideration.

- I work with Windows + DirectX. Other types of renderers could produce different 
results.
- If you open the 3D Inspector window (Dir 8.5) and click the button Rotate Camera the 
prism
  will seem rotate in the window and you'll see gray areas melded with the yellow 
rotating
  together with. This may be fuorviating on a first time, though if it's the camera to 
rotate,
  the prism never changes position in respect with the directional light, so the faces 
in
  shadow are ever the same.
- I can't observe a great influence of the shader on the rendering of the model. I 
never used
  one with simple coloured models, according to the example reported in the docs (the 
piramid).
  Though I saw you used one in the snippet of your code and I tried to apply it so as 
it was.
  With the shader I get one bright-white area on the vertex hit by the directional 
light.
  The area disappear commenting out 'meshShader = scene.newshader("mesh shd", 
#standard)',
  but setting meshShader.blend =  0 or = 100 its intensity does not change.

Also, it could be interesting having the missing part of your code to try with it.

-- 
on buildColoredPrism()
  if member(5).type = #shockwave3d then member(5).erase()
  scene = new(#shockwave3D, member(5))
  scene.light("UIAmbient").color = rgb(255, 255, 255)
  scene.light("UIDirectional").color = rgb(255, 255, 255)
  
  p1 = vector( 0.0, -43.3, 37.5 )   -- define an equilater triangle   
  p2 = vector( 43.3, -43.3, -37.5 )
  p3 = vector( -43.3, -43.3, -37.5 )
  ed = 86.6 -- define the amplitude of the extrusion
  
  p31 = 0.5 * (p3 - p1) -- calculate the baricenter of the triangle 
(the fourth point)
  q2 = p1 + p31
  p22 = (p2 - q2) / 3.0
  p4 = q2 + p22
  -- define the extrusion vector as the normal to the triangle defined by p1, p2, p3
  e = (p22.cross(p31)).getNormalized() * ed
  
  meshShader = scene.newshader("mesh shd", #standard)
  meshShader.blend = 100
  
  -- define the mesh by means of the four original points and the four extruded ones
  prism = scene.newModel("MP", mGenerateMesh(scene, p1, p2, p3, p4, p1 + e, p2 + e, p3 
+ e, p4 + e)) 
  prism.shaderList =  meshShader
end 

on mGenerateMesh(scene, p1, p2, p3, p4, p5, p6, p7, p8)
  m = scene.newMesh("MPR", 12, 8, 0, 12, 0)
  m.vertexList = [p1, p2, p3, p4, p5, p6, p7, p8]
  
  m.colorList = [rgb("00")]
  -- The position attributes in the comments below apply to the initial front view
  m.face[1].vertices = [3, 5, 7]  -- Left end polygon (2 faces)
  m.face[2].vertices = [3, 1, 5]
  
  m.face[3].vertices = [1, 6, 5]  -- Right end polygon (2 faces)
  m.face[4].vertices = [1, 2, 6]
  
  m.face[5].vertices = [2, 7, 6]  -- Back end polygon (2 faces)
  m.face[6].vertices = [2, 3, 7]
  
  m.face[7].vertices = [2, 1, 4]  -- Lower end polygon (3 faces)
  m.face[8].vertices

queue()-ing sounds

2003-01-08 Thread John Waller
Hi,

I am authoring on a Mac but I remember from a couple of years ago that
PCs used to have a latency issue when playing sounds (i.e.. there was a
delay between the command and the sound when using puppetSound). 

I understand that using the queue() command eliminates this delay
because it preloads a part of the sound. However I was wondering if this
still holds when the play() command is used in the line directly after
the queue() command. 

e.g..

 sound(1).queue( member(soundCastMember) )
 sound(1).play()

I have quite a number of sound effects (I guess eventually a dozen or
two or three or four). So far their individual duration is between 0.3
sec and 1.5 sec. Which sound plays will depend on what the user has just
done, so I don't think queuing a whole lot of sounds, and therefore
pleloading them, would work because I never know what sound will be
needed next. (Also, partly because it is a web project, just preLoading
all the sounds with something like preLoadMember is probably not a good
idea because of loading delays at the beginning of the movie)

Unfortunately I don't have a PC to test this on and the Mac does not
seem to have this latency issue.

To sum up, my questions are:

1) Will using queue() followed by play() as in the example above solve
the latency issue or does there need to be some time between the two
commands to allow for the bit of preload. 

2) And is latency still an issue on PCs?

3) As a follow on: Does puppetSound need to load the whole sound before
it can play (whereas queue() just preLoads the first 1.5 sec by default?
- though most of my sounds are no longer than this anyway.)

Cheers,
John
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



powerbook vid card: 17 vs 15

2003-01-08 Thread grimmwerks

So I'm in line for one of the monster powerbooks -- was holding out on 
getting the 1ghz til after macworld...and I'm glad I waited now -- and 
given all the other extra bits make up the price difference between the 15 
and the 17 (the 15 can be found for $2500 now), I'm just wondering about 
the differences between the ATI mobility 9000 and GeForce 4? There's some 
spec that the GeForce is slower 
(http://www.extremetech.com/article2/0,3973,492529,00.asp)

Thoughts?

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: Trying to recreate this in Lingo

2003-01-08 Thread Buzz Kettles
At 2:17 AM -0500 1/8/03, you wrote:

[EMAIL PROTECTED] wrote:


 Hi. I'm currently trying to use Lingo to recreate this interactive 
piece that I found on the internet a while ago -

 http://www.bbc.co.uk/arts/digital/yourwork/a_anthony.shtml

 Anyway, I'm wondering if anyone could help me with creating this, 
any example code or files would be greatly appreciated (and I'll be 
forever in your debt!). So far, my attempts have been fairly 
unsuccessful.

I've got a start at it here:
http://lumpymuffins.home.attbi.com/squares/sensitiveSquares.html

I didn't deal with sound.  You could write an object to keep track 
of the sounds or you could kick a global around to keep track of 
which channel has the oldest sound in it, either to interrupt or to 
see if it's done. Eight sounds should be more than enough to play at 
one time.

agreed stealing the oldest used channel is pretty standard logic if 
you make a channel allocator ...

-Buzz


--
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]



Michael Callery's Lingo book ...

2003-01-08 Thread John Lodge
Dear group
I've taken out Michael Callery's book on Learning Lingo from  my university
library. The book's in fine condition but (sadly) the CD with example files
and so on is missing.

If anyone has the CD and would be happy to share the examples files (only)
I'd be delighted to hear from them.
Best wishes
John


= = = = = = = = = = = = = = = =
John Lodge
Surrey, England


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: Writing sound members

2003-01-08 Thread Carl West
Evan Adelman wrote:
> 
> ... gotta love
> email misunderstandings. i was curious about what the original poster,
> Carl, was trying to do. i should have stated more clearly: "all true.
> now, Carl, you've got my curiosity going"
> >>... though -- if you're not
> >> providing samples, where is the origination of the sound? through
> >> different clips the user supplies? just tones? .?

In fairly close succession I did a project that assembled audio clips into sentences, 
and I built a tool that reads in an AIFF file of say a vocabulary list being read and 
writes out the individual words to individual AIFF files.

In the process of learning to write AIFF files at all, I was generating samples by 
formula (mostly sine waves), saving them to external files and playing them back to 
make sure they worked.

With those two concepts floating in my head I started to think about stringing 
phonemes together, trying to find formulae for phoneme waveforms, and maybe, just 
maybe, synthesizing speech (or music). 

All idle thoughts really, pie-in-the-sky stuff. 

A slightly more down to earth use might be the ability to produce sound effects as 
needed and appropriate to changing situations.

Yeah, it would be a lot like imaging lingo, but for sound.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: Writing sound members

2003-01-08 Thread Andreas Gaunitz P11
Heh!

Well I for one always wanted to be able to write to a sound buffer 
just like you do to an image buffer, to be able to compute/ 
synthesize sounds using Director.

But if you could do that, then you'd want to play the sound without 
delay or queueing too. And then Director would be quite a diferent 
app I guess.

-A.


ha! never mind. i wasn't asking about beatnik. i've used it. gotta 
love email misunderstandings. i was curious about what the original 
poster, Carl, was trying to do. i should have stated more clearly: 
"all true. now, Carl, you've got my curiosity going" but thanks 
for the effort Andreas, it was a good description ;-)

regards,
evan

Andreas Gaunitz P11 wrote:

 Wow, I'm not sure I can explain this more clearly... I'll try 
though: There is a program supplied with the Xtra, called Beatnik 
Editor Pro. In BEP you import midi files and samples. You create 
instruments from the samples, by giving them a key range, filter 
settings, loop settings etc. The midi notes, and the instruments 
they will use, are then compiled into a file called RMF file. The 
.RMF file is what the Xtra plays, and what I would call a MIDI file 
on steroids.

 -A.


 all true. now you've got my curiosity going though -- if you're 
not providing samples, where is the origination of the sound? 
through different clips the user supplies? just tones? .?

 -evan

 Andreas Gaunitz P11 wrote:

  I have the beatnik Xtra. IIRC it cannot alter sounds at all in 
the sense of writing a sound to a member or a "RAM slot".

  What it does is it lets you import sound setups made up of 
samples (cycled or one shot), and it can apply filtering and some 
fx (a rudimantary reverb etc) to the sounds.

  It's good for what it does - sort of a quicktime instrument/ 
midi file on steroids, but all setup work with the samples needs 
to be done beforehand and then "compiled" into a file (like a 
midi file w/ sounds included) and supplied to the xtra.

  -A.




 [To remove yourself from this list, or to change to digest mode, 
go to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]


--

_  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _


m u t a n t
m e d i a  > solutions for success


Evan Adelman | 917.916.7378 | 598 Broadway  NY NY 10012
[EMAIL PROTECTED]  | www.mutantmedia.com




[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]



Re: windows icon question....

2003-01-08 Thread Evan Adelman
hey grimm - sorry i can't be of more help on this as i'm slightly 
bogged down but a PC/Windows possible path might be to use the vb extra 
(off hand i don't know where it is, but it's affordable if a client is 
paying) (this xtra allows you to call a vb method) and use vb to pull 
out the icon resource. a quick search on google "saving icon resources 
from dll" points to 
http://vbaccelerator.nuwebhost.com/codelib/shell/shelicon.htm which has 
at least a start on the code you'd need to modify. if i get freed up 
here, i'll try to do more (as it would be a very handy function to have 
for me too)

evan

[EMAIL PROTECTED] wrote:

Any way of grabbing a file's icon from the dll via an xtra?

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]

 


--

_  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _


m u t a n t
m e d i a  > solutions for success


Evan Adelman | 917.916.7378 | 598 Broadway  NY NY 10012
[EMAIL PROTECTED]  | www.mutantmedia.com




[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]



Re: Writing sound members

2003-01-08 Thread Evan Adelman
ha! never mind. i wasn't asking about beatnik. i've used it. gotta love 
email misunderstandings. i was curious about what the original poster, 
Carl, was trying to do. i should have stated more clearly: "all true. 
now, Carl, you've got my curiosity going" but thanks for the effort 
Andreas, it was a good description ;-)

regards,
evan

Andreas Gaunitz P11 wrote:

Wow, I'm not sure I can explain this more clearly... I'll try though: 
There is a program supplied with the Xtra, called Beatnik Editor Pro. 
In BEP you import midi files and samples. You create instruments from 
the samples, by giving them a key range, filter settings, loop 
settings etc. The midi notes, and the instruments they will use, are 
then compiled into a file called RMF file. The .RMF file is what the 
Xtra plays, and what I would call a MIDI file on steroids.

-A.


all true. now you've got my curiosity going though -- if you're not 
providing samples, where is the origination of the sound? through 
different clips the user supplies? just tones? .?

-evan

Andreas Gaunitz P11 wrote:

 I have the beatnik Xtra. IIRC it cannot alter sounds at all in the 
sense of writing a sound to a member or a "RAM slot".

 What it does is it lets you import sound setups made up of samples 
(cycled or one shot), and it can apply filtering and some fx (a 
rudimantary reverb etc) to the sounds.

 It's good for what it does - sort of a quicktime instrument/ midi 
file on steroids, but all setup work with the samples needs to be 
done beforehand and then "compiled" into a file (like a midi file w/ 
sounds included) and supplied to the xtra.

 -A.




[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, 
email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]


--

_  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _


m u t a n t
m e d i a  > solutions for success


Evan Adelman | 917.916.7378 | 598 Broadway  NY NY 10012
[EMAIL PROTECTED]  | www.mutantmedia.com




[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]



RE: OO programming

2003-01-08 Thread Alexandre Cop
Irv,

> The Howdy man already suggested my site earlier today (thanks Howdy).
> But I'll post it again here:
>
> http://www.furrypants.com/loope
>
> This is free on-line E-book about object oriented programming in Lingo.
New chapters, fantastic!! I hadn't checked your website for a while, time
for a refresher methinks...

... Alex ...


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: Imaging vs. Sprites

2003-01-08 Thread Jakob Hede Madsen
At 11:10 +0530 08/01/03, [EMAIL PROTECTED] wrote:



timeoutObjects that doesn't release their
targetObjects, because of a bug, if you don't initialize them into a
variable.


Thats a new one for me. Can you elaborate?


If you follow the help-example and do like so:
timeOut("name").new(1, #method, object)
without assigning the result like so:
 t = timeOut("name").new(1, #method, object)
Then a bug will cause the timeoutObject to not release it's reference 
to its target object, at the point when garbage collection would 
usually occur.
If such unreleased objects holds large imageObjects as properties, 
then they can quickly gobble up heaps of memory.


Or maybe you're allocating memory in such a way that the memory-space
quickly becomes fragmented.
When your memory space is consumed to the point where there is no
more available RAM, virtual memory on the harddisk will typically be
used, and that could seem like a "grinding halt".
Anyway, if you think that memory could be the issue, and you haven't
explored that yet, you should look into things like the
memory-inspector, and lingo such as the freeBytes and the freeBlock.


I always thought that Director managed the memory part on its own and I
didn't really have control over that. How can I see the fragmentation?


At least on Mac, when apps had a fixed memory-space, it used to be so 
that freeBytes showed you the total amount of free memory left, while 
freeBlock showed you the largest contiguous block of memory.
Thus even if you managed to keep sufficient amounts of 'freeBytes', 
you could still wreck your app, if the freeBlock dropped below the 
size needed for such things as images and sounds.

Like I said, I'm not quite sure how these commands work in a modern 
memory space, for instance any app on OS X gets a 4 GB virtual 
memory-partition to play with.

Actually, when I'm running the movie in authoring mode and keep the Memory
Inspector open, I see a big leap in the red bar. On stopping, this memory
is not released immediately, but if I click on the Purge button, it gets
cleared considerably. If I play the movie again, the performance is good
again.


Maybe I'm overcomplicating the issue here, by talking of leaks and 
fragmentation.
Maybe it's just that you keep loading new media assets, and as 
Director thinks it has some nice big/unlimited (virtual) memory 
partition to play within, it never unloads anything, but just keeps 
consuming more and more memory, until it's far into swap-land.
If that's the case you should be able to alleviate the problem by 
unloading your assets from time to time.
You can do that asset by asset, but as you say time is of the essence 
you could probably just do with some unspecified 'unload' or 
'unloadMember'.
At least you could just start there and see if it affects the situation at all.
Memory management is often a game of trade offs, but in your case it 
could be a simple trade off:
Either come to a grinding halt, or suffer a smaller drop in 
performance, when assets have to reload from time to time.

My best bets for the moment seem to be controlling the memory fragmentation
and drawing faster. I think I'll go the imaging way.


If the issue really is that you're battling heavy harddisk swapping 
then I think all other optimizations will be futile meanwhile.
If you are generally able to hear harddisk activity on your computer, 
then you should be able to monitor excessive swapping by ear. Does 
harddisk noise increase proportionally to the perceived slowdown?
 Otherwise there are probably utilities that can indicate harddisk 
activity, and probably also more specifically swapping activity.

Jakob
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]