Author |
Message |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Thu Aug 02, 2018 3:47 am Post subject:
Store default values with MIDI Subject description: Using Sysex function to store an absolute default patch |
 |
|
Hey all,
I've been experimenting with g2 lately with using SuperCollider/Tidal and I'd like to store the initial values of a performance before I send any CC and change the overall parameters
the idea is to recall a patch with the "default" parameters at any given time.
I am thinking in order to this, I can use the 'dump one' function to get midi data in Sysex format and then parse it in SuperCollider later to be sent as MIDI CC back to G2.
I was curious if this would be the right way of doing this or maybe some other folks have done this before
Open to any suggestions |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24420 Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320
|
Posted: Thu Aug 02, 2018 5:12 am Post subject:
|
 |
|
Why not use "All Controllers Request"? (manual page 149/150) _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Thu Aug 02, 2018 6:00 am Post subject:
|
 |
|
Blue Hell wrote: | Why not use "All Controllers Request"? (manual page 149/150) |
Hey, thanks for the reply! Doesn't it only give me the CC'd parameters rather than all of the parameters in the patch? |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Thu Aug 02, 2018 6:12 am Post subject:
|
 |
|
On a side but related topic, I think one of the issues I am having right now is not being able to preserve a patch properly. My patches seem to be evolving a bit after each session hence this effort to keep a default state. |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24420 Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320
|
Posted: Thu Aug 02, 2018 8:07 am Post subject:
|
 |
|
Ah yes .. CC-ed ones only ... so indeed you'll have to ask for the patch and then parse that ... or just send the whole dump back maybe ... yuck
O .. and  _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Thu Aug 02, 2018 9:08 am Post subject:
|
 |
|
Blue Hell wrote: | Ah yes .. CC-ed ones only ... so indeed you'll have to ask for the patch and then parse that ... or just send the whole dump back maybe ... yuck
O .. and  |
Delighted to be here
So yea that's what I was thinking. However, I am unsure about the G2's Sysex protocol. also can't say that I have much experience using Sysex but in SC the format goes like this:
Code: | m.sysex(Int8Array[0xf0, 0x00, 0x20, 0x3c, 0x02, 0x00, 0x61, 21, 54, 0xf7]); |
Above is an example of the clock message for Machinedrum.
I am sure people has experimented with it before but my initial search didn't really give any results. Maybe you can point me to the right direction?
thanks again  |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24420 Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320
|
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
Posted: Thu Aug 23, 2018 5:15 pm Post subject:
|
 |
|
Hi vou!
Quote: | the idea is to recall a patch with the "default" parameters at any given time. |
Did you tried : Shitf + #variation ?
You can use dump too. But after when you send back the sysex G2 performance at 110 BPM (recorded at 30 BPM) somewhere at the middle of your project > your sequencer and the G2 will probably don't like that.
I store all G2 performances on my sequencer with sysex dump when I work on a project. Like this I'm sure the patches/performances are exactly the sames when I recall them with the project. Another reason why I save all G2 performances with project is when I have many versions (v11, v12, v13, v21, etc..). I don't want to take a lot of G2 memory for each performance version for this project.
I only save performance in G2 for live act and all my basic collection of patches/performances
But if you just need to recall the default parameters > shitf + #variation. |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Thu Aug 23, 2018 6:12 pm Post subject:
|
 |
|
Hi!
Quote: |
I store all G2 performances on my sequencer with sysex dump |
How do you actually do that/which sequencer? do you have some sort of a parser? |
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
Posted: Thu Aug 23, 2018 8:21 pm Post subject:
|
 |
|
I make cofee and will record a small video for you. What is a parser ?
Edit : Here is the video, G2 receive perf from sysex (at 1.50 I reset the variation) :
https://youtu.be/qEDdUaAdP9o
And a second video because I forgot to made another one with G2 sending perf with sysex message to sequencer and record it :
https://youtu.be/jjTyRLWJbU8
Let me know if you have question
 |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Fri Aug 24, 2018 9:12 am Post subject:
|
 |
|
thanks for that,
Ah so the Sysex gets parsed automagically. I guess they've made it so that it works within the established Sysex protocol. Not sure why I thought it wouldn't.
Just for the sake of this conversation, I use custom interface to sequence nord, not a conventional hardware sequencer |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Fri Aug 24, 2018 10:19 am Post subject:
|
 |
|
With the motivation I got from you, I was able to come up with SuperCollider patch to save/load performances from sysex just like you demonstrated with your sequencer.
In case that anyone else search for this, here's a working solution;
Code: |
//Init MIDI
MIDIClient.init;
MIDIIn.connectAll;
//Get MIDI device
~nord = MIDIOut.newByName("USB MIDI Device", "Port 1");
//Create Arrays to store G2 performances/patches
~vsv1 = Array(50);
//Init Sysex listener
MIDIIn.sysex = {
arg src, sysex;
~vsv1.add(sysex);
sysex.postln;
};
//Load the patch back to G2
for (0, 50, { arg i;~nord.sysex(~vsv1[i])});
|
Cheers! |
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
Posted: Sat Aug 25, 2018 10:49 pm Post subject:
|
 |
|
Niiiiiiiiice!!!
Some tools (open source) around here can convert .pch2 to sysex (no need to turn on the G2). I mention that in case you need to convert a lot of patches/perf (.pch2,. prf2 batch folder). |
|
Back to top
|
|
 |
vou
Joined: May 13, 2018 Posts: 17 Location: London
|
Posted: Sat Sep 01, 2018 3:42 pm Post subject:
|
 |
|
Oh ye? that's interesting.. mind pointing out some of these tools? |
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
Posted: Sun Sep 02, 2018 3:57 pm Post subject:
|
 |
|
After spending some time searching on my HD, I'm not sure which tool and source I used. But here's what I can tell you about it:
The NMG2 Editor 0.26 can load/save patch from/to G2 with sysex. Exemple : Menu > Sysex > Get patch sysex from bank. The code source and all reference is available with the editor. This editor is available on the forum I think. Or google it.
I see another tool in my computer : pch2midi - NM G2 patch/performance <> MIDI converter. I think this tool was made by Blue Hell (not sure). This tool is coded with delphi. pch2/.prf file can be converted to .bin.
I don't think I used G2ools (which you can find on the forum) code with python language for this task. I remember having already done this task. But it must be around 10 years and I'm not sure what I used. I have some pieces of code here and there that I must review to understand its function.
I don't know if it can be useful for you with SuperCollider/Tidal and I do not have much experience on this subject > You can use the NMG2 0.26 and the FMX FM v0.4 (another open source editor) over TCP IP. These 2 editors have log file, it can be useful too. Then you can send USB message manually for the G2.
I'll let you know if I find / remember the piece of code or the tool I used to convert patches/perf to sysex. I think that some members here would have the time to code this kind of tool the time that I look in my computer and that I write this message.  |
|
Back to top
|
|
 |
Electromagnetic Wave

Joined: Apr 28, 2013 Posts: 305 Location: Kebek
G2 patch files: 38
|
|
Back to top
|
|
 |
|