Eliminate delay using the clipboard.

arturchernyshov61

2019-10-25 20:15:06

Hi! There is a score writer program in which a musical composition for training is loaded. Each time student press the "Tab" or "Right Arrow" button, the cursor moves to the next note (or chord), they sound. If a student rhythmically correctly presses the "Tab" button, he will be able to play the entire musical composition correctly. The problem is that after pressing the "Tab" or "Right arrow" button, the move to the next note is delayed. At a fast tempo, this is very noticeable. I see the solution to the problem as follows. Before start working with the program, student needs to press the "Tab" or the "Right arrow" button once. First note or chord should go from program out to a “clipboard” in the MIDI Translator. But next time when student presses Tab, a note from the “clipboard” must be sent to the output of the MIDI Translator (without delay), and at the same time in program must be a transition to the next note, which should also go to the clipboard. Thus, we can compensate delay between pressing Tab and moving to the next note in the music editor program. The question is how to set it up?

Steve-Bome Forum Moderator

2019-10-25 20:30:41

Well I’m a little confused because Bome MIDI translator does not use a “clipboard”.

But I think this is what you are saying and please confirm.

Hit tab once. Application sends note to MT Pro and MT Pro stores the note but nothing more at this point. There will need to be some way to tell the application to send the MIDI note.

Hit tab again. Again application needs to get signal to send the next note.

Application sends next note to MT Pro, MT Pro sends previously stored note and then stores new note.

Does the application always send the next note on hitting tab or right arrow? Is that the trigger? If so, in MT Pro, can handle the incoming actions for there.  Please clarify if this is what you wnt then and if so, yes this is very possible and I can advise.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

This continues until Application stops sending notes (song is done).

 

arturchernyshov61

2019-10-25 20:45:50

Yes, that seems to be the case. Using the term Clipboard, I had in mind the way that MT Pro could remember the notes that came (or a chord).
The first press of “Tab” – a note from the music editor goes into the memory of MT Pro. The second press of “Tab” (like all the following), the note from the memory of MT Pro goes to the output of MT Pro, and the next note from the music editor comes into the memory of MT Pro.
About the trigger, I did not understand what you mean.

arturchernyshov61

2019-10-25 20:52:17

comment

Since this will be controlled from a MIDI keyboard, you can use any MIDI notes as incoming events, and keystroke ‘Tab” as outgoing.

Steve-Bome Forum Moderator

2019-10-25 21:03:38

comment

Chords might be a bit trickier since they essentially are a series of notes that come in one after the other (in MIDI terms). There would need to be a way to specify the number of notes in a chord or identify the maximum interval between them to define a chord or maybe consider that if multiple notes-on without a a note off is a chord. . Individual notes should be fairly straight forward though.

How about if I show you notes first then if that logic works, we give more thought on how to do it with chords.

arturchernyshov61

2019-10-25 21:12:29

comment

The chord in my understanding is a few MIDI notes sent simultaneously.
All notes will be the same duration, because when you press Tab, the note editor produces a note sound for about 0.5 seconds.
I think correctly, first try with single notes, and then we’ll see.
Thank You!

arturchernyshov61

2019-10-25 21:25:59

comment

There is such an option as determining the MIDI notes of one chord. All notes of one MIDI channel that came after pressing Tab and until the next pressing Tab – are all one chord.

Steve-Bome Forum Moderator

2019-10-25 21:26:06

comment

Yes, they are simultaneous to the user but they are sent serially down the wire one at a time, so I imagine the best way to determine a chord is any notes that are currently on at the time and the next chord only starts when no notes are currently playing.

Steve-Bome Forum Moderator

2019-10-25 21:28:49

Here is a rudimentary example of single note queuing as you described.

I assume the application handles the tab key and sends notes to MIDI Translator Pro from there which then just processes the incoming notes.

For chords, we would need to queue up multiple notes and the more notes we queue up to make a chord, the more complex the logic will have to be.

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

 

 

 


Attachments:

Note-Queue-2019-10-25.bmtp

arturchernyshov61

2019-10-25 21:37:59

comment

OK – all the notes that came to the MT Pro input between pressing Tab are one chord. After the next press “Tab” – another chord.

arturchernyshov61

2019-10-25 21:40:37

comment

Let’s try to come up with something for a two-note chord. Or first for one note.

Steve-Bome Forum Moderator

2019-10-25 21:41:32

comment

OK the complexity still remains with chords as we will need to capture each of the notes of a chord into several global variables instead of a single note into just a few global variables. The more possible notes, the more global variables will be needed and more complexity in handling the note queue.

Steve-Bome Forum Moderator

2019-10-25 21:48:54

comment

I posted a one note example. It is beyond the scope of free support to provide more, however I can provided some pointers for you to work on. You would need something to capture the chords and put them in global variables for later playing. As the next chord comes in you need something to release the last chord that was queued while capturing the new one. Essentially you need global variables to store the last played chord as each tab is it and if there is a chord in the queue to capture then next chord and send the last one. Finally you need to determine when there are no more chords so that you can release the last chord when done. If interested for paid services, just drop me an email. Steve Caldwell Bome Q and A Moderator and Independent Bome Consultant/Specialist bome@sniz.biz

arturchernyshov61

2019-10-26 06:16:13

comment

Steve, thanks for the help, I’ll think about your advice.

Steve-Bome Forum Moderator

2019-10-26 06:28:50

comment

Had an example of shift operations but it got garbled by the web site. Sorry. Will have to figure out out to get it in there later.