# Recording Kontakt Script Generated Notes



## procreative (Jul 9, 2018)

I have been experimenting with trying to record Kontakt script generated notes into Logic, specifically with "The Orchestra", which uses arpeggiators to create rhythms.

What I did was to open a standalone instance of Kontakt, set it to output script generated notes and makes sure the Kontakt Virtual Output is switched on. I also set Logic to output sync with the external Kontakt to lock both tomthe same tempo.

Here is the issue. If I record a passage, while it is recording the note lengths appear to look about right, correct notes, velocity data etc.

Once recording is stopped the note lengths change and each note extends from its start point right to the end of the passage. So each note overlaps and extends to the end of the region.

I have checked to make sure no quantising is set on record in the inspector. I just cannot seem to work out why it changes after I stop recording? Any ideas why this is happening, or is this a bug in the way Logic deals with midi from script generated notes?


----------



## EvilDragon (Jul 9, 2018)

Can you try it in a different DAW, perhaps? Just to exclude that as a factor.


----------



## procreative (Jul 9, 2018)

I dont currently have another DAW, and on a Mac, any suggestions how I can try without installing a whole new DAW?

Was hoping someone with Logic expertise might tell me what I am doing wrong or if it just cannot deal with it?


----------



## polypx (Jul 9, 2018)

I've seen this happen before, and not in Logic, so I don't think it's related to Logic. You might find that the notes that are extended beyond the end of the song can be deleted and the correct length ones are hiding behind them. But if not, it's something to do with the way the script is written I'm pretty sure. The note offs are not being created correctly or might be on a different MIDI channel than the note ons.


----------



## procreative (Jul 9, 2018)

Yes possibly, its just that during the recording, the note lengths look correct. When its taken out of record they seem to snap to these lengths. Each note starts where it should but all end at the same point, overlapping each other.

If they looked like that while recording I could assume its not being sent right, but it seems to come in right then get altered. Maybe its something to do with note-offs not being sent?


----------



## EvilDragon (Jul 9, 2018)

Also, do you have only ONE option in "send MIDI to outside world" chosen? Don't think you wanna send both incoming note along with script generated notes, etc.


----------



## procreative (Jul 9, 2018)

I have just script generated notes selected.

Its just odd that while recording the note lengths look correct, but after recording is stopped the note lengths change almost like some kind of post-processing is occurring.

It almost looks like a sustain pedal has been held?

So something seems to happen to the data when stopping recording.


----------



## Levitanus (Jul 9, 2018)

reaper can be checked without installing and buying)


----------



## Levitanus (Jul 9, 2018)

procreative said:


> So something seems to happen to the data when stopping recording.


looks like latency-compensation


----------



## procreative (Jul 9, 2018)

I used a midi monitor on the output from Kontakt and there does not seem to be note off messages being created, the only one is from the actual lifting of the key at the end (which explains why all notes extend to that point).

Is this standard arpeggiator behaviour or is it a scripting flaw?

And is there a way round this? Like a kontakt script that can be put on the instrument to add note offs to notes?


----------



## Levitanus (Jul 9, 2018)

procreative said:


> note off messages being created


typically note-off now is note-on with vel 0.
More than, if arpeggiator is inside instrument, there is a possibility, that it not really arpeggiates by midi, but operates some other techniques like just moves vol to 0 and changing the pitch of the note-event itself. So you can not just take the "midi" from it.
If You would like to make Your own arpeggiator - look for reaper and JSFX. There's some cool stuff implemented yet.


----------



## EvilDragon (Jul 10, 2018)

Levitanus said:


> typically note-off now is note-on with vel 0.



No, that's actually found less often on MIDI controllers. Most often it's an actual note-off with value 0 (or sometimes 64).


----------



## procreative (Jul 10, 2018)

I tried a different library, Symphony Series Woodwinds that also has an Arpeggiator and got the same result. So I am guessing both use the same built-in Kontakt functionality but may be wrong.

What I find weird is that during recording the notes look the right length, but when recording stops the single note off generated by lifting off the keyboard is where all notes extend to. Is this expected behaviour? It seems like the single Note Off is overriding the incoming note lengths, is that what is happening?

Maybe its just not possible, but it seems the Kontakt Arpeggiator does not generate note offs. Is there some kind of Kontakt script that could add these for each note?


----------



## EvilDragon (Jul 10, 2018)

I tried this with the factory arpeggiator script in Reaper, recording track output (not the input!) and it worked just fine... all notes got their note-offs. Also tried Retro Machines mkII (also has an arpeggiator but slightly different from the factory script), and it also worked just fine.

