• 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: AU plug-in: Problematic display of Cents as float
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU plug-in: Problematic display of Cents as float


  • Subject: Re: AU plug-in: Problematic display of Cents as float
  • From: Philippe GRUCHET <email@hidden>
  • Date: Tue, 20 Mar 2007 02:54:09 +0100

Hi Michael,

Thank you very much for your quick reply!

I don't believe that this is an issue of units. It's more an issue of the generic cocoa view basing the number of displayed decimal places on the range of the parameter. In leopard, you can use the high resolution flag to force the generic view to use more precision, but this will not really help you in the current OS. It's odd that the carbon and cocoa versions of the generic view behave differently, as they should both be using the same code. I'll take a look at that.

Just use AULab and AUPitch:
- Switch to Carbon Generic View and enter a value such 440.23 for the 'pitch' parameter then type Enter or Return;
- Switch to Generic View: the pitch textfield displays 440;
- Switch again to Carbon: 440


(By switching back and forth, another strange behavior could happen for this AudioUnit.)


Unfortunately, there's not really a workaround other than making your own view. If you guys want more precision, please file a bug or feature request against the generic view and we'll see what we can do to change this in a future release.

I don't think of it as a bug, but rather as a behavior.
Which is strange is that the "AU Validation Tool" reports the following value in Terminal:


Name: pitch
Parameter Type: Cents
Values: Minimum = -2400.000000, Default = 0.000000, Maximum = 2400.000000
Flags: Readable, Writable
-parameter PASS


6 decimals? But the textfield of a generic view (scrollable though) is not wide enough to display a number like -2399.999999
(Unless the generic textfield becomes a 'Parameter Type'. Who knows ;-)


I'd really want this extra precision for retuning an audio source when the QuickTime "Extended Note Event" offers 256 values for a MIDI note.
256 * 12 notes == 3072 values versus 1200 cents for an octave. 3072/1200 == 2.56 is a big difference for alternative temperaments and microtonal scales.
Two decimals as an (optional) extra precision would be terrific.


Thanks anyway!
Philippe
www.open-tuning.com
==================


On Mar 19, 2007, at 2:26 PM, Philippe GRUCHET wrote:
In the Generic Cocoa View of an AudioUnit plug-in:
When setting a parameter to display a floating number in Cents with two decimals (440.55 for example), all work fine if the defined range == 100 cents in total.
For a wider range such -2400 to +2400, the Cocoa view sets the values as integers only, like the pitch parameter in Apple's "AUPitch".
All floats are rounded to the nearest integers (depends of the separator, dot or comma) when typing Enter or Return, or by selecting another textfield:


With a dot:		150.23 -> 150 Cents
With a comma:	150,23 -> 150 Cents

With a dot:		150.89 -> 150 Cents
With a comma:	150,89 -> 151 Cents


Ditto for negative values: With a dot: -89.36 -> -89 Cents With a comma: -89,36 -> -89 Cents

With a dot:		-89.95 -> -89 Cents
With a comma:	-89,95 -> -90 Cents


In the Carbon view of the same plug-in, the floats are well- displayed.
Switching to Generic View in AULab and the floats are displayed as integers!?


In both case, the floats seem to be saved as integers in presets.
When loading a preset in which floats are supposed to be saved, generic Cocoa and Carbon views display them as integers.



Is there a known work-around to display Cents as floats?

Warmest regards,
Philippe Gruchet
_______________________________________________
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:
    • WaveBurner GUI problem
      • From: "john smith" <email@hidden>
References: 
 >AU plug-in: Problematic display of Cents as float (From: Philippe GRUCHET <email@hidden>)
 >Re: AU plug-in: Problematic display of Cents as float (From: Michael Hopkins <email@hidden>)

  • Prev by Date: Re: Stereo Processing
  • Next by Date: WaveBurner GUI problem
  • Previous by thread: Re: AU plug-in: Problematic display of Cents as float
  • Next by thread: WaveBurner GUI problem
  • Index(es):
    • Date
    • Thread