Sending audio from VCV Rack to Pure Data with Internal Routing
@NegativeOne It depends on your OS...... but the principle is the same.
Something needs to sit in the middle, with an input that the output of the rack can connect to, and an output that an input of Pd can connect to.
In windows you can use https://vb-audio.com/Cable/
For a Mac I am not so sure nowadays...... but probably still https://soundflower.en.softonic.com/mac
.... others are Jack and Audio Hijack (at least.... and which is best or easiest?...... no idea).
For Linux maybe Pavucontrol......... https://askubuntu.com/questions/602593/whats-a-good-soundflower-replacement-for-ubuntu
David.

I made the Emscripten filesystem work for Open Frameworks and now it is possible to load for example audio files with [soundfiler] into the browser...
Here is an example. Ironically it is without PD but for loading images with the OF filesystem (but I tested with PD). Audio and video are loaded as urls and played with java script: https://import.handmadeproductions.de/
It is also possible to route the audio from the audio/video player to ofxPd or load a local PD patch.
Edit:
Here is an example with soundfiler: https://soundfiler.handmadeproductions.de/
One disadvantage in comparison to https://audioplayer.handmadeproductions.de/ is, that it only loads .wav and .aiff while the other player also accepts mp3 and other formats (because its decoded to pcm in java script and send directly into a Pure Data array).
soundfiler issue
@raynovich Here's an alternative to soundfiler that spreads the file loading over several audio ticks. I don't think you can resize the array without there being hiccups though. soundfiler alternative.pd

