Got my double tap detection working. The timer code I use was acting a bit ‘weird’ but I found that increasing the timer time to two seconds seems to have cured most of the issues with it. Not sure why it was behaving strangely. I guess that’s the problem with using other people’s library routines, you never quite know what they are really doing. That is unless you want to spend a load of time figuring them out in which case you may as well just write your own. I might still do that, the timer library code has some strange behaviors that I’ve had to code around, always hate that.
Posts Tagged ‘Hackman’
My ‘one more mod’ was to detect a double tap stop and avoid setting the internal ‘playing’ indicator on the second tap which is what happens now if you do a double tap (which is why I need the foot switch on the box to be able to reset it).
Should be dead easy, setup a timer and if you see a second stop within the timeout period, ignore it.
However I have found that the timer library I am using (TimerOne) seems to drive the timer exit as soon as you attach it. This might be great for turning an LED on and off but not so much use for my intended use which is as an actual timer!
I’ve managed to finagle the code to ignore the initial timer interrupt and it mostly now works, I’ve just got one ‘glitch’ in the code somewhere where it still fails to ignore the second ‘stop’ under certain circumstances.
Sometimes what looks simple just isn’t!
One last thing I want to do (for now anyway LOL). If I double tap the stop button on the Jamman to force an immediate stop vs the fade out I usually use, the Hackman treats the second tap as a start and sets the playing flag (and LED) to on. This is one way the Hackman status can get out of sync with the Jamman and why I have the ‘reset’ switch on it now.
So it seems to me I should be able to detect a double tap and ignore the second stop command if it occurs quickly enough after the first one, say within half a second.
Let the experimenting begin!
Until you have a sticker…
So one thing I mentioned earlier that I needed to do was to add a reset switch for the play mode function in the Hackman. but then I got to thinking about the switches I already have in there. Right now those are hooked up directly to the switch input in the Beat Buddy and are used to switch songs up and down. But then it occurred to me that you can switch songs up and down with midi so why not connect the switches to the Arduino inside the Hackman and have IT then send the appropriate midi commands to the Beat Buddy. What’s cool about this is that I could also make it resend the last tempo it saw any time it switched Beat Buddy tracks. That would mean I would not need to do a load of foot tapping on the Jamman to reset the tempo if I changed Beat Buddy tracks since the Hackman would do it for me.
It would also remove the need for the switch cable from the Hackman to the Beat Buddy OR I could still keep that and assign different functions to a pair of switches. If I did that I think I’d make the external switch box free standing instead of being attached to the pedal board because reaching over to the back to press buttons is not that easy and it’s just be a simple plug and go operation to setup since there’s no power involved.
The other advantage of integrating the Hackman switches into the Arduino is that I could also detect when both switches are pressed together and use that to reset the play mode flag internally. Since this in not something I need to do very often (only when I mess up my foot tapping between pedals) I think that would work great and be a usable solution to what I am trying to do.
Sometime I amaze myself at how bloody good I am !
A short video describing my pedal board setup and yes, that is me at the start of this video. Let’s just say that I am happy on the inside and leave it at that LOL!
Well, I had to make a new pedal board as it was NOT going to all fit on the old one. Well, it would so long I did not want to actually connect anything to anything else! So here’s the new board:
All the power leads are hooked up although I still need to hook up the midi cable from the Hackman to the Beat Buddy (all I’ve got is a really long one for now) but most annoyingly, I’ve misplaced (I.E lost) a TRS cable I had with right angle plugs on it to hook up the Hackman to the Beat Buddy so it looks like I’ll have to make a trip to the music store soon to get another cable.
So I finished up the Hackman tonight. I have a few small and annoying problems like the power connector on the mock up Arduino I as using (an old one that did not work) was set slight further back than the one on the actual board I was using which resulting in the actual board not fitting onto the mounting plate until I’d opened up the hole for the power lead to accommodate it. That and a bad connection inside one of the plugs I’d made up to connect the midi out connector to the daughter board I’d built which cost me another couple of hours to track down.
Oh, and I wired the bloody indicator led up backwards Duh!
However once all that was done, it works fine.
All I’ve got to do now is make room on the pedal board for the drum pedal, mount Hackman on the pedal board above the other pedals because it will be at the back and squeeze another two wall wart power supplies in there for the drum pedal and the Hackman.
Still, all in all, pretty cool.