This experiment with Constant Q Transform was interesting, and it's nice to see that it actually functions, but it's just too damn slow to really be useful for visualization purposes. It uses nearly a full core on an M1 processor, and I'd hate to see what it does on an Intel machine. Stashing this in a branch and discarding it from the main tree, in case somebody finds this code useful some day. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
26 lines
530 B
Objective-C
26 lines
530 B
Objective-C
//
|
|
// VisualizationController.h
|
|
// CogAudio Framework
|
|
//
|
|
// Created by Christopher Snowhill on 2/12/22.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface VisualizationController : NSObject {
|
|
double sampleRate;
|
|
float visAudio[4096];
|
|
}
|
|
|
|
+ (VisualizationController *)sharedController;
|
|
|
|
- (void)postSampleRate:(double)sampleRate;
|
|
- (void)postVisPCM:(const float *)inPCM amount:(int)amount;
|
|
- (double)readSampleRate;
|
|
- (void)copyVisPCM:(float *)outPCM visCQT:(float *)outCQT;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|