Playout info from moving cursor without playing?

Discussions, advice, bug reports and much more about the "bach" environment.
Post Reply
Julien_Vincenot
Posts: 36
Joined: Fri Apr 26, 2013 8:01 am

Playout info from moving cursor without playing?

Post by Julien_Vincenot » Fri Feb 28, 2020 11:41 pm

Hi !

Maybe I missed something in the tutorials : is there a way to retrieve data from a roll that is not really playing but where the cursor is moving non-linearly (or with flexible speed) via setcursor?

I found a way that seems to do the trick (see screenshot) but I wonder if that's dangerous somehow to toggle play/stop all the time like this, especially where the input to setcursor comes from a line... :-\

Thanks !

Julien

EDIT : Attachment added !
Attachments
Capture d’écran 2020-02-29 à 1.04.02 PM.png
Capture d’écran 2020-02-29 à 1.04.02 PM.png (84.83 KiB) Viewed 4647 times
Last edited by Julien_Vincenot on Sat Feb 29, 2020 6:04 pm, edited 1 time in total.
--
Julien Vincenot
creator of the MOZ'Lib package

sydy
Posts: 155
Joined: Tue Mar 21, 2017 1:34 pm

Re: Playout info from moving cursor without playing?

Post by sydy » Sat Feb 29, 2020 7:56 am

You forgot your screenshot... Could you add it?
Maybe you could link the mousestate (max) with a snapshot and bach query pixeltotime (see Converting pixels to time)

Julien_Vincenot
Posts: 36
Joined: Fri Apr 26, 2013 8:01 am

Re: Playout info from moving cursor without playing?

Post by Julien_Vincenot » Sat Feb 29, 2020 6:12 pm

Hi Sydy

Sorry about that, added the screenshot.
Actually I took a quick look at the pixeltotime page in help center I can't wrap my head around it. Nothing is printed when I change the int boxes :( Maybe you can show me in context?

I tested my solution for a long while yesterday and it didn't seem to bother Max or bach. Was actually pretty solid !

J.
--
Julien Vincenot
creator of the MOZ'Lib package

danieleghisi
Site Admin
Posts: 1347
Joined: Fri Dec 03, 2010 1:25 pm

Re: Playout info from moving cursor without playing?

Post by danieleghisi » Sat Feb 29, 2020 10:29 pm

Hi, I think you should see the "interp" message and the "getcurrentchord" messages. Look up #interp and #getcurrentchord.
The second one is coarser, the first one gives you all the information at a given point.
No need to play/stop, that would only mess with the scheduler.

Julien_Vincenot
Posts: 36
Joined: Fri Apr 26, 2013 8:01 am

Re: Playout info from moving cursor without playing?

Post by Julien_Vincenot » Sat Feb 29, 2020 11:07 pm

Yes that's what I was worried about...
[setcursor $1, interp $1] works like a charm, thanks Daniele !
--
Julien Vincenot
creator of the MOZ'Lib package

Julien_Vincenot
Posts: 36
Joined: Fri Apr 26, 2013 8:01 am

Re: Playout info from moving cursor without playing?

Post by Julien_Vincenot » Sat Feb 29, 2020 11:15 pm

I just realized, maybe that's an oversight but interp doesn't seem to retrieve the note or chord name correct?
That was the way I was able to recover markers with my previous method (copying location to the name of notes attached to a marker). I will put that in a slot instead, but perhaps that would make sense to get names as well?
--
Julien Vincenot
creator of the MOZ'Lib package

danieleghisi
Site Admin
Posts: 1347
Joined: Fri Dec 03, 2010 1:25 pm

Re: Playout info from moving cursor without playing?

Post by danieleghisi » Sat Feb 29, 2020 11:27 pm

Yes it would make sense, you are right.
IN the meantime you can use #slottoname and #nametoslot.
Also look up #slot+name

Post Reply