Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Mathieu Bouchard

On Wed, 3 Aug 2011, Mathieu Bouchard wrote:

On Tue, 2 Aug 2011, Miller Puckette wrote:

Nope... there needs to be a string-to-binary-list-and-back function 
somewhere

but I can't figure out what to name it :)


for consistency with pd's source, one of :

 [stringmofo] (inspired from d_soundfiler.c)
 [stringpute] (inspired from d_soundfiler.c)
 [stringshit] (inspired from s_inter.c)


but really, it ought to be about splitting the atom...

  [oppenheimer]
  [hiroshima]
  [tchernobyl]
  [strangelove]
  [distantearlywarning]

Now, I am become ->s_name[i], the destroyer of symbols...

 ___
| 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] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Mathieu Bouchard

On Tue, 2 Aug 2011, Miller Puckette wrote:


Nope... there needs to be a string-to-binary-list-and-back function somewhere
but I can't figure out what to name it :)


for consistency with pd's source, one of :

  [stringmofo] (inspired from d_soundfiler.c)
  [stringpute] (inspired from d_soundfiler.c)
  [stringshit] (inspired from s_inter.c)

 ___
| 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] pd message order?

2011-08-03 Thread Jonathan Wilkes
Technically it seems to be this: they output in reverse creation order. (The 
last [receive] you created in the patch will output first.)


Conceptually, imagine an evil demon changing the order in real-time to screw up 
your patch.  Thwart the demon by using wired connections, trigger, and 
subpatches to define order.  Only use multiple [receive]s when message order 
doesn't matter. (Same with multiple wires fanning out to various objects from 
an outlet.)

-Jonathan


>
>From: Ludwig Maes 
>To: Pd List 
>Sent: Wednesday, August 3, 2011 5:16 PM
>Subject: [PD] pd message order?
>
>
>so standard objects have right to left ordering of outlet processing, but what 
>about send and receive for messages? if multiple objects receive for the same 
>name, which one gets it first? is there a triggerlike object for messages, or 
>should I send multiple messages each with a differentiated tag like s bla1, s 
>bla2, s s bla3 even when I send the same message?
>
>___
>Pd-list@iem.at mailing list
>UNSUBSCRIBE and account-management -> 
>http://lists.puredata.info/listinfo/pd-list
>
>
>___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd message order?

2011-08-03 Thread Andy Farnell


IIRC they'll appear in the order the objects were created.

To be clear I would use a trigger to explicitly order
and send to destinations with different (and meaningful names)

In this case the name is best chosen to reflect the intended
action, rather than the source. Hope that makes sense.

a.


On Wed, 3 Aug 2011 23:16:38 +0200
Ludwig Maes  wrote:

> so standard objects have right to left ordering of outlet processing, but
> what about send and receive for messages? if multiple objects receive for
> the same name, which one gets it first? is there a triggerlike object for
> messages, or should I send multiple messages each with a differentiated tag
> like s bla1, s bla2, s s bla3 even when I send the same message?


-- 
Andy Farnell 

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


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Andy Farnell




On Wed, 3 Aug 2011 17:12:49 -0400
Hans-Christoph Steiner  wrote:

> 
> On Aug 3, 2011, at 3:29 PM, Andy Farnell wrote:
> 
> > On Wed, 3 Aug 2011 14:21:09 +0800
> > Chris McCormick  wrote:
> >
> >> Would you consider adding a more generally useful [split] object
> >
> > I agree this would be a useful core object.
> >
> > What problems, if any, do you forsee?
> >
> > Would those outputs implicitly be symbols? Or would we venture
> > the types in advance like
> >
> > [split f / f]
> >
> > to obtain two floats
> >
> > Turning the symbol 5/7 to a real number
> > would then be
> >
> > [symbol 5/7(
> > |
> > [split f / f]
> > |/
> > [/  ]
> > |
> > [number 0.714285]
> 
> 
> I think to fit with the Pd type system in general, it should  
> automatically interpret things into floats and symbols 
> (http://puredata.info/dev/PdDefinitions 
> ):
> 
>   Pd Manual 2.1.2
> 
> "The text is divided into atoms separated by white space."
> 
> "Atoms are either numbers or symbols like '+'. "
> 
> Pd Manual 2.1.2
> 
> "Anything that is not a valid number is considered a symbol."


That seems unambiguous. So I guess if you wanted your "numbers" as 
symbols, you'd explicitly convert them back to symbols. 

I used to use [symbol2list] a lot, so Iohannes suggestion
is interesting. But could that split on an arbitary 
symbol like Chris suggests for the proposed [split] ?

a.

-- 
Andy Farnell 

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


[PD] pd message order?

2011-08-03 Thread Ludwig Maes
so standard objects have right to left ordering of outlet processing, but
what about send and receive for messages? if multiple objects receive for
the same name, which one gets it first? is there a triggerlike object for
messages, or should I send multiple messages each with a differentiated tag
like s bla1, s bla2, s s bla3 even when I send the same message?
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Hans-Christoph Steiner


On Aug 3, 2011, at 3:29 PM, Andy Farnell wrote:


On Wed, 3 Aug 2011 14:21:09 +0800
Chris McCormick  wrote:


Would you consider adding a more generally useful [split] object


I agree this would be a useful core object.

What problems, if any, do you forsee?

Would those outputs implicitly be symbols? Or would we venture
the types in advance like

[split f / f]

to obtain two floats

Turning the symbol 5/7 to a real number
would then be

[symbol 5/7(
|
[split f / f]
|/
[/  ]
|
[number 0.714285]



I think to fit with the Pd type system in general, it should  
automatically interpret things into floats and symbols (http://puredata.info/dev/PdDefinitions 
):


 Pd Manual 2.1.2

"The text is divided into atoms separated by white space."

"Atoms are either numbers or symbols like '+'. "

Pd Manual 2.1.2

"Anything that is not a valid number is considered a symbol."

.hc




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-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Jonathan Wilkes
[makefilename] works off of sprintf which allows you to use it's precision 
modifier; the syntax is a "." followed by a number, sandwiched between the "%" 
and the type specifier.  For symbols, something like "%.2s" means you want a 
precision of two characters, so [makefilename] will truncate everything after 
the second character of the symbol.  (BTW-- this means it's trivial to make an 
abstraction in pd that counts the number of characters in a symbol...)


So I basically made an outer recursive loop that increments the precision, and 
an inner iterative loop with [until] that tries to match the symbol at that 
precision. Since I know your ratio format will only contains digits and a 
single forward slash, then at most it takes 11 tries to find the first 
character; once the match is found that known character is prefixed to whatever 
I'm matching in the next iteration of the outer loop.  This contiues until the 
symbol at the current level of precision matches the original symbol.  Finally, 
a list of floats is accumulated from a counter whose value corresponds to the 
matched symbol for each outer loop iteration.

The idiosyncratic recursion happens when combining the single digits to make 
the final two values of the numerator and denominator.  It's a [list split 1] 
with the middle outlet to a [t a] that feeds back into the left inlet.  This 
outputs the list backwards-- I'm not exactly sure why, but it's handy in this 
case because I can just multiply each digit by increasing powers of ten and 
accumulate to get the final value for the numerator.  (Same process for the 
denominator.)  There's the danger of a stack overflow, but it's unlikely that 
either part of the fraction would have more than 249 digits.

Actually now that I look at it, there should be a much greater danger of a 
stack overflow in the outer loop, because there are seven objects involved in 
the recursion.  But I can still send a 123-character symbol to the abstraction 
without an overflow.  Not sure I understand the relationship between # of 
objects in recursive chain and max # function calls before stack overflow.

-Jonathan




>
>From: Alexandre Torres Porres 
>To: pd-lista puredata ; Jonathan Wilkes 
>Sent: Wednesday, August 3, 2011 11:44 AM
>Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text 
>file
>
>
>Yeah, [s2l], that's the one I knew it existed but couldn't remember. But what 
>I didn't expect is that it'd work so well for this :)
>
>
>But I also always try to see if it's possible to do with vanilla objects, and 
>have a vanilla patch version. I was so convinced it'd be impossible, but 
>Jonathan proved it can be done. Wow, I'm still trying to understand how it 
>works, incredible.
>
>
>Thanks folks
>
>
>
>2011/8/3 Jonathan Wilkes 
>
>Aw c'mon, Miller, you didn't even try.
>>
>>
>>
>>It's just a little sprintf hacking and  that idiosyncratic recursion that 
>>outputs everything backwards.
>>
>>
>>-Jonathan
>>
>>
>>
>>
>>>
>>>From: Miller Puckette 
>>>To: Alexandre Torres Porres 
>>>Cc: pd-lista puredata 
>>>Sent: Wednesday, August 3, 2011 12:35 AM
>>>Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a 
>>>text file
>>>
>>>
>>>Nope... there needs to be a string-to-binary-list-and-back function somewhere
>>>but I can't figure out what to name it :)
>>>
>>>M
>>>
>>>On Wed, Aug 03, 2011 at 01:26:21AM -0300, Alexandre Torres Porres wrote:
 now, some files come in ratios as one symbol like this
 
 5/4
 3/2
 7/4
 
 I'd need to break them into different characters, then treat as numbers to
 get interval in cents. How do I do that? I believe I can't do it in any way
 with vanilla objects, right?
 
 thanks
 Alex
 
 
 
 2011/8/3 Alexandre Torres Porres 
 
 > yeah, it works :)
 >
 > I knew there had to be an easier way other than the mess I did.
 >
 > Perfect, Thanks
 >
 > This is a very cool addon feature to my stuff I'm showing at PdCon, see 
 > you
 > all there.
 >
 > See you all there soon!
 >
 >
 >
 >
 > 2011/8/3 Miller Puckette 
 >
 >> HI Alex --
 >>
 >> Have you tried sending textfile an "open [my-filename] cr" message?  The
 >> "cr" flag asks to interpret newlines as end-of-list.
 >>
 >> cheers
 >> Miller
 >>
 >> On Tue, Aug 02, 2011 at
 11:51:17PM -0300, Alexandre Torres Porres wrote:
 >> > Hi folks
 >> >
 >> > Back in the end of my masters, I did make something that allows you to
 >> load
 >> > scales from the Scala software into Pd, which has a database of over
 >> 4000
 >> > scales.
 >> >
 >> > Check the software and data bank here
 >> http://www.huygens-fokker.org/scala/
 >> >
 >> > It's an extremely powerful tool for microtonality, but you may not 
 >> > care
 >> for
 >> > that 

Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Andy Farnell
On Wed, 3 Aug 2011 14:21:09 +0800
Chris McCormick  wrote:

> Would you consider adding a more generally useful [split] object 

I agree this would be a useful core object.

What problems, if any, do you forsee?

Would those outputs implicitly be symbols? Or would we venture 
the types in advance like

[split f / f]

to obtain two floats

Turning the symbol 5/7 to a real number
would then be

[symbol 5/7(
|
[split f / f]
|/
[/  ]
|
[number 0.714285]

-- 
Andy Farnell 

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


Re: [PD] netsend/netreceive + GUI bug

2011-08-03 Thread martin.peach

> 
> > hmm, i don't know where you get this idea from, but to me, the code of
> > Pd's networking infrastructure looks, as if
> > a) all incoming traffic was polled for in the main thread
> > b) all output of this traffic  (to the Pd-patch) was propery protected
> > by sys_lock()
> 
> I am honestly not that familiar with this low-level aspect of pd. What I am 
> however aware of is that the poll function responsible for receiving message 
> (meaning when it arrives at the socket) inside netreceive immediately 
> dispatches it to pd and its polling is linked not to pd's main loop but to 
> the moment when the socket has received a packet which appears to be a part 
> of any basic network socket example code available online and as far as I can 
> see, I did not notice any relationship between its polling intervals and Pd's 
> main loop. 
> 

If you are indeed talking about vanilla netsend and netreceive, the poll 
function is called during pd's main loop, not when something arrives at the 
socket.
In x_net.c :
sys_addpollfn(sockfd, (t_fdpollfn)socketreceiver_read, y);
socketreceiver_read is in s_inter.c:
void socketreceiver_read(t_socketreceiver *x, int fd)
sys_addpollfunction schedules the function to be called each pass through Pd's 
main loop.

Martin

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


Re: [PD] netsend/netreceive + GUI bug

2011-08-03 Thread Ivica Ico Bukvic
> hmm, i don't know where you get this idea from, but to me, the code of
> Pd's networking infrastructure looks, as if
> a) all incoming traffic was polled for in the main thread
> b) all output of this traffic  (to the Pd-patch) was propery protected
> by sys_lock()

