Permalink
Browse files

inline chuck header files

  • Loading branch information...
1 parent 17a52d0 commit ac7edc400c798b9175f786b12be4e114dbb2cd8c @spencersalazar committed Oct 4, 2012
Showing with 22,854 additions and 10 deletions.
  1. +2 −2 ABSaturator/makefile
  2. +2 −2 Bitcrusher/makefile
  3. +2 −2 MagicSine/makefile
  4. +397 −0 chuck/include/chuck_absyn.h
  5. +160 −0 chuck/include/chuck_bbq.h
  6. +118 −0 chuck/include/chuck_compile.h
  7. +54 −0 chuck/include/chuck_console.h
  8. +178 −0 chuck/include/chuck_def.h
  9. +667 −0 chuck/include/chuck_dl.h
  10. +176 −0 chuck/include/chuck_emit.h
  11. +96 −0 chuck/include/chuck_errmsg.h
  12. +103 −0 chuck/include/chuck_frame.h
  13. +84 −0 chuck/include/chuck_globals.h
  14. +3,283 −0 chuck/include/chuck_instr.h
  15. +430 −0 chuck/include/chuck_lang.h
  16. +581 −0 chuck/include/chuck_oo.h
  17. +98 −0 chuck/include/chuck_otf.h
  18. +154 −0 chuck/include/chuck_parse.h
  19. +68 −0 chuck/include/chuck_scan.h
  20. +578 −0 chuck/include/chuck_shell.h
  21. +198 −0 chuck/include/chuck_stats.h
  22. +89 −0 chuck/include/chuck_symbol.h
  23. +75 −0 chuck/include/chuck_table.h
  24. +839 −0 chuck/include/chuck_type.h
  25. +189 −0 chuck/include/chuck_ugen.h
  26. +63 −0 chuck/include/chuck_utils.h
  27. +562 −0 chuck/include/chuck_vm.h
  28. +295 −0 chuck/include/chuck_win32.h
  29. +372 −0 chuck/include/digiio_rtaudio.h
  30. +234 −0 chuck/include/dirent_win32.h
  31. +171 −0 chuck/include/hidio_sdl.h
  32. +277 −0 chuck/include/midiio_rtmidi.h
  33. +296 −0 chuck/include/rtmidi.h
  34. +45 −0 chuck/include/uana_extract.h
  35. +45 −0 chuck/include/uana_xform.h
  36. +238 −0 chuck/include/ugen_filter.h
  37. +111 −0 chuck/include/ugen_osc.h
  38. +6,470 −0 chuck/include/ugen_stk.h
  39. +257 −0 chuck/include/ugen_xxx.h
  40. +62 −0 chuck/include/ulib_machine.h
  41. +99 −0 chuck/include/ulib_math.h
  42. +78 −0 chuck/include/ulib_net.h
  43. +79 −0 chuck/include/ulib_opsc.h
  44. +132 −0 chuck/include/ulib_std.h
  45. +191 −0 chuck/include/util_buffers.h
  46. +52 −0 chuck/include/util_console.h
  47. +213 −0 chuck/include/util_hid.h
  48. +74 −0 chuck/include/util_math.h
  49. +106 −0 chuck/include/util_network.h
  50. +629 −0 chuck/include/util_opsc.h
  51. +100 −0 chuck/include/util_raw.h
  52. +2,696 −0 chuck/include/util_sndfile.h
  53. +76 −0 chuck/include/util_string.h
  54. +117 −0 chuck/include/util_thread.h
  55. +89 −0 chuck/include/util_xforms.h
  56. +2 −2 chuginate/template/makefile
  57. +2 −2 chuginate/template/makefile.osx