I wonder if Logic's track routing is set up to record both MIDI input and MIDI output of the track, somehow? This is the only thing that could explain it.


That said, looks like SSP2 does have some issues here - it sends out multiple note events for the same time position, and this creates issues. I assume Logic tries to resolve/fix overlapping MIDI note events, which unfortunately leaves in the events without note offs in the project. Methinks this is because it's sending one play_note() event to each string section within the instrument (because I also see notes duplicated two octaves up in the MIDI output, which I didn't originally play at all!)

Reaper has an option to "automatically fix overlapping note events", and when disabling this, it's easily verifiable that this happens.


----------



## procreative (Jul 10, 2018)

Okay thats useful, seems possibly something in Logic then causing it?

Using Logic you have to use a standalone Kontakt as AU does not send out Midi. I am not sure if I am doing it right but this is how I achieved it:

1. I open a standalone instance of Kontakt, set it to output script generated notes and ccs (tried with and without)

2. Switch Kontakt Virtual Output on

3. Set Logic to output sync with the external Kontakt to lock both to the same tempo

4. Add a software instrument track in Logic with nothing loaded (also tried an external midi track)

5. Press record and play notes.

I am wondering if its recording both from the external Kontakt and in Logic at the same time? Maybe I need to find a way to temporarily disable the midi keyboard from inputting into Logic? Could that be it?


----------



## EvilDragon (Jul 10, 2018)

I can't suggest anything regarding Logic since I'm not using it, but I did verify an issue with notes output by SSP2 in Reaper, as per above edit of my post.



procreative said:


> I am wondering if its recording both from the external Kontakt and in Logic at the same time? Maybe I need to find a way to temporarily disable the midi keyboard from inputting into Logic? Could that be it?



It's at least worth a shot. But doubt it'd change anything within SSP2, that one seems bugged. If you have Retro Machines mkII installed, try it with that library as well and you should see it works fine...


----------



## procreative (Jul 10, 2018)

The weird thing (to me as maybe I dont understand the intricacies of midi recording), is that during recording the note lengths look correct. It seems to me that the actual hardware generated note off when I release the key on my midi controller overrides the note lengths.

Its why I wonder if there is duplication from what is ending back/forth in Kontakt and what is going into Logic directly from the midi controller?

I suppose a quick way to test that theory is to use the Kontakt GUI keyboard to trigger a note as that way Logic wont be receiving anything but scripted notes generated by Kontakt?


----------



## EvilDragon (Jul 10, 2018)

You could try that too. But as I mentioned, at least with SSP2, there's the issue in Reaper as well.


----------



## procreative (Jul 10, 2018)

Well I tried recording the output just using the GUI keyboard in the external Kontakt and it made no difference.

Here is the midi data in Logic while recording:






And after pressing the stop button:






So I am guessing pressing stop or taking out of record adds a note off message that overrides note lengths? Because at some point Logic is recognising note lengths coming from Kontakt but then changes them when recording stops?


----------



## EvilDragon (Jul 10, 2018)

See how many notes are overlapping during recording (same note number, same starting position)? That's the issue.


----------



## procreative (Jul 10, 2018)

Firstly I tried Retro Machines 2 and that seems to work fine. So it must be something about the way the Arpeggiator is scripted in both the other libraries I tried (The Orchestra and SS Woodwinds).

As I said during recording there are no note overlaps as below screenshot:






What I have noticed is Retro Machines 2 is generating notes with a velocity of 0 which is the equivalent of a note off, whereas the others are not. I think thats the issue, no note offs, so as soon as you stop recording the note off is generated and all notes use that point to stretch to.


----------



## procreative (Jul 10, 2018)

Such a pity, have to hope someday they add Midi drag/drop or some way of converting the Arps to midi. It has such potential as an ideas generator, but the ability to drive other VIs would be something else.


----------



## procreative (Jul 10, 2018)

EvilDragon said:


> See how many notes are overlapping during recording (same note number, same starting position)? That's the issue.



Ah I see what you are saying now. yes there do seem to be quite a few notes at the same point with the same pitch.


----------



## nordicguy (Jul 10, 2018)

You probably know about it but just in case.
The easiest way of getting/recording Kontakt generated notes within Logic is to use e.g. Blue Cat Audio's PatchWork.
Its because it loads the VST version of the plugin (Kontakt here).
Would have been my pleasure to run some test with "The Orchestra" Kontakt library but I don't own it.
Like always, ymmv, but I found this a pretty effective way to deal with Kontakt generated notes script.
You can then "freeze" the midi obtained from BCA PatchWork using AudioCR's Midi Fx Freeze free plugin.


----------



## procreative (Jul 10, 2018)

