Skip to content

list-abs

A collection of platform-independent Pure Data abstractions for processing lists. Its objects include operations for dripping, indexing, inserting, deleting, replacing, reversing, and comparing list elements.

Contributors

People who contribute to this project.

Objects

  • OSCprepend OSCprepend prepends its first argument to an OSC message list, providing a way to modify OSC message paths.
  • compare-any compare-any tests whether two anything messages are the same and outputs a float: 1 when they are equal and 0 otherwise.
  • last-x last-x collects incoming floats into a list of the last x values and outputs that list.
  • list-abs list-abs applies the absolute-value operation to the float elements of an input list and outputs the resulting list.
  • list-accum list-accum adds all floats in an input list and outputs the result.
  • list-add list-add subtracts two lists element by element and outputs the resulting list.
  • list-apply list-apply applies the operation of an object created from its arguments to a list, producing a list at its outlet.
  • list-centroid list-centroid calculates the centroid, or center of mass, of a list using sum(mi * i) / sum(mi), with indices starting at 0.
  • list-clip list-clip clips lists, serving as the list-oriented counterpart to clip.
  • list-compare list-compare compares two input lists element by element and outputs 1 when they are equal or 0 when they are not.
  • list-delete list-delete removes one or more items from a list, starting at the zero-based position POS.
  • list-dotprod list-dotprod computes the dot product of two input lists as the sum of corresponding element-wise products (res = sum(Xi*Yi)); for example, lists 2 4 and 3 1 produce 10.
  • list-drip2 list-drip2 outputs the elements of two lists in sync, continuing for the length of the first list.
  • list-dripslow list-dripslow serializes a stored list on demand, outputting its elements one at a time.
  • list-emath list-emath performs a selected arithmetic operation on two lists element by element, with operators such as +, -, *, and / specified as its argument.
  • list-enumerate list-enumerate serializes an input list and prefixes each element with a number, as illustrated by the list a b c d 0 1 2 3.
  • list-equalize list-equalize scales a list by dividing its float elements by their sum, so those elements sum to 1.
  • list-fifo list-fifo stores incoming lists or elements in first-in, first-out order and outputs them when triggered to “pop.” Send bang to trigger output, and use clear to reset the stored list..
  • list-fifo-delim list-fifo-delim stores incoming list messages or elements and outputs the stored list when triggered, using a delimiter symbol between messages; the delimiter defaults to the empty symbol and can be changed manually.
  • list-find list-find finds the position or positions of a value within a list.
  • list-geometric-mean list-geometric-mean calculates the geometric mean of the floats in an input list and outputs the result as a float.
  • list-group list-group groups incoming list items into output lists of a specified, uniform size, serving as a clone of zl group.
  • list-harmonic-mean list-harmonic-mean calculates the harmonic mean of the floats in an input list and outputs a float.
  • list-idx list-idx outputs the element at a specified position in a list.
  • list-insert list-insert inserts a list or element into an original list before the element at position POS, producing the new list.
  • list-inter list-inter performs elementwise linear interpolation between two lists, using a float from 0 to 1 as the distance (factor) between them.
  • list-inter-many list-inter-many performs elementwise linear interpolation between several float lists, outputting the interpolated list.
  • list-invint list-invint calculates the inverse musical intervals of a list of floats.
  • list-iter list-iter groups incoming lists into sublists according to a size limit, serving as a clone of zl iter.
  • list-l2s list-l2s concatenates the elements of a list into a single symbol, using its first argument as the separator.
  • list-lastx list-lastx stores incoming floats and outputs a list of the last x values.
  • list-lifo list-lifo stores incoming lists or elements by “pushing” them and outputs stored data when “popped.” Send a bang to trigger output, or send clear to reset the stored list..
  • list-makefilename list-makefilename changes symbols in a list according to a makefilename-style argument while passing floats unchanged.
  • list-makefilename-a list-makefilename-a applies Pd’s makefilename formatting to each item in a list.
  • list-map2 list-map2 applies a user-defined operation to each pair of corresponding elements from two lists, producing a list of results.
  • list-math list-math performs simple element-wise mathematical operations on lists using a binary operator supplied as its first argument, such as +, -, *, or /.
  • list-mean list-mean calculates the arithmetic mean of the floats in a list by dividing their sum by the number of floats, and outputs the result as a float.
  • list-minmax list-minmax finds the minimum and maximum float values in an input list.
  • list-moses list-moses splits lists according to whether a selected element is smaller than or greater than or equal to a comparison value, like moses for lists; a non-float at the selected position is sent to a separate outlet.
  • list-mult list-mult subtracts two lists element by element for control-list processing.
  • list-normalize list-normalize scales a list so that the element with the largest absolute value becomes 1 in magnitude, with all other float elements scaled by the same factor.
  • list-nth list-nth outputs the element at a specified zero-based position in an input list.
  • list-onearg list-onearg outputs its first creation argument when it receives a bang, but produces no output if that argument is blank.
  • list-random list-random generates a list of pseudorandom integers for use in control-list operations.
  • list-rdrip list-rdrip serializes a list in reverse order, outputting its last element first.
  • list-reduce list-reduce reduces a list to a single value by repeatedly applying the operation connected through its right inlet, supporting tasks such as finding a minimum, maximum, or closest element.
  • list-rev list-rev reverses the order of elements in a list and outputs the reversed list.
  • list-rot list-rot rotates the elements of a list by moving a specified number of elements from the front to the back.
  • list-round list-round rounds all numbers in an input list to the nearest multiple of a specified value and outputs the resulting list.
  • list-sect list-sect outputs the elements common to both input lists, providing the intersection of two lists.
  • list-seek list-seek walks through a stored list element by element, similarly to textfile.
  • list-shellsort list-shellsort sorts an input list of floats using a Shell sort and outputs the sorted list.
  • list-sieve list-sieve looks up whether an incoming float occurs in a stored list, providing separate outputs for found and missed values.
  • list-sort list-sort sorts an incoming list of values in ascending or descending order.
  • list-stddev list-stddev calculates the standard deviation of a list of floats.
  • list-sub list-sub subtracts two lists element by element, providing a control-rate list operation.
  • list-swap list-swap swaps two elements of an input list at specified indices and outputs the resulting list.
  • list-tabdump list-tabdump outputs a table’s contents as a list, using the specified table name, count, and optional start position.
  • list-unique list-unique removes duplicate elements from a list, providing a uniquified list at its outlet.
  • list-unitvec list-unitvec converts an input list into a unit vector.
  • list-wrandom list-wrandom uses an input list as a probability table for weighted random selection.
  • sroute sroute is a settable routing object for control messages, with one outlet for matched input and another for unmatched input.
  • take-two take-two takes a list as input and outputs all combinations from that list, which can be viewed with print.
  • triple-scale triple-scale linearly interpolates between two points represented as three-value (x, y, z) lists, providing a control-rate list output.