ELSE 1.0-0 RC12 with Live Electronics Tutorial Released
Hi, it's been a while, here we go:
RELEASE NOTES:
Hi, it's been almost 8 months without an update and I never took this long!!! So there's a lot of new stuff to cover, because it's not like I've been just sleeping around 
The reason for the delay is that I'm trying to pair up with the release cycles of PlugData and we're having trouble syncing up. PlugData 0.9.0 came out recently after a delay of 6 months and we couldn't really sync and pair up then... we had no luck in syncing for a new update now, so now I'm just releasing it up cause enough is enough, and hopefully in the next plugdata release we can sync and offer the same version.
As usual, the development pace is always quite busy and I'm just arbitrarily wrapping things up in the middle of adding more and more things that will just have to wait.
First, I had promised support for double precision. I made changes so we can build for it, but it's not really working yet when I uploaded to deken and tested it. So, next time?
And now for the biggest announcement: - I'm finally and officially releasing a new pack as a submodule, which is a set of abstractions inspired by EuroRack Modules, so I'm thinking of VCV like things but into the Pd paradigm. Some similar stuff has been made for Pd over the years, most notably and famously "Automatonism", but I'm really proud of what I'm offering. I'm not trying to pretend Pd is a modular rack and I'm taking advantage of being in Pd. I'm naming this submodule "Modular EuroRacks Dancing Along" (💩 M.E.R.D.A 💩) and I've been working on it for a year and a half now (amongst many other things I do). PlugData has been offering this for a while now, by the way. Not really fully in sync though.
MERDA modules are polyphonic, thanks to multichannel connections introduced in Pd 0.54! There are 20 modules so far and some are quite high level. I'm offering a PLAITS module based on the Mutable Instruments version. I have a 6-Op Phase Modulation module. A "Gendyn" module which is pretty cool. I'm also including an "extra" module that is not really quite a modular thing at all but fits well called "brane", which was a vanilla patch I first wrote like 15 years ago and is a cool granular live sampler and harmonizer. You'll also find the basics, like oscillators, filters, ADSR envelope and stuff I'm still working on. Lastly, a cool thing is that it has a nice presets system that still needs more work but is doing the job so far.
There are ideas and plans to add hundreds more MERDA modules, let's see when and if I can. People can collaborate and help me and create modules that follow the template by the way 
Thanks to Tim Schoen, [play.file~] is now a compiled object instead of an abstraction and it supports MP3, FLAC, WAV, AIF, AAC, OGG & OPUS audio file extensions. A new [sfload] object can import these files into arrays (but still needs lots of more work). There are many other player objects in ELSE that can load and play samples but these don't yet support these new formats (hang in there for the next version update).
Tim also worked on new [pdlink] and [pdlink~] objects, which send control and signal data to/from Pd instances, versions and even forks of Pure Data (it's like [send]/[receive] and [send~]/[receive~], all you need is a symbol, no complicated network or OSC configuration!). And yes, it works via UDP between different computers on the same network. And hell yeah, [pdlink~] has multichannel connections support! By the way, you can also communicate to a [pd~] subprocess. This will be part of ELSE and PlugData of course, and will allow easy communication between PlugData and Pd-Vanilla for instance.
The great pd-lib-build system has been replaced for a 'cmake' build process called 'pd.build' by Pierre Guillot. This was supposed to simplify things. Also, the [sfont~] object was a nightmare to build and with several dependencies that was simply hell to manage, now we have a new and much simpler system and NO DEPENDENCIES AT ALL!!! Some very rare file formats with obscure and seldom sound file extensions may not work though... (and I don't care, most and the 'sane' ones will work). The object now also dumps all preset information with a new message and backwards compatibility broke a bit 
I'm now back to offering a modified version of [pdlua] as part of ELSE, which has recently seen major upgrades by Tim to support graphics and signals! This is currently needed in ELSE to provide a new version of [circle] that needed to be rewritten in lua so it'd look the same in PlugData. Ideally I'd hope I could only offer compiled GUI objects, but... things are not ideal 
The lua loader works by just loading the ELSE library, no need for anything "else". I'm not providing the actual [pdlua] and [pdluax] objects as they are not necessary, and this is basically the only modification. Since PlugData provides support for externals in lua, if you load ELSE you can make use of stuff made for PlugData with lua without the need to install [pdlua] in Pd-Vanilla.
For next, we're working on a [lua] object that will allow inline scripting and will also work for audio signals (again, wait for the next version)! Also for the next version, I'm saving Ben Wesch's nice 3d oscilloscope made in lua (it'll be called [scope3d~]). There's a lot going on with the lua development, which is very exciting.
As for more actual new objects I'm including, we have [vcf2~] and [damp.osc~]. The first is a complex one pole resonant filter that provides a damping oscillation for a ringing time you can set, the next is an oscillator based on it. There's also the new [velvet~] object, a cool and multichannel velvet noise generator that you can also adjust to morph into white noise.
I wasn't able to add multichannel capabilities to many existing objects in ELSE in this one, just a couple of them ([cosine~] and [pimp~]). Total number of objects that are multichannel aware now are: 92! This is almost a third of the number of audio objects in ELSE. I think that a bit over half might be a reasonably desired target. More multichannel support for existing objects to come in the next releases.
Total number of objects in the ELSE library is now 551!
As for the Live Electronics tutorial, as usual, there are new examples for new objects, and I made a good revision of the advanced filter section, where I added many examples to better explain how [slop~] works, with equivalent [fexpr~] implementations.
Total number of examples in the Live Electronics Tutorial is now 528!
There are more details of course, and breaking changes as usual, but these are the highlights! For a full changelog, check https://github.com/porres/pd-else/releases/tag/v.1.0-rc12 (or below at this post).
As mentioned, unfortunately, ELSE RC12 is not yet fully merged, paired up and 100% synced in PlugData. PlugData is now at version 0.9.1, reaching the 1.0 version soon. Since ELSE is currently so tightly synced to the development of PlugData, the idea is to finally offer a final 1.0 version of ELSE when PlugData 1.0 is out. Hence, it's getting closer than ever
Hopefully we will have a 100% synced ELSE/PlugData release when 0.9.2 is out (with a RC 13 maybe?).
Please support me on Patreon https://www.patreon.com/porres
You can follow me on instagram as well if you like... I'm always posting Pd development stuff over there https://www.instagram.com/alexandre.torres.porres/
cheers
ps. Binaries for mac/linux/windows are available via deken. I needed help for raspberry pi
CHANGELOG:
LIBRARY:
Breaking changes:
- [oscope~] renamed to [scope~]
- [plaits~] changed inlet order of modulation inputs and some method/flags name. If a MIDI pitch of 0 or less input is given, it becomes a '0hz'.
- [gbman~] changed signal output range, it is now filtered to remove DC and rescaled to a sane -1 to 1 audio range.
- [dust~] and [dust2~] go now up to the sample rate and become white noise (removed restriction that forced actual impulses, that is, no conscutive non zero values)
- [cmul~] object removed (this was only used in the old conv~ abstraction to try and reduce a bit the terrible CPU load)
- [findfile] object removed (use vanilla's [file which] now that it has been updated in Pd 0.55-0)
- [voices] swapped retrig modes 0 and 1, 'voices' renamed to 'n', now it always changes voice number by default as in [poly] (this was already happening unintentionally as a bug when one voice was already taken). The 'split' mode was removed (just use [route], will you?)
- [voices~] was also affected by changes in [voices] of course, such as 'voices' message being renamed to 'n'.
- [sr~]/[nyquist] changed output loading time to 'init' bang
- [sample~] object was significantly redesigned and lots of stuff changed, new messages and flags, added support for 64-bit audio files (Pd 0.55 in double precision and ELSE compiled for 64 bits is required for this). Info outlet now also outputs values for lenght in ms and bit depth.
- [sfont~] uses now a simpler build system and this might not load very very rare and unusual sound formats.
Enhancements/fixes/other changes:
- builds for double precision is now supposedly supported, by the way, the build system was changed from pd-lib-builder to pd.build by Pierre Guillot.
- [play.file~] is now a compiled object instead of an abstraction thanks to Tim Schoen, and it supports MP3, FLAC, WAV, AIF, AAC, OGG & OPUS file extensions.
- Support for double precision compilation was improved and should be working for all objects (not yet providing binaries and fully tested yet by the way).
- The ELSE binary now loads a modified version of [pdlua], but no [pdlua] and [pdluax] objects are provided.
- added signal to 2nd inlet of [rm~].
- fixed 'glide' message for [mono~].
- fixed [voices] consistency check bug in rightmost outlet and other minor bugs, added flags for 'n', 'steal' and offset.
- [gain~] and [gain2~] changed learn/forget shortcut
- [knob] fixed sending messages to 'empty' when it shouldn't, ignore nan/inf, prevent a tcl/tk error if lower and upper values are the same; added "learn/forget" messages and shortcut for a midi learn mechanism.
- [mpe.in] now outputs port number and you can select which port to listen to.
- Other MIDI in objects now deal with port number encoded to channel as native Pd objects. Objects affected are [midi.learn], [midi.in], [note.in], [ctl.in], [bend.in], [pgm.in], [touch.in] and [ptouch.in].
- [pi]/[e] now takes a value name argument.
- [sr~]/[nyquist~] take clicks now and a value name argument.
- fixed phase modulation issues with [impulse~] and [pimp~].
- [cosine~] fixed sync input.
- added multichannel features to [cosine~] and [pimp~].
- [plaits~] added a new 'transp' message and a functionality to allow MIDI input to supersede signal connections (needed for the 'merda' version [see below]), fixed MIDI velocity.
- [pluck~] added a new functionality to allow MIDI input to supersede signal connections (needed for the 'merda' version [see below]).
- 26 new objects, [velvet~], [vcf2~], [damp.osc~], [sfload], [pdlink] and [pdlink~], plus abstractions from a newly included submodule called "Modular Euro Racks Dancing Along" (M.E.R.D.A)! Warning, this is all just very very experimental still, the object are: [adsr.m~], [brane.m~], [chorus.m~], [delay.m~], [drive.m~], [flanger.m~], [gendyn.m~], [lfo.m~], [phaser.m~], [plaits.m~], [plate.rev.m~], [pluck.m~], [pm6.m~], [presets.m], [rm.m~], [seq8.m~], [sig.m~], [vca.m~], [vcf.m~] and [vco.m~] (6 of these are multichannel aware).
Objects count: total of 551 (307 signal objects [92 of which are MC aware] and 244 control objects)!
- 311 coded objects (203 signal objects / 108 control objects
- 240 abstractions (104 signal objects / 136 control objects)
TUTORIAL:
- New examples and revisions to add the new objects, features and breaking changes in ELSE.
- Added a couple of examples for network communication via FUDI and [pdlink]/[pdlink~]
- Section 36-Filters(Advanced) revised, added more examples and details on how [slop~] works.
- Total number of examples is now 528!
Asking for money for things made in Pd
@le26muko said:
My bandmate is pushing me to sell it, and I am trying to explain to him that it does not work like that in this community.
yeah, you know your bandmate doesn't know how open source works 
So, yeah, what you're asking about is really highly frowned upon I would say. Of course you're free to do it, but it's not something people actually do or something that goes in this community.
On the other hand, this is such a MAX thing to think and do, and if you want that I'd really suggest you worked with that. People over there sell externals, patches and MAX is better at making apps that are actually just patches.
What Pd people do is ask for donations. I do have a patreon by the way 
https://patreon.com/porres
I've been doing cool stuff that people really use and find it useful and never thought I could charge for any of that and, of course, I can't live and base all the work that I do with Pd based on how much I make with Patreon, it's not for this that I do what I do... Pd is more about sharing, contributing, doing voluntary work and being "free" (as in speech, not as in beer).
What people that use Pd also do is create an app with libpd or something, do stuff that is based on Pd but it's a standalone thing on its own, and you can sell it in an app store or something...
Check for the license though. Pd's license is permissive, but most etxernals will use GPL, which won't allow you to sell. On the other hand, my stuff has a very permissive license and you can "do whatever the fuck you wanna do" as one of the clauses will say.
All I'd say is, if you make work and you get money and you use my stuff a lot and you like my work and you feel like motivating me, consider donating something via patreon.
I'm not saying that's the case for you exactly, I'm just telling how I stand on all this as to give you an example on the matter.
cheers
Sync Audio with OSC messages
@earlyjp There might well be a better way than the two options that I can think of straight away.
You could play the audio file from disk, and send a bang into [delay] objects as you start playback, with the delays set to trigger the messages at the correct time.
I am not sure how long a [delay] you can create though because of the precision limit of a number size that can be saved in Pd. You might need to use [timer] banged by a [metro]
Or as you say you could load the file into RAM using [soundfiler] and play the track in the array using [phasor~] and trigger the messages as the output of [phasor~] reaches certain values.
Using [phasor~] the sample will loop though.
To play just once you could use [line~] or [vline~]
You would need to catch the values from [phasor~] [line~] or [vline~] using [snapshot~].
[<=] followed by [once] would be a good idea for catching, as catching the exact value would likely be unreliable...... once.pd
The same will be true if you use [timer] as the [metro] will not make [timer] output every value.
Again, number precision for catching the value could be a problem with long audio files.
Help for the second method....... https://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played
The [soundfiler] method will use much more cpu if that is a problem.
If there is a playback object that outputs it's index then use that, but I have not seen one.
David.
Vline plotting
I have a vline going into a cos~ and into a tabwrite~ plottercos ( range -1 +1 ) for plotting . tabwrite~ ramp has a range 0 +1
Upon a few bangs , the cosine is completely out of phase
I tried tbb first into vline , then into tabwrite ~ and vice versa but the issue still remains
You can clearly see in the second window ( vline~ without cos) that vline has a value 0 < upon it's start phase
Weird

ELSE 1.0-0 with Live Electronics Tutorial Release Candidate #9 is out!
Hi! This has gotta be the biggest update ever. geez... there's too much stuff, and I just decided to stop arbitrarily cause there's still lots of stuff to do. Ok, here goes the highlights!
This is the 1st multichannel (MC) aware release of ELSE (so it needs Pd 0.54-0 or later)! There are many many many objects were updated to become MC aware: 42 of them to be exact. There are also many many new objects, and many of them are MC capable, 20 out of 33! Som in total I have 62 objects that deal with MC... that's a good start. More to come later!
Note that 4 of these new ones were just me being lazy and creating new mc oscillators with [clone], I might delete them and just make the original objects MC aware... so basically these new MC objects bring actual new functionalities and many are tools to deal with MC in many ways, like splitting, merging, etc...
With 33 new objects, this is the first release to reach and exceed the mark of 500 externals, what a milestone! (This actually scares me). We now have 509 objects and for the first time ever I have reached the number of examples in the Tutorial, which is also 509 now! But I guess eventually the tutorial will grow larger than the number of externals again...
Since the last release, ELSE comes with an object browser plugin, I have improved it and also included a browser for Vanilla objects. I think it's silly to carry these under ELSE and I hope I can bring this to Vanilla's core. see https://github.com/pure-data/pure-data/pull/1917
A very exciting new object is [sfz~], which is a SFZ player based on 'SFIZZ'. This is more versatile than other externals out there and pretty pretty cool (thanks alex mitchell for the help)!
I have created a rather questionable object called [synth~] which wraps around [clone] and [voices]/[mono], but I think it will be quite interesting to newbies. It loads synth abstractions in a particular template and makes things a bit more convenient. It also allows you to load different abstraction patches with dynamic patching magic.
[plaits~] has been updated to include new 8 synth engines with the latest firmware. Modular people are happy... (thanks amy for doing this)
One cool new object for MC is [voices~], which is a polyphonic voice manager that outputs the different voices in different channels. If you have MC aware oscillators and stuff this allows you to manage polyphonic patches without the need of [clone] at all. This is kinda like VCV works and it opens the door for me to start designing modular inspired abstractions, something I mentioned before and might come next and soon! So much being done, so much to do... What an exciting year for Pd with the incredibly nice MC feature!
There's lots more stuff and details, but I'l just shut up and link to the full changelog here https://github.com/porres/pd-else/releases/tag/v1.0-rc9
You can get ELSE from deken as well. It's up there for macOS, Windows 64 bits, Linux 64 bits and raspberry pi. Please test and tell me if there's something funny.
Cheers!
Chees.
PD audio project on RPi: playback keeps glitching/freezing
@Dizzy-Dizzy Try putting this.......... one.pd just after all the bangs that are sticking.
They will all let just one message pass... and they can all be reset at the same time by sending any message into a [send reset]..... just a temporary measure to see what is going on.......
Maybe you can then verify that it is an audio hang rather than repeat messages from the arduino switches.
If the bang still sticks but audio is good then you have repeat messages.
If the audio still glitches then it is back to other solutions.
It is likely that reducing USB to 1.1 means that you have a lower rate of messages from the arduino switches as they bounce, and so bigger jumps between messages.
As you are not likely to push the same button again within 2 tenths of a second maybe you should lock messages out for 200ms in [button_debounce_time]
What do you have inside that abstraction?
Try replacing [vline~] with [line~] as you are just doing a fade in and out and [line~] is good enough for that.
In fact [line] would be good enough and if it "zips" you can set a finer grain than the 20ms default.
[vline~] is more expensive...... scheduling across block boundaries, and the [vline~] are doing their stuff just as you write and read files.
Replace the audiolab highpass filter with [hip~ 120]....... again, likely to be less expensive.
As a last resort get rid of [realtime] and just use [delay 5000]
But really the patch (if we are seeing it all) is not very heavy so I would put my money on those switches.....
David.
How to make two different processes in Pure Data communicate?
@ddw_music fudi is so simple it makes it really easy to send stuff to pd from other programming environments like a lua or python interpreter. (or even bash for that matter)
you can just pipe text into the pdsend program and viola 
but OSC is probably a good habit to get into using as well
line~ driven audio player
@whale-av said:
@Balwyn Maybe [vline~] and [tabread4~] would improve the precision?
David.
Thanks David! that made all the difference, in fact just changing [line~] to [vline~] did the job with 197MB no problem.
vline-play.pd
Edit:
i also added -maxsize 2e+09 to the read message, something you recommended years ago
BPM tempo wavering
Instead of relying only on [metro]
with it's control rate resolution swing
for a steady clock,
without testing, I'd say
-----LATE EDIT: THE FOLLOWING IS NOT NECESSARY:---------
calculating with the output of
[realtime]
or a sample-counter and [samplerate~]
or [timer]
a message
for [vline~]
should do the trick.
Composing the delay-time-message for [vline~]
by substracting the expected exact time
from the actual time ( at block boundary )
----USING [vline~] WITH ANYTHING (LIKE [metro] JUST WORKS-----
There are many ways to build messages and trigger [vline~] accurately.
Am interested in what you come up with!
Also the time-stamping t3 objects in the iemlib could help!





