monome / teletype

monome eurorack module
GNU General Public License v2.0
203 stars 84 forks source link

new op CNT, counts down, stops at zero #243

Closed a773music closed 3 years ago

a773music commented 3 years ago

What does this PR do?

Add new OP CNT, counts down, stops at zero

How should this be manually tested?

CNT x // should return x - 1, if the result is less than 0, return 0

Any background context you want to provide?

Counting down and taking action when 0 is reached is something I use a lot, CNT makes it much more compact to do this.

I have,

scanner-darkly commented 3 years ago

a couple of comments:

a773music commented 3 years ago

Thanks, very good points indeed. Let me see if I understand you correctly: change CNT to works like O except it's local and has defaults of CNT.INC -1; CNT.STOP 0?

a773music commented 3 years ago

Hmmmm. I think I'll have to play with using O with O.INC -1; O.WRAP 0; O.MIN 0 in actual musical examples and see how that goes. I have the feeling the "change on access" nature of O makes it awkward for this purpose...

a773music commented 3 years ago

I think I'll take this to the forum for a broader discussion, if that's OK with you?

scanner-darkly commented 3 years ago

sounds good!

desolationjones commented 3 years ago

Allow me to proselytize: I love O and I think it will work for you. In fact I love O so much that I'm tempted to make O2 thru O4 on my local branch. You can always set O.INC 0 if you need to park it for multiple access, or assign it to a local variable.

a773music commented 3 years ago

Closing for now, will bring the discussion to lines...