Topic: Audio output chain: customisable with Audio Units?

I would like to see in Cog the ability to apply Audio Units effects to the outgoing sound.

This would allow me to apply a convolver, in order to do some equalisation (digital room correction and more).
Not only, this would save cpu power: I can get the same result even now, but the sound has to be routed from Cog to Soundflower, then to AU Lab, then to Soundflower, then to the audio card. The effect? 50% cpu power used only for the audio routing and processing, while the convolver itself (LAconvolver) takes less than 10%.
Not only, setting up this audio chain takes quite a bit of time! three programs to set up every time... (AU Lab, soundflower, system preferences for the audio output).

Under windows Foobar2000 has something similar (they also ship the effects), the idea here is not to develop the code for the Aunits and effects, but only the routing engine.

Re: Audio output chain: customisable with Audio Units?

Last edited by haleakalari (2007-07-23 11:34:06)

Re: Audio output chain: customisable with Audio Units?

I've been thinking about it a little. I haven't looked into how easy it is to create audio unit effects yet. One of the reasons Cog has input plugins is becasue the Quicktime component system has a notoriously bad API.

Re: Audio output chain: customisable with Audio Units?

Re: Audio output chain: customisable with Audio Units?

The chain is currently:
source->decoder->converter->output

Both converter and output are CoreAudio. I have looked into AudioUnits yes, but I don't know if I want to make them a replacement for effects plugins or if there will be an seperate effects plugin system and have some kind of AudioUnit effects plugin that can load audio units.

Quicktime isn't used anywhere at the moment. In the future, I plan on making a decoder that used the audio extraction Quicktime API's. I don't plan on quicktime becoming an integral part of Cog.

Re: Audio output chain: customisable with Audio Units?

Maybe I don' have the complete picture in my mind, but... if there are no effects plugins yet, where is the problem in having Cog support ONLY audio units plugins?
There are advantages: you have a simpler source code (most of the work should be done by the Apple framework, you only have to pass the sound data and set up the frames size, to adjust delay), and many more effect would be available on the Net.
Not only, people writing effects "for" Cog would automatically have their code available in other Mac OS X applications.

Obviously, I am not an expert developer, moreover I gave a look at the Cog sources only once, so my ideas could be not applicable to this situation.

Last edited by olafmarzocchi (2007-07-25 00:26:17)

Re: Audio output chain: customisable with Audio Units?

Like I said, it depends on how easy it is to write AudioUnits. I have yet to look into it. Effects are likely not a part of 0.07.

It's the same reason I don't use Quicktime Components for my decoder plugins. Quicktime components are a major pain to write.

I'd like Cog to be easy to extend, which includes using Cocoa for the plugin APIs.

Re: Audio output chain: customisable with Audio Units?

Any progress on this one ???
It would be soooo coool to have the AU support in Cog!
Im a musician not a developer so unfortunately I cant really put my shoulder to the wheel on this one...

Re: Audio output chain: customisable with Audio Units?

bumping this again... because it would be amazing to have audio unit support. i mean i'm content with cog 0.07 on my tiger box and the 0.08 builds on my leopard machine, but having audio unit support in either (hopefully both wink) version(s) of cog, would complete the "cog experience" for me. audio unit support would be a huge step forward and allow cog to maintain it's minimalist but highly functional aesthetic, while adding a huge host of new options and possibilities.

p.s. sbooth's play supports/hosts audio units... maybe some code could be utilized from there?

Last edited by haleakalari (2008-11-04 12:35:02)

Re: Audio output chain: customisable with Audio Units?

Be careful, Play is bugged, I just tried it and it doesn't work well.

Re: Audio output chain: customisable with Audio Units?

No offence but I think Cog has been designed with the vision of providing simple playback of audio files with encodings other than Quicktime supported formats such as the ones iTunes refuse to support. I also think the development cost required to support this request for 0.1% of users is rather low on priority.

I think if your room is poorly designed and requires correction it may be worth employing a studio designer/acoustics engineer to solve your room's problems. I've not been to an operational studio yet that uses the kind of software you mention to correct nodes/anodes across the frequency spectrum.

Are you an audio engineer or just a regular guy who wants to play their music collection?

