Building an ARP - TransportHandler
-
So I'm building an Arp, and I want it to be able to handle Tempo changes, as well as start on beat and start on bar stuff, so I think I need the TransportHandler, but Im getting nowhere with it.
The demo snippet in the documentation works at least now - when I start/stop the external DAW simulator, but the documentation is its usual terse uncommunicative self....
Has anyone used this and can say how it works? or has a snippet?
So specifically Im looking at:
th.setEnableGrid(true, 18); <--- whats this "18" here?
th.setOnGridChange(false, function(num) { Console.print("grid event"); });
This does nothing....so its not right in some way....
-
@Lindon said in Building an ARP - TransportHandler:
th.setEnableGrid(true, 18); <--- whats this "18" here?
the 18 is equal to 1/64T, if you not use "HISE_USE_EXTENDED_TEMPO_VALUES=1" in your Hise build, then the lowest note value 1/64T will be the number 23
-
@ulrik thanks -- I have it running now.
Im still confused about how to get it running without the transport running, so I assume that's not possible, and I have 2 arps so I'd like 2 transport handlers but again i assume we are (just like Kontakt) stuck with working it all out in the one call back..
-
@Lindon this is a small snippet, TransportHandler will start/stop with the transport
it will also start/stop dependent on pressed keysSo if keys down, the gridChange function will start counting amount of 1/64T's (Clock), and if you start the transport the "Clock" will adjust to the transport (playHead)
HiseSnippet 820.3ocsU01aZCCD1g1TMXunUoIsu5OFjpXvdoqRUUqq.sEsQKZvl12pbcN.qFribb5JZp+m2+fsywoDnkstgz3CQb28bmexSt6bOshCIIJMwq7fow.w6Q98mJMiaNlIjjNsHdOwuKKw.Zpy0ASiYIIPHwyasirN7JuNI62Od2ArHljCEtHjunDb3ihIBSg2d6+AQTzgrPXfXxbne89c3JYSUjJE4yZ90IwL9ErQvILKrR9DuMZGJLJceCy.IDu0OPENs+X02jN7eQjHNOBrFMH8wB4benJJzxXqWRywhnvd27dmPvpzqPEVyoBOyuqHTLyegZ7zr.zhLlWO7JsH8VaA5032QukPIu4nz5NJsoeetVDaJhX4yC86HwONCYnrOOUbXIkddI+lJDgzTaB6B3PMZLKifsqWeKJ9n5tUpfRehgN3X5dz1xQBITiqA78XflIShUZywLYXDnCrfGbbsDvzVxvWmizhv.iNE1h1XGavW7hxUDxHrDzgoRtQnjzQHHTEkif.djhewVTldzKyd9ppU9dkxHKSTQPsXsPZbXvZc8ry5T4QEkvcZE0DQ5Pg8t7tpPH.M6oggft8U3KqjEUc2YbQIOQYfSkAYGLx1DCSanlw.UHcnoYDnRYaUsA6j6uo0cfUuttB81Eb3PWEECoAYCQ0FAlSRmfDw9Y4Cvzjfpz81iVuZkxtRqhuuJa+5oUQYBus32JrcBZ4QxSLPlN4bPuE8RVTJLCH1VsXu5F+c8pbWyzb.UxNRg4zXH29OOrQx6Fw+84NsXFlsYO2GhKFzFgkNdsfKwMGtV+x9sfjKPwB2cbm4BbhTElFwLKNlZ2MkG.0iElMrRtLQXlN+tq+gY25+wY2+VJtoeOggOd4brzR3HpT+O3X9FuG62d3PfaJH359G90Uc818b7eRkZDxQcYFs3JhmONjzGW5yA63rDhvh66Ux1s3rqassJPePFlY7S7WdvFVau7fMtIHYBiqUmwcSA1cpOHyCxIY10Ikw60PaZCR1jw757DbE+Yb9hk5NI9xUMwWspI95UMw2rpIt8pl3aW0D249SzdC76SMpItwFBoau1YqR77b2Hk0sR9EmNif7C
-
@ulrik thanks - looking at this now..
what are arg2 and arg3 in the callback?
-
@Lindon actually I don't remember, I guess isPlaying and something?