[Advanced] MIDI Scripting

Everything about FutureDecks Pro. (wish list, community skins, skindesigner)

Re: [Advanced] MIDI Scripting

Postby Xenobase » Thu Dec 22, 2011 5:47 pm

Also it would also be great if setDeckPan and setDeckFilter would be added to the list of ACTIONS :)
User avatar
Xenobase
Volunteer Moderator
 
Posts: 570
Joined: Tue Jun 17, 2008 1:07 pm
Location: The Netherlands

Re: [Advanced] MIDI Scripting

Postby ChefMix » Tue Dec 27, 2011 12:26 am

In response to Xenobase response to my Hercules RMX issue

Yes I used the Learn function to program those buttons. How would I do the MIDi scripting?
MakingMusicWithFood
User avatar
ChefMix
 
Posts: 14
Joined: Wed Jan 19, 2011 1:34 am

Re: [Advanced] MIDI Scripting

Postby Xenobase » Tue Dec 27, 2011 11:08 am

You can only fix your issue by making your own midi mapping for the Hercules RMX. That means: program every single button for FDP. You can use vims post to get you started. There is unfortunately, no other way :(
User avatar
Xenobase
Volunteer Moderator
 
Posts: 570
Joined: Tue Jun 17, 2008 1:07 pm
Location: The Netherlands

Re: [Advanced] MIDI Scripting

Postby ChefMix » Wed Jan 04, 2012 11:07 pm

Wher do I find the Midi map for FDP
MakingMusicWithFood
User avatar
ChefMix
 
Posts: 14
Joined: Wed Jan 19, 2011 1:34 am

Re: [Advanced] MIDI Scripting

Postby Chris » Thu Jan 05, 2012 2:46 pm

There is no such thing as a MIDI map for FDDJp. There are many actions that you can use to map controllers (these actions/notifications are on the first page of this topic).
User avatar
Chris
Developer
 
Posts: 120
Joined: Thu Nov 11, 2010 5:14 pm

Re: [Advanced] MIDI Scripting

Postby Xenobase » Wed Feb 22, 2012 9:41 am

Vim, you can discard my posts on the previous page! I was able to light the LEDs using a small piece of code outside the notificationsreceived function (was not sure if that would work).

Code: Select all
sendMidi(uniqueId,0x90,0,0x**,(data2 ? 0x7F : 0x00)); // ** = button midi signal


The only two things the script lacks is a setDeckPan function and the fxSel LED staying lit. Any chance of these functions getting added? Otherwise I will start optimizing the script.
User avatar
Xenobase
Volunteer Moderator
 
Posts: 570
Joined: Tue Jun 17, 2008 1:07 pm
Location: The Netherlands

Re: [Advanced] MIDI Scripting

Postby vim » Wed Feb 22, 2012 3:32 pm

we don't have pan (just the autopan effect but that's something different).
As for the others I'll put it in the TO DO list
User avatar
vim
Developer
 
Posts: 796
Joined: Tue Aug 02, 2005 8:30 pm

Re: [Advanced] MIDI Scripting

Postby Heady » Tue May 01, 2012 12:13 pm

I've been trying to get scripting to work with my Hercules DJControl MP3 e2. I have the Sysex ID and given it's controllers are almost identical I used the Hercules MK4 script as a basis for it (changing the SYSEX ID obviously). But no matter what I do, I can't change anything. Is this a side effect of the native support in FDJ?
Heady
 
Posts: 14
Joined: Wed Aug 19, 2009 1:33 pm

Re: [Advanced] MIDI Scripting

Postby Chris » Thu May 03, 2012 10:59 am

Yes, this is a "side effect" from the native support. This can be resolved...but once scripting has been allowed for the MP3 e2, the controller will no longer be natively supported. In any case, I will talk to vim about this and let you know.
User avatar
Chris
Developer
 
Posts: 120
Joined: Thu Nov 11, 2010 5:14 pm

