Thread: Midi <-> OSC
View Single Post
Old 11-17-2017, 01:36 PM   #73
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by fundorin View Post
I did the same timing tricks when programming Arduino. Thought that EEL2 allowed more interesting methods.

Seems like the best way would be to adapt those Arduino tricks to EEL2 timer function for my needs. Thanks.

Another noob question: how to convert variables into strings to be able to print them to the log? In short, any type of data into one another. I found sprintf function but without small examples in the manual it's hard for me to understand how to use it.
If you're going to the log, you can use printf() to format, which functions mostly like the C version. e.g.
Code:
strcpy(#somestring,"hello world");
printf("This is an integer: %d\nThis is a float: %f\n"This is a string: %s or %s\n", 
            1, 1.5, "some literal string", #somestring);
Justin is offline   Reply With Quote