Re: lingo-l volume control

2002-04-26 Thread noelle cheng

Hi,

At 09:59 AM 4/25/2002 -0500, you wrote:

The simplest thing in the universe might be to convince the powers that 
be at your company to spring for the OSCXtra suite from peghole.com. 
These Xtras include all types of system standard components (or 
widgets), including menus, buttons and sliders.

This will not be easy.

Yeah, I know what you mean. They want you to move the entire planet, but 
won't give you even a moderately-sized lever with which to start pushing. 
Well, you can't be an automotive mechanic if you do not have wrenches.

Thank you for  understanding...


Could you elaborate further please? I find that the documentation on the 
site is inadequate and consists largely of promotion of their product. 
What exactly does it do? Is it so ' wonderful' as claimed?

It provides Director programmers with a more or less complete set of 
system widgets, specifically buttons of various types, popup and pulldown 
menus, scroll bars, little arrows, and sliders. All the system standard 
components you see in most programs, the ones that have the system look 
and feel, user-selected color and font choices, etc.


Does this mean that the whole  program can be set at the beginning before I 
start authoring?  Is this what you mean by system standard components?

Actually, what is your  personal opinion of it? I mean, I believe that 
there are many Xtras in the market  so is this an Xtra worth buying?

It’s a pity that everything is quoted in US$ though. Everything becomes 
twice as expensive.

You could insert an OSC slider in your score and attach a couple 
behaviors to it, and you'd be done. (It's not exactly that easy, but 
it's close.)

What behaviors are you talking about please? Is it so easy?

Almost. The OSC suite comes with behaviors, one of which gives you a lot 
of nice options for the slider -- including being able to set its value 
range, and what handlers are to be called when the user is operating it. 
The handlers in question would be the ones you'd use to actually set the 
system volume, and that's the extent of the scripting you'd have to do.

Now I’m  almost wishing I had one of this…



By the way is this the only solution?

For setting system volume? Not by any means. A slider's not necessary 
unless you're committed to the idea.

