Jump to content

Scripter for count the number of time


Recommended Posts

I'd like writing a script for counting the number of time a loop is repeated.

 

So I began trying a little script for understanding repeat, count and break.

 

1092930205_Schermata2018-07-10alle14_29_40.png.4bc68b7c2f331b3296f9634c2c563cd4.png

 

 

But ... the script repeats the number the time I wanted and goes out. Instead i wanted that waited the first, then the second hit of key and then went out.

 

Where I was wrong.

Link to comment
Share on other sites

For what I gather, your script adds a value of "1" to the "a" variable every time a Note On is read by the scripter plugin. That's about it.

Your script needs a command to move the playhead (go to) somewhere else.

IOW: you need a code to tell it to jump the playback, and a code specifying the destination.

Link to comment
Share on other sites

Atlas007 thank you. But Script can'y containing Meta Event as Go To Marker, so I'll use a Transformer in Environment to transform the note into a Meta Event. And all works.

But, with Scripter I'd like count how many time the trigger note has been played. So I could interrupt the repetition when I want,

Link to comment
Share on other sites

For example:

 

2104376885_Schermata2018-07-11alle12_39_02.png.b46a630663a6640fe3d739574757f9c4.png

 

 

Is it right?

 

So I can write a new conditional statement "if", that captures the "var count" value and if is greater than 2 sends a different note.

But this new conditional statement would be placed before the first, isn't it?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...