# Wierdness from Cubase > Sibelius



## RiffWraith (Apr 15, 2015)

Hopefully this is an easy one.

I have four notes in Cubase: C Bb Ab Eb - which makes up Cm. 

With the understanding that the B and E will be played as flats.... I import my .mid file into Sib, set the key at the beginning of my treble clef staff to Cm, I see three flats at the beginning (correct) and I then see the notes: C B G# E. Why am I seeing G#? Should be G w/no accidental.

So then, in Cubase, I have "chords":


C Bb Ab Eb 
G F.. Eb

Now, Sib gives me the G with no accidental - which will be flatted when played. Am I missing something here? Is this a bug? I am I being a dunce?

Thanks in advance.


----------



## windshore (Apr 15, 2015)

Sorry, your description of your problem and what you're trying to get are not clear to me. The 4 notes you start with seem to be an Ab add9.

You do know you can quickly change sharps and flats in Sib by selecting the note and hitting Return...?


----------



## RiffWraith (Apr 15, 2015)

windshore @ Wed Apr 15 said:


> The 4 notes you start with seem to be an Ab add9.



????

http://www.jeffreyhayat.com/4notes.mp3

How is that Ab add9? Those are 4 notes, in Cm.


----------



## snattack (Apr 15, 2015)

RiffWraith @ Wed Apr 15 said:


> windshore @ Wed Apr 15 said:
> 
> 
> > The 4 notes you start with seem to be an Ab add9.
> ...



You mean in the key Cm, I think he confused it for the chord Cm.

Nevertheless: Sibelius isn't the best at interpreting midi data, nor is Cubase at exporting. It's hard to determine which one of the programs is doing wrong here.


----------



## Daryl (Apr 15, 2015)

RiffWraith @ Wed Apr 15 said:


> Hopefully this is an easy one.
> 
> I have four notes in Cubase: C Bb Ab Eb - which makes up Cm.
> 
> With the understanding that the B and E will be played as flats.... I import my .mid file into Sib, set the key at the beginning of my treble clef staff to Cm, I see three flats at the beginning (correct) and I then see the notes: C B G# E. Why am I seeing G#? Should be G w/no accidental.


Surely you mean C Bb G# Eb? Or is it something else?

D


----------



## RiffWraith (Apr 15, 2015)

Daryl @ Thu Apr 16 said:


> Surely you mean C Bb G# Eb? Or is it something else?



Hmmmm...

Key of Cm is C D Eb F G Ab Bb. I know you know that, which is why I am confused when you make mention of G#. Ok, G# and Ab are the same (technically not, but we aren't going there), but if I am in Cm, it's Ab, and not G#.

So, MIDI data in Cubase is: C Bb Ab Eb - single notes, in succession. That gives me C B G# E in Sib, after adding Cm as the key. The C is correct, obviously, the B is correct (will be played as Bb; no accidental needed), the E is correct (will be played as Eb; no accidental needed), but the G# is wrong. It should be an A, which would then be played flat; as with the other notes, there shouldn't be an acc. there either.

HOWEVER - it works right when I add some more notes, to form two-note "chords".

I change my MIDI data to C/G, Bb/F, Ab/Eb, Eb <--- three separate chords and then a single Eb, all played in succession. In Sib, that gives me C/G, Bb/F, Ab/Eb, Eb - exactly what it should be. 

So, the Q remains - why is the G sharped in the first ex? I am wondering if this is a bug (that I need to be on the lookout for), or if I am doing something wrong. Seems like the former, but wanted another thought or two.

Thanks in advance.


----------



## Daryl (Apr 15, 2015)

Ah, I see what you're talking about. Cubase doesn't send the specific information within its MIDI file. I don't think any sequencer does. So you'll always have to clean up these sort of things. It is no big deal. Just filter all G# in the score and hit Return.

D


----------



## Reegs (Apr 15, 2015)

I can also replicate the issue. Cubase Artist 8 and Sib 6. 

Because I'm a giant nerd, I took a look at the hexadecimal of the MIDI file output. Sure enough, Cubase Artist does NOT export key signature, even when you've set the track to whichever key signature you want. So, no surprise that Sib has to guess. 

Sibelius imports the MIDI in C and then "applies" the new key when you hit K, so for one reason or another it screws up the enharmonic of G#/Ab. But that all happens after the import. So, I think it's a Sibelius bug.

