I don’t get it. TR.PULSE 0 —> nothing happens, that would be all. i don’t see any problem.

A is simply a variable, default set to 0. What’s you’re proposing doesn’t make sense (to me).

with this syntax the only thing missing in your example is which tr to mute

1 Like

Precisely not, it’s set to 1.

A=1
B=2
C=3
D=4

Having TR.PULSE 0 would allow to trigger no output. It makes sense only if you replace 0 by a command that results in 0.

Example :

TR.PULSE MUL STATE 8 1

So it would trigger pulse 1 only when input 8 is high.

1 Like

Ah, ok, I see. My bad.

do you mean mute all outputs? wouldn’t TR.MUTE then make more sense?

or reset all outputs?

edit: it seems this is the wrong thread after all

Nothing to do with this.
It’s just a matter of being more easily able to NOT generate a trigger when generating conditional/random triggers.
Since TR.PULSE 1 triggers output labelled ‘A’, TR.PULSE B triggers output labelled ‘B’, and so on, that would be nice to have TR.PULSE 0 triggering nothing. Currently anything less than 1 triggers output labelled ‘A’.

ah I see… but “trigger nothing” somehow seems to not make sense… put an IF conditional before?

so you want tr.pulse 0 to mute all triggers?

as I understand he means “do nothing” which would be in his use in a algorithmic manner. I like that non 1-4 arguments are being clamped to that range though, potentially a useful thing too…

this is a good idea, i like it. will make a ticket:

Thanks for understanding.
And apologies to everyone else trying to understand what’s the point of this request. Probably my english is to blame.

i guess my confusion is…was this intended as a general command affecting every output or did he want it focused on a specific TR?

basically, should it address all TRs or each?

What I gathered here was that he wanted a function where you could do something like

(just for instance…)
X RAND 4
TR.PULSE X

In this instance you would have the potential to have a pulse on any of the 4 triggers. Currently, when the TR.PULSE receives a value below 1 (like 0) it just triggers trig A. I think @chapelierfou is looking to have nothing be triggered when TR.PULSE receives 0. Correct?

I do think @sakul’s conditional IF works

X RAND 4
IF X : TR.PULSE X

2 Likes

Right.
But one line solution is always better than two line solution. :slightly_smiling:
AND
the TR.PULSE 0 suggestion, does make sense from the syntax and logical perspective.

Many thanks, that’s it.
And for now, the ‘IF X’ suggestion could be a workaround in some situations.
But still, it doesn’t allow the use of a DEL or a PROB, for instance.

Here are the lines of code…

You can see it’s clamping the input values to 1 to 4 inclusive (lines 1166 and 1167). I agree that a more logical solution would be for out of bound values to do nothing. I think it should be as simple as replacing lines 1166 and 1167 with:

if(a < 1 || a > 4) return;

EDIT: for consistency, you’d need to make sure all of these ops behave the same too

  • TR
  • TR.POL
  • TR.PULSE
  • TR.TIME
  • TR.TOG
  • CV
  • CV.SLEW
  • CV.SET
  • CV.OFF
3 Likes

Many thanks @sam ! It looks like something relatively quick and easy to modify. Good news !

1 Like

this is a somewhat unrelated issue. @sam that is a sensible optimization, but it changes behavior.

at issue here are two things-- @chapelierfou had the original request the a TR.TIME x y value of y=0 would mean that TR.PULSE for channel x would be basically be disabled-- this makes an incredible amount of sense to me. the other channels would be fine. it’s like having selective TR.PULSE output muting.

now, the code above deals with out-of-bounds channel references. for example, TR.PULSE 6 doesn’t make any sense-- since channels are 1-4 (A-D). so i decided to clamp. but perhaps it makes more sense to simply discard scripts that are calling on non-existent channels.

opinions?

2 Likes

That makes sense, maybe I skimmed his post and missed the part about TR.TIME x

I’m all for this