How does the file_slot feature work?

For topics related to using MsPinky inside the Max/MSP graphical programming environment
Post Reply
tsutek
Posts:38
Joined:Thu Feb 23, 2012 8:53 am
How does the file_slot feature work?

Post by tsutek » Sun Mar 18, 2012 10:06 am

Hi,

I'm building a new timecode scrubber that utilizes the file_slot feature. So far I've managed to switch fileslots so that I can load different samples into different slots. However, once I switch the fileslot, the timecode control is still bound onto the first (the default slot, is it slot # "0") fileslot!

this is also visibly evident because the uidial360 stops tracking the timecode once I change the slot.. when I switch back to slot # 0, everything syncs up and works as normal, uidial360 resumes spinning..

Do I need to re-transmit timecode initialization messages to the mptcfs_sa~ object?

EDIT: A-ha! It seems you have to re-enable "stop/start" to get the active slot to lock onto timecode.. of course! This is actually pretty cool - If M4L would support multichannel IO, you could theoretically have 64 TC decks in one MsPinky plugin instance :shock: Ah, but I forgot that there is only 1 TC signal input pair in the object itself.. O'well.

Still, in any case, there's a lot of ground to cover in using fileslots.. any further info on the matter would be greatly appreciated :|


EDIT2: Ok, so I think I've got the basics of it down now.. The fileslots open up some mindblowing avenues for advanced jugglery!!

Some specific questions come to mind now: If I want to load a sample into a fileslot but keep my focus on the current slot I'm in, how would I go about it? (ie. loading stuff into fileslots in the background)

Another one - is there a way to adjust the playback volume of a fileslot that is not currently in focus? Or is adjusting sample levels my only option..

Cheers
tsutek
Posts:38
Joined:Thu Feb 23, 2012 8:53 am

Post by tsutek » Sun Mar 18, 2012 2:30 pm

Oh, one more thing.. When I save my liveset, only the last loaded sample gets stored on recall? So I need to come up with a way to pattrize the fileslot specific parameters?
dlpinkstah
Site Admin
Posts:1093
Joined:Mon Jun 07, 2004 9:17 pm

file_slot X

Post by dlpinkstah » Tue Mar 27, 2012 6:50 pm

A bit about file_slot X...

mptcfs_sa~ now plays up to 64 files at a time. Command "file_slot N". N is in the range {0 ... 63} and selects which slot you have control over at a given time. The default slot number is 0. If you never send "file_slot N" the object
behaves exactly as it did before, loading files and playing them on slot 0. If you load a file on slot X, set it to playing, etc.. it will keep playing if you chage file_slot to Z and start loading another file. However, you can't control anything on slot X until you send "file_slot X" command again. Eventually I think I'll make it so that if you specify file_slot to be -1, it will apply all control settings received subsequently to all slots.
That would be an easy way to, for instance, make all slots start or stop playing at once. As it currently works, you have to sequence through all the slot numbers where you've
loaded files and issue commands for each slot.

I also modified uiwaveform so that it can load multiple waveforms at once, and instantly switch between them all via the "waveform_slot N" message. So using these two together
should give you the ability to load a bunch of clips and have them all ready to play instantly by simply changing the slot number. Since the waveforms have already been drawn,
and the files loaded up, switching should be WAY faster.

I hope this helps..... and I'll flesh this all out soon as I can.
tsutek
Posts:38
Joined:Thu Feb 23, 2012 8:53 am

Post by tsutek » Wed Mar 28, 2012 7:37 am

Great news!

Can't wait to see the new features implemented :) In the meantime, I'll see if I can update the refdoc draft to include this info in the file_slot entry.


Cheers
Post Reply