Yes,  I’m open to anything which works.

  There are other ways you could do it, as with up and down arrows, for 
 instance. Here's an example behavior for that:

   PROPERTY pnMySoundChannel -- Which sound channel is being set
   PROPERTY pyMyDirection-- Volume up, or down?

  ()
   on getPropertyDescriptionList me
 lProps = [:]
 lProps.addProp( #pnMySoundChannel, [#default: 1, #format: #integer,\
 #comment: Which sound channel?, #range: \
 [#min:1, #max:8] ] )
 lProps.addProp( #pyMyDirection, [#default: #down, #format: #symbol,\
 #comment: Adjust sound down or up? #range: \
 [#down, #up] ] )
 return lProps
   END getPropertyDescriptionList

You'd attach this to your up and down arrow sprites, set the properties so 
one would adjust the sound down and the other would adjust it up, and then 
whenever the user clicked the appropriate button the sound would get 
louder or softer.

   I first create two arrows in the form of buttons, is that what you mean?



Or you could turn off the clicking entirely, and replace the mouseDown 
handler with this:

   on mouseWithin me
 me.AdjustVolume()
   END mouseWithin



I place this handler on both buttons?


Then all the user has to do is point to the appropriate button, and the 
sound gets louder or softer.

Note, by the way, that this will affect only sound *channels* in playback, 
when they're being used in conjunction with a command such as puppetSound.

This is only for channels 1 to 8?

I need to specify something like  this? :

PuppetSound  2, 0



This won't affect the loudness of a file playing off disk as with sound 
playFile, and it won't affect the computer's overall system volume.

For the sound to be played properly, sound playFile requires that  the 
correct MIX Xtra must be available to the movie, usually in the Xtras 
folder of the application?

This also  means that the behavior  is independent of the system volume?

I notice that you took the time and effort to write more code…

Actually, I am using QT music files.  You mentioned before that  the sound 
channel range should not be 8, rather it  could go up to 1000.

May I amend it to  this: the Get Property Description List?

PROPERTY pnMySoundChannel -- Which sound channel is being set
  PROPERTY pyMyDirection -- Volume up, or down?

  on beginSprite me
  me.SetParams()
  END beginSprite

  on mouseDown me
  repeat while the stillDown
  me.AdjustVolume()
  end repeat
  END mouseDown

  on SetParams me
  if voidP ( pnMySoundChannel ) then
  pnMySoundChannel = 1
  end if
  if voidP ( pyMyDirection ) then
  pyMyDirection = #down
  end if
  END 

Re: lingo-l volume control

2002-04-25 Thread Howdy-Tzi

At 06:30 +0800 04/25/2002, noelle cheng wrote:

The simplest thing in the universe might be to convince the powers 
that be at your company to spring for the OSCXtra suite from 
peghole.com. These Xtras include all types of system standard 
components (or widgets), including menus, buttons and sliders.

This will not be easy.

Yeah, I know what you mean. They want you to move the entire planet, 
but won't give you even a moderately-sized lever with which to start 
pushing. Well, you can't be an automotive mechanic if you do not have 
wrenches.

Could you elaborate further please? I find that the documentation on 
the site is inadequate and consists largely of promotion of their 
product. What exactly does it do? Is it so ' wonderful' as claimed?

It provides Director programmers with a more or less complete set of 
system widgets, specifically buttons of various types, popup and 
pulldown menus, scroll bars, little arrows, and sliders. All the 
system standard components you see in most programs, the ones that 
have the system look and feel, user-selected color and font choices, 
etc.

You could insert an OSC slider in your score and attach a couple 
behaviors to it, and you'd be done. (It's not exactly that easy, 
but it's close.)

What behaviors are you talking about please? Is it so easy?

Almost. The OSC suite comes with behaviors, one of which gives you a 
lot of nice options for the slider -- including being able to set its 
value range, and what handlers are to be called when the user is 
operating it. The handlers in question would be the ones you'd use to 
actually set the system volume, and that's the extent of the 
scripting you'd have to do.

By the way is this the only solution?

For setting system volume? Not by any means. A slider's not necessary 
unless you're committed to the idea. There are other ways you could 
do it, as with up and down arrows, for instance. Here's an example 
behavior for that:

   PROPERTY pnMySoundChannel -- Which sound channel is being set
   PROPERTY pyMyDirection-- Volume up, or down?

   on beginSprite me
 me.SetParams()
   END beginSprite

   on mouseDown me
 repeat while the stillDown
   me.AdjustVolume()
 end repeat
   END mouseDown

   on SetParams me
 if voidP ( pnMySoundChannel ) then
   pnMySoundChannel = 1
 end if
 if voidP ( pyMyDirection ) then
   pyMyDirection = #down
 end if
   END SetParams

   on AdjustVolume me
 if pyMyDirection = #down then
   the volume of sound pnMySoundChannel = \
 the volume of sound pnMySoundChannel - 1
 else
   the volume of sound pnMySoundChannel = \
 the volume of sound pnMySoundChannel + 1
 end if
   END AdjustVolume

   on getPropertyDescriptionList me
 lProps = [:]
 lProps.addProp( #pnMySoundChannel, [#default: 1, #format: #integer,\
 #comment: Which sound channel?, #range: \
 [#min:1, #max:8] ] )
 lProps.addProp( #pyMyDirection, [#default: #down, #format: #symbol,\
 #comment: Adjust sound down or up? #range: \
 [#down, #up] ] )
 return lProps
   END getPropertyDescriptionList

You'd attach this to your up and down arrow sprites, set the 
properties so one would adjust the sound down and the other would 
adjust it up, and then whenever the user clicked the appropriate 
button the sound would get louder or softer.

Or you could turn off the clicking entirely, and replace the 
mouseDown handler with this:

   on mouseWithin me
 me.AdjustVolume()
   END mouseWithin

Then all the user has to do is point to the appropriate button, and 
the sound gets louder or softer.

Note, by the way, that this will affect only sound *channels* in 
playback, when they're being used in conjunction with a command such 
as puppetSound. This won't affect the loudness of a file playing off 
disk as with sound playFile, and it won't affect the computer's 
overall system volume.

-- 

  Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
  http://www.osborne.com/indexes/beginners_guides.shtml
[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: lingo-l volume control

2002-04-24 Thread noelle cheng

At 04:25 PM 4/23/2002 -0500, you wrote:

 It seems as though you've been trying to do your Director work by 
copying and pasting stuff from other movies.

 I'd strongly advise against it.

Thank you for your advice.

However, if you had a superior who decided that you were required to do a 
certain job, I think you would also  try your best to produce 
whatever  was  asked.

I apologize if what I have written  has been impolite, ungrateful and 
incondite.


 There's no ready way to tell whether the other movie was designed with 
that degree of modularity in mind, and there's no ready way to tell how 
much verious pieces of code depend on other pieces being present.


It was the code you helped me write.

It is also  against my conscience  that you  spend  your precious  time 
writing  code  so that I could  just callously  disregard it.


 In almost all cases when you are creating a new movie it is best to work 
from scratch, unless you are using code which has been specifically 
designed to be portable across files (i.e., the Library Palette behaviors).

I understand.

Perhaps you could advise me, then, how do  I create  volume control  using 
the Library palette behaviors and the score?

I  find that using  Library palette behaviors may not be  able to 
solve  all my problems.

I  know only that working with  Lingo, trying, failing  and making 
countless stupid, ignorant mistakes will…

Noelle

[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: lingo-l volume control

2002-04-24 Thread Howdy-Tzi

At 22:53 +0800 04/24/2002, noelle cheng wrote:

I'd strongly advise against it.

Thank you for your advice.

However, if you had a superior who decided that you were required to 
do a certain job, I think you would also  try your best to produce 
whatever  was  asked.

That is true. Contrarily, ideally the 'superior' would also 
understand that if one is learning on the fly, as it were, things 
will take time, and that making demands for immediate production is 
extremely irrational and inappropriate behavior.

Perhaps you could advise me, then, how do  I create  volume control 
using the Library palette behaviors and the score?

Well, I'd start by breaking the task down into discrete pieces. For 
instance, in order to control volume you need a slider and some code 
that responds to the slider's operation.

The simplest thing in the universe might be to convince the powers 
that be at your company to spring for the OSCXtra suite from 
peghole.com. These Xtras include all types of system standard 
components (or widgets), including menus, buttons and sliders.

You could insert an OSC slider in your score and attach a couple 
behaviors to it, and you'd be done. (It's not exactly that easy, but 
it's close.)

The trick with making a slider on your own is that you have to start 
by making the slider itself, and getting it to work in the way you 
want it to. Only after you get the slider working correctly as a 
slider would you want to try attaching volume controls to it.

-- 

  Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
  http://www.osborne.com/indexes/beginners_guides.shtml
[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: lingo-l volume control

2002-04-24 Thread noelle cheng

Hi,


At 11:01 AM 4/24/2002 -0500, you wrote:

Thank you for recommending the Xtra.  I have gone to www.peghole.com but am 
still unclear.



The simplest thing in the universe might be to convince the powers that be 
at your company to spring for the OSCXtra suite from peghole.com. These 
Xtras include all types of system standard components (or widgets), 
including menus, buttons and sliders.

This will not be easy.

Could you elaborate further please? I find that the documentation on the 
site is inadequate and consists largely of promotion of their product. What 
exactly does it do? Is it so ' wonderful' as claimed?

I have also gone through the examples but I am still unsure.



You could insert an OSC slider in your score and attach a couple behaviors 
to it, and you'd be done. (It's not exactly that easy, but it's close.)


What behaviors are you talking about please? Is it so easy?



By the way is this the only solution?



Noelle


[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!]



lingo-l volume control

2002-04-23 Thread noelle cheng


Hi,

Could you help me please?

I  would like to have  volume control in my program.  The trouble is that I 
am unable to isolate the problem when I use this. There are errors which up 
to now, I am  still unable to correct.

But it is essential to have this.

The volume control file  by itself works.

Is there any way or workaround that  I may   take to  use this file without 
it being in my main movie?

TIA

Noelle 

[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: lingo-l volume control

2002-04-23 Thread Howdy-Tzi

At 03:24 +0800 04/24/2002, noelle cheng wrote:

The volume control file  by itself works.

Is there any way or workaround that  I may   take to  use this file 
without it being in my main movie?

It seems as though you've been trying to do your Director work by 
copying and pasting stuff from other movies.

I'd strongly advise against it.

There's no ready way to tell whether the other movie was designed 
with that degree of modularity in mind, and there's no ready way to 
tell how much verious pieces of code depend on other pieces being 
present.

In almost all cases when you are creating a new movie it is best to 
work from scratch, unless you are using code which has been 
specifically designed to be portable across files (i.e., the Library 
Palette behaviors).

-- 

  Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
  http://www.osborne.com/indexes/beginners_guides.shtml
[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!]