# A bug in VST Expression Maps set-up in Cubase?



## stigc56 (Feb 22, 2018)

Hi

I have around 125 VST Expression Maps in Cubase. I'm about to reorganizing them, so they will accommodate a set-up with separate instances in VEPro6 allowing me to switch easily to Logic, that can't handle more than one MIDI port in VEPro.
But now I have realized - a little late I admit - that Cubase "remember" the map I have created for each track by THE POSITION in the map list - not the name!!!
That means that if I delete map number one - the one at the top - all maps are now "shifted" up one step, and all maps are now wrong!
This is state 1:





The Flute 1 is assigned to VSL Flute 1 map.
Now I delete the first map in the list, and this happens:





The Flute 1 is now assigned to VSL Chamber Strings !


----------



## stigc56 (Feb 22, 2018)

When I reopen the project, the correct map for Flute 1 is back!


----------



## Paul Grymaud (Feb 22, 2018)

I think I've captured the bug. Look at this
Now, sincerely, I cannot help You buddy (even if I work with Cubase). I'm technically new. CUBASE manual, 708 pages only. See below the attachment


----------



## stigc56 (Feb 23, 2018)

Paul Grymaud said:


> I think I've captured the bug. Look at this
> Now, sincerely, I cannot help You buddy (even if I work with Cubase). I'm technically new. CUBASE manual, 708 pages only. See below the attachment


----------



## Sean J (Feb 23, 2018)

stigc56,

If it helps, I made an excel file to create expression maps much faster. It looks complex, as maps have a lot of options, but it's very easy to use once you create a couple test maps with it. It supports all the features in Cubase except for symbols, so all the articulations have to be text. So this file certainly isn't for everyone.



