Finished Audio Unit for Logic Pro 9 on Mac OS X 10.5.8 (i386).
Mirrored white spectrum on a black 640x480 window for an external monitor on the master / stereo out. Audio passes through unchanged.
Built for Procesos Analogicos de Occidente (vinyl cutting).
Validated with auval and used in Logic on the cutting-room iMac.
Download the prebuilt component from the latest release:
PAO-Spectrum-1.0.0-Logic9-i386.component.zip
All releases: https://github.com/fabdelamora/PAO-Spectrum-Xcode3/releases
-
Unzip
PAO-Spectrum-1.0.0-Logic9-i386.component.zip -
Copy
PAO Spectrum.componentto:~/Library/Audio/Plug-Ins/Components/(or
/Library/Audio/Plug-Ins/Components/) -
Restart Logic 9
-
Stereo Out > Insert > Audio Units > Procesos Analogicos > PAO Spectrum
Optional check:
auval -v aufx SpcM PAnA
# should end with: AU VALIDATION SUCCEEDED| Field | FourCC |
|---|---|
| Type | aufx |
| Subtype | SpcM |
| Manufacturer | PAnA |
Parameter Altura (0.25-4.0): how high the bars reach. Display only; does not change audio.
This repository is the full Xcode 3.1.4 project used to build that component (Core Audio SDK + Leopard shims included). Use it if you want to change the look, rebuild, or hack on it.
| Piece | Version |
|---|---|
| OS | Mac OS X 10.5.8 |
| Xcode | 3.1.4 (not 3.2.x) |
| Arch | i386 |
- Open
PAO Spectrum.xcodeproj - Configuration: Release
- Build > Clean All, then Build (
Cmd+B) - Install
build/Release/PAO Spectrum.componentas above
Short Spanish notes: LEEME.txt
PAO-Spectrum-Xcode3/
|-- README.md
|-- LEEME.txt
|-- LICENSE / NOTICE
|-- exports.exp
|-- PAO Spectrum.xcodeproj/
|-- Resources/Info.plist
|-- Source/ # plugin DSP + Cocoa UI
|-- SDK/ # CoreAudioSDK + LeopardShims
`-- tools/
Almost all visual changes live in Source/CocoaUI/SpectrumView.m.
Window size is set in Source/CocoaUI/SpectrumViewFactory.m.
Bar count / FFT live in Source/PAOSpectrum.h (+ matching kNumBars in the view).
Source/CocoaUI/SpectrumViewFactory.m:
NSRect frame = NSMakeRect (0, 0, 640, 480);Change 640 / 480 for another fixed size.
In SpectrumView.m ? -drawRect::
| What | Where |
|---|---|
| Background | [[NSColor blackColor] set]; then NSRectFill (bounds); |
| Bar color | [[NSColor whiteColor] set]; before drawing bars |
| Margins | padX, padTop, padBottom |
| Bar thickness | barW = slotW * 0.42f (raise toward 1.0 for thicker bars) |
| Mirror | bars are drawn as centreY - halfH - remove the lower half for a single-sided meter |
Example - dark red bars on near-black:
[[NSColor colorWithCalibratedRed:0.05f green:0.05f blue:0.05f alpha:1.0f] set];
NSRectFill (bounds);
/* ... */
[[NSColor colorWithCalibratedRed:0.85f green:0.15f blue:0.12f alpha:1.0f] set];In -initWithFrame:audioUnit::
mTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 / 45.0 ...45.0 is frames per second. Lower = less CPU; higher = smoother.
Source/PAOSpectrum.h?kNumberOfBars = 64Source/CocoaUI/SpectrumView.m?kNumBars = 64(must match)Source/CocoaUI/SpectrumView.h?float mBars[64];(same size)
FFT resolution: kFFTOrder / kFFTSize in PAOSpectrum.h.
Still in SpectrumView.m -initWithFrame:audioUnit: (slider creation) and the "altura" label in -drawRect:.
Parameter range is defined in PAOSpectrum.cpp ? GetParameterInfo (minValue / maxValue / name "Altura").
Rebuild Release on the iMac, reinstall the .component, restart Logic.
| Symptom | Check |
|---|---|
| Only "Apple" under Audio Units | .rsrc must declare i386 (i386_YES in PAOSpectrum.r) |
| Logic: "Incompatible Audio Units" | Run auval -v aufx SpcM PAnA |
| Version mismatch Res/Comp | Version() must return 0x00010000 |
Linker: _PAOSpectrumEntry: No such file |
EXPORTED_SYMBOLS_FILE = exports.exp |
| Tiny ~24 KB binary, no Entry | DEAD_CODE_STRIPPING = NO + exports.exp |
This repo has two license scopes:
| Path | License |
|---|---|
Source/, Resources/, SDK/LeopardShims/, tools/, project, docs/, README |
MIT - see LICENSE |
SDK/CoreAudioSDK/ |
Apple sample-code terms - see NOTICE and headers in that tree |
The prebuilt .component in the release mixes both: your use of the plugin binary is fine under normal AU use; if you redistribute source that still contains SDK/CoreAudioSDK/, keep Apple's notices.
