[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] linux - hacking UGens



On Wed, 20 Oct 2004 15:18:53 +0200
Till Bovermann <tboverma@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

 I think, you are aware of the Building_UGens (or something like that)
 helpfile...
 It is written for OSX xcode, but there you will get a hint about
 general coding of UGens, too.

 Thats all I am aware... :-(

Hi,

thanks for the tip although i already found that helpfile (it's called
"Writing_Unit_Generators", just in case someone stumbles over this thread in
the archives). There's also another one called "UGen-Plugins" which has an
example sourcecode, but this code looks weird (quite heavy macro use, i
think. macro's are pure evil when it comes to readability/understanding
other people's code):

<quote>
void Latch_Ctor(Latch *unit)
{
	if (INRATE(1) == calc_FullRate) {
		SETCALC(Latch_next_aa);
	} else {
		SETCALC(Latch_next_ak);
	}

	unit->m_prevtrig = 0.f;
	unit->mLevel = 0.f;

	ZOUT0(0) = 0.f;
}
</quote>

not having _any_ comments in that example doesn't really help either.

just to mention one thing that is really useful: cmd-click on the makro code (or function definition) brings you to where it's defined.
--








.