I am wondering if there is any way to detect a click on the title bar of a DropdownList in the controlEvent method, as one would detect click actions on its list items.
In a sense, I am trying to overload the collapse function. I disable the collapse of the list, but would like users to be able to click on the list label, which would say something like "Current Samples (Click to Import)", and trigger my own event instead of, say, a collapse.
I'm struggling a bit with Minim's new UGen feature. Right now, I am simply using UGen effects (delay, band pass filter, and pan so far) to directly effect audio samples in the form of a FilePlayer UGen. I would like to simply be able to add/remove UGen audio effects. However, I'm having difficulty patching and unpatching multiple effects. If I have:
but this does not work (as in no sound). Likewise, even when I can find a way to hack together a series of patches to get sound out, I am having difficulty unpatching only one or two effects from this chain, and keeping all other effects. Can someone tell me what is wrong with this? Is there a chaining-type thing happening that uses, for instance, the output of pan to control the delay?
I'm struggling a bit with Minim's new UGen feature. Right now, I am simply using UGen effects (delay, band pass filter, and pan so far) to directly effect audio samples in the form of a FilePlayer UGen. However, I'm having difficulty patching and unpatching multiple effects. I'm basically doing:
FilePlayer song;
Pan pan;
BandPass bpf;
Delay delay;
AudioOutput out;
song.patch(pan).patch(out);
//no problems so far. Now enable bandpass.
pan.unpatch(out);
pan.patch(bpf).patch(out);
//still no problems. Let's disable it.
bpf.unpatch(out);
pan.unpatch(bpf);
pan.patch(out);
// good. Now for delay.
pan.unpatch(out);
pan.patch(delay).patch(out);
// sounds good. Now disable
delay.unpatch(out);
pan.unpatch(delay);
pan.patch(out);
At this point, it still sounds okay (no effects now), but if I repeat the process of patching to delay again, I get ArrayIndexOutOfBoundsException, with various array indexes each time. In fact, this Index error thing happens with delay no matter what if I have a delay time of over ~0.13 sec (which is pretty darn small), even on first patching. Changing my buffer size for FIlePlayer has no effect on this limit. This makes me think I'm doing something wrong. I thought that this form of patching should just work in a chain, so that if I wanted to put all effects on at once, I could do:
and it would work, but it doesn't. How should I go about this? It seems like a simple thing to do. Also, what's the issue with the array overflows on delay?
I'm having a few issues with ControlP5. Two of them, I'm sure there are clear answers to that I just don't know. The other is a bug (I think) that I haven't found mentioned anywhere.
1. How do you display a label for a knob?! I'm having trouble displaying the name of my knob. I've tried setLabel("name"), setLabelVisible(true), and setCaptionLabel("name"), but nothing worked. Also, why do all other controls display their names by default except for knobs?
2. I would like to use a ListBox that appears on top of all other controls when it pulls down. Right now, when I drop it down, if there are other controls in the drop-down area, it gets smothered by all the other controls appearing on top of it. Do I have to use something else, like a DropDownList for this, or is there some parameter to tune?
3. (Bug?) When I add a Slider2D to a ControlGroup, the display position correctly becomes relative to the Group, but when I try to use it, it still thinks it's relative to the main window. The mouseOver highlight, and clickEvents all correspond to the right (relative) position, but when I acutally want to drag the value, I have to click on it, then hold and grag my mouse to where controlP5 thinks it is, and move it around, controlling it at a distance. Any ideas?