cut-off zero crossing

Feb 18, 2008 at 3:08pm

cut-off zero crossing

Hi all,
Does somebody knows how to cut the zero crossing points of a signal input in real time?
i try to get a signal without zerocrossing point and didn’t found anything on that subject.. this is actually something i quickly seen on supercollider, and i’m sure its possible to do it on max too.

thanks

freeka

#35872
Feb 19, 2008 at 3:41am

i’m not sure what you are after, but if it’s a way of cutting a signal off at a zero crossing instead of at an arbitrary point (causing a click), sah~ is a suitable candidate.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 204 52 26 196617 330;
#P user scope~ 37 215 167 345 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P user scope~ 373 225 503 355 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P toggle 286 116 15 0;
#P newex 286 142 29 196617 sig~;
#P newex 269 215 41 196617 *~ 0.1;
#P newex 269 187 27 196617 *~;
#P newex 269 98 64 196617 cycle~ 1.34;
#P toggle 221 116 15 0;
#P newex 221 142 29 196617 sig~;
#P newex 221 164 31 196617 sah~;
#P newex 204 215 41 196617 *~ 0.1;
#P user ezdac~ 220 273 264 306 0;
#P newex 204 187 27 196617 *~;
#P newex 204 98 64 196617 cycle~ 1.34;
#P connect 1 0 13 0;
#P connect 14 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 9 0 2 0;
#P connect 3 0 2 0;
#P connect 6 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 1 1;
#P connect 0 0 4 1;
#P connect 9 0 2 1;
#P connect 3 0 2 1;
#P connect 14 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 11 0 10 0;
#P connect 10 0 8 1;
#P connect 8 0 12 0;

#122834
Feb 19, 2008 at 11:46am

hello,
thanks for your reply

Sorry i think my explications are not really good, i’m trying to get my signal looking like on that picture..

Any idea????

zank you
[img]index.php?t=getfile&id=1207&private=0[/img]

#122835
Feb 19, 2008 at 12:04pm

#122836
Feb 19, 2008 at 2:06pm

hey thanks & merci Emmanuel
actually its not really what i’m trying to get,
i tried to move your float object between 0 and 1, and it was sounding more like a heavy waveshaping for me, when i look on the scope~ i still got the zero crossing points ( or maybe its the scope~ who show it like that.. i dunno)

what i seen on supercollider was a signal with nothing in the middle of the sinusoidal signal (exactly like on second schema of the pict i joined on my other message) and what i heard was really sounding different than a waveshaping or a distortion,the input was a voice and it was more sounding like a digital kazoo at the end :)

i totally dunno supercollider but does the supercollider patch can help????

thanks
freeka

#122837
Feb 19, 2008 at 3:23pm

#122838
Feb 19, 2008 at 3:43pm

if its talking to somebody…

(
Synth.scope({
var in, fx;

in = AudioIn.ar(1, 2);

fx = Pan2.ar(Pulse.ar(ZeroCrossing.ar(in), MouseY.kr(0.001, 0.99),
Amplitude.kr(in)),-0.5);

[in, in,fx.at(0), fx.at(1)]

})

)

#122839
Feb 19, 2008 at 3:59pm

Quote: freeka wrote on Tue, 19 February 2008 16:43
—————————————————-
> if its talking to somebody…
>
>
> (
> Synth.scope({
> var in, fx;
>
> in = AudioIn.ar(1, 2);
>
> fx = Pan2.ar(Pulse.ar(ZeroCrossing.ar(in), MouseY.kr(0.001, 0.99),
> Amplitude.kr(in)),-0.5);
>
> [in, in,fx.at(0), fx.at(1)]
>
> })
>
> )

this is a pitch tracker based on zero-crossings, controlling the frequency of a pulse wave. The pulse width of the pulse wave is controlled by the mouse y.

use a pitchtracker such as fiddle or pitch to control the freq of rect~ and set the mouse up to control the width.

good luck,
kjg

#122840
Feb 26, 2008 at 9:50am

freeka schrieb:
> hello, thanks for your reply
>
> Sorry i think my explications are not really good, i’m trying to get
> my signal looking like on that picture..

That picture doesn’t make sense to me, there is always some signal
value, even if its zero. If you go from plus to minus there is a zero
crossing, you can’t avoid it even not with supercollider. But maybe you
are after zerox~? that at least will count you the zero crossings…

And if its about pitch tracking, as your sc code suggests, that would
only work with pretty simple waveforms, but might be sufficiant for you…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#122841
Feb 26, 2008 at 12:07pm

hey thanks everybody!

i’m not really a dsp boss so maybe i missunderstanding the first explication i had .
anyway what is important for me is how that supercollider patch was sounding good..

Maybe its only a pitch tracking thing, in that case
does somebody have an example patch??
i tried to do something with the fiddle and rect~ as somebody advised me but it wasn’t sounding close of what i heared maybe i made it wrong..

danke you

#122842

You must be logged in to reply to this topic.