Using slide in gen~ to generate an ads envelope...
Feb 17 2020 | 6:08 pm
I'm trying to use the slide object in gen~ and a 1 & 0 signal to generate an adsr but I have an error message : clang: error line 2390 column 43: use of undeclared identifier 'div_129'; did you mean 'div_130'?
If you remove the red connection inside the gen~ in the following patch, the patch is working but the release time can't be send to slide...
Any ideas ?
- Graham WakefieldFeb 18 2020 | 4:09 pmIndeed, there seems to be a bug in code expansion/rate analysis for the [slide] operator! This is now logged as ticket #13814. Thanks for the report!
- Jean LochardFeb 22 2020 | 9:05 amHi !Good to know that it does't come from my patching ;-) !Meanwhile I tried to do the same envelope in CodeBox. I did a version with counter and history outside CodeBox that worked as expected but now I want to include all the process in Codebox.But I don't get how to include History in it (even after reading the tutorials of G. Taylor). I think I need help ! Here is the last patch I did ; I think I'm close to the solution...Thanks !Jean
- Graham WakefieldFeb 22 2020 | 2:57 pmHi,I think this is missing the gen~ patcher. You named the gen~ [gen~ adsr_slide_env_codebox], which means it is looking for a adsr_slide_env_codebox.gendsp file. To name it but keep it local, you can use [gen~ @title adsr_slide_env_codebox] instead.G
- Graham WakefieldFeb 22 2020 | 3:09 pmIn any case, here's an attempt to port the original patcher to codebox -- but it of course fails in the same way because of the same bug in [slide].
- Graham WakefieldFeb 22 2020 | 3:12 pmHowever, if you look in the gen~ examples folder, there's a "gen~.slide.maxpat" which re-creates slide~ (and rampsmooth~) in more basic gen~ objects. With this as a base, here's your original patcher now working:
- Jean LochardFeb 22 2020 | 3:20 pmCool ! Many thanks !Jean
- flaviogaeteMay 31 2023 | 2:07 amHi,Pretty new to gen here. I just started dabbling into envelopes using gen and had come up with a cheap solution for an AR envelope using slide, when I ran into an issue and then found this topic -- I hope it's related to this post.The issue: I noticed a strange behavior in live.scope~ (and I think also in scope~), both on the ascent and the descent of the signal as it departs from/approaches zero: there's a slight bump in the volume of the signal that is being displayed (I actually don't hear any issues, but then it happens --quickly and-- when the signal is super quiet). I'll attach a few screenshots to show the behavior. I've tested this on my own gen patch (I'll share that as well) but also using the patch shared in this post (I've used the gen abstraction '@title slide' by itself and also the entire ADSR patch used in the previous example). If anyone can shed any light into this I'd really appreciate it! Thanks!This screenshot above was taken using a gen cycle object @220 Hz (instead of a noise signal)
- 👽R∆J∆ The Resident ∆lien👽May 31 2023 | 3:02 amif i turn 'smoothing' off on live.scope~, i don't see the aberration anymore(i also never really see it in scope~ itself, even in your snapshot, i don't see the same kind of glitch, it looks like a slight spike, but not to the degree of change in live.scope~... and i think your screenshots comparing the two might show different parts of the waveform anyways(the patch you shared has scope~ at slower/default settings for 'buffersize' and 'calccount', if these are the same in your screenshot, it might not be accurate enough to tell)), if you retest all your use-cases with live.scope~ set with "smoothing" to 'off' (instead of 'type 1') do you get the same behavior?if it's smooth and without the bump(and especially if you never hear anything at that part), then it could just be that live.scope~ smoothing ends up creating this only visually(?)