ftp.nice.ch/pub/next/unix/audio/cmix.s.tar.gz#/cmix/cmd/syn.c

This is syn.c in view mode; [Download] [Up]

#include <stdio.h>

struct c_list {
	char *type;
	char *name;
	char *syntax;
	};

struct c_list c_list[] = {

"Minc","fplot","(gen_location)",

"Minc","input","(\"filename\",[Cmix_file#]\n defaults: Cmix_file#=0, r/w_flag=0)",

"Minc","makegen","(gen_location, routine_number, size, gen_args.....)",

"Minc","open","(\"filename\", Cmix_file#, read/write_flag)",

"Minc","output","(\"filename\",[Cmix_file#]\n defaults: Cmix_file#=1, r/w_flag=2)",

"Minc","peakoff","(Cmix_file#, peak_chk_<on=0,off=1>)",

"Minc","punch","(Cmix_file#, normalize_to_amp)",

"Minc","sfclean","(Cmix_file#, [start, dur, ch0?, .., ch3?]\n defaults: start=0, dur=wholefile, clean_all_channels)",

"Minc","sfcopy","(Cmix_input#, Cmix_output#, inputstart, outputstart, dur)",

"Minc","sfprint","(Cmix_file#)",

"Minc","system","(\"any_system_call\")",

"Minc","trunc","(value), <returns truncated value to Minc>",

"Minc","ampdb","(amplitude_in_db) <returns amplitude value to Minc>",

"Minc","cpspch","(pch) <returns value to Minc>",

"Minc","pchcps","(cps) <returns value to Minc>",

"Minc","octpch","(pch) <returns value to Minc>",

"Minc","pchoct","(oct) <returns value to Minc>",

"Minc","tempo","(time1,tempo1,time2,tempo2 .. time_n,tempo_n)",

"Minc","basis","(tempo_units <default=60>)",

"Minc","tb","(beat) <returns time to Minc>",

"Minc","bt","(time) <returns beat to Minc>",

"Cmix","time_beat","(beat)",

"Cmix","beat_time","(time)",

"Cmix","endnote","(Cmix_file#)",

"Cmix","setnote","(start[-samplestart], dur[-sampledur], Cmix_file#)",

"Cmix","ADDOUT","(&io_block, Cmix_file#)",

"Cmix","LAYOUT","(&io_block, &channel_list, Cmix_file#)",

"Cmix","WIPEOUT","(&io_block, Cmix_file#)",

"Mix","mix","(inskip, outskip, endtime [-dur], amp, inch0loc .. inch3loc)",

"Mix & Alter","reset","(times_per_sec_to_update_envelope)",

"Mix & Alter","setline","(time0, amp0, time1, amp1, ... timen, ampn)",

"Mix","stereo","(inskip, outskip, endtime [-dur], inch0-->%left, ..inch3-->%left)",

"Mix","clobber","(<no_args>)",

"Mix","add","(<no_args>)",

"Alter","alter","(start_time, dur, overallamp,alterch0? ... alterch3?)",

 "","",""
 };

main(argc,argv)

int argc;
char *argv[];
{
	int i;
	char all[4];
	if(argc == 1) {
		printf("usage: syn command_names\nor: syn all [to get current list]\n");
		exit(1);
	}
	strcpy(all,"all");
	for(i=1; i< argc; i++) {
		if(!strcmp(all,argv[i])) biglist();
		else
		lookup(argv[i]);
	}
}
lookup(name)
char *name;
{
	int i;
	for(i=0; *c_list[i].name; i++) {
		if(!strcmp(name,c_list[i].name)) {
		printf("-----------------------------------------\n");
			printf("%s command:\n %s%s\n",c_list[i].type,c_list[i].name,c_list[i].syntax);
			printf("-----------------------------------------\n");
			return;
		}
	}
	printf("============> %s: don't know about this command, yet!\n",name);
}
biglist()
{
	int i;
	for(i=0; *c_list[i].name; i++)
		printf("%s\t\t(%s)\n",c_list[i].name,c_list[i].type);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.