Midi Control of GForce is Possible

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
bnh
Posts: 59
Joined: Fri Jan 19, 2007 7:11 pm

Midi Control of GForce is Possible

Post by bnh »

The quest for midi control of GForce has been a constant post on this forum. Recently, I have been responding to questions from member ptkins about interfacing GForce with a product called Midi Translator (MT). You will have to refer to his initial post (titled WM __ messages )to understand some references made below.

Since I don't feel people will understand the application ptkins is suggesting with his title WM __ messages , I am starting a new post with a more relevant heading.

What follows is the 4th post in response to ptkin's initial question.

- - - - - - - - - - - - - - - - - - -

I should tell you that I hate USB products and interfaces for this kind of equipment because it is so fragile a connection. So everything I have in this field is connected via sound cards, XLR cabled-mics, etc.

I downloaded the Classic version of Midi Translator. The Pro Version of MT does have offer compatibility for midi control of Windows Media players, but as I mentioned earlier, I don't use Windows Media, I only use the StandAlone version of GForce.

The Classic version of MT should suffice for our purposes. Downloading the Classic version was free, but I think it will expire in X number of Openings. Purchasing the Classic version is just $40 compared to $70 for the Pro Version. I'll probably purchase the Pro version because the developer (bome) is no longer providing updates for the Classic version.

I did not have to install Midi Ox or Midi Yoke. In my hardware configuration, I have a sound card (Audiophile 2416) installed, and I have a midi cable running from the Output of my Yahama keyboard synthezier to the Input of the Audiophile 2416 soud card.

You do have to watch the transmission channel on the output of your midi device, but I'm sure you know about these things. Some software reserve a particular channel for communication on their device, so you have to avoid any conflicts.

The Input side of MT Classic is set to the Audiophile 2416 card, and None is selected for the Output of side of MT.

Inside MT Classic, I set up a keystroke emulation test assigning a note (C#4) on the synthesizer to emulate an "H" keystroke, as shown below. The hex code was 90 3D pp, which translates to Note On, C#4 and Any Volume Level.

Image


With Gforce running in the Stand Alone Mode, and after making the GForce screen active by clicking on it, I hit the C#4 and wala..... it worked great, as shown in this photo.

Image

We now know that MT and GForce are capable of running in the Advance Next Approach described in the earlier post. It would be no problem to assign other midi notes to emulate the "next" keystrokes listed above for each visual element in GForce. And I'm sure some refinements will have to be made in MT. But for now, I just wanted to prove this process would work.

However, I still think the prize is running scripts, so I'll work on the CNTL + problem.

I suppose at a later time it would be nice to codify all of the data and produce a preset for loading into MT. All you would have to do is then change the midi note values and the value of X in the keystorke CNTL + X.

ptkins
Posts: 3
Joined: Sat May 28, 2011 9:10 pm

Post by ptkins »

Hi bnh,

Thank you for your extremely in-depth posts you've made on this topic :)

I have made some progress in controlling G-Force completely via MIDI, the only thing I have left to work on is getting sliders/knobs to work properly.

I currently have a chain of:

MIDI controller 1 + 2 --> MIDI Yoke --> Midi Translator --> AutoHotKey --> G-Force.

Firstly I went through the boot files and commented out almost every keyboard command, except for a couple (like U to reset configs, \ to toggle menu, etc) Just to make sure that any keyboard hotkeys I use don't conflict, because there's a lot of em!

Midi translator is set up to output a different key depending on which note on/off message is received. Im using a launchpad which has 64 buttons, each one outputs a different key. To make the most of your computer keys you can also use combinations of keys for this.

It's important to note here that these keys are NOT matched to g-force settings. They key map matches to the input of autohotkey. Autohotkey takes the key input, and writes a script file such as CTRL 0.txt. Autohotkey then outputs CTRL 0 which G-Force picks up and runs the script.

This way, you can have autohotkey continually overwriting script files when you press the key, followed by its execution. You'll have to purge the file chache in the script too, or g-force will only ever run the first version of the script.


So that's how far i've got so far :) This way you can select any background/waveshape/flowform/etc individually without having to go through the slideshow.

