[PD] triggered oscilloscope/bang on zero crossing?

Roman Haefeli reduzierer at yahoo.de
Wed Dec 9 01:03:38 CET 2009


On Wed, 2009-12-09 at 00:40 +0100, Derek Holzer wrote:
> I'm trying to put together a simple oscilloscope abstraction that 
> imitates the "trigger" function of a real one, so that the waveform can 
> be seen from its starting point.  In other words, a [tabwrite~] would 
> graph on the upward swing of a zero crossing. To do this, I'd like to 
> know if there is an audio object which gives a bang at a zero crossing, 
> or perhaps even only at a crossing from the negative to the positive 
> domain of the signal. I've thought of something with [expr~ $v1 < 0], 
> but what comes out is still in the audio domain and isn't the bang which 
> [tabwrite~] needs.
> 
> Other suggestions welcome.

It would be nice to be able to do something like that. Two problems need
to be overcome first:

* I don't know of any object class, that creates timed[1] messages from
an audio signal. All object classes I can think of convert
signal->message either triggered by a message like [vsnapshot~] or
triggered by an internal [metro] (like [env~]/[avg~]). We would
definitely need an object class, that generates timed messages according
to the signal input without requiring any message. I haven't seen such a
thing yet.

* [tabwrite~] only starts writing on block boundaries. The desired
behaviour in this case _could_ actually be emulated by delaying the
signal in a manner, so that the zero-crossing is shifted exactly on
block boundaries. However, it would be more straight-forward, if there'd
be something like a [vtabwrite~].

Probably I am just uncreative and there actually _is_ a way. If so, I
definitely want to learn it!

Roman



[1] by 'timed' I am referring to the mechanism used by [vline~] and co
to get accurate timing. 





More information about the Pd-list mailing list