Help me build a keyboard macro.

Options
13»

Comments

  • Studiowaves
    Studiowaves Member Posts: 453 Advisor
    Options

    Yes but comparators might use more cpu than a lookup table. Especially considering the number of comparators you have. 88 comparators compared to a single memory index to get the note. Which do you think will use less cpu. I suspect there's a lot of things needed for a compare instruction. Think of a block diagram, first the two numbers need to be compared but before that the micro has to place the numbers in a register, but is has to read the memory that is holding the x value to put it into the register for comparison. Then it needs to do some calculations to make a decision and return the decision. Then all of those comparators are followed by a merge function. That's not free cpu either. It might be better to preload a lookup table. I works as follows: memory location index of 0 to 30 all contain the same number of the first key on the keyboard. So there is no comparison, it's a direct fetch from main memory. On the other hand if your lucky the lookup table with be in the local cache of your processor. That's much faster than main memory. I made a simple sine wave lookup table that was hard to get out of the cache. Colin did it by creating a complicated method which forced it out of the local cache and it most certainly was slower. So it's a hit or miss, I wish there were a way to force a lookup table into the local cache but have no idea. But with 88 comparators for a standard 88 note keyboard it might run in main memory because it's too much to hold in the local cache or something. So you have to ask yourself, which method really is better. A single lookup table or 88 comparators followed by a large merge. Any input guys?

  • Studiowaves
    Studiowaves Member Posts: 453 Advisor
    Options

    No velocity sensitivity for LMB control. Only for midi keyboard control. It's too much work and unnecessary. <<< You think the velocity is unnecessary. Not if your tapping on that keyboard while writing a part for a drum machine. That's why I suggested using the Y value for the velocity.

Back To Top