The Hughes & Kettner User Forum

The Unofficial guitar amp and cabinets forum for users of Hughes and Kettner products. We are not affiliated with Hughes and Kettner!!


    Trying to make a remote control app for REAPER (JSFX-plugin)

    Share

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Fri Oct 24, 2014 3:36 pm

    Hi,
    Does anyone know if there a chart/table for SysEx messages that GM 36 sends? I’m trying to make a remote control app for REAPER (it would be a JSFX plug-in).


    I made some testing. When pressing the power soak buttons, I saw these SysEx messages in REAPER’s ReaControlMIDI -log :

    Power soak 0w
    F0 00 20 44 00 10 00 06 00 04 1E 00 00 18 F7

    Power soak 1w
    F0 00 20 44 00 10 00 06 00 04 1E 00 20 38 F7

    Power soak 5w
    F0 00 20 44 00 10 00 06 00 04 1E 00 40 58 F7

    Power soak 18w
    F0 00 20 44 00 10 00 06 00 04 1E 00 5F 47 F7

    Power soak off
    F0 00 20 44 00 10 00 06 00 04 1E 00 7F 67 F7




    Turning the “Presence knob” sends these SysEx messages (I tested just 3 different positions – I guess there are 128 different positions)

    Presence 0% (min)
    F0 00 20 44 00 10 00 06 00 04 19 00 00 1F F7

    Presence (next step from min position)
    F0 00 20 44 00 10 00 06 00 04 19 00 02 1D F7

    Presence 100% (max)
    F0 00 20 44 00 10 00 06 00 04 19 01 7F 61 F7


    • I would need to convert the "green values" to 0-127, I think
    • "blue 19" == CC25




    Sending CC messages to the amp (from the JSFX) seems to work, but I would need a chart so that I could understand the SysEx data that the amp sends.
    Then I could update the sliders/knobs to the right values in my app when f.ex. turning the knobs on the amp.




    I'll update this thread if/when I get the JSFX to "usable state" Smile


    Last edited by spk77 on Mon Oct 27, 2014 4:38 pm; edited 3 times in total

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Sending CC messages to amp + parameter modulation

    Post by spk77 on Sun Oct 26, 2014 3:28 pm

    Testing the IX GUI library ("Presence knob" is sending CC messages to the amp):


    (0:20s -> using REAPER's parameter modulation)
    avatar
    yoMuzicMan

    Posts : 45
    Join date : 2014-05-11
    Location : Colorado

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by yoMuzicMan on Mon Oct 27, 2014 5:44 pm

    I would use this if you can make it work. Sorry, I'm not very good with MIDI to help out. Good luck!!!

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Mon Oct 27, 2014 6:07 pm

    ral8667 wrote:I would use this if you can make it work.  Sorry, I'm not very good with MIDI to help out.   Good luck!!!

    Thanks!
    I think I should be able to make f.ex. the parameter modulation working, but making the app "bidirectional" will be harder.
    I have to do some "research" on sysex messages.
    avatar
    fredo

    Posts : 103
    Join date : 2014-10-28

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by fredo on Tue Oct 28, 2014 3:56 am

    Hi guys.
    First post here ;-)
    Got my Grandmeister a few days ago and I already hooked it up to my PC with MIDI-OX to sniff the MIDI frames ;-)...
    So as you already figured out, it sends SYSEX messages for the the iOS/Android application to reflect the changes made by turning the amp's knobs.
    I think the format is something like this (values form the example you mentioned earlier) :
    Code:

    [F0] Start sysex message
    [00 20 44 00 10 00 06 00] H&K / Grandmeister identification code, never changes
    [04] type of message : 04 = parameter change, 40 = preset content
    [19] parameter type : 19=Presence, 18=Resonance, 1E=Power soak etc.
    [01 7F] parameter value, from 0 to 256 in hexa 7bit (i.e. 0=00 00; 1=00 01 ... 127=00 7F; 128= 01 00; 129 = 01 01 ... 256 = 01 7F)
    [61] some kind of checksum, but did not manage to find how it is calculated...
    [F7] End of sysex

    When the amp receives a Program Change message, it sends the whole content of the preset on MIDI out (for the iOS/Android app to display the values accordingly), in a single SYSEX message (type 40 if I remember well).
    I did not hack the format of this message yet...

    Hope this helps !

    Regards.

    Fred.

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Tue Oct 28, 2014 11:30 am

    fredo wrote:Hi guys.
    First post here ;-)
    Got my Grandmeister a few days ago and I already hooked it up to my PC with MIDI-OX to sniff the MIDI frames ;-)...
    So as you already figured out, it sends SYSEX messages for the the iOS/Android application to reflect the changes made by turning the amp's knobs.
    I think the format is something like this (values form the example you mentioned earlier) :

    Code:

    [F0] Start sysex message
    [00 20 44 00 10 00 06 00] H&K / Grandmeister identification code, never changes
    [04] type of message : 04 = parameter change, 40 = preset content
    [19] parameter type : 19=Presence, 18=Resonance, 1E=Power soak etc.
    [01 7F] parameter value, from 0 to 256 in hexa 7bit (i.e. 0=00 00; 1=00 01 ... 127=00 7F; 128= 01 00; 129 = 01 01 ... 256 = 01 7F)
    [61] some kind of checksum, but did not manage to find how it is calculated...
    [F7] End of sysex

    When the amp receives a Program Change message, it sends the whole content of the preset on MIDI out (for the iOS/Android app to display the values accordingly), in a single SYSEX message (type 40 if I remember well).
    I did not hack the format of this message yet...

    Hope this helps !

    Regards.

    Fred.

    Hi,
    This was helpful, thanks!


    This is still confusing me (I'm just a "hobbyist programmer" Smile). If I want to convert the parameter values to the range 0 - 127...

    ...this seems to work for values from 0 to 64 (bit shift right 1 bit):

    B0 19 00 [CC25] chan 1 val 0 (this is sent to the amp)
    F0 00 20 44 00 10 00 06 00 04 19 00 00 1F F7 ....0000 >> 1        -> returns 0

    B0 19 01 [CC25] chan 1 val 1
    F0 00 20 44 00 10 00 06 00 04 19 00 02 1D F7 ....0002 >> 1        -> returns 1

    B0 19 02 [CC25] chan 1 val 2
    F0 00 20 44 00 10 00 06 00 04 19 00 04 1B F7 ....0004 >> 1        -> returns 2
    .
    .
    .
    B0 19 3F [CC25] chan 1 val 63
    F0 00 20 44 00 10 00 06 00 04 19 00 7E 61 F7 ....007E >> 1        -> returns 63

    B0 19 40 [CC25] chan 1 val 64
    F0 00 20 44 00 10 00 06 00 04 19 01 00 1E F7 ....0100 >> 1        -> returns 64



    ...but values from 65 to 127, I need to subtract 80 (=int 128) first and then do the bit shifting:
    B0 19 41 [CC25] chan 1 val 65
    F0 00 20 44 00 10 00 06 00 04 19 01 02 3C F7....((0102 - 80) >> 1        -> returns 65
    .
    .
    .
    B0 19 7F [CC25] chan 1 val 127
    F0 00 20 44 00 10 00 06 00 04 19 01 7F 61 F7....((017F - 80) >> 1        -> returns 127

    (There is probably a simple formula that would work for all the values, but I'm not able to figure it out)




    Also, I'm wondering if it's possible to query the parameter values on the amp (by sending CC or SYSEX -messages to the amp)?

    Thanks!


    Last edited by spk77 on Tue Oct 28, 2014 2:20 pm; edited 1 time in total

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Tue Oct 28, 2014 2:14 pm

    I think this formula:
    ((X<<7)|Y)>>1

    or this simplified formula y>>1|x<<6

    ...gives the correct values when converting X Y "pair" to range 0-127.

    (X and Y positions on a sysex message):
    F0 00 20 44 00 10 00 06 00 04 19 X Y Z F7


    I got help from the Reaper forum: http://forum.cockos.com/showthread.php?t=148164


    Now it might be possible to update the knobs on the app when turning the knobs on the amp Smile.
    avatar
    fredo

    Posts : 103
    Join date : 2014-10-28

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by fredo on Wed Oct 29, 2014 8:25 am

    Yeah that looks good to me !

    I mapped most of the parameters codes yesterday :
    Code:

    01 Mod Intensity
    04 Dly Time
    0C Mod Type
    15 Bass
    16 Mid
    17 Treeble
    18 Resonance
    19 Presence
    1B Dly Feedback
    1C Dly level
    1D Reverb
    1E Power soak
    37 FX Loop (00= off / 7F = on)
    38 Gain
    39 Volume
    3F Noise Gate (00= off / 7F = on)
    40 Boost (00= off / 7F = on)
    50 Store

    It's a bit more complicated for the preset frame but it will be doable too.

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Wed Oct 29, 2014 9:07 am

    Thanks!

    EDIT: Some info about the GM 36 CC messages: http://hughes-and-kettner.com/128-ways-midi-will-change-your-life-as-a-live-guitarist/


    It seems that y>>1|x<<6 works for all the knobs!:

    (turning the knobs on my GM 36 now updates the "virtual knobs")




    Hmm...there has to be some way to request the current parameter values on the amp...
    avatar
    fredo

    Posts : 103
    Join date : 2014-10-28

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by fredo on Wed Oct 29, 2014 9:27 am

    Nice !
    Sending a Program Change event will trigger a preset SYSEX frame that contains all the parameter values (message type = 40).
    The way I've found to figure out which data corresponds to which parameter is to send a first Program Change event to see the current preset content, then change only one parameter on the amp, store the value and send the Program Change event again (for the same program) and compare the two frames.
    The only data that changes is corresponding to the parameter you moved.
    It's a bit of a painful process but it works !...

    So far I have (based on first factory preset) :
    Code:

    F0   00   20   44   00   10   00   06   00   40   00   00   00   00   51   00   62   01
    71   01   79   00   32   ww   ww   xx   xx   00   5C   00   00   00   00   00   00   00
    00   00   00   00   00   00   00   00   yy   zz   ck   F
    ww ww = Presence
    xx xx = Resonance
    yy    = Bit map : bit 0 = Noise Gate
    zz    = Bit map : bit 2 = Boost ; bit 3 = Fx Loop; Bits 4,5,6,7 = Power Soak value
    ck    = Checksum

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Thu Oct 30, 2014 1:04 pm

    Nice work!

    Turning the amp power on seems to trigger 2 messages:

    The first message (message type = 50)
    F0 00 20 44 00 10 00 06 00 50 10 00 00 01 43 F7

    this was the other message (preset content)
    F0 00 20 44 00 10 00 06 00 40 7F 7F 42 00 08 00 12 00 00 00 1E 01 2E 01 0C 00 70 00 3E 00 00 00 23 01 4E 00 00 00 00 00 00 00 00 01 42 47 F7

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Sat Nov 01, 2014 9:12 am

    I think the checksum is calculated like this:

    for example: CC7 (volume soft), value 124 sent to amp ...
    ...amp sends back:
    F0 00 20 44 00 10 00 06 00 04 39 01 79 47 F7

    XOR all values from F0 to the value before "checksum"
    F0^00^20^44^00^10^00^06^00^04^39^01^79 = 0xC7

    AND the result to 0x7F
    0xC7 AND 0x7F = 0x47



    I got the idea from http://wiki.fractalaudio.com/axefx2/index.php?title=MIDI_SysEx (MIDI SysEx: calculating the SysEx checksum)




    Just a thing I noticed:

    I made a preset (clean channel, all knobs at zero, all buttons at "off" -state, power soak at "silent") and stored it to "bank 0, program 0" (ie "preset slot 1")

    then I turned the power off...
    ...turned the power back on:
    (amp always sends this kind of message when turning the power on - don't know what it means):
    F0 00 20 44 00 10 00 06 00 50 10 00 00 01 43 F7

    (preset content - notice the blue "7F 7F"):
    F0 00 20 44 00 10 00 06 00 40 7F 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 F7


    selecting the same preset  by sending a PC event (blue values are now "00 00"):
    F0 00 20 44 00 10 00 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 F7


    Last edited by spk77 on Sun Nov 02, 2014 8:51 am; edited 2 times in total (Reason for editing : copy/paste errors)

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Sat Nov 01, 2014 2:24 pm

    I hope there aren't copy/paste errors Smile


    [F0] [00 20 44 00 10 00 06 00] [AA] [BB BB] [CC] [DD DD] [EE EE] [FF FF] [GG GG] [HH HH] [II II] [JJ JJ] [KK KK] [LL LL] [MM MM] [NN NN] [OO OO] [PP PP] [XX XX XX XX] [QQ] [RR] [SS] [F7] 


    F000 20 44 00 10 00 06 00AABB BBCCDD DDEE EE FF FFGG GGHH HH II IIJJ JJKK KKLL LLMM MMNN NNOO OOPP PPXX..XXQQRRSSF7
    sysex startGM identification codeType of message
    04 = parameter change
    40 = preset content
    50 = ?
    "Type of message" related ?
    00 00 = ?
    7F 7F = ?
    Preset number
    00 - 7F (0 to 127)
    Gain
    00 00 
    to
    01 7F
    Bass
    00 00 
    to 
    01 7F
    Mid
    00 00 
    to 
    01 7F
    Volume
    00 00 
    to 
    01 7F
    Treble
    00 00 
    to 
    01 7F
    Resonance
    00 00 
    to 
    01 7F
    Presence
    00 00 
    to 
    01 7F
    Reverb
    00 00
    to
    01 7F
    Delay level
    00 00
    to
    01 7F
    Delay time
    00 00
    to
    01 7F
    Delay feedback
    00 00
    to
    01 7F
    Mod. intensity
    00 00
    to
    01 7F
    Mod.type
    00 00
    to
    01 7F
    see the code section belowsee the code section below
    checksum
    sysex end


    Code:
    RR (channels):
    (0) 0000 0000 = clean channel
    (1) 0000 0001 = crunch channel
    (2) 0000 0010 = lead channel
    (3) 0000 0011 = ultra channel

    RR (boost,  FX-loop):
    (4) 0000 0100 = boost on
    (8) 0000 1000 = FX-loop on

    QQ (noise gate)
    (1) 0000 0001 = noise gate on
    avatar
    fredo

    Posts : 103
    Join date : 2014-10-28

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by fredo on Mon Nov 03, 2014 4:00 am

    Nice Job !
    Well done for the checksum calculation too !
    I'm working on a Ctrlr.org pannel for the GrandMeister on my side.
    It's almost functional but I still need to understand how some things work with the iPad application (re. modulation type and channel selection).
    I emailed H&G support to try and get the official MIDI specification but they did not answer so far.
    Too bad I don't own an iPad or an Android tablet to spy the data exchanged between the application and the amp :-(

    spk77

    Posts : 12
    Join date : 2014-10-18
    Location : Finland

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by spk77 on Mon Nov 03, 2014 4:35 am

    fredo wrote:Nice Job !
    Well done for the checksum calculation too !
    I'm working on a Ctrlr.org pannel for the GrandMeister on my side.
    It's almost functional but I still need to understand how some things work with the iPad application (re. modulation type and channel selection).
    Very nice!

    fredo wrote:
    I emailed H&G support to try and get the official MIDI specification but they did not answer so far.

    I did the same thing...no answer yet.
    avatar
    fredo

    Posts : 103
    Join date : 2014-10-28

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by fredo on Wed Nov 05, 2014 4:27 am

    OK so I finally got my panel working !
    It's available here : http://ctrlr.org/hughes-kettner-grandmeister-36/
    Any feedback is welcome !

    Sponsored content

    Re: Trying to make a remote control app for REAPER (JSFX-plugin)

    Post by Sponsored content


      Current date/time is Tue Sep 26, 2017 4:14 am