What is the Haptek Hypertext Command Syntax to fire morphs sequentially?

  • 15 Replies
  • 13917 Views
*

Joseph

  • Roomba
  • *
  • 16
Hi everyone,

I am hoping to get some help essentially on what would be the correct Haptek Hypertext command syntax to trigger a series of morphs sequentially.

I am creating a php driven page which randomly parses an rss news feed for the latest text entries. It displays however many number of recent items I choose to then echo and send to the Haptek player for the character to speak using TTS.

Along with this php script I have additionally included a Javascript function "SetRandomThing()" which randomly changes morphs & textures for the character. It was found here -  http://www.haptek.com/tests/MorphsAndTextures/index.html

So for example - with 3 items chosen to parse and display - each echo would produce something like-
 
HapToDo_Add_JS(0.0, "SetRandomThing();");
HapToDo_Add_JS(0.0, "SendText('Hello this is text One');");
 
HapToDo_Add_JS(0.0, "SetRandomThing();");
HapToDo_Add_JS(0.0, "SendText('Hello this is text Two');");
 
HapToDo_Add_JS(0.0, "SetRandomThing();");
HapToDo_Add_JS(0.0, "SendText('Hello this is text Three');");


My problem is how the SetRandomThing() - Morph/Texture function, goes off 3 times in row quickly ending on the last one
and usually before the character has even finished speaking the text of the first parsed feed entry item.

What I want to have it do instead, is where the character would morph and speak text one, then morph again and speak text 2 and then morph again and speak text 3 etc .....doing each morph sequentially.

I have only a rudimentary comprehension of both PHP and Javascript and have been hacking my way through this by trial and error and to also understand the Haptek Hypertext commands.

I guess either in my php or Javascript I may perhaps need to include some kind of incremental function like
(i=0;i< x ;i++) where x would be however many number of entries I have chosen to display and so then increment each Haptek timing argument "HapToDo_Add_JS( 0.0,"  etc - so  each series echo statements for each generated feed item would appear like - HapToDo_Add_JS(0.0,  - HapToDo_Add_JS(0.1, - HapToDo_Add_JS(0.2,  etc so as to create a timeline to fire each morph sequentially as the character speaks the next item. 

Would anyone possibly know of what combination of specific Haptek Hypertext commands I might use to
affect pauses between each morph and spoken text entry, to make the character do each sequentially? Morph/Speak 1 - Morph/Speak 2 - Morph/Speak 3 etc? Am I perhaps missing something additionally like -  \\loadmorph [name= "morph name" switch= morphs i1= 1] 

If anyone might be able to offer any help I would really appreciate it.

Thank you.   

*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
I'm certainly no expert here, but I'm wondering if you've tried the following:

HapToDo_Add_JS(0.0, "SetRandomThing();SendText('Hello this is text One');");
 
HapToDo_Add_JS(0.0, "SetRandomThing();SendText('Hello this is text Two');");
 
HapToDo_Add_JS(0.0, "SetRandomThing();SendText('Hello this is text Three');");

This is what I would be trying next, were I in your situation. :)
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

Joseph

  • Roomba
  • *
  • 16
Hi, yes I actually did also try that, combining them. But I got the same result, that the morphs would fire in rapid sucession before the character had even completed speaking the first text entry. 

*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Most likely, then, you need to use some sort of ready state signal, before feeding the second function call, and then again, before firing the third. I expect there should be some sort of event for that, but I'm not at all familiar with haptek at all (it crashes my machine when viewed in firefox), so we're just going to have to see if someone else can help you.

Hey! At least I tried! :)
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
I never really did much with timing things in Haptek.  GT40 (a member here) may have some ideas.

I was going to suggest you look at the /clock command, but I am not sure how flexible that approach is and if it would lend it self to 'on-the-fly' events like this.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
I was thinking Dusky might also chime in as he has done a lot of experimenting with Haptek...

Jim...you out there? :-\
In the world of AI, it's the thought that counts!

*

Joseph

  • Roomba
  • *
  • 16
Thank you all very much for the assistance on this. I am still hacking my way through the javascript and Hypertext command syntax but I hope to soon knuckle down and nail this to get my character to do what I want. I suspect the secret missing command I need is something regarding the Switch i=0 or i=1 , something like that. 

*

Joseph

  • Roomba
  • *
  • 16
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #7 on: September 03, 2010, 12:04:33 am »
Hello again everyone,

Here is a Live Streaming video Twitter feed I recently created which features a browser screencast of a combination of php/javascript in the Haptek player. It loads a random web image into the background as the character begins speaking a large body of text fetched directly from entries on Craigslist Rants & Raves.

Please note that if you are easily offended, this generally contains foul language.

But please feel free to subscribe to this or whatever it is the kids do nowadays.
I will try to periodically broadcast and just let the script run at length. Unfortunately however my connection is terribly poor so the framerate may suffer considerably.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #8 on: September 03, 2010, 02:25:11 pm »
Joseph,

Sorry but I wasn't able to get on either location and I'm on a broadband connection.
In the world of AI, it's the thought that counts!

*

GT40

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1056
    • My Bots
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #9 on: September 03, 2010, 03:13:37 pm »

Hello Joseph! Just reading your thread. Sorry if I can't help you. I'm not addicted to Haptek and bots anymore (SL...).  ;)

