• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Creating a metronome... some questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a metronome... some questions


  • Subject: Creating a metronome... some questions
  • From: Peter Rebholz <email@hidden>
  • Date: Wed, 5 Mar 2008 11:37:13 -0600

Greetings, 

I've been trying to figure out the best way to implement a metronome. My initial design was to programatically create a Music Sequence by:

1) adding all the tempo changes to the tempo track
2) looping through the duration of the track adding a MIDI note event on every beat.

For the most part this works fine if the assumption is made that the user doesn't want anything fancy like a tick for eight notes instead of quarters or to have the first beat of a measure accented.

To add an accent to the first beat I need to know the time signature changes through the song. From the API I don't think there is a (obvious) way to add this to the tempo track of a MusicSequence, however, I did notice when playing around with the PlaySequence example that my test MIDI file did have a time signature in it. Is there any way to utilize this? Here is the output from CAShow() where I noticed this:

NumTracks = 8, Type = beats
* * TempoTrack * *
SequenceTrack @0x101d70
Num Events: 2, Track Length: 0.00 beats
0.000: Tempo:160.000
0.000: Time Sig:4/4, 24 clks/qtr, 8 32nds/clk

Alternatively, I began looking into using a CAClock along with the MusicSequence to keep track of the time changes and use the information available in CAClock to populate the MIDI note events on the sequence.

Am I heading in the right direction or way off base? This is more or less a hobby for me and I don't really have any background in audio programming so I wouldn't be surprised if I'm way off here.

One last question, could anyone suggest a good book to get me on the right track with this stuff?

Thanks in advance,
Peter

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Creating a metronome... some questions
      • From: William Stewart <email@hidden>
    • Re: Creating a metronome... some questions
      • From: Mark Pauley <email@hidden>
  • Prev by Date: definitions of Float32, others
  • Next by Date: Re: definitions of Float32, others
  • Previous by thread: RE: Sidechain input for AU effect
  • Next by thread: Re: Creating a metronome... some questions
  • Index(es):
    • Date
    • Thread