Cabbage Logo
Back to Cabbage Site

Graphical presentation of an envelope

Love the forum. It’s a lot of nice content both on csound and cabbage. I saw a widget in the thumbnail picture in the tutorial on wigets in cabbage. A graphical presentation of an envelope. I can’t seem to find a way to get that. Any tips?

1 Like

The easiest way is to use a gentable, and hold your envelop in that. Look through the GEN examples. There are loads there. I’m pretty someone posting an editable ADSR envelop are at one point too. I’ll take a look…

I have a nice ADSR widget group I’ve been working on, but I can’t finish and test it until I get my hands on a new OSX csound build, because my plans require recent bug fixes that aren’t in official yet.

Anyways, I’m using transegr to create the audio aspect of the envelope, and gen 16 to generate a table representing it graphically… I kept the two separate to decouple shape and time because I have a “scale” factor that defines the max time for each segment, and then the AD/R controls are a percentage of that time.

If you use a gentable cabbage widget, it will redraw the updated ftable if you re-send it’s tablenumber(x) through the identchannel after the table has been altered.

My code isn’t very portable yet, but once I get it closer to done I planned on making a more sharable/portable version that doesn’t rely on my overly complicated include files and macros etc :wink:

ADSR

I can prepare an OSX build for you of Csound. Leave it with me, I’ve a few other things to get through first. :+1:

Thanks for the offer, that would be a massive help Rory, but if you’re busy don’t worry too much about it. Especially considering you could end up going through all the effort building it only for me to find out the upstream changes didn’t help my situation at all! I do appreciate the offer tho.

It’s not a problem. I had been maintaining my own remote OSX build of Csound using Azure, but I let it lapse. It’s not much work to get it going again. I just need to set up my linux machine first. Space is at a premium here since I’m working from home!

1 Like

I made an importable simple version that ignores the “turnoff” idea to have maximum note lengths. This is easy to install and seems to work right most of the time :joy:

Feedback is welcome of course!

simpleADSR.csd (918 Bytes)
adsr.xml (5.5 KB)

1 Like

Try this one. I love that it’s only a few MBs in size! Not that you should probably just rename you existing framework first in case this one has issues!

That is unbelievably small! Unfortunately I’m not sure that did anything. I didn’t get a chance to run any actual test code against it yet, but after install the initial test for console and cabbage were both reporting csound version 6.13 still.

:thinking:

Hmm, I must not have updating my fork. Good that it actually runs from the command line though. At least it means it’s actually producing a valid package :wink:

[edit] I think what you are seeing if the older version. I just tried the package here and it doesn’t contain a Csound binary! I’ll take a look and see what’s wrong…

Try this one. I just did a quick test there and it worked from the command line at least…

Thanks Rory! That one worked, at least from the working binaries stand point. Looks like my string/ternary woes aren’t over just yet tho, so I need to dig back into that. Next up, testing turnoff from a UDO too.

Does this azure build get made automatically, similar to the cabbage auto-betas? Or is this something that just gets fired off if someone needs it and asks?

Right now it gets fired off when I push a commit to it, which usually only involves pulling from the upstream Csound repo and committing the changes. I have my own branch within my fork for, well, forking around with the source!

I will look into having it trigger a build every time the upstream branch changes, although I’m not sure this is actually possible. It would be quite useful though.

It’d be cool if possible, but it’s not a high priority… especially not until the build is perfect. :stuck_out_tongue_winking_eye:

While it seems to be working ok for most things, anything that involves sound files (diskin, gen 01, etc) all seem to fail, with a message that implies the binary was built against OSX 10.15, whereas I am (and iirc you are too) on 10.13.6.

Here’s the msg:
libsndfile-1.0.28
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
Referenced from: /Library/Frameworks/CsoundLib64.framework/libs/libsndfile.1.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
Referenced from: /Library/Frameworks/CsoundLib64.framework/libs/libsndfile.1.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib

Csound tidy up: Abort trap

Ah, yes good spot. I will sort that… Azure doesn’t support 10.13 any more so I had to build with a newer OS. But I should be able to drop down a few versions…

I’ll let you know.

So I found this old fossil while digging around through a ancient folder, it’s titled “DynamicEnveloper.csd”, which led me back to this thread:

So there’s another method for graphical envelope presentation! :wink:

BTW Rory, if you want feel free to delete or move the off topic comments, I feel bad having thread-jacked this so bad! (this sentence included :joy:)