Re: [PD] The (not) doppler distortion (was: overdriven speaker)

2010-11-20 Thread Martin Schied

Hi!

On 20.11.2010 05:25, Mathieu Bouchard wrote:

On Sat, 20 Nov 2010, Martin Schied wrote:

no, sorry, I can't on the quick. but I know for sure that frequency 
modulation only produces harmonics if the carrier and modulator are 
in "simple" relations like 1:5 or your example 200 to 1000.


I think that my reasoning is mostly correct and that our difference is 
that while I'm insisting that periodic signals remain periodic, you 
are insisting that nonperiodic signals remain nonperiodic, or 
something like that.
yes. My thinking of 'non harmonic" distortion is if you have a signal 
whose preceived pitch frequency is harmonically unrelated to the new 
perceived pitch after distortion. So if you had a signal of 100Hz (200, 
300, 400 ... Harmonics) base pitch and add a 70Hz and 130Hz they would 
not fit the old spectrum very well. You will again find a common 'base' 
frequency, for example 10Hz in this case, but 10Hz bands are too small 
in frequencies of 200, 300, 400Hz to be perceived as harmonics. But it's 
difficult to argue about such effects as we had to do many listening 
experiments before...





The correction I made just uses a [delread~].

For example if you have [+~ 1]-[*~ 5]-[+~ 2], you need a [delread~ a 
7], because 1*5+2 = 7.

oh, great indeed :)


it's only because of the slight delay I'd be interested to eliminate. 
But as you also said I don't expect any big difference between the 
delay free case and the vd~ case as the modulations occuring with a 
slight off phase will not sound any different. (however 2ms can be 
quite different for short percussive signals)


Well, it does sound different in some way, but the changes I get by 
changing that delay, are less special than what I get by making that 
effect happen in the first place, instead of not. It makes me think of 
other delay tricks such as comb filters.

I'm curious what you planned...


yep, that's also one of the effects I wanted to eliminate by the 
moving write head.


If you make a "moving write head" thing, though, it needs to be additive,

that's easy doable
and the energy has to get stretched like the derivative of the motion 
(the speed of the head).
or accumulated. there also might happen a supersonic bang (but before, 
there are problem with the sampling theoreme not been met anymore).
The data may have to be spread into a not-very-bounded amount of array 
elements.

its bounds could be set to a fixed maximum, like for [delwrite 1000].

too much to start off for me, I should learn proper c before and know 
more about interpolation (and the internals of pd too).


Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] The (not) doppler distortion (was: overdriven speaker)

2010-11-19 Thread Martin Schied

Hi!

On 19.11.2010 05:33, Mathieu Bouchard wrote:

On Wed, 17 Nov 2010, Martin Schied wrote:

did you speak about the "doppler" distortion? true doppler distortion 
is harmonic for a single sine wave, but not for 2 or more sines of 
different frequencies.


Then can you explain what's wrong in my reasoning ? (the formulas I 
wrote)
no, sorry, I can't on the quick. but I know for sure that frequency 
modulation only produces harmonics if the carrier and modulator are in 
"simple" relations like 1:5 or your example 200 to 1000.


The frequencies added by fm are multiples of the modulator added and 
subtracted from the carrier. (carrier; 1000Hz, modulator 11Hz --> pairs 
in order of strength: 989 + 1011, 978 + 1022 Hz ...)
If you have frequencies going below 0Hz they wrap around the y=0Hz axis. 
Result is a negative freuqency, or likewise the phase is reversed. (for 
example 1000Hz modulated by 600Hz will have 200Hz in the spectrum)


If you use not-harmonic related frequencies like 320 and 1000 Hz and you 
will have new frequencies which aren't multiples of 320 and 1000, but 
inbetween. (580 and 1320, ...), Also you will get frequencies below the 
320 Hz. However if you drive the modulation very strong, a patten 
similar to a harmonic signal will appear, possibly with a new base 
frequency, but also likely without.


I'm absolutely not familiar with the case of a signal modulating itself, 
but I'm pretty sure from experiments with your patch (or the new I mad 
and attached) that there occur very similar (if not identical) effects 
if you modulate a mix of 1000 + 320 Hz with itself or you use separate 
carriers for 1000  and 320 Hz and modulate them separately by the mix of 
1000 + 320. I'm not sure if this superposition is valid, but I'm pretty 
sure... at least it sounds relatively similar if I do it in pd. The vd~ 
sounds always "richer" possibly artifacts. (the spectrum looks very 
dirty too)




I want to add that the vd~ approach is not the "perfect 
implementation" for the above described frequency modulatuon. the 
carrier is delayed against the modulating signal a bit.


You can add another [vd~] or [delread~] to fix that. I think I did 
that in some other version of haut-parleur-doppler.pd, and if not, I 
did similar things with other effects.



Like this it simulates a moving listener instead a moving sound source.


But there is no difference between a moving listener and a moving 
source, apart from the wind.
there is. but for the low speeds of the cone we are simulating the 
audible effects are not very different. (a moving sound source at the 
speed of sound produces infinite frequency, a moving listener at speed 
of sound hears only doubled frequency).


What you mean is, regardless of whether it happens in the listener or 
the source, the motion is out of phase with the actual signal.


exactly and this is why I'd like to move the write head. How did your 
correction using vd~ work?


Unfortunately I don't know of such externals already existing. 
However I don't expect the effects being very different from the vd~ 
method.


What if they aren't _any_ different ?
it's only because of the slight delay I'd be interested to eliminate. 
But as you also said I don't expect any big difference between the delay 
free case and the vd~ case as the modulations occuring with a slight off 
phase will not sound any different. (however 2ms can be quite different 
for short percussive signals)


A slow 20Hz sinewave modulating some high frequencies will not sound 
very different if the 20Hz is delayed or not. A 20 hz sound will have 
a duration which is much longer that the delay.


But it depends on the gain you choose. Suppose you have a 
weapons-grade giant speaker, with a membrane of a few hectares...


I mean, play with the [*~] and you can get the delay variation to be 
bigger than the period of a sinewave.
yep, that's also one of the effects I wanted to eliminate by the moving 
write head.


Martin


doppler_fm.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Which Linux distribution are you using?

2010-11-17 Thread Martin Schied



"Doesn't use JACK add latency?

There is /NO/ extra latency caused by using JACK for audio input and 
output. When we say none, we mean absolutely zero. The only impact of 
using JACK is a slight increase in the amount of work done by the CPU 
to process a given chunk of audio, which means that in theory you 
could not get 100% of the processing power that you might get it if 
your application(s) used ALSA or CoreAudio directly. However, given 
that the difference is less than 1%, and that your system will be 
unstable before you get close to 80% of the theoretical processing 
power, the effect is completely disregardable."


but of course, if you just run pd, you don't need it and you can set 
latency into pd, I forgot that. I mostly interface pd with other soft 
( ardour or any recorder, midi sequencer, some plugin via jack-rack or 
calf etc...), and I plug midi controllers, but you can do it in 
qjackctl without running jack (alsa tab in connection window)...




Practically speaking - on systems I used until now I could always 
achieve lower buffer sizes using pd standalone and thus get lower 
round trip delays too.
I couldn't tell by ear which config was faster, Pd alone or Pd plus 
JACK.

maybe I'm wrong, but I thing only jack can provide rt...
you can run pd with the -rt flag, without jack. fo me it has proven 
to be far more stable at the lowest possible latencies than using 
jack. but this depends on your setup too. I don't use jack when I 
don't need it.


Martin
as said, it depends also on the setup you are using. assuming you get pd 
to run with alsa or oss and a buffer of 256 samples @ 48kHz you have a 
minimum delay of 256/48000 s = 5.3 ms. now add a bit for the soundcard's 
own buffer for in- and output and you have a delay of slightly more than 
5.3ms. This would be the case for a stand alone pd.


Now you use jack and use 256 samples as buffer. This will cause pd to 
use the 256 samples buffer too and no latency is introduced (this is 
what the jack homepage states too).


However this never worked for me without tweaking my system for hours. I 
always had to use a slightly increased buffer, for example 3 * 128  or 2 
* 256 samples to run stable. This might depend on the kernel's real time 
capabilities (don't know) and also the setting of irq and application 
priorities (tried and succeeded). Ideally with a proper configured 
system you can use the same buffer size in jack as in pd stand alone. 
But since lots of people don't know how to configure it properly you 
will almost always end up with an increased buffer size.


Also note, the default setting of jack which works in almost all systems 
is 2 * 1024 samples -> the buffer size is 42ms. It's likely any 
'realtime' tools uses smaller buffers by default when using oss / alsa. 
(for example the dj mixing tool xwax.)


Thes's nothing wrong about using jack, but you will have to spend more 
time if you want to make it bulletproof against xruns.


Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] The (not) doppler distortion (was: overdriven speaker)

2010-11-16 Thread Martin Schied

On 14.11.2010 03:40, Mathieu Bouchard wrote:

On Sat, 13 Nov 2010, Mathieu Bouchard wrote:


On Wed, 10 Nov 2010, - wrote:


haut-parleur-doppler.pd is the original file from Martin,

[...]

Please correct me if I'm wrong somewhere.


Yes, that file is from me and not from Martin. (but that's just a few 
kilometres off)


(Doh, I was thinking about a different Martin. In any case, the file 
comes from me.)

thought you were joking...

in your previous mail you wrote
It remains consonant to the ear so easily simply because it only 
produces harmonics.
did you speak about the "doppler" distortion? true doppler distortion is 
harmonic for a single sine wave, but not for 2 or more sines of 
different frequencies. It's the same effect known as frequency 
modulation, in this case a signal being its own carrier. The difficulty 
in prediction of a spectrum is that the carrier is an always changing 
mix of frequencies and not a single sine wave like for a radio station 
transmitter or in the most simplest case of frequency modulation 
synthesizers, but it is pretty easy to find out it is non harmonic by 
listening...


I want to add that the vd~ approach is not the "perfect implementation" 
for the above described frequency modulatuon. the carrier is delayed 
against the modulating signal a bit. Like this it simulates a moving 
listener instead a moving sound source. Also for a single sine wave the 
change of the spectrum differs by variation of the delay.


A more close to reality simulation which does only fm without delay 
requires a variable (interpolating?) write into the delayline. 
Unfortunately I don't know of such externals already existing. However I 
don't expect the effects being very different from the vd~ method. A 
slow 20Hz sinewave modulating some high frequencies will not sound very 
different if the 20Hz is delayed or not. A 20 hz sound will have a 
duration which is much longer that the delay.


Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Which Linux distribution are you using?

2010-11-16 Thread Martin Schied

On 15.11.2010 23:06, Raphael Raccuia wrote:



Le 15. 11. 10 22:21, Pierre Massat a écrit :

Hi,
I have installed Ubuntu 10.04 LTS, plus some ubuntu studio stuff (the 
audio packages and the plugins). I also tried the rt-kernel. It 
didn't work.
But i am amazed, blown away, baffled, etc. Because the generic kernel 
does have some crazy rt capabilities indeed. I guess the ubuntu 
studio packages must have created the audio group and jack must have 
written the proper things in the limit file, but still, it works 
surprisingly well. Jack can run in rt with a latency as low 4 ms 
without any xruns, although it crashes.It works just fine at 5.33 ms. 
Even pd itself work with an extremely low latency (I'd say below 7 
ms), I'm assuming that's because it was configured to run in rt 
during the install.

I don't even know if i need JACK anymore.
jack don't add latency, and it's a powerfull sound server... you can 
connect pd to the outputs of your sound device and/or other sound/midi 
softwares, then you can save a patchbay to recover your patch... it's 
one of the most interesting stuffs on linux.