If it works for you, it's absolutely a life saver to remap everything later on if you save excel copies of your maps. I'm working on something that negates the need for most articulation mapping in DAWS and notation uniformly anyway, so I no longer use this (and don't plan to update it). But I figured I should at least share it if it helps.

Cheers,
Sean


----------



## Sean J (Feb 23, 2018)

I now realize the file was embedded. The file uses macros to export the *.expressionmap files. There is a non-macro way to export maps with it (as the file uses formulas to create the XML first), but even then I've never tried doing it via the online Excel. I doubt it would work anyway. So I should note that I made the file to be used on a PC, not in the cloud.


----------



## stigc56 (Feb 23, 2018)

That looks absolutely FANTASTIC! I have been on the quest my self, but in the "other" end of the process - so to speak. I have build an excel spreadsheet that handles creating files for Lemur based on articulations, it's very rewarding when it works - not much music in though!
Is the spreadsheet you have shared without macroes? The macro button "Save Map To File" doesn't start the macro.


----------



## stigc56 (Feb 23, 2018)

I have Excel for Mac - can't your file run on this? If so - I would be happy to test it


----------



## AllanH (Feb 23, 2018)

scoredfilms said:


> I now realize the file was embedded. The file uses macros to export the *.expressionmap files. There is a non-macro way to export maps with it (as the file uses formulas to create the XML first), but even then I've never tried doing it via the online Excel. I doubt it would work anyway. So I should note that I made the file to be used on a PC, not in the cloud.



That sounds like an incredible tool and a great idea. 
I'd be very interested in seeing an excel sheet, if you're willing to share one.


----------



## Sean J (Feb 23, 2018)

AllanH,

Here's the link...

[edit: this is a newer version of the file, potentially more Mac-friendly]

```
https://drive.google.com/open?id=1XKGE_cXzsMoJ0dRozjHjlf8KPQaxrzIw
```


stigc56,

Macros on Mac:

First, I'd say to make sure you create the folder the XML sheet points to. If you have and it still doesn't work, then the vba code (macro) would likely need tweaking to work in the Excel version of Mac. I made the file a few years ago but tested it extensively on a few PC's, with Excel 2010 and it works on mine with the latest Office 365 excel build. I don't have a mac to test and rewrite anything on. So unless you have a way to use the Windows version of Excel, I'm not sure what to tell you.

I'm sure you were just testing it, but if you get it working, there's a macro on the master sheet that can export all 125 maps at once in the end (as long as each map has a file name listed in the first column). I'd go that approach rather than a single map. Even one by one the file is 100x faster to work in than Cubase. But the master macro still makes life a lot easier.​
Non-Macro option:

This way is a bit more tedious, but is still much faster than working in Cubase if you have a lot to map. It's just rather wonky, so I usually don't mention it up front.

1. Select columns AA to DT, holding shift > Right-click > unhide
2. Select cell DG1 > press CTRL + Shift + Down Arrow

That will copy cells where I have formulas that create the mapped XML.

3. Copy those cells > paste in MS Word
4. Cut the same text again out of word > Paste into a text editor like Notepad++ > save as a .expressionmap file.

It sounds worse than it is. It's just a copy+paste then a cut+paste and saving a file manually. I'll spare you why for now. But after a couple times of doing it, you'll see that it's still faster than working in Cubase. It's just a lot slower than the macro, especially the master macro.​Hope that helps.


----------



## lokotus (Feb 23, 2018)

scoredfilms said:


> AllanH,
> 
> Here's the link... I broke it into two lines just to avoid it being automatically embedded:
> https://drive.google
> ...


thanks for it , looking forward to experiment with it...


----------



## lokotus (Feb 23, 2018)

scoredfilms said:


> AllanH,
> 
> Here's the link... I broke it into two lines just to avoid it being automatically embedded:
> https://drive.google
> ...


you did this by reverse engineering how the expression map is structured and putting this into excel ? seems a crazy hobby , how long did you work on it...


----------



## Sean J (Feb 23, 2018)

rofl, a few weeks. I'm better at composing than code.

My latest endeavor has taken me months to figure out.
Spitfire, VSL, Berlin, or any Kontakt library all controlled via one map to rule them all. I'm mapping it in Cubase, Dorico, Notion, and Overture, so I can switch to any program easily. It also supports combining articulations and so on.

After scoring my first feature indie film, I spent a year trying to improve my writing. After that I knew I wanted a better system. 

So as far as insane OCD hobbies go... this is all just to avoid having to map in the long run. I just want to compose with a halfway sensible workflow and get the software out of the way. Then hopefully focus on the music again and learn how to make a career out of composing, which I'm sure my wife would be very grateful for.  So it's a hobby I'd love to see die (which is the plan), to say the least.

-Sean


----------



## AllanH (Feb 23, 2018)

scoredfilms said:


> AllanH,
> Here's the link... I broke it into two lines just to avoid it being automatically embedded:
> []
> Hope that helps.



@scoredfilms - Thank you very much. I'll give that a study.


----------



## stigc56 (Feb 27, 2018)

scoredfilms said:


> AllanH,
> 
> Here's the link... I broke it into two lines just to avoid it being automatically embedded:
> https://drive.google
> ...


Hi again,
I have some time the next few days and will take a tour with your VST Excel "thing". I'll return!


----------



## Sean J (Feb 27, 2018)

Cool, I've kept myself subscribed to this thread. I figured a question may pop up. 

-Sean


----------



## Sean J (Feb 27, 2018)

I completely forgot!!!

I made a newer version of the file. It's the same thing, only with an additional 6 columns if you want to make maps that send two or three MIDI Output settings. They are completely optional columns, so no need to worry about them otherwise.

Newer Version:

```
https://drive.google.com/open?id=14-YikVg1Yw5C5cck0VXRz40nuBTWOJJE
```


Let's say you want to send a KeySwitch, then a CC value, then another CC value (like a madman)... this updated file lets you do that. In the example map (my old Spitfire BML map), I added a plus and minus version of anything that could be time-stretched. Instead of using a MIDI controller, I could just click the expression map lane in Cubase to shorten the notes. It sent a CC change after the keyswitch. It was a rough way to work which I've abandoned. But it should illustrate how one could potentially use the extra data. The vast majority of people would likely only use the 4 bolded fields for their maps anyway. Everything else in the file is really just extra. Cubase just requires that they be filled out with the defaults at least, as you'll see I've done in my map.

The best advice I can give upfront is that if you wonder what something means in the file, look at the Cubase expression map GUI screenshot. "Data 1" may seem odd as an Excel column, especially as it's a note number. The screenshot clears it up pretty quickly. And again, once you map a small example file successfully, it's easy after that.

Sorry for the confusion!

Cheers!


----------



## stigc56 (Mar 1, 2018)

Hi
I have managed to make your VBA code run on Mac, but I get "File not found" from the this code line:
_Open output For Output As #1
For Each cell In rn
Print #1, cell.Value & Chr(10)
Next
Close_
I have changed the output name to "/Users/musicmind/Desktop/VSTX", but if I understand this correct, you haven't even addressed the file name right?
You have defined the output as string and that's all.
Sorry stopped here.


----------



## Eliot (Mar 1, 2018)

scoredfilms said:


> I now realize the file was embedded. The file uses macros to export the *.expressionmap files. There is a non-macro way to export maps with it (as the file uses formulas to create the XML first), but even then I've never tried doing it via the online Excel. I doubt it would work anyway. So I should note that I made the file to be used on a PC, not in the cloud.



Thanks Sean, this looks brilliant.


----------



## Sean J (Mar 1, 2018)

strigc56,

The file name isn't addressed in the VBA code, no. On the XML sheet in cell B4, the directory and file name are concatenated together. Here's my example formula from the file: *="C:\MAPS\"&B3&".expressionmap" *with B3 pointing to the cell with the map name. So VBA sees the string as "C:\MAPS\SA-Mur-Vi1-16.expressionmap" in the end.

My guess is that you saw the first part of the cell and typed a new directory over it without seeing the file extension and concatenation formula. In hindsight, I didn't make it as clear as I should have. My aim was to make it as self-explanatory as possible, but that's a very easy mistake to make with how I dealt with the file name.


----------



## stigc56 (Mar 1, 2018)

Hi Sean
Thanks a lot for your reply. I think there is a problem with the file path in Mac, where we use a different kind of string to describe the location. I will have a look into this. I have filled out the Master sheet with my patch names from VSL Synchron Strings Violins 1. There are 48 articulations! As I understand it I then must copy all the data to the Y column and paste i to the XML Sheet. You wrote this earlier:
_
1. Select columns AA to DT, holding shift > Right-click > unhide
2. Select cell DG1 > press CTRL + Shift + Down Arrow
_
I think the correct cell is DR1_? 

That will copy cells where I have formulas that create the mapped XML.

3. Copy those cells > paste in MS Word
4. Cut the same text again out of word > Paste into a text editor like Notepad++ > save as a .expressionmap file.
_
Now in the column of DR there is a large portion of it there is blank, is that correct?
Just exported this VSL Synchron Strings Vi1 map, it works!


----------



## stigc56 (Mar 1, 2018)

Hi Sean
No I followed the instruction, but it's pretty complicated with those file names on a Mac. Now I have managed to make it work manually! But the right address for the cell to be copied is DR here!! 
Let me ask you how you go about to create more maps in this set-up, just copy the sheet to a new one?


----------



## Sean J (Mar 1, 2018)

stigc56,

I'm glad you at least have that option. The naming of the sheets is relevant to the VBA code. As you aren't using the macro, it won't matter. You can copy sheets, create a new file per map, or whatever really. If I can make the macro Apple-friendly then you could always copy paste the mapped data to a new file later on anyway if you want to revisit your maps later.

Would you mind PM'ing me with the changes you made to the code to make it run on your Mac? I've made some changes to the file naming that theoretically may get the macros working completely, with your changes in mind as well anyway. There's a file name character length requirement and a way around it. I can't say for sure it will work as I can't test it. But if I can at least put together a 99% mac-friendly version, I'd rather savvy mac users be 1 step away from it working than 5. And if both our changes make it work, then all the better.

-Sean


----------



## Ronny D. Ana (Mar 15, 2018)

I hope I may ask you some questions about your fantastic work.
1) How can I handle more than one expression maps at once? I use the Master sheet with different Map Names:




After pressing "Export all Maps", I get two files:
VSL_SSI_1st.expressionmap (including crescendo and Legato (bowed))
SA-Mur-Vi1-16.expressionmap (includig Portamento)
Shouldn't there be a file called VSL_SSI_Viola.expressionmap (including Legato (bowed) only)?
What am I missing?
2) When using multiple expression maps (on the Master sheet) I cannot find a possibility to define articulations, especially Type (Direction or Attribute). Is it not possible or am I again missing something?

Thanx in advance
Ronny


----------



## Sean J (Mar 16, 2018)

Ronny,

I just did a few tests and only ran into problems if I was only mapping 2 articulations or less. I tested a few other maps (with 3, 20, etc, etc) and they all had all the articulations properly. I made the macro a few years ago when I was a lot less proficient in code of any kind. I wouldn't claim to be a wizard at it now, though much more proficient than then at least. Looking at the code the other day, I did see the way one part worked and thought it was a miracle it did. It certainly reflected a "code by googling things" mentality. I usually put more thought into what I'm doing now. I didn't rewrite the entire Macro, just the lines of idiocy. So this doesn't address the area that separates each map by map name. But I'd at least be using this from now on as it's not quite as insane as before.


```
https://drive.google.com/open?id=1XKGE_cXzsMoJ0dRozjHjlf8KPQaxrzIw
```

