Simulate a pendulum
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Simulate a pendulum
Phew!
My head was about to explode!
Simon
My head was about to explode!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 222
- Joined: Wed Jun 21, 2006 7:33 pm
- Location: West of the Pecos
- Contact:
Re: Simulate a pendulum
Simon,Simon wrote:OK, so I'm very late to this but with good cause... really... (I'm slow):
...{snip}...
Barry, there is no "big" math in this and I did it mostly to get you away from using a repeat loop which should not be used when a send can do the trick.
...{snip}...:
Yep; I understand finally about the "don't use the repeat loop":
Code: Select all
if tSwing = true then send pendulus to me in 10 milliseconds
Would I be inaccurate to call this recursion?
I'm trying to approach my project from a user interface issue first. The questions I'm asking myself are: What would provide the appropriate feedback for a musician? Just sound? Sound and lights? Sound and motion? If motion, what sort of motion. How does one provide visual feedback for 3/4 time? 4/4 time? 5/4 time? (9/8 time if you're playing Blue Rondo a la Turk. Any Brubeck fans out there?)
Thanks, Simon, and to everyone. I just asked a question and you all responded with a chapter in a LiveCode Tutorial manual. Pretty cool.
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Simulate a pendulum
Yes.Would I be inaccurate to call this recursion?
As for what would be appropriate:
I don't think the swing of a pendulum on a metronome adds anything for the user. The pendulum was cool when I was a kid learning piano (or when the cat decided it was to be attacked) but only the sound was useful.
I would go for sound and/or light option. You can add more by adding emphasis on the first beat. Gosh, and since it's a program you can even add different sounds for fractional beats. What Fun!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Simulate a pendulum
Yep, this. Sound and light, a way to live adjust the interval. Simple and effective.
Simon wrote:As for what would be appropriate:Would I be inaccurate to call this recursion?
I don't think the swing of a pendulum on a metronome adds anything for the user. The pendulum was cool when I was a kid learning piano (or when the cat decided it was to be attacked) but only the sound was useful.
I would go for sound and/or light option. You can add more by adding emphasis on the first beat. Gosh, and since it's a program you can even add different sounds for fractional beats. What Fun!
Simon
-
- Posts: 222
- Joined: Wed Jun 21, 2006 7:33 pm
- Location: West of the Pecos
- Contact:
First shot - version .01
Okay! I hope I've put everyone's names in the "thank you". If I have not, forgive me; I'll fix it in version .02
Here's "Brubeck's Metronome". Completely open and unprotected as required by the Community Edition license. I'm not doing a standalone yet as there is undoubtedly more "stuff" that needs to be done. But this is, IMHO, a good start. I can see a bunch of redundant code as I have each time signature calling a different handler. However, it is quite simple to debug in its present state and that's more important for anyone grabbing this stack who has not been part of this thread.
Comments and suggestions gratefully accepted.
Thanks,
Barry
Here's "Brubeck's Metronome". Completely open and unprotected as required by the Community Edition license. I'm not doing a standalone yet as there is undoubtedly more "stuff" that needs to be done. But this is, IMHO, a good start. I can see a bunch of redundant code as I have each time signature calling a different handler. However, it is quite simple to debug in its present state and that's more important for anyone grabbing this stack who has not been part of this thread.
Comments and suggestions gratefully accepted.
Thanks,
Barry
- Attachments
-
- Brubeck's Metronome(v.01).livecode.zip
- (93.94 KiB) Downloaded 252 times
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Simulate a pendulum
Well for me the image sphere.png ended up on top of the buttons, that didn't work for me
I liked the use of setting the loc rather than using a move. I think out of the corner of the eye the abruptness of the motion gives better information.
Great!
Simon
I liked the use of setting the loc rather than using a move. I think out of the corner of the eye the abruptness of the motion gives better information.
Great!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 222
- Joined: Wed Jun 21, 2006 7:33 pm
- Location: West of the Pecos
- Contact:
Re: Simulate a pendulum
D-oh! I imported a large graphic, re-sized it, but didn't realize that it would then be re-sized -back- to the original size when the stack was re-opened. Okay; I re-sized it in Preview, then imported that png into the stack. Here's version .02.
Barry
EDIT: Probably could have just locked the size and position, right?
Barry
EDIT: Probably could have just locked the size and position, right?
- Attachments
-
- Brubeck's Metronome(v.02).livecode.zip
- (51.99 KiB) Downloaded 234 times
-
- VIP Livecode Opensource Backer
- Posts: 114
- Joined: Fri Apr 28, 2006 12:10 am
- Location: Seattle
Re: Simulate a pendulum
Very nice! Thanks for sharing it.
Roger
Roger
-
- VIP Livecode Opensource Backer
- Posts: 114
- Joined: Fri Apr 28, 2006 12:10 am
- Location: Seattle
Re: Simulate a pendulum
Here is an updated link to my SimplePendulum:
https://www.dropbox.com/s/x6s5qs88t1ocn ... S.rev?dl=0
Hopefully, you can find something useful in it.
Cheers,
Roger
https://www.dropbox.com/s/x6s5qs88t1ocn ... S.rev?dl=0
Hopefully, you can find something useful in it.
Cheers,
Roger
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Simulate a pendulum
Hi
I just get a 404 not found error
Regards Lagi
... And now it works -- I tried 5 times
I just get a 404 not found error
Regards Lagi
... And now it works -- I tried 5 times