Aside from a touch of EQ or mix bus compression on a DJ mix, I don't see why an end user should be messing with music a mix engineer has spent tireless hours perfecting in controlled environment. Even if you really are wishing to mutilate someone else's music, I still believe Cog is not the application to delve in these wild experiments.

Re: Audio output chain: customisable with Audio Units?

Last edited by haleakalari (2008-11-15 11:42:24)

Re: Audio output chain: customisable with Audio Units?

Hi haleakalari

Im well aware of Audio Units. Again I will repeat as you decided to disregard my main point. Audio units belong in apps like Logic, and other such applications created for audio editing, sound design, recording and mixing. Logic and Cog are worlds a part, one is an ipod the other is a recording studio. Now in perspective, chaining my eventide h8000 off the back of my ipod would to me seem like a crazy pointless exercise.

At the not so rapid pace of development Cog has seen, there are certainly higher priorities to get basic functionality sorted out. Adding Audio Units will consume far too much of the developers time and add un-needed bloat to an otherwise simple playback piece of code. After all Cog is a free application.

Re: Audio output chain: customisable with Audio Units?

Actually, Drayon, I use audio-manipulation techniques all the time in my listening.  For example, I sometimes get recordings that are going at the wrong speed -- concert recordings, or my dad's old vinyl transfers before he adjusted the speed on his turntable -- and it's nice to be able to adjust that in real time, on the fly, without having to do a proper speed correction.  Another thing I like to do is sum tracks to out-of-phase mono, aka "karaoke mode", to see what hidden layers can be revealed in recordings I otherwise know well.  And I EQ stuff all the time, given that I listen to many recordings whose fidelity leaves a lot to be desired.  (All these functions are also useful for transcription purposes, too.)

Since I have a lot of stuff in FLAC, doing any of that in Logic or iTunes is out, not to mention the fact that the former takes aeons to boot and the latter is horrendous these days.  I've been using MacAmp Lite, which has all the functionality I mentioned above, but that's an old and mildly unstable program and I don't know if it even works with Leopard.  Audacity is buggy, and more importantly it's not playlist-based -- it has to import everything, which is annoying if you just want to quickly try a few things out.

I'd far rather use Cog for these tasks, if it were possible to do so without adding bloat -- and I get the impression that the amount of code needed to get Cog to interface with Audio Units would be relatively small, because you're not implementing that functionality yourself, just working with an already-existing API.

FWIW, this is coming from a recording engineer and classical musician/composer, and someone who thinks that "end users" are entirely free to "mutilate someone else's music" (!) however they want -- including mine!  I'm kind of bemused by your reverence for the recording/mixing/mastering process, as if end-user interference were a blasphemous idea.

Having seen the inner workings of that process, I assure you that these things aren't handed down on golden tablets from on high, and there have been some terrible decisions made in those booths, more than once.  (Too bad there isn't an "un-limiter/compressor" plug-in.)

No, it can be a lot of fun to do potentially-atrocious things to a recording, and occasionally I've come up with something transformative and beautiful, just by messing around with a half-dozen tracks in all kinds of ways.

Having said all that, I agree that there are higher priorities for Cog right now -- in particular, getting 0.08 out the door.  But I wouldn't pooh-pooh the idea of Audio Units;  assuming it doesn't slow Cog down, it only makes it a more valuable tool, specifically because it allows the end-user to use it in unanticipatable and surprising ways.

Last edited by goldenband (2008-11-17 10:39:31)

Re: Audio output chain: customisable with Audio Units?

Re: Audio output chain: customisable with Audio Units?

I started recently to use Play (no more bugged as it was in the past) because of the support for audio units, but I still look forward to the support for AU in Cog because the concept behind Play (music library) is something I don't like, I prefer the Cog approach.

Re: Audio output chain: customisable with Audio Units?

don't know if this has been mentioned, but a possible workaround is to use something like audio hijack pro, which can take the audio output from cog and run it through your chosen audiounits before sending the result to your speakers.
it does mean having another app running, but i doubt it adds much resource overhead beyond what the audiounits themselves use.

Re: Audio output chain: customisable with Audio Units?

Another option is to set up a sound device with soundflower and use AU Lab from Apple (free) to do the same. I used to do that but it is not a good solution. It also doubles the cpu power used, compared to Play at least!