admsyn / ofxAudioUnit

An openFrameworks addon which makes it easy to work with Audio Units on OSX and iOS
MIT License
120 stars 24 forks source link

Is ofxAudioUnitRecorder functional? #17

Closed jasonlevine closed 10 years ago

jasonlevine commented 10 years ago

Hey Adam,

Just set up some code to record some timelined aumus but nothing is being recorded and I'm not getting any error messages in the console. Please let me know if I'm hooking my AUs up incorrectly or if ofxAudioUnitRecorder is just not functional yet.

Here's my signal chain:

    kit1 = ofxAudioUnitSampler('aumu','CaC2','CamA');
    kit1.loadCustomPreset("kit1");

    kit2 = ofxAudioUnitSampler('aumu','CaC2','CamA');
    kit2.loadCustomPreset("kit2");

    bass = ofxAudioUnitSampler('aumu','CaC2','CamA');
    bass.loadCustomPreset("bass");

    drone1 = ofxAudioUnitSampler('aumu','CaC2','CamA');
    drone1.loadCustomPreset("aqueous_ripples");

    drone2 = ofxAudioUnitSampler('aumu','CaC2','CamA');
    drone2.loadCustomPreset("aquatic_undertow");

    mixer.setInputBusCount(5);

    kit1.connectTo(mixer, 0);
    kit2.connectTo(mixer, 1);
    bass.connectTo(mixer, 2);
    drone1.connectTo(mixer, 3);
    drone2.connectTo(mixer, 4);

    mixer.connectTo(recorder);
    recorder.connectTo(output);

    output.start();

and here's where I try to record:

    if (key == 's') {
        recorder.startRecording("j2xsoundtrack");
    }

    if (key == 'x') {
        recorder.stopRecording();
    }

Thanks man,

admsyn commented 10 years ago

Yepp, that should work, but you'll need to specify a .m4a, and also give it an absolute path.

So recorder.startRecording(ofToDataPath("j2xsoundtrack.m4a"));

Let me know if that does / doesn't work, though.

jasonlevine commented 10 years ago

Aha! solved. Yet when you save an aupreset you don't set an absolute path or add the file extension. I think one way or the other should be consistent across the addon to simplify usage, unless there is a specific reason otherwise. What do you think?

admsyn commented 10 years ago

Yeah for sure, it'd be a breaking change though. The "absolute path" thing is showing ofxAudioUnit's roots as some non-OF code I had written for myself.

FWIW there's two methods for the presets, one explicitly asking for an absolute path + file extension. Still inconsistent, though :)

jasonlevine commented 10 years ago

gotcha. Anyway, just made an awesome video soundtrack with ofxAudioUnit and ofxTimeline! So much cooler than using ableton or cubase or whatever....

On Tue, Jun 3, 2014 at 4:08 PM, Adam Carlucci notifications@github.com wrote:

Yeah for sure, it'd be a breaking change though. The "absolute path" thing is showing ofxAudioUnit's roots as some non-OF code I had written for myself.

FWIW there's two methods for the presets, one explicitly asking for an absolute path + file extension. Still inconsistent, though :)

— Reply to this email directly or view it on GitHub https://github.com/admsyn/ofxAudioUnit/issues/17#issuecomment-45027090.

Jason Levine new media performer + creative coder http://jasonlevine.ca

admsyn commented 10 years ago

Nice! :)