Global variables are not changeable

vendredi 13 mai 2016

Hello!

I am completly new to Mobius Scripting, but have some experience in PHP and C++. I am currently using Mobius with a Yamaha keyboard as USB midi device, a Tascam sound interface, my guitar and an amp - this is my testing environment before I start building a real loop-station. To figure out whether the layout and functionality of Ed Sheerans Chewie Monsta station is good for me, I try to reproduce the setup with 10 keys from the Yamaha keyboard which I have neatly labeled according to his setup. Unfortunately, Ed Sheerans setup includes a "mode" toggle, which switches the operation mode between "record" and "play" (not to be confused with the Mobius terminology).

Existing instructions on how to build this thing put the problem on the midi-controller side of the setup: Depending on which mode is selected there a button sends a different signal.

I would like to have the station as a pure controller and therefore have Mobius handle the current operation mode. To implement this I need something like a system-wide variable.


The problem is; it seems like global variables can not be modified once they are stored:

Code:

variable global test 3
global variable test
message $test
# Outputs "3"

variable global test 4
global variable test
message $test
# Outputs "3"

I tried to use parameters, but it seems like I can not create new ones.

Can anyone help me with a way to store something that can be accessed by all scripts? Thanks a lot in advance!
Greetings, Jonathan


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor