Duplex with M-Audio Axiom MKII

So i finally managed to use the states class, it’s fantastic and make the things a lot more easy to configure :slight_smile:

One things i couldn’t explain is the error when i use a state with underscore in the name (like Midi_Out) althought there’s no error when the name has no underscore… (MidiOut) [trying to index field … (a nil value)]

I’ve tried to look at the StateController class but that’s a little too complex for me (like the xarg ??? what’s this ? ^^ current argument ?)

From there’s, there’s two things to do, timing (will not comment on this ^^) and instrument map… not sure about how to link to vsti parameters, i think about saving defaut midi assignation in each vsti (like in normal mode) and load a file with the name for each of them but that method exclude vsti who can’t store a defaut midi map.

For now, i start to rewrite some functions and the xml configuration file as i need to include the state possibility for a lot more complex config but that’s a cool task ^^

The code could be a lot more light now thanks to state class, great addition to duplex !

So i finally managed to use the states class, it’s fantastic and make the things a lot more easy to configure :slight_smile:

One things i couldn’t explain is the error when i use a state with underscore in the name (like Midi_Out) althought there’s no error when the name has no underscore… (MidiOut) [trying to index field … (a nil value)]
I’ve tried to look at the StateController class but that’s a little too complex for me (like the xarg ??? what’s this ? ^^ current argument ?)

Hm, the underscore thing is probably something I have overlooked, good you have found a working solution for now.

From there’s, there’s two things to do, timing (will not comment on this ^^)

I guess the Scheduler is causing some headache…
Consider the following code (running within the context of some imaginary application):

function SomeApp:some_class_method()
  self.display.scheduler:add_task(
    self,self.print_to_console,1,"One","Two","Three")
end

function SomeApp:print_to_console(arg1,arg2,arg3)
  print(arg1,arg2,arg3) -- prints "One, Two, Three" to console
end

Calling the scheduler in this way should invoke the print method approx. 1 second after being called, with the supplied arguments handed over automatically.

In your case, you want the task to schedule itself repeatedly, updating the LCD screen each time. So, either you schedule all tasks at once, giving each task a slight offset in time so they would execute after one another or you would schedule a single task, which in turn would schedule the next one.

By creating a variable that point to the scheduled task, you can also “unschedule” the task at any time.

-- create the task and store the reference
self.my_task_ref = self.display.scheduler:add_task(
self,self.print_to_console,1,"One","Two","Three")

-- immediately cancel the task
self.display.scheduler:remove_task(self.my_task_ref)

This would be needed if you choose to schedule everything at once, clearing any existing tasks before creating new ones.
You would have to decide which approach is more suitable, I guess.

Whow big thanks Danoise, don’t know why but i’ve just found the way, your exemple is perfect ^^

It made the click!

I was sending to sysex function but when i use my send_text function which send to the send_sysex, everything works fine :slight_smile:

Just had to replace some send_text by send_temp_text function in the program and that’s done !

Now i really have the feel to control everything, that’s great ^^

Little recap :

When i start Renoise, axiom start in directlink mixer mode. I could select a track and then press a button to enter track mode, then every faders and encoders are mapped to the corresponding mode.

In track mode i could navigate between FX device, display GUI, and change banks of parameters with encoders.

Faders control a basic EQ i attach to each track loaded.

Every parameters display their name on screen (FX param, mixer param) + the active mode.

I could change track and bank of track with shift but i just discovered that hold button who change track change bank too (1.5 sec hold i think), don’t know why but that’s a nice effect ^^

In Mixer Mode, i control the mixer as you could expect, nothing really new here, don’t know what to control in this mode with encoders (pan will be controlled by encoders when free from directlink as i don’t need return name for those type of parameters)

I could select Instrument, display their name and their gui (same with the fx).

I have 2 or 3 little bugs to investigate and then i could start the instrument mode…

Before starting the instrument mode i will try to do a clean interface too as it’s little buggy for the moment (little things but…^^)

Really happy to see how it start to be althoug i’m sure the code is really slowdown the program and a lot of optimization should be possible…

PS : whoop’s i forget the scrolling function… but that will be cool with the timing ok…

Edit : scrolling function done :slight_smile:

Some little bug for some situation with lot of text to send in limited time but that’s juste little thing to do in my code…

Will finish the Defaut mode soon (mixer+track) and start to think on how to do for the instrument mode… what i fear for the instrument mode is for changing bank of parameters, that seem’s really hard to do for the moment as the parameters will have the same CC. I could use the free directlink mode but that mode doesn’t allow displaying name.

For FX, it’s a duplex option (thanks for that ^^), could it be imaginable to do the same thing on VSTi ? In addition to load a file with parameters name, i coul load a fx chain maybe this could help… but i can’t use different midi channel with directlink… Or maybe receive directlink midi channel and convert to the wanted channel with 8 params on ch1, 8 on 2 etc ? As VSTi works on global midi channel by defaut, it could be possible to doing banks with state but i’m not sure…

Load a file cannot help on this, it could help on naming parameters per instrument but i can’t think of a single way to do multi bank with a file…

Some new’s about the driver, i’m finally at the final stage of the defaut mode, fixing some bugs and improving code…

Here some bug i encounter (mixer with bank of 8 parameters) :

-On mixer, when i change bank from track 8, nothing happen, no error, but no track change…

-Same on track 16 when press bank - but this time it crash duplex wit std logic error, told invalid_selected_track_index ‘0’ !? It comes from Mixer function, i need to bypass my code about mixer to see what happen…

-In Track Mode i would like to select FX by button (which is the case for now) but bypass FX 1 (mixer) and 2 (filter or eq) as those were mapped to fader no matter the selected fx. I guess i need to add midi_actions for FX 2 and redone the function from Mixer class but for device > 2 only. But just in case there’s a more easy method ^^

-Some bugs with scrolling function when i change parameters to display too fast plus some weird things happening under some circumstance, i need to trace some global variables about scrolling and temp_text…

Ok now the most hard thing to do, controlling VSTi…

So in Renoise it’s easy as “hello”, just use midi learn, save the map for each VSTi and that’s done.

Now the first problem is the absolute encoders who don’t send correct value to Instrument (although they work fine on VST, mapping done in duplex) so is there a way to map instrument with duplex or more simple just bypass the mapping in duplex and doing like we can do on renoise with midi learn from instrument but with duplex in the middle just to update the virtual UI, convert absolute to relative and have condition on those actions ?

I could load a file with every paramaters name for each instrument, but how tell duplex he’s controlling this or this instrument (vst) ?

Maybe the most simple is to load a doofers with each Instrument loaded but is that possible ? I’ve find the way to load a selected device on selected track (each time track is created) but is there a way to select a preset in the doofers and load this when loading the corresponding instrument… I’m sure there is ^^

Just some though, i don’t wait for answers ^^

But if someone as some ideas about the best way to control VSTi with duplex, you’re wecome !


Edit : ok i just discover a really dull thing ^^

DirectLink doesn’t provide the ability to change CC number so i must change state or config in duplex to control something else with same CC (up to there it’s ok). BUT VSTi receive all data from the CC number they are assigned to no matter which duplex config is running, and i must assign them to DirectLink CC otherwise i couldn’t have name display so the question who come to my mind : is there a way to “block” cc communication with vsti ?

I couldn’t change channel too… (why blocking all manual config in directlink is beyond me, really i couldn’t understand the deal with this, the hardware could do that but m-audio really does all wrong here plus the fact they not provide anything to use directlink)

Basically the two available mode on axiom use each half of the axiom possibility (??!! what’s wrong here)

Maybe it’s possible to “convert” CC number in duplex ? or with Renoise API if not implemented in duplex ?

I see in Midi Dump that Renoise receive on channel 16 and send on channel 0 (global) so maybe there’s a way to convert CC or ch number all in software ?

That’s seem’s really unlikely now i think of it as renoise receive the date before duplex read them i think ^^

…but if i’m wrong, everything could be possible…

Any though on a method here to control vsti only on one exact config and not the others please ?

What is not entirely clear to me - are you creating a “driver” for the Axiom with some kind of built-in mixer-like features?
You could delegate that functionality to the Duplex Mixer application, but I’m actually not sure if that’s what you are already doing…

I’m simply asking, because I’m curious. There are no right or wrong way to do things. But it would be nice if you could load e.g. the Effect application onto the keyboard, as it will allow you to make control dedicated parameters (well, any parameter you can see in a Renoise mixer anyway).

When it comes to VST control, have you tried loading the Effect application, and choosing “Mixer parameters” as a parameter subset from the options? This will filter out any parameters except the ones that are visible in the given track. Thus, you could bridge a plugin with your controller simply by adding a plugin automation device.

effect-param-subset-mixer.png?raw=1

IMHO, this is a very nice way to control any plugin with Duplex, without the need for external configuration files at all.
You could save presets for the Instr. Automation device, so you have a nice selection of parameters for each type of plugin, and then show/hide the parameters you want/need for each project (song).

Hi Danoise, happy to see you ^^

I use the built in mixer and effect application from duplex. what i write in my driver is just the text to send and the basic mode change.

I’m sure there’s a lot i could use from duplex that i don’t use now as i find more easy to deal with Renoise API than with some Duplex feature.

But i need to increment bank directly in my code for exemple in order to control which text to send.

The effect application is perfect for my need, i control every VST as it should, every parameters name display on screen. The only thing i want to change is the fact the FX selection with button start at FX 1 when i need to start at FX3.

The problem is more on VST instrument but you’ve just give me an exemple i haven’t think of… with this way i can delete the defaut mapping on vsti and control exactly what i need when i need. Is there a way to load the corresponding device with corresponding preset when loading the instrument ?

I send you the xnrx in few minutes but please keep in mind it’s really far from finish, even if the defaut mode is ok without too much bug, the code could be improved a lot. i knowing nothing in lua few weeks ago so please be clement ^^

I prefer to not put it here for the moment as it’s really alpha 0.01 version ^^

Plus the virtual ui is really basic for the moment but will be improved a lot later. There’s a lot of unused variables too, here just in case…

I’ve had some bug in virtual ui with state with complex config, state overlap with others etc, but it’s deleted from the file now, will trying to explain and provide an exemple later…

Basically here’s the description of what i’m trying to do :

There’s 3 modes, defaut mode who provide mixer and track mode and instrument mode.

Transport is ok.

Basic Function :

-Patch button change instrument, display current gui if there’s one and close previous one.

-Instr switch duplex config to instrument mode (controlling the current vsti or sample instr) toggling button, return to defaut mode.

-now we have 4 buttons, shift (1st one) and 3 freely assignable.

button 2 and 3 move between track when shift + those buttons move between tracks bank. The 4th button enter in track mode (or return un mixer when in track mode, toggle button, switch state)

-Mixer Mode : faders control vol by bank of 8 tracks, button on/off the track, fader 9 control (current or master track, need to decide), button 9 solo current track. Encoders are not assigned in this mode as i waiting to see what i can do with instruments…

-Track Mode : faders control fx device 1 (mixer) and 2 (need to code for the 2nd as i need to control it even if it’s not the selected device in the track like it is for mixer device… probably a basic filter), buttons control fx device selection, button 1 to 6 for fx 3 to 8 (now 1 to 6 with duplex Effect application) and button 7 and 8 for prev and next fx device.

Encoders control the currently selected fx (open and close gui for vst) and i change bank with +/- from transport button (not assigned in mixer mode)

Basically the track name and instrument name are the only permanent text, but this could change… (the instrument name will stay permanent only in instrument mode otherwise it’s the track number or name in defaut mode)

-Instrument mode : everything mapped to instrument with display name of parameter and i need to choose which one, not as for fx when all parameter are mapped by defaut…

The Instr Automation with preset per instrument seem’s to be the best way…

Pads are assigned for toggle Renoise preset view in free mode, don’t know what i could do with that in directlink mode…

Big thanks for your help :slight_smile:

Edit: hmmm the instr automation device will be assigned to a track so i need to assign each instr to a track… not a big deal but i imagine it’s difficult to think of an efficient autoload config in that case…

Or i could load instr auto by defaut on each track and load the preset when i load the instrument on the track i’m at that time…

Edit 2 : just a though, i trigger everything with midi data but maybe it’s more efficient to trigger name display with renoise observable event… ?

Thx, got the files. It’s more clear what you are trying to achieve now :slight_smile:

with this way i can delete the defaut mapping on vsti and control exactly what i need when i need. Is there a way to load the corresponding device with corresponding preset when loading the instrument ?