Re: [Advanced] MIDI Scripting

Postby momogtone » Thu May 17, 2012 5:25 am

hello!
I'm doing a script for Denon midi HC1000S, but even I can not do that work.
I hope I can help my script to work,
I pass my script to see if I can say that I am mistaken and how I can solve.
THANKS!!!!!
Code: Select all
function getLanguageVersion()
{
   return 1;
}
function getFileVersion()
{
   return 1;
}

function getControllerUserFriendlyName()
{
   return "DN-HC1000S";
}

function getControllerType()
{
   return 'midi';
}

function getSupportedMidiSysExIdString(osId)
{
   
   return false;
}

function getSupportedMidiDeviceNameForInput(osId)
{
   
   return false;
}
//-----------------------------------------------------------------------------
function getSupportedMidiDeviceNameForOutput(osId)
{
   
   return false;
}
function getSupportedHidDeviceVID(osId)
{
   return false;
}
//-----------------------------------------------------------------------------
function getSupportedHidDevicePID(osId)
{
   return false;
}

function getSupportedHidDeviceName(osId)
{
   return false;
}

function controllerInit(uniqueId)
{
   debug('controllerInit DN-HC1000C ['+uniqueId+']');
}

function controllerDeinit(uniqueId)
{
   debug('controllerDeinit DN-HC1000C ['+uniqueId+']');
}   

function messageReceived(uniqueId,status,channel,data1,data2)
{
   var messageNotProcessed=false;
   switch(status)
   {
   
   case 0x80:
   case 0x90:
      if(status==0x90) data2 = 0x40;
      if(status==0x80) data2 = 0;
      switch(channel)
      {
         // program 1
         case 0:
         switch(data1)
         {
         // deck A
         case 0x45: call('deckCue', 0, data2); break;
         case 0x1D: call('deckPlayPause', 0, data2); break;
         //case 0x2A: call('deckCuePlay', 0, data2); break;
         case 0x07: call('deckSync', 0, data2); break;
         
         
         // deck B
         case 0x7E: call('deckCue', 1, data2); break;
         case 0x7A: call('deckPlayPause', 1, data2); break;
         //case 0x26: call('deckCuePlay', 1, data2); break;
         case 0x5F: call('deckSync', 1, data2); break;
                        
         default: messageNotProcessed = true;
         }
         break;
         
         // program 2
         case 1:
         switch(data1)
         {
         // deck A
         case 0x37: call('deckLoopInEnd', 0, data2); break;
         case 0x39: call('deckLoopExit', 0, data2); break;
         //case 0x2E: call('deckLoopPrev', 0, data2); break;
         //case 0x2C: call('deckLoopNext', 0, data2); break;
         
         
         // deck B
         case 0x7B: call('deckLoopInEnd', 1, data2); break;
         case 0x7C: call('deckLoopExit', 1, data2); break;
         //case 0x2A: call('deckLoopPrev', 1, data2); break;
         //case 0x27: call('deckLoopNext', 1, data2); break;
                        
         default: messageNotProcessed = true;
         }
         break;
      }
   //-----------------------------------------------
   default: messageNotProcessed = true;
   }
   if(messageNotProcessed) debug('messageReceived ['+uniqueId+'] - status:'+status+' channel:'+channel+' data1:'+data1+' data2:'+data2);
   return !messageNotProcessed;
}
function notificationReceived(uniqueId,name,deck,param1,param2,param3)
{
   //debug('notif ['+uniqueId+'] name='+name + ' deck='+deck + ' p1(int)='+param1 + ' p2(float)='+param2 + ' p3(str)='+param3);
}

function timerTick(uniqueId)
{
   //debug('timerTick ['+uniqueId+']');
}
//-----------------------------------------------------------------------------
User avatar
momogtone
 
Posts: 13
Joined: Tue Dec 21, 2010 7:18 am

Re: [Advanced] MIDI Scripting

Postby momogtone » Sat May 19, 2012 3:04 am

