• 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
Playing SMF midi files - another approach?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Playing SMF midi files - another approach?


  • Subject: Playing SMF midi files - another approach?
  • From: Ian OKeeffe <email@hidden>
  • Date: Thu, 01 Dec 2005 16:12:43 +0000
  • Thread-topic: Playing SMF midi files - another approach?


All,

I have found an example piece of code that plays a quicktime movie, and by
replacing the movie with a MIDI file, it plays. The only problem is that the
movie needs to be in the bundle, rather than being played from a specified
file location. Is it possible to play a local file (i.e. In the same
directory/folder as the app.), or one on the same machine?

I got the code here:
http://www.macdevcenter.com/pub/a/mac/2003/08/15/quicktime_cocoa.html?page=1


- (void) awakeFromNib
{
NSURL *Example_URL;
NSMovie *Example_Movie;

//+
// Load the movie from within the current Bundle
//-

Example_URL = [NSURL fileURLWithPath: [[NSBundle mainBundle]
pathForResource: @"invent3DM" ofType: @"mid"]];
Example_Movie = [[NSMovie alloc] initWithURL: Example_URL byReference:
YES];
Quicktime_Movie = [Example_Movie QTMovie];


If I need to submit an URL for a file, how do I find out what it is on a
Mac?

Kind regards,

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: Playing SMF midi files - another approach?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: How to Get Image out of NSOpenGLView using offline renderer.
  • Next by Date: NSPopUpButton binding
  • Previous by thread: Re: NSComboBox Coredata bindings
  • Next by thread: Re: Playing SMF midi files - another approach?
  • Index(es):
    • Date
    • Thread