• 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: Apple DLS only audible on first few instruments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple DLS only audible on first few instruments


  • Subject: Re: Apple DLS only audible on first few instruments
  • From: Bill Stewart <email@hidden>
  • Date: Mon, 2 Jun 2003 17:24:34 -0700

not strictly true -

It just means that your start note will be slower to execute as the instrument wasn't prepared... and this is highly undesirable as that generally means the preparation is done in the render thread itself and this can lead to "not good things" happening

Bill

On Monday, June 2, 2003, at 03:31 PM, Chris Rogers wrote:

You need to call MusicDevicePrepareInstrument() before
an instrument will be ready to play with MusicDeviceStartNote().
This is similar to a program change in the MIDI world before sending
note-on MIDI events...


Chris Rogers
Core Audio
Apple Computer

On Monday, June 2, 2003, at 01:08 PM, Daniel Jalkut wrote:


[....]
- (MusicDeviceInstrumentID) instrumentIDForIndex:(short)index
{
OSStatus anyError;
UInt32 size = sizeof(MusicDeviceInstrumentID);
MusicDeviceInstrumentID instrumentID;

// Get the InstrumentID for this index
anyError = AudioUnitGetProperty([self nativeMusicDevice],
kMusicDeviceProperty_InstrumentNumber, kAudioUnitScope_Global, index,
&instrumentID, &size);
if (anyError != noErr)
{
NSLog(@"RSMusicDevice: instrumentIDForIndex failed to get
instrument
at desired index.");
instrumentID = 0;
}
return instrumentID;
}


This is the right code, and I went back and dumped all instrument
ID's and found that I do get values like the ones you saw -
instrument ID: 0x0
instrument ID: 0x80000
instrument ID: 0x100000
instrument ID: 0x1
instrument ID: 0x80001
instrument ID: 0x2
instrument ID: 0x80002
instrument ID: 0x3
instrument ID: 0x80003
instrument ID: 0x4
instrument ID: 0x80004
instrument ID: 0x100004

...but these all work for me.

A difference is that I don't use MusicDeviceStartNote(), I set the
instrument and patch with three calls to MusicDeviceMIDIEvent().

Perhaps someone else on the list who uses MusicDeviceStartNote()
successfully
for these instruments can respond? I'd expect that this call is just
sending
the same low-level midi messages using bytes from the ID, so it should work
the same. However if you want the midi-event patch-setting code let me know and

I'll send or post it.

- Christopher
_______________________________________________
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.


-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
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: Apple DLS only audible on first few instruments
      • From: Daniel Jalkut <email@hidden>
References: 
 >Re: Apple DLS only audible on first few instruments (From: Chris Rogers <email@hidden>)

  • Prev by Date: Re: Apple DLS only audible on first few instruments
  • Next by Date: Re: Is running an idle graph considered expensive?
  • Previous by thread: Re: Apple DLS only audible on first few instruments
  • Next by thread: Re: Apple DLS only audible on first few instruments
  • Index(es):
    • Date
    • Thread