it does add latency in most cases. you specify the amount of latency by 
using different period sizes and numbers of periods settings. But you 
can use very small buffers on some systems with good audio hardware, so 
they have the same size you would use inside pd in standalone 
(64samples). In this case you will not have more latency using jack than 
using pd standalone. (I'm also only 99.9% sure about this, beware.).


Practically speaking - on systems I used until now I could always 
achieve lower buffer sizes using pd standalone and thus get lower round 
trip delays too.
I couldn't tell by ear which config was faster, Pd alone or Pd plus 
JACK.

maybe I'm wrong, but I thing only jack can provide rt...
you can run pd with the -rt flag, without jack. fo me it has proven to 
be far more stable at the lowest possible latencies than using jack. but 
this depends on your setup too. I don't use jack when I don't need it.


Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd~, 2 gemwin, vsync, nvidia, linux

2010-11-12 Thread Martin Schied

On 12.11.2010 14:49, cyrille henry wrote:

hello,

i'm using a gem patch inside a pd~, in order to separate a huge 
computation, and the rendering of this process. But since i need 
pix_image/pix_data in the 1st process, i have to open 2 gem windows. 
only the 2nd one is visible.


i'm using export __GL_SYNC_DISPLAY_DEVICE=CRT-0 do have vsync on the 
external screen. (don't understand why nvidia-setting did not work any 
more for this)


my problem is that only the 1 gem windows is sync to Vblank. but i 
need the 2nd to be synchronize.


i could modify all my patch in order to have the rendering in the main 
pd patch and computation in pd~, but that would be a huge work.


So i'm looking for a way to force sync to Vblank for all openGL 
windows. (nvidia setting use to work for this, but did not anymore).




hi!

driconf has settings for vblank too. possibly its config file .drirc 
already exists on your system, overriding any driver settings...? Just 
guessing.


Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-11-04 Thread Martin Schied

 Hi Mathieu -

again, sorry for the big delay. I was a bit busy the past 2 weeks.

On 22.10.2010 07:35, Mathieu Bouchard wrote:

On Thu, 21 Oct 2010, Martin Schied wrote:



  Isn't the heat proportional to the mean power ? Then you just 
do [*~] with itself and then some kind of [rpole~] to account for the
  accumulation thereof. After that I don't really know what to do 
with that.


one could feed the output of this [rpole~] into a [*~] to the input 
signal (or at any place later, but then it has to be cared for the 
delay of the doppler vd~ too, so better do it first).


Why would you be doing the doppler first ? The heat is generated 
first, in the moving coil, but the doppler is relative to the 
observer, who comes at the very end in the data flow from the amp to 
the ear. Thus it seems to me that the [vd~] should come at the very end.

yes, absolutely...


How does one take the réactance into account, again ?... then we'd 
have to change the first [*~] to account for ampères not following 
volts, and do we have to change the other [*~] too ?
I think there are 2 main factors where reactance is important. The first 
is the varying current flow for heat, the second is the varying 
frequency response of the speaker. However I'm not knowing of a 
possibility to model the circuit so you actually have a current and a 
voltage signal. To calculate the heat production the voltage isn't used. 
You have to know the resistance of the coil and the current flowing 
through it. And since the force on the cone relates on the current flow 
(and this is what we hear) and not the voltage we should just not care 
about the voltage and assume the signal in pd is the current signal. Or 
expressed in other words the system should be treated like no difference 
in current and voltage can happen. At least it seems to me this makes a 
lot of things easier and the audibe effects could be estimated. At least 
for me a realistic modeling with verification is out of my knowlegde and 
also my time capabilities are limited at the moment...


I think there aren't many too. The only case I can imagine and I 
heard of is for huge negative signals, where you can't go beyond 0 
pascal of air pressure and the signal is clipped physically - but I 
doubt this ever happens in small speakers. Also I'm not sure if this 
only happens in compression speakers.


I doubt that it (getting close to 0 pascal) happens at all. It sounds 
more like a weapon of mass destruction, than like something for 
listening to.


Though... in some ways, it does happens, at a very small scale. What's 
the speed of air molecules, and how much time do they take to fill the 
void made by the speaker moving ? What happens if the speaker moves 
faster than that ?... (and is that actually the Doppler effect said 
using different words ?)
That's beyond my knowledge, but I think that's not the point. If you 
calculate the maximum pressure before the negative peak is zero you have 
an spl of approximately 135dB which is not that much for pressure levels 
directly in front of a speaker - possibly I calculated it wrong? I used: 
air pressure: 101.325 Pa and /p/_0 = 20 µPa RMS, which gave me 134.09 dB 
(for a wave with RMS of 101.325 Pa -  so ideally I would have to take 
this as peak level but that doesn't change much, only factor sqrt(2)).
I don't know what you mean here by «enclosed volume», «free field», 
nor «radiation resistance».
radiation resistance is the same like impedance, but for mechanical 
systems. You can treat the spring/mass system of the speaker and the air 
similar to an electrical circuit driving an antenna as far as I 
understood. And similar to electrical load you can have pure reactance 
and pure resistance. Unfortunately the internet isn't very wise 
concerning acoustics and speaker systems and is full of voodoo and 
homeopathy instead using the same vocabulary, so I could not find very 
much about it on a quick search.


By enclosed volume I thought of an air tight wooden box with no holes 
other than that for the speaker in it - just like most older 
conventional speakers. Pressing the membrane into the box creates a 
pressure proportional to the excitation of the cone and not anymore to 
the acceleration. I think this closed volume would be called a high 
radiation resistance, because the pressure (analog to the voltage) is 
high for very small air flow (analog to the current).


Martin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Phase and impulse response measurement

2010-11-04 Thread Martin Schied



Hi everyone,

i wondered if someone made a patch measuring the PHASE of a reference 
signal compared to measured signal




Hi,

you could one of the cross-correlation externals to measure the time 
delay between 2 signals. (there's one external in iem_tab from 
pd-extended I remember and there are possibly more). If that's useful 
for you I created a similar, fft based patch using vanilla objects I can 
post here.


However correlation doesn't directly measure phase differences of 
separate frequency bands but the delay of the signal over all frequencies.


Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-22 Thread Martin Schied

 On 22.10.2010 06:05, Mathieu Bouchard wrote:

On Fri, 22 Oct 2010, Martin Schied wrote:

I wanted to use a fairly high a < 1 because then the phase for all 
frequencies is approximately 90° off like for the ideal a=1. Using 
slightly smaller factors and comparing input / output didn't satisfy 
my expectations. maybe that would't matter at all - let's experiment...


How is the phase preservation an important thing for you ? I ask 
because I didn't really think of it as important... (and I still 
somewhat don't know when it's really important).
I think it's not important for a speaker simulation either, but my 
assumption was that a correct behavior in phase would be a "sign" of a 
working integrator.


that's indeed interesting. So the gain is defined for a constant 
signal having the same input and output samples (or in other words DC 
having no amplification) if I understood it correctly.


It's defined for any signal. There are different equivalent ways to 
define the gain of a linear filter. In my head, I was thinking of an 
input signal containing a single 1 in a sea of zeroes... but it might 
be a bit easier to understand it using a constant input signal. Then 
for [sig~ 1], [rpole~ 1] will diverge (as much as the float32 number 
format can allow it to...) because 1/(1-1) is undefined (it's a 
division by zéro). But for [sig~ 1] again, [rpole~ 0.999] will output 
a constant 1000.

that's the way I understood it. fine!

Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-21 Thread Martin Schied

 On 22.10.2010 03:10, Mathieu Bouchard wrote:

On Fri, 22 Oct 2010, Martin Schied wrote:

yeah, but this is often the case when messing things up in pd. I 
tried rpole~ 1 with sinewaves first which worked as integrator, but 
already had different results for the output of rpole~ if the wave 
started at 0 or pi/2 (which is logic, but I didn't think about it 
first...)


um, yeah, the amount of DC is rather relative to where you start 
looking, and where you stop (or where you're at so far). That's why I 
used things like [rpole~ 0.99] to force it to recentre around 0 rather 
quickly.


I wanted to use a fairly high a < 1 because then the phase for all 
frequencies is approximately 90° off like for the ideal a=1. Using 
slightly smaller factors and comparing input / output didn't satisfy my 
expectations. maybe that would't matter at all - let's experiment...

lop's gain compensation = 1 - 0.999 = 0.001
rpole's gain to compensate for = 1/0.001 = 1000
cutoff frequency = 0.001*44100/2π = 7.019
therefore use [lop~ 7.019] with [*~ 1000] (in any order)
I thought about lop~ doing similar things too, but didn't know what 
lop~ is doing and I'm sure I wouldn't have figured it out in any 
reasonable time this morning. thanks!


Ah, I also think that you'll like to know that the total weight of an 
input sample in [rpole~ a] can be written like this :


  k = a^0 + a^1 + a^2 + a^3 + a^4 + ...
but
  a*k = a^1 + a^2 + a^3 + a^4 + ...
therefore
  k-a*k = a^0 = 1
  k*(1-a) = 1
  k = 1/(1-a) is how the gain of [rpole~] is computed above.
that's indeed interesting. So the gain is defined for a constant signal 
having the same input and output samples (or in other words DC having no 
amplification) if I understood it correctly.


I attached my [lop2~] abstraction, which is a rpole~-version of 
[lop~], with a signal-rate right-inlet. I posted it some time ago.

I remember it now, and already saved it in my mail archives :)

cheers
Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-21 Thread Martin Schied

 Hi!

I agree with Martin Peach in most points and want to add some sentences.

On 22.10.2010 01:17, Martin Peach wrote:
A perfect speaker will reproduce the sound exactly by transforming the 
instantaneous voltage to a displacement in or out. That's called 
'compliance' in the speaker biz. The ideal speaker has zero mass and 
is totally rigid.

So nonlinearities will show up:
1> when the speaker is massive and can't reach the ideal position 
quickly enough.
this mainly filters the signal in a way of an analog lowpass filter and 
influences the intensity and phase spectra. It doesn't add new 
frequencies to it, so it's still called 'linear'. However throug the 
mass the system also has to deal with the stiffness and this causes some 
nonlinear effects.
2> when the speaker deforms as it is accelerated from the centre but 
lags at the edges.
I'm also sure these material nonlinearities will produce a main part of 
distortion frequencies in the spectrum. Especially when the speaker 
surround and spider are at their limits their imperfection will cause 
the whole cone to move 'sideways' and build up different modes. So this 
is definitely of interest for a (dying) speaker simulation. Probably 
this is one of the most challenging too...


Also the stationary magnet is driving a coil in the speaker cone. When 
the speaker is overdriven the coil will be pushed away from the field 
of the magnet on the outward stroke and so the coil will be less able 
to move the speaker, so a kind of soft clipping will occur.
But on the inward stroke the coil will bottom out and slam into the 
support structure, giving a hard clipping and possibly some bouncing.
dependant on the construction of the speaker this slam will not occur, 
because the spider prevents this. (In most new speakers the spider is 
linear for small amplitudes and starts to become very hard and thus 
nonlinear at both ends. In a simulation one might want to chose if that 
slam (or i called it crash) happens or not. In a real speaker this often 
is really the death of the speaker because the coil is damaged 
permanently and then scratches on the magnet surface on every movement - 
I don't feel like I want to simulate these sounds :-\


I don't think the nonlinearities of the air are relevant here, or the 
doppler effect of the moving speaker.
I also agree that doppler effect is not the dominant parts of the 
distortions in a conventional speaker enclosure for music reproduction. 
Countermeasures are taken to reduce doppler effect as good as possible 
in these systems. In real speaker enclosements doppler effect is largely 
reduced by separating the audio spectrum on several speakers, so the 
bass speaker which does most of the movements only has to produce 
frequencies up to several hundreds of hertz. For example bass speakers 
in 3-ways systems are driven below 150 Hz in most cases - doppler effect 
becomes very low in this spectrum and mid range speaker have almost no 
visible travel anymore. However the doppler effect occurs in every 
speaker with moving parts and especially for full range speakers this 
becomes important. Guitar amps often use bass drivers in full range, so 
this has some practical relevance for musicians too.


I'd be interested what kind of speakers fallen_devil was interested in 
when originally posting his question to the list. Also a record of the 
noise would be nice for comparison...


cheers
Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-21 Thread Martin Schied

 Hi!

On 21.10.2010 07:17, Mathieu Bouchard wrote:

On Thu, 21 Oct 2010, Martin Schied wrote:

It shouldn't be too hard to do this integration with basic pole / 
zero objects. A problem using integration only is the lack of 
mechanical damping. A real speaker goes back to x=0 if no signal is 
present. A simple integrator doesn't


right. That's why you can't just use [rpole~ 1]. Then, any [rpole~] 
with a value between 0 and 1 will act as a convolution with an 
exponential decay function. An integral is a convolution with a 
constant function, such as exp(0*t).
nice way to look at it. I used the formulation y[n] = x[n]+ a[n] * 
y[n-1] in the help files and some semi-knowledge about filters...


Because the integral of the exponential decay function is bigger than 
1, the result of [rpole~] will have some amount of gain.



- so the 'simulated' cone would just fly away slowly.


That's only in the case where the signal has a DC.
yeah, but this is often the case when messing things up in pd. I tried 
rpole~ 1 with sinewaves first which worked as integrator, but already 
had different results for the output of rpole~ if the wave started at 0 
or pi/2 (which is logic, but I didn't think about it first...)



[rpole~ 0.999] does it very well...


Note that [rpole~] is dependent on sampling rate. So, assuming you 
have a sampling rate of 44100 Hz, the rate-independent way to do it is :


  lop's gain compensation = 1 - 0.999 = 0.001
  rpole's gain to compensate for = 1/0.001 = 1000
  cutoff frequency = 0.001*44100/2π = 7.019
  therefore use [lop~ 7.019] with [*~ 1000] (in any order)
I thought about lop~ doing similar things too, but didn't know what lop~ 
is doing and I'm sure I wouldn't have figured it out in any reasonable 
time this morning. thanks!


cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-21 Thread Martin Schied

 Hi!


Looking at power and air pressure - we don't have to care about them 
as long as we don't want to include thermal effects


Isn't the heat proportional to the mean power ? Then you just do [*~] 
with itself and then some kind of [rpole~] to account for the 
accumulation thereof. After that I don't really know what to do with that.
one could feed the output of this [rpole~] into a [*~] to the input 
signal (or at any place later, but then it has to be cared for the delay 
of the doppler vd~ too, so better do it first). The exact parameters can 
be found by experiments, but as written in an earlier mail the signal 
reduction can be up to 7dB (I would use slightly more). I don't have 
time right now, but maybe I'll experiment  later...



or nonlinearities of the air I think.


I don't know them at all. I've never heard of anyone taking them into 
account.
I think there aren't many too. The only case I can imagine and I heard 
of is for huge negative signals, where you can't go beyond 0 pascal of 
air pressure and the signal is clipped physically - but I doubt this 
ever happens in small speakers. Also I'm not sure if this only happens 
in compression speakers.


The pressure directly in front of the cone is related to the 
acceleration I think, but I'm not sure about that.


It has to : the speaker makes a sound by pushing and pulling on the 
air, and that changes the pressure.
yes, but it could also be seen in that way: the cone's travel compresses 
air in an enclosed volume. when the cone is at its travel peak (the 
acceleration is 0) the air is compressed at maximum. And I'm not sure if 
this is the case for a speaker in "free field" (not sure if that's the 
exact term) too. I know that there's something called radiation 
resistance - but I know nothing useful about it yet.


Can anybody confirm that? I think that's not trivial to answer 
anyways, because already 10cm farther from the speaker the pressure 
and air velocity are different.


It has to... the reason why you hear the sound and why sound has a 
speed, is because neighbouring pressure differences cause pressure 
differences to propagate. It's a second-order differential equation, 
as the position of air particles is proportional to their 
acceleration. The Laplacian of the wave function along x,y,z is 
proportional to the 2nd derivative of the wave function along t... I'd 
write it like :


  D[D[f,x],x] + D[D[f,y],y] + D[D[f,z],z] = D[D[f,t],t] / v²

Where v² is the square of the speed of sound.

With a slight coordinate change using imaginary numbers, you can see 
it as a Laplacian along x,y,z,t instead, in 4-dimensional spacetime, 
and the Laplacian is equal to zero. But that's only if the air is 
considered frictionless :)
sorry, I don't understand that equation I think (I'm not understanding 
difference equations very well in general) and also I have no idea of 
Laplacians until now (I'll read about it and maybe understand later)




Ah, that means that the mechanical amplitude (travel) of the wave is 
much smaller for treble than bass, is that right ?

exactly.

cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-20 Thread Martin Schied


It shouldn't be too hard to do this integration with basic pole / zero 
objects. A problem using integration only is the lack of mechanical 
damping. A real speaker goes back to x=0 if no signal is present. A 
simple integrator doesn't - so the 'simulated' cone would just fly 
away slowly. So some damping should be included in the integrator to 
make it stable. However I'm no expert on designing filters yet...

[rpole~ 0.999] does it very well...




haut-parleur-doppler2.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-20 Thread Martin Schied

 Hi!

Sorry for answering this late. And I was wrong in my last mail. The 
signal doesn't have to be differentiated but integrated (like you 
already did in your first post).?


The signal in pd represents the current flowing through the speaker's 
coil (if we assume it isn't capacitive or inductive load), producing an 
acceleration equivalent to the current on the speaker cone. The peak 
output voltage of the amplifier is equal for all frequencies and defines 
the maximum acceleration the cone can experience. So we can say the 
acceleration is


a(t)= a_max * -sin(w t) // w stands for omega = 2 * pi * f, 
a_max is the (peak) amplitude


If you want to know the speed you have to differentiate it by time:

v(t) = a_max * 1/w * cos(w t)

and for its travel:

x(t) = a_max 1/w² * sin(w t)

so the cone is moving faster for low frequencies (1/f) and also has more 
travel (1/f²).


It shouldn't be too hard to do this integration with basic pole / zero 
objects. A problem using integration only is the lack of mechanical 
damping. A real speaker goes back to x=0 if no signal is present. A 
simple integrator doesn't - so the 'simulated' cone would just fly away 
slowly. So some damping should be included in the integrator to make it 
stable. However I'm no expert on designing filters yet...



Looking at power and air pressure - we don't have to care about them as 
long as we don't want to include thermal effects or nonlinearities of 
the air I think. The pressure directly in front of the cone is related 
to the acceleration I think, but I'm not sure about that. Can anybody 
confirm that? I think that's not trivial to answer anyways, because 
already 10cm farther from the speaker the pressure and air velocity are 
different. The power from a 1 kHz sine and a 2 kHz sine are the same 
anyways, so  why care...


cheers
Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-18 Thread Martin Schied
really nice distortion. I just fed it a few drum loops and it sounds 
very similar to drunken DJs at 5am...


I added a lop~ 200 before the modulation going into vd~ to reduce harsh 
sounds a bit, emphasizes the nice "pow" sound for bassdrums.


using the first deviation as modulation should be more physically 
correct but sounded very tinny and thin. Using direct signal for 
modulation like Mathieu used works very well and sounds more pleasant...


Interesting. I didn't expect it that way :)

cheers
Martin




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] overdriven speaker

2010-10-15 Thread Martin Schied

Hi!

I'm no speaker modeling expert at all, but I can try to describe what 
produces sounds in an overloaded speaker. There are various sources of 
distortion, symmetrical (mechanic suspension) and asymmetrical (magnetic 
field) and also time variant (temperature) and modulation (doppler 
effect / amplitude modulation) effects. I don't know which effects have 
a stronger or weaker influence, but I describe what I imagine:



High peak amplitude, positive wave:

speaker moves to the front, parts of the coil will not be in the 
magnetic field anymore. The field isn't zero outside the magnet gap, but 
I guess it decreases rapidly and is almost zero (so for example if half 
the coil is inside the magnet, the parts outside will not produce a 
force. So the force is only half as strong as it should. For simplicity 
you could say the field outside the magnet's gap is zero, so you have a 
linear function of excitation / current. Also If the coil moves out of 
the field its impedance will decrease which has influence on frequency 
response for higher frequencies a bit.


Heat

If the impedance is reduced as described above, a higher current will 
flow and heat the coil more than usual. The resistance of the coil will 
increase when it gets warmed and thus the efficiency of the speaker 
decreases (up to -7 dB I read somewhere, but this wasn't meant for 
almost dead speakers but heavy load). The heat needs some time to 
dissipate, so some kind of slow pumping compression effect occurs.


High amplitude, negative wave:

The speaker's coil might crash into the magnet and create different 
mechanical noises. Also the speakers diaphragm will be deformed by this 
crash and create various kinds of noise. Additionally it carries the 
noises the coil created - depending on the material and shape this sound 
different (paper, Kevlar, aluminum, etc sound different). If this crash 
doesn't occur (professional speakers don't have this issue usually) the 
negative wave will not be distorted too much and maybe distortion can be 
ignored.


In both directions the spider (basically a spring) starts to become 
nonlinear. Different manufacturers have different curves, but for small 
amplitudes they all pretend to be linear - so some experiments with sin~ 
or tanh~ might do it here.


Then generally there are happening doppler-effects on all speakers with 
big excursion. You could model them through a variable delay, modulated 
by a differentiated, low pass filtered signal (don't bite if I'm wrong, 
it's already very late... ). Amplitude modulation can be applied the 
same way (lowpass and apply it to higher frequencies).


so to sum it up:

apply symmetric distortion for the spider, split the path into positive 
and negative parts, for positive samples: tanh~, polynomials or other 
wave shapers, for negative parts let the signal untouched or add noises 
of a crashing coil (don't know how to achieve this), then sum both 
signals up, apply doppler effect, amplitude modulation and pumping 
compression. perhaps that sounds like your speakers then :)


I'm not sure if this works at all, but it definitely will sound very 
distorted in the end.


did you already discover http://www.klippel.de/pubs/papers.asp ?



cheers
Martin


On 15.10.2010 21:10, - wrote:

Thank you for your answer,
but as I wrote I don't want the sound of simple clipping like clip~,
tanh~ or overdrive~. I want the sound of a speaker crying for mercy
because you put just too much through it.

But I don't know where to start. I know there are complex distortion
effects, which are able to simulate different speaker cabinets after
variable amps recorded by different microphones. But they all cost big
money. Also I don't need the physical simulation. I just want the sound.
If you want I can try to record the sound I'm talking about.

I tried to search for information how to do this but couldn't find
anything usable. Not even an analysis what happens inside the speaker
when you torture it like this.

I already know the forum but don't want to doublepost. I really liked
the post about the oto biscuit. Neat distortion possibility's.


Am 15.10.2010 17:12, schrieb George Ker:
   

Hello,
I can't really understand, so , you mean something different from
 

[clip~] ?
   

I' m sure you can find really good patches in the puredata.hurleur.com
 

forum searching about distortion , overdrive clip etc
   


-

GeorgeKer~

http://tinyurl.com/georgeker

-



On 14 October 2010 23:19, -  wrote:

 Hi,

 does anyone know how to simulate the sound of an overdriven
 

speaker? You
   

 know the crunchy sound when you torture it with a strong bass. It's
 nowhere near the sound of an normal overdrive with some kind of
 

clipping.
   

 Greetings
 -

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management ->
 

http://lists.puredata.info/listinfo/pd-list
   


 



Re: [PD] MIDI question: 2 novation launchpads at the same time on PD

2010-09-01 Thread Martin Schied

Hi,

On 01.09.2010 17:01, pierlu wrote:
so you mean that if i plug them both together, the second one will 
automatically transmit and receive note on and off messages on midi 
channel 17?
exactly. (assuming they are both connected via USB, the word "together" 
maybe was not the right word...)

Is PD that does this conversion automatically?
yes, this numbering exists only inside pd. Note that you have to set up 
pd so it can use 2 devices in the 'media' menu.




Martin
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] MIDI question: 2 novation launchpads at the same time on PD

2010-09-01 Thread Martin Schied
If you plug them in together they will appear as 2 separate midi 
devices, each using its own 16 midi channels from 1 to 16. If you set up 
pd to use these 2 midi interfaces you will have channels 1 to 16 for the 
first device and channel 17 to 32 for the second one. You can do your 
merging inside pd then or if you favor to do so use software outside pd.


cheers,
Martin

On 01.09.2010 12:49, pierlu wrote:

Hi all.
I would like to connect 2 Novation Launchpads to my computer (OS X 
10.4) to make a 128 out of two 64.
The problem is: Launchpad sends midi info on channel 1 and there's no 
way a user can change that (at least there's no info on that in the 
programmer's reference manual). So, the two launchpads would be 
indistinguishable.
Does anyone know how to workaround the problem? I know that in Max 
there's the [midiin] object that permits the user to select which midi 
device to listen to. Is there anything similar in PD (even tho a quick 
look at the Floss Midi Object list seems to suggest that there's none) 
(btw, i got the [midiin] hint by the creator of the monopad, which is 
a software useful to connect more than one launchpad in Max 
http://teamaxe.co.uk/code/monopad/index.php)
Creating an aggregate device of the two launchpads in CoreMidi could 
do the trick?
I would try that myself but i own only one launchpad and I'm scared of 
buying another and then discover there's no way to distinguish between 
them.

Thanks for any help,
pierlu.


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management ->  
http://lists.puredata.info/listinfo/pd-list
   


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] newline in comment

2010-08-21 Thread Martin Schied

Hi,

you could use semicolons at the end of ech line as workaround.

comment;
line2;
final line without semicolon.

Martin

tim vets wrote:

Hi list,
Is there a way to put newlines in comments that stay there after 
closing and reopening a patch?

I am unable to create a comment like:
"first line
second line
third line"
without it becoming:
"first line second line third line"
after reopening the patch.
I pasted some text from elsewhere and don't want to have to break it 
up into 50 separate comments.

thanks,
Tim



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Variable Sends

2010-08-20 Thread Martin Schied

you can use a [send] without an argument and set the destination using a
symbol in its right inlet, for example using a message. You can also use
messages as sends, see attachment.

Martin

Philip Cunningham wrote:

Hello,

Sorry for the newb question. I had a search but couldn't find an
answer -- maybe I'm not using the correct expression. I have 64 unique
receive objects and I'd like to address them individually,
sequentially from one send object ie. I'd like to send RGB values to
64 squares in GEM and colour them so that it cycles through a series
of colours.

Can anyone help?

Philip

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

  





send_dynamic.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] I wanna sing like Paris - zerocrossing for vanilla

2010-08-17 Thread Martin Schied
I made a cheap vanilla zero crossing patch some time ago. it doesn't 
work properly if the signal has zero samples between crossings though.


Martin

Roman Haefeli wrote:

On Tue, 2010-08-17 at 13:59 +0200, Matteo Sisti Sette wrote:
  

On 08/17/2010 01:39 PM, Roman Haefeli wrote:


On Tue, 2010-08-17 at 12:59 +0200, martin brinkmann wrote:

  

i will try this when i have found a way to extract
single-cycle waves from audio input in pd...


Not yet tried it myself, but what about writing live input to a table
(for instance with [tabwrite~]) in order to have access to the audio
data with message based objects? With those it should be fairly easy to
the detect the exact position of a zero crossing. For finding a single
cycle, it would be sufficient to find a positive crossing - for
instance-  and from there find the next one, so you have the exact end
points of one single cycle.

  
How would you look for zero crossings? With message based objects such 
as [until], a counter, [tabread] and comparing to zero?

Is that feasible?

(sorry for hijacking the discussion, I am curious about that)



yeah, actually that's what I thought about. I guess, one would not
compare to zero, but compare to the previous sample and check whether
the sign has changed. One could even perform linear (or even polynomial
interpolation) to find the subsample accurate location of the crossing. 


Roman


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

  




z1~.pd
Description: application/puredata


ppd_zerocross~-help.pd
Description: application/puredata


ppd_zerocross~.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] advice- multiple camera inputs

2010-08-08 Thread Martin Schied


Dima Strakovsky wrote:
Hi all, 

Coming out of the lurker mode to ask a question here :) I am kicking around an idea for a work that would require four camera inputs. The video streams would be remixed in realtime and output via a single projector. Was wondering if anyone has played with the scenario and has some advice  to offer? 