User avatar
momogtone
 
Posts: 13
Joined: Tue Dec 21, 2010 7:18 am

Re: [Advanced] MIDI Scripting

Postby Xenobase » Sat May 19, 2012 1:36 pm

That is the bad part of midi scripting for FDP, debugging is frustrating :roll:
I could not find any problems in your code, so I'm guessing it is something logical missing. DebugView returns a "script ok" message, so the syntax of the file should be ok.

Did you try retrieving a SysEx from MidiOX and putting it in getSupportedMidiSysExIdString() function (instead of "return false;", "return sysexofthedn-hc1000s;"?
If you need any help with retrieving the SysEx, let me know :)
User avatar
Xenobase
Volunteer Moderator
 
Posts: 570
Joined: Tue Jun 17, 2008 1:07 pm
Location: The Netherlands

Re: [Advanced] MIDI Scripting

Postby momogtone » Sat May 19, 2012 6:45 pm

Xenobase wrote:That is the bad part of midi scripting for FDP, debugging is frustrating :roll:
I could not find any problems in your code, so I'm guessing it is something logical missing. DebugView returns a "script ok" message, so the syntax of the file should be ok.

Did you try retrieving a SysEx from MidiOX and putting it in getSupportedMidiSysExIdString() function (instead of "return false;", "return sysexofthedn-hc1000s;"?
If you need any help with retrieving the SysEx, let me know :)


Hi
Only the first 3 bytes are 00 40 03 which are for the manufacturer but not the other two bytes, which are the model.
Is there any software for the sysex id? Thanks :)
User avatar
momogtone
 
Posts: 13
Joined: Tue Dec 21, 2010 7:18 am

Re: [Advanced] MIDI Scripting

Postby Xenobase » Sun May 20, 2012 2:06 pm

With this short tutorial you will be able to retrieve the SysEx id of your controller (if the controller supports it):

1. Download and install MidiOX: http://www.midiox.com/zip/midioxse.exe
2. Open MidiOX and, in the menu, go to "Options" -> "Midi Devices"
3. A new window will appear. In the top left corner, under "Midi inputs:" select your midi device (Denon HC1000S). Don't close the window yet.
4. Under "Midi outputs:" again select your midi device (Denon HC1000S)
5. Now close the window by pressing "OK"
6. In the menu go to "View" -> "SysEx...", a new window will appear.
7. Under "Command Window" and "Plain Text" paste this in the textfield: F0 7E 7F 06 01 F7
8. In the menu go to "Command Window" -> "Send/Receive Sysex", a new window will appear. Wait for it to complete, then press "OK"
9. Under "Display Window" and "Plain Hex" and "17 Bytes Received" you will see a long string of numbers inside the textfield.
10. Ignore the first 5 bytes: "F0 7E 00 06 02" and ignore the last 7 bytes: "05 00 02 04 00 00 F7", in between you will find the 5 bytes that represent the SysEx of your controller :wink:

Some notes:
If you first opened MidiOX and then FutureDecks DJ Pro (keeping them both open), your controller will not be recognized by FutureDecks DJ Pro. MidiOX "occupies" the midi controller making it only available in MidiOX. If I'm not mistaking, it also works the other way arround.

The 5 bytes of the SysEx contain the Manufacturer ID (first 3 bytes) and Model Number (last 2 bytes).

Credits for the sysex identification request command and default 5 first bytes goes to Xylio :roll:
User avatar
Xenobase
Volunteer Moderator
 
Posts: 570
Joined: Tue Jun 17, 2008 1:07 pm
Location: The Netherlands

Re: [Advanced] MIDI Scripting

Postby momogtone » Mon May 21, 2012 2:05 am

User avatar
momogtone
 
Posts: 13
Joined: Tue Dec 21, 2010 7:18 am

PreviousNext

Return to FutureDecks DJ pro

Who is online

Users browsing this forum: Bing [Bot] and 2 guests