Easiest way to set up chord progression using a foot pedal and GPScript?

What’s the difference?

Oh, I might have misunderstood what a function can do.

Makes sense. The little scripting experience I have there’s a difference. Functions are meant to return some value, sub-routines can do more. But if there’s no limitation to what I can put in a function, then there’s no issue. :slight_smile:

Also, there is a MidiSequence object in Gig Performer. You can load a standard MIDI file into it

function MidiSequence_LoadMidiFile (sequence : MidiSequence, fromFile : String) returns integer

and step through it with a trigger using

function MidiSequence_GetCurrentEvents (sequence : MidiSequence, trackNumber : integer) returns MidiMessage array

and just iterate through the returned MIDI messages using SendNow

This lets you create an entire MIDI sequence using your DAW (say) and then manually clocking it

1 Like

As a general rule, I deeply agree with RTFM.
However, I’m having difficulty understanding the documentation here. Having no education in programming, I only learn by seeing examples.

1 Like

Function Foo(x : integer) returns Double // A function that returns a value

End

Function XYZ(x : integer) // A function that does something but doesn’t return anything

End

1 Like

Again, all the help you guys have provided in my many threads these last couple of weeks are highly appreciated. I’m learning tons!

1 Like

It’s similar with me… i always need a concrete goal to achieve, while going there, i am learning the most.
I know that it’s often dificult to clearly understand what all those abstract descriptions and general examples (if there are any) actually mean and how they have to be handled in a proper way.
But especially the first chapters of the scripting manual contain lots of information which will explain a lot of situations - personally, i see the rest more as some kind of reference. :slight_smile:

2 Likes

On WidgetValueChanged
:wink:

1 Like

Nitpickers delight! :smile: :wink: :wink: :wink:

2 Likes

That’s what I wrote :slight_smile:

3 Likes