Re: [PD] pd latency on puredyne 9.10 with Nvidia HDA

2011-03-30 Thread joel silvestre
Just in case, do you run pd with the rt flag?

Joël


Le lundi 28 mars 2011 à 22:02 -0400, Billy Stiltner a écrit :
 On 3/28/11, yvan volochine yvan...@gmail.com wrote:
  On 03/28/2011 01:22 AM, Billy Stiltner wrote:
  I actually tried a smaller patch on both ubuntu studio 10.10 as well
  as puredyne 9.10.
  On both systems the audio was flawless using a 6ms buffer in pd.
 
So there is nothing wrong with my audio setup.
 
  But still the larger patch that runs fine on windows with 50ms buffer
  will not run without glitching with jack on either linux system.
 
  There is a difference in gem's default video codec between linux and
  windows. However I have tried the patch without even loading gem.
 
  What else could be the difference between linux and windows with pd?
 
  not with pd but there certainly are some differences in how the OS
  handles your hardware.
  IIUC you're getting into troubles as soon as the graphics are involved
  in your patch ? your internal soundcard is Nvidia as well as your
  graphic card, therefore my idea of trying with an external soundcard so
  Nvidia chip takes care of graphics only (not sure if that makes sense,
  coffee mode here).
  anyway, I wouldn't trust Nvidia for anything else than graphics but
  maybe that's just me
 
  0.02 €
  _y
 
 yvan, thanks for the suggestion. I will have to try that. I noticed
 that both my sound card and SATA controller are both on IRQ 23 with
 Puredyne. This is not so with windows. Possibly this explains the
 problem. Allthough the glitching occurs when no file writing is
 happening the patch does prepare some files to be written to at
 startup.  The SATA controller is managed by Nvidia as well as the
 sound card. The audio chip(realtek) is separate from the Video and pci
 controller. I have not seen mention of the Realtek drivers for linux.
 So I will try to find out how to get Linux to use a differen't IRQ for
 the SATA controller and see if that does the trick. I don't think the
 BIOS allows for manually setting the IRQs of PCI devices but does
 offer the reserving of IRQs or assigning them to ISA devices. This
 discussion is getting off topic of PD but I would really like to use
 PD with Linux on this machine. I'm probably better off deleting the
 linux partitions though.
 
 ___
 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] readanysf~ v0.30

2009-05-24 Thread joel silvestre

 please see here for the memory leak fix:
 
 http://aug.ment.org/readanysf/download.php
 
 
 it's still leaking a little bit, but I don't think it is due to my code.
 It should be much better now.  Please let me know how it seems.
 
 -august.
 

Yes it's much better! 
And opening a sound file doesn't give any audio dropouts anymore
Wonderfull!

Thank's a lot.



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


Re: [PD] readanysf~ v0.30

2009-05-21 Thread joel silvestre
  When openning a new soundfile, the previous if any, is not closed
  properly. The memory is not freed and the whole thing crash.
 
 hmm.  I think this was a bug I fixed from an older version.  Can you try
 the latest version now and let me know if you still experience this
 problem?
 
 -august.

Still the same with the latest version. Each time a sound file is opened
the memory use by Pd increase. 

for the record previous and now fixed reported bugs were against version
0.33 and not 0.30 as indicated by mistake in the subject.

Thanks for readanysf~ !



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


Re: [PD] readanysf~ v0.30

2009-05-20 Thread joel silvestre
Le mercredi 29 avril 2009 à 03:41 +0200, august a écrit :
 
 
 hallo,
 
 
   I made some major bug fixes to my readanysf~ external.  
   readanysf~ is a puredata external for reading many file formats from
   your hard disk or via network.
 
   please check it out.
 
 
   http://aug.ment.org/readanysf
 
 
 
   -august.


hi august,

a very little bug: the length of file is outputed as an int number,
nothing after the decimal point.

Line 252 in Readsf.cpp is :
return (float)(gavl_time_to_samples( input_audio_format.samplerate, t) /
input_audio_format.samplerate); 

and if I'm not wrong, should be something like :
return (float)(gavl_time_to_samples( input_audio_format.samplerate, t) /
(float) input_audio_format.samplerate); 

Length in second that have been played so far is updated every 1000
dsp blocks. I think it's to much. Loops and events triggering will
benefit a lot of a higher timing resolution, maybe a single dsp block. 

All the best.






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


Re: [PD] readanysf~ v0.30

2009-05-20 Thread joel silvestre
Le mercredi 20 mai 2009 à 18:01 +0200, joel silvestre a écrit :
 Le mercredi 29 avril 2009 à 03:41 +0200, august a écrit :
  
  
  hallo,
  
  
  I made some major bug fixes to my readanysf~ external.  
  readanysf~ is a puredata external for reading many file formats from
  your hard disk or via network.
  
  please check it out.
  
  
  http://aug.ment.org/readanysf
  
  
  
  -august.
 
 

Two new bugs:

Pd crash if Readanysf is asked to play before Pd dsp is turned on. Once
turned on, dsp can be turned back off without crash when readanysf is
asked to play. 

When openning a new soundfile, the previous if any, is not closed
properly. The memory is not freed and the whole thing crash.

All the best



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


[PD] audio delay blues

2009-04-15 Thread joel silvestre
Hi all,

this small patch works perfectly when pd is running with his gui but
does not work at all, no more delay and a distorded beep when pd is
running without gui in vanilla pd 0.41-4, 0.42-2 and pd-extended 0.41-4
but works perfectly with and without gui in Pd-extended 0.40-3.

Do I do something wrong?

All the best.
Joël

#N canvas 958 396 450 300 10;
#X obj 138 83 osc~ 200;
#X obj 138 133 *~;
#X obj 214 36 metro 2000;
#X obj 246 62 delay 100;
#X msg 246 83 0;
#X msg 214 82 1;
#X obj 214 10 loadbang;
#X obj 139 186 dac~ 1 2;
#X obj 186 11 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 239 145 delwrite~ ess 1;
#X obj 238 175 delread~ ess 500;
#X msg 314 26 \; pd dsp 1;
#X obj 313 8 delay 500;
#X connect 0 0 1 0;
#X connect 1 0 7 0;
#X connect 1 0 9 0;
#X connect 2 0 3 0;
#X connect 2 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 1 1;
#X connect 5 0 1 1;
#X connect 6 0 2 0;
#X connect 6 0 12 0;
#X connect 8 0 2 0;
#X connect 10 0 7 1;
#X connect 12 0 11 0;
___
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-11 Thread joel silvestre

 Strange but I have no dropouts when running those patchs on my laptop
 with both alsa and firewire jack backends.
 So I give a try on 2 others hardware and no matter what I do dropouts
 are always here ...
 
 I think your case was different since I have no crash like  zombified -
 calling shutdown handler  but only watchdog: signaling pd... and
 dropouts.
 And troubles arises only when the -rt patch is started with -nogui.
 
 Very simple patch like just [osc~] and [dac~] doesnt' trigger the
 watchdog.
 
 Joël
 


I digg a litlle further and found out it's probably a scheduling issue.
When the gui send the I am happy signal to the watchdog process all is
fine but when there is no gui this task is devoted to the main process
and sometimes fails to do it in time.
As a very ugly workaround I comment out  the   kill(getppid(), SIGHUP);
line in s_watchdog.c 
Watchdog is still signaling as before but dropouts are gone! To be sure
the pd patch outputs a 1Khz sinewave monitored with jaaa in peak hold
mode.

That's all my little knowlegde can do...

All the best
Joël






___
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 joel silvestre
Le jeudi 09 avril 2009 à 21:52 +0200, Martin Schied a écrit :
 Hi!
 
 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
 

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?

All the best



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


[PD] pd and recent jackd

2009-04-09 Thread joel silvestre
Hi all,

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. 

Everything performs well with old jackd ver 109.2.

I tried different revision of pd-extended from 0.39.2 to  0.41.4,
watchdog and dropouts are here..

All the best
Joël





___
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 joel silvestre
Le lundi 23 février 2009 à 23:02 +0100, yohannes a écrit :
 hello everybody,
 
 maybe sounds absurd:
 
 is it possible to cancel an whole signal of an mic input through 
 phase-canceling?
 
 if yes, how can i do dat in pd?
 

Hi yohannes,

maybe you are looking for something like an acoustic echo canceller.
Speex has one:

http://www.speex.org/docs/manual/speex-manual/node4.html#SECTION0045

maec~.c is a more than ugly very first attempt for an external quickly
written to give speex a try. 
I had quite good results, close to 20dB rejection, with only one micro
and only one speaker. Rejection is close to nothing with 2 speakers. As
I need a good rejection with 5 speakers I gave up. 

All the best,
Joël

/*
 * 
 */

#include sys/types.h
#include stdio.h
#include stdlib.h
#include math.h
#include m_pd.h
#include speex/speex_echo.h




/* pd's samplerate */
float fs;
unsigned int frame_size = 64;	// Pd block size;
unsigned int filter_length = 4410; // 100ms @ 44.1Kz

static t_class *maec_class;

typedef struct _maec
{
	t_object x_obj;
	t_float f;
  
} t_maec;


spx_int16_t *input_frame;
spx_int16_t *echo_frame;
spx_int16_t *output_frame;
spx_int16_t *deco_in, *deco_out;


SpeexEchoState *echo_state;
SpeexDecorrState *deco_state;




static t_int *maec_perform(t_int *w)
{

	/* Achtung !!!
	 * inlet and outlet buffer share the same memory !!!
	 */ 

	int n, i, j;

	n = (int)(w[15]);

	t_maec *obj = (t_maec *)(w[1]);
	t_float *in = (t_float *)(w[2]);
	t_float *echo = (t_float *)(w[3]);

	t_float *in1 = (t_float *)(w[4]);
	t_float *in2 = (t_float *)(w[5]);
	t_float *in3 = (t_float *)(w[6]);
	t_float *in4 = (t_float *)(w[7]);
	t_float *in5 = (t_float *)(w[8]);

	t_float *out = (t_float *)(w[9]);
	t_float *out1 = (t_float *)(w[10]);
	t_float *out2 = (t_float *)(w[11]);
	t_float *out3 = (t_float *)(w[12]);
	t_float *out4 = (t_float *)(w[13]);
	t_float *out5 = (t_float *)(w[14]);

/*
	for (i = 0, j = 0 ; in; i++) {
		deco_in[j++] = (spx_int16_t) floorf(0x7fff * in1[i] + 0.5);
		deco_in[j++] = (spx_int16_t) floorf(0x7fff * in2[i] + 0.5);
		deco_in[j++] = (spx_int16_t) floorf(0x7fff * in3[i] + 0.5);
		deco_in[j++] = (spx_int16_t) floorf(0x7fff * in4[i] + 0.5);
		deco_in[j++] = (spx_int16_t) floorf(0x7fff * in5[i] + 0.5);

//		echo_frame[i] =(spx_int16_t) floorf(0x7fff/5.0 * (in1[i]+in2[i]+in3[i]+in4[i]+in5[i] +0.5));
	}

	speex_decorrelate(deco_state, deco_in, deco_out, 50);

	for (i=0, j=0; in; i++){
		echo_frame[i] =(spx_int16_t) floorf((deco_out[j]+deco_out[j+1]+deco_out[j+2]+deco_out[j+3]+deco_out[j+4])/5.0) +0.5;
		j+=5;
	}*/

	for (i = 0; in ; i++) {
		input_frame[i] = (spx_int16_t) (floorf((32767.0 * in[i]) + 0.5));
		echo_frame[i] = (spx_int16_t) (floorf((32767.0 * echo[i]) + 0.5));
	}
	speex_echo_cancellation(echo_state, input_frame, echo_frame, output_frame);

	for (i = 0; in; i++) {
		out[i] = (t_float) output_frame[i] / (float) 0x7fff;
	}
	
/*	for (i = 0, j = 0; in; i++) {
		out1[i] =  (t_float) deco_out[j++] / (float) 0x7fff;
		out2[i] =  (t_float) deco_out[j++] / (float) 0x7fff;
		out3[i] =  (t_float) deco_out[j++] / (float) 0x7fff;
		out4[i] =  (t_float) deco_out[j++] / (float) 0x7fff;
		out5[i] =  (t_float) deco_out[j++] / (float) 0x7fff;
	//	out5[i] = (t_float) echo_frame[i]/ (float) 0x7fff;
  
	}*/

	return (w+16);
}


static void maec_dsp(t_maec *x, t_signal **sp)
{
		dsp_add(maec_perform, 15, x, sp[0]-s_vec, sp[1]-s_vec, sp[2]-s_vec, sp[3]-s_vec, sp[4]-s_vec,
			 	sp[5]-s_vec, sp[6]-s_vec, sp[7]-s_vec, sp[8]-s_vec, sp[9]-s_vec, sp[10]-s_vec, sp[11]-s_vec, 
sp[12]-s_vec, sp[0]-s_n);
}

static void *maec_new(t_symbol *s, int argc, t_atom *argv)
{
	t_maec *x = (t_maec *)pd_new(maec_class);

	inlet_new(x-x_obj, x-x_obj.ob_pd,  gensym(signal),  gensym(signal));
	inlet_new(x-x_obj, x-x_obj.ob_pd,  gensym(signal),  gensym(signal));
	inlet_new(x-x_obj, x-x_obj.ob_pd,  gensym(signal),  gensym(signal));
	inlet_new(x-x_obj, x-x_obj.ob_pd,  gensym(signal),  gensym(signal));
	inlet_new(x-x_obj, x-x_obj.ob_pd,  gensym(signal),  gensym(signal));
	inlet_new(x-x_obj, x-x_obj.ob_pd,  gensym(signal),  gensym(signal));

	outlet_new(x-x_obj, gensym(signal));
	outlet_new(x-x_obj, gensym(signal));
	outlet_new(x-x_obj, gensym(signal));
	outlet_new(x-x_obj, gensym(signal));
	outlet_new(x-x_obj, gensym(signal));
	outlet_new(x-x_obj, gensym(signal));

	return (x);
}

void maec_length(t_maec *x, t_float f)
{
	speex_echo_state_reset(echo_state);
	deco_state = speex_decorrelate_new(fs, 5, frame_size);
	echo_state = speex_echo_state_init_mc(frame_size, f, 1, 1);
	speex_echo_ctl(echo_state, SPEEX_ECHO_SET_SAMPLING_RATE, fs);

	post(%f/n, f);
}


void maec_tilde_setup(void)
{


	fs = 44100; // sys_getsr();
	maec_class = class_new(gensym(maec~), (t_newmethod)maec_new, 0, sizeof(t_maec), 0, A_GIMME, 0);
	CLASS_MAINSIGNALIN(maec_class, t_maec, f);

	class_addmethod(maec_class, (t_method)maec_dsp, gensym(dsp), 0);
	class_addfloat(maec_class, (t_method)maec_length);

	input_frame = getbytes(frame_size * 

[PD] infrared remote control

2009-01-12 Thread joel silvestre
Hello,

I'm looking for a way to use an infrared remote control input in a
patch. Is there an external for lirc?

Thanks,
Joël



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


[PD] audio delay

2008-12-02 Thread joel silvestre
Hello,

I'm searching how to do a sample resolution audio delay. Is it possible?

All the best,
Joël



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


Re: [PD] audio delay

2008-12-02 Thread joel silvestre
Hi Franck,

very interesting!

I've tried delwrite~ / delread~ and it's looks like to me that the
minimum delay can't be less than one audio block ( sound card buffer ).
Am I wrong?

Thanks a lot!
Joël


Le mardi 02 décembre 2008 à 14:50 +0100, Frank Barknecht a écrit :
 Hallo,
 joel silvestre hat gesagt: // joel silvestre wrote:
 
  I'm searching how to do a sample resolution audio delay. Is it possible?
 
 Yes, even in multiple ways: One would involve [rzero~]. rzero acts like
 this on audio input: 
 
  y[n] = x[n] - a[n] * x[n-1]
 
  y[n]: output sample n
  x[n]: input sample n
 
 If you set a = 1 and substract this from the original signal, you get: 
 
  y[n] = x[n] - (x[n] - x[n-1]) = x[n-1]
 
 You could also set a = -1 and substract the original from rzero's output:
 
  y[n] = (x[n] + x[n-1]) - x[n]) = x[n-1]
 
 Both are a one sample delays. In Pd the first approach would realised as:
 
  [inlet~]
  | \
  |  [rzero~ 1]
  |  |
  [-~]
  |
  [outlet~]
 
 Another way would be to use a normal delay with [delwrite~] and
 [delread~] and set the delay time to be one sample. One sample at a
 samplerate SR takes 1/SR seconds or 1000/SR milliseconds, so do this: 
 
  [samplerate~]
  |
  [swap 1000]
  | /
  [/~  ]
  |
  [* 1]
  |
  [delread~ mydelay]
 
 Use this approach if you want to calculate delay times with more than
 one sample. Just change the [* 1] to [* 5] to get a delay of five
 samples, for example.
 
 Ciao
 
 ___
 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] audio delay

