• 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
MIDI pan message (CC#10) to kControllerPan in QTMA
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MIDI pan message (CC#10) to kControllerPan in QTMA


  • Subject: MIDI pan message (CC#10) to kControllerPan in QTMA
  • From: "Cianflone, Chris" <email@hidden>
  • Date: Wed, 28 Jan 2004 01:04:39 -0600
  • Thread-topic: MIDI pan message (CC#10) to kControllerPan in QTMA

Hi all,

What is the recommended way to map MIDI pan messages, which usually have the following meaning, (see recommended practice at http://www.midi.org/about-midi/rp36public.pdf for more info):

MIDI Value 0 - pan hard left
MIDI Value 1 - pan hard left
MIDI Value 64 - pan center
MIDI Value 127 - pan hard right

to controller values suitable for NASetController() in QuickTimeMusic.h? The header mentions the following somewhat odd comment:

/* 0 - "default", 1 - n: positioned in output 1-n (incl fractions) */

and the apple developer website (see http://developer.apple.com/documentation/QuickTime/REF/tp_qtma_qtmaref.a.htm) mentions the following:

kControllerPan
This controller controls balance on the QuickTime music synthesizer and some others. Values are 256-512, corresponding to left to right.

So is this correct? I would assume 384 is then considered "center". This has the problem of trying to map 127 (63 values for left, 1 for center, 63 for right) discrete values to 257 values (128 values for left, 1 for center, 128 for right) which is not going to give you a linear list of discrete numbers. Ideally I would just like to say

long controllerPanValue = 384 + (MAX(0,MIDIPanValue-1) - 63)*2;

but that only maps 1-127 into the range 258 to 510. Is that good enough and I should just special case the ends so that 1 --> 256 and 127 --> 512 or should I round the exact answer and just end up with a non-linear list of discrete points as follows:

long controllerPanValue = ROUND( 384 + (MAX(0,MIDIPanValue-1) - 63)*128.0/ 63.0);

Of course, I realize that the audible difference here is probably not worth worrying about, but I just wanted to know how others may have handled this and what the real scoop is on the range of values for kControllerPan.

Thanks,
Chris

Chris Cianflone
Software Engineer
MakeMusic!, Inc.
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.

  • Prev by Date: Re: Altivec FFT
  • Next by Date: Re: Streaming OS X audio over network
  • Previous by thread: Re: Changing published parameters list.
  • Next by thread: Using NSMutableData for an audio buffer?
  • Index(es):
    • Date
    • Thread