Home › Forums › General › Programming › position of data in sysex received
Tagged: SIX TRAK editor
- This topic has 58 replies, 6 voices, and was last updated 3 years ago by
flopasen.
-
AuthorPosts
-
March 6, 2020 at 6:03 pm #117258
Don’t know if it’s of any help but I saw a program somewhere written in basic (it’s from the eighties) for the six trak that deals with this problem if I remember correctly. I have to search for it so I’ll get back on it.
Can’t remember it had to do with midi cc or with the sysex.. so don’t hold your breath.
March 6, 2020 at 6:34 pm #117259Hi Tedjuh,
Dutch too, I assume? Would be nice! My main goal is to set a decent panel for the Six-Trak; with bidirectional communication, the correct way. I have bidirectional communication, synth gets parameters and sends parameters from and to the panel but the data is not the same. Have to figure it out. Panel sends in CC and synth sends in sysex. It’s challenging but fun!
March 6, 2020 at 8:03 pm #117260Dnaldoog, can you please explain this lShift and rShift again in a different way?
I think of this bit shifting as follows, please correct me if I’m wrong:
in a byte (I use alphabetical characters as placeholders)
a b c d e f g h
that is bit rShifted by (2,2), becomes
a b g h c d e f
Am I right?
Two positions off the start of the data, wich is ‘c’ the data is shifted 2 positions to the right and the ‘overload’ which is ‘e f’ is moved to the blank places at positions 3 and 4?March 6, 2020 at 11:04 pm #117264UPDATE! It’s getting to work; all ‘on/off’ switches work on sysex now! I’ve removed the CC because of the difference between CC and sysex. And the best thing is: it’s bi-directional. So they update correctly when receiving program data and the synth follows the changes made on the panel.
Now I’m going to match all the rotary values.
But how…. 😉
-
This reply was modified 3 years, 9 months ago by
EnzoF04.
Attachments:
You must be logged in to view attached files.March 7, 2020 at 12:26 am #117274It’s all really abstract in my head but your explanation is clear and I can wrap my mind around it from time to time. That’s really cool; good job on explaining how it works. Now my challenge is to change parameter data over sysex. For example the coarse frequency. I’ve experienced that it is a 7 bit parameter with a maximum of hex 60 (dec 96). On the Six-Trak the value’s are in half. on the panel 47 (dec) sent as b5 02 2f will become a parameter of 23 in the synth. So I need to make code where I calculate hex from component:getValue().
I did the code for switching the on/off parameters (1 bit) as follows:
swUnison = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) modUni = panel:getModulatorByName("modUnison") modUniValue = modUni:getModulatorValue() if modUniValue == 1 then modUniValue = 0x7f swUni = CtrlrMidiMessage({0xb5, 0x25, modUniValue}) else modUniValue = 0x00 swUni= CtrlrMidiMessage({0xb5, 0x25, modUniValeu}) end panel:sendMidiMessageNow(swUni) end
March 7, 2020 at 12:45 am #117275This is all you need there if the ctrlr modulator is a toggle between 1 and 0. Also in functions try to declare variables only used in that function as ‘local’ otherwise they become global. 🙂
swUnison = function(mod,value,source) local modUni = panel:getModulatorByName("modUnison"):getModulatorValue()*0x7f panel:sendMidiMessageNow( CtrlrMidiMessage({0xb5, 0x25, modUni})) end
I edited that post on r/l shifting and then it all disappeared, but it won’t let me repost; might try again later
March 7, 2020 at 12:50 am #117276OK, local declaration is a good advice! Didn’t know if they were global when ‘just’ declaring. If you are able to post it in a private message on the forum, I’d really appreciate it.
Here is my code for altering the other data.
rtrVcoCoarse = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) modVcoC = panel:getModulatorByName("modVcoCrsFreq") modVcoCValue = modVcoC:getModulatorValue() modVcoCMsg= CtrlrMidiMessage({0xb5, 0x02, modVcoCValue}) panel:sendMidiMessageNow(modVcoCMsg) end
March 7, 2020 at 12:58 am #117277That looks good to me, with the addition of local mdVcoC and local modVcoSMsg! Is b5 channel 6?
March 7, 2020 at 1:04 am #117278You can use any channel using this code:
local channelOut=panel:getProperty("panelMidiOutputChannelDevice") local statusByte=0xb0+(channelOut-1) modVcoC = panel:getModulatorByName("modVcoCrsFreq") modVcoCValue = modVcoC:getModulatorValue() modVcoCMsg= CtrlrMidiMessage({statusByte, 0x02, modVcoCValue}) panel:sendMidiMessageNow(modVcoCMsg)
March 7, 2020 at 1:05 am #117279I observed the midi monitor; what was going out when I changed the slider on the panel. b5 is the sysex of parameter change, second byte is the parameter (similar to the CC) in this case it’s parameter 02 and the third byte is the actual data. For parameter 02 (coarse frequency) it can be between (hex) 00 and (hex) 60.
March 7, 2020 at 1:15 am #117280Confused again. When sending sysex it needs to start with F0 then 01 (for Sequential) and end in F7, right?
b5 02 value
should be a CC message (sending out on channel 6).
-
This reply was modified 3 years, 8 months ago by
dnaldoog.
March 7, 2020 at 1:36 am #117281Confused again. When sending sysex it needs to start with F0 then 01 (for Sequential) and end in F7, right?
b5 02 value
should be a CC message (sending out on channel 4) I think.
I guess you are right. And when doing this, I need to shift bits because in the sent bytes the last bit(s) are ‘X’-ed out when data is smaller than 7 bits. That will do the trick, I guess.
-
This reply was modified 3 years, 9 months ago by
EnzoF04.
Attachments:
You must be logged in to view attached files.March 7, 2020 at 2:30 am #117284Dnaldoog, could you please help me with shifting the bits in the parameters with a range?
I’ve come to the conclusion that that is what I need to do. But how! 😉
I’ve got a modulator on the panel and I fetch the value of it in this way: (not perfect but works for me)
local modVcoC = panel:getModulatorByName("modVcoCrsFreq") local modVcoCValue = modVcoC:getModulatorValue()
Let’s say that the value is 8 (decimal). That is in binary:
0 0 0 0 1 0 0 0
I need to alter the bits into:
0 0 0 1 0 0 0 0
I guess I have to store the modVcoCValue into an other variable (in Hexadecimal) and can do the bit operations in that variable. I need a for i = 1 to 7 (7 bits to be shifted). And after that I have to handle the altered hexadecimal variable to a midi message.
Hope you can crystallize a decent work around for this? Many thanks again!
September 14, 2020 at 11:37 pm #119800Goed bezig!
This is great. I am looking forward to implement something similar in the Panel that I am making.
Both on Patch level and on Program level, a Program can contain between 1 and 6 Patches.Would be great to have the Panel reflect the current Patch settings because the Mirage, just like the Six Trak, only has a 2 digit display and no further knobs or sliders.
Updating a 25 year old Editor
October 31, 2020 at 12:19 am #120478hello,
I bought a SCI MAX recently which is functionally almost indentical to a six-trak except without unison.
I’ve made a beautiful MAX panel for editing all the CC values on 6 channels but MAX doesn’t allow for local storage of presets. My end goal is to be able to read values in my panel and be able to calculate and output those current values into a sysex file for later importing. All pie in the sky hopes and dreams for someone who can’t really program much at all.
This bit table issue is something new to me also and I’m trying to wrap my head around it, just wanted to say you are not alone in trying to devise an interpretor for CC <-> sysex on six-trak / max.
Tedjuh referred to an image from the 80’s about a BASIC procedure for allocating bytes in positions, I found that image last night on my quest
you can find more information about the BASIC procedure here:
http://www.muzines.co.uk/articles/spectrum-midi/7920So if there’s isn’t any other way a lowly noob programmer can sort it out, I might just have to try and do what the old six-trak players did a plug in a virtual c64 ;-;
Attachments:
You must be logged in to view attached files.October 31, 2020 at 10:04 am #120485Totally forgot I had to add that link to my post. Thank you for that. Not that the link is very useful though.
You say that the MAX doesn’t allow for local storage of presets. Are you sure? Because the manual says the MAX has 100 preset banks, 80 that are preconfigured, 20 empty banks where you can store presets. Ok, you need a Prophet 8 or a Commodore 64. Probably have one laying under the couch somewhere. Or search for: “Free patch editor software for the Six-Trak and MAX”. on uncle Google. That is if you are on windows. And I don’t know if it works on Windows 10 either or maybe in compatibility mode. I don’t even know if it is able to store presets to the 20 empty banks.
But there is another way.
For storing presets locally on the computer, Dnaldoog made a Universal Sysex Dump Recorder. Now the only thing left is to make your panel react to those Sysex messages. You can build your own preset manager then. How to decipher the Sysex is well-described in this topic. And you will need to write some Lua to make the panel react to those Sysex files.
Think of a ListBox or ComboBox with some Sysex presets. When you click on one of those presets, the Sysex is then handled by a midiReceived Lua file. It shouldn’t send out the Sysex but handle it locally. That will make your panel reflect the Sysex preset and since Ctrlr is bi-directional the MAX will take over those values for the parameters. Quite a task for a lowly noob programmer, I know.
I wish I could be more helpful than this but in all honesty, I’m too busy with other things at the moment. My gf needs someone to do the heavy lifting at Ikea and groceries.
November 2, 2020 at 6:56 am #120496Until you dump a sound from an external source to presets 80-99, you can’t even access those 20 spaces using the buttons on the synthesizer, so what i meant by local storage was that nothing stays permanent and anything new must come from external dump.
You can tell MAX a sysex string and it will calculate a sound based on it. But no matter how many CC values you change afterwards, you don’t get to send program from MAX and receive a new sysex byte sequence reflecting those CC changes. It will just send back the string you originally sent, at least that’s in my case. MAX seems to operate on a one way system.
I’m trying to craft a sound using a software controller, and then saving the array of parameters on that controller as a converted sysex preset string that can simply be sent to the synth at a later time. With MAX, it seems you must at least dump something to 80-99 just to even access them as sounds you can hop between, otherwise your CC sent presets on 00-79 are reset upon sound change.
SynLib works but is very much dated and has some concerning bugs.
Ctrlr with robust sysex functionality would help this synth a lotNovember 2, 2020 at 9:53 am #120501Hi flopasen,
Attached is a panel EnzoF04 and I had been working on. I don’t have a SIX-TRAK or SCI-MAX so I can’t vouch for its working, but maybe it will help you. The trouble is the deciphering of the sysex is pretty complex and you might find it very confusing. It is!
Good luck and let me know if this panel helps you or even works with your synth.
Posted with the kind permission of EnzoF04
Attachments:
You must be logged in to view attached files.November 12, 2020 at 6:29 pm #120643Thank you very much dnaldoog, EnzoF04 and Muve!
This is the best work so far and I hope to learn and build upon it.
It seems for months I’ll be studying each section and how it is applied. This is highly illuminating and a lot more fun than the spreadsheet arithmetic I was doing before. -
This reply was modified 3 years, 9 months ago by
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.