OS-wise I could go with ether OsX or LInux. I am looking for the max resolution from each input. Hopefully at least 320X240. Ideally higher. Camera-wise I was looking at two solutions 1. four cameras go into a multiplexer and then I grab the four different quadrants from the video stream or 2. four firewire cards (might be too much of a brute force solution:) + might run into some interesting driver issues).  Also, is there an advantage to having two boxes processing inputs and then sharing them over a network i.e. using more then one computer for this work?  


Any advice would be very much appreciated. Thank you.
  

Hi!

I built an installation together with an Artist last summer, using up to 
6 USB 2.0 web cams running at 640x480, 30fps each, using a single 
computer. We used "driverless" cameras (UVC standard) which worked out 
of the box on OSX (logitech  vision pro for mac), but you also could use 
any usb 2.0 camera with uncompressed output too. There are independent 
driver projects for some of them, so have a look.


I used GEM to mix / arrange all camera images together and pix_blob and 
some more pix_ objects for motion detection on osx. this took 50% cpu on 
a macbook pro on both cores ( a 2x2.2 GHz model).


Initially I also tried different debian distributions and the same usb 
cameras (worked out of the box too). When I tested them they all caused 
too high cpu usage, not only in pd/gem - approximately 50% to 60% on a 
single core @ 1.7GHz. This was approximately 1 year ago, so maybe there 
are some improvements now. Maybe I was unable to deactivate jpg 
compression or so - I never had time to find the exact reason for this - 
so if someone can tell more...


At least I could use one of these cameras in 'guvcview' later which only 
used 15% cpu of a 1.8GHz core.


So from my experience - if you are no experienced linux user, you'll be 
less annoyed using osx and many usb cams. I have no experience with many 
firewire cameras, I never had a chance to use more than one, and this 
was only a DV cam, causing latency and high cpu usage for decoding.


One annoying thing about USB cameras are the cable lengths which should 
be considered first (you can chain many usb hubs or repeater cables though).


Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] acceleration - deceleration between coordinates - how to do this?

2010-03-16 Thread Martin Schied

hi,

a very common approach to this is using a function like cosine or an 
other function which fits your needs. u can still use the vline but 
instead of directly using it use its output to control the "fade function":


[line]
|
[* 3.14159]
|
[cos]

here's a page with a few useful examples of other functions:

http://codeplea.com/simple-interpolation

Martin


Thomas Jeppesen wrote:

Hi guys,

I'm working on a patch (rjdj scene) where I'm moving a little object 
around on a plane. The object is been given random coordinates which 
it is supposed to gradually move to in five seconds.


Right now my solution is to bang the x- and y-coordinates into a 
line-object which works fine, but I'd prefer for the movement to be 
more "natural". By natural I mean that the object accelerates in the 
beginning and then decellerates near the end until it comes to a full 
stop at the exact coordinates that where randomly produced..


I've been trying to get my head around a solution for quite a while 
now, but unfortunately no luck so far.


I'm sure this must be simple stuff for some of you PD-geniuses out 
there, and I'm hoping that one of you will stand up and show me how 
it's done :)


Thanks in advance,
Thomas :)


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list





___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Variable CPU?

2010-03-04 Thread Martin Schied

Thibault Walter wrote:

Hello

I made a little discovery.

It works with pd-extended and with pd-vanilla+GEM. Il have a MacBook Pro
2.66 GHz Intel Core 2 duo, with Mac-OS X 10.5.8.

When I open one of my video-patch (it works with any one of my video or
sound patchs), if I look at the CPU utilisation, I get something like 7 ou
8. Nothing is running, the GEM window is not even created.

If I wait something like 1 or 2 hours without using pd ; or, if I pause my
computer (I close it), wait 30 seconds, and open it, I get something like 0
or 1 as my CPU.
  
This might be a cpu frequency scaling issue. I had similar "phenomena" 
on Ubuntu once, where the CPU didn't go into its lowest frequency 
setting anymore after waking up from suspend mode.


So for example on a fresh reboot your cpu would be able to switch 
between 800MHz, 1300MHz and 2.6GHz or so, most of the time it's on the 
lowest setting and therefore your CPU is quite busy (still on 800MHz). 
Then after the suspend (closing it) it never uses the 800MHz setting but 
only the highest - and so the cpu cycles percentage where the cpu is 
used is far less. If you don't want to do the "suspend trick" every time 
there might be a "performance" setting or so which does the same thing. 
On ubuntu you can do this using 'cpufreq-set -g performance' on the 
command line, not sure what to do on OS X.


- just a guess, might be totally wrong too. -

cheers
Martin


Then, if I use my patch, when I get normally CPU = 70, and with this method
I get CPU = 20. And of course, the performances are absolutely not the same.

In fact, without this method, my MacBook Pro is not very much more powerful
than my old 1.33GHz PowerPC G4.


It works with audio-patchs too.

There is an other method : if I turn dsp on, and then off, I get the same
result. This method can't work with audio-patchs, because when I turn on dsp
I always get high CPU. So I have to turn dsp on before pausing and turning
on my computer. (I don't know if I'm clear...)


Weeell, I realized that it works with my PPC too, but the differences are
not so important.

Has someone any explanation?

excuse me for my english

T




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] displaying waveforms in gem

2010-02-21 Thread Martin Schied
hi Andrew, I remember a discussion about this in the board  - someone 
buit this based on [curve] I think. Also I know of a pdmtl abstraction 
which uses gl primitives for displaying the waveform, which is a bit 
faster than using curve (at least I think so) it's pdmtl/gems.scope~-help.pd


regards,
Martin

Andrew Faraday wrote:

Hey All

