Various questions

Klaus kmajor at metascape.org
Tue Jan 29 06:37:01 EST 2002


Hi Rand,

> Hi, all. I really appreciate everyone's contributions to this list,
> both those taking time to pose questions and of course those who provide
> answers. I've been a HyperCard user since it was first introduced, and
> have used it extensively for various linguistic-related projects. I
> wrote my phd dissertation using HyperCard to organize data (a dialect
> study of the North American aboriginal language Ojibwe). I am presently
> teaching at the University of Wisconsin (Madison) in American Indian
> Studies, seeking to help preserve the Ojibwe language (most aboriginal
> languages in the world will die out in the next two generations due to
> pressures of globalization). Most of my Revolution work will involve
> producing stacks to help language learners. I use Mac OS9, X.1.2, and
> Windows 2000. I built my first runrev language stack today, and have a
> couple of questions for the group:

Welcome to the club :-)
> 
> 1. If you use a "player" and external sounds, is there any way to
> relativize the path to the sounds? For example, I have cards that have
> Ojibwe written on them, and when the user clicks on a button, my
> pronunciation of the Ojibwe is heard-- via a player that finds an audio
> (wav) file. But how do I generalize the paths in the players so that a
> downloaded copy of the runrev stack with associated audiofiles will be
> able to find the audio files without the user's having to know how to
> link files? Could you use the "default folder" to good effect in this
> case? Help!

Help ! ;-)

Of course you can use relative paths.

Here's how to:

Supposed you have your stacks etc in a big folder called "Dunno" ;-)

You could create a subfolder in that folder and call it e.g. "soundz"
(sic ! ;-)

Now you have to tell MC/RR to set its working directory, which is
the folder, where the engine will look into and will find all the nice
things in there, like stacks, movies, subfolders etc...

Now you should add these lines to the stack (inside folder "Dunno")
where you want to use relative paths:

on preopenstack ## so it's already set, when the stack starts...
  get the effective filename of this stack
   set the itemdel to "/"
   delete last item of it
   set the directory to it
end preopenstack

"the efective filename" returns the complete path to that stack with
HD etc... -> "C:/windoze/my_folder/your_folder/our_stack.rev"

Now we set the itemdelimiter to "/" (which is the default path delimiter in
MC/RR), delete the last item of "the eff..." and what's left is the complete
path to the folder "Dunno". ("C:/windoze/my_folder/your_folder")

NOW you can script something like:

on xxx
  set the filename of player "playa" to "soundz/new.wav"
end xxx

Now you can just create new players and assign a filename to them like
above:

sounds/sound.wav

> 2. How necessary is it to have external audio files? What is the size
> threshold in terms of final stack size? For example, if I have a set of
> say 25 audio files that are each about 50K, will it really tax a typical
> Windows or Mac system to have all of these audio files embedded in a
> single RunRev file (ie, overload memory to load this stack)? What
> guidelines can be given as to "size"? This would really help novice
> users.

MC/RR uses to load an entire stack into memory !!!

So it is always a got idea to use referenced sound and movies...

I once read the advice to create no stack bigger than 3 to 4 mb.

Sounds reasonable to me, but depends on hardware configurations...
 
> 3. To the RunRev team: We need a stack repository, where people can
> upload stacks to give others ideas about developing their own materials.
> This will only help Revolution thrive as a commercial product. The docs
> for runrev are a great start, but they are still very limited. Stack
> examples will help people with particular interests to see
> implementations of projects of the sort that they themselves are
> undertaking. It's funny-- runrev produces in me the same kind of
> loyalty/devotion that the mac does- something about aesthetics and the
> quality of life. I _love_ this program. It will help Ojibwe to survive.

There is a usercontribution section on the RR-site.

But i don't know how to post stacks there.

> Okay, enough for now. Thanks for your help, dear fellow programmers.
> 
> rand valentine
> u of wisconsin-madison

Hope this helps in the moment and that my explanation is understandable :-)


Regards

Klaus Major 
<kmajor at metascape.org>
MetaScape GmbH




More information about the use-livecode mailing list