I am honestly not that familiar with this low-level aspect of pd. What I am 
however aware of is that the poll function responsible for receiving message 
(meaning when it arrives at the socket) inside netreceive immediately 
dispatches it to pd and its polling is linked not to pd's main loop but to the 
moment when the socket has received a packet which appears to be a part of any 
basic network socket example code available online and as far as I can see, I 
did not notice any relationship between its polling intervals and Pd's main 
loop. 

FWIW, The only difference in my implementation is that the received messages 
are forwarded to pd via clock_delay(0) which has fixed all such occurrences 
inside L2Ork which is quite network traffic heavy, and apparently has resolved 
problems for others as well.

Best wishes,

Ico


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


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Alexandre Torres Porres
Yeah, [s2l], that's the one I knew it existed but couldn't remember. But
what I didn't expect is that it'd work so well for this :)

But I also always try to see if it's possible to do with vanilla objects,
and have a vanilla patch version. I was so convinced it'd be impossible, but
Jonathan proved it can be done. Wow, I'm still trying to understand how it
works, incredible.

Thanks folks


2011/8/3 Jonathan Wilkes 

> Aw c'mon, Miller, you didn't even try.
>
> It's just a little sprintf hacking and that idiosyncratic recursion that
> outputs everything backwards.
>
> -Jonathan
>
> --
> *From:* Miller Puckette 
> *To:* Alexandre Torres Porres 
> *Cc:* pd-lista puredata 
> *Sent:* Wednesday, August 3, 2011 12:35 AM
> *Subject:* Re: [PD] (breaking symbols) was Re: find a list of numbers in a
> text file
>
> Nope... there needs to be a string-to-binary-list-and-back function
> somewhere
> but I can't figure out what to name it :)
>
> M
>
> On Wed, Aug 03, 2011 at 01:26:21AM -0300, Alexandre Torres Porres wrote:
> > now, some files come in ratios as one symbol like this
> >
> > 5/4
> > 3/2
> > 7/4
> >
> > I'd need to break them into different characters, then treat as numbers
> to
> > get interval in cents. How do I do that? I believe I can't do it in any
> way
> > with vanilla objects, right?
> >
> > thanks
> > Alex
> >
> >
> >
> > 2011/8/3 Alexandre Torres Porres 
> >
> > > yeah, it works :)
> > >
> > > I knew there had to be an easier way other than the mess I did.
> > >
> > > Perfect, Thanks
> > >
> > > This is a very cool addon feature to my stuff I'm showing at PdCon, see
> you
> > > all there.
> > >
> > > See you all there soon!
> > >
> > >
> > >
> > >
> > > 2011/8/3 Miller Puckette 
> > >
> > >> HI Alex --
> > >>
> > >> Have you tried sending textfile an "open [my-filename] cr" message?
> The
> > >> "cr" flag asks to interpret newlines as end-of-list.
> > >>
> > >> cheers
> > >> Miller
> > >>
> > >> On Tue, Aug 02, 2011 at 11:51:17PM -0300, Alexandre Torres Porres
> wrote:
> > >> > Hi folks
> > >> >
> > >> > Back in the end of my masters, I did make something that allows you
> to
> > >> load
> > >> > scales from the Scala software into Pd, which has a database of over
> > >> 4000
> > >> > scales.
> > >> >
> > >> > Check the software and data bank here
> > >> http://www.huygens-fokker.org/scala/
> > >> >
> > >> > It's an extremely powerful tool for microtonality, but you may not
> care
> > >> for
> > >> > that and just want to use the scale data bank in Pd.
> > >> >
> > >> > Anyway, I have a way that exports the  from the Scala software into
> a
> > >> text
> > >> > file that opens in this specific subpatch of mine.
> > >> >
> > >> > But I was trying to do something easier, and that is just load these
> > >> *.scl
> > >> > files into [textfile] or [msgfile] for example, and extracting the
> list
> > >> of
> > >> > these scale intervals in cents.
> > >> >
> > >> > Here's what one of these files look like
> > >> >
> > >> >
> > >> > ==
> > >> >
> > >> > ! 08-11.scl
> > >> > !
> > >> > 8 out of 11-tET
> > >> >  8
> > >> > !
> > >> >  218.18182
> > >> >  327.27273
> > >> >  436.36364
> > >> >  654.54545
> > >> >  763.63636
> > >> >  872.72727
> > >> >  1090.90909
> > >> >  2/1
> > >> >
> > >> >
> > >> > ===
> > >> >
> > >> > So I assumed it'd be easy to extract each cents value and make a
> list
> > >> out of
> > >> > it, but I was wrong. Don't know why but it doesn't load this in
> separate
> > >> > lines, maybe because it is not a *.txt file at all.
> > >> >
> > >> > And anyway, I'm getting in Pd just a list, so the above file, for
> > >> example,
> > >> > file becomes
> > >> >
> > >> >
> > >> > list ! 08-11.scl ! 8 out of 11-tET 8 ! 218.182 327.273 436.364
> 654.545
> > >> > 763.636 872.727 1090.91 2/1
> > >> >
> > >> >
> > >> > I seem to have found a messy way to get the list out of it, but
> maybe
> > >> you
> > >> > people know of something really simple and elegant with some
> extended
> > >> > objects.
> > >> >
> > >> >
> > >> > Thanks
> > >> > Alex
> > >>
> > >> > ___
> > >> > Pd-list@iem.at mailing list
> > >> > UNSUBSCRIBE and account-management ->
> > >> http://lists.puredata.info/listinfo/pd-list
> > >>
> > >>
> > >
>
> > ___
> > Pd-list@iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
>
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Soundfiler / ram

2011-08-03 Thread Jean-Marie Adrien

thanks a lot
JM
Le 2 août 11 à 04:54, Hans-Christoph Steiner a écrit :



Yeah, I think just create 50 arrays with size 10 or something, then  
load
them using 'read -resize' to soundfiler.  If you need to  
"deactivate" an
array, you can send it a resize message to make it small.  See  
attached

patch.

.hc


On Mon, 01 Aug 2011 22:14 +0200, "Jean-Marie Adrien"
 wrote:

Thanks for yor message Hans-Christoph !
so to confirm :

Given say 50 presets with each 250 samples some of them read direct
from disk and others in arrays for looping and so on.
Presets do not need to switch instantly, loading might take few  
seconds.

But switching a large number of times as installation runs, has to be
clean though.

Good way to implement this would be :
declare a number of arrays (corresponding to the largest preset) when
loading the patch
and
resizing / reloading them for preset change ?

(I do not want to choose a bad option from the beginning !)
cheers,
JM












Le 30 juil. 11 à 20:20, Hans-Christoph Steiner a écrit :




There is the 'resize' message to send to an array to resize it, or
the -resize option to the 'read' message to soundfiler.  For very
low RAM situations, you might be better off with readsf~.

.hc

On Jul 30, 2011, at 9:16 AM, Jma/celeonet wrote:



Hi list
Probably has been discussed million times : how is it possible to
open / close large number of sound samples dynamically in arrays
to keep ram low ? (all samples not used at the same time). Set to
zero, resize to zero and reload ?  Any clear command ? Any clean
and up-to-date way (Mac Os) ?
Thanks
JmAdrien

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





 
--

--

If nature has made any one thing less susceptible than all others
of exclusive property, it is the action of the thinking power
called an idea, which an individual may exclusively possess as long
as he keeps it to himself; but the moment it is divulged, it forces
itself into the possession of everyone, and the receiver cannot
dispossess himself of it.- Thomas Jefferson










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


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread João Pais

you could also just take the code of zexy's [symbol2list] object.
it does exactly what you describe.


You can also use [splitfilename] with [fromsymbol] for that. my Click  
Tracker (http://code.google.com/p/clicktracker/) uses exactly the 4/4,  
7/8, etc. format. If you look for the subpatch [pd x/y-konv], the 4/4 to  
"4 4" conversion is isolated there.


of course, a more efficient/intuitive solution would also be desirable -  
as for complex manipulation of symbols in general, there is Pd still a bit  
too limited.


João

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


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Chris McCormick
On Wed, Aug 03, 2011 at 09:34:50AM +0200, IOhannes m zmoelnig wrote:
> On 2011-08-03 08:21, Chris McCormick wrote:
> > 
> > Hm, I should just contribute a patch.
> > 
> 
> you could also just take the code of zexy's [symbol2list] object.
> it does exactly what you describe.
> 
> PS: i hereby grant miller s. puckette (the authore of pure-data) the
> right to use (and modify) the code of zexy's "symbol2list" objectn to
> integrate it into puredata under the terms of the revised BSD license
> under which puredata is currently distributed.

What do you reckon, Miller? Would it help if I did the aforementioned work of 
integrating it and submitting a nice clean patch with helpfile and all?

Heck, I will just do it and see.

Chris.

---
http://mccormick.cx

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


Re: [PD] [PD-announce] Pd Convention - Data structures workshop: Taking your requests

2011-08-03 Thread Chris McCormick
On Tue, Aug 02, 2011 at 03:02:47PM -0700, Jonathan Wilkes wrote:
> If you look at the canvas "get" method I added to the tracker, you'll see I 
> have a "get parent RECEIVE-SYMBOL" message that returns a pointer to the 
> parent canvas (or a zero if there isn't one).  This allows you to:
> 
> [bng]
> |
> [f $0]
> 
> |
> 
> [get parent $1-rcv]
> |
> [s pd-$0-mysubpatch]
> 
> [r $0-rcv]
> |
> [route parent]
> |
> [route 0]
>     |
> 
> [pointer]
> 
> 
> Now [pointer] is pointing at the parent of [pd $0-mysubpatch], so if I 
> immediately follow this by sending the message "send-window obj 20 20 clip" 
> to [pointer], I get a [clip] object on it's parent.  That's just a silly 
> example, but notice it's different than sending to pd-PATCH-FILENAME.pd, 
> which would draw a [clip] on every instance of that patch that is open.
> 
> Put this in an abstraction and it obsoletes [namecanvas].  Or create an 
> abstraction to climb to the root, or the toplevel, etc.
> >> 

Amazing!

Chris.

---
http://mccormick.cx

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


Re: [PD] [PD-announce] Pd Convention - Data structures workshop: Taking your requests

2011-08-03 Thread Frank Barknecht
Hi,

On Tue, Aug 02, 2011 at 01:57:32PM -0700, Jonathan Wilkes wrote:
> How well do these things scale without having a low level way to delete/copy
> scalars or insert/remove arbitrary array elements?

It's "okayish". To store the symbol, I use a data-structure array of 
number/symbol
pairs, where the number is used as a flag if a symbol is active or "deleted".
So your symbolarray can have "holes", but OTOH if you create an array with only
one symbol stored at position 20,000 it will use up the memory of 20,000
symbol/number pairs. But so does a [table] ...

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

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


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread Jonathan Wilkes
Aw c'mon, Miller, you didn't even try.


It's just a little sprintf hacking and  that idiosyncratic recursion that 
outputs everything backwards.

-Jonathan




>
>From: Miller Puckette 
>To: Alexandre Torres Porres 
>Cc: pd-lista puredata 
>Sent: Wednesday, August 3, 2011 12:35 AM
>Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text 
>file
>
>Nope... there needs to be a string-to-binary-list-and-back function somewhere
>but I can't figure out what to name it :)
>
>M
>
>On Wed, Aug 03, 2011 at 01:26:21AM -0300, Alexandre Torres Porres wrote:
>> now, some files come in ratios as one symbol like this
>> 
>> 5/4
>> 3/2
>> 7/4
>> 
>> I'd need to break them into different characters, then treat as numbers to
>> get interval in cents. How do I do that? I believe I can't do it in any way
>> with vanilla objects, right?
>> 
>> thanks
>> Alex
>> 
>> 
>> 
>> 2011/8/3 Alexandre Torres Porres 
>> 
>> > yeah, it works :)
>> >
>> > I knew there had to be an easier way other than the mess I did.
>> >
>> > Perfect, Thanks
>> >
>> > This is a very cool addon feature to my stuff I'm showing at PdCon, see you
>> > all there.
>> >
>> > See you all there soon!
>> >
>> >
>> >
>> >
>> > 2011/8/3 Miller Puckette 
>> >
>> >> HI Alex --
>> >>
>> >> Have you tried sending textfile an "open [my-filename] cr" message?  The
>> >> "cr" flag asks to interpret newlines as end-of-list.
>> >>
>> >> cheers
>> >> Miller
>> >>
>> >> On Tue, Aug 02, 2011 at 11:51:17PM -0300, Alexandre Torres Porres wrote:
>> >> > Hi folks
>> >> >
>> >> > Back in the end of my masters, I did make something that allows you to
>> >> load
>> >> > scales from the Scala software into Pd, which has a database of over
>> >> 4000
>> >> > scales.
>> >> >
>> >> > Check the software and data bank here
>> >> http://www.huygens-fokker.org/scala/
>> >> >
>> >> > It's an extremely powerful tool for microtonality, but you may not care
>> >> for
>> >> > that and just want to use the scale data bank in Pd.
>> >> >
>> >> > Anyway, I have a way that exports the  from the Scala software into a
>> >> text
>> >> > file that opens in this specific subpatch of mine.
>> >> >
>> >> > But I was trying to do something easier, and that is just load these
>> >> *.scl
>> >> > files into [textfile] or [msgfile] for example, and extracting the list
>> >> of
>> >> > these scale intervals in cents.
>> >> >
>> >> > Here's what one of these files look like
>> >> >
>> >> >
>> >> > ==
>> >> >
>> >> > ! 08-11.scl
>> >> > !
>> >> > 8 out of 11-tET
>> >> >  8
>> >> > !
>> >> >  218.18182
>> >> >  327.27273
>> >> >  436.36364
>> >> >  654.54545
>> >> >  763.63636
>> >> >  872.72727
>> >> >  1090.90909
>> >> >  2/1
>> >> >
>> >> >
>> >> > ===
>> >> >
>> >> > So I assumed it'd be easy to extract each cents value and make a list
>> >> out of
>> >> > it, but I was wrong. Don't know why but it doesn't load this in separate
>> >> > lines, maybe because it is not a *.txt file at all.
>> >> >
>> >> > And anyway, I'm getting in Pd just a list, so the above file, for
>> >> example,
>> >> > file becomes
>> >> >
>> >> >
>> >> > list ! 08-11.scl ! 8 out of 11-tET 8 ! 218.182 327.273 436.364 654.545
>> >> > 763.636 872.727 1090.91 2/1
>> >> >
>> >> >
>> >> > I seem to have found a messy way to get the list out of it, but maybe
>> >> you
>> >> > people know of something really simple and elegant with some extended
>> >> > objects.
>> >> >
>> >> >
>> >> > Thanks
>> >> > Alex
>> >>
>> >> > ___
>> >> > 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
>
>
>

ratio2list.pd
Description: Binary data


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


Re: [PD] find a list of numbers in a text file

2011-08-03 Thread Frank Barknecht
Hi,

On Tue, Aug 02, 2011 at 11:51:17PM -0300, Alexandre Torres Porres wrote:
> Back in the end of my masters, I did make something that allows you to load
> scales from the Scala software into Pd, which has a database of over 4000
> scales.
> 
> Check the software and data bank here http://www.huygens-fokker.org/scala/
> 
> It's an extremely powerful tool for microtonality, but you may not care for
> that and just want to use the scale data bank in Pd.
> 
> Anyway, I have a way that exports the  from the Scala software into a text
> file that opens in this specific subpatch of mine.

My [tunetof] abstraction from 2006 uses a python script to convert Scala files 
to
a format, Pd can easily import to a [table]
See http://lists.puredata.info/pipermail/pd-list/2006-04/037184.html
ff. It's in the Pd repository at /abstractions/footils/tunetof

Maybe you can make use of the Python parser?

Ciao
-- 
 Frank BarknechtDo You RjDj.me?  _ __footils.org__

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


Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file

2011-08-03 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2011-08-03 08:21, Chris McCormick wrote:
> 
> Hm, I should just contribute a patch.
> 

you could also just take the code of zexy's [symbol2list] object.
it does exactly what you describe.

fgmasdr
IOhannes


PS: i hereby grant miller s. puckette (the authore of pure-data) the
right to use (and modify) the code of zexy's "symbol2list" objectn to
integrate it into puredata under the terms of the revised BSD license
under which puredata is currently distributed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk44+hoACgkQkX2Xpv6ydvT9qQCfat1M2L7VzdY/hoXfn0VlpgVP
t6gAnjvd7Fe04clJgQHQoAP5HRrTt9rs
=72iz
-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] netsend/netreceive + GUI bug

2011-08-03 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2011-08-02 22:44, Ivica Ico Bukvic wrote:
>
> 
> This is however not the case whenever you have a high throughput traffic that 
> arrives form various sources at unexpected intervals as the netreceive sends 
> out its message whenever it receives it rather than waiting for the scheduler 
> interrupt which means when that message lands in the middle of another tcl/tk 
> message that is currently being parsed to be sent out to gui (something that 
> commonly is unlikely to take place when the throughput is low but becomes 
> increasingly more likely as the network traffic increases), you end up with 
> garbage output that results in syntax error on the tcl/tk side and thus 
> tcl/tk becomes unresponsive. This is best observed if you monitor pd->tcl/tk 
> activity with debugger on.
>

hmm, i don't know where you get this idea from, but to me, the code of
Pd's networking infrastructure looks, as if
a) all incoming traffic was polled for in the main thread
b) all output of this traffic  (to the Pd-patch) was propery protected
by sys_lock()

this basically contradicts your claims of network data being
asynchronously fed into Pd's messaging cycle.

of course there might be some bugs in the code, but i rather doubt that.

fgmasdr
IOhannes


PS: just for clarity: i'm talking about the [netreceive] object in
Pd-vanilla; things might be different in Pd-extended and other
networking objects. e.g. iemnet will receive the data asynchronously,
but then will pass it to Pd synchronously.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk44+RQACgkQkX2Xpv6ydvQk8gCfVOPQWNCAZLGrZacFetCKe4Lk
M68An1+DhFuYETKGS+nUl+l/mBJRwjdn
=++Nt
-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


[PD] Pais @ Pure Data Convention 2011 - Concert, Workshop, Paper presentation, organisation

2011-08-03 Thread João Pais

Dear friends,

here is a small update about some upcoming events.



João Pais (& others) @ Pure Data Convention 2011:

8th-9th August
Workshop by João Pais
Understanding and being creative with Pure Data’s data structures

http://www.uni-weimar.de/medien/wiki/PDCON:Workshops/Data_Structures


8th August
Endphase 18-2 Mixed Cities

João Pais (in Weimar, laptop)
Alberto C. Bernal, Enrique Tomás (in Madrid, smartphones)

http://www.uni-weimar.de/medien/wiki/PDCON:Concerts/Endphase:_João_Pais,_Alberto_C._Bernal,_Enrique_Tomás
https://www.facebook.com/event.php?eid=249753455044229


12th August
Paper presentation
Click Tracker: Performance/composition tool for metrically complex scores
(with Pedro Lopes)

http://www.uni-weimar.de/medien/wiki/PDCON:Conference/Click_Tracker:_Performance/composition_tool_for_metrically_complex_scores


13th+14th August - Events in Berlin, @NK and LEAP
http://www.uni-weimar.de/medien/wiki/PDCON:Schedule#Saturday_13._Aug._2011
https://www.facebook.com/event.php?eid=263231713693375


For more information, look at
http://www.uni-weimar.de/medien/wiki/PDCON:Schedule

Best regards,

João Pais

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