send command hiccups?
Alex Tweedly
alex at tweedly.net
Thu May 17 05:11:26 EDT 2012
No really good ideas, but a couple of tings you might try
1. log the actual time when you do the 'send' and when you are
re-awakened and see if there is anything to be seen in the way of a pattern
> on dingDing
> if the cpFlag of me is false then exit dingDing
put "about to play" && the long seconds & CR after field "timeLog"
> play "ding" -- an au file, length of 0.089 seconds
> put field "sendWait" into tSendWaittime_ding
> if tSendWaittime_ding<= 0 then put 90 into tSendWaittime_ding
put "ready to send" && the long seconds & CR after field "timeLog"
> send "dingDing" to me in tSendWaittime_ding milliseconds
> end dingDing
2. do NOTHING else in dingding !
on dingDing
if the cpFlag of me is false then exit dingDing
send reallyding to me in 0 milliseconds
send "dingDing" to me in cpWaittime_ding milliseconds !! NB custom prop
end dingDing
on reallyding
play "ding" -- an au file, length of 0.089 seconds
put field "sendWait" into cpWaittime_ding
if cpWaittime_ding <= 0 then put 90 into cpWaittime_ding
end reallyDing
-- Alex.
On 17/05/2012 07:28, Nicolas Cueto wrote:
> Hello All,
>
> For a spinning wheel-of-fortune effect, I want a "ding" sound to
> repeat at even intervals. And I'd like those intervals to be as short
> as audibly possible without the sound file being too cut-off.
>
> Using the script below, the "play 'ding'" audibly cycles at an even
> metre a few times, but, after the nth time, there's a very brief but
> clearly perceivable pause or hiccup. When that "nth" time happens
> depends on the wait time of the "send" command, but it's about every
> 6th to 11th cycle.
>
> I've tried playing with the send time, as well as editing the original
> sound file to be as audibly brief as possible. In fact, I've been
> attacking this "hiccup" problem on-and-off over the years. One
> "solution" I've tried is to string the dings into a new sound file and
> use a player object to play it. But, at some point, when that spinning
> wheel starts visually slowing down, I just don't see any way of
> getting around the problem that I must rely on a delaying send-in-time
> command to make the wheel also sound like it's slowing down.
>
> Thank you in advance. -- Nicolas Cueto
>
>
> THE SCRIPT...
>
> on mouseUp
> set the cpFlag of me to not the cpFlag of me
> switch the cpFlag of me
> case "true"
> set the label of me to "S T O P"
> send "dingDing" to me in 0 milliseconds
> break
> case "false"
> set the label of me to "D I N G"
> break
> end switch
> end mouseUp
>
> on dingDing
> if the cpFlag of me is false then exit dingDing
> play "ding" -- an au file, length of 0.089 seconds
> put field "sendWait" into tSendWaittime_ding
> if tSendWaittime_ding<= 0 then put 90 into tSendWaittime_ding
> send "dingDing" to me in tSendWaittime_ding milliseconds
> end dingDing
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> .
>
More information about the use-livecode
mailing list