PD's scheduler, timing, control-rate, audio-rate, block-size, (sub)sample accuracy,
Hello,
this is going to be a long one.
After years of using PD, I am still confused about its' timing and schedueling.
I have collected many snippets from here and there about this topic,
-wich all together are really confusing to me.
*I think it is very important to understand how timing works in detail for low-level programming … *
(For example the number of heavy jittering sequencers in hard and software make me wonder what sequencers are made actually for ? lol )
This is a collection of my findings regarding this topic, a bit messy and with confused questions.
I hope we can shed some light on this.
- a)
The first time, I had issues with the PD-scheduler vs. how I thought my patch should work is described here:
https://forum.pdpatchrepo.info/topic/11615/bang-bug-when-block-1-1-1-bang-on-every-sample
The answers where:
„
[...] it's just that messages actually only process every 64 samples at the least. You can get a bang every sample with [metro 1 1 samp] but it should be noted that most pd message objects only interact with each other at 64-sample boundaries, there are some that use the elapsed logical time to get times in between though (like vsnapshot~)
also this seems like a very inefficient way to do per-sample processing..
https://github.com/sebshader/shadylib http://www.openprocessing.org/user/29118
seb-harmonik.ar posted about a year ago , last edited by seb-harmonik.ar about a year ago
• 1
whale-av
@lacuna An excellent simple explanation from @seb-harmonik.ar.
Chapter 2.5 onwards for more info....... http://puredata.info/docs/manuals/pd/x2.htm
David.
“
There is written: http://puredata.info/docs/manuals/pd/x2.htm
„2.5. scheduling
Pd uses 64-bit floating point numbers to represent time, providing sample accuracy and essentially never overflowing. Time appears to the user in milliseconds.
2.5.1. audio and messages
Audio and message processing are interleaved in Pd. Audio processing is scheduled every 64 samples at Pd's sample rate; at 44100 Hz. this gives a period of 1.45 milliseconds. You may turn DSP computation on and off by sending the "pd" object the messages "dsp 1" and "dsp 0."
In the intervals between, delays might time out or external conditions might arise (incoming MIDI, mouse clicks, or whatnot). These may cause a cascade of depth-first message passing; each such message cascade is completely run out before the next message or DSP tick is computed. Messages are never passed to objects during a DSP tick; the ticks are atomic and parameter changes sent to different objects in any given message cascade take effect simultaneously.
In the middle of a message cascade you may schedule another one at a delay of zero. This delayed cascade happens after the present cascade has finished, but at the same logical time.
2.5.2. computation load
The Pd scheduler maintains a (user-specified) lead on its computations; that is, it tries to keep ahead of real time by a small amount in order to be able to absorb unpredictable, momentary increases in computation time. This is specified using the "audiobuffer" or "frags" command line flags (see getting Pd to run ).
If Pd gets late with respect to real time, gaps (either occasional or frequent) will appear in both the input and output audio streams. On the other hand, disk strewaming objects will work correctly, so that you may use Pd as a batch program with soundfile input and/or output. The "-nogui" and "-send" startup flags are provided to aid in doing this.
Pd's "realtime" computations compete for CPU time with its own GUI, which runs as a separate process. A flow control mechanism will be provided someday to prevent this from causing trouble, but it is in any case wise to avoid having too much drawing going on while Pd is trying to make sound. If a subwindow is closed, Pd suspends sending the GUI update messages for it; but not so for miniaturized windows as of version 0.32. You should really close them when you aren't using them.
2.5.3. determinism
All message cascades that are scheduled (via "delay" and its relatives) to happen before a given audio tick will happen as scheduled regardless of whether Pd as a whole is running on time; in other words, calculation is never reordered for any real-time considerations. This is done in order to make Pd's operation deterministic.
If a message cascade is started by an external event, a time tag is given it. These time tags are guaranteed to be consistent with the times at which timeouts are scheduled and DSP ticks are computed; i.e., time never decreases. (However, either Pd or a hardware driver may lie about the physical time an input arrives; this depends on the operating system.) "Timer" objects which meaure time intervals measure them in terms of the logical time stamps of the message cascades, so that timing a "delay" object always gives exactly the theoretical value. (There is, however, a "realtime" object that measures real time, with nondeterministic results.)
If two message cascades are scheduled for the same logical time, they are carried out in the order they were scheduled.
“
[block~ smaller then 64] doesn't change the interval of message-control-domain-calculation?,
Only the size of the audio-samples calculated at once is decreased?
Is this the reason [block~] should always be … 128 64 32 16 8 4 2 1, nothing inbetween, because else it would mess with the calculation every 64 samples?
How do I know which messages are handeled inbetween smaller blocksizes the 64 and which are not?
How does [vline~] execute?
Does it calculate between sample 64 and 65 a ramp of samples with a delay beforehand, calculated in samples, too - running like a "stupid array" in audio-rate?
While sample 1-64 are running, PD does audio only?
[metro 1 1 samp]
How could I have known that? The helpfile doesn't mention this. EDIT: yes, it does.
(Offtopic: actually the whole forum is full of pd-vocabular-questions)
How is this calculation being done?
But you can „use“ the metro counts every 64 samples only, don't you?
Is the timing of [metro] exact? Will the milliseconds dialed in be on point or jittering with the 64 samples interval?
Even if it is exact the upcoming calculation will happen in that 64 sample frame!?
- b )
There are [phasor~], [vphasor~] and [vphasor2~] … and [vsamphold~]
https://forum.pdpatchrepo.info/topic/10192/vphasor-and-vphasor2-subsample-accurate-phasors
“Ive been getting back into Pd lately and have been messing around with some granular stuff. A few years ago I posted a [vphasor.mmb~] abstraction that made the phase reset of [phasor~] sample-accurate using vanilla objects. Unfortunately, I'm finding that with pitch-synchronous granular synthesis, sample accuracy isn't accurate enough. There's still a little jitter that causes a little bit of noise. So I went ahead and made an external to fix this issue, and I know a lot of people have wanted this so I thought I'd share.
[vphasor~] acts just like [phasor~], except the phase resets with subsample accuracy at the moment the message is sent. I think it's about as accurate as Pd will allow, though I don't pretend to be an expert C programmer or know Pd's api that well. But it seems to be about as accurate as [vline~]. (Actually, I've found that [vline~] starts its ramp a sample early, which is some unexpected behavior.)
[…]
“
- c)
Later I discovered that PD has jittery Midi because it doesn't handle Midi at a higher priority then everything else (GUI, OSC, message-domain ect.)
EDIT:
Tryed roundtrip-midi-messages with -nogui flag:
still some jitter.
Didn't try -nosleep flag yet (see below)
- d)
So I looked into the sources of PD:
scheduler with m_mainloop()
https://github.com/pure-data/pure-data/blob/master/src/m_sched.c
And found this paper
Scheduler explained (in German):
https://iaem.at/kurse/ss19/iaa/pdscheduler.pdf/view
wich explains the interleaving of control and audio domain as in the text of @seb-harmonik.ar with some drawings
plus the distinction between the two (control vs audio / realtime vs logical time / xruns vs burst batch processing).
And the "timestamping objects" listed below.
And the mainloop:
Loop
- messages (var.duration)
- dsp (rel.const.duration)
- sleep
With
[block~ 1 1 1]
calculations in the control-domain are done between every sample? But there is still a 64 sample interval somehow?
Why is [block~ 1 1 1] more expensive? The amount of data is the same!? Is this the overhead which makes the difference? Calling up operations ect.?
Timing-relevant objects
from iemlib:
[...]
iem_blocksize~ blocksize of a window in samples
iem_samplerate~ samplerate of a window in Hertz
------------------ t3~ - time-tagged-trigger --------------------
-- inputmessages allow a sample-accurate access to signalshape --
t3_sig~ time tagged trigger sig~
t3_line~ time tagged trigger line~
--------------- t3 - time-tagged-trigger ---------------------
----------- a time-tag is prepended to each message -----------
----- so these objects allow a sample-accurate access to ------
---------- the signal-objects t3_sig~ and t3_line~ ------------
t3_bpe time tagged trigger break point envelope
t3_delay time tagged trigger delay
t3_metro time tagged trigger metronom
t3_timer time tagged trigger timer
[...]
What are different use-cases of [line~] [vline~] and [t3_line~]?
And of [phasor~] [vphasor~] and [vphasor2~]?
When should I use [block~ 1 1 1] and when shouldn't I?
[line~] starts at block boundaries defined with [block~] and ends in exact timing?
[vline~] starts the line within the block?
and [t3_line~]???? Are they some kind of interrupt? Shortcutting within sheduling???
- c) again)
https://forum.pdpatchrepo.info/topic/1114/smooth-midi-clock-jitter/2
I read this in the html help for Pd:
„
MIDI and sleepgrain
In Linux, if you ask for "pd -midioutdev 1" for instance, you get /dev/midi0 or /dev/midi00 (or even /dev/midi). "-midioutdev 45" would be /dev/midi44. In NT, device number 0 is the "MIDI mapper", which is the default MIDI device you selected from the control panel; counting from one, the device numbers are card numbers as listed by "pd -listdev."
The "sleepgrain" controls how long (in milliseconds) Pd sleeps between periods of computation. This is normally the audio buffer divided by 4, but no less than 0.1 and no more than 5. On most OSes, ingoing and outgoing MIDI is quantized to this value, so if you care about MIDI timing, reduce this to 1 or less.
„
Why is there the „sleep-time“ of PD? For energy-saving??????
This seems to slow down the whole process-chain?
Can I control this with a startup flag or from withing PD? Or only in the sources?
There is a startup-flag for loading a different scheduler, wich is not documented how to use.
- e)
[pd~] helpfile says:
ATTENTION: DSP must be running in this process for the sub-process to run. This is because its clock is slaved to audio I/O it gets from us!
Doesn't [pd~] work within a Camomile plugin!?
How are things scheduled in Camomile? How is the communication with the DAW handled?
- f)
and slightly off-topic:
There is a batch mode:
https://forum.pdpatchrepo.info/topic/11776/sigmund-fiddle-or-helmholtz-faster-than-realtime/9
EDIT:
- g)
I didn't look into it, but there is:
https://grrrr.org/research/software/
clk – Syncable clocking objects for Pure Data and Max
This library implements a number of objects for highly precise and persistently stable timing, e.g. for the control of long-lasting sound installations or other complex time-related processes.
Sorry for the mess!
Could you please help me to sort things a bit? Mabye some real-world examples would help, too.
installing external libraries
hi @whale-av
sorry, i misspelled it. it's adrian moore's book "Sonic Art: an introduction to electroacoustic music composition". Here is the link for the external library: https://www.sheffield.ac.uk/usss/ussstools
i have the 64-bit Pd installed.
thank you for your help!
i have already set the paths and runned the 'find externals' option...
pd-extended included externals on windows
@youaresound Hello.....
I played around a little....
Without your batch file pd.exe runs fine, but with no libraries and this error......
Giving the full path to Pd in the batch file solves this....... but that will not be practical.
The font you selected gives unpleasant rendering on my machine.... I removed it afterwards, but it does work so you can put it back in you wish.....
I then removed the (not useful) path setting.... (it is still shown here).
You will see that "Pd documents directory" is disabled...... probably due to the -noprefs switch.
I added (first switch) -lib libdir to the batch file and now most libraries are added (but none will create), even copying your upload to other folders. I cannot be absolutely certain that windows is not keeping tabs on the changing path though.
With -noprefs -lib ibdir my other installs and portable versions of Pd are not having their prefs and paths overwritten though.
That is very good news.
Here are the libs that are still not loading..... but that is as far as I have gone for now.
Here is the updated batch file that works for me........... (at the bottom)
BUT...... the full path to the library folders needs to be specified for any object to actually create.
Just adding the extra folder does not work.
So in the batch below only cyclone will actually work even though the other object classes have been registered.
You might have ideas about why the iem libraries will not load (I think the executable needs to be specified)..
You can maybe try this new batch file yourself...... and find another tester to double-check....
BUT ANOTHER BUT ...... the path setting will be wrong...... I will try to work out how to get around that. The tcl has path variables that can maybe be set with a tcl plugin.
It is probable that removing the -noprefs switch will solve these problems, but an existing Pd user running your batch file would curse you as they tried to recover their old working Pd........
David.
pd-0.48.1_windows_xp_or_later\bin\pd.exe -path C:\Users\David\Desktop\pd-vanilla_0.48.1_for-windows_with_externals\pd-windows\pd-0.48.1_windows_xp_or_later\extra\cyclone -noprefs -lib libdir -lib cyclone -lib zexy -lib creb -lib cxc -lib iemlib -lib list-abs -lib mapping -lib markex -lib maxlib -lib mjlib -lib motex -lib oscx -lib pddp -lib pdogg -lib pmpd -lib sigpack -lib smlib -lib unauthorized -lib pan -lib hcs -lib jmmmp -lib ext13 -lib ggee -lib iem_anything -lib ekext -lib flatgui -lib chaos -lib zexy/0x260x260x7e -lib zexy/0x2e -lib zexy/0x3c0x7e -lib zexy/0x3d0x3d0x7e -lib zexy/0x3e0x7e -lib zexy/0x7c0x7c0x7e
The ultimate solution is probably to destroy the directory tree...... moving every file into the Pd /bin folder.
Build a MIDI controller with the Arduino, Firmata and Pure Data
Time to start contributing some knowledge back to the wonderful world that is the internet; today, a step by step nice and easy tutorial on getting started to building your own MIDI controllers with the arduino.
When researching for my ableton controller project, I didn’t find much out there about using firmata on an arduino to send data to software. The standard approach just seemed to be create the code in the arduino language, upload it to your board and hack one of those MIDI to USB cables as a bodge job way of getting the MIDI out of the arduino.
So why firmata and pure data? Well the whole idea of firmata is that you flash it to your arduino, and it throws out serial about whats going on with the arduino inputs and outputs, then you decide how the software treats the readings coming in and going out.
Theory out the way, lets build some controllers. You’ll need a few things…
HARDWARE:
An arduino and something to wire into it (for this i’ll be using a pot)
A USB cable for your arduino
SOFTWARE:
Arduino – http://arduino.cc/en/Main/Software
Pure Data – http://puredata.info/downloads
Firmata – http://at.or.at/hans/pd/objects.html#pduino
Something to patch your new controller into; like Reason or Ableton Live
- SETTING UP FIRMATA AND PURE DATA
Install Pure Data and create a folder to store all your patches somewhere. Unzip Firmata and add the files ‘arduino.pd’, ‘arduino-test.pd’ and ‘arduino-help.pd’ to your new Pure Data folder. The ‘arduino.pd’ file is the object that we use in PD for opening up communication with your arduino and routing it to PD. Done? Awesome, your software is almost set up.
- FLASHING FIRMATA TO YOUR ARDUINO
Install the latest version of arduino and open it up. Connect your arduino with the USB cable to your laptop (i’m using a macbook for this by the way). In the example patches, open up “Standard Firmata”, select your board (im using an arduino mega), and your serial port (look for tty.usbserial for use with a USB cable). Then compile and hit the upload button and your arduino is now ready to use firmata and communicate with Pure Data!
- WIRING UP A POT
Potentiometers are cool, and theres a great arduino tutorial of how to wire one up here: http://www.arduino.cc/en/Tutorial/Potentiometer
Basically, all you need to know is that there are three pins; your two outer pins govern voltage flow across the pot, meaning one has to be 5V and the other has to be ground. It doesn’t matter which, but your 5v pin is going to be where your pot reads maximum, so convention dictates this should be the right hand pin. The center pin needs to be connected to an analog in on the arduino and will read the value of the pot as it sweeps from ground (0v) to 5v.
All wired up? Plug it into your laptop and open Pure Data, we’re ready to get things talking.
- SETTING UP OUR PATCH
Open the example “arduino-test.pd” Pure Data patch you copied over earlier. It should look like this one…
The test patch has everything we need to open a connection and enable pins. Firstly, lets delete a bunch of stuff and make our window a bit bigger. Hit Command + E to enter edit mode in Pure Data.
Ok a quick explaination; the key component here is the ‘arduino’ object. This is being drawn from the file you copied in earlier, and is what communicated with your arduino. Here we can do everything to control the arduino from opening a connection, to receiving data.
The large grid allows us to set the mode of each pin on the arduino. Remember pins 0 and 1 are reserved for Rx and Tx. I’m using analog pin 4 for this demo, so I’ve set my pin mode for pin 4 to ‘analog’.
Now we can plug our arduino in and get a reading from the potentiometer.
- ARDUINO INTO PURE DATA
With your arduino plugged in, hit command and E to bring us out of edit mode. In our patch, click on ‘Devices’ above the arduino object and open up the pure data terminal. (That other thing that loads with PD that has all the scary code in)
The “Devices” message connected to the arduino object pings your computer to find what devices are connected and on what serial ports. Since we’re using a USB cable to connect our arduino, we’re looking for something with ‘usbserial’ in it, in this case; port 2.
Select the relevent port in the green box at the top (remember the first box is ‘0’, second is ‘1’ and so forth) and hit ‘Open’ to establish a connection. Check the terminal to see if the connection was sucessful.
Now lets check we’re getting something in. Create a number box (Command + 3) and connect it to the relevent pin on the ‘Route analog’ box at the bottom. In this case, pin 4.
One more thing; if you’re not getting any readings in, you’ll need to click on ‘pd old analog/digital controls’ and enable your pins here too. What I tend to do in my patches is just not include the large grid but make my own ‘old pd’ controls custom to what i’m enabling/disabling to save space.
Here’s what the ‘old analog/digital controls’ subpatch looks like (pin 4 enabled)…
Come out of edit mode and check that you’ve got readings. If so congratulations! If not, troubleshoot, start with making sure your usb connection is opened, make sure all the correct pins are enabled (remember you’re counting from 0 not 1 on most of these buttons in PD, it’s just the way computers work).
- SCALING READINGS TO MIDI
So we’ve got a reading and chances are it’s to 3 decimal places between 0 to 1. No problem, create a new object (Command + 1) and type “autoscale 0 127”. This allows us to scale the input to a min and max value, in this case 0 to 127 of MIDI. Next, lets get things looking nice, create a new object and type “knob”. Connect this AFTER the autoscale object. (the knob is default set to read inputs from 0 to 127. Then create another number to display the scaled MIDI data coming out, and finally a new object and type “ctlout 1”.
It should look something like this…
The second box should be outputing values from 0 – 127 now, and the knob giving a visual representation of your potentiometer.
Now lets patch it into ableton…
- PURE DATA TO ABLETON LIVE
Firstly, you’ll need to set up your macs IAC driver if you’ve not done this. Basically you’ll need to go into Audio/MIDI preferences and enable your IAC driver. Then create a new input and output. One for input to DAW and one for output from DAW. Google around for a tutorial on this, its really simple, a 30 second job.
After you’ve set up your IAC driver, go back to PD and go to preferences > MIDI Settings, and connect your IAC driver.
Open ableton and go to its MIDI preferences. Create a device listing for your IAC driver and enable its ins and outs into ableton like so…
And thats it! Create an instrument and try to assign something! I’ve got it controlling the brightness of a bass sound here.
Shout out for Facu who requested this tutorial. Hopefully it’ll help some of you looking to get into this stuff and start building things but with no idea where to start.
Pd-extended to Vanilla migrations issues. Gui freeze, console errors, etc.
Hello Dxk,
Yours are the exact instructions I tried to follow a few days ago.
As of now, I'm still a whole lot wiser. As far as I've understood, libraries that are contained in a single file are to be added to the "startup" for load at start-up. Libraries consisting of a folder with multiple, separate files should be added to "path".
First off, the Deken manager downloads the libraries to a folder called "extra", not "pd-externals" or something similar. I've got no folder called that. I couldn't access the folder through the "choose folder"-prompt, since I have to access the contents of the Pure Data application, so I had to create a desktop shortcut to which I could easily choose the "extra"-folder when adding paths to "path".
This is what I am greeted with on start-up.
And it just keeps going all the way down. It seems to go through the contents of the libraries, but gives me a failed message. I now see that it looks for the contents of the zexy library in the folder of cyclone and tries to look for the files in neighbouring folders. Why would it do that?
But, say I call up an object I know only exists in an external library, say, cyclone's [cycle~] object, I will get this:
The first few lines show that it's trying to look for the library contents in my main folder (users/marc). I can't see why it would try that. It then tries the paths, fails, but then succeeds.
This is what my "startup" and "path" folders look like, respectively:
And the contents of the "extra" folder:
Thank you, in advance.
RaspberryPi audio cutoff
I have a PD-extended sketch running on a RaspberryPi (RPI) that plays wav's from 32+ tabread4 array's. They can be selected via OSC messages sent over network. I noticed that every so often the audio would cutout. The following is a recording from PD on the RPI. The cutout is heard clearly at 22seconds and 50 to 54 seconds. This happens with both the internal sound card of the RPI and when using a USB soundcard.
For comparison here is a similar graph from running the same sketch on OSX. The waveforms differ because the tabread4 arrays played are a bit random. But the graph shows that the sway from the 0 middle line is much more on the RPi than OSX.
To attempt to resolve I have to be certain the sketch DAC is given a volume of around 0.5. But perhaps someone knows better what is going on and could advise me?
Sketch elements:
form extended to vanilla
Ok, I've followed your instructions. Deken is ok.
Then I installed the first library (zexy/2.2.6svn). Is it the right one?
Then I tried to install Gem and Cyclone, as well. This is how my Pd folder under /User/Library/ looks like.
As you can see, I get error both for cyclone and Gem.
I put this line in the Startup Flag field:
-lib zexy/zexy -lib cyclone/cyclone -lib Gem/Gem
Is it correct?
If I want to use a zexy object like "nop", I have to write zexy/nop inside the object, even if I loaded library on StartUp putting -lib zexy/zexy in the flag field. If I only write "nop" inside the object I get an error.
I'm testing it both in 32 and 64 bit.
Many thanks,
G
having trouble running guitar/mic line into pd
@Wolf-Breath Hello there......
The symptoms that you describe are those of Pd struggling because of incorrect audio settings. It is not your fault, they are not easy to set up initially.
The quickest way to get it working (and you would have the advantage of using the computers other audio connections at the same time, or even multiple asio soundcards) would be to use Asio4all......... http://www.asio4all.com/
I am assuming that you are using windows (FL and reaper)?
(FROM HERE TO........... "END" BELOW SHOULD HELP WITH YOUR CURRENT DRIVER AS WELL!)
Make sure you select ASIO in the Media window first.
Then in your Media/Audiosettings window choose Asio4all (or your asio driver for your Focusrite if you don't want to use Asio4all) as your soundcard and set the channels (number of channels) that you want to use (total including your computer soundcard). Don't worry if you set too many, as Pd will just drop any that don't actually exist.
Set Pd something like this.......
If you have problems then set the samplerate to match your soundcard, the delay higher (try 30 or more for example and then gradually decrease it to reduce the latency) and try a higher block size although that should not be necessary. Ticking the callbacks box allows Pd to communicate better with the soundcard. Then go back to choosing your soundcard again. The setup you see above gives 2ms latency which is excellent. (END)
Now you should have a little green icon for the asio4all driver in your taskbar (if it is red then there are settings to be changed to make it work).
Click that to open asio4all settings and you should see something like this........ If not then click the "spanner"at the bottom right corner.
Choose which inputs and outputs you want to use, and count down the list of active ins and outs making a note of their order in the list (ins and outs separately). They will be numbered [dac~ 1] etc. in the same order in Pd.
Good luck, and come back here if you are still struggling....
You might find that Pd is still struggling because of your old settings. If so then start Pd with no audio from a batch file using the -noaudio flag, before you do the above........ see below.....
David.
If you don't know how to use a batch file then try this before you start setting up your soundcard. It will reset the sound settings so that Pd responds properly again!! http://forum.pdpatchrepo.info/topic/9250/pd-will-not-start
Or make your own like this.....
It will open Pd and load the directory in which the patch Minx_Run.pd can be found, load the readsf~ directory and then turn off audio, turn on asio, turn off midi and load the patch Minx_Run.pd......
Later, when all of your settings are correct you can have different setups depending upon which soundcards you have connected, like this...........
Having trouble accessing multiple analog channels on my soundcard
Hi, another newbie question here.
I have an RME soundcard at my disposal with 6 analog channels (it also has other types but I cant use those)
like this:
When I try to set up 3 output devices like this
I get the error message
separate audio device choice not supported; using sequential devices.
So my mixer ends up looking like this:
Which I guess corresponds to the "sequential devices'. Ofcourse I want AN 1/2 , 3/4 and 5/6. (7/8 is actually just headphones, but just to show how its acting weird)
I CAN however select Speakers (RME Fireface UCX) together with Analog (3+4) and (5+6) and then I get this
which is already a step in the right direction, but I really need all 6 channels.
I googled the error message and came upon this thread from 2003 http://lists.puredata.info/pipermail/pd-list/2003-10/014460.html but that just confused me more. I tried using these commands in the PD console but it's just giving me invalid command name errors.
I'm trying to achieve something along these lines (extremely simplified example)
I tried using ASIO but I can't select multiple devices like on the screenshots above and on top of that the audio it outputs is completely distorted. Very odd. (using MMIO now)
Any help is much appreciated.
.MOV/.MP4 glitcher
Hi,
I have built a pd abstraction that glitches .MOV/.MP4 files. This is the result of a long process that involved the study and understanding of the way .MOV files work and their atom structure. Having learned a lot while developping my jpeg and mp3 glitchers, I have been willing to transpose this knowledge to the video realm. To make a long story short, my abstraction locates the mdat atom of the file, reads its length and glitches it in a user-controlable way, while leaving the rest of the filestructure untouched, allowing various degrees of glitchiness with very few unreadable files.
Of course, the bigger the files, he longer the processing time. I have able to glitch a 250 meg MP4 (40 minutes of video) in a bout 1 minute on a macbook pro running under OS 10.10 with the latest stable version of PD extended. On slower computers, processing may take up to 5/6 minutes. Also note that results will vary according to the codec used for compression. I have been able to get good results with H264, but they should all work. As usual with glitch, results will also vary according to the player you use. I personnaly prefer VLC . Some files may appear broken on some players and play just fine on others... Usually, if a file breaks in the process, just tweak the settings a bit to get less glitched file, it should work eventually. This is particulary thrue with small files.
Here's a bunch of stills I took from one processed video:
Here's the pd extend abstraction:
mp4glitcher.pd
It's a graph on parent abstraction, so the idea is to open it like an object in a blank canvas.
And here's the standalone version for mac:
https://1drv.ms/u/s!AjNgShvVLV0XikkivHwWok_tpbYQ
Your comments are welcome!