Puredata! (thread)


#252

I don’t know…I’ve been pulled away by work several times…but I’m not sure that second vst~ link is any better. I’m having a heck of a time finding a OSX compatible download of anything. I’m sure it’s a couple more searches away…but…it’s not immediately findable. There’s also no vst-anythings in deken. :frowning:


#253

Turns out computer musicians doing R&D is a small community. Who knew!

The source code to Thomas Grill’s [vst~] external is 11 years old. In those 11 years, the VST interface has gone through a major point release upgrade. The [vst~] codebase on Github needs an upgrade since Steinberg does not distribute the 2.3 version of their SDK today. Though the README mentions “AAX, AU and VST 2 wrappers” whatever that means.

The good news is Flext built first try on my computer so it’s literally only a VST interface issue.


#254

Dang, I would be very interested in a concerted effort to make [vst~] work again. I haven’t worked with any of the steinberg apis before but it seems like something that would be fun to try and fix.


#255

I (belatedly) realised late last night faust & pd make for a killer combo… I’d somehow never fired up the faust2puredata script (despite venturing pretty deep down the rabbit hole with both pd externals & faust).

In stark contrast to first exposure to faust over a year ago (courtesy of @test2 via the aleph), working back through the faust API & examples yesterday was more ‘kid in sweetshop’ than ‘drowning in horrifying music DSP nonsense’. Currently fiddling with a polyphonic karplus-strong thing - fun, fun, fun!


#256

hey, does anyone have a Makefile for compiling a standalone external handy?


#257

had success with pd-lib-builder on linux x86-64. Started all my pd externals from this skeleton pilfered from some tutorial pd_external.tar (5.1 KB) (requires pd-lib-builder repo installed in …/pd-lib-builder)


#258

[ed] actually not sure if this is what you want, but for a PD audio external (not “standalone”?),

simple template for linux:

let’s see, for mac/win need some different link flags, here’s something i used once, ymmv

#--- linux
LINUXCFLAGS = -g -msse -DPD -O3 -funroll-loops -fomit-frame-pointer -fcheck-new \
    -Wall -W -Wshadow \
    -Wno-unused -Wno-parentheses -Wno-switch \
	-fvisibility=hidden -fPIC \
	-ffunction-sections -fdata-sections

LINUXLDFLAGS = -fPIC -shared -static \
	-Wl,-export-dynamic \
	-nostartfiles -nodefaultlibs -nostdlib \
	-Wl,--gc-sections

LINUXINCLUDE =  -I$(SRC_DIR)


#--- mac
DARWINCFLAGS = -DPD -O3 -Wall -W -Wshadow \
	-Wno-unused -Wno-parentheses -Wno-switch \
	-fcheck-new -fvisibility=hidden

DARWINLDFLAGS = -bundle -undefined suppress -flat_namespace

DARWININCLUDE = -I./include  -I../src	

#--- windows
WINCFLAGS = -msse -DPD -DMSW -Werror -Wno-unused -mms-bitfields\
	-Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer\
	-fno-strict-aliasing -fcheck-new

WINLDFLAGS = -static-libgcc -static-libstdc++ --export-dynamic -shared

WININCLUDE =  -I ./include

ifeq ($(EXTENSION),pd_linux)
    INCLUDE = $(LINUXINCLUDE)
    CFLAGS = $(LINUXCFLAGS)
    LDFLAGS = $(LINUXLDFLAGS)
else
    ifeq ($(EXTENSION),pd_darwin)
	INCLUDE = $(DARWININCLUDE)
        CFLAGS = $(DARWINCFLAGS)
        LDFLAGS = $(DARWINLDFLAGS)
    endif
endif

#259

Rabbit holes? Here’s another one for you: The Pure Programming Language.

Pure integrates well with Pd: https://github.com/agraef/pure-lang/tree/master/pd-pure.

It’s really cool, create control objects such as [pure (+5)] (currying!), or audio objects ie. [pure~ map (*2)]. See docs.

It even has a dynamic Faust DSP environment that, in some way, dynamically compiles faust dsps in Pd: https://github.com/agraef/pure-lang/tree/master/pd-faust