View
@@ -6,8 +6,8 @@ CHUGIN_NAME=ABSaturator
C_MODULES=
CXX_MODULES=ABSaturator.cpp Filters.cpp
-# where the chuck source code is
-CK_SRC_PATH?=../../chuck/trunk/src/
+# where the chuck headers are
+CK_SRC_PATH?=../chuck/include/
# ---------------------------------------------------------------------------- #
View
@@ -6,8 +6,8 @@ CHUGIN_NAME=Bitcrusher
C_MODULES=
CXX_MODULES=Bitcrusher.cpp
-# where the chuck source code is
-CK_SRC_PATH?=../../chuck/trunk/src/
+# where the chuck headers are
+CK_SRC_PATH?=../chuck/include/
# ---------------------------------------------------------------------------- #
View
@@ -6,8 +6,8 @@ CHUGIN_NAME=MagicSine
C_MODULES=
CXX_MODULES=MagicSine.cpp
-# where the chuck source code is
-CK_SRC_PATH?=../../chuck/trunk/src/
+# where the chuck headers are
+CK_SRC_PATH?=../chuck/include/
# ---------------------------------------------------------------------------- #
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,160 @@
+/*----------------------------------------------------------------------------
+ ChucK Concurrent, On-the-fly Audio Programming Language
+ Compiler and Virtual Machine
+
+ Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
+ http://chuck.cs.princeton.edu/
+ http://soundlab.cs.princeton.edu/
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ U.S.A.
+-----------------------------------------------------------------------------*/
+
+//-----------------------------------------------------------------------------
+// file: chuck_bbq.h
+// desc: bbq header
+//
+// author: Ge Wang (gewang@cs.princeton.edu)
+// Perry R. Cook (prc@cs.princeton.edu)
+// date: Spring 2004
+//-----------------------------------------------------------------------------
+#ifndef __CHUCK_BBQ_H__
+#define __CHUCK_BBQ_H__
+
+// currently ChucK uses RtAudio | __CHUCK_NATIVE_AUDIO__ not in use
+#if defined(__CHUCK_NATIVE_AUDIO__)
+ #if defined(__LINUX_ALSA__)
+ #include "digiio_alsa.h"
+ #include "midiio_alsa.h"
+ #elif defined(__LINUX_JACK__)
+ #include "digiio_jack.h"
+ #include "midiio_alsa.h"
+ #elif defined(__LINUX_OSS__)
+ #include "digiio_oss.h"
+ #include "midiio_oss.h"
+ #elif defined(__MACOSX_CORE__)
+ #include "digiio_osx.h"
+ #include "midiio_osx.h"
+ #elif defined(__WINDOWS_DS__)
+ #include "digiio_win32.h"
+ #include "midiio_win32.h"
+ #else
+ #error "must define one:\
+ __LINUX_ALSA__ __LINUX_JACK__ __LINUX_OSS__ __MACOSX_CORE__ __WINDOWS_DS__"
+ #endif
+#else
+ #include "digiio_rtaudio.h"
+ #include "midiio_rtmidi.h"
+
+ #if defined(__LINUX_ALSA__)
+ #elif defined(__LINUX_JACK__)
+ #elif defined(__LINUX_OSS__)
+ #elif defined(__MACOSX_CORE__)
+ #elif defined(__WINDOWS_DS__)
+ #elif defined(__WINDOWS_ASIO__)
+ #else
+ #error "must define one:\
+ __LINUX_ALSA__ __LINUX_JACK__ __LINUX_OSS__ __MACOSX_CORE__ __WINDOWS_DS__"
+ #endif
+#endif
+
+struct Chuck_VM;
+
+
+
+//-----------------------------------------------------------------------------
+// name: class BBQ
+// desc: ...
+//-----------------------------------------------------------------------------
+class BBQ
+{
+public:
+ BBQ();
+ ~BBQ();
+
+public:
+ BOOL__ initialize( DWORD__ num_dac_channels,
+ DWORD__ num_adc_channels,
+ DWORD__ sampling_rate,
+ DWORD__ bps,
+ DWORD__ buffer_size,
+ DWORD__ num_buffers,
+ DWORD__ dac,
+ DWORD__ adc,
+ DWORD__ block,
+ Chuck_VM * vm_ref,
+ BOOL__ rt_audio,
+ void * callback = NULL,
+ void * data = NULL,
+ // force_srate added 1.3.1.2
+ BOOL__ force_srate = FALSE );
+ void set_srate( DWORD__ srate );
+ void set_bufsize( DWORD__ bufsize );
+ void set_numbufs( DWORD__ numbufs );
+ void set_inouts( DWORD__ adc, DWORD__ dac );
+ void set_chans( DWORD__ ins, DWORD__ outs );
+ void shutdown();
+
+public:
+ DigitalOut * digi_out();
+ DigitalIn * digi_in();
+ MidiOut * midi_out( DWORD__ index = 0 );
+ MidiIn * midi_in( DWORD__ index = 0 );
+
+public:
+ DWORD__ in_count( DWORD__ index = 0 )
+ { return index < m_max_midi_device ? m_in_count[index] : 0; }
+ DWORD__ out_count( DWORD__ index = 0 )
+ { return index < m_max_midi_device ? m_out_count[index] : 0; }
+
+protected:
+ DigitalOut * m_digi_out;
+ DigitalIn * m_digi_in;
+ MidiOut ** m_midi_out;
+ MidiIn ** m_midi_in;
+ DWORD__ * m_in_count;
+ DWORD__ * m_out_count;
+ DWORD__ m_max_midi_device;
+};
+
+
+
+
+//-----------------------------------------------------------------------------
+// name: class RangeMapper
+// desc: ...
+//-----------------------------------------------------------------------------
+class RangeMapper
+{
+public:
+ RangeMapper( SAMPLE low_l, SAMPLE high_l, SAMPLE low_r, SAMPLE high_r );
+
+public:
+ virtual SAMPLE map( SAMPLE in );
+
+protected:
+ float m_slope;
+ float m_inter;
+
+ SAMPLE m_low_l;
+ SAMPLE m_high_l;
+ SAMPLE m_low_r;
+ SAMPLE m_high_r;
+};
+
+
+
+
+#endif
@@ -0,0 +1,118 @@
+/*----------------------------------------------------------------------------
+ ChucK Concurrent, On-the-fly Audio Programming Language
+ Compiler and Virtual Machine
+
+ Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
+ http://chuck.cs.princeton.edu/
+ http://soundlab.cs.princeton.edu/
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ U.S.A.
+-----------------------------------------------------------------------------*/
+
+//-----------------------------------------------------------------------------
+// file: chuck_compile.h
+// desc: chuck compile system unifying parser, type checker, and emitter
+//
+// author: Ge Wang (gewang@cs.princeton.edu)
+// Perry R. Cook (prc@cs.princeton.edu)
+// date: Autumn 2005 - original
+//-----------------------------------------------------------------------------
+#ifndef __CHUCK_COMPILE_H__
+#define __CHUCK_COMPILE_H__
+
+#include "chuck_def.h"
+#include "chuck_parse.h"
+#include "chuck_scan.h"
+#include "chuck_type.h"
+#include "chuck_emit.h"
+#include "chuck_vm.h"
+
+#include <list>
+
+struct Chuck_DLL;
+
+
+//-----------------------------------------------------------------------------
+// name: struct Chuck_Compiler
+// desc: the sum of the components in compilation
+//-----------------------------------------------------------------------------
+struct Chuck_Compiler
+{
+public: // data
+ // type-checking environment
+ Chuck_Env * env;
+ // emitter
+ Chuck_Emitter * emitter;
+ // generated code
+ Chuck_VM_Code * code;
+
+ // auto-depend flag
+ t_CKBOOL m_auto_depend;
+ // recent map
+ std::map<std::string, Chuck_Context *> m_recent;
+
+ std::list<Chuck_DLL *> m_dlls;
+ std::list<std::string> m_cklibs_to_preload;
+
+public: // to all
+ // contructor
+ Chuck_Compiler();
+ // destructor
+ virtual ~Chuck_Compiler();
+
+ // initialize
+ t_CKBOOL initialize( Chuck_VM * vm,
+ std::list<std::string> & chugin_search_paths,
+ std::list<std::string> & named_dls );
+ // shutdown
+ void shutdown();
+
+ // set auto depend
+ void set_auto_depend( t_CKBOOL v );
+ // parse, type-check, and emit a program
+ t_CKBOOL go( const std::string & filename, FILE * fd = NULL,
+ const char * str_src = NULL, const std::string & full_path = "" );
+ // resolve a type automatically, if auto_depend is on
+ t_CKBOOL resolve( const std::string & type );
+ // get the code generated from the last go()
+ Chuck_VM_Code * output( );
+
+protected: // internal
+ // do entire file
+ t_CKBOOL do_entire_file( Chuck_Context * context );
+ // do just class definitions
+ t_CKBOOL do_only_classes( Chuck_Context * context );
+ // do all excect classes
+ t_CKBOOL do_all_except_classes( Chuck_Context * context );
+ // do normal compile
+ t_CKBOOL do_normal( const std::string & path, FILE * fd = NULL,
+ const char * str_src = NULL, const std::string & full_path = "" );
+ // look up in recent
+ Chuck_Context * find_recent_path( const std::string & path );
+ // look up in recent
+ Chuck_Context * find_recent_type( const std::string & type );
+ // add to recent
+ t_CKBOOL add_recent_path( const std::string & path, Chuck_Context * context );
+};
+
+
+// call this to detach all open files
+extern "C" void all_detach();
+
+
+
+
+#endif
@@ -0,0 +1,54 @@
+/*----------------------------------------------------------------------------
+ ChucK Concurrent, On-the-fly Audio Programming Language
+ Compiler and Virtual Machine
+
+ Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
+ http://chuck.cs.princeton.edu/
+ http://soundlab.cs.princeton.edu/
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ U.S.A.
+-----------------------------------------------------------------------------*/
+
+//-----------------------------------------------------------------------------
+// file: chuck_console.h
+// desc: ...
+//
+// author: Spencer Salazar (ssalazar@princeton.edu)
+// date: Autumn 2005
+//-----------------------------------------------------------------------------
+#ifndef __CHUCK_CONSOLE_H__
+#define __CHUCK_CONSOLE_H__
+
+#include "chuck_def.h"
+#include "chuck_shell.h"
+
+//-----------------------------------------------------------------------------
+// name: class Chuck_Console
+// desc: for ttyp access to chuck shell
+//-----------------------------------------------------------------------------
+class Chuck_Console : public Chuck_Shell_UI
+{
+public:
+ Chuck_Console();
+ virtual ~Chuck_Console();
+
+ t_CKBOOL init();
+ t_CKBOOL next_command( const string &, string &);
+ void next_result(const string &);
+
+};
+
+#endif //__CHUCK_CONSOLE_H__
Oops, something went wrong.

0 comments on commit ac7edc4

Please sign in to comment.