• 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
Re: Sequence position display
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sequence position display


  • Subject: Re: Sequence position display
  • From: Patrick Gostovic <email@hidden>
  • Date: Wed, 20 Aug 2003 16:43:46 -0400

On Wednesday, August 20, 2003, at 04:13 PM, Philippe Wicker wrote:

On Wednesday, August 20, 2003, at 09:32 PM, Patrick Gostovic wrote:

Hi.

I'm hoping to get some ideas on how to implement a song position display (i.e. bars/beats or time) for a sequencing app. I'm using the MusicPlayer api, and my first hope was that I would be able to specify some kind of notification callback function. I don't see anything in the api for that (correct me if I'm wrong), so as far as I can tell I have two options: 1) poll the MusicPlayer fairly often and update the display as needed, or 2) create a metronome track in the sequence and aim it at MIDIEndpoint that can advance the display. The first option seems clumsy to me, and the second option seems like overkill.

I've not used the MusicPlayer since a long time so I don't know if there is a direct way to get what you want. Anyway, the idea of polling the player is not so clumsy. Notification of AU parameter changes is based on a timer which fires at regular time interval. You could create a timer run loop source and attach this source to your UI run loop. Using a timer period of 50 ms or 100 ms should do it.

Is option 2 an expensive way to achieve this? I don't have a lot of experience with CoreMIDI so I don't know.

Should not be overkill. If your "clock" resolution is e.g. 24 PPQ (same as the midi clock), it will give you a tick about every 12.5 ms at 200 bpm (which is a fast tempo). That means that you will receive one midi event every 12.5 ms. Not so much.

Really? That's reassuring because I just tried it this way at 4 PPQ (16th notes anyway) and it seems ok. I guess I'm kind of gun-shy as a result of using Max/MSP on OSX, which in my experience chokes when setting events at even fairly modest intervals.


The true problem with the use of a MIDIEndpoint is that it cannot be private (AFAIK), and that your midi clock may be polluted with midi events coming from any other apps running on the machine (because this endpoint will appear as a destination to all midi clients and may be chosen accidentally by the user).

Yes, this is what I have discovered. It is a bit ugly... I suppose I could name the virtual port "Don't Use Me!" or something :).

I think I'll try the polling way...

Thanks.



Any thoughts?

Thanks.

pg
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


Philippe Wicker
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Sequence position display
      • From: Philippe Wicker <email@hidden>
References: 
 >Re: Sequence position display (From: Philippe Wicker <email@hidden>)

  • Prev by Date: Re: Sequence position display
  • Next by Date: Re: dumb idea
  • Previous by thread: Re: Sequence position display
  • Next by thread: Re: Sequence position display
  • Index(es):
    • Date
    • Thread