But, Artist lacks the notation features of Pro. Jeff, have you set the key in Cubase to C minor using the Score Settings dialog that Cubase Artist lacks? If so, would you send me over your MIDI file (the super simple one with four notes)?


----------



## Daryl (Apr 16, 2015)

Reegs @ Thu Apr 16 said:


> Sibelius imports the MIDI in C and then "applies" the new key when you hit K, so for one reason or another it screws up the enharmonic of G#/Ab. But that all happens after the import. So, I think it's a Sibelius bug.


No, it's not a bug. Sibelius would never actually change a pitch without asking. It's the way it is designed. To change from a G note to an A note by default on entering a KS would be a disaster waiting to happen.

I agree that it would be nice to have a feature that asks about changing enharmonic spelling when applying a new KS, but the current system is the safest way to deal with it.

As I said before, it's easily fixed by filtering and hitting Return.

D


----------



## Reegs (Apr 16, 2015)

Daryl @ Thu Apr 16 said:


> Reegs @ Thu Apr 16 said:
> 
> 
> > Sibelius imports the MIDI in C and then "applies" the new key when you hit K, so for one reason or another it screws up the enharmonic of G#/Ab. But that all happens after the import. So, I think it's a Sibelius bug.
> ...



Okay, I follow your logic, but the question remains: why does Sibelius consider G# the first class citizen when it also prefers Bb to A# and Eb to D#. In MIDI they are the same note number. 

The only thing I could wager is that on import it picks the enharmonic of a lower degree (A# is Sharp#4 whereas Bb is Flat #1), and sharps have precedence over flats in the case where they are equal (G# = Sharp #3, Ab = Flat #3). It sort of makes sense if you look at the layout of the Key Signature box. Sharps on the left, flats on the right. A test import of all black keys seems to follow that pattern: notes on staff are F# C# G#, Eb, Bb

Still if it "gets" key information from the importing MIDI file, I wondered if it imports properly, so I hack'n'whacked the test file above in the hex editor to include a key signature of Cm and sure enough, no more G#. A-flat in Sibelius, with the proper starting key signature to boot. No user intervention required.

So my conclusion is it's partly Cubase's fault because it doesn't export a key signature (which honestly I find odd -- I'm going to reinstall Sonar and see what it does as a comparison and is why I'm curious what full Cubase does) and partly Sibelius' default handling of the MIDI note numbers corresponding to black keys.


----------



## Daryl (Apr 16, 2015)

Well, G# is the 3rd sharp and Ab is the 3rd flat, so I guess that Sibelius has to pick one or the other at random.

I'm not surprised regarding your MIDI find, because if one exports a MIDI file from Sibelius, it does know what the original KS was. As I suspected, sequencers either don't export KS information, or nobody actually uses them ion the first place.

TBH it makes no difference to me, because in the film world nobody uses KS anyway. :wink: 

D


----------



## RiffWraith (Apr 16, 2015)

Daryl @ Thu Apr 16 said:


> Ah, I see what you're talking about. Cubase doesn't send the specific information within its MIDI file. I don't think any sequencer does. So you'll always have to clean up these sort of things. It is no big deal. Just filter all G# in the score and hit Return.



Hmmm - filtering. Will have to look into that. Sounds like a good ides... thanks!


----------



## RiffWraith (Apr 16, 2015)

Daryl @ Thu Apr 16 said:


> Well, G# is the 3rd sharp and Ab is the 3rd flat, so I guess that Sibelius has to pick one or the other at random.



That_ kinda _makes sense - but the Q is why is Sib picking G#, when the key you are giving it has no sharps? Seems to me that it should know not to have a G#, but to have an A, which will then be flatted. It knows that when you have chords - why not when you have single notes? And why does it work correctly in other keys? Gm, as one ex.

Reegs - here are the .mid files:

http://www.jeffreyhayat.com/Sib-test.zip


----------



## davidburns134 (Apr 16, 2015)

That's because Sibelius doesn't automatically completely respell a passage when you add a key signature. It does SOME necessary respelling, i.e. it adds naturals to a note that if unaltered, would actually be wrong (eg. if you had an A natural and you add a C minor key signature in front of it, it will add the natural sign because otherwise the note will be wrong) but to any note that if left unchanged, would still sound correctly, it doesn't alter it. So in your example (which is true not only on midi import but if you just input the notes) the G sharp does not _require_ respelling, since when the key signature is added, the note is still technically going to sound at the right pitch.

The same effect is true in G minor - if you write a D sharp on a blank stave then add a g minor key sig in front, it will remain a D sharp.

The plugin to simplify accidentals will do what you seek.


----------



## Reegs (Apr 16, 2015)

Thanks for sending over the MIDI files, Jeff. I took a look inside the raw data inside each file and confirmed that there is no key information there, either. (For anyone curious on specifics, you're hunting for the sequence: ff 59 02 xx xx in hex.) 

In the manual, I noticed that Cubase has a feature where you can set the keys of each staff independently. I'd guess, then, that it was a design decision to not export the global key when it writes MIDI. Still, it's so easy to implement, I'm surprised it isn't there. I might actually file a bug report/feature request.

I also fired up Sonar 8.5 because I was curious what it does. It has a dedicated Meter/Key insertion tool, so I know it would write the information to the file. I ran three tests:
1. Notes only, no keys inserted.
2. Notes and "3-flats" key
3. Notes and key of C

A fun aside is that Sonar 8.5 does not distinguish between major and minor keys. In the MIDI data, key signatures are exclusively denoted as major, though the spec supports minor too.

In cases (1) and (3), the import to Sibelius was identical to Cubase. That is, the score reported Eb, Bb, and G#. Also, in both cases, Sonar inserted a key signature of C into the MIDI file. Sonar will default to placing a key signature event of C major at the start position, so all that distinguishes these two cases is that in one I replaced the default with a user-inserted event. The "default" it inserts is not a ghost or placeholder event.

In case (2), Sibelius saw the 3-flats key signature and correctly wrote the note in question as an Ab.

So there you have it. Cubase needs to better support key signatures. Given that Cubase started life as a midi sequencer and that Steinberg has all that cool chord stuff and realtime analysis going on now in the product, it is a surprising find.

For the meantime, Daryl found the mostly painless workaround in Sibelius.

Pete


----------



## Daryl (Apr 17, 2015)

Reegs @ Fri Apr 17 said:


> 2. Notes and "3-flats" key
> 
> In case (2), Sibelius saw the 3-flats key signature and correctly wrote the note in question as an Ab.


That's very interesting. If you have time, I'd like you to perform this same test, but manually put a G# accidental in Sonar, before you export the MIDI file. I'm interested to know whether or not it tries to "correct" the note, or leave it as you wrote. Thanks.

D


----------



## Reegs (Apr 18, 2015)

Results are:

Notated from the Staff view:
Default Key settings. C, Bb, G#, Eb. Sibelius imports it as key of C, with notated Bb, G#, Eb.

If I specify the key as Cm in sonar and have the same C Bb G# Eb on the staff, Sibelius import is key with 3 flats, with notated C, Bb, Ab, Eb.

Both G# and Ab appear in a MIDI file as the same code for a note number -- in my tests the one above middle C, #68. Since there is no differentiation in the MIDI spec, the behavior does make sense. In fact in the above test, there is only a single byte difference in the files -- corresponding to the key.

Interestingly if I have the G# notated in Sonar's staff view and then I switch the key on it, the note is automatically swapped to Ab (and the accidentals for B and E disappear). Again, due to the MIDI spec, it's not completely surprising. It would just mean internally that Sonar holds MIDI and interprets the staff from it. Sibelius may also hold a flag for the correct enharmonic along with note data.


----------



## Reegs (Apr 20, 2015)

Yet another update:

Feature request filed if anyone wants to +1 it:
http://www.steinberg.net/forums/viewtop ... 28&t=78888

Also, in the thread, one of the moderators mentions the workaround is to use MusicXML, which will export key signatures. I tested that and it does solve the problem, although Sibelius warned that it had found an error in the MusicXML import because the Program/Bank value of the channel was set incorrectly (a 0 in a place needing values 1-128). Unsure whether MusicXML would be a viable choice for a large, complicated work where things aren't necessarily always explicitly notated.


----------



## Daryl (Apr 21, 2015)

I have found that XML solves some problems but causes others, and to prepare the file properly for XML export in Cubase is often a waste of time.

For me there are two potential time savers. Either make sure that note starts and lengths are quantised before export, or just clean up in the Score Editor, click Score to MIDI, export a MIDI file and then undo.

In anything other than a very simple score accidentals will always have to be checked, and for the most part they can be done very quickly using the Filter commands in Sibelius, or running a plugin, if you want them to obey a Key Sig.

D


----------

