Csound  6.16
csound.h
Go to the documentation of this file.
1 /*
2  csound.h:
3 
4  Copyright (C) 2003 2005 2008 2013 by John ffitch, Istvan Varga,
5  Mike Gogins, Victor Lazzarini,
6  Andres Cabrera, Steven Yi
7 
8  This file is part of Csound.
9 
10  The Csound Library is free software; you can redistribute it
11  and/or modify it under the terms of the GNU Lesser General Public
12  License as published by the Free Software Foundation; either
13  version 2.1 of the License, or (at your option) any later version.
14 
15  Csound is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with Csound; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23  02110-1301 USA
24 */
25 
26 #ifndef CSOUND_H
27 #define CSOUND_H
28 
256 /*
257  * Platform-dependent definitions and declarations.
258  */
259 
260 #if (defined(WIN32) || defined(_WIN32)) && !defined(SWIG)
261 # if defined(__BUILDING_LIBCSOUND)
262 # define PUBLIC __declspec(dllexport)
263 # define PUBLIC_DATA __declspec(dllexport)
264 # else
265 # define PUBLIC __declspec(dllexport)
266 # define PUBLIC_DATA __declspec(dllimport)
267 # endif
268 #elif defined(__GNUC__) && (__GNUC__ >= 4) /* && !defined(__MACH__) */
269 # define PUBLIC __attribute__ ( (visibility("default")) )
270 # define PUBLIC_DATA __attribute__ ( (visibility("default")) )
271 #else
272 # define PUBLIC
273 # define PUBLIC_DATA
274 #endif
275 
276 #if defined(MSVC)
277 # include <intrin.h> /* for _InterlockedExchange */
278 #endif
279 
280 #if defined(__MACH__)
281 // on OSX 10.6 i386 does not have all builtins
282 #if defined(MAC_OS_X_VERSION_10_6)
283 #ifdef HAVE_ATOMIC_BUILTIN
284 #ifndef __x86_64__
285 #undef HAVE_ATOMIC_BUILTIN
286 #endif
287 #endif
288 #endif
289 #endif
290 
295 #ifdef SWIG
296 #define CS_PRINTF2
297 #define CS_PRINTF3
298 #include "float-version.h"
299 #ifndef __MYFLT_DEF
300 #define __MYFLT_DEF
301 #ifndef USE_DOUBLE
302 #define MYFLT float
303 #else
304 #define MYFLT double
305 #endif
306 #endif
307  %module csnd6
308  %{
309 # include "sysdep.h"
310 # include "text.h"
311 # include <stdarg.h>
312  %}
313 #else
314 # include "sysdep.h"
315 # include "text.h"
316 # include <stdarg.h>
317 #endif
318 
319 #ifdef __cplusplus
320 extern "C" {
321 #endif
322 
327  typedef enum
328  {
329  /* Completed successfully. */
331  /* Unspecified failure. */
333  /* Failed during initialization. */
335  /* Failed during performance. */
337  /* Failed to allocate requested memory. */
339  /* Termination requested by SIGINT or SIGTERM. */
341  } CSOUND_STATUS;
342 
343  /* Compilation or performance aborted, but not as a result of an error
344  (e.g. --help, or running an utility with -U). */
345 #define CSOUND_EXITJMP_SUCCESS (256)
346 
351 #define CSOUNDINIT_NO_SIGNAL_HANDLER 1
352 #define CSOUNDINIT_NO_ATEXIT 2
353 
358 #define CSOUND_CALLBACK_KBD_EVENT (0x00000001U)
359 #define CSOUND_CALLBACK_KBD_TEXT (0x00000002U)
360 
369  typedef enum {
370  CSFTYPE_UNIFIED_CSD = 1, /* Unified Csound document */
371  CSFTYPE_ORCHESTRA, /* the primary orc file (may be temporary) */
372  CSFTYPE_SCORE, /* the primary sco file (may be temporary)
373  or any additional score opened by Cscore */
374  CSFTYPE_ORC_INCLUDE, /* a file #included by the orchestra */
375  CSFTYPE_SCO_INCLUDE, /* a file #included by the score */
376  CSFTYPE_SCORE_OUT, /* used for score.srt, score.xtr, cscore.out */
377  CSFTYPE_SCOT, /* Scot score input format */
378  CSFTYPE_OPTIONS, /* for .csoundrc and -@ flag */
379  CSFTYPE_EXTRACT_PARMS, /* extraction file specified by -x */
380 
381  /* audio file types that Csound can write (10-19) or read */
408  CSFTYPE_UNKNOWN_AUDIO, /* used when opening audio file for reading
409  or temp file written with <CsSampleB> */
410 
411  /* miscellaneous music formats */
413  CSFTYPE_STD_MIDI, /* Standard MIDI file */
414  CSFTYPE_MIDI_SYSEX, /* Raw MIDI codes, eg. SysEx dump */
415 
416  /* analysis formats */
419  CSFTYPE_PVC, /* original PVOC format */
420  CSFTYPE_PVCEX, /* PVOC-EX format */
427 
428  /* Types for plugins and the files they read/write */
432 
433  /* Special formats for Csound ftables or scanned synthesis
434  matrices with header info */
435  CSFTYPE_FTABLES_TEXT, /* for ftsave and ftload */
436  CSFTYPE_FTABLES_BINARY, /* for ftsave and ftload */
437  CSFTYPE_XSCANU_MATRIX, /* for xscanu opcode */
438 
439  /* These are for raw lists of numbers without header info */
440  CSFTYPE_FLOATS_TEXT, /* used by GEN23, GEN28, dumpk, readk */
441  CSFTYPE_FLOATS_BINARY, /* used by dumpk, readk, etc. */
442  CSFTYPE_INTEGER_TEXT, /* used by dumpk, readk, etc. */
443  CSFTYPE_INTEGER_BINARY, /* used by dumpk, readk, etc. */
444 
445  /* image file formats */
447 
448  /* For files that don't match any of the above */
449  CSFTYPE_POSTSCRIPT, /* EPS format used by graphs */
450  CSFTYPE_SCRIPT_TEXT, /* executable script files (eg. Python) */
453 
454  /* This should only be used internally by the original FileOpen()
455  API call or for temp files written with <CsFileB> */
458 
459  /*
460  * TYPE DEFINITIONS
461  */
462 
463  /*
464  * Forward declarations.
465  */
466 
467  typedef struct CSOUND_ CSOUND;
468  typedef struct windat_ WINDAT;
469  typedef struct xyindat_ XYINDAT;
470 
471 
477  typedef struct {
478  int debug_mode; /* debug mode, 0 or 1 */
479  int buffer_frames; /* number of frames in in/out buffers */
480  int hardware_buffer_frames; /* ibid. hardware */
481  int displays; /* graph displays, 0 or 1 */
482  int ascii_graphs; /* use ASCII graphs, 0 or 1 */
483  int postscript_graphs; /* use postscript graphs, 0 or 1 */
484  int message_level; /* message printout control */
485  int tempo; /* tempo (sets Beatmode) */
486  int ring_bell; /* bell, 0 or 1 */
487  int use_cscore; /* use cscore for processing */
488  int terminate_on_midi; /* terminate performance at the end
489  of midifile, 0 or 1 */
490  int heartbeat; /* print heart beat, 0 or 1 */
491  int defer_gen01_load ; /* defer GEN01 load, 0 or 1 */
492  int midi_key; /* pfield to map midi key no */
493  int midi_key_cps; /* pfield to map midi key no as cps */
494  int midi_key_oct; /* pfield to map midi key no as oct */
495  int midi_key_pch; /* pfield to map midi key no as pch */
496  int midi_velocity; /* pfield to map midi velocity */
497  int midi_velocity_amp; /* pfield to map midi velocity as amplitude */
498  int no_default_paths; /* disable relative paths from files, 0 or 1 */
499  int number_of_threads; /* number of threads for multicore performance */
500  int syntax_check_only; /* do not compile, only check syntax */
501  int csd_line_counts; /* csd line error reporting */
502  int compute_weights; /* deprecated, kept for backwards comp. */
503  int realtime_mode; /* use realtime priority mode, 0 or 1 */
504  int sample_accurate; /* use sample-level score event accuracy */
505  MYFLT sample_rate_override; /* overriding sample rate */
506  MYFLT control_rate_override; /* overriding control rate */
507  int nchnls_override; /* overriding number of out channels */
508  int nchnls_i_override; /* overriding number of in channels */
509  MYFLT e0dbfs_override; /* overriding 0dbfs */
510  int daemon; /* daemon mode */
511  int ksmps_override; /* ksmps override */
512  int FFT_library; /* fft_lib */
513  } CSOUND_PARAMS;
514 
518  typedef struct {
519  char device_name[64];
520  char device_id[64];
521  char rt_module[64];
523  int isOutput;
524  } CS_AUDIODEVICE;
525 
526  typedef struct {
527  char device_name[64];
528  char interface_name[64];
529  char device_id[64];
530  char midi_module[64];
531  int isOutput;
532  } CS_MIDIDEVICE;
533 
534 
538  typedef struct {
540  char *devName;
542  int devNum;
544  unsigned int bufSamp_SW;
552  float sampleRate;
553  } csRtAudioParams;
554 
555  typedef struct RTCLOCK_S {
556  int_least64_t starttime_real;
557  int_least64_t starttime_CPU;
558  } RTCLOCK;
559 
560  typedef struct {
561  char *opname;
562  char *outypes;
563  char *intypes;
564  int flags;
565  } opcodeListEntry;
566 
567  typedef struct CsoundRandMTState_ {
568  int mti;
569  uint32_t mt[624];
571 
572  /* PVSDATEXT is a variation on PVSDAT used in
573  the pvs bus interface */
574  typedef struct pvsdat_ext {
575  int32 N;
576  int sliding; /* Flag to indicate sliding case */
577  int32 NB;
578  int32 overlap;
579  int32 winsize;
580  int wintype;
581  int32 format;
582  uint32 framecount;
583  float* frame;
584  } PVSDATEXT;
585 
586  typedef struct ORCTOKEN {
587  int type;
588  char *lexeme;
589  int value;
590  double fvalue;
591  char *optype;
592  struct ORCTOKEN *next;
593  } ORCTOKEN;
594 
595  typedef struct TREE {
596  int type;
598  int rate;
599  int len;
600  int line;
601  uint64_t locn;
602  struct TREE *left;
603  struct TREE *right;
604  struct TREE *next;
605  void *markup; // TEMPORARY - used by semantic checker to
606  // markup node adds OENTRY or synthetic var
607  // names to expression nodes should be moved
608  // to TYPE_TABLE
609  } TREE;
610 
611 
615  typedef enum {
621 
623 
627 
628  typedef enum {
634 
639  typedef struct controlChannelHints_s {
641 
642  MYFLT dflt;
643  MYFLT min;
644  MYFLT max;
645  int x;
646  int y;
647  int width;
648  int height;
650  char *attributes;
652 
653  typedef struct controlChannelInfo_s {
654  char *name;
655  int type;
658 
659  typedef void (*channelCallback_t)(CSOUND *csound,
660  const char *channelName,
661  void *channelValuePtr,
662  const void *channelType);
663 
664 #ifndef CSOUND_CSDL_H
665 
677  PUBLIC int csoundInitialize(int flags);
678 
682  PUBLIC void csoundSetOpcodedir(const char *s);
683 
691  PUBLIC CSOUND *csoundCreate(void *hostData);
692 
696  PUBLIC int csoundLoadPlugins(CSOUND *csound, const char *dir);
697 
701  PUBLIC void csoundDestroy(CSOUND *);
702 
706  PUBLIC int csoundGetVersion(void);
707 
711  PUBLIC int csoundGetAPIVersion(void);
712 
713 
723  PUBLIC TREE *csoundParseOrc(CSOUND *csound, const char *str);
724 
729  PUBLIC int csoundCompileTree(CSOUND *csound, TREE *root);
730 
734  PUBLIC int csoundCompileTreeAsync(CSOUND *csound, TREE *root);
735 
736 
742  PUBLIC void csoundDeleteTree(CSOUND *csound, TREE *tree);
743 
753  PUBLIC int csoundCompileOrc(CSOUND *csound, const char *str);
754 
761  PUBLIC int csoundCompileOrcAsync(CSOUND *csound, const char *str);
762 
773  PUBLIC MYFLT csoundEvalCode(CSOUND *csound, const char *str);
774 
787  PUBLIC int csoundInitializeCscore(CSOUND *, FILE *insco, FILE *outsco);
788 
793  PUBLIC int csoundCompileArgs(CSOUND *, int argc, const char **argv);
794 
805  PUBLIC int csoundStart(CSOUND *csound);
806 
823  PUBLIC int csoundCompile(CSOUND *, int argc, const char **argv);
824 
876  PUBLIC int csoundCompileCsd(CSOUND *csound, const char *csd_filename);
877 
884  PUBLIC int csoundCompileCsdText(CSOUND *csound, const char *csd_text);
885 
897  PUBLIC int csoundPerform(CSOUND *);
898 
910 
920 
926  PUBLIC void csoundStop(CSOUND *);
927 
934  PUBLIC int csoundCleanup(CSOUND *);
935 
941  PUBLIC void csoundReset(CSOUND *);
942 
953  PUBLIC int csoundUDPServerStart(CSOUND *csound, unsigned int port);
954 
958  PUBLIC int csoundUDPServerStatus(CSOUND *csound);
959 
964  PUBLIC int csoundUDPServerClose(CSOUND *csound);
965 
974  PUBLIC int csoundUDPConsole(CSOUND *csound, const char *addr,
975  int port, int mirror);
976 
980  PUBLIC void csoundStopUDPConsole(CSOUND *csound);
981 
990  PUBLIC MYFLT csoundGetSr(CSOUND *) ;
991 
995  PUBLIC MYFLT csoundGetKr(CSOUND *);
996 
1000  PUBLIC uint32_t csoundGetKsmps(CSOUND *);
1001 
1006  PUBLIC uint32_t csoundGetNchnls(CSOUND *);
1007 
1013  PUBLIC uint32_t csoundGetNchnlsInput(CSOUND *csound);
1014 
1018  PUBLIC MYFLT csoundGet0dBFS(CSOUND *);
1019 
1023  PUBLIC MYFLT csoundGetA4(CSOUND *);
1024 
1028  PUBLIC int64_t csoundGetCurrentTimeSamples(CSOUND *csound);
1029 
1033  PUBLIC int csoundGetSizeOfMYFLT(void);
1034 
1038  PUBLIC void *csoundGetHostData(CSOUND *);
1039 
1043  PUBLIC void csoundSetHostData(CSOUND *, void *hostData);
1044 
1049  PUBLIC int csoundSetOption(CSOUND *csound, const char *option);
1050 
1058  PUBLIC void csoundSetParams(CSOUND *csound, CSOUND_PARAMS *p);
1059 
1064  PUBLIC void csoundGetParams(CSOUND *csound, CSOUND_PARAMS *p);
1065 
1070  PUBLIC int csoundGetDebug(CSOUND *);
1071 
1076  PUBLIC void csoundSetDebug(CSOUND *, int debug);
1077 
1082  PUBLIC MYFLT csoundSystemSr(CSOUND *csound, MYFLT val);
1083 
1084 
1096  PUBLIC const char *csoundGetOutputName(CSOUND *);
1097 
1101  PUBLIC const char *csoundGetInputName(CSOUND *);
1102 
1114  PUBLIC void csoundSetOutput(CSOUND *csound, const char *name,
1115  const char *type, const char *format);
1116 
1124  PUBLIC void csoundGetOutputFormat(CSOUND *csound,char *type,
1125  char *format);
1126 
1130  PUBLIC void csoundSetInput(CSOUND *csound, const char *name);
1131 
1135  PUBLIC void csoundSetMIDIInput(CSOUND *csound, const char *name);
1136 
1140  PUBLIC void csoundSetMIDIFileInput(CSOUND *csound, const char *name);
1141 
1145  PUBLIC void csoundSetMIDIOutput(CSOUND *csound, const char *name);
1146 
1150  PUBLIC void csoundSetMIDIFileOutput(CSOUND *csound, const char *name);
1151 
1152 #if !defined(SWIG)
1153 
1166  void (*func)(CSOUND*, const char*,
1167  int, int, int));
1168 #endif
1169 
1178  PUBLIC void csoundSetRTAudioModule(CSOUND *csound, const char *module);
1179 
1193  PUBLIC int csoundGetModule(CSOUND *csound, int number,
1194  char **name, char **type);
1195 
1200 
1205 
1212 
1219 
1225  PUBLIC MYFLT *csoundGetSpin(CSOUND *);
1226 
1230  PUBLIC void csoundClearSpin(CSOUND *);
1231 
1239  PUBLIC void csoundAddSpinSample(CSOUND *csound,
1240  int frame, int channel, MYFLT sample);
1241 
1247  PUBLIC void csoundSetSpinSample(CSOUND *csound,
1248  int frame, int channel, MYFLT sample);
1249 
1255  PUBLIC MYFLT *csoundGetSpout(CSOUND *csound);
1256 
1263  PUBLIC MYFLT csoundGetSpoutSample(CSOUND *csound, int frame, int channel);
1264 
1269 
1274 
1286  int state, int bufSize);
1287 
1288 
1312  PUBLIC int csoundGetAudioDevList(CSOUND *csound,
1313  CS_AUDIODEVICE *list, int isOutput);
1314 
1319  PUBLIC void
1321  int (*playopen__)(CSOUND *,
1322  const csRtAudioParams *parm));
1323 
1329  void (*rtplay__)(CSOUND *,
1330  const MYFLT *outBuf,
1331  int nbytes));
1332 
1338  int (*recopen_)(CSOUND *,
1339  const csRtAudioParams *parm));
1340 
1346  int (*rtrecord__)(CSOUND *,
1347  MYFLT *inBuf,
1348  int nbytes));
1349 
1354  PUBLIC void csoundSetRtcloseCallback(CSOUND *, void (*rtclose__)(CSOUND *));
1355 
1362  int (*audiodevlist__)(CSOUND *,
1363  CS_AUDIODEVICE *list,
1364  int isOutput));
1365 
1374  PUBLIC void csoundSetMIDIModule(CSOUND *csound, const char *module);
1375 
1381  int state);
1382 
1395  PUBLIC int csoundGetMIDIDevList(CSOUND *csound,
1396  CS_MIDIDEVICE *list, int isOutput);
1397 
1402  int (*func)(CSOUND *,
1403  void **userData,
1404  const char *devName));
1405 
1410  int (*func)(CSOUND *,
1411  void *userData,
1412  unsigned char *buf,
1413  int nBytes));
1414 
1419  int (*func)(CSOUND *,
1420  void *userData));
1421 
1426  int (*func)(CSOUND *,
1427  void **userData,
1428  const char *devName));
1429 
1434  int (*func)(CSOUND *,
1435  void *userData,
1436  const unsigned char *buf,
1437  int nBytes));
1438 
1443  int (*func)(CSOUND *,
1444  void *userData));
1445 
1450  const char *(*func)(int));
1451 
1452 
1459  int (*mididevlist__)(CSOUND *,
1460  CS_MIDIDEVICE *list,
1461  int isOutput));
1462 
1473  PUBLIC int csoundReadScore(CSOUND *csound, const char *str);
1474 
1478  PUBLIC void csoundReadScoreAsync(CSOUND *csound, const char *str);
1479 
1484  PUBLIC double csoundGetScoreTime(CSOUND *);
1485 
1491 
1500  PUBLIC void csoundSetScorePending(CSOUND *, int pending);
1501 
1507 
1517  PUBLIC void csoundSetScoreOffsetSeconds(CSOUND *, MYFLT time);
1518 
1524 
1532  void (*cscoreCallback_)(CSOUND *));
1533 
1540  PUBLIC int csoundScoreSort(CSOUND *, FILE *inFile, FILE *outFile);
1541 
1550  FILE *inFile, FILE *outFile, FILE *extractFile);
1551 
1560  PUBLIC CS_PRINTF2 void csoundMessage(CSOUND *, const char *format, ...);
1561 
1567  PUBLIC CS_PRINTF3 void csoundMessageS(CSOUND *,
1568  int attr, const char *format, ...);
1569 
1570  PUBLIC void csoundMessageV(CSOUND *,
1571  int attr, const char *format, va_list args);
1572 
1573  PUBLIC void csoundSetDefaultMessageCallback(void (*csoundMessageCallback_)(
1574  CSOUND *,
1575  int attr,
1576  const char *format,
1577  va_list valist));
1578 
1584  void (*csoundMessageCallback_)(CSOUND *,
1585  int attr,
1586  const char *format,
1587  va_list valist));
1588 
1596  void (*csoundMessageStrCallback)(CSOUND *csound,
1597  int attr,
1598  const char *str));
1599 
1604 
1608  PUBLIC void csoundSetMessageLevel(CSOUND *, int messageLevel);
1609 
1624  PUBLIC void csoundCreateMessageBuffer(CSOUND *csound, int toStdOut);
1625 
1629  PUBLIC const char* csoundGetFirstMessage(CSOUND *csound);
1630 
1636 
1640  PUBLIC void csoundPopFirstMessage(CSOUND *csound);
1641 
1645  PUBLIC int csoundGetMessageCnt(CSOUND *csound);
1646 
1651 
1703  MYFLT **p, const char *name, int type);
1704 
1716 
1721 
1731  PUBLIC int csoundSetControlChannelHints(CSOUND *, const char *name,
1732  controlChannelHints_t hints);
1733 
1746  PUBLIC int csoundGetControlChannelHints(CSOUND *, const char *name,
1747  controlChannelHints_t *hints);
1748 
1755  PUBLIC int *csoundGetChannelLock(CSOUND *, const char *name);
1756 
1762  PUBLIC MYFLT csoundGetControlChannel(CSOUND *csound, const char *name,
1763  int *err);
1764 
1768  PUBLIC void csoundSetControlChannel(CSOUND *csound,
1769  const char *name, MYFLT val);
1770 
1775  PUBLIC void csoundGetAudioChannel(CSOUND *csound,
1776  const char *name, MYFLT *samples);
1777 
1782  PUBLIC void csoundSetAudioChannel(CSOUND *csound,
1783  const char *name, MYFLT *samples);
1784 
1790  PUBLIC void csoundGetStringChannel(CSOUND *csound,
1791  const char *name, char *string);
1792 
1796  PUBLIC void csoundSetStringChannel(CSOUND *csound,
1797  const char *name, char *string);
1798 
1806  PUBLIC int csoundGetChannelDatasize(CSOUND *csound, const char *name);
1807 
1810  PUBLIC void
1812  channelCallback_t inputChannelCalback);
1813 
1816  PUBLIC void
1818  channelCallback_t outputChannelCalback);
1819 
1826  PUBLIC int csoundSetPvsChannel(CSOUND *, const PVSDATEXT *fin,
1827  const char *name);
1828 
1835  PUBLIC int csoundGetPvsChannel(CSOUND *csound, PVSDATEXT *fout,
1836  const char *name);
1837 
1846  char type, const MYFLT *pFields, long numFields);
1847 
1852  char type, const MYFLT *pFields, long numFields);
1853 
1860  char type, const MYFLT *pfields, long numFields, double time_ofs);
1861 
1866  char type, const MYFLT *pfields, long numFields, double time_ofs);
1871  PUBLIC void csoundInputMessage(CSOUND *, const char *message);
1872 
1876  PUBLIC void csoundInputMessageAsync(CSOUND *, const char *message);
1877 
1888  PUBLIC int csoundKillInstance(CSOUND *csound, MYFLT instr,
1889  char *instrName, int mode, int allow_release);
1890 
1891 
1905  void (*func)(CSOUND *, void *),
1906  void *userData);
1907 
1914  PUBLIC void csoundKeyPress(CSOUND *, char c);
1915 
1955  int (*func)(void *userData, void *p,
1956  unsigned int type),
1957  void *userData, unsigned int type);
1958 
1963  int (*func)(void *, void *, unsigned int));
1964 
1973  PUBLIC int csoundTableLength(CSOUND *, int table);
1974 
1979  PUBLIC MYFLT csoundTableGet(CSOUND *, int table, int index);
1980 
1985  PUBLIC void csoundTableSet(CSOUND *, int table, int index, MYFLT value);
1986 
1987 
1993  PUBLIC void csoundTableCopyOut(CSOUND *csound, int table, MYFLT *dest);
1994 
1998  PUBLIC void csoundTableCopyOutAsync(CSOUND *csound, int table, MYFLT *dest);
2004  PUBLIC void csoundTableCopyIn(CSOUND *csound, int table, MYFLT *src);
2005 
2009  PUBLIC void csoundTableCopyInAsync(CSOUND *csound, int table, MYFLT *src);
2010 
2017  PUBLIC int csoundGetTable(CSOUND *, MYFLT **tablePtr, int tableNum);
2018 
2028  PUBLIC int csoundGetTableArgs(CSOUND *csound, MYFLT **argsPtr, int tableNum);
2029 
2035  PUBLIC int csoundIsNamedGEN(CSOUND *csound, int num);
2036 
2041  PUBLIC void csoundGetNamedGEN(CSOUND *csound, int num, char *name, int len);
2042 
2051  PUBLIC int csoundSetIsGraphable(CSOUND *, int isGraphable);
2052 
2057  void (*makeGraphCallback_)(CSOUND *,
2058  WINDAT *windat,
2059  const char *name));
2060 
2065  void (*drawGraphCallback_)(CSOUND *,
2066  WINDAT *windat));
2067 
2072  void (*killGraphCallback_)(CSOUND *,
2073  WINDAT *windat));
2074 
2079  int (*exitGraphCallback_)(CSOUND *));
2080 
2089  PUBLIC void *csoundGetNamedGens(CSOUND *);
2090 
2097  PUBLIC int csoundNewOpcodeList(CSOUND *, opcodeListEntry **opcodelist);
2098 
2103 
2111  PUBLIC int csoundAppendOpcode(CSOUND *, const char *opname,
2112  int dsblksiz, int flags, int thread,
2113  const char *outypes, const char *intypes,
2114  int (*iopadr)(CSOUND *, void *),
2115  int (*kopadr)(CSOUND *, void *),
2116  int (*aopadr)(CSOUND *, void *));
2117 
2132  PUBLIC void csoundSetYieldCallback(CSOUND *, int (*yieldCallback_)(CSOUND *));
2133 
2140  PUBLIC void *csoundCreateThread(uintptr_t (*threadRoutine)(void *),
2141  void *userdata);
2142 
2152  PUBLIC void *csoundGetCurrentThreadId(void);
2153 
2158  PUBLIC uintptr_t csoundJoinThread(void *thread);
2163  PUBLIC void *csoundCreateThreadLock(void);
2164 
2173  PUBLIC int csoundWaitThreadLock(void *lock, size_t milliseconds);
2174 
2180  PUBLIC void csoundWaitThreadLockNoTimeout(void *lock);
2181 
2185  PUBLIC void csoundNotifyThreadLock(void *lock);
2186 
2190  PUBLIC void csoundDestroyThreadLock(void *lock);
2191 
2205  PUBLIC void *csoundCreateMutex(int isRecursive);
2206 
2212  PUBLIC void csoundLockMutex(void *mutex_);
2213 
2221  PUBLIC int csoundLockMutexNoWait(void *mutex_);
2222 
2229  PUBLIC void csoundUnlockMutex(void *mutex_);
2230 
2235  PUBLIC void csoundDestroyMutex(void *mutex_);
2236 
2237 
2243  PUBLIC void *csoundCreateBarrier(unsigned int max);
2244 
2248  PUBLIC int csoundDestroyBarrier(void *barrier);
2249 
2253  PUBLIC int csoundWaitBarrier(void *barrier);
2254 
2255 
2257  PUBLIC void* csoundCreateCondVar();
2258 
2260  PUBLIC void csoundCondWait(void* condVar, void* mutex);
2261 
2263  PUBLIC void csoundCondSignal(void* condVar);
2264 
2266  PUBLIC void csoundDestroyCondVar(void* condVar);
2267 
2272  PUBLIC void csoundSleep(size_t milliseconds);
2273 
2296  PUBLIC int csoundSpinLockInit(spin_lock_t *spinlock);
2297 
2301  PUBLIC void csoundSpinLock(spin_lock_t *spinlock);
2302 
2307  PUBLIC int csoundSpinTryLock(spin_lock_t *spinlock);
2308 
2312  PUBLIC void csoundSpinUnLock(spin_lock_t *spinlock);
2313 
2314 
2332  PUBLIC long csoundRunCommand(const char * const *argv, int noWait);
2333 
2338 
2343  PUBLIC double csoundGetRealTime(RTCLOCK *);
2344 
2349  PUBLIC double csoundGetCPUTime(RTCLOCK *);
2350 
2354  PUBLIC uint32_t csoundGetRandomSeedFromTime(void);
2355 
2368  PUBLIC void csoundSetLanguage(cslanguage_t lang_code);
2369 
2377  PUBLIC const char *csoundGetEnv(CSOUND *csound, const char *name);
2378 
2386  PUBLIC int csoundSetGlobalEnv(const char *name, const char *value);
2387 
2397  const char *name, size_t nbytes);
2398 
2403  PUBLIC void *csoundQueryGlobalVariable(CSOUND *, const char *name);
2404 
2411  PUBLIC void *csoundQueryGlobalVariableNoCheck(CSOUND *, const char *name);
2412 
2418  PUBLIC int csoundDestroyGlobalVariable(CSOUND *, const char *name);
2419 
2426  PUBLIC int csoundRunUtility(CSOUND *, const char *name,
2427  int argc, char **argv);
2428 
2436  PUBLIC char **csoundListUtilities(CSOUND *);
2437 
2441  PUBLIC void csoundDeleteUtilityList(CSOUND *, char **lst);
2442 
2449  const char *utilName);
2450 
2458  PUBLIC int csoundRand31(int *seedVal);
2459 
2466  const uint32_t *initKey, uint32_t keyLength);
2467 
2472  PUBLIC uint32_t csoundRandMT(CsoundRandMTState *p);
2473 
2474 #endif /* !CSOUND_CSDL_H */
2475 
2476  /* typedefs, macros, and interface functions for configuration variables */
2477 #include "cfgvar.h"
2478  /* message attribute definitions for csoundMessageS() and csoundMessageV() */
2479 #include "msg_attr.h"
2480  /* macro definitions for Csound release, and API version */
2481 #include "version.h"
2482 
2491  int numelem, int elemsize);
2492 
2502  PUBLIC int csoundReadCircularBuffer(CSOUND *csound, void *circular_buffer,
2503  void *out, int items);
2504 
2513  PUBLIC int csoundPeekCircularBuffer(CSOUND *csound, void *circular_buffer,
2514  void *out, int items);
2515 
2525  PUBLIC int csoundWriteCircularBuffer(CSOUND *csound, void *p,
2526  const void *inp, int items);
2533  PUBLIC void csoundFlushCircularBuffer(CSOUND *csound, void *p);
2534 
2538  PUBLIC void csoundDestroyCircularBuffer(CSOUND *csound, void *circularbuffer);
2539 
2543  PUBLIC int csoundOpenLibrary(void **library, const char *libraryPath);
2544 
2548  PUBLIC int csoundCloseLibrary(void *library);
2549 
2553  PUBLIC void *csoundGetLibrarySymbol(void *library, const char *symbolName);
2554 
2555 
2558 #ifdef SWIGPYTHON
2559 
2560  PUBLIC CSOUND *csoundGetInstance(int64_t obj){ return (CSOUND *)obj; }
2561 
2562 #endif
2563 
2564 
2565 #ifdef SOME_FINE_DAY /* these functions are now deprecated */
2566 
2573  PUBLIC int csoundQueryInterface(const char *name,
2574  void **iface, int *version);
2575 
2576 
2592  PUBLIC void csoundSetInputValueCallback(CSOUND *,
2593  void (*inputValueCalback_)(CSOUND *,
2594  const char *channelName,
2595  MYFLT *value));
2596 
2606  PUBLIC void csoundSetOutputValueCallback(CSOUND *,
2607  void (*outputValueCalback_)(CSOUND *,
2608  const char *channelName,
2609  MYFLT value));
2610 
2633  PUBLIC void csoundSetChannelIOCallback(CSOUND *,
2634  CsoundChannelIOCallback_t func);
2635 
2645  PUBLIC int csoundPerformKsmpsAbsolute(CSOUND *);
2646 #endif
2647 
2648 
2649 #ifdef __cplusplus
2650 }
2651 #endif
2652 
2653 #endif /* CSOUND_H */
PUBLIC void csoundMessageV(CSOUND *, int attr, const char *format, va_list args)
PUBLIC int64_t csoundGetCurrentTimeSamples(CSOUND *csound)
PUBLIC void csoundSetKillGraphCallback(CSOUND *, void(*killGraphCallback_)(CSOUND *, WINDAT *windat))
Definition: csound.h:414
Definition: csound.h:617
PUBLIC void csoundDeleteTree(CSOUND *csound, TREE *tree)
PUBLIC void csoundCreateMessageBuffer(CSOUND *csound, int toStdOut)
Definition: csound.h:376
PUBLIC void * csoundGetNamedGens(CSOUND *)
Definition: csound.h:518
PUBLIC int csoundUDPServerStart(CSOUND *csound, unsigned int port)
PUBLIC void * csoundCreateThreadLock(void)
int value
Definition: csound.h:589
PUBLIC void * csoundCreateCondVar()
Definition: csound.h:391
Definition: csound.h:450
PUBLIC void csoundSetMessageCallback(CSOUND *, void(*csoundMessageCallback_)(CSOUND *, int attr, const char *format, va_list valist))
PUBLIC int csoundSpinTryLock(spin_lock_t *spinlock)
Definition: csound.h:390
PUBLIC CSOUND * csoundCreate(void *hostData)
PUBLIC void csoundSetMIDIModule(CSOUND *csound, const char *module)
PUBLIC int csoundInitializeCscore(CSOUND *, FILE *insco, FILE *outsco)
PUBLIC int csoundCompileTree(CSOUND *csound, TREE *root)
Definition: csound.h:431
Definition: csound.h:424
Definition: csound.h:624
Definition: csound.h:574
PUBLIC double csoundGetRealTime(RTCLOCK *)
MYFLT dflt
Definition: csound.h:642
void PUBLIC csoundDestroyMessageBuffer(CSOUND *csound)
PUBLIC MYFLT csoundGetSpoutSample(CSOUND *csound, int frame, int channel)
PUBLIC int csoundLoadPlugins(CSOUND *csound, const char *dir)
PUBLIC MYFLT csoundGetScoreOffsetSeconds(CSOUND *)
char * devName
Definition: csound.h:540
int max_nchnls
Definition: csound.h:522
int32 overlap
Definition: csound.h:578
Definition: csound.h:393
int isOutput
Definition: csound.h:523
PUBLIC void csoundAddSpinSample(CSOUND *csound, int frame, int channel, MYFLT sample)
Definition: csound.h:443
PUBLIC int csoundSetIsGraphable(CSOUND *, int isGraphable)
Definition: csound.h:441
PUBLIC int csoundGetFirstMessageAttr(CSOUND *csound)
PUBLIC void csoundSetRtcloseCallback(CSOUND *, void(*rtclose__)(CSOUND *))
void(* channelCallback_t)(CSOUND *csound, const char *channelName, void *channelValuePtr, const void *channelType)
Definition: csound.h:659
PUBLIC void csoundWaitThreadLockNoTimeout(void *lock)
Definition: csound.h:392
struct xyindat_ XYINDAT
Definition: csound.h:469
int ascii_graphs
Definition: csound.h:482
Definition: csound.h:477
int_least64_t starttime_CPU
Definition: csound.h:557
char * opname
Definition: csound.h:561
PUBLIC long csoundRunCommand(const char *const *argv, int noWait)
PUBLIC void csoundSetMIDIDeviceListCallback(CSOUND *csound, int(*mididevlist__)(CSOUND *, CS_MIDIDEVICE *list, int isOutput))
Definition: csound.h:375
PUBLIC void csoundSetHostImplementedMIDIIO(CSOUND *csound, int state)
Definition: csound.h:338
PUBLIC CS_PRINTF3 void csoundMessageS(CSOUND *, int attr, const char *format,...)
PUBLIC void csoundPopFirstMessage(CSOUND *csound)
PUBLIC void csoundGetParams(CSOUND *csound, CSOUND_PARAMS *p)
PUBLIC void csoundSetSpinSample(CSOUND *csound, int frame, int channel, MYFLT sample)
Definition: csound.h:395
int type
Definition: csound.h:587
MYFLT max
Definition: csound.h:644
Definition: csound.h:372
Definition: csound.h:526
PUBLIC void csoundSetRTAudioModule(CSOUND *csound, const char *module)
PUBLIC int csoundGetSizeOfMYFLT(void)
char * lexeme
Definition: csound.h:588
PUBLIC void csoundSetLanguage(cslanguage_t lang_code)
PUBLIC int csoundInitialize(int flags)
PUBLIC void csoundSetMessageStringCallback(CSOUND *csound, void(*csoundMessageStrCallback)(CSOUND *csound, int attr, const char *str))
int32 format
Definition: csound.h:581
Definition: csound.h:387
PUBLIC void csoundSetDebug(CSOUND *, int debug)
PUBLIC void csoundRemoveKeyboardCallback(CSOUND *csound, int(*func)(void *, void *, unsigned int))
PUBLIC int csoundRunUtility(CSOUND *, const char *name, int argc, char **argv)
unsigned int bufSamp_SW
Definition: csound.h:544
PUBLIC void csoundSetPlayopenCallback(CSOUND *, int(*playopen__)(CSOUND *, const csRtAudioParams *parm))
Definition: csound.h:449
PUBLIC char ** csoundListUtilities(CSOUND *)
PUBLIC void csoundScoreEventAsync(CSOUND *, char type, const MYFLT *pFields, long numFields)
PUBLIC void csoundSetOutput(CSOUND *csound, const char *name, const char *type, const char *format)
PUBLIC void csoundSpinLock(spin_lock_t *spinlock)
PUBLIC int csoundCompileOrc(CSOUND *csound, const char *str)
int no_default_paths
Definition: csound.h:498
PUBLIC void csoundSetRtplayCallback(CSOUND *, void(*rtplay__)(CSOUND *, const MYFLT *outBuf, int nbytes))
Definition: csound.h:408
Definition: csound.h:422
Definition: csound.h:399
PUBLIC int csoundScoreSort(CSOUND *, FILE *inFile, FILE *outFile)
PUBLIC int csoundCompileCsdText(CSOUND *csound, const char *csd_text)
struct CsoundRandMTState_ CsoundRandMTState
PUBLIC uint32_t csoundGetNchnlsInput(CSOUND *csound)
PUBLIC int csoundCleanup(CSOUND *)
Definition: csound.h:418
PUBLIC void csoundDeleteChannelList(CSOUND *, controlChannelInfo_t *lst)
Definition: csound.h:403
PUBLIC void csoundScoreEventAbsoluteAsync(CSOUND *, char type, const MYFLT *pfields, long numFields, double time_ofs)
PUBLIC void csoundSetExternalMidiInCloseCallback(CSOUND *, int(*func)(CSOUND *, void *userData))
char * optype
Definition: csound.h:591
PUBLIC int csoundCompileTreeAsync(CSOUND *csound, TREE *root)
PUBLIC int csoundWriteCircularBuffer(CSOUND *csound, void *p, const void *inp, int items)
PUBLIC void csoundTableCopyOutAsync(CSOUND *csound, int table, MYFLT *dest)
PUBLIC void csoundSetExternalMidiErrorStringCallback(CSOUND *, const char *(*func)(int))
PUBLIC int csoundRegisterKeyboardCallback(CSOUND *, int(*func)(void *userData, void *p, unsigned int type), void *userData, unsigned int type)
PUBLIC void csoundSetMIDIFileInput(CSOUND *csound, const char *name)
int postscript_graphs
Definition: csound.h:483
PUBLIC int csoundKillInstance(CSOUND *csound, MYFLT instr, char *instrName, int mode, int allow_release)
struct TREE * right
Definition: csound.h:603
PUBLIC int csoundPerformBuffer(CSOUND *)
PUBLIC int csoundPerformKsmps(CSOUND *)
PUBLIC int csoundDestroyGlobalVariable(CSOUND *, const char *name)
int rate
Definition: csound.h:598
PUBLIC void csoundSetMakeGraphCallback(CSOUND *, void(*makeGraphCallback_)(CSOUND *, WINDAT *windat, const char *name))
int ksmps_override
Definition: csound.h:511
Definition: csound.h:332
PUBLIC void csoundDeleteUtilityList(CSOUND *, char **lst)
Definition: csound.h:425
PUBLIC int csoundStart(CSOUND *csound)
Definition: csound.h:538
int y
Definition: csound.h:646
controlChannelType
Definition: csound.h:615
PUBLIC int csoundGetTable(CSOUND *, MYFLT **tablePtr, int tableNum)
int midi_velocity_amp
Definition: csound.h:497
int nchnls_override
Definition: csound.h:507
PUBLIC void csoundTableCopyIn(CSOUND *csound, int table, MYFLT *src)
int sampleFormat
Definition: csound.h:550
PUBLIC int csoundGetControlChannelHints(CSOUND *, const char *name, controlChannelHints_t *hints)
Definition: csound.h:430
Definition: csound.h:417
int bufSamp_HW
Definition: csound.h:546
Definition: csound.h:383
Definition: csound.h:620
PUBLIC const char * csoundGetUtilityDescription(CSOUND *, const char *utilName)
PUBLIC void csoundCondWait(void *condVar, void *mutex)
PUBLIC void csoundInputMessage(CSOUND *, const char *message)
PUBLIC int csoundTableLength(CSOUND *, int table)
Definition: csound.h:622
Definition: csound.h:419
PUBLIC int * csoundGetChannelLock(CSOUND *, const char *name)
PUBLIC void csoundSetControlChannel(CSOUND *csound, const char *name, MYFLT val)
int sliding
Definition: csound.h:576
PUBLIC void csoundSetExternalMidiOutOpenCallback(CSOUND *, int(*func)(CSOUND *, void **userData, const char *devName))
PUBLIC void csoundDestroyThreadLock(void *lock)
char * outypes
Definition: csound.h:562
Definition: csound.h:336
PUBLIC int csoundSetPvsChannel(CSOUND *, const PVSDATEXT *fin, const char *name)
PUBLIC uint32_t csoundGetNchnls(CSOUND *)
PUBLIC void csoundTableSet(CSOUND *, int table, int index, MYFLT value)
float sampleRate
Definition: csound.h:552
PUBLIC CS_PRINTF2 void csoundMessage(CSOUND *, const char *format,...)
PUBLIC void csoundSetStringChannel(CSOUND *csound, const char *name, char *string)
PUBLIC void csoundInputMessageAsync(CSOUND *, const char *message)
Definition: csound.h:398
PUBLIC int csoundGetPvsChannel(CSOUND *csound, PVSDATEXT *fout, const char *name)
PUBLIC int csoundGetAudioDevList(CSOUND *csound, CS_AUDIODEVICE *list, int isOutput)
int FFT_library
Definition: csound.h:512
Definition: csound.h:377
PUBLIC int csoundCompile(CSOUND *, int argc, const char **argv)
PUBLIC void csoundGetOutputFormat(CSOUND *csound, char *type, char *format)
CSOUND_STATUS
Definition: csound.h:327
PUBLIC double csoundGetScoreTime(CSOUND *)
Definition: csound.h:412
int isOutput
Definition: csound.h:531
PUBLIC void csoundDisposeOpcodeList(CSOUND *, opcodeListEntry *opcodelist)
PUBLIC void * csoundQueryGlobalVariableNoCheck(CSOUND *, const char *name)
PUBLIC void csoundSetExternalMidiWriteCallback(CSOUND *, int(*func)(CSOUND *, void *userData, const unsigned char *buf, int nBytes))
int midi_key_oct
Definition: csound.h:494
int hardware_buffer_frames
Definition: csound.h:480
PUBLIC int csoundScoreEvent(CSOUND *, char type, const MYFLT *pFields, long numFields)
#define PUBLIC
Definition: csound.h:272
PUBLIC void csoundSetFileOpenCallback(CSOUND *p, void(*func)(CSOUND *, const char *, int, int, int))
PUBLIC void csoundGetNamedGEN(CSOUND *csound, int num, char *name, int len)
int number_of_threads
Definition: csound.h:499
Definition: csound.h:618
PUBLIC int csoundUDPServerStatus(CSOUND *csound)
PUBLIC void csoundSetRtrecordCallback(CSOUND *, int(*rtrecord__)(CSOUND *, MYFLT *inBuf, int nbytes))
PUBLIC void csoundSetMessageLevel(CSOUND *, int messageLevel)
PUBLIC int csoundOpenLibrary(void **library, const char *libraryPath)
PUBLIC int csoundSetControlChannelHints(CSOUND *, const char *name, controlChannelHints_t hints)
Definition: csound.h:629
int devNum
Definition: csound.h:542
Definition: csound.h:407
PUBLIC const char * csoundGetInputName(CSOUND *)
int nChannels
Definition: csound.h:548
PUBLIC int csoundPeekCircularBuffer(CSOUND *csound, void *circular_buffer, void *out, int items)
struct pvsdat_ext PVSDATEXT
PUBLIC MYFLT csoundGetSr(CSOUND *)
PUBLIC int csoundCompileOrcAsync(CSOUND *csound, const char *str)
Definition: csound.h:400
Definition: csound.h:405
PUBLIC int csoundCompileArgs(CSOUND *, int argc, const char **argv)
Definition: csound.h:436
PUBLIC void * csoundCreateThread(uintptr_t(*threadRoutine)(void *), void *userdata)
PUBLIC void csoundSetMIDIOutput(CSOUND *csound, const char *name)
PUBLIC void csoundDestroy(CSOUND *)
PUBLIC int csoundSetOption(CSOUND *csound, const char *option)
PUBLIC void * csoundGetCurrentThreadId(void)
int compute_weights
Definition: csound.h:502
PUBLIC void csoundNotifyThreadLock(void *lock)
PUBLIC void csoundSetMIDIInput(CSOUND *csound, const char *name)
PUBLIC int csoundRegisterSenseEventCallback(CSOUND *, void(*func)(CSOUND *, void *), void *userData)
PUBLIC void csoundSetYieldCallback(CSOUND *, int(*yieldCallback_)(CSOUND *))
Definition: csound.h:385
PUBLIC int csoundIsScorePending(CSOUND *)
Definition: csound.h:595
Definition: csound.h:389
PUBLIC const char * csoundGetFirstMessage(CSOUND *csound)
PUBLIC void csoundSetExitGraphCallback(CSOUND *, int(*exitGraphCallback_)(CSOUND *))
Definition: csound.h:631
Definition: csound.h:384
Definition: csound.h:421
PUBLIC void * csoundCreateBarrier(unsigned int max)
PUBLIC void csoundGetAudioChannel(CSOUND *csound, const char *name, MYFLT *samples)
Definition: csound.h:451
MYFLT sample_rate_override
Definition: csound.h:505
Definition: csound.h:330
struct TREE TREE
PUBLIC void csoundSleep(size_t milliseconds)
PUBLIC int csoundScoreExtract(CSOUND *, FILE *inFile, FILE *outFile, FILE *extractFile)
PUBLIC void csoundKeyPress(CSOUND *, char c)
Definition: csound.h:388
Definition: csound.h:442
PUBLIC void csoundDestroyMutex(void *mutex_)
int midi_key
Definition: csound.h:492
Definition: csound.h:616
int midi_key_cps
Definition: csound.h:493
Definition: csound.h:423
PUBLIC void csoundTableCopyOut(CSOUND *csound, int table, MYFLT *dest)
Definition: csound.h:406
PUBLIC int csoundCloseLibrary(void *library)
Definition: csound.h:401
int flags
Definition: csound.h:564
PUBLIC MYFLT csoundGet0dBFS(CSOUND *)
PUBLIC void * csoundCreateMutex(int isRecursive)
struct TREE * next
Definition: csound.h:604
PUBLIC void csoundSetMIDIFileOutput(CSOUND *csound, const char *name)
struct ORCTOKEN ORCTOKEN
Definition: csound.h:378
PUBLIC void ** csoundGetRtPlayUserData(CSOUND *)
MYFLT e0dbfs_override
Definition: csound.h:509
Definition: csound.h:653
int wintype
Definition: csound.h:580
int sample_accurate
Definition: csound.h:504
PUBLIC int csoundGetChannelDatasize(CSOUND *csound, const char *name)
Definition: csound.h:386
int32 NB
Definition: csound.h:577
PUBLIC void csoundSetHostData(CSOUND *, void *hostData)
Definition: csound.h:402
PUBLIC int csoundGetMessageLevel(CSOUND *)
struct ORCTOKEN * next
Definition: csound.h:592
PUBLIC uint32_t csoundRandMT(CsoundRandMTState *p)
PUBLIC int csoundSpinLockInit(spin_lock_t *spinlock)
controlChannelBehavior behav
Definition: csound.h:640
PUBLIC void csoundRewindScore(CSOUND *)
int displays
Definition: csound.h:481
PUBLIC void csoundCondSignal(void *condVar)
PUBLIC void csoundSetScoreOffsetSeconds(CSOUND *, MYFLT time)
PUBLIC int csoundCompileCsd(CSOUND *csound, const char *csd_filename)
PUBLIC uint32_t csoundGetKsmps(CSOUND *)
PUBLIC int csoundLockMutexNoWait(void *mutex_)
int type
Definition: csound.h:596
PUBLIC void ** csoundGetRtRecordUserData(CSOUND *)
PUBLIC int csoundGetAPIVersion(void)
PUBLIC void csoundLockMutex(void *mutex_)
int defer_gen01_load
Definition: csound.h:491
int32 N
Definition: csound.h:575
int width
Definition: csound.h:647
int debug_mode
Definition: csound.h:478
PUBLIC int csoundUDPServerClose(CSOUND *csound)
PUBLIC MYFLT csoundEvalCode(CSOUND *csound, const char *str)
PUBLIC MYFLT csoundSystemSr(CSOUND *csound, MYFLT val)
PUBLIC void csoundTableCopyInAsync(CSOUND *csound, int table, MYFLT *src)
PUBLIC int csoundListChannels(CSOUND *, controlChannelInfo_t **lst)
PUBLIC void csoundSetOpcodedir(const char *s)
int use_cscore
Definition: csound.h:487
Definition: csound.h:370
int len
Definition: csound.h:599
PUBLIC TREE * csoundParseOrc(CSOUND *csound, const char *str)
Definition: csound.h:371
PUBLIC int csoundRand31(int *seedVal)
Definition: csound.h:413
PUBLIC int csoundGetVersion(void)
int x
Definition: csound.h:645
int midi_key_pch
Definition: csound.h:495
int realtime_mode
Definition: csound.h:503
uint32 framecount
Definition: csound.h:582
Definition: csound.h:435
PUBLIC const char * csoundGetEnv(CSOUND *csound, const char *name)
PUBLIC void csoundSetDefaultMessageCallback(void(*csoundMessageCallback_)(CSOUND *, int attr, const char *format, va_list valist))
double fvalue
Definition: csound.h:590
char * name
Definition: csound.h:654
PUBLIC long csoundGetInputBufferSize(CSOUND *)
PUBLIC int csoundWaitThreadLock(void *lock, size_t milliseconds)
PUBLIC int csoundIsNamedGEN(CSOUND *csound, int num)
struct controlChannelInfo_s controlChannelInfo_t
controlChannelHints_t hints
Definition: csound.h:656
int line
Definition: csound.h:600
PUBLIC void csoundGetStringChannel(CSOUND *csound, const char *name, char *string)
Definition: csound.h:437
Definition: csound.h:429
PUBLIC void csoundSetAudioDeviceListCallback(CSOUND *csound, int(*audiodevlist__)(CSOUND *, CS_AUDIODEVICE *list, int isOutput))
int message_level
Definition: csound.h:484
PUBLIC int csoundGetDebug(CSOUND *)
PUBLIC long csoundGetOutputBufferSize(CSOUND *)
PUBLIC void csoundSpinUnLock(spin_lock_t *spinlock)
struct windat_ WINDAT
Definition: csound.h:468
Definition: csound.h:555
PUBLIC int csoundGetMessageCnt(CSOUND *csound)
Definition: csound.h:632
PUBLIC void * csoundQueryGlobalVariable(CSOUND *, const char *name)
int type
Definition: csound.h:655
PUBLIC MYFLT csoundGetKr(CSOUND *)
Definition: csound.h:426
Definition: csound.h:452
Definition: csound.h:567
PUBLIC void * csoundGetLibrarySymbol(void *library, const char *symbolName)
PUBLIC uintptr_t csoundJoinThread(void *thread)
controlChannelBehavior
Definition: csound.h:628
PUBLIC int csoundPerform(CSOUND *)
PUBLIC MYFLT csoundGetControlChannel(CSOUND *csound, const char *name, int *err)
MYFLT control_rate_override
Definition: csound.h:506
struct CSOUND_ CSOUND
Definition: csound.h:467
PUBLIC int csoundReadScore(CSOUND *csound, const char *str)
PUBLIC int csoundScoreEventAbsolute(CSOUND *, char type, const MYFLT *pfields, long numFields, double time_ofs)
Definition: csound.h:396
PUBLIC MYFLT * csoundGetOutputBuffer(CSOUND *)
PUBLIC void csoundDestroyCondVar(void *condVar)
Definition: csound.h:374
MYFLT min
Definition: csound.h:643
PUBLIC void csoundSetExternalMidiInOpenCallback(CSOUND *, int(*func)(CSOUND *, void **userData, const char *devName))
PUBLIC void csoundSetExternalMidiReadCallback(CSOUND *, int(*func)(CSOUND *, void *userData, unsigned char *buf, int nBytes))
ORCTOKEN * value
Definition: csound.h:597
int height
Definition: csound.h:648
PUBLIC void csoundSetRecopenCallback(CSOUND *, int(*recopen_)(CSOUND *, const csRtAudioParams *parm))
char * intypes
Definition: csound.h:563
PUBLIC int csoundGetTableArgs(CSOUND *csound, MYFLT **argsPtr, int tableNum)
PUBLIC int csoundSetGlobalEnv(const char *name, const char *value)
PUBLIC int csoundGetModule(CSOUND *csound, int number, char **name, char **type)
Definition: csound.h:334
Definition: csound.h:397
Definition: csound.h:340
PUBLIC int csoundGetChannelPtr(CSOUND *, MYFLT **p, const char *name, int type)
PUBLIC MYFLT * csoundGetSpout(CSOUND *csound)
PUBLIC void csoundInitTimerStruct(RTCLOCK *)
PUBLIC void csoundReadScoreAsync(CSOUND *csound, const char *str)
PUBLIC void csoundStopUDPConsole(CSOUND *csound)
struct controlChannelHints_s controlChannelHints_t
Definition: csound.h:625
PUBLIC void csoundSetParams(CSOUND *csound, CSOUND_PARAMS *p)
PUBLIC void csoundSetOutputChannelCallback(CSOUND *csound, channelCallback_t outputChannelCalback)
int_least64_t starttime_real
Definition: csound.h:556
CSOUND_FILETYPES
Definition: csound.h:369
struct RTCLOCK_S RTCLOCK
struct TREE * left
Definition: csound.h:602
Definition: csound.h:394
PUBLIC void csoundSetHostImplementedAudioIO(CSOUND *, int state, int bufSize)
PUBLIC MYFLT * csoundGetSpin(CSOUND *)
PUBLIC MYFLT * csoundGetInputBuffer(CSOUND *)
Definition: csound.h:639
PUBLIC int csoundUDPConsole(CSOUND *csound, const char *addr, int port, int mirror)
PUBLIC const char * csoundGetOutputName(CSOUND *)
PUBLIC void csoundDestroyCircularBuffer(CSOUND *csound, void *circularbuffer)
PUBLIC void csoundSeedRandMT(CsoundRandMTState *p, const uint32_t *initKey, uint32_t keyLength)
Definition: csound.h:619
Definition: csound.h:404
PUBLIC int csoundCreateGlobalVariable(CSOUND *, const char *name, size_t nbytes)
Definition: csound.h:630
PUBLIC void csoundClearSpin(CSOUND *)
int csd_line_counts
Definition: csound.h:501
int daemon
Definition: csound.h:510
PUBLIC void csoundSetInput(CSOUND *csound, const char *name)
PUBLIC void csoundSetExternalMidiOutCloseCallback(CSOUND *, int(*func)(CSOUND *, void *userData))
PUBLIC void csoundSetInputChannelCallback(CSOUND *csound, channelCallback_t inputChannelCalback)
PUBLIC int csoundNewOpcodeList(CSOUND *, opcodeListEntry **opcodelist)
char * attributes
Definition: csound.h:650
int nchnls_i_override
Definition: csound.h:508
int syntax_check_only
Definition: csound.h:500
PUBLIC int csoundReadCircularBuffer(CSOUND *csound, void *circular_buffer, void *out, int items)
Definition: csound.h:420
uint64_t locn
Definition: csound.h:601
PUBLIC uint32_t csoundGetRandomSeedFromTime(void)
PUBLIC int csoundDestroyBarrier(void *barrier)
Definition: csound.h:440
PUBLIC MYFLT csoundGetA4(CSOUND *)
PUBLIC void * csoundCreateCircularBuffer(CSOUND *csound, int numelem, int elemsize)
Definition: csound.h:456
PUBLIC void csoundUnlockMutex(void *mutex_)
PUBLIC void csoundSetScorePending(CSOUND *, int pending)
int buffer_frames
Definition: csound.h:479
PUBLIC void csoundSetCscoreCallback(CSOUND *, void(*cscoreCallback_)(CSOUND *))
int midi_velocity
Definition: csound.h:496
PUBLIC MYFLT csoundTableGet(CSOUND *, int table, int index)
PUBLIC int csoundWaitBarrier(void *barrier)
Definition: csound.h:586
Definition: csound.h:382
PUBLIC void csoundStop(CSOUND *)
void * markup
Definition: csound.h:605
PUBLIC void * csoundGetHostData(CSOUND *)
int tempo
Definition: csound.h:485
int terminate_on_midi
Definition: csound.h:488
Definition: csound.h:446
PUBLIC void csoundSetAudioChannel(CSOUND *csound, const char *name, MYFLT *samples)
int heartbeat
Definition: csound.h:490
PUBLIC void csoundReset(CSOUND *)
PUBLIC void csoundFlushCircularBuffer(CSOUND *csound, void *p)
PUBLIC void csoundSetDrawGraphCallback(CSOUND *, void(*drawGraphCallback_)(CSOUND *, WINDAT *windat))
float * frame
Definition: csound.h:583
PUBLIC int csoundGetMIDIDevList(CSOUND *csound, CS_MIDIDEVICE *list, int isOutput)
PUBLIC int csoundAppendOpcode(CSOUND *, const char *opname, int dsblksiz, int flags, int thread, const char *outypes, const char *intypes, int(*iopadr)(CSOUND *, void *), int(*kopadr)(CSOUND *, void *), int(*aopadr)(CSOUND *, void *))
int ring_bell
Definition: csound.h:486
Definition: csound.h:379
int32 winsize
Definition: csound.h:579
Definition: csound.h:560
PUBLIC double csoundGetCPUTime(RTCLOCK *)
int mti
Definition: csound.h:568