Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAO Spectrum

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.

PAO Spectrum running in Logic Pro 9


Install (recommended)

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

  1. Unzip PAO-Spectrum-1.0.0-Logic9-i386.component.zip

  2. Copy PAO Spectrum.component to:

    ~/Library/Audio/Plug-Ins/Components/
    

    (or /Library/Audio/Plug-Ins/Components/)

  3. Restart Logic 9

  4. 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.


Source code

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

Build from source (iMac)

  1. Open PAO Spectrum.xcodeproj
  2. Configuration: Release
  3. Build > Clean All, then Build (Cmd+B)
  4. Install build/Release/PAO Spectrum.component as above

Short Spanish notes: LEEME.txt

Repository layout

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/

Customize the view

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).

Window size (640x480)

Source/CocoaUI/SpectrumViewFactory.m:

NSRect frame = NSMakeRect (0, 0, 640, 480);

Change 640 / 480 for another fixed size.

Colors and bar look

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];

Refresh rate

In -initWithFrame:audioUnit::

mTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 / 45.0 ...

45.0 is frames per second. Lower = less CPU; higher = smoother.

Number of bars

  1. Source/PAOSpectrum.h ? kNumberOfBars = 64
  2. Source/CocoaUI/SpectrumView.m ? kNumBars = 64 (must match)
  3. Source/CocoaUI/SpectrumView.h ? float mBars[64]; (same size)

FFT resolution: kFFTOrder / kFFTSize in PAOSpectrum.h.

Hide or restyle the Altura slider

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").

After changing the view

Rebuild Release on the iMac, reinstall the .component, restart Logic.


Troubleshooting (rebuild)

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

License

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.

About

Finished i386 Audio Unit spectrum display for Logic Pro 9 on Mac OS X 10.5.8. Working in Logic; source + Xcode 3.1.4 project. Procesos Analogicos de Occidente.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages