Re: [PD] Getting Sysex output to work on Linux

2008-05-25 Thread Ken Restivo
On Sun, May 25, 2008 at 11:12:24AM -0700, Miller Puckette wrote:
 Is it out of the question simply to use the OSS MIDI API?  That should
 be the default, and it's much less buggy than the ALSA one.  (Apparently,
 though, there's sometimes a good reason to use teh ALSA one instead, I
 remember vaguely.)
 
 To put out sysex MIDI, theoretically in either ALSA or OSS, send the 
 bytes out serially, as in 247, NN, NN, 240, not in a list as in
 247 NN NN 240.

OSS has, IIRC, been deprecated for many years now.

ALSA should be the correct one to use on Linux.

And, also, for the past year or so there's been a new JACK MIDI API which is a 
lot cleaner (and strongly-timed) than ALSA, although it of course uses ALSA for 
transmission to actual MIDI devices.

-ken

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


Re: [PD] wierd feedback popping with pd/freebob/jack/rt

2008-05-21 Thread Ken Restivo

On Wed, May 21, 2008 at 02:23:20PM -0700, Rich E wrote:
 
  IIRC, Ubuntu RT kernel is not actually Real Time (i.e. with Ingo
  patches), just a desktop RT which is not very useful for audio and
  certainly not enough for JACK apps of any heft.
 
 
 Where are you getting this info from?  This is not what I have read, but
 maybe I am missing something somewhere.  I thought that the Ubuntu kernel
 packagers recently switched to using full realtime preemption... I find this

My info is from having installed Ubuntu and used it... but that was a few years 
ago. Glad they're using Ingo's patches now.


 in the package description of linux-image-2.6.22-14-rt :
 Ingo Molnar's full real time preemption patch (2.6.22.1-rt9)
 
 Here is the output of uname -a:
 Linux pal 2.6.22-14-rt #1 SMP PREEMPT RT Tue Feb 12 09:57:10 UTC 2008 i686
 GNU/Linux
 
 .. and here are the kernel settings from  cat /boot/config-2.6.22-14-rt |
 grep PREEMPT
 # CONFIG_PREEMPT_NONE is not set
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT_DESKTOP is not set
 CONFIG_PREEMPT_RT=y
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_SOFTIRQS=y
 CONFIG_PREEMPT_HARDIRQS=y
 CONFIG_PREEMPT_BKL=y
 CONFIG_PREEMPT_RCU=y
 # CONFIG_DEBUG_PREEMPT is not set
 # CONFIG_CRITICAL_PREEMPT_TIMING is not set

 Looks realtime to me.. also the latency is really low (5-10ms
 conservatively), much lower than I have experienced on other OS's, with or
 without realtime.  But, if you know something I don't... I have open ears.

Nope, you got real-time there, for sure. I was wrong then.

 Ubuntu runs so nicely on a laptop though... would hate to switch after
 finding such an easy-to-operate linux distribution because pd and only pd
 doesn't like jack in realtime.
 

Dunno. You're playing Xrun whack-a-mole. Done that; it's not fun.

Here's what I did to RT-ify my system (on Debian, but Ubuntu is based on it):
http://www.restivo.org/blog/archives/preparing-a-debian-etch-system-for-audio-use

Also, I expect you know to use chrt to give the IRQ of your audio interface top 
priority, higher than JACK and any other process. That's a crucial step. If I 
omit that, then I get clicks and pops too, which is why I wrote a script to do 
it automatically. You could also install and configure the rtirq package, 
which works great too.

-ken

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


Re: [PD] wierd feedback popping with pd/freebob/jack/rt

2008-05-20 Thread Ken Restivo
 2008/5/20 Rich E [EMAIL PROTECTED]:
 
  Currently, Pd-0.40.3-extended from the autobuiilds.  While I think this is
  occurring on every version on Pd I have tried since I installed Hardy (which
  is alot), I should do some testing to verify that.
 
  Another thing; opening Audacity only cures things for a bit, until I do
  something like open another patch in pd.  Then, the glitch happens again, I
  restart audacity, and it goes away.
 
  I'll try some testing on 0.39 - .41 vanilla when I have a moment.
 

IIRC, Ubuntu RT kernel is not actually Real Time (i.e. with Ingo patches), 
just a desktop RT which is not very useful for audio and certainly not enough 
for JACK apps of any heft.

The pops/clicks phenomenon you are noticing that gets resolved by starting or 
killing another JACK app, is something I've experienced before. It happens when 
some app gets an Xrun or otherwise can't process audio in time. From that point 
forward it clicks and, in my experience, distorts as well with some 
bitcrushing-style aliasing distortion. When you start or stop any JACK app, the 
entire JACK graph structure gets re-ordered (this isn't true with jackdmp, just 
with single-processor JACK), and that causes the misbehaving app to start from 
scratch somewhat and get its audio organized properly.

I'd suggest 64Studio, Musix, Pure::Dyne, or some other distro that has the 
really serious RT set up with the Ingo patches. With one of those distros, 
everything should run very well on a machine of any decent heft.

-ken

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


[PD] Peeking at a WAV file's headers?

2008-04-24 Thread Ken Restivo
I've built a little patch to read and play stereo WAV files, but soundfiler 
crashes PD completely and exits if I open a mono WAV file.

I'm using read -resize $1 testsampleL testsampleR to read into two arrays.

Is there some way in PD to conditionally peek at the WAV header, so that I can 
do that first and only open the file if it has 2 channels?

-ken

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


Re: [PD] Sysex messages?

2008-04-22 Thread Ken Restivo
On Tue, Apr 22, 2008 at 10:53:44AM -0400, Michal Seta wrote:
 On Tue, Apr 22, 2008 at 10:03 AM, Michal Seta [EMAIL PROTECTED] wrote:
   Have you tried reading your SysEx with [midiin]?
 
 I just tried it. Seems to be working but I could not check the
 integrity of the data although it appears fine on the surface.  HTH.
 

Nothing shows up on the outputs of midiin or on sysexin.

However, aseqdump shows that the data is definitely being pumped out by the 
keyboard, and making it into ALSA.

Notes and CC's show up just fine in pd via notein, etc.

May be a bug or misconfiguration in my specific setup of PD then.

-ken

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


Re: [PD] Sysex messages?

2008-04-21 Thread Ken Restivo
On Mon, Apr 21, 2008 at 12:04:19AM -0400, Michal Seta wrote:
 IIRC, [midout] should be able to send correct SySex messages out.
 [sysexin] supposedly reads sysex.  I cannot test those right now but i
 remember having some success with these, but it was long time ago (I
 can't even track down the patches I used).
 
 

Thanks! midiout appears to work. sysexin doesn't; I'm definitely sending 
sysexes to the port, but nothing is coming out of the bottom of sysexin.

I'm on vanilla pd  0.40.2-2, the Debian Sid package.

-ken

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


[PD] Sysex messages?

2008-04-18 Thread Ken Restivo
Is there a way to receive, intepret, and send SysEx messages (like MMC) via PD?

I found one message on the list archives, from 1999, and no answer for it.

-ken

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


Re: [PD] audacity and PD problems with Jack

2008-04-18 Thread Ken Restivo
On Sun, Apr 13, 2008 at 10:46:14AM +0200, altern wrote:
 hi
 
 I am using Audacity to record output of PD via Jack on Ubuntu Studio. I 
 am also having supercollider sending audio to PD. Audacity is causing 
 some discontinuities in the audio and the recording has gaps every 5-10 
 secs. I tried recording with supercollider and i did not get this problem.
 
 Could anyone suggest some basic sound recorder that works with jack? I 
 just need to record the jack output, no need for multitrack or editing, 
 just be able to select the sound format, frequency and amplitude maybe.
 
 There are some I saw searching with synaptics but I thought maybe 
 someone here has some suggestion.
 

I do all of my recording with the command-line jack_capture utility.

Very simple and straightforward.

If I need to edit the result, I fire up Rezound.

Source is here: http://www.notam02.no/arkiv/src/

-ken

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


[PD] Reverse video in the PD editor?

2008-04-09 Thread Ken Restivo
I've been starting to use PD for some music production work. It's going very 
well so far.

I have a very simple and dumb question:

is there any way to get the PD windows to be in reverse video?

My eyes are killing me. I've got all my other apps set to grey text on a black 
background to save my eyesight. It'd be great if there were some hack I could 
use to get PD windows to be in reverse video too.

My understanding is that PD uses TK, so there must be some way to do this. 
Unfortunately, I don't know TK well enough to know how to do this. Looking in 
PD docs I didn't find any mention of reversing the video in PD windows.

Thanks!


-ken

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


Re: [PD] Reverse video in the PD editor?

2008-04-09 Thread Ken Restivo
Thanks. I went with grey for now. Not perfect but it's an improvement.

I'm not averse to editing the source code if you can list for me where in there 
I need to edit, or what to grep for.

-ken
-
On Wed, Apr 09, 2008 at 07:00:06PM -0400, Martin Peach wrote:
 The vanilla pd.tk can be edited to set the canvas background colour.
 At line 914:
 canvas $name.c -width $width -height $height -background white \
 change white to something else.
 You can also edit proc pdtk_text_new to get coloured text, but lines are 
 not changeable in vanilla unless you modify the source code in about 5 
 separate places.
 
 Martin
 
 marius schebella wrote:
  sorry, the pd.tk where you can edit the color scheme easily ships with 
  pd-extended. I think it is compatible to pd vanilla, but not sure.
  marius.
  
  marius schebella wrote:
  hi,
  you can either set it in pd.tk (color scheme) or use hcs/sys_gui to do 
  it on the fly.
  marius.
 
  Ken Restivo wrote:
  I've been starting to use PD for some music production work. It's 
  going very well so far.
 
  I have a very simple and dumb question:
 
  is there any way to get the PD windows to be in reverse video?
 
  My eyes are killing me. I've got all my other apps set to grey text on 
  a black background to save my eyesight. It'd be great if there were 
  some hack I could use to get PD windows to be in reverse video too.
 
  My understanding is that PD uses TK, so there must be some way to do 
  this. Unfortunately, I don't know TK well enough to know how to do 
  this. Looking in PD docs I didn't find any mention of reversing the 
  video in PD windows.
 
  Thanks!
 
 
  -ken
 
  ___
  PD-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
  http://lists.puredata.info/listinfo/pd-list
 
 
  
  
  ___
  PD-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
  http://lists.puredata.info/listinfo/pd-list
  
 
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

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


[PD] A slightly more substantial question

2008-04-09 Thread Ken Restivo
I'm trying to create a PD application that'll be sync'ed to jack transport as a 
sort of master clock.

I found the jack_transport object, loaded it, and it runs. If I bang it 
regularly with a metro, I can see the current sample in jack transport. So far 
so good.

My question is about what'd be the most efficient/effective way to sync up a 
tabplay~ or tabread4~ object to the sample clock in jack transport. So far I've 
considered the following approaches:

1) Bang jack_transport with the output of a sig~ or phasor~ object, getting the 
clock from jack, and use that to hit tabread4~ (I don't know how I'd do this 
with tabplay~ though, and performance is an issue so if tabplay~ is cheaper I 
want to use it).

2) Bang jack_transport with the output of a metro every n milliseconds, and 
calculate what sample I'm supposed to be at in the tabread4~ or tabplay~ 
object, and just re-sync periodically if they drift. If they aren't ever 
going to drift (i.e. if PD's internal sample clock is sync'ed to JACK), then 
perhaps this resyncing will only happen at the start of playing, or perhaps I 
only need to do it then.

3) Or, maybe, let's say if I have a loop, I just need to bang the tabplay~ 
whenever the sample clock in jack_transport divided the number of samples in 
the loop is modulo 0. That'd be simplest and probably cheapest, but I don't 
know if the clocks will drift. Will they?

I dunno. I'm asking you guys when probably I should be asking the software 
instead, by just trying it out and determining empirically what works. But 
before I get too deep into it I'd like to get a second opinion on whether any 
of the above approaches will work or if there's some other technique I should 
be looking at. For some reason I suspect that this'll go really easily, but I 
want to make sure I'm not overlooking anything important.

Thanks.

-ken

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


Re: [PD] about sexism

2007-10-10 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Oct 08, 2007 at 01:14:46PM +0200, Thomas Mayer wrote:
 
 and gang bang can mean [t b b b b b b]
 

+1 Funny

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHDP1Xe8HF+6xeOIcRAnBXAKD8D3kPdrPFdqg8o/eMkTtmcRH8pwCgxEC5
iUQAkaZ868TUYEfl1YDcm+s=
=83JT
-END PGP SIGNATURE-

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


Re: [PD] about sexism

2007-10-10 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Oct 07, 2007 at 10:34:30PM +0200, [EMAIL PROTECTED] wrote:
 ola,
 
 i'm sorry to be boring on this list,
 but here i read everyday terms as :
 'wet dream', 'gang bang' , ..

Women have wet dreams too. It's been studied and confirmed since the 1950's, 
IIRC.

Gang bang could possibly be considered offensive, although sometimes they are 
consensual and gender-balanced (well, here in California, anyway).

 
 and i understand why some girls stay away from this list

It could be because you are calling them girls. 

Any female over the age of majority (18 in California) is not a girl :-)

 
 sorry, i'm chocked sometimes,
 by the 'between men' macho jokes...
 even me.
 

Don't sweat it. It's probably fine as long as you're not doing this:
http://xkcd.com/322/

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHDP3Ie8HF+6xeOIcRArb5AKDbkaUw/OBGFOX2HnDzSpy7vFwyhwCfYk+H
sQVxeZG0JJYCGZzIIlGnB/o=
=J8Qz
-END PGP SIGNATURE-

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


Re: [PD] timestretching for slicer

2007-10-07 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Oct 02, 2007 at 11:07:59AM +0200, Derek Holzer wrote:
 Time stretching is usually done one of two ways, both of which involve a 
 kind of windowing of the array: you can use an FFT analysis (of which 
 there are examples which come with PD), or you can use granulation.
 
 In general, FFT is more accurate, but more expensive. Granulation is 
 used to squeeze the samples in Ableton Live into the BPMs/divisions that 
 one wants. It can also be fairly accurate, the smaller the grains, the 
 more grains are used and the the more overlaps the grains have.
 
 Check my ParticleChamber abstraction for a use of windowed array 
 granulation for time domain manipulation independent of pitch.
 
 http://www.puredata.org/Members/derek/Particlechamber.zip/
 http://www.puredata.info/Members/derek/screenshot.png
 

Do you mean the unauthorized grid plugin?

If it is unauthorized, should I be using it? Is there something wrong with 
it? Are there licensing issues?

- -ken
- 
 
 F R E N K wrote:
  Hello!
  
  Thanks to everybody for the quick solutions for the clicking problem... 
  I have a new question, is there a way to perform timestretching on 
  arrays? Or on anything, this would probably be the final step for having 
  a great live slicer!
  
  thanx!
  
  Rodrigo
  
  
  Con Windows Live Spaces en Prodigy/MSN abre tu mundo y crea tu propio 
  espacio. Es gratis http://spaces.live.com/
  
  
  
  
  ___
  PD-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
  http://lists.puredata.info/listinfo/pd-list
 
 -- 
 derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista
 ---Oblique Strategy # 175:
 What are the sections sections of? Imagine a caterpillar moving
 
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHCQ8Ke8HF+6xeOIcRAmY2AJ9XtZjgPJ9iRsdPp790gPk9XdGI1gCglvRF
mRvbn7f/WOD1q65gray/T4g=
=kx1z
-END PGP SIGNATURE-

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


[PD] Obtaining the sample rate

2007-09-29 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In my PD documentation-reading and websurfing travels, I happened upon an 
external or some other way to obtain the sample rate from PD programmatically, 
instead of hardcoding it (bad! bad! bad!) in PD patches.

But I didn't write it down, and my bookmark list is so stuffed with crap that 
there's no way I'd ever return if I went in there to look.

So I'll ask here: how does one obtain the current sample rate of the audio 
engine, from within a PD patch?

Thanks.

(By the way, I'm writing a jack_metro abstraction, which is basically a metro 
that is sync'ed to JACK's sample-accurate clock, unless of course someone has 
already done it, so please let me know if they have).

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG/w4we8HF+6xeOIcRAudeAJ0TpeuSKtdQAqbQHW7F8p8GAfCWBQCgwvim
H6Et3VRqkHBdOjeYxhL3O80=
=1puv
-END PGP SIGNATURE-

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


[PD] OSCx fails to build on intel core 2 duo

2007-09-29 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

make[1]: Leaving directory 
`/usr/scratch/backports/pd/externals-expanded-extra-whatever/cvs-externals/OSCx/libOSC'
cd src  make
make[1]: Entering directory 
`/usr/scratch/backports/pd/externals-expanded-extra-whatever/cvs-externals/OSCx/src'
cc -Wl,-export_dynamic -shared -o sendOSC.pd_linux sendOSC.o htmsocket.o 
OSC-system-dependent.o -L../../../pd/bin -lpd -lc -lm ../libOSC/libOSC.a
/usr/bin/ld: sendOSC.o: relocation R_X86_64_32 against `a local symbol' can not 
be used when making a shared object; recompile with -fPIC
sendOSC.o: could not read symbols: Bad value
collect2: ld returned 1 exit status


Linux asus 2.6.21-rt1-1 #1 SMP PREEMPT Thu May 3 00:41:41 PDT 2007 x86_64 
GNU/Linux

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG/xB6e8HF+6xeOIcRAvYYAJ9MRVI0GyIRwaP255JPDLaQ8+NIjACg99/K
VQED0metvHpTV5b6y/GJWTw=
=3nJZ
-END PGP SIGNATURE-

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


Re: [PD] Opening a PD patch on Startup in OSX

2007-09-27 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Sep 26, 2007 at 05:57:24PM +0200, Yves Degoyon wrote:
 ola,
 
 
 Energy saving ratings never take this into account, afaik.

 
 
  
 
 what is more energy saving is no to have any heating systems
 ( live in the south )
 and no conditionned air ( that always makes you sick )
 
 sevy
 
 isn't that a bit [OT]?

Not if you write a PD patch to control an Arduino that runs and monitors your 
solar/wind power system :-)

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG/E/xe8HF+6xeOIcRAoHTAKDtojQ9zUIkF9Kk7ocy9SMzVKHrGQCgwUMs
EUonE2af18q0CfPQLZNArNA=
=8xsP
-END PGP SIGNATURE-

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


Re: [PD] Command line-magic for PDP-compatibliness?

2007-09-25 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Sep 25, 2007 at 01:27:34PM +0200, Yves Degoyon wrote:
 i_certify_that_my_video_stream_does_not_use_b_frames

Ha ha. An EULA in a command line option?

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG+aWde8HF+6xeOIcRAp4XAJwILa0sadVbWxry/0Cvv6uLrz8togCfUtsC
DgFK6iKi8T3RILeK2rCWJvM=
=u6aY
-END PGP SIGNATURE-

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


Re: [PD] simple message/list parsing

2007-09-18 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Sep 16, 2007 at 05:20:34PM +1000, Mat Wall-Smith wrote:
 Hi..
 
 I'm still looking for a way of checking one list of numbers against  
 another list of numbers and returning the any number that is included  
 in both.
 Something like the [select] object but that passes the number rather  
 than a bang so I could add the number to a text file or list.
 

Install the python external, and make a simple extraction that does this?

[ x for x in set1 if x in set2 ]

/me ducks

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG7/7ne8HF+6xeOIcRAkdaAKCEQFFHWvoXPVBgETV41nYvBUPHzQCggxVA
5AN5YUVkkpOclVQ57VpFJPg=
=mk55
-END PGP SIGNATURE-

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


Re: [PD] simple message/list parsing

2007-09-18 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Sep 18, 2007 at 10:22:25PM +0200, Thomas Grill wrote:
 
 Am 18.09.2007 um 21:34 schrieb Mathieu Bouchard:
 
 On Tue, 18 Sep 2007, Ken Restivo wrote:
 
 Install the python external, and make a simple extraction that  
 does this?
 
 [ x for x in set1 if x in set2 ]
 
 Install the ruby external, and make a simple external that does this?
 
  set1  set2
 
 and does it all in linear time too, instead of (presumably) quadratic.
 
 it's the exact same syntax for Python (starting with version 2.4)
 

Thanks. I haven't done much with Python since the 2.3 days.

Um, actually, it looks like it's more like:

list( set(set1)  set(set2) )

But, anyway, back to PD now. :-) 

Time for me to try to get RRAD running and play with it some. 

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG8DbWe8HF+6xeOIcRAr8oAJ9KPNYYWgY1u4dq/yoQzmT72TjWEQCg+wNy
KHFwR9v5ywkQi7sGe+1QhEg=
=0eQx
-END PGP SIGNATURE-

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


Re: [PD] Rotary controllers in PD?

2007-09-09 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Sep 09, 2007 at 12:52:54PM +0200, Frank Barknecht wrote:
 Hallo,
 Ken Restivo hat gesagt: // Ken Restivo wrote:
 
  2's complement from 64/Relative (Binary Offset)
  2's Complement from 0 / relative (2's Complement)
  Sign Magnitude / Relative (Signed Bit)
  Sign Magnitude / Relative (Signed Bit 2)
  Single Value Increment/Decrement
 
 What does Single Value Increment/Decrement do? Sounds interesting as
 well and may save some work.

That one outputs one number for each step you turn it up, and a different 
number for each step that you turn it down. The faster you turn it, the faster 
those numbers come flying in to ctlin, but the numbers themselves do not change.

 
  RPN Increment/Decrement Message
  NRPN Increment/Decrement Message
  
  I tried each of these and peeked at the MIDI stream to see what they do, 
  and also at the output of PD's ctlin to see what might emerge. The sign 
  magnitude and 2's complement ones look pretty promising: they indicate 
  which direction (up/down) and how fast you spin the thing.
 
 Assuming you get -1 and 1 for down and up and any positive number for
 speed, you can multiply both numbers to get a stream of single
 numbers. Then you just accumulate these numbers using the standard

What I actually get with the 2's complements and sign magnitude ones, is a 
single bit that tells me direction (up or down), and a 6-bit number that tells 
me basically the velocity at which I spun the knob.

 accumulator idiom: 
  
  |
  [+ ]x[f ]
  |
  [0\
 
 (See the counting.pd tutorial that I posted on this list several times
 for details.)

Thanks, will try. 


 
  Now, to turn those numbers into a float between -1 and 0 that I can
  use for controlling various parameters in PD.
 
 I don't think this makes sense: What should 0 and -1 indicate? The
 rotary controller doesn't have any left and right borders that could
 be mapped to be -1 and 0. And I also don't think, mapping -1 to min
 and 0 to max speed makes sense either.
 

I wasn't being clear. Only some of the parameters I want to control have a 
range between -1 and 1. Others have different ranges (i.e. from 0 to Nyquist 
frequency, etc.). My point being, I'm eager to find a way to use these rotary 
controllers, to break out of the limitation of having to divide whatever range 
I am faced with, into 128 measly discrete steps.

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG5Gfye8HF+6xeOIcRAjX1AJ0b3aBjLpGiSrgFX61pgtoehSoA2ACeIkkx
HiNBIaY89SJY7CzXu/MZ8mI=
=0KcB
-END PGP SIGNATURE-

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


Re: [PD] [Pd] Building OSCx on 64-bit Debian

2007-09-08 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Sep 08, 2007 at 06:48:52PM -0400, Chuckk Hubbard wrote:
 Hi.  I acquired a p5 glove, and the Pd interface I found for it relies on
 OSCx.  I've been trying to build it, having added -fPIC to it, but I get
 this:
 make[1]: Entering directory `/home/chuckk/Glove/pd/externals/OSCx/src'
 cc -Wl,-export_dynamic -shared -o sendOSC.pd_linux sendOSC.o htmsocket.o
 OSC-system-dependent.o -L../../../pd/bin -lpd -lc -lm ../libOSC/libOSC.a
 /usr/bin/ld: cannot find -lpd
 collect2: ld returned 1 exit status
 make[1]: *** [sendOSC.pd_linux] Error 1
 make[1]: Leaving directory `/home/chuckk/Glove/pd/externals/OSCx/src'
 make: *** [all] Error 2
 
 
 I added several paths to the INCLUDES line in src/Makefile, as the guy
 suggested, with the path to a Pd src folder, but still it can't find this
 -lpd.  I read man ld and tried searching for any kind of *libpd*, *pd.a*, or
 *pd.so* on my entire hard drive, and none of them exist.  Should I replace
 this -lpd with something else?  I tried removing it, and it built a faulty
 set of OSCx objects that don't work.
 

The linker uses -L not -I to determine its paths.

Try -L/usr/wherever/pd/libs/are/located ?

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG40Iwe8HF+6xeOIcRAod2AKDtPy6HN+RA7YwsdbkK/AMyEjGErgCgtRyu
pEPOATDtCGx6A31QzKXIGPY=
=kE7A
-END PGP SIGNATURE-

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


[PD] Rotary controllers in PD?

2007-09-08 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

My MIDI controller is an M-Audio Axiom 49. It has 8 rotary controllers which 
can output continuous controller messages.  This may be my way out of the 4-bit 
hole, and allow me to control parameters in PD with finer than 128 discreet 
steps.

Are there any externals or internals in PD to handle these things? The Axiom 
manual states that each rotary controller can be configured in one of these 
ways:

2's complement from 64/Relative (Binary Offset)
2's Complement from 0 / relative (2's Complement)
Sign Magnitude / Relative (Signed Bit)
Sign Magnitude / Relative (Signed Bit 2)
Single Value Increment/Decrement
RPN Increment/Decrement Message
NRPN Increment/Decrement Message

I tried each of these and peeked at the MIDI stream to see what they do, and 
also at the output of PD's ctlin to see what might emerge. The sign magnitude 
and 2's complement ones look pretty promising: they indicate which direction 
(up/down) and how fast you spin the thing.

Now, to turn those numbers into a float between -1 and 0 that I can use for 
controlling various parameters in PD. However, I'm getting old and lazy. I'm 
convinced that *someone* must have already solved this problem, and created an 
abstraction for using rotary controllers in PD. Google turned up hours worth of 
fascinating clicking, having nothing to do with what I was looking for. 

So if anyone can point me to an example patch or docs for using rotary 
controllers in any of the above formats, in PD,, please let me know.

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG41SRe8HF+6xeOIcRAt2QAKDMF0MxlYPFrstiXI+glQVKfHiLawCg5PIc
yR+zUNDl2UfVDwh35R3YBRw=
=z2Am
-END PGP SIGNATURE-

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


Re: [PD] [PD-dev] PD externals/extras/OSC and RT and JACK

2007-09-03 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Sep 03, 2007 at 11:09:42AM +0200, IOhannes m zmoelnig wrote:
 hi.
 
 Ken Restivo wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 you hae to turn the audio-engine on in order to hear something.
 there is a little checkbox in the main pd-window that says compute
 audio, try enabling that...
 btw, this should be explained in the docs (if it is not, i think it is a
 serious omission)
 
 
 I didn't see it. Nor did I see mention of any command-line flag to 
 eliminate this requirement, i.e. to have the audio-engine start up when 
 the program is launched.
 
 as frank has already pointed out, this is covered by chapter-2 in the 
 html-documentation of pd (doc/1.manual/x2.htm)
 
 there is no way to turn on audio-computation via a command-line flag and 
 there is no need for it, as you can load a patch on startup and within 
 the patch you can automatically turn audio on (e.g. like the 
 test-audio-and-midi patch does)

Thanks. The command appears to be pd dsp 1;, which I'm now putting in all my 
patches.

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG3D4be8HF+6xeOIcRAnDJAJ0SDaTHXNkpOERcXUN3PKFQLL/FHgCg3icW
gzRi7XEmV82mklKlusBC+so=
=k2V4
-END PGP SIGNATURE-

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


Re: [PD] [PD-dev] PD externals/extras/OSC and RT and JACK

2007-09-02 Thread Ken Restivo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Sep 02, 2007 at 03:25:24PM +0200, IOhannes m zmoelnig wrote:
 Ken Restivo wrote:
 
  I just realized that it *almost* works. 
  
  The JACK devices are definitely created at the time that PD starts up.
  
  But no sound comes out until I choose the Test Audio and MIDI window, and 
  click on -20 or -40, and get a tone, and then click OFF. 
  
  Only *then* will audio come out of any other patches that might be loaded, 
  even if I can see from number boxes that the patches are definitely running.
 
 
 you hae to turn the audio-engine on in order to hear something.
 there is a little checkbox in the main pd-window that says compute
 audio, try enabling that...
 btw, this should be explained in the docs (if it is not, i think it is a
 serious omission)
 

I didn't see it. Nor did I see mention of any command-line flag to eliminate 
this requirement, i.e. to have the audio-engine start up when the program is 
launched.

 
 
 PS: i think it would be nicer to limit each email to just one (group of)
 question(s); as you can see by the answers so far, people seem to split
 it up anyhow, but the subjects and bureaucratic organization completely
 screws up. and pd-dev vs pd-list and...
 

Thanks. I was looking for a pd-discuss list, and didn't find one, but I'll use 
pd-list from now on.

- -ken
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG21DEe8HF+6xeOIcRAnvUAJ4utNEpnMqg92nU9QeD8otSu8pwSQCcCUQ9
62cc0lO8EoGKC68xl/w8I2o=
=2Xd1
-END PGP SIGNATURE-

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