I'm looking into some live sampling work with direct visualization in 
Gem. I'm just wondering if there's a way to use the waveform of a 
sample (I.E. What you see in an array containing audio) as an object 
in gem. 

The only way I can think of doing it is taking a screen shot of an 
array, saving that to a file and using that as a texture. This way 
isn't particularly adaptable, however, as I'd need to go through the 
process for any new sample. 


Any Ideas?

Thanks

Andrew


We want to hear all your funny, exciting and crazy Hotmail stories. 
Tell us now 



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  

I

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] jackd ports rename

2009-12-17 Thread Martin Schied

becks wrote:

Hi all,
i use jackd and i have 12 in and 20 out ports (ie: pd -rt -jack
-inchannels 12 -outchannels 20)

any way to rename the jack ports in pd?
now i have pure_data_0:input[0-9] and pure_data_0:output[0-19] , but i
want a more self-explaining name
(i think i can rename ports from qjackctl, but i want a more general
and portable solution)

thanks!

  

Hi,

I once posted a similar feature request because I also could not find a 
better way to change client names but got no answer...


The Idea was to have a custom name specified as startup flag or via 
.pdsettings file. Apart from more self explaining names in bigger setups 
this would also be great for projects using lash on linux. (this allows 
you to start all audio applications you use at once, and automatically 
connect them together.)


I tried to do it on my own but became kind of confused by my changed 
code and gave up (at least temporarily). I think everything necessary to 
change is in s_audio_jack.c and s_main.c. If anybody can confirm that, 
I'll try to figure it out again, but I have no time before christmas.


cheers
Martin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] a good filter for my sample reader...

2009-12-12 Thread Martin Schied

David Schaffer wrote:

Hi there,
 
I'm building a sample reader and I'd like to equip it with a good 
filtering section, so far, I've tried a lot of pd filters and chose 
"lp2", but I think there must be a better sounding, more evolved unit 
out there. I would like to know if anyone has been working in that 
field... Idealy the device should be fat sounding and resonant... Any 
advice would be greatly appreciated!
 


There are at least 3 resonant or resonat sounding lowpass variants I 
know of:


resonant filter fom Claude Heiland
http://lists.puredata.info/pipermail/pd-list/2007-11/056865.html

biquad~ + Günter Geigers lowpass external to create coefficients

e_reslop from rjlib

cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] jack settings versus pd jack settings

2009-12-12 Thread Martin Schied

michael noble wrote:

Martin,

Thanks for the clarification. Is this actually documented anywhere, or 
is it one of those learning from experience situations?



Hi Michael

I think I read about that in the list once and also found things out by 
experimenting with it.


I tried to get some official Information to this on puredata.info, 
flossmanuals and through google - I only found this thread giving the 
information (didn't search in the mail archives). I now made a change to 
http://en.flossmanuals.net/PureData/ConfiguringPD, it was the first 
google match for "puredata delay jack" and also has additional 
informations related to this. I hope this is ok for all authors of the 
manual.


Changing the audio dialog itself for jack would be far more intuitive - 
so you wouldn't have to read a manual at all. For command line users a 
small note on jack would also be nice.


until now it's:

-audiobuf -- specify size of audio buffer in msec

it could be

-audiobuf -- specify size of audio buffer in msec (overriden by jack)

or if there are more audi APIs which override this setting

-audiobuf -- specify size of audio buffer in msec (overriden for 
some audio API)


cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] jack settings versus pd jack settings

2009-12-11 Thread Martin Schied

Hi,

The delay setting only affects alsa, oss, asio and so on. Jack brings 
its own buffer size (periods * frames) and pd depends on that. The 
-audiobuf command line option, or delay setting in the 'media' menu 
doesn't affect your latency when using jack (you can verify that by 
setting it to 500ms for example).


Cheers Martin

michael noble wrote:

hi folks,

At the risk of being hounding into the archives, I have yet another 
latency question...


I did in fact search the archives and could not find anything that 
clearly stated the relationship between the two settings as stated in 
the subject.


So my questions:

- Is the pd delay setting independent of the system wide jack latency 
settings?
- If so, and I presume it is, is the delay cumulative? (I presume so, 
but would like to know for certain. I could test, but I don't have my 
machine in front of me right now).
- Can pd be "forced" to inherent jack sample rate settings, or does 
this always have to be set manually?


regards\\m


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pix_artoolkit example

2009-11-24 Thread Martin Schied

mark edward grimm wrote:
on extended 0.41.4 so im assuming something was fixed (obviously :) maybe from out of the last discussion from last year? i cant find thread because it seems like the list is down again... 

your on linux no? 
  

hi,

yes, I'm on linux (ubuntu intrepid). I just downloaded the 0.42.5 
intrepid autobuild but artoolkit-support isn't compiled in there. Seems 
like only mac (and windows?) versions have artoolkit support compiled in.


I was using pd-extended 0.41.1 and the 0.92.1  gem release from 
sourceforge yesterday.


later today I noticed that I was in error again when writing that 
pix_artoolkit isn't contained in gem-svn, it's there, but in an "extra" 
folder and I didn't manage to compile it...


hoping the list comes back soon to give some more answers...

cheers
Martin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pix_artoolkit example

2009-11-24 Thread Martin Schied

mark edward grimm wrote:

Hello,

Been a while since I messed around with pix_artoolkit. A student of mine is 
really interested and I wanted to give her an example but I don't have time to 
write a patch

Does anyone have an example that replaces the marker with a 3d model and 
tracking it across the gem win?
Wow, that's good news - i never figured out how to get it recognize a 
marker. What camera did you use and on which OS?
Would you mind posting your working patch to the list? I made a patch 
for a presentation of a wiimote tracking system for my master thesis. It 
shows a model wich reacts to movements of a 4-LED marker, pretty much 
what you were asking for and could be adapted easily.


cheers
Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] imager (how to build an imager in pd?)

2009-11-13 Thread Martin Schied

Johannes wrote:

thanks guys,

andrew, nice that you wrote about the logic imager. i was inspired by 
it to think about how the imager effect workes.
do you think there is no delay between the channels at all? is it just 
stereo filtering?


any other voices on how to build an imager in pd?
there was Georg Holzmann's spatialization workshop also explaining some 
of the underlying perception mechanisms.


the workshop media, containing several self explaining patches are on 
the net:


http://grh.mur.at/misc/PdSpatialization.tar.gz

cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [++ ] object wont work

2009-11-13 Thread Martin Schied



Konstantinos Benardis wrote:

Hi list

I want to trigger a bang when a specific number occurs in a serie of 
running numbers for example from the output of a line object. I use 
the [== ] object to lookup but the object wont work if the numbers are 
running too fast. What could be the problem? Is there another way to 
do the lookup?



hi!

this could have several reasons:

- if you are using graphical bangs they don't blink when triggered at 
high rates


- possibly be the number doesn't appear in the stream - try to use 
"print" and look if the number is actually there. the line object only 
outputs some numbers between its start and end. if you want to have all 
integer numbers between start and end you could use counters, see 
attached patch.


- the value is a float value and doesnt exactly match the value to be 
compared with, even when displayed as equal when using a number to 
display them. to solve this either use an [int] object before comparing 
the numbers or give a range, for example to compare 4 and 4.1 to 
be "equal" you could use 4 - 4.1 <= 0.001


cheers,
martin


line-test.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] copying one array to another very fast

2009-11-13 Thread Martin Schied

Stephen Lucas wrote:
I should have also added that I'm only using this functionality for 
relatively small arrays (500 values), and haven't tried using it for 
arrays which may be holding longish audio samples.
 
-Stephen


On Thu, Nov 12, 2009 at 11:56 PM, Stephen Lucas > wrote:


Just putting in my 2cents, but I've been using the bonus feature
of being able to write an array's contents to a text file with a
message and then read it back out to a different array with
another message.



you could use soundfiler too using this approach. but it also has to 
allocate memory twice...
i used this approach to exchange relatively big arrays (more than 50,000 
values) between two instances of pd, using /dev/shm (or any ramdrive) 
which worked fine.


cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] fast cam

2009-10-23 Thread Martin Schied



Roman Haefeli wrote:

do you mind providing some more info? i also have a ps3 eye cam and i
also use a patched gspca-ov534 driver. however, i haven't figured out
how to capture something else than 640x...@30fps. i tried with gem
(using libv4l), ucview and mplayer. this is on ubuntu hardy (8.04). how
do you change the framerate and dimensions?

roman

  

Hi!

You probably will have to change the "videomode" at module load time or 
unload and reload the module with the desired settings, see also here:


http://kaswy.free.fr/?q=node/42

(link is quite old, maybe there where some changes)

cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] Lash and PD's jack client names, feature request.

2009-10-03 Thread Martin Schied

Hi!

I was having a short look on lash (linux audio session handling) today. 
pd has no native lash support, so I'm using the lash_wrap command when 
starting pd.


the wrapper reports pd's 'jack client name', its pid and the startup 
command to lash.
pd's jack client names are names like 'pure_data_0' for the first 
instance of pd, 'pure_data_1' for the second and so on.



lash_wrap can't automatically figure out which jack client name the new 
instance of pd has, so it has to be given on the command line:


lash_wrap -j pure_data_0 -- /usr/bin/pd -jack my_patch.pd

i make some connections using patchage or jack_connect, then i save the 
lash project and close the lash project which kills all jack clients 
belonging to the project.


when restoring the project, pd is started by lash, using the command 
given to lash_wrap before. then it tries to connect 'pure_data_0' to 
other jack clients like saved in the project before.


this will fail if an other instance of pd is already running and using 
'pure_data_0'



My question: is there already a better solution for using lash with pd?

if not, I'd like to propose a new command line argument to specify a 
custom jack client name like


pd -jack -client-name my_project_name.

cheers,

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Help with patch needed: keyname/route + textfile/gem

2009-09-17 Thread Martin Schied
James Dunn wrote: 
Thanks Martin, this is really useful! What I really need now is a way 
to automatically generate carriage returns or EOL's when the text hits 
the edge of the window - is this something that can be done in gem or 
do I have to format the text first in a text editor first?



Hi,

spent some time and made an abstraction for this (see attachment).

I think formatting it outside of Pd is much more simple - but less 
flexible inside your patch.
I had some problems when trying to use doubled "newlines" to create new 
paragraphs. text3d and text2d display some strange characters in this case.


If it has not to be dynamically changeable text inside your patch you 
could use latex or something else to format text into pages and then 
convert them to pixel graphics. Like this you can also generate good 
looking hyphened justification which is hardly doable within pd.


I figured out a way to have png from latex with nice alpha transparency:
latex --> ps, split ps into single pages, ps2eps, eps2png.
you'll find them here:
http://www.tm.uka.de/~bless/ps2eps
http://search.cpan.org/~jv/eps2png/

an other more out-of-the-box-method would be using your favorite office 
software, making pdfs and convert them to pixel graphics (using 
imagemagick or something else). Or simply use inkscape and export them 
to png. :D


cheers
Martin


line-break.pd
Description: application/puredata


line-break-help.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Help with patch needed: keyname/route + textfile/gem

2009-09-16 Thread Martin Schied

James Dunn wrote:
The commas are fixed thanks to your patch, however I now have the 
following problems:


1) Apostrophes are not printed properly in the gem window
Usually I use UTF-8 to circumvent all of these problems. Attached are my 
tools I use for it.


It's a small command line tool to convert text files to utf8 coded 
decimals and an example patch showing use of the converted text in Gem.


cheers
Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] CPU usage with multiple cameras and different operating systems. (Gem)

2009-07-22 Thread Martin Schied

Hi all!

I'm developing an installation which currently uses six webcams 
(Logitech Vision Pro, but tried also lots of other cameras). I'm using 
Gem patches on Linux and OS X and realized that OS-X's CPU consumption 
is much less than on linux. I made tests with a single webcam on Linux 
and single (and multiple webcams) on OS X. Both computers are not 
directly comparable, because of different hardware, but maybe this is 
interesting anyways.


The Linux computer: AMD Athlon64, 2.2 GHz, GeForce 7600 GS, nvidia 
proprietary driver, Kernel 2.6.30-ARCH (and also other kernels from 
debian and ubuntu), webcam @ 640x480, 30 FPS. Measurements of CPU 
consumption are done using htop, on the above described computer.


The OS-X 10.5 Computer: Macbook pro 2x2.2 GHz, Geforce M 8xxx (don't 
know exactly, it's not my computer, but I can look more accurate if 
someone wants to know.) Measurements are made by using top (and OS-X 
activity monitor, which seem to be the same)


Linux:
when using one webcam in cheese or luvcview it's using approximately 40% 
CPU usage.
when using the same webcam in Gem's pix_video help Patch it's 
approximately 80% CPU usage


OS X:
didn't test simple application like cheese, but:
one webcam in pix_video help patch uses 15% cpu.
Gem, single webcam: approx. 15% usage
Gem, three webcams: approx 20%

For comparison in other programs on Linux and with other video content 
in Gem:

Gem, pix_movie (352x288, 25 fps, mpg) 10% cpu usage
Gem pix_movie (720x480, 24 fps, quicktime) 59% CPU
mplayer - vo gl: (720x480, 24 fps, quicktime) 62% cpu  
mplayer -vo null: (720x480, 24 fps, quicktime) 40% cpu(40% for 
decoding? or is there already some system overhead?)


so it seems "normal" to have such huge cpu consumptions for video replay 
and cameras on linux?
I didn't measure it, but I also had extremely high cpu usage when using 
firewire dv cameras some time ago.


where does this big difference come from? does OS-X use video decoding 
on graphics card or something similar?


any ideas for making video faster on Linux?

cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Multiple audio devices limited to four devices?

2009-07-19 Thread Martin Schied

Thanks!

it's working fine now...

I'll try to use a common clock later, but for now it's sufficient like 
this. I's playing music for over an hour without recognizable dropouts...


Ideas how to test for asynchronity (audioble effects?) and how strong 
they become? I used 0.1 ms bursts of 10kHz sines and also short swept 
sines. At least there were recognizable effects like distorted 
localization of sounds.


To have a block wise sync I planned to use a microphone and measure 
roundtrip latency before starting my patches.


cheers
Martin



Miller Puckette wrote:

hmm... "grep 4 *.c" didn't seem to help when I tried it.  Anyhow, I
found two places that would have to change: in s_stuff.h:

#define MAXAUDIOINDEV 4
#define MAXAUDIOOUTDEV 4

and in s_audio_oss.c:

#define OSS_MAXDEV 4/* maximum number of input or output devices */

On a somewhat related note, you'l eventually get sync errors between the
devices unless you can find a way to hard-sync them.  If I were trying it,
I'd just phase-lock the crystals by connecting the five (or N) together
in parallel.  Worst that could happen is I'd have to buy 5 more interfaces :)

M

On Fri, Jul 17, 2009 at 04:28:38PM +0200, Martin Schied wrote:
  

Hi!

I'm trying to use five (or more) ultra-cheap stereo-USB-speakers 
together. Four of them are working when starting pd with


/usr/bin/pd -rt -oss -audiooutdev "2,3,4,5,6" -outchannels "2,2,2,2,2" 
multiaudiotest.pd  

when looking into media, audio-settings dialog, only the first four of 
them are visible and also only these four are usable for output.


