Page 3 of 3
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:16 pm
by bogs
LOL! I was playing around with this myself just before stopping in here . I have even bigger questions about it! (Mind you, I had to fire up a Win vm just to play with this at all, it will take weeks to get the taste out of my mouth I'm sure
)
Anyway, I was thinking in simple terms (my usual standard), and also hit duration as a possible break down (are you scared yet Richmond?
).
However, i couldn't get an answer for 100/duration
Code: Select all
put the duration of player 1 into tmpDur; put (100/tmpDur) && "and " & tmpDur
... which came up with this
0 and 2005950000
~~~~~!
I was expecting an answer more along the lines of this:
which gave me 0.00005, but for some reason you can't divide 100 by more than so many digits. When doing it on the Windows Calculator program, you get an answer though. Very puzzling to me.
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:20 pm
by richmond62
Mind you, this is as crappy as with the player:
Code: Select all
on mouseUp
put the size of audioClip "a55.aiff" into SZ
put (SZ / 4) into DURANCE
put ((DURANCE / 48000) * 60) into TIX
put (TIX/360) into DIVZ
-----
play audioClip "a55.aiff"
set the startAngle of grc "CRUNCH" to 0
put 0 into DEG
repeat until DEG > 360
set the arcangle of grc "CRUNCH" to DEG
set the label of grc "MASK" to DEG
add 1 to DEG
wait DIVZ ticks with messages
end repeat
-----
end mouseUp
I am absolutely sure that this whole problem comes down to the probable situation that
LiveCode is rounding up
0.xxx ticks to
1 tick.
Of course one of the ways round this problem has got to involve chopping up the 360 degrees of a circle into increments
that timed at 1 tick apart will complete the circle in the duration of one's audioClip: although in all likelihood one will
run up against a circular graphic being unable to set an arcangle involving minutes of arc.
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:32 pm
by Klaus
richmond62 wrote: ↑Wed Oct 02, 2019 8:15 pm
I'm afraid we can't!
I really hate that word '
can't'
!
That are actually TWO words!
Code: Select all
on mouseUp
put the size of audioClip "a55.aiff" into SZ
put (SZ / 4)
end mouseUp
Why SZ/4? What does the 4 represent?
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:40 pm
by richmond62
'
cannot' is one word, and '
can't' is an abbreviation of that single word.
What does the 4 represent?
It's a conventional symbol for a number termed 'four' in English, and 'vier' in German.
Seriously . . . if you import 3 random
aiff files into a
LiveCode stack
and get their respective sizes, then link to those files with players and get those players' duration,
you will find that their sizes as registered by
LiveCode are 4 times
their
durations when in a
player object.
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:47 pm
by richmond62
I am absolutely sure that this whole problem comes down to the probable situation that
LiveCode is rounding up 0.xxx ticks to 1 tick.
Just confirmed that as my example finishes as the graphic's
arcangle reaches about 146 degrees.
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:51 pm
by richmond62
And just confirmed this:
one will
run up against a circular graphic being unable to set an arcangle involving minutes of arc.
as
Code: Select all
on mouseUp
set the arcangle of grc "CRUNCH" to 123.45
put the arcangle of grc "CRUNCH"
end mouseUp
puts 123 into the messageBox
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:53 pm
by richmond62
Off to have a much-needed bath: maybe, just maybe, something will occur to me . . .
-
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 8:58 pm
by Klaus
richmond62 wrote: ↑Wed Oct 02, 2019 8:40 pm
'
cannot' is one word, and '
can't' is an abbreviation of that single word.
Ah, really was not aware of that, always thought that "cannot" is some kind of "slang" for "can not"! Go figure!
richmond62 wrote: ↑Wed Oct 02, 2019 8:40 pm
What does the 4 represent?
Seriously . . . if you import 3 random
aiff files into a
LiveCode stack
and get their respective sizes, then link to those files with players and get those players' duration,
you will find that their sizes as registered by
LiveCode are 4 times
their
durations when in a
player object.
Oh, I see, so you really handled this with a serious empirical approach!
Re: Circular Audio Progress bar
Posted: Wed Oct 02, 2019 9:30 pm
by richmond62
a serious empirical approach
Well: I am an admirer of John Locke and Francis Hutcheson.
Re: Circular Audio Progress bar
Posted: Thu Oct 03, 2019 5:10 am
by dpalmersce@gmail.com
I would really like to thank everyone for their help. I used -hh's script method and it worked perfect for what I was doing. So special thanks to -hh. Good to know there are people out there that are willing to share their knowledge!
Re: Circular Audio Progress bar
Posted: Thu Oct 03, 2019 7:57 am
by richmond62
Just confirmed that as my example finishes as the graphic's arcangle reaches about 146 degrees.
On a 2018 Mac Mini running Mac OS 10.14.6 (LC 9.5.0)
and . . . .
about 67 degrees on a 2006 iMac running Mac OS 10.7.5 (LC 8.1.8 )
which is very odd indeed.
-
- quandary.png (28.99 KiB) Viewed 8801 times