martin-lueders / ML_modules

free modules for VCV Rack
BSD 3-Clause "New" or "Revised" License
90 stars 18 forks source link

Problem with .50 build of counter #23

Closed ShofB closed 6 years ago

ShofB commented 6 years ago

First of all let me thank you and commend you on your great work. You have created some very useful code. I have been a programmer for 25+ years and overall VCV and the modules that have been created are impressive to say the least.

In the latest build (.50) I seem to have found a bug with the counter. There is no pulse generated when the counter reaches the desired length. This did work before as I use this in a patch I had posted on the patch db called "sequencer chain" https://patchstorage.com/sequencer-chain/ Here is a pic showing my test case; hope this helps.

One more thing what drove you to create the octaflop. I understand what it does but as yet I can not see a compelling musical use for it. Again thanks for the great work.

test

martin-lueders commented 6 years ago

The counter problem seems a weird one. Most of the times, it works just fine for me, but I also was able now, after trying many times, to reproduce your problem once in a while...

As for the Octaflop: Sometimes you need to convert triggers to a gate, switching things on with one trigger, and switch them off again with another trigger. Once you have 8 of them, it's just easy to make a binary counter. The funny thing with modular synths is: just throw odd things at people, and they will come up with uses for it. :)

I keep on investigating the counter problem...

martin-lueders commented 6 years ago

Can you please confirm whether the problem occurs for you reproducibly or also only sporadically?

One more comment: The triggers are only 1 ms, which is too short as to be picked up by any GUI module. Can you try to insert a trigger delay with 0 delay time and some short trigger duration between the Counter and your Gatrix module, so that the pulse will be long enough to be picked up by the GUI?

phdsg commented 6 years ago

for me, a new loaded counter modules is always mute on the important outputs. only trigger is passed. once i 'initialize' the module it works as intended. might give you clue where to look.

ShofB commented 6 years ago

Yes, it is very constant, it does not work. I made the changes you suggested with no effect. It might help to tell you what I am running this on...

Windows 10 (latest version) 6 core AMD @3.2 g AMD video card a ton of disk space

counter test

martin-lueders commented 6 years ago

Just a stupid question (sorry for that): Did you press the "Start" button to get the whole thing going? The module does not automatically start counting. I am considering implementing an auto-mode which solves that.

ShofB commented 6 years ago

There is no such thing as a stupid question. I'm sure you know about the support person telling the customer to press any key...

But yes I did do that. Anything I can do to help let me know.

martin-lueders commented 6 years ago

Let's take it step by step. If you only take on Counter, clock it with an LFO and connect STOP out with START in. If then you press the START button, does it count not at all, count once or count repeatedly?

phdsg commented 6 years ago

counts once here.

ShofB commented 6 years ago

Ok, here is the latest news. i got up this morning, loaded in my latest test program (last image), tried it and same thing. It counted one time and stopped, no ending pulse was sent. I tried it a few times with the same results. I moved on leaving the rack loaded with the test program.

I forgot about it and later (a couple of hours) came back and found my computer asleep. Waking it up the rack was still loaded. I decided to try it and low and behold it worked fine. Repeated tests were successful. I unloaded the patch, loaded it back in and it still worked.

I unloaded the rack, loaded it back in and tried the test program again. Now it failed. Loading/unloading/loading the patch id not help. I unloaded the rack, load it back in and it still failed.

I then tried putting the computer to sleep with the rack still loaded with the test patch and when awakened it made no difference., it still failed.

I tried your suggested test and it also failed.

How are you doing the timers? Are you referencing some timer from rack or is this a timer that you create within you code? Just a thought, maybe one that is off track.

Using my test program I also tried starting the timer and then using the buttons on the first time I hit stop. The counter stopped but no pulse was sent. I

phdsg commented 6 years ago

i had a somewhat similar issue with one of hetrickcv modules. this is how he fixed it: https://github.com/mhetrick/hetrickcv/commit/d25ce3810849c05cc6510a88cc933249c09d2936

martin-lueders commented 6 years ago

@phdsg: thanks for the tip. I guess, indeed, that was the problem. I now added a call to initialize in the constructor, which was missing.

Unfortunately, I am away from my Windows machine, so I can't rebuild the Windows binary. If any of you can compile the stuff, could you, please, confirm whether that solves the problem?

Thanks for your help!!!

phdsg commented 6 years ago

seems you mixed up v040 and dev.

martin-lueders commented 6 years ago

Oops. Should be fixed now.

phdsg commented 6 years ago

works as intended now on my side.

martin-lueders commented 6 years ago

@phdsg Do you have a Windows binary? If so, could you somehow send the dll for me so that I can prepare a fixed release even being far from my Windows machine?

phdsg commented 6 years ago

ML_modules-20171123.zip

martin-lueders commented 6 years ago

Thanks very much!!

ShofB commented 6 years ago

This seemed to have fixed the problem. Uninitialized data structures will get you everytime. If I may suggest you should do a pss through the other mods and double check for that. Thanks again.

On Fri, Nov 24, 2017 at 3:28 PM martin-lueders notifications@github.com wrote:

Thanks very much!!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmartin-lueders%2FML_modules%2Fissues%2F23%23issuecomment-346906023&data=02%7C01%7Cshofb%40hotmail.com%7C8af984bbcbe146c0050308d5339310d3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636471629083822261&sdata=UqYLm%2Be01fENVY9ukE4m%2B%2FtIFP83pIMHLMT3VusixtM%3D&reserved=0, or mute the thread https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD4wDPCk7iT11tjYHdOGo30tdT5kcaeEks5s51EagaJpZM4Qntk_&data=02%7C01%7Cshofb%40hotmail.com%7C8af984bbcbe146c0050308d5339310d3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636471629083822261&sdata=RD2bcujQR05qowN9XHgR2ghgSiGKJIgGputjUHydiZs%3D&reserved=0 .

-- ShofB

My Web Site http://www.l-and-l.net

Check out my Soundcloud stream @ https://soundcloud.com/shofb

And my YouTube MyKits demos @ http://www.youtube.com/channel/UCjKNiE1s2YlJYPsAKbe8vhg