this is with Pd version 0.41-4extended, ubuntu-intrepid and also pd 
0.42.5. I assume this is a hard coded limit which can be changed - but I 
don't know where...


cheers,
Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] settings for Pure Data broken?

2009-07-17 Thread Martin Schied

Hi!

Did you already try different realtime settings?

I usually start jack by

-jackd -R -P 20 -d alsa  (and optional flags)

where R stands for Realtime priority and P 20 sets the Priority to 20 
(can have a value from 0 to 99, the higher the value the more priority 
jack gets. jack's priority should be higher than connected client's 
priority)


this solved my DIO Problems on almost all computers I worked on.

cheers
Martin

Kaj Ailomaa wrote:


I've been using Pure Data with planetccrma for a little while now, and
I've tried out fc9, fc10 and Centos 5.3 as platforms. I have had some
similar problems on all of them, except I got PD working completely
without DIO-errors only on Centos.
At first this led me to believe it had something to do with Pulseaudio,
since Centos comes without it. Now, after experimenting more with the
settings for PD I am more inclined to believe it is a problem with PD.

These are the problems I've had:

1. Connections to jack does not start automaticly. (solved)

First I used different combinations of these flags while launching the
program: -jack -channels 8 -r 48000 -blocksize 256.

(I am not sure if any of them really do anything for the audio
connection, except -jack, since the specific audio settings are done in
Jack internally. I have noticed that the latency for midi will only sync
with the latency for audio if I use the flag for -blocksize with a
matching value to that used in Jack settings, in my case 256.)
 
The flags did not work well, or at all. On Fedora, my system would

sometimes become almost completely frozen if the auto-connection worked.
Massive DIO-errors. On Centos, PD would simply not connect. I had to do
it manually in the menu each time.

Then I started messing with .pdsettings, found in the users home
directory. I got PD to autoconnect to jack, without any flags. These
were the settings I had to add/change:

audioapi: 5 (unchanged)
noaudioin: False (this was set to TRUE) 
audioindev1: 2 (added this line)

noaudioout: False (this was set to TRUE)
audiooutdev: 2 (added this line)
audiobuf: 10 (changed it to 10, originally 50)
rate: 48000 (and this was 44100)
...
flags : (made sure to leave this blank since the flags seemed not to
work from here. Not even the -rt flag.)

So by including this in the .pdsettings file,
and adding these flags to the launcher command path: -rt -alsamidi
I now have a functional Pure Data on my CentOS.
(remains to be seen it the same goes for Fedora).

2. Loading extra library is tricky

Lately I have needed to use only one external library, namely ext13. So,
I have only installed PD (0.39-3extended-rc5) + this library.
It loads fine, but I am initially unable to use 'r13' (alias
'receive13').
The way I go about it is I make another object called 'send13' (included
in the same library), which works fine.
Then I retry making one named 'r13' or 'receive13'.
Sometimes I have to repeat this order of execution until I get 'r13' to
initialize properly, after which it seems to work for the rest of the
session.
This is a little annoying, of course.

Anyone know what this is about?

And if anyone has any insight to the problems with .pdsettings, please
tell...



What can you do with the new Windows Live? Find out 




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] Multiple audio devices limited to four devices?

2009-07-17 Thread Martin Schied

Hi!

I'm trying to use five (or more) ultra-cheap stereo-USB-speakers 
together. Four of them are working when starting pd with


/usr/bin/pd -rt -oss -audiooutdev "2,3,4,5,6" -outchannels "2,2,2,2,2" 
multiaudiotest.pd  

when looking into media, audio-settings dialog, only the first four of 
them are visible and also only these four are usable for output.


this is with Pd version 0.41-4extended, ubuntu-intrepid and also pd 
0.42.5. I assume this is a hard coded limit which can be changed - but I 
don't know where...


cheers,
Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] image sonification pointers

2009-07-17 Thread Martin Schied

Hi!

Roman Haefeli once made a patch showing use of pix_sig2pix~ and 
pix_pix2sig~ together which was really nice:


http://romanhaefeli.net/software/pd/dsp_on_gpu.pd

Martin

Shawn Greenlee wrote:
hey there.  forgive me a bit as I acclimate (long time MaxMSP user 
working in Pd).


In Max (Jitter) I've built a lot around jit.peek~
Often this involves reading a one plane matrix at points specified by 
two signal inputs.  The matrix is a still image or video.  One input 
signal species which row, the other input signal specifies which 
column and out comes an appropriate signal value.


I see that in GEM there are pix_pix2sigs~  and pix_sig2pix~ which on 
first glance look promising.


So:

1.  Any pointers out there for treating image as sound in Pd, 
specifically looking at sonification (not visualization or 
simultaneous audio-visual synthesis)?


2.  Any uses of pix_pix2sig~   or pix_sig2pix~ which I should look at 
beyond the help files?


3.  Any strategies for treating each column of an image as an array 
(i. e. the array contents update based on which column of an image is 
loaded)?


4.  Do I need something else beyond the current Pd-extended (like 
GridFlow)?


Thanks! and all best,
shawn




http://shawngreenlee.com
s...@02909.com   
   






___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list





___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] How to exchange tables between different instances of pd in real time?

2009-07-14 Thread Martin Schied

chris clepper wrote:
GEM has pix_share objects that allow for two instances of GEM to use 
the same images.  Would this help you with the pix_sig2pix objects 
sharing pix data?
Hi! thanks for this hint. It's only pix_snap which causes glitches while 
reading back data from GPU. So I'm going to use pix_share and pix_snap 
in an other instance of pd.


@Frank: Thanks for that suggestion but I couldn't find mails in the list 
saying that pd~ did the job for Max Neupert. In fact his only mail I 
could find was about pd~ not working some time ago..?


cheers,
Martin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] How to exchange tables between different instances of pd in real time?

2009-07-13 Thread Martin Schied

Hi!

I'm currenty connecting a fft-analysis and resynthesis patch with a gem 
patch containing pix_sig2pix~ and pix_pix2sig~. I have to use separate 
instances of pd, so some kind of table exchange has to take place 
between them. my tables are 65536 samples big at the moment.


I tried netsend + until + tabread, but that was too slow and made huge 
drop outs in the audio patch. Then I found streamin~ and streamout~ but 
my patches had no sync - so I don't know beginnings and endings of 
successive tables.


Is there something to exchange big audio chunks or tables? I'm currently 
thinking about using soundfiler and a ramdisk for exchange, but if 
there's something more convenient I'll try that.


I found streamio13~ which can send several audio signals in parallel, so 
I could build a simple syncing mechanism...?


open for any suggestions...

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is bang~ limited to a 64 sample block?

2009-06-20 Thread Martin Schied

hard off wrote:

i wanted to send a bang on a zero-crossing


and then using it for...?

I made a (slow) zerocross detection as part of my current work, see 
attachment. It gives you zero crossings as 2-element lists with a leding 
"indicator" (don't know how to call it correctly) and the index of a 
table where crossings occur.


I later noticed those nice iem-tab externals which do kind of the same 
job but a lot faster than "until" but i was to busy - so it's still slow.
There's also some unnecessary copying inside it because I used my 
"standard code template for table operations"


Also using >~ and <~  and z~  for the detection might be less cpu consuming.


cheers,
Martin






array_zerocross.pd
Description: application/puredata


array_zerocross-help.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is bang~ limited to a 64 sample block?

2009-06-20 Thread Martin Schied

hi!

Actually I have no precise knowledge of dsp scheduling and such things, 
I only had this 64-sampes "problem" once but found other solutions to 
solve it. From my (current) point of view it's not a good method to 
reduce scheduling times too much on a desktop cpu, because of overhead 
becoming more and more significant - but maybe I'm totally wrong here 
and there are scheduling mechanisms without those  side effects.


When I had this issue I had an idea to work out a "virtual" sample 
accurate timing mechanism on patch level which has additional 64 samples 
delay but gives you possibility to describe your problem as "sample based".


for example a threshold~ with sample accurate output can be achieved by 
using tabsend~ and tab_ge from iemtab. But that was not thought very far.


maybe I'll think about it when I have more time...

btw. what for did you need these high-accuracy timings? would be 
interesting to gather some of those timing problems and look for a 
common solution...


cheers
Martin




brandon zeeb wrote:

Any chance of having the ability to change that globally if need be?

On Fri, Jun 19, 2009 at 8:30 PM, Martin Schied <mailto:crini...@gmx.net>> wrote:


hi!


hard off wrote:

I made a patch which times the duration between two bangs sent
by [bang~].   If i set the blocksize to the default of 64,
then each bang comes 1.4ms apart - as expected with 44.1khz
samplerate.

However, making the blocksize smaller has no effect on the
duration between the bangs.
Does bang~ have a speedlimit of 64 samples?  If not, what is
the limiting factor stopping me getting bangs more often than
every 1.4ms?

it's a 64 samples limit as far as i read in archives some time ago...
http://lists.puredata.info/pipermail/pd-list/2002-04/006123.html

Martin


___
Pd-list@iem.at <mailto:Pd-list@iem.at> mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] is bang~ limited to a 64 sample block?

2009-06-19 Thread Martin Schied

hi!

hard off wrote:
I made a patch which times the duration between two bangs sent by 
[bang~].   If i set the blocksize to the default of 64, then each bang 
comes 1.4ms apart - as expected with 44.1khz samplerate.


However, making the blocksize smaller has no effect on the duration 
between the bangs. 

Does bang~ have a speedlimit of 64 samples?  If not, what is the 
limiting factor stopping me getting bangs more often than every 1.4ms?



it's a 64 samples limit as far as i read in archives some time ago...
http://lists.puredata.info/pipermail/pd-list/2002-04/006123.html

Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [ot][really ot] microphone amplifier

2009-06-13 Thread Martin Schied

Hi,

maybe your electret mic had no power? Like other condenser mics (it's 
actually a kind of condenser mic) it needs to have a small power source. 
See following page for more info on microphone powering:


http://www.epanorama.net/circuits/microphone_powering.html

Martin

mrz wrote:

hello, thanks for all the replies!

This won't work with the AK1, because the level of those electret-mics 
is to low. The mic-input in AK1 is working for other mics like dynamic 
mics or condensator mics. Or am i missing something? (I'm not really 
educated in microphonics.)


Anyway, I found now my fast workaround: -(because the performance will 
be in less than 2 weeks, and I have to hack telephons and a lot of 
other stuff)- The cheap microphon goes into my mp3-player and will be 
amplified there in monitor mode and goes direct into the Audio Kontrol 1.


thanks again- When I have the time I build this "amp-circuit"..

cheers
moritz


On Thu, Jun 11, 2009 at 3:25 AM, PSPunch > wrote:



Hi,


I use an AK1 myself.
It has two inputs channels, one with a mic preamp (and also 48V)
built in it.

For your "cheap mic" (mono I suppose?) it is likely that all you
need is an adapter to convert it to the relevant size... 1/4inch
or XLR. Pop it into input channel 1 and select the input source to
"MIC" using the front button.

If your "stereo mic" is one of those that are battery operated and
has 1 output connector, it is likely you will need a connector to
split the output to feed the two inputs in front of the AK1.

And last, if your stereo mic is NOT battery operated, you will
probably need at least one external mic preamp cause the AK1 has
only one built in.

If you can send me a photo of the mic including the connectors, I
maybe able to forward you to the necessary adapters.


hei,
I have a question not directly related to PD. But since this
list is my favorite audio and device-hackers list I ask it here.
(maybe you can refer me to a nice list about topics like that.)
I have some microphones - a very cheap small microphone and a
stereo mic- they work fine to record into my mp3-player.
But I want to record directly with those mics into pd trough
my soundcard (audio kontrol 1). And it's not amplified.
How can i build a hardware amplifier for those mics- or buy
something like that? any suggestions?
(I prefer to buy something- since I have to hack allready a
lot of other devices...)

thanks for any hints
cheers
[moritz~]






___
Pd-list@iem.at  mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list



___
Pd-list@iem.at  mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list




--
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://www.moritzwettstein.com
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pizza slice in gem

2009-06-12 Thread Martin Schied

Jack wrote:

Maybe this… (but i'm not sure ! :)
For Andrew Faraday : Can you post your funny patch on this list ? ;)
++

Jack

maybe you could also adapt this for angular summing. sorry, don't have 
much more time today,


Martin


pizzaSlicePot3.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pizza slice in gem

2009-06-11 Thread Martin Schied

Hans-Christoph Steiner wrote:


It does some really nice stuff if you add a high-speed counter to it:



:D

did something almost similar

;rtin


pizzaSlice.3.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pizza slice in gem

2009-06-10 Thread Martin Schied

there you are...

only an idea.
bon appetit...

Martin



Hi guys
im trying to make a 2D pizza slice like shape using GEM. I want to 
control the angle of the slice mantaining the roundness of its extenal 
shape.
 
I have tried using [curve] but have had no luck when altering the 
angle. I have tried basic math and trigonometry to assign the values 
of the different points, but had no luck cause the intersections 
between the sides and the external border get rounded up. It seems to 
me that [curve] is not the right object to use. Specifically i have 
been using the object [curve] with 5 points but have not managed.

I want to make a solid shape, not just the outline.
 
thanks
 
Daniel



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  




pizza.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] in/out count

2009-06-05 Thread Martin Schied

potax flan wrote:

yo
this is doing my head in but i guess it's not rocket science...
trying to figure out a system to keep track of how many people are in 
a room at any given moment.
already have 2 sensors doing the physical work and sending bangs to 
pd, but then i get stuck...
ii have 2 bangs – one for the left sensor, the other for the right, so 
that the left+right sequence means someone goes in and the right+left 
one means someone leaves the room.
i was trying to make it as elegant and simple as possible instead of 
having a crazy gate/select contraption.

ideas?

this is what I figured out (attached)

Martin


direction-select.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] wiimote problems

2009-05-30 Thread Martin Schied

hi!

at least one "wiimote" external from Mike Wozniewski comes from here, 
but he says "linux only":


http://mikewoz.com/pd-stuff.php

Martin


Andrew Faraday wrote:

Hey guys

I've looked at old forum and mailing list entries and it seems all the 
links given are out of date.


I need to get data from a wii remote into pd in OSX. I've seen the 
[wiimote] object operating before now but I can't find where to 
download it.


I've also downloaded Darwiinremote, which is synching but I don't know 
how I could get that data into PD.


God Bless

Andrew 



Surfing the web just got more rewarding. Download the New Internet 
Explorer 8 




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [GEM] ps3eye camera on linux / OSX? Working in GEM!

2009-05-28 Thread Martin Schied

obviously I couldn't sleep without having this done...

@Jaime: I tried setting 75fps @ 320x240 which also works fine with Gem.

v4l cpu consumption is much lower (35% to 40%) in debian unstable (I was 
using sidux live cd for that)
would be interesting how much cpu consumption other operating systems 
have compared to this, especially mac os-x. I'll start a new topic on this.


Martin




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [GEM] ps3eye camera on linux / OSX? Working in GEM!

2009-05-28 Thread Martin Schied

Jaime Oliver wrote:

Hi, that's great news! I haven't had the chance of doing the process
myself. do you get the high frame rates it can do? (60-120 fps?)

best,

J
  
No, unfortunately I didn't try that yet, but I'm sure it will also work 
for more than 30 fps, because these erroneous pictures appeared also 
with arbitrary frame rates and dimensions.


I'm having some problems with v4l cameras at the moment which prevent me 
from using higher frame rates: it's consuming too much cpu (80% for one 
camera at 640x480, 30fps, Centrino 1.6GHz, ubuntu intrepid and jaunty, 
various kernel versions). I Don't know what's the reason for this, but 
it's also with other cameras and other v4l applications, appearing to be 
a v4l problem in general.


I'll report further success.

Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [GEM] ps3eye camera on linux / OSX? Working in GEM!

2009-05-28 Thread Martin Schied

Now I did it. And it works fine. Thanks!

;artin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] looking for a circular buffer for dsp blocks or similar.

2009-05-22 Thread Martin Schied

Thomas Grill wrote:

Hi Martin,
although i don't fully understand your intentions, you could use 
xrecord~ and xplay~ (part of xsample) for implementing a circular buffer.

gr~~~

Hi,

I didn't try xplay~ and xrecord~ yet, but I'll do so when I have more time.

to explain my intentions: for example I want to have a record of the 
past 10 seconds when something triggers the buffer object, in "no time". 
I made an abstraction for this, see attachment in my previous post.


thanks anyway!

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] looking for a circular buffer for dsp blocks or similar.

2009-05-22 Thread Martin Schied

Georg Bosch wrote:


Am 19.05.2009 um 15:22 schrieb Martin Schied:
My idea was, to use a kind of delayline which is big enough to 
contain the whole signal and then copy the entire content of this 
delayline "in one moment", so in effect no time has been wasted for 
delaying the signal. It could save 11ms in this example.


Hi,

Eric Lyon has a delay line with copy-to-buffer feature called el.vdp~, 
el.vdb~ is also worth a look. i never used them in Pd though and I 
don't know how instantaneous it copies.

thanks for that suggestion, those are nice externals...
I tried vdb~ and vdp~ but both of them weren't much easier to use for my 
intention than creating a new abstraction, see attachment. It's still 
buggy in some case. It needs tab_copy (from iem_tab in pd-extended)


cheers,
Martin




circular_buffer~-help.pd
Description: application/puredata


circular_buffer~.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] libmp3lame0 vs. liblame0

2009-05-19 Thread Martin Schied

Hans-Christoph Steiner wrote:


Thanks for spotting that, I fixed it.

sorry, if that's already done elsewhere, but both, rc2 (now official) 
and also (inofficial) rc3 still have a dependency to liblame0


here's what I get in my shell (sorry, german shell)

/tmp $ sudo dpkg -i Pd-0.41.4-extended-rc2-ubuntu-hardy-i386.deb

...
pd-extended hängt ab von liblame0 (>= 3.97); aber:
Paket liblame0 ist nicht installiert.
...

/tmp $ sudo apt-get install liblame0
...
Paket liblame0 ist nicht verfügbar, wird aber von einem anderen
Paket referenziert. Das kann heißen, dass das Paket fehlt, dass es veraltet
ist oder nur aus einer anderen Quelle verfügbar ist.
Doch die folgenden Pakete ersetzen es:
libmp3lame0


/tmp $ sudo apt-get install libmp3lame0
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Lese Status-Informationen ein... Fertig
libmp3lame0 ist schon die neueste Version.



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] looking for a circular buffer for dsp blocks or similar.

2009-05-19 Thread Martin Schied

Hi!

is there already something like a 'circular buffer' external or 
abstraction for dsp blocks?


I want to detect onsets / attacks of 512 sample long signals using 
[fiddle~ 1024] and write them in arrays of 1024 samples.


for now my patch looks like this:

the signal is going to [fiddle~ 1024] and to a [delay~] with 576 samples 
(512 + 64) which is going to tabwrite~.
after fiddle~ detects an attack it starts a recording of tabwrite. (see 
also attached patch)


Altogether this process needs 33ms (1024 + 512 + 64 samples) after an 
attack has happened to record a signal of 22ms. (1024 samples)


My idea was, to use a kind of delayline which is big enough to contain 
the whole signal and then copy the entire content of this delayline "in 
one moment", so in effect no time has been wasted for delaying the 
signal. It could save 11ms in this example.


I'm also open for other suggestions. I already thought of 
"pre-recording" blocks with multiple delay~ + tabsend~ and copying them 
together after a bang from fiddle~, but felt not well by thinking this...

also some concerns for this:
-using big blocks (1024) there's an additional uncertainity to match 
analysis windows of fiddle~ so their offset to fiddle~ must be known.
-using small blocks (64) this becomes unhandy for long delays when not 
using dynamic patching (at least with my knowledge of pd)


btw. can somebody explain where those additional 64 frames (1 Block) 
delay are coming from? Is fiddle's (and also bonk's) output delayed by 
one audio block? attached is an example showing this. (and also the 
above mentioned)


cheers,
Martin





fiddletest.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] libmp3lame0 vs. liblame0

2009-05-17 Thread Martin Schied

Martin Schied wrote:




The deb for Debian Lenny depends on liblame0 from Debian Multimedia
(lame 3.97), but there is also a package libmp3lame0 (lame 3.98) that
conflicts with liblame0. pd-extended 0.40.3-1 depends on libmp3lame0,
that should be the preferred one.


Thanks for spotting that, I fixed it.

.hc

hi,

should this already be fixed in rc2?

liblame0 is missing when I try to install version 0.41-4extended-rc2  
(compiled 08:11:33 May 15 2009)


but using following version: (0.41-4extended-20090507, compiled 
12:10:09 May  7 2009)

there's no missing package.

thanks,
Martin

oops. forgot to mention:

ubuntu intrepid, 8.10

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] libmp3lame0 vs. liblame0 (was: Pd-extended 0.41.4 release candidate 1)

2009-05-17 Thread Martin Schied




The deb for Debian Lenny depends on liblame0 from Debian Multimedia
(lame 3.97), but there is also a package libmp3lame0 (lame 3.98) that
conflicts with liblame0. pd-extended 0.40.3-1 depends on libmp3lame0,
that should be the preferred one.


Thanks for spotting that, I fixed it.

.hc

hi,

should this already be fixed in rc2?

liblame0 is missing when I try to install version 0.41-4extended-rc2  
(compiled 08:11:33 May 15 2009)


but using following version: (0.41-4extended-20090507, compiled 12:10:09 
May  7 2009)

there's no missing package.

thanks,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] Maximum size of arrays (gui version) when using bezier / polygon

2009-05-15 Thread Martin Schied

Hi all,

I'm using arrays to display contents of 1024 sample wide audio blocks. 
When using bezier or polygon mode all values of samples greater than 
1000 are not visible anymore. Their values are still there.


Is there a reason for a 1000 pixels limit for bezier or polygon mode? Is 
it extendible to a "digital age compatible" 1023?


Attached patch demonstrates the limit. I had this on several different 
versions of pd extended, also current release candidate  (don't know 
about vanilla).


ubuntu 8.04
Pd version 0.41-4extended-rc2
compiled 08:11:33 May 15 2009



array-test.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [GEM] ps3eye camera on linux / OSX?

2009-05-14 Thread Martin Schied

IOhannes m zmoelnig schrieb:

Martin Schied wrote:

ok. this is what I get into GEM (pd extended, nightly one or two 
weeks ago, sorry for not being that precise...), ubuntu 9.04


pd-extended has (afaik) no libv4l support yet, which is definitely the 
way to go if anything fails like in your case :-)


could you try to compile Gem yourself?
grab the sources via subversion from 
https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem



yes, I'll do that (later)

and aptitute install "lib4vl-dev"
(you should also install at least Gem's build-dependencies via 
"apt-get build-dep gem")


the only sad thing is that libv4l on jaunty is still a bit outdated 
(compared to debian squeeze)
jaunty was only installed for testing purpose anyways, so using debian 
squeeze would'nt be a problem at all...


thanks!

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [GEM] ps3eye camera on linux / OSX?

2009-05-14 Thread Martin Schied

Martin Schied schrieb:

Jaime Oliver schrieb:

Hi,

I have changed the subject to [GEM] if perhaps people have missed
it... it would be great if anyone else is interested in this because
to have a 120fps camera for less than 40$ working in GEM would be
amazing...

When was the las time you tried this driver?

I'm getting one of these cameras at some point this week to try it
out. It seems that with that driver you can get a video0 device, but
you can only change settings when you load the driver and therefore
not through pix_video...

I'll let you know if I have any success.

  
yeah, that would be really great and also was one of my thoughts when 
buying that cam. i already tried several resolutions + fps at module 
load time, wich works for other applications than GEM. that was 
approximately one week ago. but i'm not sure if it was the latest 
driver available though. I made a flickr account, so I'll be able to 
upload some pictures of the errors later.




ok. this is what I get into GEM (pd extended, nightly one or two weeks 
ago, sorry for not being that precise...), ubuntu 9.04


http://www.flickr.com/photos/38404...@n08/sets/72157618127535288/
one "clear" picture from cheese for comparison.


As I'm still on ubuntu 8.04 for work i tried to compile "MT gspca 
modified driver V0.5" for it, but this kernel seems to old for these 
modules.


so this is all from ubuntu jaunty 9.04:

modinfo:

filename:   
/lib/modules/2.6.28-11-generic/kernel/drivers/media/video/gspca/gspca_ov534.ko

license:GPL
description:GSPCA/OV534 USB Camera Driver(kaswy mod for MT use V0.5)
author: Antonio Ospite 
srcversion: 2669EC48DECC8E6AB8C781B
alias:  usb:v1415p2000d*dc*dsc*dp*ic*isc*ip*
depends:gspca_main
vermagic:   2.6.28-11-generic SMP mod_unload modversions 586
parm:   videomode: = xx //Set the videomode(see doc) (int)
parm:   autogain: = [0|1] //Autogain (agc,aec,awb) (bool)
parm:   gain: = [0..63] //main gain (int)
parm:   exposure: = [0..255] //Exposure (int)
parm:   redblc: = [0..255] //Red Balance (int)
parm:   blueblc: = [0..255] //Blue Balance (int)
parm:   sharpness: = [0..63] //Sharpness (int)
parm:   vflip: = [0|1] //Vertical flip (bool)
parm:   hflip: = [0|1] //Horizontal mirror (bool

when i start rendering i get these messages repeatedly (every frame?) in 
console output:


VIDIOCSYNC: Invalid argument
VIDIOCSYNC: Invalid argument
VIDIOCMCAPTURE1: Invalid argument
VIDIOCMCAPTURE2: Invalid argument

when changing dimen in pix_video:
error: x dimensions too great
error: y dimensions too great

see flickr images for differences when using RGB, grey, YUV

camera has been set to 640x480 before. I also tried different videomode 
settings at module load time, without difference for these errors.



cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [GEM] ps3eye camera on linux / OSX?

2009-05-13 Thread Martin Schied

Jaime Oliver schrieb:

Hi,

I have changed the subject to [GEM] if perhaps people have missed
it... it would be great if anyone else is interested in this because
to have a 120fps camera for less than 40$ working in GEM would be
amazing...

When was the las time you tried this driver?

I'm getting one of these cameras at some point this week to try it
out. It seems that with that driver you can get a video0 device, but
you can only change settings when you load the driver and therefore
not through pix_video...

I'll let you know if I have any success.

  
yeah, that would be really great and also was one of my thoughts when 
buying that cam. i already tried several resolutions + fps at module 
load time, wich works for other applications than GEM. that was 
approximately one week ago. but i'm not sure if it was the latest driver 
available though. I made a flickr account, so I'll be able to upload 
some pictures of the errors later.


;artin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] ps3eye on linux / OSX?

2009-05-12 Thread Martin Schied

Jaime Oliver schrieb:

So this is the linux driver. if it's not v4l yet could it be grabbed by gem?

J

On Tue, May 12, 2009 at 1:28 AM, Jaime Oliver  wrote:
  

Hi all,

I have found this great camera:
http://shop1.frys.com/product/5421229?site=sr:SEARCH:MAIN_RSLT_PG

and multiple threads on drivers at http://nuigroup.com and in the
openframeworks forum.

the cam can do 120...@320x240 for 30$ in amazon...

I also found an old thread about using pix_freeframe on pd/gem in
windows: http://lists.puredata.info/pipermail/pd-list/2008-11/066401.html
Has anyone successfully captured this camera in gem on linux or osx?




tried it on ubuntu 9.04, it works fine with "cheese" and some other 
applications, but I had no luck with gem. (didn't try pdp yet). there's 
a picture when using the cam with gem but it's unusably distorted (looks 
like a rainbow coloured "grid" on top of the picture). also some crashes 
occured while changing its settings in gem. i had not much time for 
further testing, so maybe it's possible to make it work. i had similar 
errors with an other cam in mplayer before, where v4l fps setting fixed it.


I was using drivers from http://kaswy.free.fr/?q=node/42  - maybe the 
original drivers are different with gem...?


there's hardly visible noise and very nice contrast, but edges seemed to 
be over-sharpened - perhaps that's adjustable somewhere. nice cam for 
this price, but i wouldn't rely on it until know.


btw. the built in 4-channel audio inteface works fine using oss + pd.

;artin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] get lines from textfile

2009-04-23 Thread Martin Schied

Jack schrieb:

Maybe with this objects : [until], [spigot], [select] or [==].
Or you can use [msgfile] with the message [goto(.
++

Jack


Le 22 avr. 09 à 13:21, potax flan a écrit :

did something like that as abstractions, see attached files.

readlines reads all lines of a file + amount of lines
readline reads single lines of a file when banged + amounts of lines 
when end of file is reached.


;
artin


readline.pd
Description: application/puredata


readlines.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] get block-size in upsampled / downsampled patches - sample based delay?

2009-04-20 Thread Martin Schied




I get the current blocksize from [bang~] [timer] and [samplerate].  
(see attachment) But in upsampled patches the [samplerate~] outputs 
the "upsampled" samplerate, so my calculated blocksize is 
upsampling-factor * audio-samplerate.
hmm. this seems to be only the case when the logical time for bang~ 
happens to be below the duration for a 64 samples block (or perhaps 
below 1ms?). I found an old thread in the list from 2002 which seems to 
explain my problems:


http://lists.puredata.info/pipermail/pd-list/2002-04/006123.html

thanks anyway

cheers
;
artin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] get block-size in upsampled / downsampled patches - sample based delay?

2009-04-20 Thread Martin Schied

Hi,

