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

[sc-dev] DemandEnvGen gate inconsistency



Hi -

The DemandEnvGen helpfile says of its gate input:

	if gate is x >= 1, the ugen runs
	if gate is 0 > x > 1, the ugen is released at the next level (doneAction)
	if gate is x < 0, the ugen is sampled end held

whereas the source code says

	float zgate = ZIN0(d_env_gate);
	if(zgate >= 0.5f) {
		unit->m_running = true;
	} else if (zgate > 0.f) {
		unit->m_running = true;
		release = true;  // release next time.
	} else {
		unit->m_running = false; // sample and hold
	}

so the upper threshold is 0.5, not 1.0. I don't use this ugen and
don't care which threshold is used, but it should be consistent.
Should the doc be changed, or the unit?

Dan
-- 
http://www.mcld.co.uk

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/