Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Hercules MIDI with 6300

2456715

Comments

  • W4WHLW4WHL Member
    edited July 2016
    Ken, the only file you need in that download is a file called FlexMidiTCP.pde.  Just edit that file in Processing.  You need to update this line in that file:


    myBus = new MidiBus(this, "Hercules DJControl Instinct", "Hercules DJControl Instinct");

    To get the correct name of your device, create a new sketch with just this:

    import themidibus.*;

    MidiBus myBus;

    void setup() {
      size(400, 400);
      background(0);

      MidiBus.list()

    A list of all available MIDI devices will be printed.

    After editing that line, try running the program from processing.  Check if everything works.  If not there is an example under the midibus library called basic.  edit the same line:
    myBus = new MidiBus(this, "Hercules DJControl Instinct", "Hercules DJControl Instinct");

    Run this program a then just start turning knobs and hitting buttons.  Write down each channel,note, value etc.  Then just update my PDE with your values.  The commands in the sketch are pretty self explanatory, so you should have no trouble figuring out what goes where.

    After that adding new functions get a bit harder.  You have to dig into the API to find them.  I will help where I can.

    W4WHL



  • W4WHLW4WHL Member
    edited July 2016
    My guess is the mappings are the same or very similar, I doubt you will have to change much. to get basic functionality.  And once you get everything working to your liking, just export it to an aplication.
  • edited December 2016
    William, looks like they took your drop box link and my last question off the thread.
    Please send me the link to N3VE at arrl dot net  thanks, Jeff
  • edited December 2016

    I switched browsers and it is there, please disregard last post

    Jeff

  • W4WHLW4WHL Member
    edited July 2016
    For CWX memories, I don't think can be a accessed via another client, so in order to do it with MIDI controller, you will just have to program a button with a canned message.  And also how to program a dial for wpm speed.  Like this:

    //*************************************************

    void controllerChange(int channel, int number, int value) {
    //CW speed ?? = Pick a dial
    //if ((channel == 0) && (number == ??) && (value < 101)) {c.write("C44|cwx wpm " + "+value+"
    ");}

    void noteOn(int channel, int pitch, int velocity) {
    //CW Canned Messages ?? = Pick a button
    if ((channel == 0) && (pitch == ??)) {c.write("C44|cwx send QRZ CQWW DE W4WHL K
    "); }
    if ((channel == 0) && (pitch == ??)) {c.write("C44|cwx send CQ CQ DE W4WHL K
    "); }

    //************************************************

    Etc Etc.

    Of course you will only want messages that NEVER change.  If you want to get fancy, you could write a GUI to input and change memories, but this adds complexity.  Its simpler for me to just update the code :)

    Another option that would be much easier, is to create a XML file with all your memories, then have the program pull them from the XML file. I may work on this when I get time.

    William



  • W4WHLW4WHL Member
    edited July 2016
    Nevermind you can send CWX memories no problem here ya go:

    void controllerChange(int channel, int number, int value) {
    //CW speed ?? = Pick a dial
    //if ((channel == 0) && (number == ??) && (value < 101)) {c.write("C44|cwx wpm " + "+value+"
    ");}

    void noteOn(int channel, int pitch, int velocity) {
    //CW Canned Messages ?? = Pick a button
    if ((channel == 0) && (pitch == ??)) {c.write("C44|cwx macro send 1
    "); }
    if ((channel == 0) && (pitch == ??)) {c.write("C44|cwx macro send 2
    "); }
    if ((channel == 0) && (pitch == ??)) {c.write("C44|cwx macro send 3
    "); }
    if ((channel == 0) && (pitch == ??)) {c.write("C44|cwx macro send 4
    "); }

    I will add this to my code this weekend



    W4WHL
  • W4WHLW4WHL Member
    edited July 2016
    Here is the newest layout, I will post a link later today or tomorrow once its tested.

    image
  • W4WHLW4WHL Member
    edited December 2019
    The balance does interesting thing, It switches A to left ear, B to right ear or vice verse.  In the center it mixes both channels.   So you can listen to slice a in the left ear and slice b in the right (or vice verse), centered you hear both in both ears, or any combination of the above.  If only one slice is open its acts as a standard balance, but the balance is reversed for slice b.  This was done on purpose.

    That was quicker than I thought.  all new functions work as in the above photo.  I will post the new code in about 20 min.

    W4WHL
  • Jay -- N0FBJay -- N0FB Member ✭✭
    edited March 2015
    William, what version of the Hercules are you picturing above?

  • W4WHLW4WHL Member
    edited July 2016
    Ok I made one more update.  I added mode switching.  Not sure how I forgot that :)

    image

    And here is the link to the new download.  I complied 64 & 32 bit versions. 

    https://www.dropbox.com/s/re9tlop8r7y7wje/FlexMidiTCP.zip?dl=0

  • W4WHLW4WHL Member
    edited July 2016
    Hercules DJControl Instinct
  • Jay -- N0FBJay -- N0FB Member ✭✭
    edited March 2015
    Danke schön!!!
  • W4WHLW4WHL Member
    edited July 2016
    Den man gerade willkommen
  • W4WHLW4WHL Member
    edited June 23
    Ken,  Did you get a chance to try this?

    W4WHL
  • W4WHLW4WHL Member
    edited June 23
    I made another small update, the main screen now displays VFO frequencies.  I thought it would be nice to have some visual feedback the program is doing something.

    image

    Here is the updated download;

    https://www.dropbox.com/s/re9tlop8r7y7wje/FlexMidiTCP.zip?dl=0

  • Ken - NM9PKen - NM9P Member ✭✭
    edited December 2016
    Not yesterday, I ended up with too many projects. Perhaps today or tomorrow. I will be able to work on it.
  • Ken - NM9PKen - NM9P Member ✭✭
    edited December 2016
    Looks really nice.
  • Ken - NM9PKen - NM9P Member ✭✭
    edited December 2016
    Hi William.
    I have downloaded Processing and made a sketch with your little routine to discover the midi name of my controller.
    It stops with an error message 
    "unexpected token:null"

    what's going wrong?
  • W4WHLW4WHL Member
    edited July 2016
    import themidibus.*;

    MidiBus myBus;

    void setup() {
      size(400, 400);
      background(0);

      MidiBus.list();

    }


    Sorry This works


  • Ken - NM9PKen - NM9P Member ✭✭
    edited December 2016
    Thanks.  Now it says:  

    "the package "themidibus" does not exist.  You might be missing a library.
    no library found for themidibus
    Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder."

    I copied the 'lib' folder from the zipped file you sent me and put it into the folder that "Processing" set up for the new sketch I entered.  Then I named it "Libraries" and it still gave me this error.

    I'm learning, but have a long way to go.  But I learn fast with the proper information.  I will also look for a tutorial/guide online.

    BTW, I didn't find your email on QRZ.com

    Thanks for your patient help....
  • W4WHLW4WHL Member
    edited July 2016
    in processing, you need to Sketch>Import>Add Library

    Then search midibus and install

    William
  • W4WHLW4WHL Member
    edited July 2016
    If you have google chat ping me at [email protected] its faster.  I will be happy to help with these little things.  Once the library is installed properly it should work.


  • Ken - NM9PKen - NM9P Member ✭✭
    edited December 2016
    SUCCESS!  sort of...
    I now have limited control using the Hercules DJControl MP3 LE MIDI Controller.
    After loading the midibus library, the find midi device sketch worked.
    Then I had to change the access name in your main program from
    "Hercules DJControl Instinct"
     to
    DJControl MP3 LE MIDI"  and then it came to life.

    Unfortunately some of the controls so nothing, and all of the controls that do anything are in the wrong place and the tuning dials are very slow.  but this is a matter of tracing the correct midi note and replacing it on the controller.

    Thanks.

    Now, is there an easy way to move a control, knob or button and see a readout of what its code is so that I can direct it to the correct command?

    We are getting places now!

    Ken - NM9P
  • W4WHLW4WHL Member
    edited July 2016
    Ken emailed you, but will post here also

    To figure out what knobs and buttons are what, run this example code under the midibus library.

    Under examples its Contributed Libraries>The MidiBus>Basic


    Update this line as you did before:  myBus = new MidiBus(this, -1, "Java Sound Synthesizer"); //


    Then it should print out the numbers as you turn the nobs and hit the buttons.image

    Write down what channel/number(or pitch for buttons) is for each knob.  Then just take that info and edit my code.

      For example

    This is for rit freq up

    if ((channel == 0) && (number == Change this) && (value == 1)) {rit_freq=rit_freq+10;  c.write("C44|slice set 0 rit_freq="+rit_freq+"
    ");}

    This is for rit freq down

    if ((channel == 0) && (number == Change this) && (value == 127)) {rit_freq=rit_freq-10;  c.write("C44|slice set 0 rit_freq="+rit_freq+"
    ");}

    If you need help locating a particular function let me know.

    Once you get it going, I will help you speed you the dials to your liking.  Also the windows software that comes with the Hercules has a utility to change the jog speed.

    William
  • W4WHLW4WHL Member
    edited July 2016
    VFO speed select is more to slow it down vs speed it up, but who knows what your knob(whichever one it is) is set at.  This is the line to edit wit the correct number to match you controller.

    //VFO speed select
    if ((channel == 0) && (number == Change This)) {speed = value; slowdown=0;}

  • edited September 2018

    I received my Instinct today and have it working.  I must tell you it was a lot of fun figuring this out as I am not a programmer. 

    Thanks,

    Jeff N3VE

    Please keep posting updates as you complete them, thanks to you William.

    By the way what is your call?

  • W4WHLW4WHL Member
    edited July 2016
    great!! How is it working for you?

    W4WHL
  • edited December 2016

    Works quite well, now all I need is an Elmer to help with the PW-1 and ddutil


  • MH_FlexerMH_Flexer Member
    edited March 2015
    William, Thanks for all the effort and for sharing the files. For anyone who wants to go this route, below is an eBay link. Best Buy has them via the link for $129.95 with free shipping. http://www.ebay.com/itm/Hercules-DJ-Control-Instinct-2-Deck-DJ-Controller-Black-/191532833101?pt=LH_DefaultDomain_0&hash=item2c983f194d Dmr
  • W4WHLW4WHL Member
    edited July 2016
    Let me know if you think some functions should be moved or replaced.  I would like to maybe create a couple different layouts.

    one thing to note.  When using 2 slices, make sure the frequencies show up correctly in the MIDI software.  If not just move the slices with the mouse once and everything should sync.

    Also I would like comments on the VFO scroll speed.  My "Speed" dial was to slow it down, not speed it up.  So I could make fine adjustments.  But wondering if its fast enough?  It currently uses 10Hz stepping, 

    User defined layout may come one day, but that is 100x more coding.  So for now a couple popular layout options would be easier.

    William
    W4WHL

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.