rtneural pd external
Nice to see this has triggered a discussion. I will be the first to admit that I don't know what this is for. As with most things AI, this is a solution in search of a problem. Here are the examples that I have provided in the repository:
- LSTM/GRU emulation of guitar pedals (this is the same inference engine that is used in Proteus and Aida-X guitar distortion modeling engines - you can even load those models with rtneural~)
- RNN note and rhythm prediction
- Multi-layer perceptron as control (similar to FluidMLPRegressor)
- Mult-layer perceptron as a wavetable oscillator
- GRU sine wave to saw hocus pocus
RNN distortion and RNN time series prediction were, as far as I know, not possible before in pd. They definitely weren't possible in sc, which is where I mostly hang out. Thus, people haven't yet had time to play around with them. And I think people will figure out what to do with them given the time. That is the point of the project: to provide a framework that will work on any network if you train it correctly and save it in the right format. If someone wants to build a WaveNet or AutoEncoder, they can train it in python and now they can run it on real-time audio or as data in pd.
The sine wave to sawtooth example is just there to show a magic trick that is really difficult with traditional dsp (btw - it isn't just a sawtooth, but is a band-limited sawtooth, which opens up far more possibilities). This is where much of the possibility lies - in dsp development. The guitar distortion models are the best example of the possibilities. Lots of development has happened in this arena because it is low hanging fruit that is highly marketable. To be able to contort a signal like these trainings can, with one object, is pretty amazing. What other kinds of distortions are possible? I don't know!
The other thing that could be very useful for people right off the bat is RNN time series prediction, predicting notes and rhythms or whatever. Siri is an LSTM, so we are all familiar with this technology. As far as I know, this kind of inference was not available before in pd.
Last thought - conflating the big tech LLM stuff with small-scale AI technologies is not correct. These are different technologies and different ecosystems. Their data sets, training times, trajectories and uses are completely different. This is a small-scale, open source audio project with no aspirations to take over the world. But hopefully it can open up some new possibilities in music creation and dsp.
Sam
How to create help files?
@jamcultur If your module is called e.g. module.... [module] ... module.pd.... then create the help file and name it .... module-help.pd
It needs to be found when you right-click [module] and select "help"...... so put it in the same folder as [module] or a folder set in the path preferences of Pd, or use [declare] in [module] so that it can be found.
David.
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!
Bytechip Automaton - Combining Automatonism v3.0 + Bytechip equations.
@Boran-Robert said:
Here is a patch that makes a small improvement over the Bytechip music idea.
patch download :
Bytechip Automaton.zipsnapshot :
Sorry to bump this thread 4 years later, but I've made some modifications that I couldn't help but sharing due to how much enjoyment I've gotten out of this. I took the liberty to add some automatic modulations (and then a button to toggle even further modulations). This necessitated editing the VC-counter module to output a bang. Auto start (makes a neat noise if you do), and some other touches with comments. I hope you don't mind if I use this this for some a PD recording I'd like to release as a track to Bandcamp (attribution share alike)
main.pd Bytechip Automaton.zip
Edit: I noticed a clicking noise - for some reason the LFO was defaulting to a heckin saw wave even after clicking the checkbox and saving it in the gui. I went in to the save state.txt and now the LFO is modulating the crossfader WITHOUT clicking. Sorry if you loaded the clicky version, it sounds better now.
Plugdata: Brutalist-minimalist SOLVED: How can one do "ratio approximation" - fraction from decimal-number?
Hi,
how can one do ratio approximation -- fraction from number? (need it for - well tempered - scale, that should also be used on time and modulation).
Some starting patch would be great, cause I did not find anything on web.
It was once provided by Omar Misa on FB, but it got deleted.. it was small patch using prepend and based on simple logic, that u consequently setting numerator w 1-9 denominator, until it match/ is close .. cool was, that u can also set/ show deviation.. and ultimately set what deviation is acceptable or set it some categories..
Imo for musical purposes, u often don't need complex object/ object-patch/ open object (that is hard to follow without Ph.D. or having Pd as almost only instrument and not just one of sometimes over hundred plugins), but rather a simpler patch w/ explanation of logic behind it/ context (like on U-he, D16groups manuals).. so u can alter it to suit your needs.
Just my opinion.
..................................
As a tribute to Omar I've shared patch - in patch section - using his interpolation technique and update it for 3 values.
Happy patching.
Edit: Ok, I am digging to it from scratch - I am now sure, that it will be one of the least eloquent patch on the planet heavily relying on brute force....
EDIT: As I ve said *- least eloquent patch is done..CounterFin.pd
Patch simply rise denominator,. When its fraction ratio is below numeric ratio, it increases numerator +1 and start rising denom. from 1 again...
Increment/Decrements - allow set +/- 1 manually in different part, giving some overview for ratios - specily those that are close by, helping build your scale or its function(s), can serve as modulation etc.
It allows also easy set of deviation parameters, cause chances to find clear fraction from large ratio are pretty slim,
warble tones considered harmful?
I admit to some ignorance here.
Beating is the result of producing sine waves at near frequencies. It's the same as amplitude modulation: mixing two sine waves at 1000 and 1100 Hz has the same spectrum as a sine wave at 1050 Hz times a sine at 50 Hz. The amplitude is beating at 100 Hz, but, conspicuously, 100 Hz is absent from the FFT. If sub frequencies aren't seen in the Fourier transform, then they just aren't there -- there is no energy present in that range.
You could do 1000 Hz * 996 Hz and this would produce 4 Hz + 1996 Hz... but this won't sound like a warble. One of the sines is too low to be audible; the other will be steady at a much higher frequency.
Also that conflicts with the definition: "A tone whose frequency varies periodically several times per second over a small range" -- slow FM likewise doesn't produce sub-audio frequencies. Even with the modulator at, say, 30 Hz -- to get sidebands extending down to 4 Hz would require a very high modulation index.
So a speaker-destroying warble tone is not simple beating / amplitude modulation, and it isn't simple frequency modulation at a slow rate.
The only technical specifications of a warble tone that I can find are circuit diagrams, but I'm afraid I'm quite unfamiliar with those.
So at present, I've been unable to find any digital technique that warbles and produces massive low-frequency energy. It seems there's a legit thing here but surprisingly I'm finding it hard even to find BS online. There's just... no technical detail at all, not even wrong tech.
hjh
Why doesn't pure data allow other audio and video applications to run in parallel in Linux?
@ddw_music
I made some changes in qjacktctl and now it works!
Bellow are my steps to achieve this:
- Install pulseaudio-module-jack: aptitude install pulseaudio-module-jack
- add to "/etc/pulse/default.pa" the following text: "load-module module-jack-sink
load-module module-jack-source" - Put Pure Data and QjackCTL with this setup -->
photo
Now, you can use Pure Data and other music and videos applications, like YouTube, Twitch or VCL.
select with multiple outputs
Not perse an issue
A select module nr of outputs is defined by the nr of arguments , it's a pity we can't change the argument of select modules as long as it respects the nr of outputs
Screenshot shows 4 single select modules , when unpacking a list we can change the argument of each select module individually
When the select module has 1> argument we can't do that anymore
GRM plug-in called “Shuffling” for the granulation for Max in Pd?
@raynovich said:
And yeah, I kind of want to know more how it works. . .
Hm, well, let me propose an analogy. Analog synthesis is fairly standard: bandlimited waveforms, there are x number of ways to generate those, y number of filter implementations etc. But many of the oscillators and filters in, say, VCV Rack have a distinctive sound, because of the specific analog-emulation techniques and nonlinearities used per module. You can understand analog synthesis but that isn't enough to emulate a specific Rack module in Pd.
Re: Shuffling, I finally found this one sentence description: "Shuffling takes random sample fragments of variable dimensions from the last three seconds of the incoming sound and modulates its playback density and pitch" -- that's a granular delay.
A granular delay is fairly straightforward to implement in Pd: [delwrite~] is the grain source. Each grain is generated from [delread4~] where you can randomly choose the delay time, or sweep the delay time linearly to change the pitch. That will take care of "random sample fragments," "last three seconds," and "modulates... pitch" (you modulates playback density by controlling the rate at which grains are produced vs the duration of each grain -- normally I set an overlap parameter and grains-per-second, so that grain dur = overlap / grain_freq).
"... of variable dimensions" doesn't provide any useful technical detail.
But what isn't covered in the overview description of a granular delay is the precise connection between the Shuffling plug-in parameters and the audio processing. Since GRM Tools are closed-source, you would have to get hold of the plug-in and do a lot of tests (but if you have the plug-in, then just [vstplugin~] and done), or guess and you would end up with an effect that's somewhat like Shuffling, but maybe not exactly what the composer specified.
I'll send a grain-delay template a bit later, hang on.
hjh
Wet-Dry Mix In Amplitude Modulation
Bit o' algebra:
sig * (mod * 0.5 + 0.5)
= 0.5 * sig * mod + 0.5 * sig
Multiplying your signal by a unipolar sine produces a half-and-half mix between the modulated and unmodulated signals.
I think this will translate to any modulator that is not centered around 0. Any DC offset in the modulator will allow the original signal to leak through.
So you will have to use a bipolar modulator. You could halve the modulator frequency.
I don't understand, though, what "sloppy" means...?
hjh