Audiolab is now available on deken!
pushed an update to deken (v 0.3).
changes since the last version:
new objects:
pp.fft-freeze~ - a spectral freezer based on I08.pvoc.reverb.pd
pp.ladder~ - a "moog" 4th order ladder filter. I made this on out of curiosity about the "zero delay filter" design. I wouldn't recommend to use it though since we have [bob~] and cpu usage is pretty high! (except if you need a fast modulating resonant hp or bp filter for whatever reason).
pp.echo~ - an "analog" tape delay-ish delay echo effect.
pp.xycurve - draws a xy-bezier curve and reads from it. Useful for all kinds of musical gestures..
Many bugfixes and smaller changes. Be aware that some object might behave a little bit differently to the last version!
Connecting midi device with pd on startup
I use ttymidi and pd. To connect both on startup, you have to create .desktop file on rpi and .sh file
The .desktop file tut: https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all
for the .sh put this code:
#!/bin/bash
ttymidi -s /dev/ttyUSB0 -v &
echo "start pd ptach"
(
sleep 2.5
echo "Connecting MIDI"
aconnect ttymidi:0 "Pure Data:0"
aconnect "Pure Data:1" ttymidi:1
) &
/usr/bin/pd /home/patch/you_folder/your_puredata_file.pd
A patch to transforme patchs into a set of building instruction. (video explanation)
Each time. Each time. Bug fixed. The forum renames the file uploaded that's sure and it would be enough to break the patch. For the lowercase thing, I'm gonna believe you and, to prevent any trouble, write in lowercase. Thank you for telling me.
PELLE8001, even more chaotic music sequencer
Even more chaotic 8-step sequencer.
Each step has square wave oscillator, sine wave oscillator, wav file sampler and noise generator.
Lenght of steps can be controlled, overall and individually, and sequentially muted.
Two square wave oscillators modulate each other and a third one modulates the combined two. Optional random frequency modulation on each one of them with control for range and speed.
Sine wave oscillators can be pure, randomized with control of range and tempo, with up/down sweeps or LFO.
Samplers can be set to start and end of loop, playback speed goes from -200% (reverse playback) to 200%.
Generators and left/stereo/right outputs on each step can be sequenced.
Each step has stereo delay.
Recording to wav files possible.
Enjoy.
Samples:
http://mp3.shitcore.org/PELLE8001, as played by NOISEBOB, 210120.mp3
http://mp3.shitcore.org/PELLE8001, as played by NOISEBOB, 220120.mp3
DOWnLOAD:
PELLE8001.pd
latest version here: http://pd.noiselove.net/PELLE8001-1.7.3.pd
external does not load anymore
maybe I ran a package update at some time....
as stated above, I used a simpler "hello world" code, same issue
here is the code
#include "m_pd.h"
static t_class *helloworld_class;
typedef struct _helloworld {
t_object x_obj;
} t_helloworld;
void helloworld_bang(t_helloworld *x)
{
post("Hello world !!");
}
void *helloworld_new(void)
{
t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);
return (void *)x;
}
void helloworld_setup(void) {
helloworld_class = class_new(gensym("helloworld"),
(t_newmethod)helloworld_new,
0, sizeof(t_helloworld),
CLASS_DEFAULT, 0);
class_addbang(helloworld_class, helloworld_bang);
}
here is the make file
CC= cc
CFLAGS= -std=gnu99 -DPD -DVERSION='"0.0"' -fPIC -O6 -funroll-loops -fomit-frame-pointer -Wall -W -g -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment -Wimplicit-function-declaration -Wint-conversion
INCLUDES= -I/usr/include/pd
LIBS= -lpng -lbcm2835 -lc
CFLAGS2= -rdynamic -shared -fPIC -Wl,-rpath,"\$ORIGIN",--enable-new-dtags
pd-plugin: $(patsubst %.c,build/%.o,$(wildcard *.c))
$(CC) $(CFLAGS2) -o build/main.pd_linux $^ -lc -lpng -lbcm2835
# how to build the .o files from .cpp files for the above rules
build/%.o: %.c
$(info ----------------------------- $< -----------------------------------------------------------------------------------------------)
@if $(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -c $< -o $@ ; then \
echo "COMPILED OK !!" ; \
else echo "ERROR" ; fi
clean:
rm build/*
install:
mkdir -p /usr/lib/puredata/extra/main/
@sudo rm -rf /usr/lib/puredata/extra/main/*.*
@sudo cp build/main.pd_linux /usr/lib/puredata/extra/main/main.pd_linux
$(info /usr/lib/puredata/extra/main/main.pd_linux)
ofelia test grid
@Cuinjune no problem and thanks, i think i can figure that out by myself. i will try.
These are the conway (game of life) rules:
For a space that is 'populated': Each cell with one or no neighbors dies, as if by solitude. Each cell with four or more neighbors dies, as if by overpopulation. Each cell with two or three neighbors survives.
For a space that is 'empty' or 'unpopulated' Each cell with three neighbors becomes populated.
and here i found a very basic example that is easy for me to understand, so i do not need the grid abstraction that i posted above (although it could be useful for further experiments):
function Evolve( cell )
local m = #cell
local cell2 = {}
for i = 1, m do
cell2[i] = {}
for j = 1, m do
cell2[i][j] = cell[i][j]
end
end
for i = 1, m do
for j = 1, m do
local count
if cell2[i][j] == 0 then count = 0 else count = -1 end
for x = -1, 1 do
for y = -1, 1 do
if i+x >= 1 and i+x <= m and j+y >= 1 and j+y <= m and cell2[i+x][j+y] == 1 then count = count + 1 end
end
end
if count < 2 or count > 3 then cell[i][j] = 0 end
if count == 3 then cell[i][j] = 1 end
end
end
return cell
end
https://rosettacode.org/wiki/Conway's_Game_of_Life#Lua
i still think that i need to use a 2 dimensional table like this for conway (like they did in the conway examples that i found too):
mt = {} -- create the matrix
for i=1,N do
mt[i] = {} -- create a new row
for j=1,M do
mt[i][j] = 0
end
end
Reverberation
@weightless said:
@bocanegra https://forum.pdpatchrepo.info/topic/5349/patching-a-good-reverb/6
not from me, but reverbCH~ and reverb282~ from @acreil are by far the best Pd reverbs I've heard.
Thanks for replying. I'll check those out. I'm not big on having to install externals tho. Also, I've been trhotugh the algortithms mentioned in the thread.
I was kinda hoping we could have a discussion about reverberation that will provide techniques for newbs rather than go on about our fave this and that. But maybe I started off wrong by showing of my mutant...
Under all circumstances, here is my experience modelling reverb in short:
While freeverb sucks (sorry), Schoeder is your friend. The trick is to find a way of recycling you allpass series (or even better, nests!) that makes sense to your ears. Dattoro's work is pretty much that. If you look at his "tank" section of his first plate verb emulation, that's what it does, very cleverly so: it creates a simple feedback matrix of phased out echoes bouncing back and forth. My jVerb is in many ways an elaborate Dattoro tank.
Now, you can build reverb tanks in many ways. The jVerb is extremely heavy on CPU (but gaaawd I love the sound). A simple way is having two lines going through a series of N allpass nests and having the two lines feedback into each other like ping pong delay. If you tune the allpass filters right (primes!!!) and add some tiny modulation to delay times you are rid of eigentones or whatever they are called.
I'll make the effort to describe how a Schroeder allpass nest is constructed (no math):
You put three allpass filters in series and give them Z coefficients (that is delay in samples) of dimishing magnitude, following some log rule or another. Schroeder liked to approximate 1/3 for each allpass. MAKING SURE THEY ARE ALL PRIMES!!!
Then you put that chain inside the loop of another allpass filter, and tune it's Z to fit the series in such a way that the outer loop has the highest Z.
A single allpass nest can pass for primitive reverberation with the right tweaking. A handful in series will create a lot of diffusion and sound better (less echo-y). BUT: Make sure every nest has it's unique series of Z values.
Then add low frequency modulators to the Z value (delay time) on each and every allpass loop. Random values are preferable over sinusoids or any other periodical thing. The APN abstractions I used in jVerb have all this built in already.
What's left is to add some pre-delay if you like that, and some bandlimiting somewhere in the feedback loop.
I have a CPU friendly verb following this scheme somewhere. I'll upload it ASAP
Ibeacon to pure data under Raspbian
@60htz Probably the last try for me....... or maybe not..... we will see.
I have messed about a bit in windows, and read a lot more about the differences with Linux.
I am loath to mess about with my RPI as it runs my whole house...... ! Time to buy a spare maybe.
Just a spippet.......line32-36 of the bash script....
if [[ $2 == "-b" ]]; then
echo "$UUID $MAJOR $MINOR $POWER" \ ; | pdsend 9999
else
echo "UUID: $UUID MAJOR: $MAJOR MINOR: $MINOR POWER: $POWER" \ ; | pdsend 9999
fi
and here the whole..... but saved in windows........ sorry.... noob_attempt_no2.sh
In windows it doesn't matter if it is.......
" \ ; |
or
"\; |
((it must have the space before the pipe, but the others between " \ ; make no difference))
Then a question....... looking at your patch.... how does the bash script find the "pdsend" executable?
I would expect you might need to copy it into the same path as your script, or the same path as your patch.
I have to have a copy of pdsend in the folder where the script is running (root for you?).
And then, if it doesn't work........ permissions?
David.
Ibeacon to pure data under Raspbian
@60htz It's great that you are having some success..... but this problem is making my head spin!
I understand that the data is sent into the pipe, and as there is no more data echo sends an EOF.
I don't know whether pdsend then closes, and has to restart for every pass of the "while" loop.
And of course the EOF will be sent after every message, before the loop goes around again.
Sleeping on it might help.... but it is "going over my head"........ https://stackoverflow.com/questions/8410439/how-to-avoid-echo-closing-fifo-named-pipes-funny-behavior-of-unix-fifos
AhHa!..... the answer might be here....https://stackoverflow.com/questions/15617418/pipe-to-executable-without-exiting-eof-in-bash
So maybe......
$ { echo "$UUID;"; cat; } | pdsend ${pdport} ${pdhost}
Although I don't yet know what the initial $ means, or if it is necessary......!
Is it spawning a sub-process....... in which case that is what is required I think.
But a sub-process that sits and listens.... just taking in messages and sending them on.....
I think that is what you had with your first attempt....... but incorrectly implemented.
Can you live with it (the EOF messages) filtering them out with a [route EOF]........?
David.
Ibeacon to pure data under Raspbian
@60htz Maybe the EOF can be fixed by adding the semi-colon....... as Pd expects that......
echo "$UUID;" | pdsend ${pdport} ${pdhost}
although the "while read line do" is a loop, so I would expect a repeating message (you had a repeating error before).
And maybe it even needs the curly brackets to get the value of the variable UUID....... whilst still sending the semi-colon..... but excluding it from the variable name???
echo "${UUID};" | pdsend ${pdport} ${pdhost}
Clutching at straws, but my noob rating is total.
Yes, I am using windows, so bash is weird stuff for me.
After more reading I wonder if
pdsend ${pdport} ${pdhost} <<< "$UUID;"
might work as it should bypass stdin and stdout....... which I am having trouble with....... and which might give "empty" values with echo?
....and maybe give UUID a value in the line above to check whether Ibeacon gave it an empty string...?
UUID="test"
echo "$UUID;" | pdsend ${pdport} ${pdhost}
David.