ELSE 1.0-0 RC13 with Live Electronics Tutorial Released
Ok, the cat is out of the bag --> https://github.com/porres/pd-else/releases/tag/1.0-rc13 I'm officialy announcing the update and uploaded binaries to deken for mac (intel/arm), Win and Linux. It all looks ok but tell me if you see something funny please. There's also a raspberry pi binary but not working 100%yet and we'll still look into that. Hopefully someone could help me/us with it. I might make another upload just for the pi later on if/when we figure it out. Find release notes and changelog below.
RELEASE NOTES:
Please support me on Patreon https://www.patreon.com/porres I'll now try to add special content for subscribers. 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/
It's been a little bit over 7 months since the last update and I almost broke the record for taking too long to release an update (which had happened in my previous update). So yeah, there's just too much to talk about! I guess the delays in releasing updates is because it's been a little tricky and hard to sync the release cycles of ELSE with PlugData, which includes ELSE in its download.
Plugdata 0.9.2 should come out soon with ELSE RC13 and it's supposedly the last update before 1.0.0, so I've heard. And the plans was to get to that still in 2025! This means ELSE could be at its last "Release Candidate" phase as I'm aiming to sync the final release with PlugData. Until then, I'll still make breaking changes and I can't wait until I can't do that anymore as I really feel bad. On the other hand, it's kind of inevitable when I'm always adding new stuff and redesigning and reconfiguring objects to include more functionalities. And I always got a lot of new stuff! So I'm thinking that I will eventually try some mechanism like Pd's compatibility flag or something. I'll try to come up with something like that in the next update.
This update has 22 new objects for a total of 573 and 26 new examples in my tutorial for a total of 554 examples. Let's dive into the highlights (see full changelog below after the release notes).
-
Multichannel Support: Last release had 92 MC aware objects, now it's 139! Over a 50% increase that include old and new objects (all the new ones have been coming with MC support). Virtually all oscillators and envelope generators now have MC support, plus some other random ones. Let me highlight the new [lace~]/[delace~] objects that are 'MC' tools that perform interleave/deinterleave in Multichannel connections. My bare minimum number of objects "to start with" would be at least a bit over half the number of signal objects. That was my target for 1.0! ELSE right now has 319 signal objects, so that'd be at least 160. I will definitely pass this milestone in the next update. I guess a good number of MC objects would be around 75% of the signal objects. I will aim for that as soon as I can. Some objects simply can't be MC at all, so 100% will never be the case, but maybe an ideal 90% eventually? We'll see... I am just proud and happy that ELSE is taking such a big jump on MC awareness in less than a couple years.
-
Envelope generators ([adsr~]/[asr~]/[envgen~]/[function~]) now have more curve options. For [adsr~]/[asr~] the default is now a new log curve that you can set the curve parameter (and was 'stolen' from SuperCollider). A new [smooth~] family of objects perform the same kind of curved smoothening for alternating inputs - [envgen~] and [function~] also have that but also '1-pole' filtering, 'sine' and 'hann' curves. You can now trigger [adsr~] and [asr~] with impulses.
-
The [play.file~] object now supports even more file formats besides MP3 and stuff. Hey, you can even stream the supported formats from weblinks! The [sfload] object (which loads files into arrays) also gained support for more formats and can download from weblinks as well! It also has a new threaded mode, so loading big files won't choke Pd. It now also outputs the file information, which is a way to tell you when loading finished in threaded mode. The [sample~], [player~], [gran.player~] and [pvoc.player~] objects are now also based on [sfload], so they support all these file formats!!! Now [sample~] and [tabplayer~] are integrated in a way that [tabplayer~] is always aware of the sample rate of the file loaded in [sample~] (so it reads in the "correct speed"). A new [sfinfo] object is able to extract looping regions and instrument metadata information from AIFF files (which is something I wanted for ages) - it should do more stuff in the future.
-
[knob] has become the ultimate featured bloated creep GUI I always feared and avoided. MAX is envy! but I'm happy with this structure and I want to replicate in other GUIs in the future (yeah, I got plans to offer alternatives to all iemguis). I wanna highlight a new 'param' symbol I added that allows you to remotely set a particular method in an object, so you don't to connect to a "method $1" message and you can even do this wirelessly with a send symbol. [knob] now also acts like a number box, where you can type in the value, which may also be displayed in different ways or the value can be sent elsewhere via another send symbol so you can temper with it using [makefilename] or [else/format]. I've been using this for the MERDA modules and it's really cool.
-
We finally have a [popmenu] GUI object! This was in my to do list forever and was crucial to improve the MERDA modules to set waveforms, instruments and whatnot.
-
Let's about MERDA, the "Modular Euroracks Dancing Along" subset of abstractions in ELSE. It was first released in the last update and it's been driving lots of the development in ELSE as you can see. I now added a MIDI Learn feature for all knobs that feels great and quite handy! There are many fixes and improvements in general and some new modules. I wanna highlight the new [sfont.m~] module, which loads "sound font" banks and you can just click on a [popmenu] to choose the instrument you want. The default bank has numerous (hundreds) options and also comes with PlugData. The sequencer module [seq8.m~] was rather worthless but it's now a whole new cool thingie. It allows you to set pitches with symbols and even has quarter tone resolution. I added a right outlet to send impulses to trigger envelopes and stuff (there's still more stuff of course, see full changelog below).
-
There are newly designed/renamed/recreated [resonbank~]/[resonbank2~] objects that are well suited for Modal Synthesis.
-
What actually drives my development is my Live Electronics tutorial, which got a fair upgrade with a new chapter on Modal Synthesis amongst other things, such as new subtractive synthesis examples and a revision of envelope generators with examples on AHDSR and DAHDSR - by the way, there are new gaterelease~/gatedelay~ objects for handling envelopes (and other processes).
-
I have to thank some people. Tim added 'zoom' to the [pic] object, as well as an image offset. Tim also implemented a new and better technique for bandlimited oscillators. Ben Wesh gave me a new [scope3d~] GUI object, pretty cool, that plots an oscilloscope in 3 dimensions, which is coded in LUA - and ELSE has been carrying a modified version of [pdlua] because it now depends on it for a couple of GUIs. Tim and Ben made many improvements to [pdlua] (as well as Albert Graef, of course).
-
For more new objects, let me also tell you about the simple and cool [float2imp~], that is based on [vline~] and can convert floats to impulses with sample accuracy (don't know why I didn't think of that earlier). A new [tanh~] object has Multichannel support. A bit earlier I made an update to Cyclone that actually "borrows" and includes this one from ELSE instead of its original one (which does not have Multichannel support). PlugData users will load the one from ELSE. This is another tiny step that sort of integrates ELSE and Cyclone, specially for PlugData users.
happy patching.
CHANGELOG:
LIBRARY:
Breaking changes:
- [adsr~]/[asr~]: now a gate off before reaching the sustain point does not start the release right away (this allows you to trigger it with impulses). There's a new mode just for immediate release. There's a new exponential setting for curve factors, the old 'log' mode is renamed to 'lag' as it's the same as used in the [lag~] object. For [adsr~], a bang now is not "retrigger", but an impulse at control rate, there's a new 'retrigger' message for control rate retriggering (and now it only retriggers if the gate is on). For [asr~] a bang now also works like an impulse.
- [sample~]: no more 'load' message, args to 'open' message changed, size is now only in 'ms'.
- [format]: outputs are now always symbols, before you could get float outputs. Also, we just have a simplified symbol output, no more lists or anythings. Hopefully I'll be able to get the 'list' output back, but it involved some bugs that I couldn't fix so I just removed it. You cannot use bangs and lists in secondary inlets no more (this is cylone/max crappy paradigm we don't want here). Bang method was actually removed as well.
- [pack2]: no more support for anythings, also no more support for lists in secondary inlets and output has a list selector (I wanna make this more Pd like and not a silly clone from MAX's [pak], cause fuck MAX).
- [merge]/[unmerge]/[group]: no more '-trim' flag (again, respecting pd's usual list paradigm), in [merge] now there's no more 'hot' argument and a bang now represents an empty list and inlets initialized with empty lists
- [mono]: 1st argument is now 'glide' in ms.
- [sfont~] now uses 'mma' for bank selection (this alters how CC messages set the bank number).
- [player~]/[play.file~]: 'open' message does not play files right away anymore.
- [tabplayer~]/[player~]: play message without args now play at the default settings (whole file at regular speed).
- [envgen~]: removed the 'maxsustain' parameter, use the new [gaterelease~] or [gaterelease] objects instead. Removed the rightmost inlet just to set envelopes, now a list input only sets the envelope and doesn't trigger it. The 'set' message is then removed.
- [envgen~]/[function~]: simplified and got rid of '-exp' flag and message, also deleted 'expl' and 'expi' messages. A new 'curve' and cimpler message sets exponential factors for all or individual segments, and includes more curve formats.
- [knob]: 'esc' key now deactivates the object. The 'ticks' message is renamed to 'steps' and there is a new 'ticks' message that toggles showing ticks on and off. The 'start' message has been renamed to 'arcstart'. The 'outline' message has been renamed to 'square' for better clarity. Design changed a bit to make it like it is in PlugData (they won), so we now fill the whole background color when in 'square mode' and the knob circle has an 85% proportion in this case inside the full 100% square size (so it grows bigger when not in 'square' mode). Now, by default, the GUI is in a new 'loadbang' mode (I don't think this will influence old patches). I'm afraid some old patches might behave really weird since I added a lot of new stuff. I changed the 'load' message behaviour to not update the object (this can arguably be considered a bug fix).
- [wavetable~], [bl.wavetable~] and [wt2d~]: 'set' message now sets frequencies because of the MC support in [wt~] and [wt2d~], while there's a new 'table' method to set the table name.
- [gbman~]/[cusp~] list method is now for MC, old list method is now renamed back to an old 'coeffs' method.
- [f2s~]/[float2sig~] default value is now 10 ms.
- [op] now behaves like [*~] where the smaller list wraps til reaching the size of the longer one.
- [list.seq] does not loop anymore by default.
- [impseq~] list input removed, use the new [float2imp~] object to convert floats to impulses.
- [resonant~] now has 'q' as the default.
- [resonant2~] has been removed.
- [decay2~] has also been removed ([asr~] much better).
- [vcf2~] has been renamed to [resonator2~].
- [resonbank~]/[resonbank2~] have basically been deleted and replaced by new objects with the same name... [resonator~] is based on a new [resonator~] object which is similar to [resonant~] and [resonbank2~] is now based on [resonator2~] (old [vcf2~] instead of [resonant2~] that got deleted). These are well suited objects for Modal Synthesis.
- [oscbank~] now uses a 'partial' list and not a frequency list. The freq input now defaults to '1' and this makes [oscbank2~] completely obsolete.
- [oscbank2~] has been deleted since it became completely obsolete.
- [sfload] load message changed the behaviour a bit.
Enhancements/fixes/other changes:
- [adsr~]: We have now a new mode for immediate release (see breaking changes above, I'm not repeating it). Fixed ADSR signal inputs (it was simply not really working, specially for linear). Fixed status output for MC signals. There's a new curve parameter that allows you to set the curvature.
- [asr~] I actually just made the new [adsr~] code into a new [asr~] code as a simplified version (as it was before)... so it's got the same impromevents/fixes.
- [play.file~]: added support for more file formats and even weblinks for online streaming!
- [sfload]: added an outlet to output information, added threaded mode, added support for more file formats and even weblinks for downloading.
- [sample~], [player~], [gran.player~] and [pvoc.player~] are now also based on [sfload], so they support more file formats!
- [sample~]: improved extension management with [file splitext].
- [sample~] and [tabplayer~] now are automatically integrated in a way that [tabplayer~] is always aware of the sample rate of the file loaded in [sample~], so it automatically adjusts the reading speed if it is different than the one Pd is running with.
- [numbox~]'s number display is not preceded by "~" anymore (that was just kinda stupid to have).
- [format]: fixed issues where empty symbols and symbols with escaped spaces didn't work. Added support '%a' and '%A' type. Added support for an escaped 'space' flag. Improved and added support for length modifiers. Improved syntax check which prevents a crash. Improved documentation.
- [knob]: added new 'param', 'var', 'savestate', 'read only', 'loadbang', "active", "reset" and 'ticks' methods. Added the possibility to type in number values and also modes on how to display these number values, plus new send symbols for 'activity', 'typing', 'tab' and 'enter'. New design more like plugdata. Changed some shortcuts to make it simpler. If you have the yet unreleased Pd 0.56-0 you can also use 'double clicking' in the same way that works in PlugData. Properties were also significantly improved (I'm finally starting to learn how to deal with this tcl/tk thingie). Yup, a lot of shit here...
- [autofade2~]/[autofade2.mc~]: fixed immediate jump up for 0 ramp up.
- [synth~]: fixed polyphony bug.
- [metronome~]: fixed bug with 'set' message.
- [midi2note]: fixed range (octaves 0-8).
- [pulsecount~]: fixed reset count to not output immediately, added bang to reset counter at control rate
- [click]: fixed regression bug where it stopped working.
- [else]: new 'dir' method to output ELSE's binary directory in a new rightmost outlet. The print information also includes the directory.
- [pic]: added zoom capability finally (thanks to tim schoen) and added offset message (also thanks to tim).
- [store]: added 'sort' functionality.
- [scales]: fixed octave number argument. Added functionality to allow octave number as part of the note symbol.
- [mono]: added 'glide' parameter, as in [mono~].
- [pluck~]: fixed list input.
- [rescale]/[rescale~]: added a "reverse log" mode.
- [limit]: added a new second ignore mode.
- [graph~]: added an external source input for plotting the graph and a 'clear' message.
- [canvas.setname]: added a new argument for "abstraction mode" and methods to set name, depth (and mode).
- [midi.learn]: added a new argument for "abstraction mode", fixed 'dirty' message sent to parent.
- [brickwall~]: fixed initialization.
- [list.seq]: added a loop mode and a 2nd outlet to send a bang when the sequence is done.
- [delete]: fixed index for positive numbers.
- [dust~]: added 'list', 'set' and '-mc' flag for managing the already existing Multichannel capabilities.
- Thanks to Tim we have many fixes and a whole new technique for band limited oscillators. Now [bl.saw~], [bl.saw2~], [bl.vsaw~], [bl.square~], [bl.tri~], [bl.imp~] and [bl.imp2~] have been redesigned to implement elliptic blep, which should provide better anti-aliasing.
- [parabolic~] now uses and internal wavetable for more efficiency.
- [resonant~]: added 'bw' resonance mode.
- [lowpass~]/[highpass~]: added 't60' resonance mode.
- [quantizer~]/[quantizer]: added a new mode, which combines floor (for negative) and ceil (for positive) values.
- [crusher~]: now uses the new [quantizer~] mode from above (arguably a breaking change).
- [envgen~]: fixed a bug (actually a misconception) where ramps started one sample earlier. Fixed 0-length lines. Added a possibility to set time in samples instead of ms. Maximum number of lines is now 1024. Added loop mode. Added many curve options (sin/hann/log curve/lag).
- [function~]: Added many curve options (sin/hann/log curve/lag).
- [The out~] family of abstractions now use [bitnormal~] so you won't blow your speakers beyond repair in edge cases.
- [trig.delay~]/[trig.delay2~]: fixed bug where impulse values different than '1' didn't work.
- Added MC support to: [trig.delay~], [trig.delay2~], [gatehold~], [vca.m~], [gain2~], [decay~], [asr~], [envgen~], [function~], [bl.osc~], [bl.saw~], [bl.saw2~], [bl.vsaw~], [bl.square~], [bl.tri~], [bl.imp~], [bl.imp2~], [imp2~], [tri~], [saw~], [saw2~], [vsaw~], [square~], [pulse~], [parabolic~], [gaussian~], [wavetable~], [wt2d~], [randpulse~], [randpulse2~], [stepnoise~], [rampnoise~] [pink~], [gbamn~], [cusp~], [gray~] and [white~].
- Also added MIDI input and soft sync to [imp2~], [tri~], [saw~], [saw2~], [vsaw~], [square~], [pulse~], [gaussian~] and [parabolic~].
- [wavetable~] and [wt2d~] gained args to set xfading.
- Updated pdlua to 0.12.23.
- M.E.R.D.A: Added MIDI-LEARN for all modules (this is only for the knobs). Replaced some number boxes that were attached to knobs by an internal number display mechanism (new feature from knob). Improved interface of [gendyn.m~]. Preset/symbol name fixes to [flanger.m~]. Now we have automatic MIDI mode detection for [plaits.m~] and [pluck.m~] when no signals are connected (still trying to get plaits right, huh? Yup! And bow MIDI input with monophony and trigger mode has been fixed in [plaits.m~]). Added MC support to [vca.m~]. Increased range of [drive.m~] down to 0.1. Changed some objects to include the new [popmenu] GUI. [vco.m~] now uses the new MC functionalities of oscillators and doesn't need to load abstractions into [clone], I hope it makes this more efficient and clean. The [seq8.m~] module was worthless and got a decent upgrade, it's practically a new module. Added new modules (see below). Note that MERDA is still at alpha development phase, much experimental. Expect changes as it evolves.
- 22 new objects: [float2imp~], [lace], [delace], [lace~], [delace~], [gatehold], [gatedelay],[gatedelay~], [gaterelease~], [gaterelease], [popmenu], [scope3d~], [tanh~], [resonator~], [sfinfo], [smooth], [smooth2], [smooth~], [smooth2~], [dbgain~], [level~] plus [crusher.m~], [sfont.m~] and [level.m~] MERDA Modules.
Objects count: total of 573 (319 signal objects [139 of which are MC aware] and 254 control objects)!
- 323 coded objects (210 signal objects / 113 control objects)
- 227 abstractions objects (87 signal objects / 140 control objects)
- 23 MERDA modular abstractions (22 audio / 1 control)
TUTORIAL:
- New examples and revisions to add the new objects, features and breaking changes in ELSE.
- Added the MERDA modules into the examples for reference.
- Revised section on envelopes.
- New subtractive synthesis examples.
- New chapter on Modal Synthesis.
- Total number of examples is now 554! (26 new ones)
[vline~] may not start at block boundaries
@lacuna said:
click bang [o] (GUI always on block-boundary) > [spigot] opens > [bang~] bangs > [spigot] closes > [vline~] starts (still on same block-boundary).
Yes, this is how I was hoping it would work, but it's not always the case that [bang~] bangs after the spigot is open within the same control block. It appears to bang afterward if there is a direct bang from a GUI element, but bangs before if the bang came from a delay. (Edit: I'm going to start a new topic on this, I don't see why this should be true)
bang~ runs last.pd
bang~ runs first.pd
If it runs before, then we are really waiting until it bangs at the end of the next audio block. (BTW, you can modify the number of blocks of delay and see the numbers change as you'd expect)
You use [rpole~ 1] as sample-counter, right? But [snapshot~] only snapshots on block-boundaries.
Yes, but all I'm concluding from that is that the message is available in the control block before the audio block that contains its actual time. The fact that so many Pd objects ignore the fractional block of time remaining suggests to me that it could be possible to truncate that fractional block of time in the message in order to make objects like vline~ start at the beginning of the audio block, like sig~.
So is it correct that you want to move the start of vline~ 'backward' ? To the start of the block?
Your diagram annotation is correct, but "want" is a strong word . Let's just say I'm curious if it's possible. Right now, I'm delaying things like [sig~] to match [vline~] by inserting [vline~] just before them. I could have used any of our 3 quantizers to align the first [vline~] ramp with the block following the block that contains the fractional block timed message, but then I would have had to also delay my [sig~] processing a block as @seb-harmonik-ar confirmed.
The last two slides in that PP deck you linked to shows what I mean. Objects like [vline~] implement the ideal, but I'm wondering how to make it behave more like the last slide. See how the message's timing is labeled "t0+16"? Wouldn't it be possible just to zero out the "16" part?
[vline~] may not start at block boundaries
@jameslo For me it is difficult to understand. Maybe I am missing the whole point and all I say is off topic.
First of all, I honestly don't understand why your left bang works
click bang [o] (GUI always on block-boundary) > [spigot] opens > [bang~] bangs > [spigot] closes > [vline~] starts (still on same block-boundary).
Similarly, in my first response to you, you can see in the snapshots that the bang from [delay 1.5 64 samp] is being processed during Ctrl 1, 32 samples before its real timing.
This I don't understand.
You use [rpole~ 1] as sample-counter, right? But [snapshot~] only snapshots on block-boundaries. (That's why there is [vsnapshot~], but that was buggy, when I last tried it.) [snapshot~] shows 64 samples, one whole block.
If you snapshot later, you see [del 1.5 64] outputs bang after 96 samples:
([sig~] also updates its output only on block-boundaries, not within the block.)
@seb-harmonik-ar s [pip~] could be done with [bang~] and [timer], to measure the time that has passed into the block.
Or for signalrate~ output~ with [rpole~ 1], to measure the samples past into the block.
you don't need to predict the future to make it one block earlier
So is it correct that you want to move the start of vline~ 'backward' ? To the start of the block? To the start of that block where [del] outputs later on a message to [vline~]?
Clicking [o] bang at ctrl 0 > [del 1] outputs after 1 ms, where audio 0 is happening > [vline~] should have started before, at the beginning of audio 0 ?
Is this what you want?
Here is a paper where message- vs signal-domain and scheduleing are graphed. It is in German, maybe you can use a translator and the time-graphs on the last pages are english / self-explanatory. And you problably already know all of this.
https://iaem.at/kurse/ss19/iaa/pdscheduler.pdf/view
Max style Key Bindings
In pd_bindings.tcl, I replaced this :
# and the Pd window is in a class to itself
bind all <KeyPress> {::pd_bindings::sendkey %W 1 %K %A 0 %k}
bind all <KeyRelease> {::pd_bindings::sendkey %W 0 %K %A 0 %k}
bind all <Shift-KeyPress> {::pd_bindings::sendkey %W 1 %K %A 1 %k}
bind all <Shift-KeyRelease> {::pd_bindings::sendkey %W 0 %K %A 1 %k}```
with:
Max style bindings
bind all <KeyPress> {
set w [winfo toplevel %W]
if {[winfo class $w] eq "PatchWindow" && $::editmode($w) && !$::editingtext($w)} {
switch -- %K {
"n" {menu_send_float %W obj 0}
"m" {menu_send_float %W msg 0}
"i" {menu_send_float %W floatatom 0}
"l" {menu_send_float %W listbox 0}
"c" {menu_send_float %W text 0}
"b" {menu_send %W bng}
"f" {menu_send %W numbox}
"v" {menu_send %W vslider}
"h" {menu_send %W hslider}
"r" {menu_send %W hradio}
"d" {menu_send %W vradio}
"g" {menu_send %W graph}
"a" {menu_send %W menuarray}
"u" {menu_send %W vumeter}
default {::pd_bindings::sendkey %W 1 %K %A 0 %k}
}
} else {
::pd_bindings::sendkey %W 1 %K %A 0 %k
}
}
bind all <KeyRelease> {::pd_bindings::sendkey %W 0 %K %A 0 %k}
bind all <Shift-KeyPress> {::pd_bindings::sendkey %W 1 %K %A 1 %k}
bind all <Shift-KeyRelease> {::pd_bindings::sendkey %W 0 %K %A 1 %k}```
Are there any implications? Why isn't this (or similar) a default setting?
Porting Max code to Pd - Filterbank with tap delay
@inum said:
@ddw_music I asked myself the same, but I tested the Max patch and it did not explode...
It occurred to me later that there is one possible reason why you might use the same value for Q and gain.
A standard bandpass filter produces a much quieter signal than the input (because it's filtering away most of the input's energy). Higher Q = narrower passband = more energy stripped away = quieter output. Scaling the output by Q -- bandpass(signal, cutoff, Q) * Q
-- is sometimes called a "constant skirt gain" bandpass filter, where resonance can be louder than the input.
Also, and I haven't investigated this but it's a reasonable guess, a bandpass filter's ring time may be shorter at higher frequencies, for the same Q -- so it might make sense for Q to be proportional to frequency.
But, in the patch as given, you don't have any control over ring time. IMO Q should scale the frequencies by some factor (to make the ring time longer or shorter), and then use this Q value in gain as well ("constant skirt gain").
Maybe there is a internal protection in this [fffb~] object...
There must be some protection because the original patch can generate a 0 frequency, which is bad when filtering. If the filter internally clips the frequency to a reasonable range, then you wouldn't hear anything bad -- but to be precise, it's a bit of careless math in the original patch. 0 frequency is not useful in this context and should be avoided.
PS I'm not familiar with "the filterbank external" -- searching did not reveal which filterbank external you tried.
hjh
bang~ order
[bang~} bangs after each DSP block, but that's also when other control processing happens. If a GUI object generates a bang, does it run before or after [bang~] in that particular control processing block?
I think it's before, and I'm guessing that [bang~] is the last control message processed before the next DSP block is processed. Check out this test:
bang~ order.pd
I always get 0 when I click on the bang at the top. If [bang~] ran first, then its bang would clock the [timer] 1 DSP block later.
Is my test and conclusion correct?
Aliasing line ~ ?
@seb-harmonik.ar said:
the error might be present at that point already..
yes, it might be a precision-thing.
Comparing Pd's [cos~]ine-table with [tabread4~ $0-cos-GOOD] from this patch:
https://github.com/pure-data/pure-data/issues/105
(see https://forum.pdpatchrepo.info/topic/13709/bug-osc-cos-circle-asymmetry-drifting-out-of-phase )
Driving them with a large number added, same artefacts appear.
Offtopic, but
without any addition [+~ 0] $0-cos-GOOD is slightly cleaner:
Sounds unaliased to me
< -90 dB we can't hear that.
late EDIT:
since Pd 0.55 and ongoing, Pd's cosine table has changed to a higher resolution and might get further changes for symmetry. See release notes and https://lists.puredata.info/pipermail/pd-dev/2024-06/023715.html
what "flag" causes [keyname] to change behaviour?
@ArturJD said:
A parallel to you observation is the fact, that PD has no notion of undefined/None/null. Many objects already have the "carry bang" or "bang when done" feature which avoid the whole trouble altogether – and bang is often the thing that works as "null" ([route] object is a good example).
Sure, e.g. the Pd [list xxx] operators fairly consistently use bang to indicate an empty list (a good convention, I think).
However...
But this doesn't necessarily mean, that we must be left to deal with asynchronous absence of message detection.
In this case, it is asynchronous because the condition that distinguishes valid-0 from invalid-0 is asynchronous. That is, the reason why I used delay is because the distinguishing signal is literally in the future, and you can't know the future at the moment of receiving a 0. If the 1 0 1 0 problem can't be resolved in the backend, then there is no choice but to wait and see if the latest 0 is a real key-up or not.
But using [delay] is better than nothing of course
I would rather prefer to have a method, which flags out the patcher state causing this discrepant behaviour and routes [keyname] output to a sub patcher with a proper message handling...
Look at the available information... In the "bad" case, you get alternating 1 and 0; in the good case, you get a stream of repeated 1s. You can't know which you will get in advance, but you can detect the "good" status upon the first repeating keystroke and switch to the streamlined logic at that moment (and keep it that way for the lifetime of the patch).
EDIT:
You might also add logic to detect the bad state and also switch off the right-branch check, though I think the check is not terribly expensive ("premature optimization is the root of evil").
Pd vanilla can do "gate" by [list prepend] --> [list trim] --> [route] but I'm lazy this morning.
hjh
what "flag" causes [keyname] to change behaviour?
@ArturJD said:
Hello! It's my first post here and a beginning of my adventure with PD
I am writing an external using [keyname]. I understand that when a key is pressed, this object (and [key] as well) interprets that the key press is being repeated.
BUT
When holding a keyboard key and printing its left output, it turns out that the same object behaves differently when:
a ) the patcher has been just opened: prints 1 0 1 0 1 0 1 0 1 0 1 0 ....
b ) user manually created an object: prints 1 1 1 1 1 1 1 1 1 1 (0 when depressed)
I'm afraid that I can't reproduce the discrepancy (in Linux). I always get "a)" behavior.
UI issues are coupled to the OS and window manager, so especially for UI issues, it's helpful to report your OS.
Based on my test in Linux, I have to assume that a) is the "correct" behavior. Or at least, your patch needs to be prepared for OSes where it is impossible to get your desired behavior.
So then the problem becomes one of filtering out the zeros. To do that, you need to be able to distinguish "0 = key was released" and "0 = key is being reset for repeat." AFAICS the second of these (the one that you don't want) is very brief, like < 3 ms until the next keystate = 1. [delay] could help, then. However I found experimentally that it wasn't reliable with less than 60 ms delay on the key-up. This won't be noticeable in practice.
hjh
Why does Pd look so much worse on linux/windows than in macOS?
Howdy all,
I just found this and want to respond from my perspective as someone who has spent by now a good amount of time (paid & unpaid) working on the Pure Data source code itself.
I'm just writing for myself and don't speak for Miller or anyone else.
Mac looks good
The antialiasing on macOS is provided by the system and utilized by Tk. It's essentially "free" and you can enable or disable it on the canvas. This is by design as I believe Apple pushed antialiasing at the system level starting with Mac OS X 1.
There are even some platform-specific settings to control the underlying CoreGraphics settings which I think Hans tried but had issues with: https://github.com/pure-data/pure-data/blob/master/tcl/apple_events.tcl#L16. As I recall, I actually disabled the font antialiasing as people complained that the canvas fonts on mac were "too fuzzy" while Linux was "nice and crisp."
In addition, the last few versions of Pd have had support for "Retina" high resolution displays enabled and the macOS compositor does a nice job of handling the point to pixel scaling for you, for free, in the background. Again, Tk simply uses the system for this and you can enable/disable via various app bundle plist settings and/or app defaults keys.
This is why the macOS screenshots look so good: antialiasing is on and it's likely the rendering is at double the resolution of the Linux screenshot.
IMO a fair comparison is: normal screen size in Linux vs normal screen size in Mac.
Nope. See above.
It could also just be Apple holding back a bit of the driver code from the open source community to make certain linux/BSD never gets quite as nice as OSX on their hardware, they seem to like to play such games, that one key bit of code that is not free and you must license from them if you want it and they only license it out in high volume and at high cost.
Nah. Apple simply invested in antialiasing via its accelerated compositor when OS X was released. I doubt there are patents or licensing on common antialiasing algorithms which go back to the 60s or even earlier.
tkpath exists, why not use it?
Last I checked, tkpath is long dead. Sure, it has a website and screenshots (uhh Mac OS X 10.2 anyone?) but the latest (and only?) Sourceforge download is dated 2005. I do see a mirror repo on Github but it is archived and the last commit was 5 years ago.
And I did check on this, in fact I spent about a day (unpaid) seeing if I could update the tkpath mac implementation to move away from the ATSU (Apple Type Support) APIs which were not available in 64 bit. In the end, I ran out of energy and stopped as it would be too much work, too many details, and likely to not be maintained reliably by probably anyone.
It makes sense to help out a thriving project but much harder to justify propping something up that is barely active beyond "it still works" on a couple of platforms.
Why aren't the fonts all the same yet?!
I also despise how linux/windows has 'bold' for default
I honestly don't really care about this... but I resisted because I know so many people do and are used to it already. We could clearly and easily make the change but then we have to deal with all the pushback. If you went to the Pd list and got an overwhelming consensus and Miller was fine with it, then ok, that would make sense. As it was, "I think it should be this way because it doesn't make sense to me" was not enough of a carrot for me to personally make and support the change.
Maybe my problem is that I feel a responsibility for making what seems like a quick and easy change to others?
And this view is after having put an in ordinate amount of time just getting (almost) the same font on all platforms, including writing and debugging a custom C Tcl extension just to load arbitrary TTF files on Windows.
Why don't we add abz, 123 to Pd? xyzzy already has it?!
What I've learned is that it's much easier to write new code than it is to maintain it. This is especially true for cross platform projects where you have to figure out platform intricacies and edge cases even when mediated by a common interface like Tk. It's true for any non-native wrapper like QT, WXWidgets, web browsers, etc.
Actually, I am pretty happy that Pd's only core dependencies a Tcl/Tk, PortAudio, and PortMidi as it greatly lowers the amount of vectors for bitrot. That being said, I just spent about 2 hours fixing the help browser for mac after trying Miller's latest 0.52-0test2 build. The end result is 4 lines of code.
For a software community to thrive over the long haul, it needs to attract new users. If new users get turned off by an outdated surface presentation, then it's harder to retain new users.
Yes, this is correct, but first we have to keep the damn thing working at all. I think most people agree with you, including me when I was teaching with Pd.
I've observed, at times, when someone points out a deficiency in Pd, the Pd community's response often downplays, or denies, or gets defensive about the deficiency. (Not always, but often enough for me to mention it.) I'm seeing that trend again here. Pd is all about lines, and the lines don't look good -- and some of the responses are "this is not important" or (oid) "I like the fact that it never changed." That's... thoroughly baffling to me.
I read this as "community" = "active developers." It's true, some people tend to poo poo the same reoccurring ideas but this is largely out of years of hearing discussions and decisions and treatises on the list or the forum or facebook or whatever but nothing more. In the end, code talks, even better, a working technical implementation that is honed with input from people who will most likely end up maintaining it, without probably understanding it completely at first.
This was very hard back on Sourceforge as people had to submit patches(!) to the bug tracker. Thanks to moving development to Github and the improvement of tools and community, I'm happy to see the new engagement over the last 5-10 years. This was one of the pushes for me to help overhaul the build system to make it possible and easy for people to build Pd itself, then they are much more likely to help contribute as opposed to waiting for binary builds and unleashing an unmanageable flood of bug reports and feature requests on the mailing list.
I know it's not going to change anytime soon, because the current options are a/ wait for Tcl/Tk to catch up with modern rendering or b/ burn Pd developer cycles implementing something that Tcl/Tk will(?) eventually implement or c/ rip the guts out of the GUI and rewrite the whole thing using a modern graphics framework like Qt. None of those is good (well, c might be a viable investment in the future -- SuperCollider, around 2010-2011, ripped out the Cocoa GUIs and went to Qt, and the benefits have been massive -- but I know the developer resources aren't there for Pd to dump Tcl/Tk).
A couple of points:
-
Your point (c) already happened... you can use Purr Data (or the new Pd-L2ork etc). The GUI is implemented in Node/Electron/JS (I'm not sure of the details). Is it tracking Pd vanilla releases?... well that's a different issue.
-
As for updating Tk, it's probably not likely to happen as advanced graphics are not their focus. I could be wrong about this.
I agree that updating the GUI itself is the better solution for the long run. I also agree that it's a big undertaking when the current implementation is essentially still working fine after over 20 years, especially since Miller's stated goal was for 50 year project support, ie. pieces composed in the late 90s should work in 2040. This is one reason why we don't just "switch over to QT or Juce so the lines can look like Max." At this point, Pd is aesthetically more Max than Max, at least judging by looking at the original Ircam Max documentation in an archive closet at work.
A way forward: libpd?
I my view, the best way forward is to build upon Jonathan Wilke's work in Purr Data for abstracting the GUI communication. He essentially replaced the raw Tcl commands with abstracted drawing commands such as "draw rectangle here of this color and thickness" or "open this window and put it here."
For those that don't know, "Pd" is actually two processes, similar to SuperCollider, where the "core" manages the audio, patch dsp/msg graph, and most of the canvas interaction event handling (mouse, key). The GUI is a separate process which communicates with the core over a localhost loopback networking connection. The GUI is basically just opening windows, showing settings, and forwarding interaction events to the core. When you open the audio preferences dialog, the core sends the current settings to the GUI, the GUI then sends everything back to the core after you make your changes and close the dialog. The same for working on a patch canvas: your mouse and key events are forwarded to the core, then drawing commands are sent back like "draw object outline here, draw osc~ text here inside. etc."
So basically, the core has almost all of the GUI's logic while the GUI just does the chrome like scroll bars and windows. This means it could be trivial to port the GUI to other toolkits or frameworks as compared to rewriting an overly interconnected monolithic application (trust me, I know...).
Basically, if we take Jonathan's approach, I feel adding a GUI communication abstraction layer to libpd would allow for making custom GUIs much easier. You basically just have to respond to the drawing and windowing commands and forward the input events.
Ideally, then each fork could use the same Pd core internally and implement their own GUIs or platform specific versions such as a pure Cocoa macOS Pd. There is some other re-organization that would be needed in the C core, but we've already ported a number of improvements from extended and Pd-L2ork, so it is indeed possible.
Also note: the libpd C sources are now part of the pure-data repo as of a couple months ago...
Discouraging Initiative?!
But there's a big difference between "we know it's a problem but can't do much about it" vs "it's not a serious problem." The former may invite new developers to take some initiative. The latter discourages initiative. A healthy open source software community should really be careful about the latter.
IMO Pd is healthier now than it has been as long as I've know it (2006). We have so many updates and improvements over every release the last few years, with many contributions by people in this thread. Thank you! THAT is how we make the project sustainable and work toward finding solutions for deep issues and aesthetic issues and usage issues and all of that.
We've managed to integrate a great many changes from Pd-Extended into vanilla and open up/decentralize the externals and in a collaborative manner. For this I am also grateful when I install an external for a project.
At this point, I encourage more people to pitch in. If you work at a university or institution, consider sponsoring some student work on specific issues which volunteering developers could help supervise, organize a Pd conference or developer meetup (this are super useful!), or consider some sort of paid residency or focused project for artists using Pd. A good amount of my own work on Pd and libpd has been sponsored in many of these ways and has helped encourage me to continue.
This is likely to be more positive toward the community as a whole than banging back and forth on the list or the forum. Besides, I'd rather see cool projects made with Pd than keep talking about working on Pd.
That being said, I know everyone here wants to see the project continue and improve and it will. We are still largely opening up the development and figuring how to support/maintain it. As with any such project, this is an ongoing process.
Out
Ok, that was long and rambly and it's way past my bed time.
Good night all.