Thread: String to Hex
View Single Post
Old 07-06-2022, 12:04 PM   #4
procedure
Human being with feelings
 
Join Date: Jun 2022
Posts: 11
Default

Thanks very much for responding.
Here is the current version of my code with your code added at the end:
Code:
oscmatch("/NoteOn/",$'s') ? (
	oscparm(idx,type);
	type=='s' ? (
		#note = null; #velocity = null;
		
		oscparm(0,'s',#note);
		oscparm(1,'s',#velocity); 

		printf(oscstr);
		printf (" Note: ");
		printf (#note);
		printf (" Velocity: ");
		printf(#velocity);
		printf("\n");
		
		match("%i",#note,intNote);
		printf("this is intNote: ");
		printf(intNote);
		printf("\n");

		match("%i",#velocity,intVelocity);
		printf("this is intVelocity: ");
		printf(intVelocity);
		printf("\n");
	);
);
The OSCII-bot LOG window gets this when I move a fader two times in TouchOSC:

/NoteOn/ Note: 60 Velocity: 95.19064
this is intNote:
this is intVelocity:
/NoteOn/ Note: 60 Velocity: 35.404
this is intNote:
this is intVelocity:

So I'm not able to get a conversion with either OSC argument. I tried it with #intNote and #intVelocity as well. I don't really understand the use of the types of variables from the programming guide. Any ideas?
Thanks.

Last edited by procedure; 07-07-2022 at 09:45 AM.
procedure is offline   Reply With Quote