Metronome?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
moxman
Posts: 5
Joined: Mon Nov 05, 2007 7:30 pm

Metronome?

Post by moxman » Mon Nov 05, 2007 10:58 pm

Wow - it's been a long time since I've looked at Revolution (or Metacard!). It's great to see how much it's grown and improved. Anyway here's my question:

Has anyone built a metronome? Basically I want to build a metronome to play off a laptop with a graphical display (i.e. flashing red & green LEDs)and adjustable digital display. It should also support playlists - basically made up of song titles and the associated meters.

The playlist items would be easily added, edited, and removed.

Why? I play in several bands and have to call out the count for each tune within <3-5 seconds. Programmed playlists for different occassions make this a snap. I currently use a small electronic metronome but I've used up all its memory and programming lists on it is a pain. A laptop solution would provide the flexibility I need.

Anyone come across anything like this?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Nov 06, 2007 12:08 am

moxman,

There is a MikMod external now, for Mac OS X, which would be perfect for this task. You can find it at
http://andregarzia.com/revmikmod.html

Of course, you can also use QuickTime, but that will probably give you less accuracy.

You may also embed sounds inside Revolution and use the play audioClip command. You might get good results with that, if the clip is short.

Making a basic metronome should be fairly easy.

Code: Select all

on mouseUp
  set the cSwitch of me to not (the cSwitch of me is true)
  ticktack
end mouseUp

on ticktack
  if the cSwitch of me is true then
    play audioClip id 20001
    send "ticktack" to me in 750 millisecs
  end if
end ticktack
This gives you a very basic metronome with 80 beats/minute. You can turn the button in to a checkbox and set the hilite to cSwitch (or the reverse) and add a slider to change the speed (replace 750 with a global variable or user property).

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Nov 06, 2007 3:12 pm

The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

moxman
Posts: 5
Joined: Mon Nov 05, 2007 7:30 pm

Post by moxman » Tue Nov 06, 2007 6:38 pm

Cool! I'll give it a try. Thanks

moxman
Posts: 5
Joined: Mon Nov 05, 2007 7:30 pm

Post by moxman » Tue Nov 06, 2007 6:45 pm

hmm.. the MikMod only runs on Mac OSX? Too bad - it looks good but that's a non-starter for me.

What drew me to RunRev a long time ago was its cross-platform compatability. My target platform is my EeePC sub-compact laptop that runs on Linux. If I can pull this off it will be way cool!

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Post by Mark Smith » Fri Nov 09, 2007 3:16 am

I've uploaded a basic metronome stack to RevOnline:

Name: Metronome
User: Mark Smith
Category: General

It uses the 'beep' command, so if you have that set to some long sound, it might not be ideal.

moxman
Posts: 5
Joined: Mon Nov 05, 2007 7:30 pm

Post by moxman » Fri Nov 09, 2007 4:29 pm

Mark - Nice Job!
It works well on my machine.. and looks cool as well.

Thanks for the 'heads up'!

moxman
Posts: 5
Joined: Mon Nov 05, 2007 7:30 pm

Post by moxman » Fri Nov 09, 2007 4:56 pm

Have I got that right about MikMod?
Does the external and software only work on the Mac?
Or is it just that you have to build it on the Mac - and then it can be run on other platforms?

conde
Posts: 51
Joined: Sun Nov 27, 2011 10:41 am

Re: Metronome?

Post by conde » Sun Nov 27, 2011 1:01 pm

Mark Smith wrote:I've uploaded a basic metronome stack to RevOnline:
Name: Metronome
User: Mark Smith
Category: General
It uses the 'beep' command, so if you have that set to some long sound, it might not be ideal.
Does anyone know where to find this metronome stack. or where to find Mark Smith?

Thanks in advance

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Metronome?

Post by Mark » Sun Nov 27, 2011 1:10 pm

Hi,

There are multiple Mark Smiths. I'm not entirely sure about it, but I believe that the Mark Smith you are looking for is the same Mark Smith as as on this Wikipedia page.

I can't find the Metronome stack either.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply