Re: [PD-dev] libPd hanging audio and other questions

2013-07-11 Thread Ed Kelly
Hi Dan,

Thanks for your help. I know they're holding off the rewrite in OF 7 due to 
time and budgetary constraints, but we think there was another reason why it 
kept hanging.

A, external I wrote in C gives out sample accurate events (rather that 
block-aligned ones) as well as a signal. The outlet_float statements were 
embedded within the DSP loop. You can get away with this in Pd running on a 
computer, but it doesn't work on an iPhone.

This may be bad programming (I'm not sure - I taught myself) but it does cause 
Pd to crash when DSP is turned off in ofxPd on iOS. The DSP never got turned 
off and a chunk of audio was left looping, regardless of what the DSP chain was 
supposed to be doing, both in the simulator and on the device.

Anyhow, I re-coded the external using a Pd clock to block-align the events and 
the problem went away. And I have finally learned to use clocks in Pd external 
coding! Ah, what fun I'm going to have ,-)

Does anyone know what the standard blocksize for writing RT audio from memory 
to the SD card in an iPhone is? That's another problem we're facing. Drop-outs 
happen when recording, and we think it might be because we need to deal with 
the audio in certain size chunks, but we're not sure what that size might be. 
And do they have to synchronize with Pd's block size (i.e. 64 samples) in order 
for this to work?

Cheers,
Ed
 
Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/ 



 From: Dan Wilcox danomat...@gmail.com
To: Ed Kelly morph_2...@yahoo.co.uk 
Cc: Peter Brinkmann peter.brinkm...@googlemail.com; PD List 
pd-l...@iem.at; Andrew Wallen andy.wal...@seeper.com 
Sent: Thursday, 11 July 2013, 17:17
Subject: Re: libPd hanging audio
 


You could try the 007 tag: https://github.com/danomatika/ofxPd/releases, 
everything after that will not work without some src modifications. (It may 
not be that much).


Personally, I would consider updating your version of OF. You'd need to remake 
the xcode project, but the sound stuff is in a much better shape.

On Jul 11, 2013, at 12:11 PM, Ed Kelly morph_2...@yahoo.co.uk wrote:

Hi Dan,

Thanks for quick response. Even with these compiler flags, we get the same 
result. On the same page there is this:


RtAudio Hang on Exit in 0062
RtAudio will hang on app exit in OF 0062. The only way to fix this is to 
make a small edit to the OF 0062 core by editing 
lib/openFrameworks/sound/ofSoundStream.cpp and commenting line 143 so close() 
is not called.

I'm not entirely sure which version we're using, but the ofSoundStream.cpp 
file is only 140 lines long.
If we upgrade to the latest
 ofxPd, will it still work with OF 6.2?
Cheers,
Ed

Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/



 From: Dan Wilcox danomat...@gmail.com
To: Ed Kelly morph_2...@yahoo.co.uk 
Cc: Peter Brinkmann peter.brinkm...@googlemail.com; PD List 
pd-l...@iem.at; Andrew Wallen andy.wal...@seeper.com 
Sent: Thursday, 11 July 2013, 16:52
Subject: Re: libPd hanging audio
 


Howdy guys,

See https://github.com/danomatika/ofxPd#for-xcode-1


From my notes, I have: -DHAVE_UNISTD_H -DUSEAPI_DUMMY -DPD -dynamiclib -ldl 
-lm


I also added this to the libpd Github wiki: 
https://github.com/libpd/libpd/wiki/libpd#build-settings



On Jul 11, 2013, at 11:45 AM, Ed Kelly morph_2...@yahoo.co.uk wrote:

Hi Dan, Peter,

I'm here with our ofxPd-based iPhone app, and we are getting a repeat of a 
particular problem listed here:
http://createdigitalnoise.com/discussion/150/pdbase-closepatch/p1

Namely:

 when closing a patch I would receive
 this message: sys_close_audio: unknown API 9

and then we get a buzz, like a block of audio is being looped. We can't 
closePatch from the app code, nor can we turn DSP off from the app code.

In the forum post mentioned above, Peter Brinkmann said this was due to 
incorrect compiler flags. Can you tell us what the compiler flags were and 
what they were changed to?


Caveat - we are still using openFrameworks 6.2.


Cheers,
Ed Kelly

Ninja Jamm - a revolutionary new music remix app from Ninja Tune and 
Seeper, for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for
Pure Data, now with dynamics!
http://sharktracks.co.uk/


Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com










Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com







___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] [PD] Rewriting a unified phasor / metro object for reading tables

2013-05-09 Thread Ed Kelly
This is what it used to look like (forgot to include the pic ;)
Ed
 
Ninja Jamm - a revolutionary new musix remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/ 


- Original Message -
 From: Ed Kelly morph_2...@yahoo.co.uk
 To: i go bananas hard@gmail.com; Ivica Ico Bukvic i...@vt.edu
 Cc: PD List pd-l...@iem.at; pddev pd-dev@iem.at
 Sent: Thursday, 9 May 2013, 14:33
 Subject: Re: [PD] Rewriting a unified phasor / metro object for reading tables
 
 I figured out how to do this.
 
 Generally the problem is this: the signals to run four independent tracks in 
 my 
 patch are all devised from one phasor~ object that scans a single bar of 
 material. Clicks then appear in the material when jumping from one bar to the 
 next, because the control events are quantized to the 64 samples of a block. 
 So 
 we get lines like the picture enclosed that read the material using tabread~.
 
 In order to get rid of the clicks, I have an alternative method for reading 
 the 
 material _without_ adding any new DSP objects (this has to run on an iPhone 
 4). 
 It involves the phasor~-esque object ramping from 0 to 8 over 8 bars or not, 
 depending on whether it is jumping around or smoothly reading the 2, 4 or 
 8-bar 
 loop.
 
 I already have this working - it has to detect when the ramp is crossed and 
 generate a clock signal from it for the intra-bar rhythms. I took phasorshot~ 
 as 
 my prototype, but that had the same problem as before, namely that non-signal 
 pulses are quantized to 64 sample blocks. I tried using clocks but they went 
 out 
 of sync while the tempo was being changed of course.
 
 So, I built an object where all the clocks are derived from the phasor ramp, 
 but 
 sent out as control rather than DSP signals. It uses more CPU than phasor~ 
 does 
 (~70% more) but no matter how much you speed-up or slow down the phasor~ 
 on-the-fly, the clocks never go out-of-sync. It's called phasorbars~.
 
 I'll be uploading a version of the external soon to svn, and anyone 
 who's downloaded Ninja Jamm for their i-device will get an update soon also.
 
 Cheers,
 Ed
 
 
 why not just make a half speed phasor~, retrigger the phase to zero with a 
 normal metro, and then multiply the output by 2?
 
 
 
 
 
 
 
 On Thu, May 9, 2013 at 10:09 AM, Ivica Ico Bukvic i...@vt.edu wrote:
 
 Assuming you want a pulse in non-signal domain, you could use disis_phasor~ 
 (see http://l2ork.music.vt.edu/main/?page_id=56 for download links) which 
 outputs a bang every time ramp is crossed. This is only accurate to the 
 nearest 
 sigvs size (by default 64 bytes) as there is no guarantee that you will get a 
 msg interrupt exactly at the time ramp has crossed.
  
 HTH
  
 From:pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] On Behalf Of 
 Ed Kelly
 Sent: Wednesday, May 08, 2013 5:00 PM
 To: PD List; pddev
 Subject: [PD] Rewriting a unified phasor / metro object for reading 
 tables
  
 Hi Lists(s),
  
 I'm rewriting phasor~ and unifying it with metro so that a pulse is 
 generated from the boundaries of each ramp - so that bars of music can be 
 read 
 using tabread~ objects with a sample-accurate metro.
  
 I'm sure someone will say this can already be done, but it has to be 
 dropped into the Ninja Jamm patch, so there isn't really time to rewrite the 
 rest of the patch.
  
 I don't fully understand the way phasor~ wraps, but I have the 
 object firing out bar numbers correctly. I'm putting clocks in for 16ths and 
 24ths of the beat, initiated on each wrap. I need to minimise CPU, so what I 
 want to know is this:
  
 Does phasor~ always start from 0 and go to 1, i.e. is there always a 
 signal value of 0 at the start of the ramp and a signal value of 1 at the 
 end? 
 As I write this, my common sense tells me it should be yes but I 
 want to make sure. I suppose I should just try it really...
  
 Cheers,
 Ed
  
 Ninja Jamm - a revolutionary new musix remix app from Ninja Tune and 
 Seeper, for iPhone and iPad
 http://www.ninjajamm.com/
 Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
 http://sharktracks.co.uk/
 ___
 pd-l...@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 
 
 
 
  
 attachment: bad_ramps.jpg___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] [PD] Rewriting a unified phasor / metro object for reading tables

2013-05-09 Thread Ed Kelly
I figured out how to do this.

Generally the problem is this: the signals to run four independent tracks in my 
patch are all devised from one phasor~ object that scans a single bar of 
material. Clicks then appear in the material when jumping from one bar to the 
next, because the control events are quantized to the 64 samples of a block. So 
we get lines like the picture enclosed that read the material using tabread~.

In order to get rid of the clicks, I have an alternative method for reading the 
material _without_ adding any new DSP objects (this has to run on an iPhone 4). 
It involves the phasor~-esque object ramping from 0 to 8 over 8 bars or not, 
depending on whether it is jumping around or smoothly reading the 2, 4 or 8-bar 
loop.

I already have this working - it has to detect when the ramp is crossed and 
generate a clock signal from it for the intra-bar rhythms. I took phasorshot~ 
as my prototype, but that had the same problem as before, namely that 
non-signal pulses are quantized to 64 sample blocks. I tried using clocks but 
they went out of sync while the tempo was being changed of course.

So, I built an object where all the clocks are derived from the phasor ramp, 
but sent out as control rather than DSP signals. It uses more CPU than phasor~ 
does (~70% more) but no matter how much you speed-up or slow down the phasor~ 
on-the-fly, the clocks never go out-of-sync. It's called phasorbars~.

I'll be uploading a version of the external soon to svn, and anyone who's 
downloaded Ninja Jamm for their i-device will get an update soon also.

Cheers,
Ed


why not just make a half speed phasor~, retrigger the phase to zero with a 
normal metro, and then multiply the output by 2?







On Thu, May 9, 2013 at 10:09 AM, Ivica Ico Bukvic i...@vt.edu wrote:

Assuming you want a pulse in non-signal domain, you could use disis_phasor~ 
(see http://l2ork.music.vt.edu/main/?page_id=56 for download links) which 
outputs a bang every time ramp is crossed. This is only accurate to the 
nearest sigvs size (by default 64 bytes) as there is no guarantee that you 
will get a msg interrupt exactly at the time ramp has crossed.
 
HTH
 
From:pd-list-boun...@iem.at [mailto:pd-list-boun...@iem.at] On Behalf Of Ed 
Kelly
Sent: Wednesday, May 08, 2013 5:00 PM
To: PD List; pddev
Subject: [PD] Rewriting a unified phasor / metro object for reading tables
 
Hi Lists(s),
 
I'm rewriting phasor~ and unifying it with metro so that a pulse is generated 
from the boundaries of each ramp - so that bars of music can be read using 
tabread~ objects with a sample-accurate metro.
 
I'm sure someone will say this can already be done, but it has to be dropped 
into the Ninja Jamm patch, so there isn't really time to rewrite the rest of 
the patch.
 
I don't fully understand the way phasor~ wraps, but I have the object firing 
out bar numbers correctly. I'm putting clocks in for 16ths and 24ths of the 
beat, initiated on each wrap. I need to minimise CPU, so what I want to know 
is this:
 
Does phasor~ always start from 0 and go to 1, i.e. is there always a signal 
value of 0 at the start of the ramp and a signal value of 1 at the end? As I 
write this, my common sense tells me it should be yes but I want to make 
sure. I suppose I should just try it really...
 
Cheers,
Ed
 
Ninja Jamm - a revolutionary new musix remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/
Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/
___
pd-l...@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list




 

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] Rewriting a unified phasor / metro object for reading tables

2013-05-09 Thread Ed Kelly
Thanks Katja.

I'm doing things in a quick and dirty manner, to see if they work and so that 
they can be implemented quickly for the 100,000 or so downloads we've had, but 
I want to get it right. We'll have a testflight version next week so we'll be 
able to test the new version (it's like a heart transplant for the app).

The first thing is that it has to work with the limited resources of the 
iPhone4 (the most basic device we are supporting). The second is to make it 
better, so that we can move from tabread~ s to tabread4~s, but I think this'll 
be just for the iPhone5. I really want it to be super efficient, so I'll study 
your code.

Interesting that the original phasor~ relies on a double precision variable for 
the wrap. Sometime we need to move onto 128bit architecture, but probably not 
too soon ;)

Cheers,
Ed
 
PS thanks for answering the question I asked.
 
Ninja Jamm - a revolutionary new musix remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/ 


- Original Message -
 From: katja katjavet...@gmail.com
 To: Ed Kelly morph_2...@yahoo.co.uk
 Cc: PD List pd-l...@iem.at; pddev pd-dev@iem.at
 Sent: Thursday, 9 May 2013, 10:12
 Subject: Re: [PD-dev] Rewriting a unified phasor / metro object for reading 
 tables
 
 On Wed, May 8, 2013 at 11:00 PM, Ed Kelly morph_2...@yahoo.co.uk wrote:
 
  ...
  Does phasor~ always start from 0 and go to 1, i.e. is there always a signal 
 value of 0 at the start of the ramp and a signal value of 1 at the end? As I 
 write this, my common sense tells me it should be yes but I want to 
 make sure. I suppose I should just try it really...
  ...
 
 
 A [phasor~] ramp should start with the remainder after wrapping, which
 is non-zero in most cases.
 
 For pd-double I had to rewrite [phasor~], and it turned out that an
 implementation with branching is more efficient on current Intel
 processors. ARM processors do branch predication, it could be
 efficient as well. You could try the code from here and put message
 triggers in the branches:
 
 https://github.com/pd-projects/pd-double/blob/master/src/d_osc.c
 
 
 Katja
 

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] phasorbars~

2013-05-09 Thread Ed Kelly


 
Ninja Jamm - a revolutionary new musix remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/ #include m_pd.h
#include math.h

#define UNITBIT32 1572864.  /* 3*2^19; bit 32 has place value 1 */

/* machine-dependent definitions.  These ifdefs really
should have been by CPU type and not by operating system! */
#ifdef IRIX
/* big-endian.  Most significant byte is at low address in memory */
#define HIOFFSET 0/* word offset to find MSB */
#define LOWOFFSET 1/* word offset to find LSB */
#define int32 long  /* a data type that has 32 bits */
#endif /* IRIX */

#ifdef MSW
/* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
#endif

#if defined(__FreeBSD__) || defined(__APPLE__)
#include machine/endian.h
#endif

#ifdef __linux__
#include endian.h
#endif

#if defined(__unix__) || defined(__APPLE__)
#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) 
#error No byte order defined
#endif  

#if BYTE_ORDER == LITTLE_ENDIAN 
#define HIOFFSET 1  
#define LOWOFFSET 0 
#else   
#define HIOFFSET 0/* word offset to find MSB */ 
#define LOWOFFSET 1/* word offset to find LSB */
#endif /* __BYTE_ORDER */   
#include sys/types.h
#define int32 int32_t
#endif /* __unix__ or __APPLE__*/

union tabfudge
{
double tf_d;
int32 tf_i[2];
};

/* -- phasorbars~ -- */
static t_class *phasorbars_class;

typedef struct _phasorbars
{
  t_object x_obj;
  double x_phase;

  t_float value, prevalue, ivalue, incr, cycle, length, pflag, nextreset;
  //  t_float count16, count24;
  float x_conv; /* 1 / the sample rate */
  float x_f;  /* scalar frequency */
  float looping;

  t_outlet *x_bar, *x_8a, *x_8b, *x_16, *x_24, *evens;

  int semiquavers, sqtriplets;
} t_phasorbars;

t_int *phasorbars_perform(t_int *w)
{
t_phasorbars *x = (t_phasorbars *)(w[1]);
t_float *in = (t_float *)(w[2]);
t_float *out = (t_float *)(w[3]);
int n = (int)(w[4]);
double dphase = x-x_phase + UNITBIT32;
union tabfudge tf;
int normhipart;

float conv = x-x_conv;

tf.tf_d = UNITBIT32;
normhipart = tf.tf_i[HIOFFSET];
tf.tf_d = dphase;

while (n--)
{
  tf.tf_i[HIOFFSET] = normhipart;;
  x-ivalue = *in++;
  dphase += x-ivalue * conv; //increment
  x-value = tf.tf_d - UNITBIT32;
  if(x-pflag) {
	if(x-value  x-prevalue) {
	  if(x-ivalue  0) {
	if(x-nextreset = 0) {
	  x-cycle = x-nextreset;
	  outlet_float(x-x_bar, x-cycle);
	  x-nextreset = -1;
	} else {
	  x-cycle++;
	  if(x-cycle = x-length) x-cycle = 0;
	  outlet_float(x-x_bar, x-cycle);
	}
	  }
	}
	else if(x-ivalue  0) {
	  if(x-value  x-prevalue) {
	if(x-nextreset = 0) {
	  x-cycle = x-nextreset;
	  outlet_float(x-x_bar, x-cycle);
	  x-nextreset = -1;
	} else {
	  x-cycle++;
	  if(x-cycle = x-length) x-cycle = 0;
	  outlet_float(x-x_bar, x-cycle);
	}
	  }
	}
  }
  x-pflag = 1;
  *out++ = x-value + x-cycle;
  // here are the CLOCKS
  // and you can use the EVENS outlet to make SWING happen
  int squs = (int)(x-value * 16);
  int squts = (int)(x-value * 24);
  if(squs != x-semiquavers)
	{
	  int even = squs % 2;
	  int get8ths = squs * 0.5;
	  float eighths = (float)get8ths;
	  if (!even)
	{
	  outlet_float(x-x_8b, eighths);
	  outlet_float(x-x_8a, eighths);
	  outlet_float(x-evens, 0);
	}
	  else
	{
	  outlet_float(x-evens, 1);
	}
	  outlet_float(x-x_16, (t_float)squs);
	}
  if(squts != x-sqtriplets)
	{
	  outlet_float(x-x_24, (float)squts);
	}
  x-semiquavers = squs;
  x-sqtriplets = squts;
  tf.tf_d = dphase;
  x-prevalue = x-value;
} 
tf.tf_i[HIOFFSET] = normhipart;
x-x_phase = tf.tf_d - UNITBIT32;
return (w+5);
}

 void phasorbars_dsp(t_phasorbars *y, t_signal **sp)
{
  y-x_conv = 1./sp[0]-s_sr;
  dsp_add(phasorbars_perform, 4, y, sp[0]-s_vec, sp[1]-s_vec, sp[0]-s_n);
}

void phasorbars_debug(t_phasorbars *y)
{
  post(phase = %f, cycles = %f,y-x_phase,y-cycle);
}

void phasorbars_nextbar(t_phasorbars *y, float f)
{
  y-nextreset = (int)f;
}

void phasorbars_ft1(t_phasorbars *y, float f)
{
float fcycles = 0;
int cycles = 0;
if (f  0) f = 0;
cycles = (int)f;
fcycles = 

[PD-dev] phasorbars_test

2013-05-09 Thread Ed Kelly


 
Ninja Jamm - a revolutionary new musix remix app from Ninja Tune and Seeper, 
for iPhone and iPad
http://www.ninjajamm.com/


Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/ #N canvas 9 83 589 297 10;
#X floatatom 123 234 5 0 0 3 24ths - -;
#X floatatom 84 125 5 0 100 0 - - -;
#X obj 44 223 envrms~;
#X floatatom 44 245 5 0 0 0 - - -;
#X obj 85 27 loadbang;
#X msg 165 67 0;
#X msg 177 35 1.2;
#X msg 206 68 debug 0;
#X msg 220 33 0.1;
#X msg 256 33 -1.2;
#X floatatom 173 233 5 0 0 3 16ths - -;
#X floatatom 219 232 5 0 0 3 odd16th? - -;
#X floatatom 280 232 5 0 0 3 8ths - -;
#X floatatom 334 233 5 0 0 3 8ths - -;
#X floatatom 25 74 5 1 1 0 - - -;
#X obj 25 93 * 0.01;
#X msg 21 43 10;
#X obj 98 154 phasorbars~ 0 1 8;
#X msg 255 107 length 8;
#X floatatom 384 233 5 0 0 3 bar - -;
#X connect 1 0 17 0;
#X connect 2 0 3 0;
#X connect 4 0 16 0;
#X connect 5 0 17 1;
#X connect 6 0 17 1;
#X connect 7 0 17 0;
#X connect 8 0 17 1;
#X connect 9 0 17 1;
#X connect 14 0 15 0;
#X connect 15 0 1 0;
#X connect 16 0 14 0;
#X connect 17 0 2 0;
#X connect 17 1 0 0;
#X connect 17 2 10 0;
#X connect 17 3 11 0;
#X connect 17 4 12 0;
#X connect 17 5 13 0;
#X connect 17 6 19 0;
#X connect 18 0 17 0;
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] Invitation to connect on LinkedIn

2013-04-26 Thread Ed Kelly
LinkedIn




I'd like to add you to my professional network on LinkedIn.

- Ed

Ed Kelly
Associate Tutor at University of Surrey
London, United Kingdom

Confirm that you know Ed Kelly:
https://www.linkedin.com/e/jo22d0-hg026ee6-d/isd/12799470526/v_S58H3z/?hs=falsetok=1Q_rdJ__bAFBI1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/jo22d0-hg026ee6-d/pLQWEj4y5-g51Vl0J6t0CNB/goo/pd-dev%40iem%2Eat/20061/I4238778396_1/?hs=falsetok=0kyCDwpDzAFBI1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] [PD-ot] Xcode and some commands

2013-01-14 Thread Ed Kelly
Hi Alexandros,

Getting autotools and similar *nix packages: A good package manager to make 
these things easier is macports:
http://www.macports.org/


Ed
 
Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
http://sharktracks.co.uk/



- Original Message -
 From: IOhannes m zmoelnig zmoel...@iem.at
 To: pd...@iem.at; pd-dev pd-dev@iem.at
 Cc: 
 Sent: Monday, 14 January 2013, 13:16
 Subject: Re: [PD-ot] Xcode and some commands
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 2013-01-14 12:50, Alexandros Drymonitis wrote:
  Hi all,
 
 hi.
 
 
 this is probably best targetted at pd-dev (pd-list), but anyhow...
 
  I'm trying to install some externals in Pd vanilla. Till now I've
  managed to install the Gem library. But now I'm trying to install
  zexy, but opening Pd with the '-lib zexy' flag from the command
  line is not enough. Trying to follow the installation guidelines of
  the library, I'm facing some problems. Trying to run
  './bootstrap.sh; ./configure; make' I get the following errors: 
  ./bootstrap.sh: line 3: aclocal: command not found checking for
  gcc... no checking for cc... no checking for cl.exe... no 
  configure: error: in 
  `/Applications/Pd-0.44-0.app/Contents/Resources/extra/zexy-2.2.4/src':
 
 
 configure: error: no acceptable C compiler found in $PATH
  See `config.log' for more details -bash: make: command not found
 
  I have Xcode, version 4.5.2 installed in my /Applications directory
  (I've been told in the past I need to have developer tools in order
  to be able to run some commands), but that won't do the job..maybe
  it's quite obvious, but my knowledge on this is extremely limited.
  Any ideas? Obviously I have OS X. My version is 10.8.2, upgraded
  since I have quite an old laptop.
 
 i cannot help you in detail (some other devs might be more osx-savy,
 though), but i will try to give some generic hints.
 
 it seems like your system cannot find a number of needed things, namely
 - - a valid compiler (gcc)
 - - a valid make
 - - working autotools (e.g. aclocal)
 
 at least the former two should be installed when you have XCode
 properly installed. either you missed something when installing (e.g.
 only copied XCode app, but forgot to run the installer), or you have
 to add some paths to your PATH variable.
 try locating the make binary (e.g. `find / -name make`) and add that
 path to your PATH.
 
 autotools used to come with xcode, but it seems that they are not
 shipping it any longer (confirm [1]).
 you might have luck using a package-manager like fink.
 
 fgasdrm
 IOhannes
 
 
 
 [1]
 http://jsdelfino.blogspot.co.at/2012/08/autoconf-and-automake-on-mac-os-x.html
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.12 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAlD0BRMACgkQkX2Xpv6ydvTyHwCgvDNVxboc0fWpO8UfWVCtQMoj
 +pcAoNR8SCx4CEerQL/EAmUKbcyWkAgQ
 =BZPs
 -END PGP SIGNATURE-
 
 ___
 Pd-ot mailing list
 pd...@iem.at
 http://lists.puredata.info/listinfo/pd-ot
 

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] Filter design for iPhone

2012-03-29 Thread Ed Kelly
Hi Peter,

Oh dear! I'm not allowed to release this to anybody!
I did eventually come up with a way to get round this - a new filter external 
that is now part of the app.
If and when I get an iPhone I'll try to recreate the problem with a less 
commercially sensitive patch.
Best,
Ed

 
Gemnotes-0.1alpha: Live music notation for Pure Data
http://sharktracks.co.uk/



 From: Peter Brinkmann peter.brinkm...@googlemail.com
To: Ed Kelly morph_2...@yahoo.co.uk 
Cc: Joe White j...@rjdj.me; PD List pd-l...@iem.at; pddev pd-dev@iem.at 
Sent: Friday, 23 March 2012, 0:04
Subject: Re: [PD-dev] Filter design for iPhone
 
Hi Ed,
The attached files are just the Pd patch and abstractions.  We'll
probably need the entire app to get a sense of what's going wrong
here.
Cheers,
      Peter


On Thu, Mar 22, 2012 at 11:52 AM, Ed Kelly morph_2...@yahoo.co.uk wrote:
 [...]
 I will look at the RJDJ filters mentioned also. I would like not to have to
 worry about filters when programming libpd audio engines.

Absolutely.  If a patch works with Pd Vanilla, then it ought to work
with libpd.  Would you mind filing a bug report at GitHub, ideally
with a minimal example that reproduces the problem?
Thanks,
     Peter
 Sure, although this is ofxPd from Dan Wilcox, so I'm not sure what the 
 difference is between this and the iOS or Android versions.

 Best,
 Ed___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] Filter design for iPhone

2012-03-22 Thread Ed Kelly
 [...]
 I will look at the RJDJ filters mentioned also. I would like not to have to
 worry about filters when programming libpd audio engines.

Absolutely.  If a patch works with Pd Vanilla, then it ought to work
with libpd.  Would you mind filing a bug report at GitHub, ideally
with a minimal example that reproduces the problem?
Thanks,
     Peter 
Sure, although this is ofxPd from Dan Wilcox, so I'm not sure what the 
difference is between this and the iOS or Android versions.

Best,
Ed

filtertest_list.tar.gz
Description: GNU Zip compressed data
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] Filter design for iPhone

2012-03-21 Thread Ed Kelly
mvcf~ - Well, it breaks when the Q is high and freq is moderately high, or at 
high freq and Q, but it seems to be that the higher you get with either 
frequency or Q it has a greater probability of breaking (all  dac~ outputs at 1 
(or possibly 1e+07), no more audio can be played by the patch.
 
What I mean is that with the noise~ object as the input, the filter breaks 
after about 1-3 seconds when Q=0.70-0.8, f=0.7-0.8, and there are variations on 
this depending on the settings. Something is profoundly un-robust about this 
filter, but it's cpu load is very low. I want to have a stable version for not 
much more CPU.

I will look at the RJDJ filters mentioned also. I would like not to have to 
worry about filters when programming libpd audio engines. It would be nice to 
get a really efficient IIR with a musical response that uses low CPU into the 
core - I am not an expert at using poles and zeroes however (but I'm working on 
my higher math often these days, with the Khan academy :) Some of this is 
subjective, perhaps the musical nature of filters, but certain types of 
filter are assumed by many (musicians, DJs etc) in this part of the world to be 
normally available. The 24dB lowpass resonant filter a la Moog is one of them, 
and a fundamental analogue processor as well. I understand the analogue better 
than the discrete, so I'm anxious to know what limit is reached in the 
coefficients of the filter that causes the undefined result (NaN).

But I'll try the other rjlib filters first!
Ed

Gemnotes-0.1alpha: Live music notation for Pure Data
http://sharktracks.co.uk/



 From: Joe White j...@rjdj.me
To: Ed Kelly morph_2...@yahoo.co.uk 
Cc: PD List pd-l...@iem.at; pddev pd-dev@iem.at 
Sent: Tuesday, 20 March 2012, 17:50
Subject: Re: [PD-dev] Filter design for iPhone
 

Hi Ed,

I just tested your filtertest_list patch in RjDj and it worked exactly as 
expected. As Rich suggested maybe you're using an outdated version of libpd?

If Frank's around I'm sure he would know for certain but if I remember rightly 
the [u_lowpass] / [u_beequad] combination is not really designed for 
dynamically changing parameters. Maybe take a look at [e_reslop], [e_lop2] and 
[e_lop4] for some other filter implementations. 

Regarding your second attempt, at what frequency does it 'break' and what's 
your sampling rate?

Cheers,
Joe


On 20 March 2012 05:57, Ed Kelly morph_2...@yahoo.co.uk wrote:

Hi,


I'm trying to design or find a resonant lowpass filter for use with libPd for 
Openframeworks running on an iPhone 4.


1. I've tried the rjlib filter attached (filtertest_list.tar.gz) and it works 
fine in Pd, but instantly breaks when I run it on the iPhone - all other 
playing audio cuts out, and it is impossible to reset. I suspect that the 
buffers fb1 fb2 ff1 ff2 ff3 are hitting NAN values and staying there, but I 
haven't tested this.


2. I've had a go at implementing the filter from 
http://www.musicdsp.org/archive.php?classid=3#25 as a Pd external 
(mvcf~.tar.gz) and it is very efficient CPU-wise. However, higher values of f 
or q cause the internal filter buffers to hit NAN and stay there (tested in Pd 
- I haven't tried this on the iPhone yet).


I would ideally like to find out why the second attempt breaks at high q 
and/or f, as what I want is a 24dB/Octave moog-ish filter. I'm sure those of 
you with higher math skills will intuitively know why, but I'm just learning 
calculus now (my early education was a bit chaotic). I'm also limited by the 
fact that this is for a commercial project (although I'll be happy to share 
the code :) so I can't just take a GPL external and recompiled libpd with it.

 
Ed


Gemnotes-0.1alpha: Live music notation for Pure Data
http://sharktracks.co.uk/
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] Filter design for iPhone

2012-03-20 Thread Ed Kelly
Hi,

I'm trying to design or find a resonant lowpass filter for use with libPd for 
Openframeworks running on an iPhone 4.

1. I've tried the rjlib filter attached (filtertest_list.tar.gz) and it works 
fine in Pd, but instantly breaks when I run it on the iPhone - all other 
playing audio cuts out, and it is impossible to reset. I suspect that the 
buffers fb1 fb2 ff1 ff2 ff3 are hitting NAN values and staying there, but I 
haven't tested this.

2. I've had a go at implementing the filter from 
http://www.musicdsp.org/archive.php?classid=3#25 as a Pd external 
(mvcf~.tar.gz) and it is very efficient CPU-wise. However, higher values of f 
or q cause the internal filter buffers to hit NAN and stay there (tested in Pd 
- I haven't tried this on the iPhone yet).

I would ideally like to find out why the second attempt breaks at high q and/or 
f, as what I want is a 24dB/Octave moog-ish filter. I'm sure those of you with 
higher math skills will intuitively know why, but I'm just learning calculus 
now (my early education was a bit chaotic). I'm also limited by the fact that 
this is for a commercial project (although I'll be happy to share the code :) 
so I can't just take a GPL external and recompiled libpd with it.

 
Ed


Gemnotes-0.1alpha: Live music notation for Pure Data
http://sharktracks.co.uk/

filtertest_list.tar.gz
Description: application/gzip


mvcf~.tar.gz
Description: application/gzip
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] denormals: svf, freeverb (was Re: [PD] bug in freeverb???)

2009-08-20 Thread Ed Kelly
 as stated before in this thread, denormals can slow down
 the computation
 on the fpu. the problem is not as big, when compiling the
 binary to use
 the sse unit, though (btw, this is the default, when
 compiling for x86_64)

Indeed, but externals that run a little slow are better than those that crash 
PD in the middle of a performance! This is why I'm trying to find a way of 
fixing the externals that suffer from this.
moog~ is another!
Meanwhile, I've rolled back to the old svf~ external so that the metastudio 
drumsynths don't crash. I had a very successful gig last night as a result..

Who wrote the old svf~? 

 pd devel_0_39 did also set the DAZ/FTZ flags, which affect
 the denormal
 handling on the sse unit, but that was never merged into
 vanilla pd

I see there's a new pd_devel branch. I should check it out.

Vest,
Ed

 
 hth, tim
 
 -- 
 t...@klingt.org
 http://tim.klingt.org
 
 Only very good and very bad programmers use goto in C
 
 
 -Inline Attachment Follows-
 
 ___
 Pd-dev mailing list
 Pd-dev@iem.at
 http://lists.puredata.info/listinfo/pd-dev
 

Send instant messages to your online friends http://uk.messenger.yahoo.com 


___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] denormals: svf, freeverb (was Re: [PD] bug in freeverb???)

2009-08-15 Thread Ed Kelly
Hi Damon,

I have tried to implement this technique, to fix the svf~ and I am still 
getting denormal errors pegging the CPU. Is there anything I have missed do you 
think? After reading a little bit about unions and uint32_t I think I've used 
them correctly...

If this bug can be zapped for good then I'd like to eliminate denormal errors 
from the svn for good!

Best,
Ed

--- On Fri, 14/8/09, Damon Chaplin da...@karuna.eclipse.co..uk wrote:

 From: Damon Chaplin da...@karuna.eclipse.co.uk
 Subject: Re: [PD-dev] denormals: svf, freeverb (was Re: [PD] bug in 
 freeverb???)
 To: Ed Kelly morph_2...@yahoo.co.uk
 Cc: PD List pd-l...@iem.at, pddev pd-dev@iem.at
 Date: Friday, 14 August, 2009, 1:51 PM
 
 On Fri, 2009-08-14 at 13:06 +0100, Damon Chaplin wrote:
  On Fri, 2009-08-14 at 13:03 +0100, Damon Chaplin
 wrote:
  
     if (u.int_value 
 0x7f80)
        fv = 0.0f;
  
  Oops. That should be:
  
   if (u.int_value  0x7f80 == 0)
       fv = 0.0f;
 
 Or even better:
 
  if ((u.int_value  0x7f80) == 0)
     fv = 0.0f;
 
 Damon
 
 



  

svftest.tgz
Description: GNU Unix tar archive
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] denormals: svf, freeverb (was Re: [PD] bug in freeverb???)