The drawback of this method is that you lose a lot of MIDI data. By the time the message is received by autohotkey, you've basically lost every value except the initial noteOn/Off. Because of this, it's a little tricky to implement sliders or knobs into it. But Midi translator and AutoHotKey both have some clever features so i'm sure its possible. Watch this space!

Pete :D

bnh
Posts: 59
Joined: Fri Jan 19, 2007 7:11 pm

Post by bnh »

Ptkins, you's spent a lot of time on this problem. Congrats.

Just so everyone else will understand, ptkins is not using keys from an instrument, e.g. a midi piano, to send commands to GForce. He has a separate device called a controller/launcher, which has 64 buttons that output midi data to initiate commands to control GForce. This means he doesn't have to sacrifice 64 different notes on his piano to control GForce. Since there are only 88 notes on a piano's keyboard, using a controller makes a lot more sense because he trying to exercise a lot of control over GForce.

It's also interesting that ptkins is using another piece of software called autohotkey to provide greater control, and I think it might be autohotkey that has solved the CNTL+X problem mentioned earlier.

I'm still working on the problem encountered when using combinations (CNTL+X) directly with Midi Translator and GForce. I've written a post in the Midi Translator forum to see if they can give us any hints as to what the problem is. I've tried numerous variations in the syntax but without any positve results. Apparently, the software that receives the keystroke translation --in this case GForce -- can uniquely interpret combination commands, and GForce is apparently doing something a little strange in this regard.

Ptkins figured out a workaround by inserting autohotkey between Mid Translator and GForce, and autohotkey is correcting the problem. I wonder if it's a timing problem.

Did you have to play with autohotkey to get the combiantion keystorke (CNTL+X) to work?

I'm not sure I understand completely what you mean by this statement:
ptkins wrote: It's important to note here that these keys are NOT matched to g-force settings. They key map matches to the input of autohotkey. Autohotkey takes the key input, and writes a script file such as CTRL 0.txt. Autohotkey then outputs CTRL 0 which G-Force picks up and runs the script.

This way, you can have autohotkey continually overwriting script files when you press the key, followed by its execution. You'll have to purge the file chache in the script too, or g-force will only ever run the first version of the script.

I guess I should download autohotkey to understand what you are doing.

I understand how you have gone into the boot config files to change GForce's embedded keystroke assignments. That's a lot of work. Do I understand correctly that you've then associated a particular controller button to a particular WaveShape, or a particular FlowField, or a particular ColorMap, so that basically you are creating visualization combinations on the fly with direct midi commands from your controller? Or are some of those buttons loading/executing actual script files, so that for example, you have created a script called CNTL 1, which executes a combination of WaveShape X plus FlowField W plus ColorMap Z?

Your setup sounds fine...if you can keep your sanity as to what button controls what visual config. It does seem that eventually you will run out of buttons. I'm assuming that you are trying to use GForce in a live venu, and as a matter of protocol, don't forget to ask GForce for a commercial license if this is what you are doing. They've been very reasonable in this regard in my experience.

The only problem with your approach that I can see is that the appearance of the next WaqveShape/FlowField/ColorMap when directly controlled by a midi button and not called by a script, will be fairly abrupt, and will not have the smooth morphing character that GForce spent so much time developing.

When changes between visual configs are controlled by scripts, that transition time is variable and provides a lot of interesting effects. When I write scripts, the transition time for moving from one config to the next is as important as the config itself, especially with WaveShapes. There are some boot-related config files that will vary the "fade-in/fade-out" commands of some of the configs, e.g. particles and text, but greater control lies in the writing of scripts.

I'll keep trying to solve the CNTL+X problem without autohotkey and get back to you when I can.

Hamler
Posts: 3
Joined: Mon Jul 30, 2018 6:36 pm

Post by Hamler »

Old thread, I know!

I'm using Bome's MIDI Translator Classic to convert Ableton Live MIDI notes on one laptop via network MIDI to a second laptop running G-Force.

I can't for the life of me get Bome's to recall a script in G-Force. I'm sending Shift(R)L, for example, to recall the script Key L.txt. But it's not working.

Any help appreciated!

bnh
Posts: 59
Joined: Fri Jan 19, 2007 7:11 pm

Midi Controlling GForce

Post by bnh »

I'm sorry I can't help you with this. I stopped updating my GForce when it switched to Python, which would have been Version 5 I believe. GForce changed the Control Menu (aka ToolBar) with the conversion to Python, and there was a big debate at that time over this switch. The new Control Menu under Python was not as flexible and did not facilitate the coding and testing of new configs. As I recall, it also wasn't as flexible with regard to customization. Some of the GForce members have kept up; I didn't.

GForce has never been great at easing the learning curve by publishing tutorials, diagrams, coding changes, procedure details, etc. Learning GForce is pretty much an autodidatic process, so be patient.

Let me just ask some stupid questions to see if I can make you think of anything you haven't disclosed or tried. Providing as much detail in your post is essential to finding help.

To call a script, you used to have to use CTRL + X, not Shift + X. That difference may be because you are on a Mac. As far as calling scripts, I do recall a change at some version update where certain combinations of Control + X would no longer work. In other words, the differences changed with the update. In earlier versions, almost anything worked, e.g. CTRL A, CTRL B, CTRL 1, etc. Then, along about version 4.9, it had to be CTRL A through CTRL F, or something like that. So I'm suggesting you play with different variables of X.

I am also not Mac qualified or familiar with the Bome translator. I assume you're saying the Bome will convert a MIDI command to a keystroke command, e.g. (CTRL X?) Do you have to have a Bome translator loaded in both laptops or just one? If you're actually transferring Midi commands, as I mentioned in previous articles from 2011, I recall there were problems making sure the receiving and the sending devices were on the same Midi channel.

Can you narrow down the problem? If you go to the laptop holding GForce, and you enter CTRL A from the keyboard, does script A appear?

Have you tested the network between the two laptops? Without the Bome translator? For example, can you transfer keyboard commands or text from one computer to the next, without using Ableton Live or the Bome translator? I'm just digging in the dark here.

Is your script formatted correctly? Only use a pure TXT format, e.g. Notepad for us PC users. No word processing software.

Are you using the Standalone player in GForce and not some special MAC player? I found that to be an essential requirement when using GForce. Third party players present all kinds of separate problems. When GForce first brought out a Mac compatible version, I remember they had problems trying to interface with every OS and every player on the market. They also had a hell of a time interfacing with every PC player as well. That's why you need to use the Standalone player built into GForce.

There are a ton of things that could be wrong, and when you find it, it will be a thud-to-the-forehead-kind of moment. What you are attempting to do was certainly possible a while back, and it worked great. But 7 years is a lifetime in this field.

There are Mac users on this forum, so keep trying. And keep in touch by posting your findings.

Hamler
Posts: 3
Joined: Mon Jul 30, 2018 6:36 pm

Post by Hamler »

Thanks for the quick reply!

I should have included a few more details. I'm using two Windows 10 laptops, one running Ableton Live, the other G-Force standalone. Bome's MIDI Translator is running on the receiving laptop, and all it does is convert the incoming MIDI note into a keystroke or series of keystrokes. It doesn't need to run on the computer transmitting the MIDI note.

I renamed a few of the G-Force preset scripts with CTRL + for testing. For example, when I send a MIDI note from one laptop to the other, Bome's works fine. I checked it by launching a word processor, and when I send the MIDI note that corresponds to Bome's CTRL + P, the word processor tries to print. But G-Force doesn't recognize the same CTRL + P from Bome's, although if I manually push CTRL + P on the keyboard, G-Force launches the preset associated with CTRL + P.

User avatar
DanPin
Posts: 161
Joined: Tue Mar 15, 2016 8:43 pm
Location: Los Angeles County, California

Post by DanPin »

I'm really neither into MIDI nor making a U-turn into studying alternatives for controlling G-Force, but the procedures you're taking are inadequate for visualizing MIDI notes through the Standalone.

Wouldn't it be impossible to capture MIDI keystrokes through G-Force? If your computers had a microphone port, and you connect the MIDI via the auxiliary cord to that port with speaker outputting enabled (a 3.5mm converter is necessary since the actual MIDI cable could be too big to fit in), you can get MIDI processing working in G-Force. This is just a quick advice.

Post Reply