JoepVanlier / Hackey-Trackey

A LUA tracker plugin for REAPER 5.x and up. Designed to mimick the pattern editor in Jeskola Buzz.
MIT License
131 stars 10 forks source link

Note Entry issue when using Resolution that is not a multiple of 2. Video included. #103

Closed MR-ritchie closed 5 months ago

MR-ritchie commented 5 months ago

https://github.com/JoepVanlier/Hackey-Trackey/assets/154295777/8a5207e4-d765-41a0-aa0f-e3822a2d6bc3

I am attempting to use the tracker with a resolutions that are not multiples of two. In the video above, I use a resolution of 6. I am entering notes on each row, but they jump into separate columns (row 001, 004 etc) or enter on the row above the one the cursor is on (when I try to use row 002, 005 etc). There also are note off entries that I did not place, they happened automatically when I tried to enter the notes into the rows. If you watch the video you will see what I mean, it is difficult to explain in words.

Thank you, please let me know if you come up with anything I should try to fix this problem. I love using this tool, it has become important to my music making, so I would be very happy if I could enter notes to create triplets etc.

JoepVanlier commented 5 months ago

@MR-ritchie sorry, I noticed this fairly late. I'll look into auto-tagging me on new issues so that I don't miss them.

Oh god, what's going on here 😅💦 I've just tried reproducing the problem locally, but haven't been successful yet.

So, just to make it clear up front, you can only have one resolution per pattern. That limitation is going to be nigh impossible to get rid of, because of how the tracker spreads notes to different columns.

That said, what you seem to be hitting here is an actual bug. The behavior at 24 seconds is not expected. The behavior at 52 seconds is however expected, since there you switch a 4/4 pattern to 6/4; which means the notes (which don't change) will have to be moved to not overlap.

I'm gonna need more information to track this bug down though.

MR-ritchie commented 5 months ago

Hi, thanks for getting back to me! I guess I don't fully understand what it would mean to have more than one resolution per pattern. Do you mean that you are not able to switch the resolution after you start editing? Or... either way, what I do to verify the issue is open a new project, insert new midi item, set resolution to 6, and the notes act weird when I enter them. I am entering notes using the computer keyboard, not a midi controller. The tempo is indeed 90, but the behavior does not change if I change the tempo. There isn't anything unusual with the reaper settings that I know of... I installed reaper version 5.99 out of curiosity to see if if could be an issue related to the new version. The behavior is the same. The weird thing is, I tried Hackey Trackey out on a different computer with fresh install of reaper. Its a macbook. The note entry behavior works as it should on this separate computer. it does redistribute notes between channels if you enter notes and then change resolution, like going 4 to 6 for instance. I guess thats what you're saying about having more than one resolution per pattern? I have attatched the config file. Please let me know what else I can do! Thanks again! Percy

On Fri, Jun 14, 2024 at 4:35 PM Joep Vanlier @.***> wrote:

@MR-ritchie https://github.com/MR-ritchie sorry, I noticed this fairly late. I'll look into auto-tagging me on new issues so that I don't miss them.

Oh god, what's going on here 😅💦 I've just tried reproducing the problem locally, but haven't been successful yet.

So, just to make it clear up front, you can only have one resolution per pattern. That limitation is going to be nigh impossible to get rid of, because of how the tracker spreads notes to different columns.

That said, what you seem to be hitting here is an actual bug. I'm gonna need more information to track this bug down though.

  • So just to verify, what you are doing is just entering new notes with the keyboard and they start hopping like that? Or are you doing note entry via a MIDI keyboard or the like?
  • From your MIDI item it seems that your tempo is 90?
  • Is there anything unusual about your project file or reaper settings that you know about?
  • Could you send me your tracker config file REAPER\Scripts\Tracker tools\Tracker? It is named _hackey_trackeyoptions.cfg.

— Reply to this email directly, view it on GitHub https://github.com/JoepVanlier/Hackey-Trackey/issues/103#issuecomment-2168892064, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEZF3YN5YE3JOKRJI5R43VDZHN44VAVCNFSM6AAAAABIVO7ZFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRYHA4TEMBWGQ . You are receiving this because you were mentioned.Message ID: @.***>

JoepVanlier commented 5 months ago

Hmm, seems that attachments don't show up. Can you copy the contents inside the message (the config files are just plaintext).

MR-ritchie commented 5 months ago

timeout=0.15 scale=1 keyboard=buzz fx1=0 envShape=1 releaseNoteOffs=0 optionsStartIndex=1 wrapAroundSeeking=0 oldBlockBehavior=0 modMode=0 global_midi_release_timeout=0.15 bigLineIndicator=1 maxHeight=50000 followSelection=0 channelCCs=0 fixedIndicator=0 maxWidth=50000 loopFollow=0 autoResize=1 useItemColors=0 keyset=default minimumSize=1 useCachedRendering=1 storedSettings=1 CRT=0 channelOffset=1 fixedIndLoc=0.5 advance=1 lastVelSample=1 blockWhileRecording=1 globalMidi=0 colResize=1 showedWarning=0 alwaysShowNoteEnd=0 colorscheme=buzz overridePerPattern=1 showAvgFrameTime=0 followSong=0 scrubMode=0 followRow=0 selectMIDINotes=0 root=1 rowPerQn=6 undoForReassignment=1 clampToSelection=1 transpose=3 alwaysShowDelays=0 velfrommidi=0 alwaysRecord=0 stickToBottom=0 advanceByNote=0 closeWhenSwitchingToHP=0 returnAfterChord=1 noloopGlue=1 noResize=0 page=4 fx2=0 rowOverride=0 fontSize=14 lastVel=96 initLoopSet=0 keyLayout=QWERTY hideVelocity=0 readfrommidi=0

On Sun, Jun 16, 2024 at 6:38 AM Joep Vanlier @.***> wrote:

Hmm, seems that attachments don't show up. Can you copy the contents inside the message (the config files are just plaintext).

— Reply to this email directly, view it on GitHub https://github.com/JoepVanlier/Hackey-Trackey/issues/103#issuecomment-2171655672, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEZF3YLXGXUDFL3RDX2EXRLZHWIO3AVCNFSM6AAAAABIVO7ZFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRGY2TKNRXGI . You are receiving this because you were mentioned.Message ID: @.***>

JoepVanlier commented 5 months ago

Thank you! It doesn't seem related to the config file. However, I think I have found a way to locally reproduce the issue. It seems to happen when the rows don't end up on exact MIDI Pulses Per Quarter note.

In the REAPER settings, could you tell me the value you have for ticks per quarter note in the MIDI panel?

image

My guess it's something different than the default of 960? For HT to work with a resolution of 3, it's important that it's divisible by 3. I will issue a warning when it isn't the case in the future. Note that when changing this setting in REAPER, it will only affect MIDI items created after this change.

I also note that I actually recommend a bad thing in the docs, namely to set the PPQ to a multiple of 256.

I will explore whether I can make Hackey Trackey more robust to having a fractional number of PPQs per note, but I fear it won't be possible to get that working robustly enough because the conversions from MIDI notes to rows and back becomes lossy (you lose the fractional part).

JoepVanlier commented 5 months ago

Oh, also, note that after you change the setting, it will only apply to MIDI items made after the change. I think 3.840 is a decent value since it's a multiple of 256, 2, 3 and 5 (which should allow for problem-free 3/4, 4/4 and 5/4). Otherwise just go with the default of 960, but then accept that there might be some round-off when working with delayed notes.

MR-ritchie commented 5 months ago

The ticks per quarter note is set to 1024, so that makes sense! I set it to 1536 and now everything is working for resolutions that are multiples of 2 and 3. Thanks again for your help! This really is a fantastic tool, it has become my go-to for entering midi notes.

On Sun, Jun 16, 2024 at 8:29 AM Joep Vanlier @.***> wrote:

Thank you! It doesn't seem related to the config file. However, I think I have found a way to locally reproduce the issue. It seems to happen when the rows don't end up on exact MIDI Pulses Per Quarter note.

In the REAPER settings, could you tell me the value you have for ticks per quarter note in the MIDI panel?

image.png (view on web) https://github.com/JoepVanlier/Hackey-Trackey/assets/19836026/feb14d16-ef7c-4373-a39f-1b1301d18e15

My guess it's something different than the default of 960? For HT to work with a resolution of 3, it's important that it's divisible by 3. I will issue a warning when it isn't the case in the future. Note that when changing this setting in REAPER, it will only affect MIDI items created after this change.

I also note that I actually recommend a bad thing in the docs, namely to set the PPQ to a multiple of 256, but that should be a multiple of 256 and the desired row resolution.

I will explore whether I can make Hackey Trackey more robust to having a fractional number of PPQs per note, but I fear it won't be possible to get that working robustly enough because the conversions from MIDI notes to rows and back becomes lossy (you lose the fractional part).

— Reply to this email directly, view it on GitHub https://github.com/JoepVanlier/Hackey-Trackey/issues/103#issuecomment-2171743441, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEZF3YMPYQKDIQEXOD3Q7ZLZHWVPFAVCNFSM6AAAAABIVO7ZFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRG42DGNBUGE . You are receiving this because you were mentioned.Message ID: @.***>

MR-ritchie commented 5 months ago

Just saw the second message, yep 3840 is working perfectly!

On Sun, Jun 16, 2024 at 4:28 PM Percy Boyle @.***> wrote:

The ticks per quarter note is set to 1024, so that makes sense! I set it to 1536 and now everything is working for resolutions that are multiples of 2 and 3. Thanks again for your help! This really is a fantastic tool, it has become my go-to for entering midi notes.

On Sun, Jun 16, 2024 at 8:29 AM Joep Vanlier @.***> wrote:

Thank you! It doesn't seem related to the config file. However, I think I have found a way to locally reproduce the issue. It seems to happen when the rows don't end up on exact MIDI Pulses Per Quarter note.

In the REAPER settings, could you tell me the value you have for ticks per quarter note in the MIDI panel?

image.png (view on web) https://github.com/JoepVanlier/Hackey-Trackey/assets/19836026/feb14d16-ef7c-4373-a39f-1b1301d18e15

My guess it's something different than the default of 960? For HT to work with a resolution of 3, it's important that it's divisible by 3. I will issue a warning when it isn't the case in the future. Note that when changing this setting in REAPER, it will only affect MIDI items created after this change.

I also note that I actually recommend a bad thing in the docs, namely to set the PPQ to a multiple of 256, but that should be a multiple of 256 and the desired row resolution.

I will explore whether I can make Hackey Trackey more robust to having a fractional number of PPQs per note, but I fear it won't be possible to get that working robustly enough because the conversions from MIDI notes to rows and back becomes lossy (you lose the fractional part).

— Reply to this email directly, view it on GitHub https://github.com/JoepVanlier/Hackey-Trackey/issues/103#issuecomment-2171743441, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEZF3YMPYQKDIQEXOD3Q7ZLZHWVPFAVCNFSM6AAAAABIVO7ZFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRG42DGNBUGE . You are receiving this because you were mentioned.Message ID: @.***>

JoepVanlier commented 5 months ago

Wonderful! I'll close the issue now, but if you run into any more issues, please feel free to open a new one (or reopen this one)! Thanks for reporting!