Edit: better to use [metro 1.45125] to keep it block-aligned
soundfiler issue
Hey,
Do others have issues with audio playback when using soundfiler? I am using it in a fairly complicated patch to resize an audio file that I play 4x slower than the original file for a better version of granular synthesis. When I send the file to soundfiler to resize the audio file in a file that can be played using tabread4~ I get a glitch in the audio playback. This is after I start to add additional operations to my patch.
The patch is messy with lots of objects I have created. Mainly though, the audio playback is disrupted by sending a file to soundfiler to resize a location that has sound. I was thinking that I might be able to do this some other more elegant way. But am, slightly annoyed, that soundfiler seems to create issues.
Any thoughts?
Getting the sample length of an audio (wav) file, without using [soundfiler] – vanilla solutions?
If you work with huge arrays or at a high write speed, use [array define] rather than visual arrays, it's much faster.
I am wondering why, if using [soundfiler~] without a specified array, it still causes dropouts with long files? It seems to not read the header only.
[soundfile_info} or [shell] really might be better. You can rely on iemlib for sure! Even on an ARM.
In this patch, [soundfiler~] is running as [pd~] subprocess. On a different thread If you have multithreading CPU.: it looks highly inefficient!
pd~soundfiler.zip
Be aware that the size is rounded at high sample-counts.
edit: still dropouts on much larger files
( edit much later: since pd version 0.52 there is the [file size] object )
(...edit: conversation goes on: https://forum.pdpatchrepo.info/topic/13988/get-the-size-of-a-large-wav-file-without-loading-it )
send audio from Pd to Reaper
@jameslo said:
@cfry Soundflower has attenuators....check that they are all the way up in Audio MIDI Setup.
I was gonna say this with no knowledge of reaper nor soundflower whatsoever: There is a very high likelyhood that there are adjustable gain stages between pd -> soundflower -> reaper. Don't try to make up for it in PD
Querying whether an array exists or not
you'd be amazed how creative they can be at messing it up
In fairness to your students, due to a historical accident soundfiler's interface is poor. You get a bunch of anonymous values in a single message out the right inlet, and a single value out of the left inlet. For the right outlet it's the user's job to remember the map of attributes to positional arguments and then parse the message to get the positional arguments they care about.
Nobody would ever design the interface that way on purpose. You'd simply send an object to the outlet, like this:
[soundfiler]
|
[get samples type rate etc.]
Now the data would be self-documenting and automatically routed to the appropriate outlet of [get]. (Ignoring for the moment that args and outlets don't line up on objects like [route] and [get].) Also, the interface would be backwards-compatible since adding a new key/value pair doesn't break anything.
However, there would still two problems doing it this way. First, [get] also suffers from an annoying historical accident-- it's first arg is the name of the struct. So you have to add an annoying "-" to stand in for null: [get - samples type rate etc.]
Second, the interface in C for dealing with dictionaries in Pd is even worse than the output interface of [soundfiler]. You can't simply call a function to map a few names to argv data. AFAICT you'd have to define a template, instantiate a scalar, and then manually populate the scalar with the data you want to map. That's too much work just to put names to data, so nobody does it.
There are enough of these problems in the core that when I find myself getting tired of programming in Pd, I'm usually in the middle of doing something low-effort or trivial, like grabbing a value from the middle of a list, or preparing a value downstream for a conditional test. In Javascript or C, I almost always stop due to a mental model of an algorithm not being fully fleshed out, or faulty. (Well, with js there's also stopping due to DOM complexity/edge cases which can be annoying.)
Edit: clarification
Changing pitch of sample using [soundfiler] with [tabplay~]
Hello
So I have run into a crossroads I'm not sure how to proceed. In this thread I included 2 versions of my abstraction. The first works 100%
The problems I am having showed its face when I decided to add pitch control to the mixer track which is the second version
of the abstraction.
Version 1 - OBSampleMixerV1.pd - This version works but without pitch control.
Version 2 - OBSampleMixerV2.pd - With pitch control additions to [soundfiler] using phasor and tabread4~
Note* the first version still exists inside V2 I reverted back for testing and disconnected the signal from tabread4~ on purpose,
I should first explain that this abstraction is one single track in the mixer. The track is cloned 16 times with the control of 4 banks giving and total of 64 tracks the patch is title "OverBlast" featuring a 16 step sampler sequencer.
I seam to run into issues with tabplay~ and tabread4~ in the first version no more is need after [soundfiler] so all sounds are played all the way through 100% of the time when the sequencer is playing. But since I need pitch control for each track I had to modify the abstraction to allow it.
Now my question is how would I go about incorporating this new addition to [tabplay~] instead of using [phasor] after [soundfiler] then [tabread4~] so on and so forth or is that even possible? basically I need to use [soundfiler] with [tabplay~] somehow. In the new version the playing of sounds is very inconsistent and often are not triggered at all aside from extra steps to find the end of the sample to stop playing the ect.
Warning this abstraction is not for the faint of heart. It applies some advanced audio concepts borrowed from a very old puredata tutorial. I heavily modified this tutorial to suit my needs.
PURE DATA: 22 Advanced Audio with [tabread4~]
By: cheetomoskeeto
I myself have been coding with puredata for about a year. So its not the cleanest but I have tried to keep it as neat as possible.
Any advice is much appreciated. Thank you in advance. 
Audiolab is now available on deken!
my "audiolab" abstraction library is now available on deken. You'll need Pd-0.50 or later to run this.
Please report any bugs on github: https://github.com/solipd/AudioLab
here is a picture to draw you in (:

Edit:
list of objects:
Soundfle processing
pp.sfplayer~ ... variable-speed soundfile player
pp.grainer~ ... granular sampler
pp.fft-stretch~ ... pvoc time stretching & pitch shifting
Spatialization
pp.pan~ ... constant power stereo panning
pp.midside~ ... mid-side panning
pp. spat8~ ... 8-channel distance based amplitude panning
pp.doppler~ ... doppler effect, damping & amplitude modulation
pp.dopplerxy~ ... xy doppler effect
Effects
pp.freqshift~ ... ssb frequency shifter
pp.pitchshift~ ... pitch shifter
pp.eqfilter~ ... eq-filter (lowpass, highpass, resonant, bandpass, notch, peaking, lowshelf, highshelf or allpass)
pp.vcfilter~ ... signal controlled filter (lowpass, highpass, resonant)
pp.clop~ ... experimental comb-lop-filter
pp.ladder~ ... moogish filter
pp.dynamics~ ... compressor / expander
pp.env~ ... simple envelope follower
pp.graindelay~ ... granular delay
pp.rev~ ... fdn-reverberator based on rev3~
pp.twisted-delays~ ... multipurpose twisted delay-thing
pp.shepphaser~ ... shepard tone-like phaser effect
pp.echo~ ... "analog" delay
Spectral processing
pp.fft-block~ ... audio block delay
pp.fft-split~ ... spectral splitter
pp.fft-gate~ ... spectral gate
pp.fft-pitchshift~ ... pvoc based pitchshifter
pp.fft-timbre~ ... spectral bin-reordering
pp.fft-partconv~ ... partitioned low latency convolution
pp.fft-freeze~ ... spectral freezer
Misc.
pp.in~ .... mic. input
pp.out~ ... stereo output & soundfile recorder
pp.out-8~ ... 8 channel output & soundfile recorder
pp.sdel~ ... samplewise delay
pp.lfnoise~ ... low frequency noise generator
pp.spectrum~ ... spectrum analyser
pp.xycurve
Playback self recorded file in table
Hello everybody!
I am working on a patch that plays back the content of an array or of a table 8 times, but in different pitch or speed.
There are no soundfiles included, I just record to a table via tabwrite~ and then I try to read it out via tabread4~ - the next recording will override the previous one. I combined the tabread4~ object with a phasor~ to read out the table, because this worked at least when I worked with soundfiles from my hard drive (read -resize bla.wav for example). But is it also possible to read out the audio signal in a table and make it audible via dac~ when it is not a specific soundfile? Otherwise, how can it be done? I'm really stuck here and appreciate any kind of advise and help! 