I'm running to the doctor's so that's all the time I have to explain for now. I'll take a look at the code later to see if I can make it more reliable in this area. Though it has to be said... who's mapping only 3 articulations? 

-Sean


----------



## Ronny D. Ana (Mar 17, 2018)

You adviced: [..] it's very easy to use once you create a couple test maps with it[..] so I did my first tries with only three articulations


----------



## Ronny D. Ana (Mar 17, 2018)

Sorry to bother you again but now as I am using much more than three articulations I have a problem again:
I am on the sheet XML and filled in 78 articulations. From row 8 to 70 everything is fine. But in row 71 column Y the articulation is missing. I have tried to go through your excel (also column AG to EE) but I could not find any problem (probably because I am not familiar with Excel).
Is this a limitation?


----------



## Sean J (Mar 18, 2018)

If you don't mind pm'ing me the file with your data in it I'll look into it.

I made the file a few years ago, exported a hundred maps or so for myself, then another composer did a mass export too, some of which large maps. That's only 2 user scenarios plus my own experiments to test things working or not. I guess this is what happens when you make something just for yourself at first.  Sorry for the trouble.

Are you using the Mac Excel or PC? I'd only recommend using Excel 2010 or later for that matter.
-Sean


----------



## FriFlo (Mar 18, 2018)

scoredfilms said:


> If you don't mind pm'ing me the file with your data in it I'll look into it.
> 
> I made the file a few years ago, exported a hundred maps or so for myself, then another composer did a mass export too, some of which large maps. That's only 2 user scenarios plus my own experiments to test things working or not. I guess this is what happens when you make something just for yourself at first.  Sorry for the trouble.
> 
> ...


Do you think it would be possible to do this with Numbers (Apple) or Open Office? This was exactly what I was looking for - an editor for Expression maps! I just don't have the need to buy MS office on subscription model, as al my excel needs are covered with Numbers already ...


----------



## Sean J (Mar 18, 2018)

FriFlo,

It would probably be possible to do a single map export (no macros) in any spreadsheet program, even Google sheets. But the formulas were the most time consuming part of the file to make and my heart just isn't in it anymore cause of a new mapping paradigm I'm working on. I was probably at my highest formula-savvy game when I made the file a few years ago and even then it took a few weeks to make.

I also tried getting two developers at two companies to make their mappers mass-edit friendly, even before the programs were finished, to no avail. So basically, this file is about as good as it will get for now. Though I don't mind trying to improve the macros as I see how (that's often much simpler to do). Currently I'm working on something else now to try to make this mess all avoidable anyway. So there's at least something else in the works. 

Stig,

Sorry this Excel business hi-jacked your thread. I planned on starting another thread about this file but haven't been ready to post it yet (long story). The second I do I'll direct any questions there.

Anyone else interested in the file can P.M. me in the meantime.

Cheers,
Sean


----------



## stigc56 (Mar 24, 2018)

Hi
I used some time on your Excel file and managed to have it save with a proper "save to file box"! There is one problem with your VST maps, and that is that there are several blank lines in it. It's obvious if you open one of your files in Textwrangler - that's the app I use on Mac. Furthermore I found that you DON't have to spend so much time to create all the different indent of the lines. The files loads just fine in Cubase even if all the lines are to the left.
Once saved in Cubase the file is provided with the appropriate indents.


----------



## Sean J (Mar 26, 2018)

Stig,

I didn't intentionally pay attention to indents, but did with paragraph breaks. Leaving the *char(10)* out of the formula caused a couple odd issues for me several years ago in a file long forgotten, which I could never find a consistent way out of. So I just kept extra spacing in out of paranoia. As long as the map loaded in Cubase, I'll fully admit the xml looks less clean due to spacing insanity. 

-Sean


----------

