ap_texture.c 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891
  1. /*
  2. * Copyright (c) 1983-2013 Trevor Wishart and Composers Desktop Project Ltd
  3. * http://www.trevorwishart.co.uk
  4. * http://www.composersdesktop.com
  5. *
  6. This file is part of the CDP System.
  7. The CDP System is free software; you can redistribute it
  8. and/or modify it under the terms of the GNU Lesser General Public
  9. License as published by the Free Software Foundation; either
  10. version 2.1 of the License, or (at your option) any later version.
  11. The CDP System is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with the CDP System; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18. 02111-1307 USA
  19. *
  20. */
  21. /* 03/2020: TW/RWD: corrected usage message argument lists */
  22. /* floatsam version: no changes */
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. #include <string.h>
  26. #include <math.h>
  27. #include <structures.h>
  28. #include <cdpmain.h>
  29. #include <tkglobals.h>
  30. #include <pnames.h>
  31. #include <texture.h>
  32. #include <processno.h>
  33. #include <modeno.h>
  34. #include <globcon.h>
  35. #include <logic.h>
  36. #include <filetype.h>
  37. #include <mixxcon.h>
  38. #include <flags.h>
  39. #include <speccon.h>
  40. #include <arrays.h>
  41. #include <special.h>
  42. #include <formants.h>
  43. #include <sfsys.h>
  44. #include <osbind.h>
  45. #include <srates.h>
  46. /********************************************************************************************/
  47. /********************************** FORMERLY IN pconsistency.c ******************************/
  48. /********************************************************************************************/
  49. static int texture_pconsistency(dataptr dz);
  50. /********************************************************************************************/
  51. /********************************** FORMERLY IN specialin.c *********************************/
  52. /********************************************************************************************/
  53. static int get_the_notedatafile(char *filename,dataptr dz);
  54. /***************************************************************************************/
  55. /****************************** FORMERLY IN aplinit.c **********************************/
  56. /***************************************************************************************/
  57. /***************************** ESTABLISH_BUFPTRS_AND_EXTRA_BUFFERS **************************/
  58. int establish_bufptrs_and_extra_buffers(dataptr dz)
  59. {
  60. /*int is_spec = FALSE;*/
  61. dz->bptrcnt = 0;
  62. dz->bufcnt = 0;
  63. switch(dz->process) {
  64. case(SIMPLE_TEX):
  65. case(TIMED):
  66. case(GROUPS):
  67. case(TGROUPS):
  68. case(DECORATED):
  69. case(PREDECOR):
  70. case(POSTDECOR):
  71. case(ORNATE):
  72. case(PREORNATE):
  73. case(POSTORNATE):
  74. case(MOTIFS):
  75. case(TMOTIFS):
  76. case(MOTIFSIN):
  77. case(TMOTIFSIN):
  78. dz->extra_bufcnt = 0; dz->bufcnt = 1;
  79. break;
  80. default:
  81. sprintf(errstr,"Unknown program type [%d] in establish_bufptrs_and_extra_buffers()\n",dz->process);
  82. return(PROGRAM_ERROR);
  83. }
  84. return establish_groucho_bufptrs_and_extra_buffers(dz);
  85. }
  86. /***************************** SETUP_INTERNAL_ARRAYS_AND_ARRAY_POINTERS **************************/
  87. int setup_internal_arrays_and_array_pointers(dataptr dz)
  88. {
  89. int n;
  90. dz->ptr_cnt = -1; /* base constructor...process */
  91. dz->array_cnt = -1;
  92. dz->iarray_cnt = -1;
  93. dz->larray_cnt = -1;
  94. switch(dz->process) {
  95. case(SIMPLE_TEX):
  96. case(TIMED):
  97. case(GROUPS):
  98. case(TGROUPS):
  99. case(DECORATED):
  100. case(PREDECOR):
  101. case(POSTDECOR):
  102. case(ORNATE):
  103. case(PREORNATE):
  104. case(POSTORNATE):
  105. case(MOTIFS):
  106. case(TMOTIFS):
  107. case(MOTIFSIN):
  108. case(TMOTIFSIN):
  109. dz->array_cnt = 1; dz->iarray_cnt = 6; dz->larray_cnt = 0; dz->ptr_cnt = 0; dz->fptr_cnt = 0;
  110. break;
  111. }
  112. /*** WARNING ***
  113. ANY APPLICATION DEALING WITH A NUMLIST INPUT: MUST establish AT LEAST 1 double array: i.e. dz->array_cnt = at least 1
  114. **** WARNING ***/
  115. if(dz->array_cnt < 0 || dz->iarray_cnt < 0 || dz->larray_cnt < 0 || dz->ptr_cnt < 0 || dz->fptr_cnt < 0) {
  116. sprintf(errstr,"array_cnt not set in setup_internal_arrays_and_array_pointers()\n");
  117. return(PROGRAM_ERROR);
  118. }
  119. if(dz->array_cnt > 0) {
  120. if((dz->parray = (double **)malloc(dz->array_cnt * sizeof(double *)))==NULL) {
  121. sprintf(errstr,"INSUFFICIENT MEMORY for internal double arrays.\n");
  122. return(MEMORY_ERROR);
  123. }
  124. for(n=0;n<dz->array_cnt;n++)
  125. dz->parray[n] = NULL;
  126. }
  127. if(dz->iarray_cnt > 0) {
  128. if((dz->iparray = (int **)malloc(dz->iarray_cnt * sizeof(int *)))==NULL) {
  129. sprintf(errstr,"INSUFFICIENT MEMORY for internal int arrays.\n");
  130. return(MEMORY_ERROR);
  131. }
  132. for(n=0;n<dz->iarray_cnt;n++)
  133. dz->iparray[n] = NULL;
  134. }
  135. if(dz->larray_cnt > 0) {
  136. if((dz->lparray = (int **)malloc(dz->larray_cnt * sizeof(int *)))==NULL) {
  137. sprintf(errstr,"INSUFFICIENT MEMORY for internal long arrays.\n");
  138. return(MEMORY_ERROR);
  139. }
  140. for(n=0;n<dz->larray_cnt;n++)
  141. dz->lparray[n] = NULL;
  142. }
  143. if(dz->ptr_cnt > 0) {
  144. if((dz->ptr = (double **)malloc(dz->ptr_cnt * sizeof(double *)))==NULL) {
  145. sprintf(errstr,"INSUFFICIENT MEMORY for internal pointer arrays.\n");
  146. return(MEMORY_ERROR);
  147. }
  148. for(n=0;n<dz->ptr_cnt;n++)
  149. dz->ptr[n] = NULL;
  150. }
  151. if(dz->fptr_cnt > 0) {
  152. if((dz->fptr = (float **)malloc(dz->fptr_cnt * sizeof(float *)))==NULL) {
  153. sprintf(errstr,"INSUFFICIENT MEMORY for internal float-pointer arrays.\n");
  154. return(MEMORY_ERROR);
  155. }
  156. for(n=0;n<dz->fptr_cnt;n++)
  157. dz->fptr[n] = NULL;
  158. }
  159. return(FINISHED);
  160. }
  161. /****************************** ASSIGN_PROCESS_LOGIC *********************************/
  162. int assign_process_logic(dataptr dz)
  163. {
  164. switch(dz->process) {
  165. case(SIMPLE_TEX):
  166. case(TIMED):
  167. case(GROUPS):
  168. case(TGROUPS):
  169. case(DECORATED):
  170. case(PREDECOR):
  171. case(POSTDECOR):
  172. case(ORNATE):
  173. case(PREORNATE):
  174. case(POSTORNATE):
  175. case(MOTIFS):
  176. case(TMOTIFS):
  177. case(MOTIFSIN):
  178. case(TMOTIFSIN):
  179. setup_process_logic(ONE_OR_MANY_SNDFILES, UNEQUAL_SNDFILE, SNDFILE_OUT, dz);
  180. break;
  181. default:
  182. sprintf(errstr,"Unknown process: assign_process_logic()\n");
  183. return(PROGRAM_ERROR);
  184. break;
  185. }
  186. if(dz->has_otherfile) {
  187. switch(dz->input_data_type) {
  188. case(ALL_FILES):
  189. case(TWO_SNDFILES):
  190. case(SNDFILE_AND_ENVFILE):
  191. case(SNDFILE_AND_BRKFILE):
  192. case(SNDFILE_AND_UNRANGED_BRKFILE):
  193. case(SNDFILE_AND_DB_BRKFILE):
  194. break;
  195. case(MANY_SNDFILES):
  196. if(dz->process==INFO_TIMELIST)
  197. break;
  198. /* fall thro */
  199. default:
  200. sprintf(errstr,"Most processes accepting files with different properties\n"
  201. "can only take 2 sound infiles.\n");
  202. return(PROGRAM_ERROR);
  203. }
  204. }
  205. return(FINISHED);
  206. }
  207. /***************************** SET_LEGAL_INFILE_STRUCTURE **************************
  208. *
  209. * Allows 2nd infile to have different props to first infile.
  210. */
  211. void set_legal_infile_structure(dataptr dz)
  212. {
  213. switch(dz->process) {
  214. default:
  215. dz->has_otherfile = FALSE;
  216. break;
  217. }
  218. }
  219. /***************************************************************************************/
  220. /****************************** FORMERLY IN internal.c *********************************/
  221. /***************************************************************************************/
  222. /****************************** SET_LEGAL_INTERNALPARAM_STRUCTURE *********************************/
  223. int set_legal_internalparam_structure(int process,int mode,aplptr ap)
  224. {
  225. int exit_status = FINISHED;
  226. switch(process) {
  227. case(SIMPLE_TEX): case(TIMED): case(GROUPS): case(TGROUPS):
  228. case(DECORATED): case(PREDECOR): case(POSTDECOR):
  229. case(ORNATE): case(PREORNATE):case(POSTORNATE):
  230. case(MOTIFS): case(TMOTIFS): case(MOTIFSIN): case(TMOTIFSIN):
  231. exit_status = set_internalparam_data("iiidddi",ap); break;
  232. default:
  233. sprintf(errstr,"Unknown process in set_legal_internalparam_structure()\n");
  234. return(PROGRAM_ERROR);
  235. }
  236. return(exit_status);
  237. }
  238. /********************************************************************************************/
  239. /********************************** FORMERLY IN specialin.c *********************************/
  240. /********************************************************************************************/
  241. /********************** READ_SPECIAL_DATA ************************/
  242. int read_special_data(char *str,dataptr dz)
  243. {
  244. /* int exit_status = FINISHED;*/
  245. aplptr ap = dz->application;
  246. switch(ap->special_data) {
  247. case(TEX_NOTEDATA): return get_the_notedatafile(str,dz);
  248. default:
  249. sprintf(errstr,"Unknown special_data type: read_special_data()\n");
  250. return(PROGRAM_ERROR);
  251. }
  252. return(FINISHED); /* NOTREACHED */
  253. }
  254. /***************************** GET_THE_NOTEDATAFILE ****************************/
  255. int get_the_notedatafile(char *filename,dataptr dz)
  256. {
  257. if((dz->fp = fopen(filename,"r"))==NULL) {
  258. sprintf(errstr,"Failed to open notedata file %s\n",filename);
  259. return(DATA_ERROR);
  260. }
  261. return(FINISHED);
  262. }
  263. /********************************************************************************************/
  264. /********************************** FORMERLY IN preprocess.c ********************************/
  265. /********************************************************************************************/
  266. /****************************** PARAM_PREPROCESS *********************************/
  267. int param_preprocess(dataptr dz)
  268. {
  269. /* int exit_status = FINISHED;*/
  270. switch(dz->process) {
  271. case(SIMPLE_TEX): case(TIMED): case(GROUPS): case(TGROUPS):
  272. case(DECORATED): case(PREDECOR): case(POSTDECOR):
  273. case(ORNATE): case(PREORNATE):case(POSTORNATE):
  274. case(MOTIFS): case(TMOTIFS): case(MOTIFSIN): case(TMOTIFSIN):
  275. return texture_preprocess(dz);
  276. default:
  277. sprintf(errstr,"PROGRAMMING PROBLEM: Unknown process in param_preprocess()\n");
  278. return(PROGRAM_ERROR);
  279. }
  280. return(FINISHED); /* NOTREACHED */
  281. }
  282. /********************************************************************************************/
  283. /********************************** FORMERLY IN procgrou.c **********************************/
  284. /********************************************************************************************/
  285. /**************************** GROUCHO_PROCESS_FILE ****************************/
  286. int groucho_process_file(dataptr dz) /* FUNCTIONS FOUND IN PROCESS.C */
  287. {
  288. int exit_status = FINISHED;
  289. switch(dz->process) {
  290. case(SIMPLE_TEX): case(TIMED): case(GROUPS): case(TGROUPS):
  291. case(DECORATED): case(PREDECOR): case(POSTDECOR):
  292. case(ORNATE): case(PREORNATE):case(POSTORNATE):
  293. case(MOTIFS): case(MOTIFSIN): case(TMOTIFS): case(TMOTIFSIN):
  294. if((exit_status = make_texture(dz))<0)
  295. return(exit_status);
  296. if((exit_status = produce_texture_sound(dz))<0)
  297. return(exit_status);
  298. break;
  299. default:
  300. sprintf(errstr,"Unknown case in process_file()\n");
  301. return(PROGRAM_ERROR);
  302. }
  303. return(FINISHED);
  304. }
  305. /********************************************************************************************/
  306. /********************************** FORMERLY IN pconsistency.c ******************************/
  307. /********************************************************************************************/
  308. /****************************** CHECK_PARAM_VALIDITY_AND_CONSISTENCY *********************************/
  309. int check_param_validity_and_consistency(dataptr dz)
  310. {
  311. /* int exit_status = FINISHED;*/
  312. handle_pitch_zeros(dz);
  313. switch(dz->process) {
  314. case(SIMPLE_TEX): case(TIMED): case(GROUPS): case(TGROUPS):
  315. case(DECORATED): case(PREDECOR): case(POSTDECOR):
  316. case(ORNATE): case(PREORNATE): case(POSTORNATE):
  317. case(MOTIFS): case(TMOTIFS): case(MOTIFSIN): case(TMOTIFSIN):
  318. return texture_pconsistency(dz);
  319. }
  320. return(FINISHED);
  321. }
  322. /***************************** PREPARE_TEXTURE_PARAMETERS ****************************/
  323. int texture_pconsistency(dataptr dz)
  324. {
  325. double *p, *end;
  326. int OK = TRUE;
  327. if(dz->brksize[TEXTURE_INSLO]) {
  328. p = dz->brk[TEXTURE_INSLO] + 1;
  329. end = dz->brk[TEXTURE_INSLO] + (dz->brksize[TEXTURE_INSLO] * 2);
  330. while(p < end) {
  331. if(*p > (double)dz->infilecnt) {
  332. OK = FALSE;
  333. break;
  334. }
  335. p += 2;
  336. }
  337. } else if(dz->iparam[TEXTURE_INSLO] > dz->infilecnt)
  338. OK = FALSE;
  339. if(!OK) {
  340. sprintf(errstr,"FIRST SND-IN-LIST TO USE > count of files entered: cannot proceed.\n");
  341. return(DATA_ERROR);
  342. }
  343. OK = TRUE;
  344. if(dz->brksize[TEXTURE_INSHI]) {
  345. p = dz->brk[TEXTURE_INSHI] + 1;
  346. end = dz->brk[TEXTURE_INSHI] + (dz->brksize[TEXTURE_INSHI] * 2);
  347. while(p < end) {
  348. if(*p > (double)dz->infilecnt) {
  349. OK = FALSE;
  350. break;
  351. }
  352. p += 2;
  353. }
  354. } else if(dz->iparam[TEXTURE_INSHI] > dz->infilecnt)
  355. OK = FALSE;
  356. if(!OK) {
  357. sprintf(errstr,"LAST SND-IN-LIST TO USE > count of files entered: cannot proceed.\n");
  358. return(DATA_ERROR);
  359. }
  360. return(FINISHED);
  361. }
  362. /********************************************************************************************/
  363. /********************************** FORMERLY IN buffers.c ***********************************/
  364. /********************************************************************************************/
  365. /**************************** ALLOCATE_LARGE_BUFFERS ******************************/
  366. int allocate_large_buffers(dataptr dz)
  367. {
  368. switch(dz->process) {
  369. case(SIMPLE_TEX):
  370. case(TIMED): case(GROUPS): case(TGROUPS):
  371. case(DECORATED): case(PREDECOR): case(POSTDECOR):
  372. case(ORNATE): case(PREORNATE): case(POSTORNATE):
  373. case(MOTIFS): case(TMOTIFS): case(MOTIFSIN):
  374. case(TMOTIFSIN):
  375. return create_sndbufs(dz);
  376. default:
  377. sprintf(errstr,"Unknown program no. in allocate_large_buffers()\n");
  378. return(PROGRAM_ERROR);
  379. }
  380. return(FINISHED); /* NOTREACHED */
  381. }
  382. /********************************************************************************************/
  383. /********************************** FORMERLY IN cmdline.c ***********************************/
  384. /********************************************************************************************/
  385. int get_process_no(char *prog_identifier_from_cmdline,dataptr dz)
  386. {
  387. if (!strcmp(prog_identifier_from_cmdline,"simple")) dz->process = SIMPLE_TEX;
  388. else if(!strcmp(prog_identifier_from_cmdline,"grouped")) dz->process = GROUPS;
  389. else if(!strcmp(prog_identifier_from_cmdline,"motifs")) dz->process = MOTIFS;
  390. else if(!strcmp(prog_identifier_from_cmdline,"motifsin")) dz->process = MOTIFSIN;
  391. else if(!strcmp(prog_identifier_from_cmdline,"decorated")) dz->process = DECORATED;
  392. else if(!strcmp(prog_identifier_from_cmdline,"predecor")) dz->process = PREDECOR;
  393. else if(!strcmp(prog_identifier_from_cmdline,"postdecor")) dz->process = POSTDECOR;
  394. else if(!strcmp(prog_identifier_from_cmdline,"ornate")) dz->process = ORNATE;
  395. else if(!strcmp(prog_identifier_from_cmdline,"preornate")) dz->process = PREORNATE;
  396. else if(!strcmp(prog_identifier_from_cmdline,"postornate")) dz->process = POSTORNATE;
  397. else if(!strcmp(prog_identifier_from_cmdline,"timed")) dz->process = TIMED;
  398. else if(!strcmp(prog_identifier_from_cmdline,"tgrouped")) dz->process = TGROUPS;
  399. else if(!strcmp(prog_identifier_from_cmdline,"tmotifs")) dz->process = TMOTIFS;
  400. else if(!strcmp(prog_identifier_from_cmdline,"tmotifsin")) dz->process = TMOTIFSIN;
  401. else {
  402. sprintf(errstr,"Unknown program identification string '%s'\n",prog_identifier_from_cmdline);
  403. return(USAGE_ONLY);
  404. }
  405. return FINISHED;
  406. }
  407. /********************************************************************************************/
  408. /********************************** FORMERLY IN usage.c *************************************/
  409. /********************************************************************************************/
  410. /******************************** USAGE1 ********************************/
  411. int usage1(void)
  412. {
  413. fprintf(stdout, /* HAs to use fprintf because of kbhit */
  414. "\n"
  415. "USAGE:\ntexture NAME (mode) infile (infile2..etc) outfile notedata params:\n"
  416. "\n"
  417. "\nwhere NAME can be any one of\n"
  418. "\n"
  419. "\tTEXTURE MADE FROM ONE OR SEVERAL SOUND FILES\n"
  420. "\n"
  421. "simple grouped decorated ornate motifs\n"
  422. " predecor preornate motifsin\n"
  423. " postdecor postornate\n"
  424. "\n"
  425. "\tTIMED TEXTURES MADE FROM ONE OR SEVERAL SOUND FILES\n"
  426. "\n"
  427. "timed tmotifs tmotifsin tgrouped\n"
  428. "\n"
  429. "ORNAMENTS & MOTIFS have user-specified pitch-shapes.\n"
  430. "DECORATIONS & GROUPS have random pitch-shapes.\n"
  431. "\n"
  432. "Type 'texture simple' for more info on simple texture option.... etc.\n"
  433. "\n"
  434. #ifdef IS_PC
  435. "MORE??? ----- (hit keyboard)\n"
  436. "\n");
  437. while(!kbhit())
  438. ;
  439. if(kbhit()) {
  440. #else
  441. "\n");
  442. #endif
  443. fprintf(stdout,
  444. "\n"
  445. "*********************************************************************\n"
  446. "SOME SPECIAL PARAMETER VALUES\n"
  447. "*********************************************************************\n"
  448. "GPSPACE: spatialisation of event-groups\n"
  449. "\n"
  450. " 0:still 1:scattered(default) 2:towards-texture-centre\n"
  451. " 3:away-from-centre 4:follow-texmotion 5:contrary-to-motion\n"
  452. " 4 & 5 only function if spatial position varies in time..\n"
  453. "*********************************************************************\n"
  454. "CONTOUR: amplitude contour of groups\n"
  455. "\n"
  456. " 0:mixed(default) 1:cresc 2:flat 3:decresc 4:c_or_fl\n"
  457. " 5:c_or_d 6:d_or_fl [7:directed_to_event 8:dir_or_flat]\n"
  458. "*********************************************************************\n"
  459. "CENTRING: how decoration pitches centre on decorated line pitches\n"
  460. "\n"
  461. " 0: centred(default) 1: above 2: below\n"
  462. " 3: c_and_a 4: c_and_b 5: a_and_b 6: c_and_a_and_b\n"
  463. " In all cases except 0, pitchrange shifted to tally with line pitch\n\n"
  464. "\n"
  465. "*********************************************************************\n"
  466. " ALL OTHER PARAMS, except outdur, MAY VARY IN TIME.\n"
  467. "*********************************************************************\n"
  468. "\n"
  469. #ifdef IS_PC
  470. "MORE??? ----- (hit keyboard)\n");
  471. }
  472. _getch();
  473. while(!kbhit())
  474. ;
  475. if(kbhit()) {
  476. #else
  477. "\n");
  478. #endif
  479. fprintf(stdout,
  480. "\n"
  481. "*********************************************************************\n"
  482. "HARMONIC SETS use only the pitches specified.\n"
  483. "\n"
  484. "HARMONIC FIELDS duplicate the specified pitches in all 8vas.\n"
  485. "*********************************************************************\n"
  486. "NOTEDATA is in a textfile containing.....\n"
  487. "*********************************************************************\n"
  488. " assumed MIDI 'pitch' of each input snd, specified on 1st line.\n"
  489. "\n"
  490. " FOLLOWED BY, where ness, NOTELIST(S), SPECIFIED THUS:-\n"
  491. "\n"
  492. " #N (where N = no. of notes in notelist: follows by N lines of...)\n"
  493. " time(SECS) infile_no pitch(MIDI) amp(MIDI) dur(SECS)\n"
  494. "\n"
  495. "where times within motif must increase (or remain same, during chords)\n"
  496. "*********************************************************************\n"
  497. "NOTELISTS REPRESENT: IN THIS ORDER..\n"
  498. "*********************************************************************\n"
  499. "Notelist of notes in any timed, ornamented or decorated line in texture.\n"
  500. "Notelist of notes in any harmonic field(s) or set(s) specified.\n"
  501. " (For more than one hfield(hset),\n"
  502. " data should specify chords, placed at appropriae times.)\n"
  503. "Notelist(s) of notes in any ornament(s) or motif(s) specified.\n"
  504. "*********************************************************************\n");
  505. #ifdef IS_PC
  506. }
  507. #endif
  508. return(USAGE_ONLY);
  509. }
  510. /******************************** USAGE2 ********************************/
  511. int usage2(char *str)
  512. {
  513. if(!strcmp(str,"simple")) {
  514. fprintf(stdout,
  515. "USAGE:\n"
  516. "texture simple mode infile [infile2...] outfile notedata outdur packing scatter\n"
  517. " tgrid sndfirst sndlast mingain maxgain mindur maxdur minpich maxpich omit\n"
  518. " [-aatten] [-pposition] [-sspread] [-rseed] [-w -c -p]\n"
  519. "MODES:-\n"
  520. "1) ON A GIVEN HARMONIC-FIELD 3) ON A GIVEN HARMONIC-SET\n"
  521. "2) ON CHANGING HARMONIC-FIELDS 4) ON CHANGING HARMONIC-SETS\n"
  522. "5) NONE\n"
  523. "notedata: infofile, insnd 'pitches',harmonic fields pitches etc.\n"
  524. "outdur: (min) duration of outfile\n"
  525. "packing: (average) time between event onsets.\n"
  526. "scatter: randomisation of event-onsets (0 - %.0lf)\n"
  527. "tgrid: minstep(MS) quantised timegrid(for grp starttimes)(default 0)\n"
  528. "sndfirst,sndlast: 1st,last snd to use,from list of insnds(range:1 - no.of snds)\n"
  529. "mingain,maxgain: minimum & maximum level of input events (1-127:default 64,64)\n"
  530. "mindur,maxdur: minimum & maximum duration of events in texture\n"
  531. "minpich,maxpich: minimum & maximum pitch (MIDI VALUE):\n"
  532. "omit: 1 in \"omit\" events are silent.\n"
  533. " less and less silent events as param increases.\n"
  534. " at 64 (as at zero) NO events are silent.\n"
  535. "atten: overall attenuation of the output\n"
  536. "position: centre of output sound-image (0(Left) 1(Right): default 0.5)\n"
  537. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  538. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  539. "-w: always play whole input-sound (ignoring duration values).\n"
  540. "-c: Choose files cyclically in listed order (ignore 'sndfirst','last').\n"
  541. "-p: Random permute each cycle (only when -c flag set).\n",MAX_SCAT_TEXTURE);
  542. } else if(!strcmp(str,"timed")) {
  543. fprintf(stdout,
  544. "TIMED TEXTURE: USAGE:\n"
  545. "texture timed mode infile [infile2...] outfile notedata outdur skiptime\n"
  546. " sndfirst sndlast mingain maxgain mindur maxdur minpitch maxpitch\n"
  547. " [-aatten] [-pposition] [-sspread] [-rseed] [-w]\n"
  548. "MODES:-\n"
  549. "1) ON A GIVEN HARMONIC-FIELD 3) ON A GIVEN HARMONIC-SET\n"
  550. "2) ON CHANGING HARMONIC-FIELDS 4) ON CHANGING HARMONIC-SETS\n"
  551. "5) NONE\n"
  552. "notedata: infofile, insnd 'pitches',texture timing,harmonic fields pitches etc.\n"
  553. "outdur: (min) duration of outfile\n"
  554. "skiptime: time between repetitions of timing motif in notedata\n"
  555. "sndfirst,sndlast: 1st,last snd to use,from list of insnds(range:1 - all)\n"
  556. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  557. "mindur,maxdur: min & max duration of events in texture\n"
  558. "minpitch,maxpitch: min & max pitch (MIDI VALUE)\n"
  559. "atten: overall attenuation of the output\n"
  560. "position: centre of output sound-image (0(Left) 1(Right):default 0.5)\n"
  561. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  562. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  563. "-w: always play whole input-sound (ignoring duration values).\n");
  564. } else if(!strcmp(str,"grouped")) {
  565. fprintf(stdout,
  566. "TEXTURE OF EVENT-GROUPS: USAGE: texture grouped mode infile [infile2..] outfile\n"
  567. "notedata outdur packing scatter tgrid\n"
  568. "sndfirst sndlast mingain maxgain mindur maxdur minpitch maxpitch phgrid gpspace\n"
  569. "gpsprange amprise contour gpsizelo gpsizehi gppaklo gppakhi gpranglo gpranghi\n"
  570. " [-aatten] [-pposition] [-sspread] [-rseed] [-w] [-d] [-i]\n"
  571. "MODES:-\n"
  572. "1)ON HARMONIC-FIELD 2)CHANGING HFLDS 3)HARMONIC-SET 4)CHANGING HSETS 5)NONE\n"
  573. "notedata: infofile, 'pitch' of insnds, harmonic fields etc.\n"
  574. "outdur: (min) duration of outfile\n"
  575. "packing: (average) time between group onsets.\n"
  576. "scatter: randomisation of event-onsets (0 - %.0lf)\n"
  577. "tgrid: minstep(MS) quantised timegrid(for grp starttimes)(default 0)\n"
  578. "sndfirst,sndlast: 1st,last snd to use, from list of insnds(range:1 - all)\n"
  579. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  580. "mindur,maxdur: min & max duration of events in texture\n"
  581. "minpitch,maxpitch:min & max pitch (MIDI VALUE)\n"
  582. "phgrid: a timegrid (MS) applying WITHIN the groups\n"
  583. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  584. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  585. "amprise: amplitude change within groups: (0-127: default 0)\n"
  586. "contour: amplitude contour of groups (Range 0-6: default 0)\n"
  587. /* NOTE : CARE all_types is 7 AND NOT 8 here */
  588. "gpsizelo,gpsizehi:smallest,largest no. of events in groups\n"
  589. "gppaklo,gppakhi: shortest,longest time between event-onsets in groups (MS)\n"
  590. "gpranglo,gpranghi:min,max pitchrange grps OR (hfields) no.of hf-notes range\n"
  591. "atten: overall attenuation of output\n"
  592. "position: centre of output sound-image (0(Left) 1(Right): default 0.5)\n"
  593. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  594. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  595. "-w: always play whole input-sound (ignore maxdur,mindur vals).\n"
  596. "-d: fixed timestep between groupnotes.\n"
  597. "-i: each group not confined to a fixed instr (default:fixed)\n",MAX_SCAT_TEXTURE);
  598. } else if(!strcmp(str,"tgrouped")) {
  599. fprintf(stdout,
  600. "TIMED TEXTURE OF EVENT-GROUPS: USAGE: texture tgrouped mode infile [infile2..]\n"
  601. "outfile notedata outdur skip sndfirst sndlast mingain maxgain mindur maxdur\n"
  602. "minpitch maxpitch phgrid gpspace gpsprange amprise contour gpsizelo gpsizehi\n"
  603. "gppacklo gppackhi gpranglo gpranghi\n"
  604. " [-aatten] [-pposition] [-sspread] [-rseed] [-w] [-d] [-i]\n"
  605. "MODES:-\n"
  606. "1) ON A GIVEN HARMONIC-FIELD 3) ON A GIVEN HARMONIC-SET\n"
  607. "2) ON CHANGING HARMONIC-FIELDS 4) ON CHANGING HARMONIC-SETS\n"
  608. "5) NONE\n"
  609. "notedata: infofile, 'pitch' of insnds, timings for timed textures, hfields etc\n"
  610. "outdur: (min) duration of outfile\n"
  611. "skip: time between repetitions of timing motif in notedata\n"
  612. "sndfirst,sndlast: 1st,last snd to use from list of insnds(range:1 - all)\n"
  613. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  614. "mindur,maxdur: min & max duration of events in texture\n"
  615. "minpitch,maxpitch:min & max pitch (MIDI VALUE)\n"
  616. "phgrid: timegrid (MS) applying WITHIN the groups\n"
  617. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  618. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  619. "amprise: amplitude change within groups: (0-127: default 0)\n"
  620. "contour: amplitude contour of groups (Range 0-6: default 0)\n"
  621. /* NOTE : CARE all_types is 7 AND NOT 8 here */
  622. "gpsizelo,gpsizehi:smallest & largest numbers of events in groups\n"
  623. "gppacklo,gppackhi:shortest & longest time between event-onsets in groups (MS)\n"
  624. "gpranglo,gpranghi:min,max pitchrange grps OR (hfields) no.of hf-notes range\n"
  625. "atten: overall attenuation of output\n"
  626. "position: centre of output sound-image (0(Left) 1(Right): default 0.5)\n"
  627. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  628. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  629. "-w: always play whole input-sound (ignoring duration values).\n"
  630. "-d: fixed timestep between groupnotes.\n"
  631. "-i: each group not confined to a fixed instr (default:fixed)\n");
  632. } else if(!strcmp(str,"decorated") || !strcmp(str,"predecor") || !strcmp(str,"postdecor")) {
  633. fprintf(stdout,
  634. "TEXTURE WITH DECORATIONS:USAGE:texture decorated|predecor|postdecor mode infile\n"
  635. "[infile2..] outfile notedata outdur skiptime sndfirst sndlast mingain maxgain\n"
  636. "mindur maxdur phgrid gpspace gpsprange amprise contour gpsizlo gpsizhi\n"
  637. "gppaklo gppakhi gpranglo gpranghi centring\n"
  638. " [-aatten] [-ppos] [-ssprd] [-rseed] [-w] [-d] [-i] [-h] [-e] [-k]\n"
  639. "MODES:-\n"
  640. "1)ON HARMONIC-FIELD 2)CHANGING HFLDS 3)HARMONIC-SET 4)CHANGING HSETS 5)NONE\n"
  641. "notedata: infofile, 'pitch' of insnds, decoration shape etc.\n"
  642. "outdur: (min) duration outfile\n"
  643. "skiptime: time between repets of motif-to-decorate in notedata\n"
  644. "sndfirst,sndlast: 1st,last snd to use, from input snds (range 1 - all)\n"
  645. "mingain,maxgain: min & max gain on input events (MIDI)\n"
  646. "mindur,maxdur: min & max duration of events in texture\n"
  647. "phgrid: timegrid (MS) applying WITHIN decors\n"
  648. "gpspace: spatialisation decor-groups (Range 0-5: default 1)\n"
  649. "gpsprange: spatial range decor-groups (Range 0-1: default 1)\n"
  650. "amprise: amplitude change within decors: (0-127: default 0)\n"
  651. "contour: amplitude contour of decors (Range 0-8: default 0)\n"
  652. "gpsizlo,gpsizhi: smallest,largest no. events in decors\n"
  653. "gppaklo,gppakhi: shortest,longest time between event-onsets in decors(MS)\n"
  654. "gpranglo,gpranghi:min,max pitchrange decors OR (hfields) no.of hf-notes range\n"
  655. "centring: how decor pitches centre on line pitches(Range 0-7:default 0)\n"
  656. "atten: overall attenuation of output\n"
  657. "pos: centre of output sound-image (-1(Left) 1(Right): default 0)\n"
  658. "sprd: spatial-spread of texture events (0 - 1(full-spread))\n"
  659. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  660. "-w: play all insnd(ignore min,maxdur) -h: dec TOPnote chord:(dflt:1st listed)\n"
  661. "-d: fixed timestep btwn decornotes -e: dec all notes of chords\n"
  662. "-i: instrs vary in decor(dflt:fixed) -k: discard orig line, after decor\n");
  663. } else if(!strcmp(str,"ornate") || !strcmp(str,"preornate") || !strcmp(str,"postornate")) {
  664. fprintf(stdout,
  665. "TEXTURE WITH ORNAMENTS: USAGE:\n"
  666. "texture ornate|preornate|postornate mode infile [infile2...] outfile notedata\n"
  667. "outdur skiptime sndfirst sndlast mingain maxgain mindur maxdur\n"
  668. "phgrid gpspace gpsprange amprise contour multlo multhi\n"
  669. " [-aatten] [-pposition] [-sspread] [-rseed] [-w] [-d] [-i] [-h] [-e]\n"
  670. "MODES:-\n"
  671. "1)ON HARMONIC-FIELD 2)CHANGING HFLDS 3)HARMONIC-SET 4)CHANGING HSETS 5)NONE\n"
  672. "notedata: infofile, 'pitch' of insnds, notes in ornaments, hfields etc.\n"
  673. "outdur: (min) duration of outfile\n"
  674. "skiptime: time between repetitions of motif-to-ornament in notedata\n"
  675. "sndfirst,sndlast: 1st,last snd to use, from input snds (range 1 - all)\n"
  676. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  677. "mindur,maxdur: min & max duration of events in texture\n"
  678. "phgrid: a timegrid (MS) applying WITHIN the ornaments\n"
  679. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  680. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  681. "amprise: amplitude change within ornaments: (0-127: default 0)\n"
  682. "contour: amplitude contour of groups (Range 0-8: default 0)\n"
  683. "multlo, multhi: min & max multiplier of total input duration of motif\n"
  684. "atten: overall attenuation of the output\n"
  685. "position: centre of output sound-image (0(Left) 1(Right):default 0.5)\n"
  686. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  687. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  688. "-w: always play whole input-sound (ignoring duration values).\n"
  689. "-d: ornament notes all have same duration as ornamented note\n"
  690. "-i: orns not confined to instr of ornd-note (default:same note)\n"
  691. "-h: orns on highest note of any chord:(default:1st note listed)\n"
  692. "-e: ornaments on all notes of any chord.\n");
  693. } else if(!strcmp(str,"motifsin")) {
  694. fprintf(stdout,
  695. "TEXTURE OF MOTIFS, FORCED ONTO A HARMONIC FIELD: USAGE:\n"
  696. "texture motifsin mode infile [infile2..] outfile notedata outdur packing\n"
  697. "scatter tgrid sndfirst sndlast mingain maxgain \n"
  698. "minpitch maxpitch phgrid gpspace gpsprange amprise contour multlo multhi\n"
  699. " [-aatten] [-pposition] [-sspread] [-rseed] [-w] [-d] [-i]\n"
  700. "MODES:-\n"
  701. "1) ON HARMONIC-FIELD 2) CHANGING HFLDS 3) HARMONIC-SET 4) CHANGING HSETS\n"
  702. "notedata: infofile,'pitch' of insnds, timings for timed textures, hfields etc\n"
  703. "outdur: (min) duration of outfile\n"
  704. "packing: (average) time between motif onsets.\n"
  705. "scatter: randomisation of event-onsets (0 - %.0lf)\n"
  706. "tgrid: minstep(MS) quantised timegrid (for mtf starttimes)(dflt 0)\n"
  707. "sndfirst,sndlast: 1st,last snd to use, from input snds (range 1 - all)\n"
  708. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  709. "minpitch,maxpitch: min & max pitch (MIDI VALUE)\n"
  710. "phgrid: a timegrid (MS) applying WITHIN the motifs\n"
  711. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  712. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  713. "amprise: amplitude change within motifs: (0-127: default 0)\n"
  714. "contour: amplitude contour of groups (Range 0-6: default 0)\n"
  715. /* NOTE : CARE all_types is 7 AND NOT 8 here */
  716. "multlo, multhi: min & max multiplier of total input duration of motif\n"
  717. "atten: overall attenuation of the output\n"
  718. "position: centre of output sound-image (0(Left) 1(Right):default 0.5)\n"
  719. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  720. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  721. "-w: always play whole input-sound (ignoring duration values).\n"
  722. "-d notes within any one motif all have same duration.\n"
  723. "-i: motif not each confined to fixed instr (default:fixed)\n",MAX_SCAT_TEXTURE);
  724. } else if(!strcmp(str,"tmotifsin")) {
  725. fprintf(stdout,
  726. "TIMED TEXTURE OF MOTIFS, FORCED ONTO A HARMONIC FIELD: USAGE:\n"
  727. "texture tmotifsin mode infile [infile2...] outfile notedata sndfirst sndlast\n"
  728. "mingain maxgain minpich maxpich phgrid gpspace gpsprange\n"
  729. "amprise contour multlo multhi [-aatten] [-ppos] [-sspread] [-rseed] [-w] [-d]\n"
  730. "MODES:-\n"
  731. "1) ON HARMONIC-FIELD 2) CHANGING HFLDS 3) HARMONIC-SET 4) CHANGING HSETS\n"
  732. "notedata: infofile, 'pitch' of insnds,motifs,texture timings,hfields etc..\n"
  733. "outdur: (min) duration of outfile\n"
  734. "skiptime: time between repetitions of timing motif in notedata\n"
  735. "sndfirst,sndlast: 1st,last snd to use, from input snds (range 1 - all)\n"
  736. "mingain,maxgain: minimum & maximum level of input events (1-127:default 64,64)\n"
  737. "minpich,maxpich: min & max pitch (MIDI VALUE)\n"
  738. "phgrid: a timegrid (MS) applying WITHIN the motifs\n"
  739. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  740. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  741. "amprise: amplitude change within motifs: (0-127: default 0)\n"
  742. "contour: amplitude contour of groups (Range 0-6: default 0)\n"
  743. /* NOTE : CARE all_types is 7 AND NOT 8 here */
  744. "multlo, multhi: min & max multiplier of total input duration of motif\n"
  745. "atten: overall attenuation of the output\n"
  746. "pos: centre of output sound-image (0(Left) 1(Right):default 0.5)\n"
  747. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  748. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  749. "-w: always play whole input-sound (ignoring duration values).\n"
  750. "-d: notes in any one motif all have same duration as timing note.\n"
  751. "-i: motifs not each confined to a fixed instrument (default: fixed)\n");
  752. } else if(!strcmp(str,"motifs")) {
  753. fprintf(stdout,
  754. "TEXTURE OF MOTIFS, (1ST NOTES ONLY, FORCED ONTO HARMONIC FIELD/SET, IF USED)\n"
  755. "USAGE: texture motifs mode infile [infile2...] outfile notedata outdur packing\n"
  756. "scatter tgrid sndfirst sndlast mingain maxgain minpich maxpich\n"
  757. "phgrid gpspace gpsprange amprise contour multlo multhi\n"
  758. " [-aatten] [-pposition] [-sspread] [-rseed] [-w] [-d]\n"
  759. "MODES:-\n"
  760. "1)ON HARMONIC-FIELD 2)CHANGING HFLDS 3)HARMONIC-SET 4)CHANGING HSETS 5)NONE\n"
  761. "notedata: infofile, 'pitch' of insnds, timings for timed textures,hfields etc.\n"
  762. "outdur: (min) duration of outfile\n"
  763. "packing: (average) time between motif onsets.\n"
  764. "scatter: randomisation of event-onsets (0 - %.0lf)\n"
  765. "tgrid: minstep(MS) quantised timegrid (for mtf starttimes)(dflt 0)\n"
  766. "sndfirst,sndlast: 1st,last snd to use, from input snds (range 1 - all)\n"
  767. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  768. "minpich,maxpich: min & max pitch (MIDI VALUE)\n"
  769. "phgrid: a timegrid (MS) applying WITHIN the motifs\n"
  770. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  771. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  772. "amprise: amplitude change within motifs: (0-127: default 0)\n"
  773. "contour: amplitude contour of groups (Range 0-6: default 0)\n"
  774. /* NOTE : CARE all_types is 7 AND NOT 8 here */
  775. "multlo, multhi: min & max multiplier of total input duration of motif\n"
  776. "atten: overall attenuation of the output\n"
  777. "position: centre of output sound-image (0(Left) 1(Right):default 0.5)\n"
  778. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  779. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  780. "-w: always play whole input-sound (ignoring duration values).\n"
  781. "-d notes of any one motif all have same duration.\n"
  782. "-i: motif not each confined to fixed instr (default:fixed)\n",MAX_SCAT_TEXTURE);
  783. } else if(!strcmp(str,"tmotifs")) {
  784. fprintf(stdout,
  785. "TIMED TEXTURE OF MOTIFS, THEMSELVES NOT FORCED ONTO HARMONIC FIELD: USAGE:\n"
  786. "texture tmotifs mode infile [infile2...] outfile notedata outdur skip\n"
  787. "sndfirst sndlast mingain maxgain minpitch maxpitch phgrid\n"
  788. "gpspace gpsprange amprise contour multlo multhi\n"
  789. " [-aatten] [-pposition] [-sspread] [-rseed] [-w] [-d]\n"
  790. "MODES:-\n"
  791. "1)ON HARMONIC-FIELD 2)CHANGING HFLDS 3)HARMONIC-SET 4)CHANGING HSETS 5)NONE\n"
  792. "notedata: infofile, 'pitch' of insnds,texture timings,motifs,hfields etc....\n"
  793. "outdur: (min) duration of outfile\n"
  794. "skip: time between repetitions of timing motif in notedata\n"
  795. "sndfirst,sndlast: 1st,last snd to use, from input snds (range 1 - all)\n"
  796. "mingain,maxgain: min & max level of input events (1-127:default 64,64)\n"
  797. "minpitch,maxpitch: min & max pitch (MIDI VALUE)\n"
  798. "phgrid: a timegrid (MS) applying WITHIN the motifs\n"
  799. "gpspace: spatialisation of event-groups (Range 0-5: default 1)\n"
  800. "gpsprange: spatial range of event-groups (Range 0-1: default 1)\n"
  801. "amprise: amplitude change within motifs: (0-127: default 0)\n"
  802. "contour: amplitude contour of groups (Range 0-6: default 0)\n"
  803. /* NOTE : CARE all_types is 7 AND NOT 8 here */
  804. "multlo, multhi: min & max multiplier of total input duration of motif\n"
  805. "atten: overall attenuation of the output\n"
  806. "position: centre of output sound-image (0(Left) 1(Right):default 0.5)\n"
  807. "spread: spatial-spread of texture events (0 - 1(full-spread))\n"
  808. "seed: same seed-no: same output on rerun(dflt 0: differs each time)\n"
  809. "-w: always play whole input-sound (ignoring duration values).\n"
  810. "-d: motif notes all have same duration as ornamented note\n"
  811. "-i: motif not each confined to fixed instr (default:fixed)\n");
  812. } else
  813. fprintf(stdout,"Unknown option '%s'\n",str);
  814. return(USAGE_ONLY);
  815. }
  816. /******************************** USAGE3 ********************************/
  817. int usage3(char *str1,char *str2)
  818. {
  819. sprintf(errstr,"Insufficient parameters on command line.\n");
  820. return(USAGE_ONLY);
  821. }
  822. /******************************** INNER_LOOP (redundant) ********************************/
  823. int inner_loop
  824. (int *peakscore,int *descnt,int *in_start_portion,int *least,int *pitchcnt,int windows_in_buf,dataptr dz)
  825. {
  826. return(FINISHED);
  827. }