Controlling bangs ???
Woa that looks like a scary list of something... How would I initiate that I'm on OSX 10.5.6.
Meanwhile I think I got it to work using spigot
[output val]
|
[50.06]
|
[expr $f1;
if ($f1 < 50, $f1 /10, 0);
if ($f1 > 50, $f1 /10, 0);]
| | |
[50.06] [0.0] [0.0]
| | | |
[spigot] [spigot 1]
seems to work ok.
Controlling bangs ???
[moses], [spigot], [bang]
Try this (sorry, can't seem to attach it, copy and paste into a text file "threshold-bangs-example.pd"):
----8<----
#N canvas 0 0 450 300 10;
#X obj 93 54 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 5500 1;
#X obj 90 93 moses 32;
#X obj 146 93 moses 96;
#X obj 90 161 spigot 1;
#X msg 135 141 0;
#X obj 191 158 spigot 1;
#X msg 236 138 0;
#X msg 163 141 1;
#X msg 203 139 1;
#X obj 90 201 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 191 202 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 90 182 bang;
#X obj 191 182 bang;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 1 0 8 0;
#X connect 1 1 2 0;
#X connect 2 0 7 0;
#X connect 2 0 8 0;
#X connect 2 1 5 0;
#X connect 2 1 7 0;
#X connect 3 0 4 0;
#X connect 3 0 11 0;
#X connect 4 0 3 1;
#X connect 5 0 6 0;
#X connect 5 0 12 0;
#X connect 6 0 5 1;
#X connect 7 0 3 1;
#X connect 8 0 5 1;
#X connect 11 0 9 0;
#X connect 12 0 10 0;
----8<----
Flustered newbie pd extended osx
First off, the micSensor argument you've given to [adc~] doesn't mean anything. [adc~] accepts numerical arguments corresponding to you're audio inlets, so you'll want to specify that.
I'm not entirely sure exactly what you're trying to do, but I think you're trying to turn off audio coming out of the [adc~] object. I don't actually know what the inlet to [adc~] does in Pd (in Max, a toggle, like you have, turns dsp on and off, but as you've illustrated, Pd doesn't like that). Instead, feed the [adc~] outlet to the left inlet of [*~] and feed the toggle into the right inlet. Connect the outlet to that to you're weird delay setup. The output of you're sample2 table will keep playing, though, and I don't know if that's what you intend or not, but you can, of course, connect the toggle to that as well.
Also, [r spigot 1] should probably be [r spigot1]. Second arguments are ignored by [send] and [receive], so [r spigot 1] and [r spigot 2] would be the same thing.
Onebang
this seemed to be what you are asking for
bang or message or whatever
|
spigot ------<
| |
| |
bang------toggle
when something goes through the spigot, the bang gets hit and switches the toggle. If the toggle is [x] then it goes to zero, [ ], closing the spigot. You would need to reset the toggle to [x] for the next message you want to push though.
This can of course be modified with a [select] if a specific message needs to close the spigot.
Onebang
Does anyone know how to make a onebang object from scratch?
Basically I need a gate or spigot that can be triggered to only output one thing and then shut itself.
I can manage to get one to "work" sending the bang to a spigot and routing the spigot's output to turn off its control inlet, but not surprisingly I get stack overflow errors in the Pd window. I'm happy that it "works," but I'm worried about the errors.
Any help would be much appreciated!
Thanks!
Tremolo
Hi, I worked on this patch.
It produces some good sounds
For the spigot~object, i made one in the same spirit than yours.
Here is for interested people
Filtering repetition
The attached patch uses [spigot] to let numbers through or not. The [loadbang] initializes the [spigot] with 1. Once a number passes the spigot is closed and reopened 5000 milliseconds after.
Spigot~
@domien said:
If on windows, try copying the spigot~.dll to the unauthorized folder and restart pd, that's what worked for me.
Hi, I'm having the same problem with this spigot~ object too. I looked in my folders and I haven't got spigot~.dll
I'm thinking I need it for it to work? Any chance you could post a copy of it here?
I would greatly appreciate it
Reactivision simple fiducial marker patch
Hey Konsumer, did you ever do more with this? I was wondering if I could check out your improvements to qbs patch since you said you have thought of some.
I have a patch from a while back (which isn't very efficient yet) using reactvision and it detects the distance between two or more objects (not to the center point). Right now a toggle is turned on saying they are within the specified proximity.
I haven't had a chance to experiment with the best way to gate different controls/audio in different directions if they're close enough. Either using send/recieves with select objects or using spigots to turn on/off where a signal goes is probably the best way.
For audio, there's a spigot~ object (in extended version) that will change its signal to it's left or right inlet based on it's inlet. This could work for changing between two possibilities. If you do multiple spigots~ in series maybe this could work for an infinite amount of audio signals. Where you have the spigot decide where the audio needs to go and then send~ the signal to that place.
Send an osc~ to dac~ if objects not in proximity, or send osc~ to lop~ and lop~ to dac~ if they are close enough.
Controlling a synth with a keyboard
I got it working using the spigot command along with a [metro 5000] attatched to a [delay 100] which checks the spigot on and off, so the data is only allowed to pass through the spigot during the time between the metro firging a bang every 10 seconds and the delay unchecks the spigot after just after every bang.
One of my last problems is how to define the length of the audio samples that I'm using. Right now, every sound I load up only plays in a one second loop regardless of how long the actual file is. I would like to be able to run the entire audio file on a loop. Most of them aren't too long..probably 7 seconds on average. I'm using the sampler.loop example to load my audio files, and I can't figure out what is telling it to only play one second of every file. In the easysample.pd file that you linked to earlier, I can load up an audio file, and it will loop the entire sound..
do you know what makes the easysampler dependent on the audio file for length as opposed to the sampler.loop which forces the audio file into an already determined length?
thanks