Trying to build a Korg Triton implementation - need help starting #139
Replies: 2 comments
-
Is Orm detecting the synth? At first glance, it looks like def channelIfValidDeviceResponse(message): might be wrong. Try commenting out the last comparison line (put a # at the start):
then add the closing ): to the line above instead. Failing that, do the same to some of the others, temporarily. That could falsely identify a different synth as the Triton, but you can refine that later, once you see it working. EDIT: I missed the last part. The way to paste in a block of code in a github comment is to use three back tick characters in a row, before and after it - it looks like a single quote mark, or an apostrophe, but it slopes the other way. I always put those on a line of their own. |
Beta Was this translation helpful? Give feedback.
-
@AJRubenstein The MIDI log window and the console (the lower log view) of the Orm will be your friend. Carefully check the log window that there are no errors loading and starting your Python code, if any errors come up, they will be shown down there. And then print() in Python is redirected into the log window, so when you want to check your code (and make sure that it is actually run), use print() command liberally to see what is happening. It is pretty hard to attach a debugger to the embedded Python, so print debugging is probably what it is going to be ;-) The Python code written BTW is in no way dependend on the Orm - you can also run and debug methods in a standalone python editor (I always recommend PyCharm community edition). Have a look at the Matrix1000.py file in the Adaptations directory here on github and scroll to the very bottom of the file, you can see how I check that the script is run as a program and not from within the Orm, and how I use a hex string and convert it to binary data for testing my code: https://github.com/christofmuc/KnobKraft-orm/blob/master/adaptions/Matrix1000.py Let us know if that helps, and feel free to post more output/MIDI logs in case you get stuck! |
Beta Was this translation helpful? Give feedback.
-
Hey all,
I've been trying to use the midi implementation that's listed on the Korg website, and I just can't get it to reply to Orm. I've watched Orm send the message through Midi-Ox and seen no reply from the Triton, but when I open up Triton Edit Pro (a SoundTower librarian/editor program) I see it send the exact same string of SysEx to the Triton and it reveals all of it's secrets. Same situation if I send through the request via SysEx in Midi-Ox. So I'm kinda mystified - what am I doing wrong here?
// Built upon the Korg MS2000 file.
//
/ # This works for program mode only, combination mode seems to be more complex to support
def name():
return "Korg Triton Classic"
def createDeviceDetectMessage(channel):
// This is a sysex generic device detect message
return [0xf0, 0x7e, channel & 0x0f, 0x06, 0x01, 0xf7]
def deviceDetectWaitMilliseconds():
return 200
def generalMessageDelay():
# The 03R/W doesn't seem to like to get the messages too fast, so wait a bit between messages
# The better implementation would be probably to do a handshake implementation, as it will likely reply
# with a 0x23 DATA LOAD COMPLETED message on a program change message?
return 400
def needsChannelSpecificDetection():
return True
def channelIfValidDeviceResponse(message):
//# 1-4-1 UNIVERSAL SYSTEM EXCLUSIVE MESSAGE ( NON REALTIME )
//# DEVICE INQUlRY REPLY ( Transmits when received a INQUIRY MESSAGE REQUEST )
//# [ F0,7E,0g,06,02,42,50,00,mm,00,nn,00,vv,00,F7 ] 3rd byte g : Global Channel
//# 6th byte 42 : KORG ID
//# 7th byte 50 : TRITON series ID
//# 9th byte mm : TRITON mm = 05
//# TRITON pro mm = 0E
//# TRITON proX mm = 17
//# 11th byte nn : System No. ( 01 - )
//# 13th byte vv : System Version ( 01 - 2 )
// if (len(message) > 9
and message[0] == 0xf0 # Sysex
and message[1] == 0x7e # Non-realtime
and message[3] == 0x06 # Device request
and message[4] == 0x02 # Device request reply
and message[5] == 0x42 # KORG ID
and message[6] == 0x50 # TRITON series ID
and message[7] == 0x00
and message[8] == 0x05 # TRITON
and message[9] == 0x00
and message[12] == 0xF7):
// # Extract the current MIDI channel from index 2 of the message
return message[2]
return -1
This is all I've edited of the file so far. (sorry about all of the slashes, I couldn't work out how to turn off the markup!)
Thanks all,
AJ.
Beta Was this translation helpful? Give feedback.
All reactions