2009-08-15 Thread Ed Kelly
 I wonder if this line, right after
 you check in for denormality, might not be causing
 trouble:
                 //
 very slight waveshape for extra stability
                
 sv-b = sv-b - sv-b * sv-b * sv-b *
 0.001f;
 Since cubing a tiny number and multiplying it by .001 could
 end up creating a denormal, which isn't checked for until
 it's gone through a series of further computations and ends
 up as the new in.

Could be, but I tried applying an the exception handler to sv-b (which has a 
cubed version of itself - 0.001f taken away from it) and still pegged the CPU.

 Also (I don't really know), I thought that denormals were
 caught as a processor exception whenever they occurred, so
 neutralizing them in the code after the fact won't do
 anything to speed up the process, except to prevent a
 cascade of denormals. The thing to do would be to replace
 the exception handler with your own.

It seems from the article you flagged up that the Denormals-Are-Zero (DAZ) mode 
we really need is an SSE instruction. I wonder if you can do this without using 
intrinsics and native Intel code. I think there's some resistance to this since 
the code is meant to be compilable on PPC, i386, i686 and all variants, not 
just P3-and-beyond, and I'm trying to make my work generically compatible with 
all Pd-Extended distributions from 0.39 onwards.

 To avoid serialization and performance issues due to
 denormals and underflow numbers, use the SSE and SSE2
 instructions to set Flush-to-Zero and Denormals-Are-Zero
 modes within the hardware to enable highest performance for
 floating-point applications.

Once again, I personally would like to have this implemented in the PD core, 
since denormals are a real pain in the ass and often cause CPU pegging. This 
limits the real-time uses of PD, since there are some performance patches that 
are realizable but ultimately un-performable. As such I'm surprised it doesn't 
class as a bug, but I guess this is up to the extern writer.
I notice a post on the pd-dev list - 
denormal bashing for feedback filters - ID: 1145279
cpole~ and rpole~ filters are not denormal save(sic) yet

How did zmoelnig fix this I wonder?

Ed

The article again for anyone reading this in the middle of the thread:
http://software.intel.com/en-us/articles/x87-and-sse-floating-point-assists-in-ia-32-flush-to-zero-ftz-and-denormals-are-zero-daz/


  


___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] denormals: svf, freeverb (was Re: [PD] bug in freeverb???)

2009-08-14 Thread Ed Kelly
We have to sort this out!

The denormals bug in freeverb~ _seems_ to have been fixed by following Julius' 
advice. I made a makefile with

-fno-trapping-math

as a flag and so far so good. I haven't had a problem with the freeverb~ object 
pegging the CPU. May I advise that this is implemented in PD-extended, since it 
causes my patch to NOT WORK AT GIGS! I simply cannot take any more 
embarrassment. I want to play live, otherwise there's simply no point doing 
anything!

The second one I have discovered is in bsaylor/svf~ and there's no makefile for 
this in the subversion repository. I notice in the source code there is a 
FLUSH_TO_ZERO definition. Interestingly, when I try to compile this external 
using a bog-standard makefile on Ubuntu 8.10, it causes an error:

cc1: warnings being treated as errors
svf~.c: In function ‘run_svf’:
svf~.c:59: error: dereferencing type-punned pointer will break strict-aliasing 
rules
svf~.c:60: error: dereferencing type-punned pointer will break strict-aliasing 
rules

Now, I'm trying to unpick the statement:
#define FLUSH_TO_ZERO(fv) (((*(unsigned int*)(fv))0x7f80)==0)?0.0f:(fv)

which is being called on lines 59 and 60 of bsaylor/svf~.c, causing the 
compiler to choke, and (perhaps) causing my drumsynths to break!

And by the way, where is the source code for the _other_ svf~ external?

Ed

--- On Wed, 1/7/09, Julius Smith j...@ccrma.stanford.edu wrote:

 From: Julius Smith j...@ccrma.stanford.edu
 Subject: Re: [PD] bug in freeverb???
 To: Matt Barber brbrof...@gmail.com
 Cc: pd-l...@iem.at
 Date: Wednesday, 1 July, 2009, 8:22 PM
 Hmmm, this sounds like underflow
 traps (denormals).  You should 
 also be able to add a small constant to the input signal.
 
 I notice gcc has the option
 
 -fno-trapping-math
 
 which may make the problem disappear if my theory is
 correct.  (I 
 hope the FPU simply sets underflows quietly to zero when no
 trap can 
 be generated.)
 There is also
 
 -ffast-math
 
 which is more aggressive.
 
 - jos
 
 At 11:30 AM 7/1/2009, Matt Barber wrote:
 We have also had this problem, and have found that
 normally one can
 avoid it by salting the [freeverb~] object with a
 minuscule amount of
 noise at all times.
 
 Matt
 
 
 
   Message: 5
   Date: Wed, 1 Jul 2009 09:57:43 -0700 (PDT)
   From: Andres Ferrari an...@yahoo.com
   Subject: [PD] bug in freeverb???
   To: pd-l...@iem.at
   Message-ID: 166347.29167...@web111408.mail.gq1.yahoo.com
   Content-Type: text/plain; charset=iso-8859-1
  
  
   when is connected into freeverb any signal
 multiplied by zero
   the CPU usage begin to up and up to the limit,
 and if the patch 
  is heavy by far exceeds the 100%sound and
 everything becomes a mess.
  
   This happens to me only in leopard.
  
   In osx 10.4 (ppc) and windows I've never had that
 problem.
   Andr?s Ferrari G.
  
   http://www.myspace.com/anfex
  
 
 ___
 pd-l...@iem.at
 mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 
 
 Julius O. Smith III j...@ccrma.stanford.edu
 Prof. of Music and Assoc. Prof. (by courtesy) of Electrical
 Engineering
 CCRMA, Stanford University
 http://ccrma.stanford.edu/~jos/  
 
 
 ___
 pd-l...@iem.at
 mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

Send instant messages to your online friends http://uk.messenger.yahoo.com 


___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] bug???!?!?

2009-08-08 Thread Ed Kelly
Hi there,

I've encountered this before, but now it has sabotaged one thing I wanted to 
play at pdcon, I want to work out why it happens.

Enclosed is a folder containing two versions of my clinoker~ drum synth. On one 
of them, the filter for the noise generator does not work, and on the other it 
does. The only difference between them is an [envrms~] measuring object on the 
frequency signal to the filter - but it's not even in the chain of signals that 
affects anything.

Have a look. Ideas please? 
Ed


  

bugs.tgz
Description: GNU Unix tar archive
___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] [PD] VASP troubles on extended 0.40.3 - and on 0.41-RC1

2009-05-19 Thread Ed Kelly

OK.
I tried it before with vanilla, but I was using the same pd/extra directory as 
pd-extended. Now I have isolated the problem by compiling pd-vanilla in a 
separate folder, and I've found that there is some clash between Gem and vasp. 
When I remove the Gem (version 0.90, compiled Oct 8 2008 by iohannes) vasp 
works fine. 

No warnings in the Pd window with extended, but in the vanilla Pd with the same 
externals I get this:

libdir loader $Revision: 1.8 $
compiled on May 13 2009 at 12:54:42 
compiled against Pd version 0.41.4.extended-rc1
warning: old method 'draw' for class 'primTri' renamed 'draw_aliased'
warning: old method 'width' for class 'polygon' renamed 'width_aliased'
warning: old method 'draw' for class 'polygon' renamed 'draw_aliased'
warning: old method 'draw' for class 'curve3d' renamed 'draw_aliased'
warning: old method 'width' for class 'curve' renamed 'width_aliased'
warning: old method 'draw' for class 'curve' renamed 'draw_aliased'
warning: old method 'open' for class 'pix_movieNEW' renamed 'open_aliased'
warning: old method 'img_num' for class 'pix_movieNEW' renamed 'img_num_aliased'
warning: old method 'auto' for class 'pix_movieNEW' renamed 'auto_aliased'
warning: class 'pix_film' overwritten\; old one renamed 'pix_film_aliased'
warning: class 'pix_filmQT' overwritten\; old one renamed 'pix_filmQT_aliased'
warning: class 'change' overwritten\; old one renamed 'change_aliased'
warning: class 'abs~' overwritten\; old one renamed 'abs~_aliased'
GEM: Graphics Environment for Multimedia
GEM: ver: 0.90
GEM: compiled: Oct  8 2008
GEM: maintained by IOhannes m zmoelnig
GEM: Authors :  Mark Danks (original version on irix/windows)
GEM:Chris Clepper (macOS-X)
GEM:Daniel Heckenberg (windows)
GEM:James Tittle (macOS-X)
GEM:IOhannes m zmoelnig (linux/windows)
libdir_loader: added 'cyclone' to the global objectclass path
warning: class 'wrap' overwritten\; old one renamed 'wrap_aliased'
warning: class 'abs~' overwritten\; old one renamed 'abs~_aliased'

...some clues maybe?
Ed



--- On Tue, 19/5/09, Thomas Grill g...@g.org wrote:

 From: Thomas Grill g...@g.org
 Subject: Re: [PD-dev] [PD] VASP troubles on extended 0.40.3 - and on 0.41-RC1
 To: Ed Kelly morph_2...@yahoo.co.uk
 Cc: pddev pd-dev@iem.at
 Date: Tuesday, 19 May, 2009, 8:13 PM
 Hi Ed,
 could you also try with vanilla pd?
 I can't reproduce the problem.
 gr~~~
 
 Am 14.05.2009 um 22:37 schrieb Ed Kelly:
 
  
  Apologies for posting on the main list first - my
 mistake!
  
  Vasp always crashes PD for me. It happens with any
 vasp object (inc. all help files) on pd-extended-0.40.3 and
 pd-extended 0.41.RC1. The terminal window shows
  watchdog: signaling pd...
  watchdog: signaling pd... etc
  after a signal 6 message.
  
  but before that the text below appears in the terminal
 inside which PD is running.
  
  I've tried pd-extended-0.40.3 and the new RC1 of
 pd-extended-0.41.1, and re-compiled vasp several times. The
 bug persists whether jack is running or not, and whether rt
 mode is on or off.
  
  Some process is aborting inside vasp every time.
 Here's the detail.
  Best wishes,
  Ed
  Intel dual core, 2Gb, Ubuntu Intrepid.
  
  tk scaling is 1.44534291704
  *** glibc detected *** /usr/bin/pd: free():
 invalid
  pointer: 0x09edaf14 ***
  === Backtrace: =
  /lib/tls/i686/cmov/libc.so.6[0xb7e45454]
 
 /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7e474b6]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_root_multidlEPv+0x32)[0xb600b764]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN11flext_multi8AtomList4FreeEv+0x25)[0xb600b995]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN11flext_multi8AtomListD0Ev+0x29)[0xb600ba29]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN9vasp_base9ToOutVaspEiR4Vasp+0x69)[0xb5fe0043]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN7vasp_tx6m_bangEv+0x61)[0xb5fe00dd]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN7vasp_op8m_dobangEv+0x5f)[0xb5fdffbf]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN7vasp_op6m_vaspEiPK5_atom+0x28)[0xb5fdf8d8]
  /usr/lib/pd/extra/vasp.pd_linux[0xb5fe12b8]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi10TryMethTagEPNS_4ItemEPK7_symboliPK5_atom+0x1cd)[0xb60127c7]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi8FindMethEiPK7_symboliPK5_atom+0x6b)[0xb6012971]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi15CbMethodHandlerEiPK7_symboliPK5_atom+0x43)[0xb6012a9d]
 
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi11cb_anythingEP9flext_hdrPK7_symboliP5_atom+0x43)[0xb60130b5]
  /usr/bin/pd(pd_typedmess+0x26b)[0x80afb2b]
  === Memory map: 
  08048000-08128000 r-xp  08:15 889688
     /usr/bin/pd
  08128000-08129000 r--p 000df000 08:15 889688
     /usr/bin/pd
  08129000-0812a000 rw-p 000e 08:15 889688
     /usr/bin/pd
  0812a000-0853b000 rw-p 0812a000 00:00 0
  09de2000-09edc000 rw-p 09de2000 00:00 0
      [heap]
  b3e4-b3e97000 rw-p b3e4 00:00 0
  b3e97000-b3fff000 r-xp  08:15 887130

Re: [PD-dev] [PD] VASP troubles on extended 0.40.3 - and on 0.41-RC1

2009-05-14 Thread Ed Kelly

Apologies for posting on the main list first - my mistake!

Vasp always crashes PD for me. It happens with any vasp object (inc. all help 
files) on pd-extended-0.40.3 and pd-extended 0.41.RC1. The terminal window 
shows 
watchdog: signaling pd...
watchdog: signaling pd... etc
after a signal 6 message.

but before that the text below appears in the terminal inside which PD is 
running.

I've tried pd-extended-0.40.3 and the new RC1 of pd-extended-0.41.1, and 
re-compiled vasp several times. The bug persists whether jack is running or 
not, and whether rt mode is on or off.

Some process is aborting inside vasp every time. Here's the detail.
Best wishes,
Ed
Intel dual core, 2Gb, Ubuntu Intrepid.

 tk scaling is 1.44534291704
 *** glibc detected *** /usr/bin/pd: free(): invalid
 pointer: 0x09edaf14 ***
 === Backtrace: =
 /lib/tls/i686/cmov/libc.so.6[0xb7e45454]
 /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7e474b6]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_root_multidlEPv+0x32)[0xb600b764]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN11flext_multi8AtomList4FreeEv+0x25)[0xb600b995]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN11flext_multi8AtomListD0Ev+0x29)[0xb600ba29]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN9vasp_base9ToOutVaspEiR4Vasp+0x69)[0xb5fe0043]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN7vasp_tx6m_bangEv+0x61)[0xb5fe00dd]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN7vasp_op8m_dobangEv+0x5f)[0xb5fdffbf]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN7vasp_op6m_vaspEiPK5_atom+0x28)[0xb5fdf8d8]
 /usr/lib/pd/extra/vasp.pd_linux[0xb5fe12b8]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi10TryMethTagEPNS_4ItemEPK7_symboliPK5_atom+0x1cd)[0xb60127c7]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi8FindMethEiPK7_symboliPK5_atom+0x6b)[0xb6012971]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi15CbMethodHandlerEiPK7_symboliPK5_atom+0x43)[0xb6012a9d]
 /usr/lib/pd/extra/vasp.pd_linux(_ZN16flext_base_multi11cb_anythingEP9flext_hdrPK7_symboliP5_atom+0x43)[0xb60130b5]
 /usr/bin/pd(pd_typedmess+0x26b)[0x80afb2b]
 === Memory map: 
 08048000-08128000 r-xp  08:15 889688 
    /usr/bin/pd
 08128000-08129000 r--p 000df000 08:15 889688 
    /usr/bin/pd
 08129000-0812a000 rw-p 000e 08:15 889688 
    /usr/bin/pd
 0812a000-0853b000 rw-p 0812a000 00:00 0 
 09de2000-09edc000 rw-p 09de2000 00:00 0     
     [heap]
 b3e4-b3e97000 rw-p b3e4 00:00 0 
 b3e97000-b3fff000 r-xp  08:15 887130 
    /usr/lib/libsamplerate.so.0.1.3
 b3fff000-b400 r--p 00167000 08:15 887130 
    /usr/lib/libsamplerate.so.0.1.3
 b400-b4001000 rw-p 00168000 08:15 887130 
    /usr/lib/libsamplerate.so.0.1.3
 b4001000-b40dd000 r-xp  08:15 887952 
    /usr/lib/libfftw3f.so.3.1.2
 b40dd000-b40e3000 r--p 000dc000 08:15 887952 
    /usr/lib/libfftw3f.so.3.1.2
 b40e3000-b40e4000 rw-p 000e2000 08:15 887952 
    /usr/lib/libfftw3f.so.3.1.2
 b40e4000-b40f r-xp  08:15 889570 
    /usr/lib/libaubio.so.2.1.1
 b40f-b40f1000 rw-p b000 08:15 889570 
    /usr/lib/libaubio.so.2.1.1
 b410f000-b415f000 r-xp  08:15 887999 
    /usr/lib/libImlib2.so.1.4.0
 b415f000-b416 r--p 0004f000 08:15 887999 
    /usr/lib/libImlib2.so.1.4.0
 b416-b4161000 rw-p 0005 08:15 887999 
    /usr/lib/libImlib2.so.1.4.0
 b4161000-b4175000 rw-p b4161000 00:00 0 
 b4175000-b41b7000 r-xp  08:15 886902 
    /usr/lib/libmp3lame.so.0.0.0
 b41b7000-b41b9000 rw-p 00042000 08:15 886902 
    /usr/lib/libmp3lame.so.0.0.0
 b41b9000-b41ea000 rw-p b41b9000 00:00 0 
 b41ea000-b41f5000 r-xp  08:15 887233 
    /usr/lib/libvorbisenc.so.2.0.3
 b41f5000-b41f6000 r--p a000 08:15 887233 
    /usr/lib/libvorbisenc.so.2.0.3
 b41f6000-b42e4000 rw-p b000 08:15 887233 
    /usr/lib/libvorbisenc.so.2.0.3
 b42e4000-b42ff000 r-xp  08:15 887231 
    /usr/lib/libvorbis.so.0.4.0
 b42ff000-b430 r--p 0001a000 08:15 887231 
    /usr/lib/libvorbis.so.0.4.0
 b430-b430e000 rw-p 0001b000 08:15 887231 
    /usr/lib/libvorbis.so.0.4.0
 b430e000-b4357000 r-xp  08:15 887199 
    /usr/lib/libtheora.so.0.3.3
 b4357000-b4359000 rw-p 00049000 08:15 887199 
    /usr/lib/libtheora.so.0.3.3
 b4359000-b43c4000 r-xp  08:15 1076527   
 /usr/lib/pd/extra/pidip.pd_linux
 b43c4000-b43c5000 r--p 0006a000 08:15 1076527   
 /usr/lib/pd/extra/pidip.pd_linux
 b43c5000-b43c7000 rw-p 0006b000 08:15 1076527   
 /usr/lib/pd/extra/pidip.pd_linux
 b43c7000-b43cc000 rw-p b43c7000 00:00 0 
 b43cc000-b43cd000 ---p b43cc000 00:00 0 
 b43cd000-b4bcd000 rwxp b43cd000 00:00 0 
 b4bcd000-b4da r-xp  08:15 886766 
    /usr/lib/libgsl.so.0.12.0
 b4da-b4da9000 rw-p 001d3000 08:15 886766 
    /usr/lib/libgsl.so.0.12.0
 b4da9000-b4de r-xp  08:15 886768 
    /usr/lib/libgslcblas.so.0.0.0
 b4de-b4de2000 rw-p 00036000 08:15 886768 
    /usr/lib/libgslcblas.so.0.0.0
 b4deb000-b4dee000 r-xp  08:15 1076558   
 /usr/lib/pd/extra/aubio.pd_linux
 b4dee000-b4def000 rw-p 2000 08:15 1076558   
 

[PD-dev] SVN access

2009-05-05 Thread Ed Kelly

Hi chaps,

I've some new externals on the boil. Could I have write access to the SVN 
repository? That'd be awesome!

Best,
Ed Kelly



  

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] poly library

2008-12-21 Thread Ed Kelly
  Yep, that's true, but OTOH a wrapper is just a Pd
 patch, which is  
  much easier
  to change than a dynamic patching construct. That has
 to be taken into
  account when it comes to longer-term maintainability.
 Generally  
  less dynamic
  patching is better.

Well...if objects to be used within a dynamic patching system conform to some 
kind of standard, then dynamic patching is a good thing. I'm using it a bit in 
the forthcoming release of metastudio.

It's really time-consuming and cumbersome to create large polyphonic structures 
in PD. So I'm making a client in which my machines can be dynamically created 
as patches. Can anyone explain to me why the dynamic patching aspect of PD is 
not documented? Some have suggested that it might change at some point in the 
future. I can't see how basic 
[obj $1 $2 myvoice $3 $4...$n-1(
syntax could change without a radical change to the structure of PD. Can anyone 
enlighten me?

Happy Xmas,
ED

Lone Shark: Synchromatic: Out December 1st 2008
http://www.pyramidtransmissions.com/store
Also available through the iTunes store


  

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] autobuild mysteries

2007-10-07 Thread Ed Kelly
Haha! 

I finally worked out how to delete that pesky v3 directory. Well, as much as it 
can be deleted with CVS (so it's still there, but nobody can get it right?)

good riddance!

from within maskxor on my local (sync-ed) repository
cvs -d:ext:[EMAIL PROTECTED]:/cvsroot/pure-data rm -R v3
cvs commit
Q-wq in VI

I hope subversion is more user friendly, but I guess it's just slightly 
different!
Best,
Ed

Hans-Christoph Steiner [EMAIL PROTECTED] wrote: 

Yeah, you can''t officially delete directories in CVS.  But -P prunes empty 
directories after checkout, so the effect is the same.


.hc

On Oct 4, 2007, at 12:45 PM, Thomas O Fredericks wrote:

Oh, I just did a 
cvs up -Pd 
and they dissapeared. Never mind :)

Tom

On 10/4/07, Thomas O Fredericks  [EMAIL PROTECTED] wrote:I did an initial 
commit of externals/tof/getdollarzero, externals/tof/folderpanel and 
externals/tof/destroysend but I decided to change my dir layout to work better 
with pd-extended's build system. 

How can I delete those three directories (I already delete their contents with 
the commands noted at the start of the thread). 

Tom

On 9/30/07, IOhannes m zmoelnig  [EMAIL PROTECTED] wrote: Hans-Christoph 
Steiner wrote:

 If you want them wiped from the repository, yes.  But 'cvs rm' keeps
 old revisions in the repository..

if you want directories to be deleted in _any_ way, yes. 
cvs rm will only work on ordinary files.

cvs has no notion of the revision of a directory.
the best thing you can do is to delete all files within a directory.

if v3 has only been committed accidentally and is actually ed's 
private data, then why not delete the directory?


fmgasdr.
IOhannes

___
PD-dev mailing list
 PD-dev@iem.at 
http://lists.puredata.info/listinfo/pd-dev


 


___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev
 

 





As we enjoy great advantages from inventions of others, we should be glad of an 
opportunity to serve others by any invention of ours; and this we should do 
freely and generously. - Benjamin Franklin

 

___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev



Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] autobuild mysteries

2007-09-28 Thread Ed Kelly
OK, so I thought I understood cvs, but what as I thinking?

again, the v3directory shows up on the autobuild, but I'm sure I deleted that 
this week. Am I missing something? I sync-ed my (local) externals repository 
with the cvs on sourceforge, and then from there I deleted all the files in 
maskxor/v3, removed v3 and deleted erroneous files in cvs repos, then 
committed those changes. Yet still the autobuild chews on my old underwear.

?
Ek


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] cvs cleaned up repository

2007-09-24 Thread Ed Kelly
Hi there,

I finally got to grips with CVS and sorted out the errors I made last week in 
uploading messiness to the repository. Should all work now (well, my bit anyway 
:D )

Best,
Ed


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] error handlers

2007-09-21 Thread Ed Kelly
Hi list,

I've just been looking through source code from cvs, picking at random, and 
looking for an example of the
void error (char *fmt, ...) from the externals howto.

I can't find one anywhere!

Am I stating the obvious here? It's just that this means that PD patches made 
using anything other than internals are almost impossible to debug if they're 
extremely complex like mine is: there simply isn't a way of finding out where 
the errors are occurring.

I think, IOhannes, if you could explain to me precisely how to use this 
function, I would be willing to (slowly) go through and make some changes. This 
is a massive hole in PD! 

Could PD or desiredata have a step-trace function, like MAX?

Ouch!
Ed


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] error in maskxor in CVS

2007-09-20 Thread Ed Kelly
Hey Tim,

Sorry, that's my fault. I was a klutz, and uploaded from a messy directory. Can 
anyone tell me how to get rid of stuff from the repository? I only uploaded 
before, and it seems that until now I have not made this silly mistake (but I 
did commit some bad code a week ago ;-(   )

These things happen. Until I sort it out you can just delete everything except 
the files maskxor.c, maskxor.pd_linux, help-maskxor.pd and makefile from the 
maskxor directory (including that stupid v3 directory) and the compilation will 
work.

Best,
Ed

Tim Boykett [EMAIL PROTECTED] wrote: 
Hi,

compiling pd-extended from CVS, I found a small and new error.

in the directory externals/ekext/maskxor there is a subdirectory v3.
This contains a pd_linux file that has a name clash. This directory
was created 49 hours ago, so I presume it is an archive version of
the correct and updated maskxor and should be deleted. Once deleted,
make works. I hope someone can fix this in CVS.

Cheers,

tim

___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev



Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] copybytes - partial array?

2007-09-17 Thread Ed Kelly
Ah well, that's what I've done.

Cheers,
Ed

Charles Henry [EMAIL PROTECTED] wrote: It will not work.  Here is our 
function prototype:
EXTERN void *copybytes(void *src, size_t nbytes);

The thing to see here, is that it doesn't actually copy the data to a
location you specify.  It creates a copy of the data, somewhere in
memory, and returns a pointer to the location.  If you want to have a
continuous array of numbers, you'd have to copy them one at a time
from one array to the other anyhow.

I suggest to just use getbytes() and for loops to do the assignment.

Chuck


On 9/16/07, Ed Kelly  wrote:
 Hi again to all devs,

 Is there any way to use copybytes to take a chunk out of an array? Say, to
 copy elements 0-10 of an array into another buffer, then concatenate
 elements 20-30 onto the end of it?

 B3st
 Ed++


 Lone Shark Aviation out now on
 http://www.pyramidtransmissions.com
 http://www.myspace.com/sharktracks

  
  Yahoo! Answers - Get better answers from someone who knows. Try it now.
 ___
 PD-dev mailing list
 PD-dev@iem.at
 http://lists.puredata.info/listinfo/pd-dev





Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
Try Yahoo! Mail now with Unlimited Storage and see the difference.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] I am really confused by this C problem - help?

2007-09-16 Thread Ed Kelly
Hi there,

I just don't get this one. I have an object (maskxor) with a [mode $1 ( method. 
I've attached an extra outlet to this object so I can see what its value is, 
and I have a post(mode = %d, x-mode); to display it in the PD window. The 
type of x-mode is t_float. Right, so when I change the mode from 0 to 1, I 
should see 1 on the mode outlet and mode = 1 in the PD window, right? wrong. 
I get -1.463894 or something like that on the mode outlet, and -219478567583 or 
something in the PD window. Can someone pleease tell me what is going on?

Patch code and pd_linux object enclosed.
Best,
Ed


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.

maskxor.tar.gz
Description: 327675219-maskxor.tar.gz
___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] small changes to ekext

2007-09-14 Thread Ed Kelly
just a new method for cup, cupd and list_sum are new but trivial!
Ed


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] and

2007-09-14 Thread Ed Kelly
oh, and a bugfix for peakit~ - if anyone has ever used it! (I haven't)


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] Trouble with memory+pointers

2007-06-25 Thread Ed Kelly
Hi devs,

I'm trying to rewrite some of my externals to be a bit more effe\icient, clear 
up after themselves and generally work more smoothly. I started with maskxor, 
because I really need this to work for the ICMC, and it's not working properly 
in certain situations.

So I borrowed some code from zexy/src/drip.c and rewrote it. It compiled OK, 
but crashes PD. Can anyone tell me what is wrong with my code, and how to fix 
it?

Best,
Ed


Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.

maskxor.tgz
Description: 2539302602-maskxor.tgz
___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] Trouble with memory+pointers

2007-06-25 Thread Ed Kelly
So... if I initialize the pointers the first time they are used, maybe that 
will help. It makes sense that the _new routine would be causing the problem, 
since it crashes when I load the object (PD disappears...)
I'll try it!

Ta,
Ed

Martin Peach [EMAIL PROTECTED] wrote: Ed Kelly wrote:
 Hi devs,

 I'm trying to rewrite some of my externals to be a bit more 
 effe\icient, clear up after themselves and generally work more 
 smoothly. I started with maskxor, because I really need this to work 
 for the ICMC, and it's not working properly in certain situations.

 So I borrowed some code from zexy/src/drip.c and rewrote it. It 
 compiled OK, but crashes PD. Can anyone tell me what is wrong with my 
 code, and how to fix it?

I guess because you don't initialize the pointers the first time. Your 
maskxor_new has:
 
  SETFLOAT(x-masking.maskr[0], 0);
  SETFLOAT(x-masking.maskl[0], 0);
  SETFLOAT(x-masking.maskxor[0], 0);
...but x-masking.maskr etc. don't yet point to anything, they were 
declared as:
t_atom *maskxor, *maskl, *maskr;
...but not given any value. If it doesn't crash right there it will do 
so when you try to free the pointers:
  if (x-masking.maskl) {
freebytes(x-masking.maskl, x-lengthl * sizeof(t_atom));
x-masking.maskl = 0;
x-lengthl = 0;
  }
Martin

 Best,
 Ed


 Lone Shark Aviation out now on http://www.pyramidtransmissions.com
 http://www.myspace.com/sharktracks

 
 Yahoo! Answers - Get better answers from someone who knows. Try it now 
 . 

 

 ___
 PD-dev mailing list
 PD-dev@iem.at
 http://lists.puredata.info/listinfo/pd-dev
   




Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] Trouble with memory+pointers

2007-06-25 Thread Ed Kelly
Splendid! It doesn't crash any more. It doesn't work either, but at least I'm 
in more familiar debugging territory! Thanks.

I used a x-firstl, x-firstr and x-firstx variables that were tested and set, 
so that the first time each list is initialized, the first thing that happens 
is e.g.
x-masking.maskl = getbytes(n * sizeof(t_atom));
 and then the freebytes is used the second, third, fourth etc times.

Cheers,
Ed

Martin Peach [EMAIL PROTECTED] wrote: Ed Kelly wrote:
 Hi devs,

 I'm trying to rewrite some of my externals to be a bit more 
 effe\icient, clear up after themselves and generally work more 
 smoothly. I started with maskxor, because I really need this to work 
 for the ICMC, and it's not working properly in certain situations.

 So I borrowed some code from zexy/src/drip.c and rewrote it. It 
 compiled OK, but crashes PD. Can anyone tell me what is wrong with my 
 code, and how to fix it?

I guess because you don't initialize the pointers the first time. Your 
maskxor_new has:
 
  SETFLOAT(x-masking.maskr[0], 0);
  SETFLOAT(x-masking.maskl[0], 0);
  SETFLOAT(x-masking.maskxor[0], 0);
...but x-masking.maskr etc. don't yet point to anything, they were 
declared as:
t_atom *maskxor, *maskl, *maskr;
...but not given any value. If it doesn't crash right there it will do 
so when you try to free the pointers:
  if (x-masking.maskl) {
freebytes(x-masking.maskl, x-lengthl * sizeof(t_atom));
x-masking.maskl = 0;
x-lengthl = 0;
  }
Martin

 Best,
 Ed


 Lone Shark Aviation out now on http://www.pyramidtransmissions.com
 http://www.myspace.com/sharktracks

 
 Yahoo! Answers - Get better answers from someone who knows. Try it now 
 . 

 

 ___
 PD-dev mailing list
 PD-dev@iem.at
 http://lists.puredata.info/listinfo/pd-dev
   




Lone Shark Aviation out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks
   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.___
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev