Page 1 of 1

Auto naming saved files

Posted: Wed Jul 13, 2016 11:06 am
by misteralan
Hi fellow SL devotees,
I have recently had great success with SL 1.7.3 on my Yosemite MBP!
Man I really love SL as it it a terrific combination of powerful and simple!

Something that I have tried to setup over the years with AppleScript but have failed is a MIDI-triggered auto-naming feature when saving in SL so as to not stop the creative flow and take my hands off the guitar.

Any ideas or generous programmers out there?
Thanks for everybody's work to get SL where it is right now in 2916!

Re: Auto naming saved files

Posted: Sun Jul 17, 2016 8:50 am
by bla
Setting up liblo in C is pretty straightforward, they have example code on their website.

Code: Select all

void getFileNameTimestamp(char* buf, size_t bufsize)
   struct tm* ltime;
   time_t now = time(NULL);
   ltime = gmtime(&now); 
   strftime(buf, bufsize, "/mnt/bla/%Y-%m-%d-%H-%M-%S.wav", ltime);

getFileNameTimestamp(filename, sizeof(filename));
lo_send(t, "/sl/0/save_loop", "sssss", filename, "wav", "little", "osc.udp://localhost:9953", "/sl_error");