Re: [PD] how can I clear [vd~]

2011-02-06 Thread Jonathan Wilkes
[delread~ patch_review_buffer ???]
|
|   [crickets~]
|   |
[!=~]
|
|  [applause~]
|  |
[*~]
| \
|   \
[dac~]

--- On Wed, 2/2/11, Mathieu Bouchard ma...@artengine.ca wrote:

 From: Mathieu Bouchard ma...@artengine.ca
 Subject: Re: [PD] how can I clear [vd~]
 To: Jonathan Wilkes jancs...@yahoo.com
 Cc: Ingo Scherzinger i...@miamiwave.com, pd-list@iem.at
 Date: Wednesday, February 2, 2011, 11:48 PM
 On Tue, 1 Feb 2011, Jonathan Wilkes
 wrote:
 
  Did you add your patch to the tracker?
 
 No, but now I did :
 http://sourceforge.net/tracker/?func=detailaid=3170987group_id=55736atid=478072
 
 
 ___
 | Mathieu Bouchard  tél: +1.514.383.3801 
 Villeray, Montréal, QC
 


  

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


Re: [PD] how can I clear [vd~]

2011-02-02 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Jonathan Wilkes wrote:


Did you add your patch to the tracker?


No, but now I did :
http://sourceforge.net/tracker/?func=detailaid=3170987group_id=55736atid=478072

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2011-02-01 03:33, Mathieu Bouchard wrote:
 [delwrite~] doesn't seem to have a clear feature. This could be added
 with a little bit of C code, but otherwise, there is a workaround : you
 temporarily set all of your read-heads to a blank portion of the buffer
 instead of where they're supposed to be. Yes it's ugly, and no, it

alternatively you can also multiply the output of [vd~]/[delread~] by 0.

mfga
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1Hxd0ACgkQkX2Xpv6ydvSSxQCgx5yady3Yl2h7aolJYzJqFfZ+
UTMAn0BWQCRRM1lDsV1OmuLfv6utOl/X
=rkz0
-END PGP SIGNATURE-



smime.p7s
Description: S/MIME Cryptographic Signature
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Peter Plessas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I was always looking for a clear feature in delay lines. One way to do
it is to use tables instead of delwrite~, and send them a clear message
; const 0. Kinda workaround though.
P
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1HzqAACgkQrE8mG1pMpRrRIQCfZFKns0rmEz8afkYjpaFcKV9g
TNYAnjNT91RRQuqGPbygPT5LREKgpnWe
=/CrY
-END PGP SIGNATURE-

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


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Peter Plessas wrote:


I was always looking for a clear feature in delay lines. One way to do
it is to use tables instead of delwrite~, and send them a clear message
; const 0. Kinda workaround though.


Did you see my email that contains the code to modify [delwrite~] to add a 
'clear' method ?


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Peter Plessas
* Mathieu Bouchard ma...@artengine.ca [2011-02-01 15:26]:
 On Tue, 1 Feb 2011, Peter Plessas wrote:
 
 I was always looking for a clear feature in delay lines. One way to do
 it is to use tables instead of delwrite~, and send them a clear message
 ; const 0. Kinda workaround though.
 
 Did you see my email that contains the code to modify [delwrite~] to add a 
 'clear' method ?
Yes! I think usually Miller now would check it and see if it can be included in 
pd, no?

best, P.

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


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Peter Plessas wrote:

* Mathieu Bouchard ma...@artengine.ca [2011-02-01 15:26]:

Did you see my email that contains the code to modify [delwrite~] to add a
'clear' method ?

Yes! I think usually Miller now would check it and see if it can be included in 
pd, no?


Either that, or ignore it, or assert that it's not useful because annoying 
workarounds are good enough for him (and therefore, good enough for 
everybody). It depends.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Ingo Scherzinger
I actually went the easy way and doubled the [delwrite~]. After adding the
delay time to the [switch~] off message it worked just fine.

This is because I have delay times of 20 - 50 ms for doubling notes. Since
note events are not happening any faster then that it is working.
Indeed, using higher delay times would still result in clicks. So Mathieu's
fix for [delwrite~] is the only real solution for this. I'm going to check
it out when I get some spare time.

I hope this fix will be added to pd vanilla's / pd-extended's releases!!!

Thanks for spending the time, Mathieu!

Ingo

 -Ursprüngliche Nachricht-
 Von: Mathieu Bouchard [mailto:ma...@artengine.ca]
 Gesendet: Dienstag, 1. Februar 2011 04:07
 An: Ingo Scherzinger
 Cc: pd-list@iem.at
 Betreff: Re: AW: [PD] how can I clear [vd~]
 
 On Tue, 1 Feb 2011, Ingo Scherzinger wrote:
 
  Yes, you are right, Mathieu!
  It's the [delwrite~]! I am already toggling between two [vd~] objects. I
  guess if I'd add a second [delwrite~] to keep the other one cleard
 with no
  signal being fed into it while the other one is active it would work.
  Thank you for the idea!
 
 Well, if you switch off and on and off and on real quick, then your
 double-delwrite~ trick doesn't work anymore. I suppose that it would be
 better to actually add the clear method :
 
 Index: d_delay.c
 ===
 --- d_delay.c (révision 14844)
 +++ d_delay.c (copie de travail)
 @@ -5,6 +5,7 @@
   /*  send~, delread~, throw~, catch~ */
 
   #include m_pd.h
 +#include string.h
   extern int ugen_getsortno(void);
 
   #define DEFDELVS 64 /* LATER get this from canvas at DSP
 time */
 @@ -129,6 +130,11 @@
   (x-x_cspace.c_n + XTRASAMPS) * sizeof(t_sample));
   }
 
 +static void sigdelwrite_clear(t_sigdelwrite *x) {
 +int n = XTRASAMPS + x-x_cspace.c_n;
 +memset(x-x_cspace.c_vec, 0, n * sizeof(t_sample));
 +}
 +
   static void sigdelwrite_setup(void)
   {
   sigdelwrite_class = class_new(gensym(delwrite~),
 @@ -137,6 +143,8 @@
   CLASS_MAINSIGNALIN(sigdelwrite_class, t_sigdelwrite, x_f);
   class_addmethod(sigdelwrite_class, (t_method)sigdelwrite_dsp,
   gensym(dsp), 0);
 +class_addmethod(sigdelwrite_class, (t_method)sigdelwrite_clear,
 +gensym(clear), 0);
   }
 
   /* - delread~ -
 */
 
   ___
 | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC


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


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Jonathan Wilkes


--- On Tue, 2/1/11, Mathieu Bouchard ma...@artengine.ca wrote:

 From: Mathieu Bouchard ma...@artengine.ca
 Subject: Re: [PD] how can I clear [vd~]
 To: Ingo Scherzinger i...@miamiwave.com
 Cc: pd-list@iem.at
 Date: Tuesday, February 1, 2011, 3:33 AM
 On Tue, 1 Feb 2011, Ingo Scherzinger
 wrote:
 
  Is it possible to clear the content of [vd~]?
 
 You should ask your question like «Is it possible to clear
 the content of [delwrite~] ?» because that's where the
 sound is kept.
 
 [vd~] and [delread~] are just read-heads that don't keep a
 copy of the sound.
 
 [delwrite~] doesn't seem to have a clear feature. This
 could be added with a little bit of C code, but otherwise,
 there is a workaround : you temporarily set all of your
 read-heads to a blank portion of the buffer instead of where
 they're supposed to be. Yes it's ugly, and no, it doesn't
 always work. The clear feature would be a better idea.

Would the following do the same thing as a clear message?

[r del_period]
|
[delread~ foo]
|
|   [r clear]
|   |
|   [b]
|   |\   [r del_period]
|   |  \ |
|   [0(  [del]
|   |   /
|   | [1(
|   |/
[*~ 1]

 
 
 ___
 | Mathieu Bouchard  tél: +1.514.383.3801 
 Villeray, Montréal, QC
 
 -Inline Attachment Follows-
 
 ___
 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 can I clear [vd~]

2011-02-01 Thread Tyler Leavitt
Hello,

Thank you for writing that up Mathieu, I was looking for that exact fix
about 3 months ago. Could you or anybody else that wants to take up the
issuse explain to me how to add that code to my current installation? I'm
assuming it would need to be recompiled, and I've never recompiled a single
library or object.

Or even point me to a existing tutorial? =)

Tyler

On Tue, Feb 1, 2011 at 12:44 PM, Jonathan Wilkes jancs...@yahoo.com wrote:



 --- On Tue, 2/1/11, Mathieu Bouchard ma...@artengine.ca wrote:

  From: Mathieu Bouchard ma...@artengine.ca
  Subject: Re: [PD] how can I clear [vd~]
  To: Ingo Scherzinger i...@miamiwave.com
  Cc: pd-list@iem.at
  Date: Tuesday, February 1, 2011, 3:33 AM
  On Tue, 1 Feb 2011, Ingo Scherzinger
  wrote:
 
   Is it possible to clear the content of [vd~]?
 
  You should ask your question like «Is it possible to clear
  the content of [delwrite~] ?» because that's where the
  sound is kept.
 
  [vd~] and [delread~] are just read-heads that don't keep a
  copy of the sound.
 
  [delwrite~] doesn't seem to have a clear feature. This
  could be added with a little bit of C code, but otherwise,
  there is a workaround : you temporarily set all of your
  read-heads to a blank portion of the buffer instead of where
  they're supposed to be. Yes it's ugly, and no, it doesn't
  always work. The clear feature would be a better idea.

 Would the following do the same thing as a clear message?

 [r del_period]
 |
 [delread~ foo]
 |
 |   [r clear]
 |   |
 |   [b]
 |   |\   [r del_period]
 |   |  \ |
 |   [0(  [del]
 |   |   /
 |   | [1(
 |   |/
 [*~ 1]

 
 
  ___
  | Mathieu Bouchard  tél: +1.514.383.3801 
  Villeray, Montréal, QC
 
  -Inline Attachment Follows-
 
  ___
  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] how can I clear [vd~]

2011-02-01 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Tyler Leavitt wrote:

Thank you for writing that up Mathieu, I was looking for that exact fix 
about 3 months ago. Could you or anybody else that wants to take up the 
issuse explain to me how to add that code to my current installation? 
I'm assuming it would need to be recompiled, and I've never recompiled a 
single library or object. 


First learn how to recompile pd (extended's core, or vanilla, whichever) 
and how to install it.


After that, you can install my fix by putting it in a textfile (let's say 
delwrite-clear.txt) and running those commands in terminal :


  cd pd/src
  patch  delwrite-clear.txt
  make install

(with appropriate changes for saying which folders the files are really 
in)


(the patch command name is a word meaning something completely something 
else than a modular synth patch... it's a command for automatically 
editing programmes based on lists of differences such as what I wrote in 
the email)



Or even point me to a existing tutorial? =)


I don't know.

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Mike Moser-Booth
You could also just build a delay using a [table] as the buffer. Then you
can clear your delay line by sending the [clear( message to the table.

.mmb

On Tue, Feb 1, 2011 at 6:29 PM, Mathieu Bouchard ma...@artengine.ca wrote:

 On Tue, 1 Feb 2011, Tyler Leavitt wrote:

  Thank you for writing that up Mathieu, I was looking for that exact fix
 about 3 months ago. Could you or anybody else that wants to take up the
 issuse explain to me how to add that code to my current installation? I'm
 assuming it would need to be recompiled, and I've never recompiled a single
 library or object.


 First learn how to recompile pd (extended's core, or vanilla, whichever)
 and how to install it.

 After that, you can install my fix by putting it in a textfile (let's say
 delwrite-clear.txt) and running those commands in terminal :

  cd pd/src
  patch  delwrite-clear.txt
  make install

 (with appropriate changes for saying which folders the files are really in)

 (the patch command name is a word meaning something completely something
 else than a modular synth patch... it's a command for automatically editing
 programmes based on lists of differences such as what I wrote in the email)


  Or even point me to a existing tutorial? =)


 I don't know.


  ___
 | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC

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




-- 
Mike Moser-Booth
mmoserbo...@gmail.com
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Mike Moser-Booth wrote:

You could also just build a delay using a [table] as the buffer. Then 
you can clear your delay line by sending the [clear( message to the 
table. .mmb


as far as I'm concerned, if I needed that feature, I'd consider just 
recompiling, instead of going as far as building a workaround, especially 
if the workaround has to emulate [vd~] as well.


Nowadays, I use [vd~] all of the time (almost whenever I do audio).

OTOH, building a [vd~] replacement as tables means that I could easily 
replace [tabread4~] by Cyrille Henry's [tabread4c~].


But I use silly numbers of [vd~], which tend to take most of the cpu in 
many of my audio patches, so, I wouldn't want to replace by anything 
significantly slower.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Jonathan Wilkes wrote:


Would the following do the same thing as a clear message?


If you don't need change the amount of delay while using it.

It works because [delay] doesn't keep a queue of unsent bangs, it just 
forgets them, while [pipe] does make a queue (which wouldn't work in that 
circumstance).


If you wanted to support variable delay (in the manner that [delread~] 
does) you'd need to use a [line] with a [] to figure out when to turn the 
delread~ back on.


The other difference is that instead of sending a message to a single 
[delwrite~], you have to modify all [delread~]s that happen to read that 
delay-buffer.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Mike Moser-Booth
Oh, I agree. I'd much rather use [vd~] than hack a workaround. But I
don't think all of us are in the level of compiling our own externals
(I, for one, have never done it). I'm merely suggesting it as an
alternative.

It is a pretty simple workaround, though. If you use [poke~] to write,
then the delay time is just an offset to the index of [poke~]. And
then, as you suggest, one can use whatever object that employs
whatever interpolation method one prefers.

.mmb

On Wednesday, February 2, 2011, Mathieu Bouchard ma...@artengine.ca wrote:
 On Tue, 1 Feb 2011, Mike Moser-Booth wrote:


 You could also just build a delay using a [table] as the buffer. Then you can 
 clear your delay line by sending the [clear( message to the table. .mmb


 as far as I'm concerned, if I needed that feature, I'd consider just 
 recompiling, instead of going as far as building a workaround, especially if 
 the workaround has to emulate [vd~] as well.

 Nowadays, I use [vd~] all of the time (almost whenever I do audio).

 OTOH, building a [vd~] replacement as tables means that I could easily 
 replace [tabread4~] by Cyrille Henry's [tabread4c~].

 But I use silly numbers of [vd~], which tend to take most of the cpu in many 
 of my audio patches, so, I wouldn't want to replace by anything significantly 
 slower.

  ___
 | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC

-- 
Mike Moser-Booth
mmoserbo...@gmail.com

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


Re: [PD] how can I clear [vd~]

2011-02-01 Thread Jonathan Wilkes


--- On Wed, 2/2/11, Mathieu Bouchard ma...@artengine.ca wrote:

 From: Mathieu Bouchard ma...@artengine.ca
 Subject: Re: [PD] how can I clear [vd~]
 To: Jonathan Wilkes jancs...@yahoo.com
 Cc: Ingo Scherzinger i...@miamiwave.com, pd-list@iem.at
 Date: Wednesday, February 2, 2011, 6:22 AM
 On Tue, 1 Feb 2011, Jonathan Wilkes
 wrote:
 
  Would the following do the same thing as a clear
 message?
 
 If you don't need change the amount of delay while using
 it.

Ah, right.

 
 It works because [delay] doesn't keep a queue of unsent
 bangs, it just forgets them, while [pipe] does make a queue
 (which wouldn't work in that circumstance).

Yep.

 
 If you wanted to support variable delay (in the manner that
 [delread~] does) you'd need to use a [line] with a [] to
 figure out when to turn the delread~ back on.
 
 The other difference is that instead of sending a message
 to a single [delwrite~], you have to modify all [delread~]s
 that happen to read that delay-buffer.

That's definitely a burden.

Did you add your patch to the tracker?

-Jonathan

 
 
 ___
 | Mathieu Bouchard  tél: +1.514.383.3801 
 Villeray, Montréal, QC
 


  

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


[PD] how can I clear [vd~]

2011-01-31 Thread Ingo Scherzinger
Is it possible to clear the content of [vd~]?

I am using [switch~] to turn off unused synth voices which contain a
[delwrite~] and a corresponding [vd~] object. When I turn the voice back on
there is some leftover in [vd~] that causes clicks at the beginning of the
new sound.

Ingo


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


Re: [PD] how can I clear [vd~]

2011-01-31 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Ingo Scherzinger wrote:


Is it possible to clear the content of [vd~]?


You should ask your question like «Is it possible to clear the content of 
[delwrite~] ?» because that's where the sound is kept.


[vd~] and [delread~] are just read-heads that don't keep a copy of the 
sound.


[delwrite~] doesn't seem to have a clear feature. This could be added with 
a little bit of C code, but otherwise, there is a workaround : you 
temporarily set all of your read-heads to a blank portion of the buffer 
instead of where they're supposed to be. Yes it's ugly, and no, it doesn't 
always work. The clear feature would be a better idea.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] how can I clear [vd~]

2011-01-31 Thread Mathieu Bouchard

On Tue, 1 Feb 2011, Ingo Scherzinger wrote:


Yes, you are right, Mathieu!
It's the [delwrite~]! I am already toggling between two [vd~] objects. I
guess if I'd add a second [delwrite~] to keep the other one cleard with no
signal being fed into it while the other one is active it would work.
Thank you for the idea!


Well, if you switch off and on and off and on real quick, then your 
double-delwrite~ trick doesn't work anymore. I suppose that it would be 
better to actually add the clear method :


Index: d_delay.c
===
--- d_delay.c   (révision 14844)
+++ d_delay.c   (copie de travail)
@@ -5,6 +5,7 @@
 /*  send~, delread~, throw~, catch~ */

 #include m_pd.h
+#include string.h
 extern int ugen_getsortno(void);

 #define DEFDELVS 64 /* LATER get this from canvas at DSP time */
@@ -129,6 +130,11 @@
 (x-x_cspace.c_n + XTRASAMPS) * sizeof(t_sample));
 }

+static void sigdelwrite_clear(t_sigdelwrite *x) {
+int n = XTRASAMPS + x-x_cspace.c_n;
+memset(x-x_cspace.c_vec, 0, n * sizeof(t_sample));
+}
+
 static void sigdelwrite_setup(void)
 {
 sigdelwrite_class = class_new(gensym(delwrite~),
@@ -137,6 +143,8 @@
 CLASS_MAINSIGNALIN(sigdelwrite_class, t_sigdelwrite, x_f);
 class_addmethod(sigdelwrite_class, (t_method)sigdelwrite_dsp,
 gensym(dsp), 0);
+class_addmethod(sigdelwrite_class, (t_method)sigdelwrite_clear,
+gensym(clear), 0);
 }

 /* - delread~ - */

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list