How to make a 3 bar beat jump with one button push ?
Home :: Post and find Controller Mappings :: How to make a 3 bar beat jump with one button push ?Reply
How to make a 3 bar beat jump with one button push ? Posted on: 14.08.2011 by Erick Pelke So i'm trying to copy the slicer effect of the novation twitch in traktor. But for this i need to be able to make a 3 bar beat jump. So i'm trying to combine a one bar beat jump two bar jump underneath one button. But it doesn't work as i have hoped.So has anyone an idea on how to make a 3 bar (or 5, 6, 7 bar)beat jump with just one push ? | |
Chasidy Heckenbach 13.11.2011 |
Originally Posted by bascurtiz
i will be implementing the idea from the blog tho - which is to drop a hotcue when the slicer is enabled and always jump back to that before beat jumping. will be working on that today or tomorrow and push out a new release. it's still pc-only tho i'm afraid. don't have any access to a mac to build/test |
Chasidy Heckenbach 22.09.2011 |
Originally Posted by mrjezza
my code will/should work on a mac too - it uses the cross platform RtMidi lib for the core stuff- but i'm 99% sure i'd need to test/debug some stuff on a mac. i just need to get access to a mac somehow to compile/test the C++ i guess... i had thought about using osx in a virtual type session - but not sure i fancy paying for osx for something like this and/or using an illegal version. maybe i need to find someone who has a mac that i can ssh into or something. i could/might release the source code - but not planning on that at the moment. |
Chasidy Heckenbach 22.09.2011 |
Originally Posted by mrjezza
my solution via midimasher is to route all midi to and from all controllers via it's own engine - where then u can do anything u want with the data - pass it on, change internal states/modifiers and send out anything u like. so my slicer code counts beats via the beat phase monitor in traktor, lighting up the lpd8 (or any controller) pads for each step and sending out a beatjump-8 to traktor at the end (if that mode is selected - else it just slices through the entire track - letting it play as usual until u press a pad) when u press a pad it tries to work out what beat u are on and then beatjumps back to the pad u press - this is where it sometimes/often fails - due to the quantize in traktor. the code creats a "heartbeat" event internally (on,off) based on the beatphase monitor and also a "quantize" event which *should* be enough to work out where traktor will jump to - but that needs some more testing/fiddling... all the user code in my midimasher is written in lua and pretty easy to get into - tho some coding background helps i guess. standard stuff like routing a controller to (and optionall back from) traktor etc is simple tho with some pre-coded functions i have in the libs. also creating toggle buttons from a normal button etc - so u don't need to mess around with that stuff in traktor - keeping lpd8 pad lights on (when needed) when u release them (as usually they light up when u press and go out when u release even if the pad has been sent a midi ON message) and auto feedback for leds for controllers like the launchpad. can do everything that an app like midikatapult can do for example (well almost - can't do the "slowly sliding from one val to another" *yet*) and can do a whole lot more through custom code. i was waiting for the new midikatapult to control my launchpad - i bought midikatapult as soon as i got my LP - but gave up hope of a new version so have now coded all the stuff in my midimasher that i need for my LP. |
Chasidy Heckenbach 22.09.2011 |
Originally Posted by mrjezza
i tried that but sometimes my code would get it wrong and so jump too far - outside of the loop - and so then not loop back - so now i send a beatjump-8 at the end instead of using loop enabled. how did you work out how many beats to jump? i.e: how do u work out at what point in the 8 beats traktor currenty is and hence how many beats to jump back to when you press the button for "2nd beat out of 8" etc? i.e: if you're at beat 5 then it's -3 - ish - depending on quanitize rules. cunning idea on mapping events to both button down and up - i have to wait between sending out beatjumps if more than one is needed. glad i wasnt going mad and some kind of delay between them really is needed anyway. also - how do u beatjump -7? as my code has this set (in devices/traktor.lua) Code:
["jump-7"] = { "beatjump_-4_", "beatjump_-2_", "beatjump_-1_" }, the slicer code is in lib/slicer.lua i believe u said you were getting a real twitch? any more clues on how to port the slicer over to traktor without using software like my midimasher sat in the middle? my software does also light up the pads ala twitch tho which is kind of cool - else u have no clue what beat it is currently on ofc. |
Chasidy Heckenbach 14.08.2011 |
Originally Posted by becomingdj
that youtube video seems to show some functionality where he can switch between different beats, but each beat is looped - whereas in the slicer the whole 8 (?) beats are looped. i saw the loop length changing in his youtube video anyway - might be useful if he saw this and explained what he did tho. |
Erick Pelke 14.08.2011 | So i'm trying to copy the slicer effect of the novation twitch in traktor. But for this i need to be able to make a 3 bar beat jump. So i'm trying to combine a one bar beat jump two bar jump underneath one button. But it doesn't work as i have hoped. So has anyone an idea on how to make a 3 bar (or 5, 6, 7 bar)beat jump with just one push ? |
Neoma Picklesimer 12.11.2011 | that'll be awesome! Time to buy the Twitch ...finally Let me know how u progress. |
Chasidy Heckenbach 13.11.2011 |
Originally Posted by bascurtiz
i will be implementing the idea from the blog tho - which is to drop a hotcue when the slicer is enabled and always jump back to that before beat jumping. will be working on that today or tomorrow and push out a new release. it's still pc-only tho i'm afraid. don't have any access to a mac to build/test |
Neoma Picklesimer 12.11.2011 | Zestoi, I saw u posted a reply in the String Theory article... Any luck on getting your script up and running? I'd love to play with it / configure it to the Twitch to get the Slicer mode working in Traktor |
Chasidy Heckenbach 22.09.2011 | just noticed i could maybe get some osx web hosting... anyone know of anyone good/cheap with at least ssh access so i could compile on? i already have 2 servers (one linux, one freebsd) so not looking for any major hosting - just something i could use to compile on - and then maybe wack a few websites on since i'd be paying for it anyway... |
Chasidy Heckenbach 22.09.2011 |
Originally Posted by mrjezza
my code will/should work on a mac too - it uses the cross platform RtMidi lib for the core stuff- but i'm 99% sure i'd need to test/debug some stuff on a mac. i just need to get access to a mac somehow to compile/test the C++ i guess... i had thought about using osx in a virtual type session - but not sure i fancy paying for osx for something like this and/or using an illegal version. maybe i need to find someone who has a mac that i can ssh into or something. i could/might release the source code - but not planning on that at the moment. |
Anna Jenny 22.09.2011 | the whole time i was doing this i was wishing i could code things (incrementing vars or using counters to keep track of position), which would have made things WAY easier. i can see that's exactly what you've done with your code, which is making me even more strongly consider going with translator/intermediary software unfortunately i'm on osx/mac so i would need to find a mac or cross platform solution. any suggestions? |
Chasidy Heckenbach 22.09.2011 | fyi here's my slicer lua code - with some stuff removed for clarity: traktor beatphase to animate the pad leds: Code:
capture(app, beat_event, ALL, 0, function(d2, e2, v2, p2) -- turn off current pad send(d, pads[slicer.data[sid].step], OFF, p) slicer.data[sid].step = slicer.data[sid].step + 1 local jump = 0 if slicer.data[sid].step >= 9 then slicer.data[sid].step = 1 if slicer.data[sid].loopmode then jump = -8 end end if jump ~= 0 then slicer.send_beatjump(app, jump, deck, beatjumps) end -- turn new pad on send(d, pads[slicer.data[sid].step], ON, p) Code:
for i,e in ipairs(pads) do -- map back from pad name to slicer step slicer.data[sid].pads2step[e] = i capture(d, e, ALL, p, function(d, e, v, p) if v > 0 then if slicer.data[sid].active == false then return end local jump = slicer.data[sid].pads2step[e] - slicer.data[sid].step - 1 -- send beatjump and turn old pad off slicer.send_beatjump(app, jump, deck, beatjumps) send(d, pads[slicer.data[sid].step], OFF) slicer.data[sid].step = slicer.data[sid].pads2step[e] else -- make sure pad led stays on (lpd8) send(d, e, ON, p) end end) |
Chasidy Heckenbach 22.09.2011 |
Originally Posted by mrjezza
my solution via midimasher is to route all midi to and from all controllers via it's own engine - where then u can do anything u want with the data - pass it on, change internal states/modifiers and send out anything u like. so my slicer code counts beats via the beat phase monitor in traktor, lighting up the lpd8 (or any controller) pads for each step and sending out a beatjump-8 to traktor at the end (if that mode is selected - else it just slices through the entire track - letting it play as usual until u press a pad) when u press a pad it tries to work out what beat u are on and then beatjumps back to the pad u press - this is where it sometimes/often fails - due to the quantize in traktor. the code creats a "heartbeat" event internally (on,off) based on the beatphase monitor and also a "quantize" event which *should* be enough to work out where traktor will jump to - but that needs some more testing/fiddling... all the user code in my midimasher is written in lua and pretty easy to get into - tho some coding background helps i guess. standard stuff like routing a controller to (and optionall back from) traktor etc is simple tho with some pre-coded functions i have in the libs. also creating toggle buttons from a normal button etc - so u don't need to mess around with that stuff in traktor - keeping lpd8 pad lights on (when needed) when u release them (as usually they light up when u press and go out when u release even if the pad has been sent a midi ON message) and auto feedback for leds for controllers like the launchpad. can do everything that an app like midikatapult can do for example (well almost - can't do the "slowly sliding from one val to another" *yet*) and can do a whole lot more through custom code. i was waiting for the new midikatapult to control my launchpad - i bought midikatapult as soon as i got my LP - but gave up hope of a new version so have now coded all the stuff in my midimasher that i need for my LP. |
Anna Jenny 22.09.2011 | i believe that with the limited options within traktor itself for repeated commands on a single input keystroke (hence the need to map on the up and down press) you'd be limited to a fixed measure size. i'm hoping there will be more flexibility with midi controller inputs rather than a keyboard using traktor's built in controller manager because otherwise you'll be fixed to a measure/loop size. not sure how i'd get the lights following either but i hadn't even thought about that until you mentioned it just now i honestly cant remember how i got the 7 jump (although i know i got all jumps working before i made that vid). from memory the limitations surrounding making a 7 jump was the reason the measure size had to be fixed. i have since changed hdds in the laptop so i'll try and get the tsi off the old hdd if i cant figure it out again once my twitch arrives. |
Chasidy Heckenbach 22.09.2011 |
Originally Posted by mrjezza
i tried that but sometimes my code would get it wrong and so jump too far - outside of the loop - and so then not loop back - so now i send a beatjump-8 at the end instead of using loop enabled. how did you work out how many beats to jump? i.e: how do u work out at what point in the 8 beats traktor currenty is and hence how many beats to jump back to when you press the button for "2nd beat out of 8" etc? i.e: if you're at beat 5 then it's -3 - ish - depending on quanitize rules. cunning idea on mapping events to both button down and up - i have to wait between sending out beatjumps if more than one is needed. glad i wasnt going mad and some kind of delay between them really is needed anyway. also - how do u beatjump -7? as my code has this set (in devices/traktor.lua) Code:
["jump-7"] = { "beatjump_-4_", "beatjump_-2_", "beatjump_-1_" }, the slicer code is in lib/slicer.lua i believe u said you were getting a real twitch? any more clues on how to port the slicer over to traktor without using software like my midimasher sat in the middle? my software does also light up the pads ala twitch tho which is kind of cool - else u have no clue what beat it is currently on ofc. |
Anna Jenny 22.09.2011 | i believe we're talking about my video (youtube: traktor slicer mapping v1) the changing length was the number of beats for the required jump - ie jumping from beat 6 of the loop to beat 1 requires 5 beats, which is done with 4+1 beat jumps. was programmed using a command on the downpress and a command on the uprelease of the keyboard key - only way to get this happening inside traktor's own mapping. check here for more info about it: http://www.djranking s.com/community /sho...449#post352449 |
Chasidy Heckenbach 14.08.2011 |
Originally Posted by becomingdj
that youtube video seems to show some functionality where he can switch between different beats, but each beat is looped - whereas in the slicer the whole 8 (?) beats are looped. i saw the loop length changing in his youtube video anyway - might be useful if he saw this and explained what he did tho. |
Erick Pelke 15.08.2011 | I was also trying with a keyboard, so it should be possible somehow. And I already saw that video but didn't find it anymore, so thanks. But i don't get that piece of code. I know what it means/does. But is that code from your midi controller or what is that ? |
Chasidy Heckenbach 14.08.2011 | this was the post i was believeing of http://www.djranking
s.com/community
/sho...d.php?p=321453 it's not quite slicer functionality i don't believe but maybe he worked out how to do the multiple beat jumps etc. he's using keyboard input and not midi tho - maybe that makes a difference |
Chasidy Heckenbach 14.08.2011 | i just had a play and the magic number seems to be 3 millisecs for the delay, always seems to work then. Code:
capture_event("lpd8", "0,3", 0, function(d, e, v, p) if v > 0 then send_event("traktor", "beatjump_-2_a", 127) msleep(3) send_event("traktor", "beatjump_-1_a", 127) end end) i don't *believe* you can just do it without additional software but i thought someone had posted a youtube video of some slicer-type functionality a couple of weeks ago. |
Chasidy Heckenbach 14.08.2011 | you need to send two events with a bit of a delay between them, else traktor just uses the last one it gets. if anyone has a different solution i'd love to know about it though. |
<< Back to Post and find Controller MappingsReply