Not at the moment, no, but it should be possible to create such a link. You could write a “helper application” that would check for such changes, maintain a database of known VSTs and their preferred parameters, and then set up a instr. automation device. After which, the Effect application would do the rest for you.

Think of it as being modular in nature - each application doing a specific task, but somehow having a common goal. I have tried to make this a design philosophy in Duplex, that applications like Effect listen for information that can be obtained through Renoise - in this case, which sliders that are visible in the mixer.

Hmmm ok…

I’ve tried some thing with Instr Automation, i think it could be cool if :

When i insert track, device 2 is a filter and device 3 a instr automation. So in track mode buttons could select fx 4 to 9 (as i have 6 buttons for that), faders control fx 1 and 2 and encoders the selected fx between 4 and 9.

Now if i go in instrument mode, the whole keyboard is mapped to instrument (so device fx 3 - instr automation), that sound great !

Plus i don’t have to deal with external file with this method…

BUT ^^

if i do that, i control the instrument only on a precise track so the hard thing would be to change preset on the run to correspond to the selected instrument. That’s better than load at instrument loading as i could change track and keep the same instrument… Not sure i’m really clear here ^^

Just a little thing too, it’s really slow on instr gui when controlling with instr automation although it’s perfectly smooth with direct midi learn assignation…

… so i continue testing…

Edit : RoamingDSP could be really helpful i think, i’ll test this…

Edit : there’s the linked plugin to set too, so there’s 2 parameters to set (preset and linked plug) to have the corresponding map… it will be cool if one of them could be automated…

Edit 3 : one more thing to do, convert parameters name into string with less than 5 char for the most common parameters like cutoff could be cutof (resonnance->reso, envmod->envM etc) avoiding a scrolling who is less clear than a fixed text even if it scroll one time only.

I’ve just set the instrument mode, made the defaut map and start to see what i can do with instr automation…

I’ve set the midi in on directlink (not directlink (wdm)), now the parameters on vsti gui is smooth like with direct assignement :slight_smile:

Ok more Edit ^^ :

will use the possibility to control parameters visible in mixer for a easy/macros control of instrument in defaut mixer mode, it allow me to adapt to every song and have the most importants parameters for each song/track, mix fx parameters with instruments one, it offer a lot of flexibility !

Then in instrument mode all the parameters are controlled…

Hmmm that start to sound fantastic ^^

Finally, now i know what i want for every mode and parameters but something get me mad yesterday…

I would like to trigger the defaut option of the controlled parameters from Effect application with the mode change.
I ve tested a lot of things but state couldn’t help in this case as i need to assign the same mapping to two different group and everytime i try something, only the last group defined in mapping work whatever the state i’m on.

So i’ve tried to change the value of the options in my program, i have no error message, when i print the value, it’s the good one but the controlled parameters stay the same. The only way is to change it in the duplex menu but i’m sure there’s a way to change the value in the program ?
I use the propertie ,value, but maybe it’s not the good one to use…

I could do another duplex configuration and that’s done but now with what we could do with state, it would be a pity ^^

I even think of doing only one configuration and toggle all possibility with state but i’ve tested for the instrument mode and i don’t know how to share parameters mapping into 2 or 3 groups. Need to control ‘parameters’ from Effect application with more than one group… as the whole keyboard control the same mapping field, i’m not sure about how to do that without changing radically the virtual ui but will test some things with the ui.

Now for the map i load instr auto everytime i add a track, then the current plugin selected is automatically linked. Now i will compare instr name with device preset name (i think i could do that from what i‘ve read from the API) and then select the good one.

If i select instr mode then i will search in all tracks the first one to have the same preset name on instr auto device and then select this track, select the device, and that’s done. If i have more than one track with the same instrument, i will use track navigation but in instr mode, it will navigate only thought the track who have the correct device with corresponding preset.

Now if i change instrument in instr mode, the whole process for identify the good track restart…

everytime i try something, only the last group defined in mapping work whatever the state i’m on.

Could you share the sources again, so I can take a look?

You’re diving deep into this state business, maybe there is something I’ve overlooked :badteeth:

Of course yes, i was not at home for 3 days but send you the files tonight or tomorrow as soon as i’m back…

Ok some news ^^

So after hours and hours on text, it’s now finished, no bug even if a lot of parameters are controlled at same time, scrolling, permanent or temp text, everything is fine.

I’ve certainly miss some as it’s hard to test every possible actions but that seem’s stable when i use it…

The possibility to create and remove nominative task in scheduler is fantastic :slight_smile:

Now i investigate on this :

When i’m on track 8, i couldn’t change mixer bank, my program seem’s to react as it should with correct bank number, track number etc, no error but Renoise stay on track 8.

Now on track 16, a minus bank action crash the program with a str logic error 'invalid selected track index ‘0’. The error start from the function Midi_callback, send_message (copy from MidiDevice class in Axiom file) to end at the function ‘_set_track_page’ in MIxer.lua

A bank + on track 16 do nothing as on track 8 even if my bank and track variables are correctly updated…

On track 24, some weird things happen… Don’t know why but there’s a problem with the last track of every bank…

I sometimes have a crash when selecting a device but i couldn’t reproduce it for the moment, it seem’s totally random (and rare) but we all know it’s not ^^

In add of that, here what’s remain to do :

- Mixer Mode : control mixer sub param with encoders (device param in track mode is done)

for now, i’ve made 2 states but i’m trying now to change the param subset value with the state…

- Track Mode : control FX2 on current track with the first 4 faders even if device is not selected

done nothing about this but from what i see on Renoise API, it seem’s not so complicated but i could have some surprises one more time ^^

  • Instr Mode : focus on device 3 is done, now i need to find a way to include that in a state rather than a duplex config so i need to assign more than one map group to only one mapping field… (parameters from selected device with Effect application)

  • Instr Mode : compare device preset name is not so easy finally… need to find a way to find the track related to the selected instrument… I have some idea about this but it need some tests…

  • Instr Mode : redone the function who send instrument name in order to delete the preset name at the end of the name. I even planed to do a data bank with every name and their corresponding name to display (Bassline could be Bssln which avoid a scrolling… or maybe scroll every x sec…) Don’t know on this as this is related to specific VSTi and then is unusable by others with différent instrument…


Edit : after more test for the bug with mixer tracks bank change, i just noticed that minus bank on track 24 go on track 8 (that’s why the program crash when on track 16), on track 32, i go to 16 etc… but it’s strange nothing happen when on track 8 (it should crash as with track 16 ?).

My bank control variables display the good bank number, same for tracks so i really don’t know where the problem come from…

To resume, on every last track of each bank, i have the same behaviour, minus bank down 16 tracks and bank + do nothing…

Edit 2 : when i use Instr Automation to control VSTi, it could use 5% of my CPU which is really big just for using my program, that’s probably caused by the way i trigger paramaters text and permanent text to send x secondes after the last midi data sent.

I made few controls at each call (so each new midi value, so if you turn encoders from 20 to value 50, the tests will be called 30 times)… that could be avoid i think.

On other side, it use less than 1 or 2% on VST FX so i’m not sure i could do something for this but i will try…

Any news on this? Any sources published? I own an axiom 49 mk2, but I’m on linux. I’m not so much interested in the “traditional” features you’re implementing (inst mode, mixer mode), but could imagine it’d be funny to be able to get a little more functionality out of the controller via directlink mode (2 “banks” for faders, knobs & pads, some extra pushbuttons below the lcd). How far have you progressed?

It’s a shame the seemingly simple protocoll isn’t open/published. I’ve already gotten fidgety about the lua plugins published by m-audio for older versions of reason and record, but disassembling/decompiling them seems illegal by means of their license. How far have you gotten in understanding the protocol starting messages, random sources from different midi captures seem like they can differ slightly per daw? I think there could be configuration stuff in them, but then again, who knows, and I don’t want to break my controller.

Haha, it normally works just like any other plain midi controller, and you can program all the controllers on the beast itself. Directlink is just needed for displaying “fuku” and/or “lolwut” on the lcd display in case you use your daw in a manner that’s not supportet by it.

You could roughly do the same without directlink, minus being able to use the buttons below the display and such, even more configurable in terms of what each control does. A duplex mapping for mixer or instrument maps would be needed for the “standard stuff”, though. If the op manages to get his thing working, I guess it could be adapted for the axiom without dl or other similliar controllers.

Hi,

The project is in standy for the moment as i had an opportunity for a new job that took all my time.

All the communications with directlink are ok, you could use all features exept for instrument mode for witch i need to go in deep with duplex.