Thanks to all the chipped in.

I found I can make use of some of the output, it needs work to use it. If I fix all the note lengths close to the original shown during recording, they seem to play back very similar.

What works less well is where they use Envelopes to simulate dynamics. It seems to record as CC85 and CC86 (not sure if one is Expression and the other Modulation).

Its a bit of a faff but its possible to convert the data to CC1 or 11.


----------



## Dewdman42 (Jul 10, 2018)

The problem is that logic is getting input from ALL midi controllers by default. So both the source and the arp notes are going to the sequencer. I suspect that the short notes are on the piano roll too but hiding underneath the long held ones.

Go to LPX environment, go to clicks and ports page. Add a monitor object and route that midi controller you’re using to the monitor. That will remove it from the “sum”. Then standalone kontakt will send the arp notes in and only those will be recorded.

When you’re ready to use your midi controller for something else then you will need to cable that monitor to the sequencer, or add a switch to make it easy.

You could also use plogue bidule in this case. Then you could use an instance of kontakt inside pb inside logic and have pb fork the midi off to IAC. You still have to do some environment cabling to avoid both the source midi message and arp being recorded, but the main advantage would be no need to mess around with syncing two apps.

Au’s actually can send midi and some do but logic doesn’t see it. But PB does. You can also put PB in the midifx slot and it can still host either AU or VST version of kontakt and then avoid IAC altogether and use midifx freeze to capture the recording. Bluecataudio patchwork can also do this.


----------



## procreative (Jul 10, 2018)

Dewdman42 said:


> The problem is that logic is getting input from ALL midi controllers by default. So both the source and the arp notes are going to the sequencer. I suspect that the short notes are on the piano roll too but hiding underneath the long held ones.
> 
> Go to LPX environment, go to clicks and ports page. Add a monitor object and route that midi controller you’re using to the monitor. That will remove it from the “sum”. Then standalone kontakt will send the arp notes in and only those will be recorded.
> 
> ...



Well I took the controller completely out of it, I used the GUI keyboard in the standalone Kontakt to trigger a note. Same result, so its not the controller triggering a note. However that does not rule out the GUI created root note sending a note off as well.

I think the notes getting extended might be the single note off becoming the end point for all the notes as what happens is all notes extend to the right at the point the note off is recorded (which seems to be when either you stop recording, click the region or stop the transport).

What I did find was that all the notes were there with the right velocities. Using midi transform to change all note lengths to a short fixed length, the playback seems to sound okay and like the original.

I personally dont think note offs are being sent as having tried the same thing with the Arpeggiator in Retro Machines which worked fine I noticed notes got recorded into Logic with velocities of 0 as well as other values, I dont think The Orchestra or SS Woodwinds did this. So there must be some other script technique used by Retro Machines.

I kind of give up trying to make it work, I can sort of do it by the above.


----------



## Dewdman42 (Jul 10, 2018)

Unless kontakt is also sending out the notes played on the GUI keyboard, in addition to the arp'd notes....which might be a kontakt thing or might be a script thing. 

I don't think any notes are getting "extended", I think you're getting both noteOn's and noteoff's, overlapping. Noteoff can be sent either way, the script might choose to use velocity 0 noteon instead, it doesn't really matter... 

If you delete some of the long ones, are the short ones hiding underneath?

do any of the factory kontakt patches do this so I can replicate it here?


----------



## procreative (Jul 10, 2018)

No overlapped notes as such, the notes overlap but each starts where it should. And adjusting all note lengths reveals no overlapped notes and each are correct.

However each note end, ends in the same place at the end of the region. Thats why I think its a single note off determining it as when you stop recording, thats the point where the notes ALL extend to.

I experimented leaving it running without playing more notes and several blank bars later, thats where the notes extended to.

Its just weird that it displays right DURING recording but jumps when recording stops.

I dont know the whys and wherefores but either the note endings that are transmitting during recording are getting over-ridden by a single note off inserted at the end of recording automatically, or there are not any to begin with.

I dont know of a factory library that would do this, Retro Machines which is included in Komplete and also Komplete Essentials (I think) seems to work okay. But 3rd party libraries seem not to.

I just think the scripting method used to create the Arps, either cannot send out in a way that can be captured to Midi or the scripts used have something missing that Retro Machines does not.


----------



## Dewdman42 (Jul 10, 2018)

Its actually not that weird...

MIDI transmission does not deal with note durations, DAW's do. Logic does not store NoteOff's in the region. It stores a note+duration. So when a NoteOn comes in, some synth will start making sound. When a corresponding NoteOff comes in, Logic calculates the duration and stores that in the region as a pitch+duration data point. NoteON's make sound happen, NoteOff's make sound stop. If you have two overlapping NoteOn's, the first NoteOff will stop all sound from happening usually, but the sequencer is still waiting for a matching NoteOff for every NoteOn, in order to calculate pitch+duration and store that...