I'm currently creating some analysis patches which have to run upsampled 
(simply because I don't want to wait ages). Inside these patches I need 
to know how many samples have been passed (or how much "upsampled time" 
has passed). So I can't use [delay] and made a counter which counts 
samples, based on current blocksize and bang~.


I get the current blocksize from [bang~] [timer] and [samplerate].  (see 
attachment) But in upsampled patches the [samplerate~] outputs the 
"upsampled" samplerate, so my calculated blocksize is upsampling-factor 
* audio-samplerate.


is there a way to get the "upsampling factor"?  or is there already a 
blocksize based [delay] for messages i have overseen?


attached the abstraction I use for block size at the moment.

cheers

;
artin




blocksize~.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Wiimote on pure dyne

2009-04-15 Thread Martin Schied

Hi!



btw, has anybody managed to use the wiimote (or libcwiid to be 
precise) with a kernel > 2.6.26?


fgmasdr
IOhannes
yes. here it's working on ubuntu intrepid 2.6.27-11-generic. But I know 
of general bluetooh problems on intrepid's recent kernels, maybe > 
2.6.26 - but I don't remember exactly.


Martin






___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd and recent jackd

2009-04-10 Thread Martin Schied



Hi Martin,

I try various rt priority settings without any success, dropouts are
still here.

I think part of your problem comes form : 
zombified - calling shutdown handler

To avoid this you can can try to increase the jackd timeout watchdog
with option -t 5000 or disabling  client zombification with option -Z.

Which version of jackd do you use?
  
currently I'm using jackd version 0.116.1, before that I was using 
0.109.2-3ubuntu1 (current intrepid version?), which already had this 
"issue".


I also noticed that different timeout settings made noticeable changes 
to this issue but it didn't solve the problem entirely,  (btw. I already 
was using 9000ms, and this watchdog is not jack-related but built into 
pd / gui as far as i know.)


when trying different things concerning realtime permissions I also 
noticed that priorities for "audio" group in /etc/security/limits to 
something below 10 (don't know exactly anymore) also had an influence 
(because pd had no more rt permissions then).


now everything's fine when jack is started with sufficient priority, no 
matter which other settings I use with jack (except dropouts with too 
low latency or doing graphics stuff with gem in the same instance of pd).


Martin








___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd and recent jackd

2009-04-09 Thread Martin Schied

Hi!

joel silvestre schrieb:

I'm afraid there's something wrong with Pd and new jackd releases
(0.116.x). 
Pd gives some ; watchdog: signaling pd... and audio dropouts.

The watchdog errors appears only on a gui-less pd, I can't say if it's
the same for dropouts as the gui is likely to produce some audio
clicks. 

  
This might be the same issues which bothered me some time ago. Try 
running jack using '-R' and '-P' parameters together like:


jackd -R -P 15 -d alsa 

You can also set -P in qjackctl

For me everything above 11 worked without these errors on alsa, for 
firewire audio I had to set it slightly higher.


Also have a look at what roman said in this thread, which was quite helpful:
http://lists.puredata.info/pipermail/pd-list/2009-04/069267.html

cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] interpolation of arrays

2009-04-05 Thread Martin Schied

Martin Schied schrieb:

hi!

punchik punchik schrieb:
Hello,  which is the best way for interpolating all the elements in a 
big array at the same time?
im using each number of a big  array to control the color of  each 
geo in a iterated structure, so its not posible to use the smooth 
abstraction.

Any idea?
  
probably not the "best" way but much faster than [until], needs to 
have audio on.



oops that was a quick one before bed...

attached a cleaned up and slightly adjusted version and a version using 
pixeltango/smooth. feel free to use, modify and redistribute.


Martin


table_blend.pd
Description: application/puredata


table_blend_smooth.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] interpolation of arrays

2009-04-04 Thread Martin Schied

hi!

punchik punchik schrieb:

Hello,  which is the best way for interpolating all the elements in a big array 
at the same time?
im using each number of a big  array to control the color of  each geo in a iterated structure, so its not posible to use the smooth abstraction. 


Any idea?
  
probably not the "best" way but much faster than [until], needs to have 
audio on.


Martin


table_interpolate.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] multiple .pdsettings files? [was Re: Strange real time behavior with pd-extended...)]

2009-04-03 Thread Martin Schied

Mathieu Bouchard schrieb:

On Fri, 3 Apr 2009, Martin Schied wrote:

I'd like to have the possibility to have multiple versions of 
.pdsettings (so changes can directly be applied in the menu and saved 
for future use). For a short period of time I was using some start 
commands copying .pdsettings files around before starting pd but that 
was (obviously) no good solution.


You can change the value of $HOME in the context of Pd:

  HOME=$HOME/realtime-pd pd blah.pd

or

  (export HOME=$HOME/realtime-pd
   pd blah.pd)

which I believe are exactly the same, but with the latter syntax you 
can do more... but changing HOME means that ~ at the beginning of 
filenames will change its meaning, for any context that understands ~ 
to mean $HOME.

nice solution, I hardly use ~/ in pd anyway...

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] multiple .pdsettings files? [was Re: Strange real time behavior with pd-extended...)]

2009-04-03 Thread Martin Schied

Hi!

Roman Haefeli schrieb:

On Thu, 2009-04-02 at 19:45 +0200, Martin Schied wrote:

  
Nevertheless it's very weird and I don't understand why the order of 
loading something can be interfering with priorities. It would be nice 
to have a place to put information like this  - i wonder why there are 
no other people running into these crashes.




iirc, i did run into crashes in similar situations, though i cannot
recall the exact details.

finally, i decided, that i never want any graphics to run in realtime,
risking a more likely freeze of the machine without any real gain,
whereas i almost always want audio to be realtime and also would like to
avoid graphics to interfere with audio whenever possible. 


since then i haven't used '-lib [Gem|pdp|gridflow]' and '-rt' in the
same instance of pd and could get rid of such nasty issues. in projects,
that use both, audio and video, i usually put all tilde and timing
objects into the audio (-rt, maybe -nogui) pd instance and the gui
stuff, video calculation and displaying into the video (-nrt) pd
instance. both talk over a network socket with each other.

roman

  
probably that's what's I'm going to do now too. although it would be 
nice to have the possibility to do a quick visualization of something in 
gem without having to start a second instance.


i already have a separation of pd for "working" (rt) and one for 
"reading patches" (nrt, noaudio) to avoid unwanted crashes - so there 
will be a third one soon...


from there arise some more questions or thoughts:

I'd like to have the possibility to have multiple versions of 
.pdsettings (so changes can directly be applied in the menu and saved 
for future use). For a short period of time I was using some start 
commands copying .pdsettings files around before starting pd but that 
was (obviously) no good solution. Has there already been a feature 
request for specifying different .pdsettings files? like a 'pd -prefs 
.mypdsettingsfile' ? This was the main obstacle for me to use multiple 
instances of pd with different settings. I know that I have the 
possibility to specify everything needed in a bash script for startup, 
but that's always some more clicks and key strokes than just using the menu.


cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Strange real time behavior with pd-extended + Jack + Libraries

2009-04-02 Thread Martin Schied




just to make sure this isn't a typo: it happens on both RT and non-RT 
kernels?

yes.

and it turns out that the problem's sitting again in front of the 
machine, not inside...


I did some additional experiments with realtime settings of jack. 
previously I didn't know that I can supply jack with both arguments  (-R 
and -P) together, so maybe there's no actual bug at all:


jackd -R -P  where  has to be greater than 10 to get no 
more crashes on my system. maybe there were some changes in jack's 
default setting or i just "accidently" didn't have these crashes before.


previously I didn't know that I can supply jackd with both arguments  
(-R and -P) together, so maybe there's no bug at all.


Nevertheless it's very weird and I don't understand why the order of 
loading something can be interfering with priorities. It would be nice 
to have a place to put information like this  - i wonder why there are 
no other people running into these crashes.


cheers,
Martin


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] Strange real time behavior with pd-extended + Jack + Libraries

2009-04-02 Thread Martin Schied

Hi all.

I'm running Ubuntu Intrepid 2.6.27-3-rt #1 PREEMPT RT and having some 
strange things happening when loading libraries like GEM, pdp or pidip 
together with using real time priority for jack and pd:


starting jack: jackd -R -d alsa
starting pd: /usr/bin/pd -jack -rt -channels 2 -noprefs -stderr

then i make a new patch and create [Gem]
it takes some time (hard disk working) and then everything's fine.

then i close pd, start pd again like above, again create [Gem] (this 
time no noticeable harddisk action, files are cached) and pd crashes:


...
GEM: using MMX optimization
cannot read server event (Connection reset by peer)
zombified - calling shutdown handler
watchdog: signaling pd...
watchdog: signaling pd...


I can avoid this crash by different things:

start with -nogui
start with channels 0, then creating [Gem] then set up media, jack
start pd without real time priority or start jack without real time 
priority or with -P (priority setting) which gave too much xruns, at 
least with firewire audio.


it also crashes when i start pd without audio, then set up audio in the 
menu and then create [Gem]


I also posted this as bug at the Gem sourceforge page, but then i found 
out that it's not Gem related. As I mentioned before, it also happens 
with pdp / pidip, but Interestingly not every time I create pdp (but 
always together with pidip)


my workaround is now loading all libs at startup and then sending a 
message to pd to setup audio:


[; pd audio-dialog 0 0 0 0 4 0 0 0 0 0 0 0 4 0 0 0 48000(


anyone having similar things happening? i could reproduce it on an other 
pc using ubuntu jaunty, but it didn't happen on hardy. also non-realtime 
kernels give me these problems.


cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] [lrshift~] inlet doesn't accept floats (any more?)

2009-03-26 Thread Martin Schied

Hi,

just to be sure before sending another "false" bug report. I was looking 
at lrshift~-help.pd, there's an example of a float box going into 
[lrshift~]'s signal inlet, but changing this float values causes an 
error post:


error: lrshift~: no method for 'float'

Pd version 0.41-4extended-20090323
compiled 11:51:58 Mar 23 2009

thanks,
Martin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] latency spikes on linux when sending wiimote's rumble and LED messages

2009-03-26 Thread Martin Schied

Hi!

I can confirm this on ubuntu 8.10 (intrepid), 2.6.27-11-generic

sorry for being late with this...

Martin


Has anyone encountered issues with the wiimote external (pd-extended 0.42 on
8.10 Ubuntu 2.6.29-rc6-rt kernel) when using "rumble" and/or LED commands?
The system appears to be rock solid in terms of audio latency (thanks to the
rt kernel) until I use one (or both) of the aforesaid features. As soon as
rumble and/or LED are enabled, I get xruns practically every other
millisecond reported by Pd (red button on the main Pd window).



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how to freeze pd

2009-03-12 Thread Martin Schied

same here.

Pd version 0.41-4extended-20090301
compiled 09:29:58 Mar  1 2009

cheers,
Martin

hard off schrieb:

* create a subpatch
* create an object box in the subpatch, but don't type anything inside 
the box
* go back to the parent patch and convert the subpatch into another 
object (i tried to make it a [send])

* enjoy pd freeze







___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd/GEM and camera for tracking

2009-03-06 Thread Martin Schied
hi Jack,

it's about $200 for the "firefly mv". They somehow don't want their 
prices in public...
I had a lower price in mind - maybe I mixed that up with the unibrain. I 
think for that application it's not necessary using higher frame rates. 
I tried simple movement detection and tracking in gem, using a low 
resolution 30fps picture and it was nice to play with, yet at low light.

Martin



> Hello Martin and thanx for your reply,
>
> In fact, i need a camera to track people in a space (indoor). The  
> camera will be on the ceiling.
> There is 5 meters between the ceiling and the floor.
> With the coordinates of people, i will turn on/off differents lamps  
> on a statue placed in the center of the space.
> So i need a camera working on a MacMini with MacOSX.5 and Pd and GEM.  
> The last MacMini has a FireWire 800 and 5 USB 2.0.
> I saw the point grey website, but i can't find price on it. However,  
> they talk about 10 meters cable for FireWire 800.
> Do you know a model and its price ?
> Today, I tried a Unibrain Fire-i™ Digital Board Camera and it seems  
> good (FireWire 400 : 89 euros + 19 euros with lens) But i never tried  
> it in installation.
> ++
>
> Jack


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd/GEM and camera for tracking

2009-03-06 Thread Martin Schied
hey all,

Jaime Oliver schrieb:
> mmh, I don't really know about lengths. I think there is a limit to 
> how long your firewire cable should be. I usually work with analog 
> cameras in linux where cables can be long ad I capture with a pci card.
>
> I think a cheap option that I've seen working well with macs is the 
> unibrain fire-i:
> http://www.unibrain.com/Products/VisionImg/Fire_i_DC.htm
>
> you can buy lenses and chain them, not more than 30fps though,
>
> J
lengths between firewire 400 devices is usually 4.5m, but you can daisy 
chain them up to 16 times giving you 72 metres. it's not very 
recommendable to make long chains, as every plug may be a "weak point" 
in your chain. firewire 800 can have longer cables, but i don't know...

Jack schrieb:
> Thanx for the reply. The models are too big for me. I need a smaller 
> camera (something like a cube) because the installation must be 
> discreet. Have you something else to suggest ?
> Chris : what do you think about Sony driver ? I can't use a PCI card 
> because i will work with a macmini.
> ++

as manufacturer of small firewire cameras there's also "point grey". I 
don't know exactly about cost, and didn't try them on my own but they 
often were recommended by people doing tracking, also being said they 
were affordable, especially the "firefly mv" which delivers 
60...@640x480 and even higher frame rates at lower resolutions.

that's what they say about macintosh (seems to work):
http://www.ptgrey.com/support/kb/index.asp?a=4&q=173

