Auto naming saved files

Discuss future feature requests. All ideas welcome.

Moderator: jesse

Post Reply
misteralan
Posts: 22
Joined: Tue Nov 18, 2008 2:04 am

Auto naming saved files

Post 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!
Al

bla
Posts: 6
Joined: Mon Mar 14, 2016 9:17 pm

Re: Auto naming saved files

Post 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");

Post Reply