so....


you play a chord with your hand and hold it (NoteOn)
arp generates a note that matches one of the notes you are still holding (2nd NoteOn)
arp ends the arpeggiated note with a NoteOff (LPX will probably assume this NoteOff matches up the first NoteOn from when you played with your hand on the keyboard) All sound probably stops due to NoteOff
you lift hand and final NoteOff goes to LPX, LPX calculates pitch+duration and adds it to the piano roll.
Its doing exactly what its supposed to do. The real problem is that some of your arpeggiated Kontakt patches are mixing in the original midi from what you play, together with the generated arp. Since this is happening only with 3rd party stuff, my guess this is related to scripting in those that are having a problem. But I'm still suspicious about the routing of the midi controller and you say you get the same problem when using Kontakt's built in keyboard, but its possible that also gets forwarded through somehow. You have a lot of different pieces involved here and have talked about different situations so its hard to pinpoint the problem exactly. Setup one exact situation to replicate it and describe it exactly and we can probably figure it out. But my money is still on either A) the midi controller is routing the hand-played midi to LPX and LPX is dealing with the overlapping midi and/or B), The kontakt script is duplicating those events to the virtual out somehow.

If you have PlogueBidule or Patchworks, its worth a try to see if the kontakt virtual port is somehow related to getting duplicated events also. Because you can turn that off when using Kontakt as a plugin.


----------



## procreative (Jul 10, 2018)

I dont see how you can get around this. I do not think its anything to do with inputting notes. I have tried it by triggering the notes with the controller bypassed from Logic.

But even if you use the GUI keyboard in Kontakt, you are still going to generate a note off somewhere.

Personally I think its the lack of note offs coming from the Kontakt arpeggiator that is compounded by the final note offs at the end of the recording.

The final note lengths of every note definitely match the point where the track stops recording as even if I leave it recording with no more notes it matches the point the playhead stops.

Every note starts where it should, but every note end is in exactly the same right hand spot.

As I said Retro Machines works fine, so I think the issue is in the scripting. But it must be a common script as other libraries I have also cock up note lengths.


----------



## EvilDragon (Jul 10, 2018)

I don't think it's a common script, more likely is that it does a certain thing that doesn't gel well with MIDI output functionality in Kontakt (namely, playing the same note multiple times for different reasons, i.e. using transpose on different groups).


----------



## Dewdman42 (Jul 10, 2018)

if the Kontakt arp were not sending NoteOff's you'd hear a lot of muddy sound that would sound like the sustain pedal was on. I doubt that is happening.


----------



## Dewdman42 (Jul 10, 2018)

EvilDragon said:


> I don't think it's a common script, more likely is that it does a certain thing that doesn't gel well with MIDI output functionality in Kontakt (namely, playing the same note multiple times for different reasons, i.e. using transpose on different groups).



It might also be related to the fact he's using the Kontakt standalone virtual midi output


----------



## procreative (Jul 10, 2018)

You both might be right... how long do I want to spend on this, thats the question. I can sort of make it work if I post-edit the note lengths.

However I thinik EvilDragon got similar results in Reaper and probably did not have to use the Kontakt virtual midi output as thats a kludge for us Mac Logic users...


----------



## EvilDragon (Jul 11, 2018)

Yeah I could verify issues with SSP2 in Reaper using VST.


----------



## procreative (Jul 11, 2018)

As most of the patterns in The Orchestra are Staccato based I found transforming the midi note endings to a fixed 1 tick length had no detrimental effect and they played back the same. Actually as they are short samples, even playing them as is had no issues as no note hangs occurred as they are shorts...

But it is annoying as there are other libraries with arpeggios that would be handy to capture.


----------



## modigliano (Oct 3, 2019)

Hi everyone,



Can someone ( Nordicguy ? ) explain how to get the “Kontakt generated notes” ( Send Midi Outside world ) within Logic Pro X using Blue Cat Audio’s patchwork ?

Do I have to use the stand alone version or the Plug In ( Audio Unit in Logic ) of BCA's PW ?

I’ve tried several things but I only got a big headache !

I’m lost !

Help !

Thanks !


----------



## Lindon (Oct 3, 2019)

Er, most people here are Kontakt users/scripters not sure there's many BCA patchworks users here. Maybe try their forums?






Log into Facebook


Log into Facebook to start sharing and connecting with your friends, family, and people you know.




www.facebook.com


----------