i also made tests with usb webcams (only on linux and windows), some 
with usable results but most of them are crap. to be usable they should 
support "real" usb2.0 for high frame rates at full sensor resolution 
(usually 640x480), without compression and have ccd sensors for better 
quality and light sensitivity. (finding out usb version and other 
technical stuff can be real pain from manufacruerer sites, usually 
you'll have to try them).
image quality was always worse than cheap video cameras - but as an 
advantage they were not interlaced like usual consumer video cameras. 
cable lengths can be extended by usb hubs or "repeater" cables several 
times, but that's also the "many-connectors - many errors" thing

@Jack: what exactly will your tracking method be based on? natural 
features? colors? markers? with some luck a cheap usb webcam  could be 
good enough and also really small. (yeah, i'm a fan of using cheap 
consumer producs and having trouble with them - be warned)

cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Model.pd helppatch [was: call for help: help patch fixing]

2009-03-02 Thread Martin Schied
hi, IOhannes

>
> i think it could be related to:
> - your version of Gem (as cyrille suggested)
> - the model you are loading.
> - your gfx-card/ / openGL-driver
>
> let's try to rule out #1 and #2.

OK,
now I have:

- installed new pd extended version (Pd version 0.41-4extended-20090301) 
from autobuilds
- tried again differend .obj, (venus.obj and also any simple object I made)

no luck so far. still have to create gemwin before loading.

I didn't change my graphics card's driver (using x.org "radeon" driver), 
if you have suggestions which settings might be responsible I'll try 
them. It's a pretty old notebook on board chip, lspci says: ATI Radeon 
Mobility M7 LW  [Radeon Mobility 7500]

cheers
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Model.pd helppatch [was: call for help: help patch fixing]

2009-03-01 Thread Martin Schied
hi,

IOhannes m zmoelnig schrieb:
> bigsw...@cox.net wrote:
>   
>> Hans this may be off topic, but speaking of help patches. What is up with 
>> the Gem/Examples/Basic/Model.pd file?
>> 
>
> hmm, i really don't understand why hans is bothered with this.
>
>
> if it is a bug in Gem, please try to confirm so and post a bug-report at
> http://pd-gem.sf.net
>
> i think the Gem splash-screen (which you get when loading Gem) is pretty
> clear about this.
>
>   
I already posted this bug and got reply from Cyrille Henry, it seemed 
not to occur for recent cvs version, view link below.

at least for pd-extended from otherside intrepid repository a workaround 
is creating gemwin before loading patches containing [model object.obj] 
or before loading '.obj' files

bugreport was:

[ pure-data-Bugs-2630421 ] [model foobar.obj] crashes when no gemwin is 
created before:

https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2630421&group_id=55736


cheers,
Martin



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [PD-dev] extremely fast pure pd [list-drip] (fwd)

2009-02-25 Thread Martin Schied

hey, I like that approach...

I often used message boxes for list splitting in my current project 
because they were the fastest solution I could find using a benchmark of 
[t b b b] and [realtime].


Is there some obvious disadvantage I'm missing? Are messages one of the 
fastest "objects" in pd?


I implemented this into a test patch using list-drip-quick and a 
derivate with messages wich seems to be faster than list-drip-quick for 
list containing more than 10 elements. Dind't try bigger lists, but it 
should be the same speed gain. Is there a more elegant looking way, 
especially for those dummy-elements I'm using?


cheers,
Martin

Mathieu Bouchard schrieb:

On Wed, 25 Feb 2009, Hans-Christoph Steiner wrote:

Sounds very cool.  Just out of curiosty, how did you measure the 
speed difference?  That would be a useful technic to know about for 
testing in general.


I use [t b a b] with [realtime], similar to enrique's, but i pass a 
float around for deciding of how many elements in the list. I made it 
automatically try several consecutive powers of two. I generated a 
large list using [#for] and [#to_list], but I included the generation 
of the list in the measurements I made. since then, I moved that part 
to above the [t b a b] so that it doesn't get measured. But that extra 
time is almost neglectible and taking it out would only result in a 
more insane speed ratio.


I also tried [usertime] but it is not really more accurate than 
[realtime] and its resolution is much worse. [usertime] and 
[systemtime] is in GridFlow and just uses the OS's corresponding 
functions, and in Linux, they sort of suck.


Finally I have just tried [tsctime], also from GridFlow, and this uses 
the CPU's built-in clock. When it does work, it's much more consistent 
than [realtime], but it can be fooled by the power-saving of the CPU, 
and it doesn't stop when switching to different processes, just like 
[realtime]. OTOH, [usertime] and [systemtime] do stop when switching 
processes, but they accumulate a lot of error.


Ideally, you'd put the equivalent of [tsctime] straight in the Linux 
kernel's scheduler, and it'd measure the time locally per process. If 
you also put it in the Linux kernel's system-call gate, you can also 
rewrite the usertime/systemtime system-call to use that and get a 
million times more precision than the existing functions.


Else, if you want an accurate measurement, you have to do it 
statistically. On average, making a test four times will get you twice 
more precision, so if you repeated the test 10 times and now you 
repeat it 1000 times, you will get one more trustable decimal in the 
average time.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list
  




list-drip-quick-test.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] phase-canceling

2009-02-24 Thread Martin Schied
hi,

mrz schrieb:
> yes,i find it also not an absurd question.
> I had build a loop machine, and i did want to phase cancel the sound 
> is coming out of the speakers to be able recording and play again new 
> stuff over that loop in "realtime" (overdubbing). But as far as i 
> understand it is a really complex thing to do so as chuck allready 
> mentioned. But someone build allready a kind of "feedback canceller" 
> or is it simply not possible in the real world?
it's possible: http://en.wikipedia.org/wiki/Echo_cancellation

but I'm no expert at this...

perhaps there's some reusable code of asterisk or other telephony 
software with implementations of cancellation mechanisms someone could...

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Array that scrolls from right to left

2009-02-24 Thread Martin Schied
Hi Sebastien,

> Sebastien Lelong hat gesagt: // Sebastien Lelong wrote:
>
>   
>> I have one question though (not related to [trigger]). In your example, as
>> in Martin's, you use $0-a16 to name the array. I understand $0 is used when
>> building an abstraction and creating multiple instances of this abstraction.
>> My question is how can I configure this array, from the parent (from the
>> patch using the abstraction) ? For instance, I'd like to add "xticks",
>> "ylabel", etc... I usually use a message, like:
>> _
>> [array1 ylabel -1 0 1 (
>>
>> but the same with $0-a16 obsviously doesn't work, since $0 is not known (I
>> understand it's a counter incremented at each creation). 
>> 

if there aren't too many of those arrays in your patch, probably Frank's 
solution is far more simple and convenient.

another possibility would be using creation arguments as names. you 
would then use $1-arrayname in an abstraction instead of $0-arrayname 
which uses the first creation argument of the abstraction in your parent 
patch. (so $2 stands for the second creation argument and so on)

if you create an object [myabstraction something]  in your parent patch 
you can access the array's properties by sending for example

[ylabel -1 0 1(
 |
[s something-arrayname]

or like you wrote before using
[; something-arrayname ylabel -1 0 1(]

also have a look at /doc/2.control.examples/14.dollarsigns.pd for more 
stuff with dollar signs as creation arguments. (i found it kind of 
confusing the first time, so perhaps better don't try too hard and have 
a look later again)

notice that dollar signs in messages like

[$1 $2 (

are not the same as dollar signs from creation arguments. That's one 
thing which can also seem strange when learning pd...

Just try the below to understand what dollar signs stand for in messages.

[one two three four(
 |
[$2 $3 $1(
 |
[print]

Dollar sings in messages like the above are not affected by creation 
arguments, by default they return 0 (and an error message, just click on 
the message [$2 $3 $1( directly to see that).

in the ppd_scroll abstraction you would have to change each $0-graph 
into $3-graph (because $1 and $2 are already in use) and then create 
instances of it like [ppd_scroll 10 1 myname] and send settings to 
myname-graph then.

cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Array that scrolls from right to left

2009-02-23 Thread Martin Schied

Hi!

Sebastien Lelong wrote:


So far so good, I've been able to build all the OSC part, and even 
plot things in a array in pd~, but I can only find a way to plot data 
from left to right, and when array's end is reached, clear it and 
start from beginning again. In other words, I can't make it scroll...


I made something very similar but whithout scrolling originally. I added 
something to make it scroll, view the attached patch. there's a settable 
refreshrate (redraws the array every n values) so it doesn't consume too 
much CPU just for redrawing.


I'm not sure if that third part of the patch should be optimized like 
the first one - does copying and rewriting from a 'visible' array 
refresh the array on each write? Perhaps someone knows...



Martin




ppd_scroll.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] smooth without dsp objects

2009-02-07 Thread Martin Schied

Hi,


Hi , is there any version of the smooth abstraction but without dsp objects?

attached a simple remake of smooth.pd from pixeltango without "~" objects.

Martin


ppd_smooth.pd
Description: application/puredata
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] communicating with the shell

2009-02-05 Thread Martin Schied

Chris McCormick wrote:

Attached is a concrete example of this for your specific use case. It
allows you to run arbitrary commands on your shell and get the results
back into Pd. I know you said that this seems messy to you, but I feel
that Claude's way is actually quite elegant.

Untar the attached, and then do:

pd -open runme.pd &; sleep 5; ./listener

  

thanks, that's very useful...
i changed it to udp version using netcat - useful when using a remote 
machine without pd or for saving some tcp overhead on local use. 
unfortunately it doesn't support disconnects (port number of pd changes 
on reconnect). Using netcat with tcp should be possible as well, using 
Chris's version and netcat instead of pdreceive / pdsend.


Martin



puredata-bash-communicator_udp.tgz
Description: GNU Unix tar archive
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] video bluescreen

2009-02-03 Thread Martin Schied
Hi,

Garrett Lynch wrote:
> I'm trying to put together a video bluescreen and I'm just not finding 
> the right object I think.  pix_multiply sort of does what I want by 
> dropping out white in a video and replacing it with another video but 
> how do I get this working with a defined colour (i.e. not necessarily 
> white but the blue or green normally used in studios).  There seem a 
> few objects that deal with different ways of mixing 
> images/videos pix_mask, pix_mix, pix_composite etc.  Which is the 
> right one to use?  Thanks in advance.
[pix_chroma_key] could do what you need. For higher quality results 
you'll have to use several objects and use some compositing techniques 
like explained here:

http://www.blendedplanet.com/?Freebie_Tutorials:The_Ultimate_Keyer

It's for blender3d and probably overkill for your needs but you can use 
some of its basic principles in GEM too.

 - btw has anyone done something like that in pd? I only used it in 
blender some time ago.

cheers,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pix_image and pix_texture alpha

2009-02-02 Thread Martin Schied
Hi,

Garrett Lynch wrote:
> Can anyone tell me how I use an image with transparency in pix_image 
> going through a pix_texture to a rectangle in a gemwin?  I'm loading a 
> png which has an alpha channel, is this the way to do it?  Thanks in 
> advance.

[alpha] will do it:

[pix_image]
 |
[alpha]
 |
[pix_texture]


Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] max for live

2009-01-19 Thread Martin Schied
Hi,

Matthew Logan wrote: 
> Has anybody tried putting a later version of Pd (from later than 2004) 
> in there?
I don't remember which versions I used, but when trying the newest 
extended release version approx. one year ago it crashed on creation of 
the vst plugin in my host sequencer. I later used jack for Windows and 
midi-ox instead which worked quite well.

Martin
>   I just wanted to check to see if anyone has updated it without 
> breaking it.
>
> On Fri, Jan 16, 2009 at 8:35 AM, Alex  > wrote:
>
> As Live is proprietary software, and they have already embedded Max, I
> don't see how PD could get into it... though PD can be used in
> parallel to Live, sending midi [and I assume audio?.. using Jack or
> soundflower or something?]
>
> PD can also be used as a vst [though I've never done it, being a Linux
> only user, and preferring to work directly in PD]:
> http://crca.ucsd.edu/~jsarlo/pdvst/
> 
>
> Besides the inline editing [inside Live], I haven't thought of a real
> example that cannot be done with PD along-side of Live.. though, it is
> not as slick..
>
> -Alex
>
> On 1/16/09, harris_pil...@gmx.de 
> mailto:harris_pil...@gmx.de>> wrote:
> > hi guys,
> >
> >  i was just wondering why you guys dont do this max for live
> thing that
> >  was announced? i guess there will be no way that pd will be
> >  implemented in live like that? but maybe someone in the list
> has ideas
> >  to work around that?
> >
> >  for the ones who dont know what i'm talking about; it's pretty much
> >  this:  ableton.com/extend 
> >
> >  ___
> >  Pd-list@iem.at  mailing list
> >  UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
> >
>
> ___
> Pd-list@iem.at  mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
> 
>
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>   


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Artoolkit

2009-01-13 Thread Martin Schied
Hi, sorry for just repeating what has been said before, but I also can't 
get pix_artoolkit to work on ubuntu hardy 8.04. Is there any progress at 
yours Patrick and Mark or someone else?

I had success compiling GEM with artoolkit from svn (2008-12-10) like 
Patrick mentioned.

using the patch contained in 
http://lists.puredata.info/pipermail/pd-list/2008-03/060805.html I tried 
different cameras, video drivers, resolutions and settings but no 
markers are recognized.

Martin



patrick wrote:
> hi mark,
>
>   
>> error: [pix_artoolkit]: compiled without ARToolKit support!
>> 
>
> i really think pix_artoolkit is not working. it can load a marker, init 
> the camera, but it doesn't report the position of the marker. BUT i know 
> that Johannes Taelman managed to make it work on windows...
>
> still if you want to try it out (or sort it out):
> http://lists.puredata.info/pipermail/pd-list/2007-11/056634.html
>
> this is how i did it:
>
> PKG_ARTOOLKIT_CFLAGS="-Ihome/pat/11h11/yeux/artoolkit/include" 
> PKG_ARTOOLKIT_LIBS="-L/home/pat/11h11/yeux/artoolkit/lib -lAR" 
> ./configure 
> --with-artoolkit-includes=/home/pat/11h11/yeux/artoolkit/include 
> --with-artoolkit-libs=/home/pat/11h11/yeux/artoolkit/lib 
> --with-artoolkit-libs --with-v4l2 --with-glversion=2.0 --enable-sse2  
> --enable-Vertex --without-avifile
>
>
> let us know,
> pat
>
>
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>
>   


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Berlin Pure Data Meetings

2008-12-16 Thread Martin Schied
Hey, warming this up again...

after seeing much more Berliners at the RjDj sprint this weekend and at 
least 3 people including myself being interested in reanimating the 
"Stammtisch" I think we can have an other try...

Perhaps we could also find some more unknown pd-users at C-Base?

> PS:
> As I am new here - has maybe someone tips which things are good to go to 
> here in Berlin ?
> Maybe some locations/mailinglists/websites with nice events or 
> communities ? - Thanks for any hints !
>   
My Favorite to go at the weekend and get some freaked out electronics 
and new media art _was_ the Tesla http://www.tesla-berlin.de/ It's worth 
looking at them for a revival or special events.

The "Zentrale Randlage" http://www.zentrale-randlage.org/ was also quite 
cool but they are also kind of disappeard but active on lower level. 
Same as for Tesla...

The "Ausland" http://ausland-berlin.de/ has some interesting events 
sometimes.

The "Antje Öklesund" http://www.antjeoeklesund.de/ was also interesting.

Don't know the C-Base very well but I think it's also interesting.

'm sure there are many more...

Grüße,
Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] [OT] Hardware suggestions - Webcam for GEM/pdp/Linux

2008-12-03 Thread Martin Schied
Hey List!

I'm looking for a webcam wich I can use with [EMAIL PROTECTED], preferable 
with v4l (v4l2 support is still difficult with some apps), usb 
preferred. It has to be a camera with ccd (no cmos chip).

maybe there are *no* cameras with v4l and [EMAIL PROTECTED] - perhaps someone 
knows? Did anyone try a philips spc900nc camera? It should support 90fps 
at lower resolutions but I didn't find one single positive mention about 
that with linux.

not that important, but nice to have:
it would be great if the infrared blocking filter was removable when the 
camera is opened, because I have to use it in IR range for tracking. If 
it's not removable it doesn't really matter because usually it's 
possible to unscrew and replace the lens with an IR-compatible lens from 
other webcams.

I already tried 2 cams:

Logitech Quickcam Pro 5000:
[EMAIL PROTECTED], very low latency, v4l2 driver (no v4l compatibility), 
raw-mode with 640x480 or 640x380 (didn't get other resolutions to work), 
lot of dead pixels (10 dead pixels on 2 different models each, seems to 
be a secret linux-feature, hidden on windows-driver), not very crisp but 
usable image quality, IR-Filter not removable from Lens, whole Lens can 
be easily unscrewed when camera is opened, easy to open, no adjustable 
focus when not opened.

Philips Vesta Pro (PCVC680K):
[EMAIL PROTECTED], v4l driver, slow, less light sensitive than quickcam but 
nice 
crisp image, old (only few used models available), removable IR-Filter 
(pop off the first "ring" on the object lens to remove), tripod mount, 
rugged housing.

both lens-mounts are compatible, seems to be an undefined "standard"

sorry for posting that much - perhaps it's useful for someone?

kind regards, and thanks...

Martin

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


  1   2   >