2008-12-02 Thread joel silvestre
Hi Sylvain,

that's exactly what I was looking at, thanks!

Joël


Le mardi 02 décembre 2008 à 14:27 +0100, Sylvain Le Beux a écrit :
 Hi Joel,
 
 
 Look at z~ , part of zexy library.
 
 
 Best
 
 
 S.
 
 2008/12/2 joel silvestre [EMAIL PROTECTED]
 Hello,
 
 I'm searching how to do a sample resolution audio delay. Is it
 possible?
 
 All the best,
 Joël
 

 



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


Re: [PD] audio delay

2008-12-02 Thread joel silvestre
So I'm double wrong!


Le mardi 02 décembre 2008 à 15:54 +0100, IOhannes m zmoelnig a écrit :
 joel silvestre wrote:
  Hi Franck,
  
  very interesting!
  
  I've tried delwrite~ / delread~ and it's looks like to me that the
  minimum delay can't be less than one audio block ( sound card buffer ).
 
 it has nothing to do with the soundcard buffer, 64 samples is Pd's 
 internal blocksize.
 
  Am I wrong?
  
 
 yes.
 see 3.audio.examples/G05.execution.order.pd
 
 
 fgmasdr
 IOhannes
 



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


[PD] pd-extended lenny install

2008-11-07 Thread joel silvestre
Hi,

pd-extended seems to depend on libmpeg1 but this package doesn't exist
in 4.0 lenny. 
I had to install it from etch repository but don't know if it's a good
idea?

Same for ubuntu 8.10 intrepid.

All the best
Joël





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


Re: [PD] Soundfile player

2008-06-11 Thread joel silvestre
Thanks, readanysf~ seems fine. I'll try to build it soon.

joël

Le samedi 07 juin 2008 à 22:10 +0200, Hans-Christoph Steiner a écrit :
 
 I think readanysf~ should do flac, but you'll have to build it from  
 source.  For wav, you should look at xplay~ from xsample.  Just  
 [import xsample] from Pd-extended.
 
 .hc
 
 On Jun 5, 2008, at 11:02 AM, joel silvestre wrote:
 
  Hi,
 
  I'm new to Pd and I'm looking for a wav or flac player with seek and
  pause capability, something like oggread.
 
  Thanks and congratulations for Pd people, Pd is great!
 
  joel
 
 
 
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
  listinfo/pd-list
 
 
 
  
 
 
 I have the audacity to believe that peoples everywhere can have three  
 meals a day for their bodies, education and culture for their minds,  
 and dignity, equality and freedom for their spirits.  - Martin  
 Luther King, Jr.
 
 
 



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


[PD] Soundfile player

2008-06-05 Thread joel silvestre
Hi,

I'm new to Pd and I'm looking for a wav or flac player with seek and
pause capability, something like oggread.

Thanks and congratulations for Pd people, Pd is great!

joel




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