I have toyed around (wasted many hours) with pd-pure but never checked out pd-faust.


#260

Pd is so much fun! loadbang is so informative when getting into dsp.

Puredata Generative Patch


#261

It has come to my attention that the VST 3.x API is drastically different and not backwards compatible. Since I don’t know the VST 2.3 API which the existing code targets or the VST 3.0 API, this might not be the best use of my time at the moment.


#262

thanks! cribbing from this worked for me.


#263

Just started going down the path if “what does it take to write an external” and found http://pdstatic.iem.at/externals-HOWTO/pd-externals-HOWTO.pdf which I haven’t been able to try and compile yet but seems like a pretty thorough intro if the interface for creating an external hasn’t changed since its publication.


#264

I’ve been following this too. It’s OK. It doesn’t really help with compilation, and there are some bugs in the source :confused:


#265

THREADJACK!

So I fell down a hole of building modular synth stuff in PD after finishing a DIY Illucia controller. After assembling and playing a “minimoog” style monophonic setup (VCO => VCF => ADSR => VCA with a LFO on the side), I made it to the sequencers section of the FLOSS manual.

This seems to be where shit gets real. The tutorial was cool but then my nerd brain was like “what if I clocked the sequencer at A U D I O :sparkles: R A T E?”

So I did and it works but the results seems mostly the same. The [threshold~ ] object has a high, low and debounce. The debounce seems to be the bottleneck for how fast I can drive it. A [metro 1] object seems plenty fast. Anyone have advice on cool side effects from driving a step sequencer at audio rate?


#266

I haven’t done so in software, but in the hardware realm it turns the sequencer into a sort of oscillator. The waveform, and hence sound of which is defined, by the values each step of the sequencer has. You can get some interesting effects changing the number of stages in a loop as well.


#267

Puredata is a software environment but I imagine the effects are the same. Here’s my back of the envelope math

[metro 1] => send bang every 1 millisecond == 1000 cycles per second maximum resolution

[threshold~ 1 1 0 1] => send bang when signal input is greater than 1, reset when signal is less than zero, wait one millisecond before allowing a state transition (debounce).

Given the debounce resolution, it seems like if I drive [threshold~ ] with a [phasor~ ] the max frequency which will transition is 1000, which is the same as the non-audiorate sequencer.

I feel like I’m missing something. Perhaps [threshold~ ] is the wrong piece?


#268

aliasing lol (well i guess a lot of HW sequencers are digital, so… .jitter vs aliasing maybe)

i don’t know specifically about threshold~. but in general you can’t “send bangs at audio rate.” bangs are messages. so that’s the basic bottleneck.

i havn’t looked at pd source in a while so forget exactly how the message queue is implemented, but i think the tick period is 1ms. threshold~ or whatever is just adding a bang to the message queue whenever it deems appropriate.


#269

I haven’t read the source either but 1ms tick rate seems reasonable. Even then a 16 step sequencer in 4/4 time could be driven to 15000 beats per minute, which seems pretty fast :slight_smile:

So what’s the magic with hardware sequencers that can be driven at audio rate? Does there exist a non-digital sequencer? My intuition says that would be difficult to pull off.

I may have been misled through google searches with assertions like “audio rate sequencers are rock solid”


#270

yeah, finding the same— been trying to get a hello world thing compiled for windows (personal challenge… i realize i would have a much easier time using a diff OS). haven’t gotten super far along unfortunately.


#271

image

you can make one of these with the stuff in your shop. its a buchla 246 from the 70’s and it’s an analog sequencer that can be driven with an arbitrary phasor or pulse train. honestly, i don’t pay real close attention to the thousands of products in eurorack-land, but if there isn’t at least one analog sequencer then something is really fucked over there.

no “magic”, you just don’t have to worry (much) about bandlimiting in analog. arbitrary waveforms in digital have intrinsic problems. nice digital wavetable synths with arbitrary waveform editing always do tricks. the classic trick is to take an FFT of the arbitrary wavform, brickwall, IFFT.

this is getting pretty OT sorry.