I made lots of little skits in the past (Haptek window in a HTML page, with a very accurate timing in the script). You can read the codes on my "site" (not sure it will help).  ???

Hey, I'm not a programmer, all that was just made to make you smile.  :)

"There is no RL. Only AFK." (Jamie Jervil, resident of Second Life)

*

Joseph

  • Roomba
  • *
  • 16
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #10 on: September 03, 2010, 04:28:03 pm »
Hello Gt40, I have seen your skits and they are brilliant. I actually have looked at the code for some of them to help me learn the Haptek hypertext command syntax. Art, I am sorry you say you unfortunately were unable to view any of the video. The videos should play if you have flash, but I am not sure. They may take some time to load, as I have more typically now begun recording them for long periods of time up to an hour, I just let the script run and the character reads out a massively large amount of SendText commands containing the item body field for each entry on Craigslist Rants & Raves. I am fetching the text directly from the Craigslist R&R rss feed. The background image is taken from the latest images uploaded on the public feed at Live Journal.

*

GT40

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1056
    • My Bots
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #11 on: September 03, 2010, 06:02:24 pm »

Thanks a lot, Joseph. I confirm that your video works fine in the old Europe (France) and on old computers (Pentium IV and XP). Really amazing and original result. But 40 minutes, my poor English, sure I missed something. ;)

"There is no RL. Only AFK." (Jamie Jervil, resident of Second Life)

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #12 on: September 03, 2010, 06:37:24 pm »
Works fine here too.

Art, are you using the 64 bit version of IE ?  If so Flash doesn't work with that.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #13 on: September 04, 2010, 01:59:48 pm »
I was using Firefox (my default browser) and was not able to view it. I just tried Windows 8 (I'm on a 64 bit, Windows 7 machine) and although it took a few moments, I saw the little blue, foul mouthed, morphing creature talking in a monotone type of voice.

Imagine that.

Now to try Firefox again....

OK... Firefox didn't like waiting too long for a video to display.

I did check a bit more about Flash on a Chrome site I believe. Apparently Flash is not too warmly embraced there.
##################
Problems with flash:
-CPU hog
-Long history of causing browser crashes in any OS or browser
-Removes ability for search engines to crawl the content
-Removes accessibility features (blind/deaf/impaired vision/etc)
-Breaks standard browser functions like forward/back/refresh/stop
-Makes the web depend on a single company, which is never a good thing (see Linux flash or 64-bit flash support for real world examples of why)
-Devices that don't support flash but DO support browsing are left in the dust
-Enables the worst kind of ads that make you want to gouge your eyes out

There are competing offerings like Silverlight, but it has almost the exact same set of problems, or worse. Maybe someday HTML5 (or 6,7,8?) will obsolete Flash...
« Last Edit: September 04, 2010, 02:40:55 pm by Art »
In the world of AI, it's the thought that counts!

*

DaveMorton

  • Trusty Member
  • ********
  • Replicant
  • *
  • 636
  • Safe, Reliable Insanity, Since 1961
    • Geek Cave Creations
Re: What is the Haptek Hypertext Command Syntax to fire morphs sequentially?
« Reply #14 on: September 04, 2010, 04:42:34 pm »
Maybe someday HTML5 (or 6,7,8?) will obsolete Flash...

Well, here's hoping! Of course, that could possibly create even MORE eye-gouging ads, but... :D
Comforting the Disturbed, Disturbing the Comfortable
Chat with Morti!
LinkedIn Profile
CAPTCHA4us

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

293 Guests, 0 Users

Most Online Today: 467. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles