[PD] "popping" from - and prepending to - a generic message

Frank Barknecht fbar at footils.org
Thu Feb 8 08:39:02 CET 2007

Matteo Sisti Sette hat gesagt: // Matteo Sisti Sette wrote:

> Is there a reasonably stright-forward way in pd-proper (I mean, without 
> externals) to do either of the following two things?
> 1) Removing the first element of a message (NOT necessarily a list) and 
> returning the rest of the message

[list split 1]

> 2) Prepending a symbol or number to a message

[list prepend]

> But I mean: this must work with ANY message, without knowing its 
> "composition" (whether it starts with a number or symbol, how many 
> "elements" and of what type it has, etc.)

Above examples *do* work with any message. 

Not that *you* need to decide what you want to get afterwards:
list-messages or meta-messages.  Search the archive for the
differences between both. You can convert any list-message that starts
with a symbol to a meta-message with [list trim]

 Frank Barknecht                 _ ______footils.org_ __goto10.org__

More information about the Pd-list mailing list