Kyma Forum
  Kyma Support
  reset countTriggersMod: ?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   reset countTriggersMod: ?
Phi Curtis
Member
posted 20 August 2006 16:54         Edit/Delete Message   Reply w/Quote
Hi,

Is there a way to reset countTriggersMod (so that after resetting, it will start counting again from 0)?

I have this code in a soundToGlobalController:

!Start of: #(0 {((!Start bpm: 60) countTriggersMod: 10) + 1} )

I would like it to it to start counting again from 1 after I toggle it off and on again.

thanks,
Phil

IP: Logged

SSC
Administrator
posted 21 August 2006 09:04         Edit/Delete Message   Reply w/Quote
!Start of: #(0 {(((!Start bpm: 60) countTriggers - (!Start sampleAndHold: ((!Start bpm: 60) countTriggers)) mod: 10) + 1} )

This difference will be zero only when !Start is triggered.

Another idea that *might* work (haven't tested it yet) is to set the modulus to 1 when !Start goes up:

(!Start bpm: 60) countTriggersMod: (!Start of: #(1 10)))

IP: Logged

Phi Curtis
Member
posted 21 August 2006 12:18         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
!Start of: #(0 {(((!Start bpm: 60) countTriggers - (!Start sampleAndHold: ((!Start bpm: 60) countTriggers)) mod: 10) + 1} )

Thanks. This does the job, although I find it quite confusing:

!Start of: #(0 {((!Start bpm: 60) countTriggers - (!Start sampleAndHold: ((!Start bpm: 60) countTriggers + 1)) mod: 10) + 1} )

I didn't realize you could use a mod: message with countTriggers, but then before I wouldn't have known a use for doing that instead of using countTriggersMod.

I'd like to make a feature request that a reset: message be added to countTriggers and countTriggersMod - it seems like it would be useful. The funny thing is I could have sworn it was there - I'm not sure what I was thinking of.

Phil

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c