PURE DATA forum~

...that deal with pure data

You are not logged in.

#1 2010-03-06 22:43:09

firebrandboy
Member

Smoothing Values

Complete newb here. I'm using the analog inputs from an arduino to send midi cc into Ableton. However, the values jump from one to another and aren't smooth at all. Is there any way to make this smoother? And also, is there an easy way to turn on and off data flow to a ctlout object? Basic questions I'm sure... I've attached my patch.

Offline

 

#2 2010-03-06 23:04:32

nestor
Member

Re: Smoothing Values

Interpolation might be appropriate, or "lowpass".  Googling interpolation should give you some hits showing you how to implement cubic or sine interpolation, but that is expensive.  Easier way is to "lowpass" the signal by using [average].

Offline

 

#3 2010-03-07 00:44:32

firebrandboy
Member

Re: Smoothing Values

Thanks for the quick response. I'm noticing latency in general with my arduino and more so when using average. Is there any way around this or is there anything I could optimize to improve this? I should mention that I'm using firmata and Pduino.

Last edited by firebrandboy (2010-03-07 00:46:51)

Offline

 

#4 2010-03-08 15:59:44

sonsofsol
Member

Re: Smoothing Values

try the smooth object,
but it sounds like something is wrong with the arduino. do you have rubber pads on the circuit? my arduino sends crappy data when its lying on its circuit surface even on a paper ground. could be just a matter of creepy electicity ;)
and you should definitly not have reasonable latency. use *analog firmata*, when only working with the analog pins.
dataflow you turn on or of with a spigot object.

Last edited by sonsofsol (2010-03-08 16:07:22)

Offline

 

#5 2010-03-08 20:17:19

nestor
Member

Re: Smoothing Values

I also noticed latency when using firmata, which Is why I switched to dedicate firmware.

Offline

 

#6 2010-03-09 00:23:22

jonk
Member

Re: Smoothing Values

Im using pretty much the same setup as you are. When I put a delay on 100 or 200 milliseconds in the arduino-code I get much less jumping parameters in Ableton.

Anyone who knows how to make such a delay in PD? Is there some way to open and close the line between two objects, like some kind of toggle-button that then can be turned quickly on and off using a metro object.

The reason why I need that is that I also have a piezo connected to the arduino and it doesnt work with a delay in the arduino code, if I hit it sends a signal so quicky that it is missed with a delay.

Hope its ok that I jump in with questions in your thread firebrandboy...

Offline

 

#7 2010-03-09 00:47:01

slur
Member

Re: Smoothing Values

try speedlim, pipe, lop or iir_lop


pd redefining mathematics |expr fact(0)|==0

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson


pd.webring info