I have a question about Openframeworks IOS step sequence!

Hello everyone, I’m studying openframeworks in Japan.

I want to clear() all of step sequencer’s track when I push a button.

How can I do that?

Thanks and advise me plz!

have a good day!

I see you have

vector<Step> steps;

As container. That’s mean you can simply use clear to empty the vector.

I think what you are trying to do is make all the steps unpressed(on = false) without changing the size of the vector.

If so, here’s a code you can try to clear all steps.

for (int y=0; y<seqs.size(); y++) {
    for (int x=0; x<seqs[y]->steps.size(); x++) {
        seqs[y]->steps[x].on = false;