Count channels in a multichannel
get number of channels in mc connections
https://github.com/pure-data/pure-data/issues/1989
missing/useful [snake~] methods
https://github.com/pure-data/pure-data/issues/1996
space in OSC node identifier?
@jameslo said:
I'd still like to know if spaces are legal and possible with [oscformat] though.
I'm a bit surprised to see this, but in fact, according to the OSC spec 1.0, spaces are not allowed in OSC command paths.
https://ccrma.stanford.edu/groups/osc/spec-1_0.html#osc-address-spaces-and-osc-addresses
Each OSC Method and each OSC Container other than the root of the tree has a symbolic name, an ASCII string consiting of printable characters other than the following:
-character- -name- -ASCII code (decimal)- ’ ’ space 32 # number sign 35 * asterisk 42 , comma 44 / forward slash 47 ? question mark 63 [ open bracket 91 ] close bracket 93 { open curly brace 123 } close curly brace 125
So Pd has no obligation to support spaces here.
I suppose it depends on the software's OSC handler. SuperCollider doesn't complain (contrary to the OSC spec):
n = NetAddr.localAddr; // send to myself
o = OSCFunc({ |msg|
msg.postln;
o.free;
}, '/test space');
n.sendMsg('/test space', 1);
prints: [ /test space, 1 ]
I did some other tests:
- "symbol patch 1" --> [list fromsymbol]: escape char 92 is not in the ASCII list.
- list "112 97 116 99 104 32 49" --> [list tosymbol]: resulting symbol prints with a backslash. I don't know if the backslash is stored internally, or if it's inserted only for the printed output. A quick look at the source code in x_list.c suggests that the backslash is not stored internally.
- list "112 97 116 99 104 32 49" --> [list tosymbol] --> [list prepend set] --> [list trim] --> [oscformat]: The printed bytes from oscformat do include char 92. But I couldn't see in the source code where the space is being escaped. (This long way around to build the "set" message is to be certain that there's no backslash in my input -- the backslash must be generated internally somewhere..)
So [oscformat] seems to be where the problem is happening -- but the OSC spec makes no promises that spaces will work, so there wouldn't be any justification to log a bug.
hjh
GUI plugins must-have?
ctrl+t for messages, too:
https://forum.pdpatchrepo.info/topic/14071/msg-a-message-object-bug-fix
I prefer keyboard over mouse.
Using the shortcuts ctrl+1 or +2 or +3 ect. keeps the flow already being connected.
[bng] [tgl] ect same for GUI objects.
Shift+Arrow Keys moves selection in bigger steps.
In Windows system settings I have activated this shortcut:
zero on number-pad for click-hold. Although I'd prefer a different key, it is very useful in Pd to avoid arm strains.
And this looks promising:
Keyboard navigation/patching
https://github.com/pure-data/pure-data/pull/869
This one too:
canvas zoom and scroll with mousewheel
https://github.com/pure-data/pure-data/pull/1659
(Wish to connect a whole chain easily by simply dragging a cable across several objects/msgs, without the need to release the mouse-button.)
Also: in editmode ctrl+click on GUI, instead of ctrl+e
essential: hold shift + drag on number box
Trouble With pd After Changing Hardware On Project
Hi everyone,
I'm new to pd. I built Otem Rellik's piLooper, which runs on a pd patch he created. (do a search on YouTube to see this cool project) It involves a Teensy 3.6 hooked into a Raspberry Pi 4b that has pd installed.
Everything worked properly until I decided to start changing up the hardware. The original piLooper has a 2.2" screen for viewing the loops/tempo/etc.. and a Nintendo DS touchscreen used as a beat repeat/bit crusher on the loops playing back.
I purchased an Adafruit touchscreen to combine both screens. I modified the code to go with the Adafruit libraries and everything appears correct but now pd will give me errors and the piLooper won't work.
I'm not sure what in the code is causing pd to give me errors and I'm not sure where to look in pd to fix it.
piLooper link where pd patch is located
Old code and new code.
//NDS_TOUCH
//limit reads to 5ms
readTime = millis();
touchX = readX();
touchY = readY();
if ((touchX < 900) && (touchY < 900)){
if(readTime - prevReadTime > 16){
Serial.print("Xval: ");
Serial.print(touchX);
Serial.print(" ");
Serial.println(0);
Serial.print("Yval: ");
Serial.print(touchY);
Serial.print(" ");
Serial.println(0);
fxTogOn = 1;
fxTogOff = 0;
prevReadTime = readTime;
}
}else{
if (abs(fxTogOn - fxTogOff) > 0){
Serial.print("postTog: ");
Serial.print(0);
Serial.print(" ");
Serial.println(0);
fxTogOff = fxTogOn;
}
}```
```NEW CODE
//NDS_TOUCH
//limit reads to 5ms
TSPoint p = ts.getPoint();
readTime = millis();
// Assign values to readtouchX and readtouchY
readtouchX = p.x;
readtouchY = p.y;
if ((readtouchX < 900) && (readtouchY < 900)) {
if (readTime - prevReadTime > 16) {
if (p.z > ts.pressureThreshhold) {
Serial.print("X = ");
Serial.print(p.x);
Serial.print("\tY = ");
Serial.print(p.y);
Serial.print("\tPressure = ");
Serial.println(p.z);
fxTogOn = 1;
fxTogOff = 0;
prevReadTime = readTime;
}
} else {
if (abs(fxTogOn - fxTogOff) > 0) {
Serial.print("postTog: ");
Serial.print(0);
Serial.print(" ");
Serial.println(0);
fxTogOff = fxTogOn;
}
}
delay(100);
}```
No sound. Failed install?
Neither the PR to support pulseaudio in portaudio https://github.com/PortAudio/portaudio/pull/336 nor the pr to support it in pure-data have been merged
https://github.com/pure-data/pure-data/pull/963
https://github.com/pure-data/pure-data/issues/846
(in light of which, I'm not really sure what the point of using portaudio on linux is)..
I haven't tried to get OSS to work (if it's even installed?) but I have gotten alsa to work by using the -alsa
flag on the command line, provided no other applications are using the sound card. However if I change the sample rate while pd is running audio stops working.
How to make the outlet port "hot area" a bit larger?
@ddw_music said:
Does anyone know offhand where to hack the hot zone size, so that maybe one does not have to have superhuman precision?
searching sources for
mouse
I found in https://github.com/pure-data/pure-data/blob/20334410c20948f14f5c1d8ae5ed992717b83291/tcl/pd-gui.tcl
# mouse cursors for all the different modes
[...]
set ::cursor_editmode_connect "circle"
.
Then searching for
cursor_editmode_connect
I found probably relevant
https://github.com/pure-data/pure-data/blob/c4ae1bd8df436de15c0a80f303ae33b5f3569088/src/g_editor.c
/* look for an outlet */
else if (hitobj && (noutlet = obj_noutlets(hitobj)) &&
ypos >= y2 - (OHEIGHT*x->gl_zoom) + x->gl_zoom)
{
int width = x2 - x1;
int iow = IOWIDTH * x->gl_zoom;
int nout1 = (noutlet > 1 ? noutlet - 1 : 1);
int closest = ((xpos-x1) * (nout1) + width/2)/width;
int hotspot = x1 +
(width - iow) * closest / (nout1);
if (closest < noutlet &&
xpos >= (hotspot - x->gl_zoom) &&
xpos <= hotspot + (iow + x->gl_zoom))
{
if (doit)
{
[...]
/* not in an outlet; select and move */
...Searching the sources for IOWITH
or better OHEIGHT
has this result among others:
https://github.com/pure-data/pure-data/blob/5462d1eae0ad9f139997d56d459c212e797d96be/src/g_canvas.h
* --------------------- geometry ---------------------------- */
#define IOWIDTH 7 /* width of an inlet/outlet in pixels */
#define IHEIGHT 3 /* height of an inlet in pixels */
#define OHEIGHT 3 /* height of an outlet in pixels */
#define IOMIDDLE ((IOWIDTH-1)/2)
#define GLIST_DEFGRAPHWIDTH 200
#define GLIST_DEFGRAPHHEIGHT 140
#define GLIST_DEFCANVASXLOC 0
#ifdef __APPLE__
#define GLIST_DEFCANVASYLOC 22
#else
#define GLIST_DEFCANVASYLOC 50
#endif
.
(Not sure how the apparently different size of inlets and outlets hot area is coded? Inlets appear to be 'magnetic'. )
Wish there was a shortcut to open objects-help.
Could belong here:
https://github.com/pure-data/pure-data/blob/90ad8005199605095e49dbbf1daf4f032211b7f4/tcl/pd_bindings.tcl
Get the size of a large wav file without loading it
in this pr @Spacechild1 says it should be easier to implement the threaded [soundfiler]
if it gets merged (and to write asynchronous externals also)
https://github.com/pure-data/pure-data/pull/1357
it seems like in the current pr for threaded soundfiler https://github.com/pure-data/pure-data/pull/655 it says the open is still done on the main thread, but it seems like it should be on another thread as well since it can need disk access
Feature request for [receive] object
another option is [iem_receive]
from iemlib
.
This feature seems trivial on surface, but it is really not. If implemented naively, it can crash Pd under certain circumstances. For a technical discussion, see https://github.com/pure-data/pure-data/pull/604. Making it safe would require some changes to Pd internals, see https://github.com/pure-data/pure-data/pull/849.
bug: [osc~], [cos~], [circle~] asymmetry drifting out of phase
Several times I've been wondering why multiple [osc~] or [cos~] are drifting apart.
Now, just found it's a bug, that is known since 2015 (!) but didn't see it come up here on the forum yet:
Pd's cosine table has some small DC-offset.
Here is the pull request:
https://github.com/pure-data/pure-data/pull/106
And there the two relevant patches of this topic from the Pd-mailing-list:
demonstration of drift in FM:
test.pd
https://lists.puredata.info/pipermail/pd-list/2015-11/112204.html
workaround with symmetric and bigger cosine array and [tabosc4~]:
fm-fix.pd
https://lists.puredata.info/pipermail/pd-list/2015-11/112244.html
EDIT
And in here is another patch comparing different tables:
https://github.com/pure-data/pure-data/issues/105
This patch should be proper, as the array uses +3 samples for interpolation.
planifolia (0.1) [release]
Hello!
I have just released in github and deken the abstraction pack 'planifolia' (v.0.1).
Planifolia
(from the second name of the orchid 'Vanilla planifolia') is a set of Pure Data abstractions designed to work without any compiled externals.
The abstractions implement a series of useful operations like arbitrary unary and binary operations in lists and arrays, quicksort, logical operators to check equality of arbitrary datatypes, easy OSC formatting/routing, etc. It also comes with toggle-based matrix GUI (designed to work be compatible with iemmatrix
objects) and a matrix based step sequencer with some non usual features (independent tempo, beat and duration patterns, col/row/colrow modes, nice colors, etc).
Some bugs may still be there...
abstractions
abstraction | description |
---|---|
[any.==] |
compares datatypes |
[array.binop] |
binary operations in arrays |
[array.rand] |
random populates an arrays |
[array.unop] |
unary operations in arrays |
[ls.binop] |
binary operations in list |
[ls.butlast] |
list but the last element |
[ls.choose] |
random choose an element of the list |
[ls.getRotate] |
N rotated element of a list |
[ls.group] |
groups elements into a list |
[ls.iter] |
list iteration |
[ls.last] |
last element of the list |
[ls.max] |
greatest element of a list |
[ls.mean] |
mean of the floats in a list |
[ls.min] |
minimum element in a list |
[ls.mode] |
mode of a list |
[ls.quicksort] |
quicksort algorithm implemented as a vanilla abstraction |
[ls.removeAt] |
removes element at index |
[ls.rotate] |
N rotation of a list |
[ls.scramble] |
randomize elements in a list |
[ls.ser.arithm] |
build an artithmetic series list |
[ls.splice] |
replaces element in a list with anothe list |
[ls.unop] |
perform unary operation in elements of a list |
[mtxgui] |
vanilla matrix interface |
[mtxstep] |
vanilla step sequencer with some non usual features |
[slash.oscformat] |
tool to format OSC messages |
[slash.oscroute] |
tool to route OSC messages |
[symbol.==] |
test if two symbols are equal |
[symbol.split] |
splits a symbol according to a char |
Brazilian percussion samples were gently provided by Chico Correa youtube: /c/ChicoCorrea