You could write what you want on screen and all the buttons under display are configurables like standard midi buttons.

Mixer functions are ok like vst/native fx control.

But it’s a little buggy like it is now… will try to work on this as soon as possible of course.

If you’re interested in the source file, let me know and i send them to you… not hard to understand it’s really basic programming ^^

For now i have one free day tomorrow, i will test the new duplex and see what’s new…

…restart the axiom after more than 2 months !..

Hey KanetonKiller,

I would be very interested in the code. Would be great if you could send it to me.

Thanks

Hi Javafant,

i send you the actual code this week, sorry for being so long, lot of work these last month and really no time.

I’ve just installed my new installion in my new home and i’m ready to continue. Now with 3.1 there could be a lot of things to do.

I waiting for the 3.1 final release and the new duplex before continuing the project, but the project is still alive…

Just tested the script and seen FX device selection doesen’t work anymore, but i must have break something before stop some months ago as i’ve made a lot of tests with the FX selection.

I remember playing with “state” so i think the key is here, will try to redo that this week (if i find quickly) but i need some time to return in the code, it was a big break…

to OopsIFly :

if you have some informations about directlink, i could be interested, i haven’t for now the code to return in normal mode (must restart the hardware) and i’m sure there’s a lot more like the code for the part selection (F, E and P button, found some but not all).

And thanks to all the team for the 3.1 version, i think the instrument section is a lot better than in 3.0.1. (witch is already really good of course)

Hello to all!

Sorry for the looooong pause, i had to move from my house plus a lot of others things…
Anyway, last year i updated the program and recently updated more for renoise 3.2.

Here’s the lua application plus midi file for Renoise, some functions being trigged outside of Duplex.
I’ve made some change to Duplex but i can’t remember which one, the only one i remember was the last one to make the automation working with adding require xStreamPos and xPlayPos that was not declared in Duplex.lua.

I’ve tried to avoid making change directly, that’s why some functions like midi callback are directly in the axiom-MKII.lua
There’s probably a lot of change to make to improve the efficiency of the program.

The interface has been made with text to guide for better understanding at start.

So in both mode, the patch button control the instrument selection (plus open and close VSTi GUI), the button track control track selection and the button shift + track selection allows to go 8 tracks + or -.
Button 4/mute change the mode (Mixer/track). Just thought i will probably try to use the light on the button to see directly on the Axiom which mode is selected, you have to look at the Duplex GUI now…
Loop/Stop/Play/Record are obvious.

At start you’re in mixer mode, faders control mixer volume, buttons on/off track and encoders control mixer parameter subset (not automatable but easy to add if needed).

In track mode, faders 1 to 5 control the basic parameters on vol pre, pan pre, width, pan post and vol post, i search for a better option here… faders 6 and 7 are unused.

Buttons under faders control FX selection, little complex here, button 1 to 5 select the FX 1 to 5 on the selected track, button 6 and 7 are for FX + or -. I wasn’t able to bypass FX1 even with change in Duplex program, it can be bypassed but button 1 won’t work anymore if i remember correctly, there’s probably a solution to select FX 2 to 6 as 1 is already controllable on faders, it would be better so if someone have a solution :slight_smile:
Then you can control the FX parameters with the encoders (automatable) and change the bank parameters with the arrow under them.

In both mode, fader 8 and button 8 are for master track.

Then pads recall preset view, easy to change too like mixer, tracker, sequencer, midi, etc… (made with Renoise midi file)

All parameters are displayed on screen. It’s really hard to make something smooth here, first the screen is 5 caracters only and there’s a lot of possibility on how to make it react even more if you change a lot of parameters fast so if you encounter some strange behaviour, please let me know.

Same if you encounter some bugs, i’ve tested a lot but i’m sure there’s a lot to discover ^^
Anyway, it’s perfetly usable for live (for fun, not sure it’s stable enough otherwise) or composition and really great to have a controller that can control so much functions in Renoise.
Thanks to Danoise for Duplex.

Instrument mode as it was planned was delayed or cancelled ^^
I’ve found it simpler to just add an automation device and control it like an FX so when you create a new track with an instrument selected, it create an automation device with the instrument, not perfect, easy to delete this and just create yourself when you need it.

https://www71.zippyshare.com/v/Z4jguTMh/file.html

1 Like