Full Code of danomatika/ofxPd for AI

master 374561865bfc cached
171 files
2.9 MB
777.8k tokens
4033 symbols
1 requests
Download .txt
Showing preview only (3,111K chars total). Download the full file or copy to clipboard to get everything.
Repository: danomatika/ofxPd
Branch: master
Commit: 374561865bfc
Files: 171
Total size: 2.9 MB

Directory structure:
gitextract_4rjwthh6/

├── .gitignore
├── CHANGES.txt
├── LICENSE.txt
├── README.md
├── addon_config.mk
├── doc/
│   ├── interface_sketch.txt
│   └── logo/
│       ├── libpd.pd
│       ├── logo.pd
│       └── openFrameworks.pd
├── libs/
│   └── libpd/
│       ├── cpp/
│       │   ├── LICENSE.txt
│       │   ├── PdBase.hpp
│       │   ├── PdMidiReceiver.hpp
│       │   ├── PdReceiver.hpp
│       │   └── PdTypes.hpp
│       ├── libpd_wrapper/
│       │   ├── s_libpdmidi.c
│       │   ├── util/
│       │   │   ├── ringbuffer.c
│       │   │   ├── ringbuffer.h
│       │   │   ├── z_print_util.c
│       │   │   ├── z_print_util.h
│       │   │   ├── z_queued.c
│       │   │   └── z_queued.h
│       │   ├── x_libpdreceive.c
│       │   ├── x_libpdreceive.h
│       │   ├── z_hooks.c
│       │   ├── z_hooks.h
│       │   ├── z_libpd.c
│       │   └── z_libpd.h
│       └── pure-data/
│           ├── extra/
│           │   ├── README.txt
│           │   ├── bob~/
│           │   │   ├── README.txt
│           │   │   └── bob~.c
│           │   ├── bonk~/
│           │   │   ├── bonk~.c
│           │   │   └── templates.txt
│           │   ├── choice/
│           │   │   └── choice.c
│           │   ├── fiddle~/
│           │   │   └── fiddle~.c
│           │   ├── loop~/
│           │   │   └── loop~.c
│           │   ├── lrshift~/
│           │   │   └── lrshift~.c
│           │   ├── pd~/
│           │   │   ├── binarymsg.c
│           │   │   ├── notes.txt
│           │   │   ├── pdsched.c
│           │   │   └── pd~.c
│           │   ├── pique/
│           │   │   └── pique.c
│           │   ├── sigmund~/
│           │   │   └── sigmund~.c
│           │   └── stdout/
│           │       └── stdout.c
│           └── src/
│               ├── d_arithmetic.c
│               ├── d_array.c
│               ├── d_ctl.c
│               ├── d_dac.c
│               ├── d_delay.c
│               ├── d_fft.c
│               ├── d_fft_fftsg.c
│               ├── d_filter.c
│               ├── d_global.c
│               ├── d_math.c
│               ├── d_misc.c
│               ├── d_osc.c
│               ├── d_resample.c
│               ├── d_soundfile.c
│               ├── d_soundfile.h
│               ├── d_soundfile_aiff.c
│               ├── d_soundfile_caf.c
│               ├── d_soundfile_next.c
│               ├── d_soundfile_wave.c
│               ├── d_ugen.c
│               ├── g_all_guis.c
│               ├── g_all_guis.h
│               ├── g_array.c
│               ├── g_bang.c
│               ├── g_canvas.c
│               ├── g_canvas.h
│               ├── g_clone.c
│               ├── g_editor.c
│               ├── g_editor_extras.c
│               ├── g_graph.c
│               ├── g_guiconnect.c
│               ├── g_io.c
│               ├── g_mycanvas.c
│               ├── g_numbox.c
│               ├── g_radio.c
│               ├── g_readwrite.c
│               ├── g_rtext.c
│               ├── g_scalar.c
│               ├── g_slider.c
│               ├── g_template.c
│               ├── g_text.c
│               ├── g_toggle.c
│               ├── g_traversal.c
│               ├── g_undo.c
│               ├── g_undo.h
│               ├── g_vumeter.c
│               ├── m_atom.c
│               ├── m_binbuf.c
│               ├── m_class.c
│               ├── m_conf.c
│               ├── m_glob.c
│               ├── m_imp.h
│               ├── m_memory.c
│               ├── m_obj.c
│               ├── m_pd.c
│               ├── m_pd.h
│               ├── m_private_utils.h
│               ├── m_sched.c
│               ├── s_audio.c
│               ├── s_audio_dummy.c
│               ├── s_inter.c
│               ├── s_inter_gui.c
│               ├── s_loader.c
│               ├── s_main.c
│               ├── s_net.c
│               ├── s_net.h
│               ├── s_path.c
│               ├── s_print.c
│               ├── s_stuff.h
│               ├── s_utf8.c
│               ├── s_utf8.h
│               ├── x_acoustics.c
│               ├── x_arithmetic.c
│               ├── x_array.c
│               ├── x_connective.c
│               ├── x_file.c
│               ├── x_gui.c
│               ├── x_interface.c
│               ├── x_list.c
│               ├── x_midi.c
│               ├── x_misc.c
│               ├── x_net.c
│               ├── x_scalar.c
│               ├── x_text.c
│               ├── x_time.c
│               ├── x_vexp.c
│               ├── x_vexp.h
│               ├── x_vexp_fun.c
│               └── x_vexp_if.c
├── pdExample/
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── pd/
│   │           ├── abs/
│   │           │   └── test_abs.pd
│   │           ├── instance.pd
│   │           └── test.pd
│   └── src/
│       ├── main.cpp
│       ├── ofApp.cpp
│       └── ofApp.h
├── pdExampleIOS/
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── pd/
│   │           ├── abs/
│   │           │   └── test_abs.pd
│   │           ├── instance.pd
│   │           └── test.pd
│   └── src/
│       ├── main.mm
│       ├── ofApp.h
│       └── ofApp.mm
├── pdMultiExample/
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── test.pd
│   └── src/
│       ├── main.cpp
│       ├── ofApp.cpp
│       └── ofApp.h
├── pitchShifter/
│   ├── LICENSE.txt
│   ├── README.md
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── pd/
│   │           ├── _main.pd
│   │           └── rc/
│   │               ├── e_pshift~-help.pd
│   │               ├── e_pshift~.pd
│   │               ├── u_spigot~-help.pd
│   │               └── u_spigot~.pd
│   └── src/
│       ├── main.cpp
│       ├── ofApp.cpp
│       ├── ofApp.h
│       ├── ofxSimpleSlider.cpp
│       └── ofxSimpleSlider.h
├── scripts/
│   └── update_libpd.sh
└── src/
    ├── ofxPd.cpp
    └── ofxPd.h

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================

# built
*.app
*.a

# osx
.DS_Store

# win
*.exe
*.dll

# xcode
*.pbxuser
*.perspectivev3
*.mode1v3
xcuserdata
build

# codeblocks
*.layout
*.depend
*.cbTemp

# example project files

pdExample/Makefile
pdExample/*.xcodeproj
pdExample/config.make
pdExample/*xcconfig
pdExample/*.plist
pdExample/of.entitlements

pdMultiExample/Makefile
pdMultiExample/*.xcodeproj
pdMultiExample/config.make
pdMultiExample/*xcconfig
pdMultiExample/*.plist
pdMultiExample/of.entitlements

pdExampleIOS/Makefile
pdExampleIOS/*.xcodeproj
pdExampleIOS/config.make
pdExampleIOS/*xcconfig
pdExampleIOS/*.plist
pdExampleIOS/*.pch
pdExampleIOS/bin/data/Default*.png
pdExampleIOS/bin/data/Icon*.png
pdExampleIOS/mediaAssets/
pdExampleIOS/of.entitlements

pitchShifter/Makefile
pitchShifter/*.xcodeproj
pitchShifter/config.make
pitchShifter/*xcconfig
pitchShifter/*.plist
pitchShifter/of.entitlements


================================================
FILE: CHANGES.txt
================================================
TBA

* fixed pdMultiExample not using newer ofSoundBuffer audioIn and audioOut
  functions (reported by Theo Watson)

1.10.1: 2024 Apr 10

* fixed endian detection issues on Linux by defining HAVE_ENDIAN_H

* defined _DARWIN_UNLIMITED_SELECT to increased max number of file descriptors
  on macOS

1.10.0: 2023 Nov 16

* updated to libpd 0.14.0 (pd 0.54-1)
  note: some files have been added or removed, so regenerate your projects

* updated for OF 0.12
  warning: the ProjectGenerator may not set the correct C flags for Xcode
           projects, see the readme on how to manually set them

* added ofSoundBuffer audioIn() and audioOut() functions (suggested by Nejrup)
* use ofSetBackgroundColor instead of ofSetBackground in pdExample
  (Jonathan Frank)
* updated thumbnail to pd vanilla screenshot
* various formatting updates and typo fixes

* removed references to Codeblocks in readme build requirements

1.9.1: 2022 Dec 16

* updated to libpd 0.13.2 (pd 0.53-1)

1.9.0: 2022 Nov 05

* updated to libpd 0.13.0 (pd 0.53-0)
  note: some files have been added or removed, so regenerate your projects

* added support for multiple ofxPd instances when compiling with PDINSTANCE
  note: projects which use libpd_*_instance functions must be updated to use
        separate ofxPd instances

1.8.1: 2021 Jan 08

* updated to libpd 0.12.1 for pd~ support

1.8.0: 2020 Dec 30

* updated to libpd 0.12.0 (pd 0.51-4)
  note: some files have been added, so regenerate your projects

* added prelim support for Visual Studio (not fully tested, 64 bit only)
* added info about PDINSTANCE and PDTHREADS defines to readme
* added PDINSTANCE and PDTHREADS defines addon_config.mk (uncomment to use)
* added info about NSMicrophoneUsageDescription to readme

* readded [pd~] sources as they build on windows again
* fixed pdMultiExample not building with PDINSTANCE and PDTHREADS defines
  (reported by Antoine Rousseau)
* append ADDONS_CFLAGS to avoid problem with OF ProjectGenerator on Android
* include ofFileUtils.h before ofxPd.h to conflict between boost & libpd's
  s_ define (Antoine Rousseau)

* clarifications & screenshots for MinGW build instructions (moebiussurfing)
* clarify windows libpd.dll instructions
* update pdMultiExample

1.7.1: 2018 Sep 13

* updated to libpd 0.11.0 (pd 0.48-2)

1.7.0: 2018 Jul 24

* updated for OF 0.10.0
* updated to latest libpd pre-0.11 (pd 0.48-1),
  note: some files have been removed, so regenerate your projects

* fixed macOS 10.13 SDK dispatch.h error
* fixed compile error due to leftover Poco/Mutex include (reported by Dan Moore)
* fixed iOS duplicate symbols link error by setting -fcommon (reported by ukelady)

1.6.1: 2017 Mar 17

* updated to latest libpd 0.10 (pd 0.47-1)
* updated readme section on externs

* fixed bad C++11 preprocessor check (reported by Mateus Knelsen)

1.6.0: 2016 May 31

  some libpd source files changed, update your projects

* added HAVE_LIBDL define for dynamic external loading on desktop

* updated to libpd 0.9.0 & pd version 0.47-0:
  - new clone object
  - expr is now BSD licensed
  - HAVE_ALLOCA_H no longer required
* updated for OF 0.9.0

* removed Poco mutex as we can now use the PdBase std::mutex with C++11

1.5.3: 2015 Nov 30

* updated to libpd 0.8.4
* ofxPd now reinits itself if the buffer size or number of channels changes in
  audioIn()/audioOut()
* pdMultiExample updates

1.5.2: 2015 Jun 16

* updated latest libpd which includes big fix for ringbuffer race condition

1.5.1: 2015 Apr 28

* updated to libpd & pd version 0.46-6 (includes new bob~ external)

* fixed examples not building correctly due to remaining polling interface code
* fixed build issue due to missing expr~ and d_fft_fftsg.c sources 

* old polling interface removed since it's no longer part of PdBase,
  use queued=true in init() & receiveMessages()/receiveMidi()

1.5.0: 2015 Feb 22

  some libpd source files changed, update your projects

* updated to latest libpd & pd version 0.46-4
* included extra externals are now loaded by default (expr, bonk~, fiddle~, etc)
* updated addons_config.mk to work with upcoming OF 0.9.0 project generator
* renamed examples and removed example project files (use the project generator)

1.4.0: 2013 Aug 13

* added PitchShifter example

* general updates for OF 0.8.0:
  * moved libpd source into libs/libpd to match ofxAddonsTemplate
  * split example into seperate desktop & ios projects (easier to generate)
  * regenerated project files
* updated to latest libpd

* built-in pd externals now work (bonk~, choice, fiddle~, loop~, lrshift~,
  pique~, sigmund~, stdout)

1.3.0: 2012 Nov 7

* added ability to open a new patch instance with an existing patch object

* updated to latest libpd
* changed logging to use "Pd" logging module

* fixed Windows hang on exit due to stuck mutex lock in ofxPd::clear()

* removed [expr~] due to licensing, should be left up to individual developers

1.2.0: 2012 Jul 30

* added support for PdBase event polling in ofxPd

1.1.0: 2012 Mar 22

* updated to latest libpd
* List::asFloat() & List::asSymbol() are now List::getFloat() & 
  List::getSymbol()

* bugfixes for Visual Studio 2010 (thanks Laurence Muller)

1.0.0: 2012 Jan 18

  streamlined api

* added List building & sending
* wrapped Pd receiver and types within a "pd" namespace
* reworked api to better match libpd Java api
  - channel is now first arg in midi functions
  - port is now first arg in raw midi byte functions
  - pgm num range is now 1-128 to match [pgmin]/[pgmout] (was 0-127)
  - destination names are now set when finishing compound messages
  - renamed "sysRT" functions to "sysRt"
  - renamed "getArrayLen" to "getArraySize"
  - renamed "*Source" functions to "subscribe" functions
  - renamed "*subscribe" functions to "receive/ignore" functions
  - renamed "ofxPdListener" class to "PdReceiver"
  - renamed "*Listener" functions to "*Receiver" functions
  - renamed Receiver functions (bangReceived, floatReceived, etc) to match
        Java Receiver (receiveBang, receiveFloat, etc)
  - split midi receiving into PdMidiReceiver base class
  - renamed "dspOn/dspOff" to "start/stop"
  - added computeAudio function
  - receivers now receive from all subscribed sources by default
  - renamed ofxPdListener and ofxPdTypes source files to PdReceiver and PdTypes
  - renamed "getArraySize" function to "arraySize"
  - renamed "setMaxMsgLength" function to "setMaxMessageLen"
  - renamed "getMaxMsgLength" function to "maxMessgeLen"
  - renamed "getBlockSize" function to "blockSize"
  - renamed "sendMsg" & "finishMsg" functions to "sendMessage" & finishMessage"
  - renamed midi funcs/objects to match java api (ie Note->NoteOn,
    Ctl->ControlChange, etc)
  - renamed "receivedPrint" function to "print"
* added receiveMidi/ignoreMidi functions to filter midi channel events for
  PdMidiReceivers
* added isInited function

* separated base libpd wrapper into PdBase class, now extended by ofxPd
  - added setReceiver and setMidiReceiver functions
  - added audio processing (processRaw, processShort, etc) functions
  - Pd class source files (PdTypes, PdReceiver, etc) have been moved to
    src/pd/cpp
* now checks if HAVE_UNISTD_H & USEAPI_DUMMY are defined before defining
* PdBase instance calls now wrapped by a PdContext singleton (global instance
  until multiple context support is added to libpd)

0.3.0: 2011 Sep 22

* added max message length setting

* updated for OF 0062
* updated to newest libpd
* merged win codeblocks branch

* cleaned Xcode projects, removed OF 0062 project

0.2.0: 2011 Aug 7

* fleshed out entire libpd api:
  - array access
  - Patch object
  - stream interface and type structs
  - receiving control functions
  - path handling in addToSearchPath()
  - ticksPerBuffer added to init()
  - etc
* sound in and out working
* added support for Linux and Codeblocks project (thanks Damian Stewart)
* added iOS example project
* added libpd source update script
* added pd external libs tutorial to readme

* now using BSD license
* updated for OF 007
* simplified some api names to match corresponding pd names (midi)
* midi channels are now numbered 1-16
* now thread safe on all platforms (thanks Damian Stewart)
* reorganized examples into AppCore class
* swapped num in and out channel arg order in init() to match ofSoundStream
* moved libpd sources to src folder
* updated example:
  - search path abs test
  - realtime scope array
  - keyboard piano
  - delay

* bugfix 0062 hangs on exit
* bugfix soundstream hang on exit
* bugfix listener bugs and print handling

* removed need for libpd static lib
* removed 'pd' function name prefix

0.1.0: 2011 Jan 24

  initial version

* added Xcode OF 007 beta project file
* added libpd as a static lib
* added message sending functions
* added message receiving functions
* audio out working
* added event listeners (thanks Marek Bereza)


================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2011-2023 Dan Wilcox <danomatika@gmail.com>
All rights reserved.

The following terms (the "Standard Improved BSD License") apply to all files
associated with the software unless explicitly disclaimed in individual files:

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above  
   copyright notice, this list of conditions and the following 
   disclaimer in the documentation and/or other materials provided
   with the distribution.
3. The name of the author may not be used to endorse or promote
   products derived from this software without specific prior 
   written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: README.md
================================================
ofxPd
=====
<p align="center">
<img src="https://raw.github.com/danomatika/ofxPd/master/ofxaddons_thumbnail.png"/>
</p>

Copyright (c) [Dan Wilcox](danomatika.com) 2011-2023

BSD Simplified License.

For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "LICENSE.txt," in this distribution.

See https://github.com/danomatika/ofxPd for documentation as well as the [OF forum post on ofxPd](http://forum.openframeworks.cc/t/ofxpd/6492)

This project has been supported by the CMU [Frank-Ratchye STUDIO for Creative Inquiry](http://studioforcreativeinquiry.org), the DU [Emergent Digital Practices Program](https://www.du.edu/ahss/edp/), and my time at the [ZKM | Hertz-Lab](https://zkm.de/en/about-the-zkm/organisation/hertz-lab).

Description
-----------

ofxPd is an Open Frameworks addon for running an instance of the Pure Data audio environment within an openFrameworks application. Audio, messages, and [MIDI](http://en.wikipedia.org/wiki/Musical_Instrument_Digital_Interface) events can be passed to and from pure data patches and the library is thread safe.

[Pure Data](http://pure-data.info) is a graphical patching environment for audio and multimedia (note: the gui and graphics features are not within the scope of this addon) 

[openFrameworks](http://www.openframeworks.cc) is a cross platform open source toolkit for creative coding in C++

Build Requirements
------------------

To use ofxPd, first you need to download and install Open Frameworks. Development is against the latest version of Open Frameworks on github. Checkout a tag if you need an earlier, stable version.

[OF github repository](https://github.com/openframeworks/openFrameworks)

On macOS, you will need to install Xcode.

On Linux, you can use the Makefile.

On Windows, Qt Creator/Msys2 are recommended as the libpd sources do not currently build in Visual Studio. However, you *can* use a libpd.dll built by MinGW in a Visual Studio project. See the "Using ofxPd with Visual Studio" section below.

Installation
------------

Place ofxPd within a folder in the apps folder of the OF dir tree:

    openframeworks/addons/ofxPd

The easiest way to do this is via cloning with git:

    cd openframeworks/addons/
    git clone git://github.com/danomatika/ofxPd.git

### Which version to use?

The master branch of ofxPd will work with the current stable version of openFrameworks and can be considered *relatively* stable.

Previous versions are tagged using [Semantic Versioning](http://semver.org) with the updates to newer versions of openFrameworks and libpd noted in the changelog, CHANGES.txt. You can select the tag in the Github "Current Branch" menu or clone and check it out using git.

If you want to use ofxPd with a previous version of openFrameworks, checkout the corresponding version tag after cloning:

    git clone git://github.com/danomatika/ofxPd.git
    cd ofxPd
    git checkout 1.5.3

Running the Example Projects
----------------------------

The example projects are in the `pdExample` & `pdExampleIOS` folders.

Project files for the examples are not included so you will need to generate the project files for your operating system and development environment using the OF ProjectGenerator which is included with the openFrameworks distribution.

To (re)generate project files for an *existing* project:

* Click the "Import" button in the ProjectGenerator
* Navigate to the project's parent folder ie. "ofxPd", select the base folder for the example project ie. "pdExample", and click the Open button
* Click the "Update" button

If everything went Ok, you should now be able to open the generated project and build/run the example.

### Notes for iOS Projects

* As of iOS 10+, you will need to manually add a NSMicrophoneUsageDescription string to the project's info plist or the app will crash immediately:
  1. Click on the blue project at the top of the Xcode file tree (ie. something like "pdExampleIOS"
  2. Click the "Info" tab in the top/middle
  3. Under "Custom iOS Target Properties", hover over the last key in the list and click the "+" button
  4. Add the following:
    - Key: NSMicrophoneUsageDescription
    - Type: string
    - Value: a description string for the app like, ie. "This app needs to use the microphone for bla bla..."
* If you use the OF release zips from openFrameworks.cc, you need the iOS zip *not* the macOS zip
* Make sure that "iOS (Xcode)" is selected in the PG's "Platforms" box

pdMultiExample & Multiple Instance Support
------------------------------------------

This special example demonstrates ofxPd's multiple-instance support, where you can run multiple separate instances of libpd concurrently.

To build and run this example, the following C *and* C++ flags must be set: `-DPDINSTANCE` & `-DPDTHREADS`. If these are not set, the example will exit early with an error.

### Makefile

For Makefile builds, these are set in `pdMultiExample/config.make`.

### Project Generator

For project files which are created with the Project Generator (ie. Xcode), uncomment the line in `addons_config.mk` under the `common` target, save, then (re)generate the project with the PG.

### Xcode

The defines can be added manually to the Xcode projects build settings: `Other C Flags` & `Other C++ Flags`.

PitchShifter
------------

PitchShifter is a simple example application which uses an OF GUI to control a pitch shifter within a PD patch. Like the basic example, you will have to generate the project files using the ProjectGenerator.

How to Create a New ofxPd Project
---------------------------------

_Note: These instructions are for manually creating a new project from an existing ofxPd project and it's project files (aka Xcode, C::B, etc). You do not need to follow these steps if you use the ProjecGenerator app in which case you *may* need to add the C Flags as the PG currently seems to have a problem doing this. See the IDE specific instructions on how to do this._

To develop your own project based on ofxPd, either generate a new project with the ProjectGenerator or generate one of the examples, copy, and rename it. You probably want to put it in your apps folder, for example, after copying:

    openFrameworks/addons/ofxPd/pdExample/ => openFrameworks/apps/myApps/pdExample/

It must be 3 levels down in the openFrameworks folder structure.

Then after renaming:

    openFrameworks/apps/myApps/myPdProject/

### For Xcode:

Rename the project in Xcode (do not rename the .xcodeproj file in Finder!): Xcode Menu->Project->Rename

Adding ofxPd to an Existing Project
-----------------------------------

_Note: These instructions are for manually add ofxPd to an existing project. You do not need to follow these steps if you use the ProjecGenerator app in which case you *may* need to add the C flags as the PG currently seems to have a problem doing this. See the IDE specific instructions on how to do this._

If you want to add ofxPd to another project, you need to make sure you include the src folder:

    openFrameworks/addons/ofxPd/src

You will also need to include some additional C flags for building the libpd source:

	-DPD -DUSEAPI_DUMMY -DPD_INTERNAL -DHAVE_UNISTD_H -DHAVE_ALLOCA_H -DLIBPD_EXTRA

_Note: **-DLIBPD_EXTRA** is optional if you do not need/use the externals in `libpd/pure-data/extra`_

If you want to build ofxPd with the libpd experimental libpd multi-instance support (ie. for pdMultiExample), add these C flags as well:

    -DPDINSTANCE -DPDTHREADS

### For Xcode:

Additional C flags are needed per-platform:
* macOS: `-DHAVE_LIBDL -DHAVE_MACHINE_ENDIAN_H -D_DARWIN_C_SOURCE`
* iOS: `-fcommon -DHAVE_MACHINE_ENDIAN_H -D_DARWIN_C_SOURCE`

* Create a new group "ofxPd" 
* Drag these directories from ofxPd into this new group: ofxPd/src
* Add a search path to: `../../../addons/ofxPd/libs/libpd/pure-data/src` under Targets->YourApp->Build->Header Search Paths (make sure "All" is selected)
* Under Targets->YourApp->Build->**Other C Flags** (make sure "All" is selected), add
	<pre>-DPD -DUSEAPI_DUMMY -DPD_INTERNAL -DHAVE_UNISTD_H -DHAVE_ALLOCA_H -DLIBPD_EXTRA</pre>
    and the additional C flags noted above
  * _Note: Make sure you use Other **C** Flags! Other **C++** Flags will **not** work since libpd is written in C._
* Under **Other C++ Flags**, add
    <pre>-DHAVE_UNISTD_H=1</pre>

### For Linux (Makefiles):

Edit addons.make in your project folder and add the following line to the end of the file:
	<pre>ofxPd</pre>

Using ofxPd with Visual Studio
------------------------------

### Visual Studio only

As of spring 2020, the libpd sources should build directly in new versions of Visual Studio. Also, ofxPd projects use the included 64 bit copy of `libwinpthread-1.dll` used for the Msys2/MinGW build, so everything should be included.

_Note: This has not been directly confirmed with OF & ofxPd. (At least no one has told me.) If you mainly use VS, try this first before building the libpd.dll via Msys2/MinGW._

### Build libpd.dll with MinGW & use with Visual Studio

In order to use libpd with ofxPd in a Visual Studio project, you need a libpd.lib and libpd.dll libraries built using MinGW (Minimal GNU for Windows) which provides a Unix command shell and compiler.

You can check if there is a pre-compiled libpd for ofxPd available here:

<http://docs.danomatika.com/releases/ofxPd/>

If so, skip to the "Adding libpd" section, otherwise follow the steps below to set up a build environment and build libpd.

#### Building libpd with Msys2/MinGW

The steps for 64 bit are basically:

1. Set up Msys2/MinGW: see https://github.com/libpd/libpd#windows
  * _Make sure to follow all steps in the Msys2 setup instructions, ie. updating packages after install_
2. Open an Msys2 shell (64 bit)
3. Build libpd: `make`
4. Install libpd to a temp folder: `make install prefix=build/libpd`

#### Adding libpd to a Visual Studio project

Replace the libpd source code in ofxPd with the libpd headers and library files:

1. Delete the ofxPd `ofxPd/libs/libpd` folder
2. Copy `libpd/build/libpd` into `ofxPd/libs`

To set up a VS project using ofxPd, you need to link to the libpd.lib import library and place the runtime libraries for libpd in your project's `bin` folder.

Add libpd.lib to link stage of the Visual Studio project:

![VS Linker properties](doc/windows_vs_linker.png)

* Set "x64" target
* Project -> Properties
* Make sure Active configuration & platform are set (you will need to do this for both Debug & Release builds)
* Configuration Properties -> Linker -> Input
* Additional Dependencies -> click on right hand drop down, choose Edit...
* Add the path libpd.lib: `$(OF_ROOT)\addons\ofxPd\libs\libpd\lib\libpd.lib`

Add the runtime libraries to the project's `bin` folder:

* `libpd/build/libpd/lib/libpd.dll`
* `libpd/libs/mingw64/libwinpthread-1.dll`

_Note: You will need to re-add libpd.lib to the VS link stage whenever you regenerate the project with the OF ProjectGenerator._

![VS project layout](doc/windows_vs_pdExample.png)

For 32 bit:

* Open an Msys2 shell (32 bit)
* Build libpd using `make`
* Set the "Win32" target in your VS project before setting the libpd.lib path
* Copy pthread from the "mingw32" folder: `libpd/libs/mingw32/libwinpthread-1.dll`

_Screenshots provided by @moebiussurfing._

### Contributing a libpd Build for Windows

If you have successfully built a new version of libpd for Windows, please consider contributing a copy for others to use.

Make a zip file with the following layout from your ofxPd directory:

~~~
bin/pd.dll
bin/libwinpthread-1.dll
libs/libpd/lib/pd.dll
libs/libpd/lib/libpd.lib
libs/libpd/lib/libpd.def
libs/libpd/include/ <-- libpd headers
~~~

Name the zip using the following format: "libpd-VER-ARCH-VS####.zip". For example,

"libpd-0.12-prerelease-x64-VS2017.zip" is a 64 bit build of libpd 0.12 (pre-release) using Visual Studio 2017.

Create an issue on the ofxPd Github repo about your new build and we can add it to the [release builds link](http://docs.danomatika.com/releases/ofxPd/).

Notes
-----

### Audio Interfacing & Debugging Audio Issues

libpd as utilized in ofxPd does not handle any of the audio interfacing itself, but is called via the ofSoundStream system within openFrameworks. If you have any issues with the sound interface / audio apis themselves, please log an issue to the [openFrameworks Github repo](https://github.com/openframeworks/openFrameworks).

### Sample Rate

The sample rate is set to 44100 when initializing ofxPd in the examples. If your sample rate is higher, the playback pitch will be higher. Make sure the sample rate is the same as your system audio sample rate to hear the correct pitch.

For example: The default sample rate on macOS is 96000. Running the app at 44100 results in double the playback pitch while initializing ofxPd at 96000 gives the correct pitch.

### Running App in the Background on iOS

If you're using ofxPd to build an audio app on iOS, you probably want the app to keep running while in the background (aka switching between other apps or going to the home screen). You can enable this in Xcode by clicking on the Project in the project tree, selecting the "Capabilities" tab, and turning on the "Background Modes" switch, then checking "Audio, Airplay and Picture in Picture". Next, Set "Application does not run in background" to NO in the "Info" tab.

### Disabling Automatic Screen Locking on iOS

You may be building an audio app for iOS that you want to run without the automatic screen locking mechanism closing it. You can disable the screen lock timer by adding the following to your ofApp setup() function:

    [[UIApplication sharedApplication] setIdleTimerDisabled:YES];

Bugs & Errors
-------------

### OF 0.12.0 and Xcode: 'ext.h' file not found

_Note: This issue is fixed in the OF 0.12.1 ProjectGenerator nightly builds._

The OF 0.12.0 ProjectGenerator seems to have an issue with setting the correct C flags. Check that the required flags specified in the "Adding ofxPd to an Existing Project" section are set in the Xcode project:

1. Click on the project in the left-hand Project Navigator
2. Under Targets->YourApp->Build->**Other C Flags** (make sure "All" is selected)
3. If the entry is empty or is missing the required flags, set them

### iOS app crashes immediately with something about "Microphone Description"

As of iOS version 10+, apps need to ask the user in order to use the camera, microphone, or location data. If you run an iOS project that uses microphone input (ie. pdExampleIOS), a text description is required or the app will be terminated by the OS.

Since the OF Project Generator (currently) doesn't know how to automatically add these description strings to the Xcode project, you will need to do it manually every time you (re)generate an iOS project.

See the steps listed in the "Running the Example Projects" section.

### Xcode: Expected value in expression dispatch.h

The macOS 10.13 SDK now requires the HAVE_UNISTD_H to define a value. This has been fixed in ofxPd's `addons_config.mk` file. You can either use the OF ProjectGenerator to regenerate the Xcode project or add the following to your project's "Other C++ Flags":

~~~
-DHAVE_UNISTD_H=1
~~~

### Pitch is off on the iPhone 6S

The iPhone 6S hardware seems to prefer a sample rate of 48000 and calling ofSoundStreamSetup() with 44100 will not change that in versions of OF 0.8.4 and previous. This means ofxPd will be running at 44100 but the audio stream is actually 48000, resulting in a higher pitch coming out of your patches and a lower pitch going in.

The fix is to follow Apple's method of setting the *preferred* sample rate, then grabbing what the *actual* sample rate is afterwards. You can then use this real value in ofSoundStreamSetup() and ofxPd::init(). The pdExampleIOS has been updated to show how to do this. Hopefully, this functionality will be added to OF in the future.

### File "tr1/memory" not found in Xcode

You just upgraded to macOS 10.9 and Xcode 5 right? The default compiler is now LLVM and you need to rebuild your Xcode project files so OF will build correctly. Use the ProjectGenerator in the OF 0.8.0 download to regenerate the project:

* Choose the _parent folder_ of your project folder
* Set the name of the project
* Add ofxPd as an add-on
* Hit generate

Also note, currently the PG doesn't seem to set the C Flags correctly, so you might have to add them manually. See "Adding ofxPd to an Existing Project" on how to do this.

### Unknown type `t_float`, etc

The compiler doesn't recognize the internal Pd types because it's missing the C Flags needed to build libpd. See the section for your IDE in "Adding ofxPd to an Existing Project" on how to do this. 

### Undefined basic_ostream in XCode

If you get the following [linker error](http://www.openframeworks.cc/forum/viewtopic.php?f=8&t=5344&p=26537&hilit=Undefined+symbol#p26537) in XCode:

    Undefined symbols: "std::basic_ostream<char, std::char_traits<char> ...

you need to change the Base SDK to 10.6: Project > Edit Project Settings

### RtAudio Hang on Exit in 0062

RtAudio will hang on app exit in OF 0062. The only way to fix this is to make a small edit to the OF 0062 core by editing `lib/openFrameworks/sound/ofSoundStream.cpp` and commenting line 143 so close() is not called.

### "verbose" redefinition in Win Codeblocks

Currently, there is a static function in the videoinput lib on Win that conflicts with a #define in the Pure Data sources. The easy fix, until the OF core is updated, is to comment out line 115 in `libs\videoInput\include\videoInput.h`.

Note: This change hasn't been tested while using the ofVideoGrabber yet ... there is a slight chance it may cause a crash, be warned.

### "undefined reference to SetDllDirectory" in Win Codeblocks

Newer versions of libpd check the windows version, so this needs to be set via a define in your Codeblocks project. If you have an old ofxPd project, this is not set, hence the error. See "Adding ofxPd to an Existing Project" above, and add the `WINVER=0x502` define to your project.
	
Adding Pure Data external libraries to ofxPd
--------------------------------------------

ofxPd only includes the standard set of Pure Data objects as found in the "Vanilla" version of Pd. If you wish to include an external library from Pd-extended, etc you need to include the source files in your project and call the library setup function after initializing ofxPd in order to load the lib.

### Adding external source files

The source files for externals included with Pd-extended can be found in the Pure Data Git repositories: <http://git.puredata.info/cgit>. Other externals may be found elsewhere, including on GitHub.

For example, if we want to include the [zexy external](http://git.puredata.info/cgit/svn2git/libraries/zexy.git/) in your project, first download the sources files from the Git repository (make sure you have git installed):

    git clone https://git.puredata.info/cgit/svn2git/libraries/zexy.git

Once cloned, the zexy sources are in `zexy/src/`. Copy the .h and .c files into your project folder. In my case I create an externals folder in the src folder of my project, something like `myProject/src/externals/zexy`. Then add these files to your project.

Note: Some libraries may require external libraries of their own and/or special compile time definitions. Make sure you read the build documentation on the external and include these with your project. 

### Calling the external setup function

In order for ofxPd to use an external library, the library has to register itself on startup. This is accomplished by calling the library's setup function which is named after the library followed by a "\_setup" suffix: "library_setup()". The zexy setup function is simply "zexy_setup()". Call this setup function after initializing ofxPd in your app's setup() function:
~~~
if(!pd.init(numOutChannels, numInChannels, sampleRate, ticksPerBuffer)) {
	OF_EXIT_APP(1);
}

// load libs
zexy_setup();

...
~~~

If all goes well, you should see some sort of print from the library as it initializes:
~~~
[zexy] part of zexy-2.2.3 (compiled: Aug  7 2011)
	Copyright (l) 1999-2008 IOhannes m zmölnig, forum::für::umläute & IEM
[&&~] part of zexy-2.2.3 (compiled: Aug  7 2011)
	Copyright (l) 1999-2008 IOhannes m zmölnig, forum::für::umläute & IEM
[.] part of zexy-2.2.3 (compiled: Aug  7 2011)
	Copyright (l) 1999-2008 IOhannes m zmölnig, forum::für::umläute & IEM
...
~~~

For C++ and some C libraries, this is all your need. The project should compile and the external load fine. However, some pure C libraries are not written with explicit C++ support in mind and, for arcane reasons best not delved into here, the C++ compiler will not be able to find the library's setup function. This is the case with zexy and the compiler error looks like this:
~~~
'zexy_setup' was not declared in this scope
~~~

In order for the C++ compiler to find the function, we need to add our own declaration. This can be done in your app .cpp file, a project header file, etc. In order to keep things organized, I create an "Externals.h" header file and place it in `myProject/src/externals`. Here I declare the "zexy_setup()" function using a special syntax:
~~~
#pragma once

extern "C" {
	void zexy_setup();
}
~~~

The `extern "C"` keywords tell the compiler to look for a pure C function, not a C++ function. Make sure to include the "Externals.h" header file where you include "ofxPd.h". Add a setup function declaration for any other externals that need it here.

### External library licensing on iOS

Apple's iOS and App Store policies forbid dynamically linking libraries. As such, you cannot include any GPL licensed externals as the GPL expressly requires dynamic linking. Submitting an app using a GPL library is in violation of the GPL and will most likely result in your app being rejected from distribution in the App Store.

GPL patches, however, are not in violation of GPL distribution policies and can be included. They are not compiled into an application binary and can be replaced by the user.

Developing ofxPd
----------------

You can help develop ofxPd on GitHub: [https://github.com/danomatika/ofxPd](https://github.com/danomatika/ofxPd)

Create an account, clone or fork the repo, then request a push/merge.

If you find any bugs or suggestions please log them to GitHub as well.


================================================
FILE: addon_config.mk
================================================
# All variables and this file are optional, if they are not present the PG and the
# makefiles will try to parse the correct values from the file system.
#
# Variables that specify exclusions can use % as a wildcard to specify that anything in
# that position will match. A partial path can also be specified to, for example, exclude
# a whole folder from the parsed paths from the file system
#
# Variables can be specified using = or +=
# = will clear the contents of that variable both specified from the file or the ones parsed
# from the file system
# += will add the values to the previous ones in the file or the ones parsed from the file 
# system
# 
# The PG can be used to detect errors in this file, just create a new project with this addon 
# and the PG will write to the console the kind of error and in which line it is

meta:
	ADDON_NAME = ofxPd
	ADDON_DESCRIPTION = Addon for running the Pure Data audio engine in an OF app
	ADDON_AUTHOR = Dan Wilcox
	ADDON_TAGS = "sound" "audio" "computer music"
	ADDON_URL = http://github.com/danomatika/ofxPd

common:
	# required for libpd
	ADDON_CFLAGS = -DPD -DUSEAPI_DUMMY -DPD_INTERNAL -DHAVE_UNISTD_H -DHAVE_ALLOCA_H -DLIBPD_EXTRA
	# uncomment this for multiple instance support, ie. for pdMultiExample
	#ADDON_CFLAGS += -DPDINSTANCE -DPDTHREADS
	# this is included directly in pd~.c, don't build twice
	ADDON_SOURCES_EXCLUDE = libs/libpd/pure-data/extra/pd~/binarymsg.c

linux64:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_ENDIAN_H

linux:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_ENDIAN_H

linuxarmv6l:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_ENDIAN_H

linuxarmv7l:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_ENDIAN_H

msys2:
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL
	# this assumes 64 bit builds only at this point...
	ADDON_DLLS_TO_COPY = libs/libpd/libs/mingw64/libwinpthread-1.dll

vs:
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL
	# this assumes 64 bit builds only at this point...
	ADDON_DLLS_TO_COPY = libs/libpd/libs/mingw64/libwinpthread-1.dll

android/armeabi:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_ENDIAN_H

android/armeabi-v7a:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_ENDIAN_H

osx:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# support dynamic loading
	ADDON_CFLAGS += -DHAVE_LIBDL -DHAVE_MACHINE_ENDIAN_H -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT
	# fix dispatch.h error with macOS SDK 10.13+
	ADDON_CPPFLAGS += -DHAVE_UNISTD_H=1

ios:
	ADDON_LIBS_EXCLUDE = libs/libpd/libs
	# set No common blocks option to avoid duplicate symbols link error
	ADDON_CFLAGS += -fcommon -DHAVE_MACHINE_ENDIAN_H -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT
	# fix dispatch.h error with macOS SDK 10.13+
	ADDON_CPPFLAGS += -DHAVE_UNISTD_H=1


================================================
FILE: doc/interface_sketch.txt
================================================

TYPES

// message primitives
Bang(string recvName)
Float(string recvName, float value)
Symbol(string recvName, string symbol)

// compound message
class List {

	public:

		unsigned int len();	// number of items
		string types();		// OSC style type string ie "fssfffs"

		// check type
		bool isFloat(int index=-1)
		bool isSymbol(int index=-1)

		// get as type
		float asFloat(int index=-1)
		string asSymbol(int index=-1)

	protected:

		List(string dest, int length, t_atom *items)

		addFloat(Float& f);
		addSymbol(Symbol& s); 

	private:

		string types;
		unsigned int length;
		t_atom *items;
};

// compound messages
StartList(string recvName)
StartMsg(string recvName, string symName)

// midi
Note(int pitch, int velocity, int channel=0)
ControlChange(int controller, int value, int channel=0)
ProgramChange(int program, int channel=0)
PitchBend(int value, int channel=0)
Aftertouch(int value, int channel=0)
PolyAftertouch(int pitch, int value, int channel=0)

// compound raw midi
StartMidi(int port=0)
StartSysex(int port=0)
StartSysexRealtime(int port=0)

// finish any compound message
Finish()



SENDING

// MESSAGES

// single messages
pd.sendBang("test");
pd.sendFloat("test", 100);
pd.sendSymbol("test", "symbol1");
pd << Bang("test") << Float("test", 100) << Symbol("test", "symbol1");

// compound messages

// send a list
//
// [ 100 292.99 c string (
// |
// [ s test (
//
pd.startList("test");
pd.addFloat(100);
pd.addFloat(292.99);
pd.addSymbol("c");
pd.addSymbol("string");
pd.finish();
pd << StartMessage("test") << 100 << 292.99 << 'c' << "string" << Finish();

// send a typed message
//
// [; pd dsp 1 (
//
pd.startMsg("pd", "dsp");
pd.addFloat(1);
pd.finish();
pd << StartMsg("pd", "dsp") << 1 << Finish();

// MIDI

// midi channels should be 1-16? ... same as patching

// note
pd.sendNote(60);
pd.sendNote(60, 100);
pd.sendNote(60, 100, 0);
pd << Note(60) << Note(60, 100) << Note(60, 100, 0);

// controls
pd << ControlChange(7, 100) << ControlChange(7, 100, 0);	// 7 - Volume
pd << ProgamChange(40) << ProgramChange(40, 0);	// 40 - Violin
pd << PitchBend(8000) << PitchBend(8000, 0);	// value -8192 to 8192
pd << Aftertouch(100) << Aftertouch(100, 0);
pd << PolyAftertouch(60, 100) << PolyAftertouch(60, 100, 0);

// raw midi
// Noteon chan 0, Middle C, velocity
pd << StartMidi() << 0x90 << 0x3c << 0x40 << FinishBytes(); 
pd << StartSysex() << 0xF0 << 0x7D << 0xF7 << FinishBytes();
pd << StartSysexRealtime() << 0xF0 << 0x7D << 0xF7 << FinishBytes();



RECEIVING

public ofxPdListener {

	public:

		void printReceived(const std::string& message) {}

		void bangReceived(string dest) {}
		void floatReceived(string dest, float value) {}
		void symbolReceived(string dest, string symbol) {}
		void listReceived(string dest, const List& list) {}
		void messageReceived(string dest, string msg, const List& list) {}
		
		void noteReceived(int channel, int pitch, int velocity) {}
		void controlChangeReceived(int channel, int controller, int val) {}
		void programChangeReceived(int channel, int program) {}
		void pitchbendReceived(int channel, int val) {}
		void aftertouchReceived(int channel, int val) {}
		void polyAftertouchReceived(int channel, int pitch, int val) {}
		
		void midiByteReceived(int port, int byte) {}
		void sysexReceived(int port, int byte) {}
		void sysexRealtimeReceived(int port, int byte) {}
};

pd.addListener(listener);	// add listener to global space
pd.addListener(listener, "source1");

pd.addSource("source1");		// add "test" source

pd.subscribe(listener, "source1");	// subscribe listener to "test",
								// adds both if not already added,
								// takes listener out of global space

pd.addSource("source2");
pd.subscribe(listener, "source2");


pd.unsubscribe(listener, "source2");

pd.unsubscribe(listener, "source1");	// unsubscribe listener to "test'


pd.unsubscribe(listener);	// unsubscribes listener from all sources, global
pd.removeListener(listener);		// removes listener from global space


ofxPdMsg msg;
msg.makeBang();
pd.sendMsg(msg);		// bang, empty message

msg.makeFloat(float);
pd.sendMsg(msg);		// float
msg.clear();

msg.

List list;
list << 100 << 292.99 << 'c' << "string";
pd.sendList("test", list);
pd.sendMsg("test", "pd", list);
pd.clear();

ofxPdBundle bundle;
bundle.add(msg);

ofxPdMidiMsg midi;
msp << StartMidi() << 0x90 << 0x3c << 0x40 << FinishBytes(); 
pd.sendMidi(midi);



================================================
FILE: doc/logo/libpd.pd
================================================
#N canvas 0 22 450 300 10;
#X obj 137 96 inlet;
#X obj 142 154 outlet;
#X obj 277 141 outlet~;
#X obj 273 94 inlet~;


================================================
FILE: doc/logo/logo.pd
================================================
#N canvas 0 22 460 266 12;
#X obj 278 125 libpd;
#X obj 154 125 openFrameworks;
#X connect 0 0 1 1;
#X connect 1 1 0 0;
#X coords 0 -1 1 1 271 71 1 100 100;


================================================
FILE: doc/logo/openFrameworks.pd
================================================
#N canvas 0 22 450 300 10;
#X obj 80 100 outlet;
#X obj 81 36 inlet;
#X obj 218 33 inlet;
#X obj 217 98 outlet;


================================================
FILE: libs/libpd/cpp/LICENSE.txt
================================================
Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>
All rights reserved.

The following terms (the "Standard Improved BSD License") apply to all
files associated with the software unless explicitly disclaimed in
individual files:

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following
   disclaimer in the documentation and/or other materials provided
   with the distribution.
3. The name of the author may not be used to endorse or promote
   products derived from this software without specific prior
   written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: libs/libpd/cpp/PdBase.hpp
================================================
/*
 * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>
 *
 * BSD Simplified License.
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd for documentation
 *
 * This file was originally written for the ofxPd openFrameworks addon:
 * https://github.com/danomatika/ofxPd
 *
 */
#pragma once

#include "z_libpd.h"
#include "z_queued.h"
#include "z_print_util.h"

#include <map>  

#include "PdTypes.hpp"
#include "PdReceiver.hpp"
#include "PdMidiReceiver.hpp"

// needed for libpd audio passing
#ifndef USEAPI_DUMMY
    #define USEAPI_DUMMY
#endif

#ifndef HAVE_UNISTD_H
    #define HAVE_UNISTD_H
#endif

#ifdef PDINSTANCE
    #define PDBASE_SETINSTANCE libpd_set_instance(instance);
#else
    #define PDBASE_SETINSTANCE
#endif

typedef struct _atom t_atom;

namespace pd {

/// a Pure Data instance
///
/// use this class directly or extend it and any of its virtual functions
///
/// by default, each PdBase instance refers to the single main libpd
/// instance so it is recommended to use only one PdBase at a time
///
/// as of version 0.13, libpd supports multiple instances if compiled with
/// PDINSTANCE defined, in which case each PdBase instance can act separately
/// with it's own PdReceiver and PdMidiReceiver
///
class PdBase {

public:

    PdBase() {
        bMsgInProgress = false;
        maxMsgLen = 32;
        curMsgLen = 0;
        msgType = MSG;
        midiPort = 0;
        receiver = NULL;
        midiReceiver = NULL;
        bInited = false;
        bQueued = false;
        libpd_init();
        #ifdef PDINSTANCE
            instance = libpd_new_instance();
        #endif
        libpd_set_instancedata(this, NULL);
    }

    virtual ~PdBase() {
        PDBASE_SETINSTANCE
        libpd_set_instancedata(NULL, NULL);
        #ifdef PDINSTANCE
            libpd_set_instance(instance);
            libpd_free_instance(instance);
        #endif
    }

/// \section Initializing Pd

    /// initialize resources and set up the audio processing
    ///
    /// set the audio latency by setting the libpd ticks per buffer:
    /// ticks per buffer * lib pd block size (always 64)
    ///
    /// ie 4 ticks per buffer * 64 = buffer len of 512
    ///
    /// you can call this again after loading patches & setting receivers
    /// in order to update the audio settings
    ///
    /// the lower the number of ticks, the faster the audio processing
    /// if you experience audio dropouts (audible clicks), increase the
    /// ticks per buffer
    ///
    /// set queued = true to use the built in ringbuffers for message and
    /// midi event passing, you will then need to call receiveMessages() and
    /// receiveMidi() in order to pass messages from the ringbuffers to your
    /// PdReceiver and PdMidiReceiver implementations
    ///
    /// the queued ringbuffers are useful when you need to receive events
    /// on a gui thread and don't want to use locking
    ///
    /// return true if inited successfully
    ///
    /// note: must be called before processing
    ///
    virtual bool init(const int numInChannels, const int numOutChannels,
                      const int sampleRate, bool queued=false) {
        PDBASE_SETINSTANCE

        // attach callbacks
        bQueued = queued;
        if(queued) {
            libpd_queued_init();

            libpd_set_queued_printhook(libpd_print_concatenator);
            libpd_set_concatenated_printhook(_print);

            libpd_set_queued_banghook(_bang);
            libpd_set_queued_floathook(_float);
            libpd_set_queued_symbolhook(_symbol);
            libpd_set_queued_listhook(_list);
            libpd_set_queued_messagehook(_message);

            libpd_set_queued_noteonhook(_noteon);
            libpd_set_queued_controlchangehook(_controlchange);
            libpd_set_queued_programchangehook(_programchange);
            libpd_set_queued_pitchbendhook(_pitchbend);
            libpd_set_queued_aftertouchhook(_aftertouch);
            libpd_set_queued_polyaftertouchhook(_polyaftertouch);
            libpd_set_queued_midibytehook(_midibyte);
        }
        else {
            libpd_set_printhook(libpd_print_concatenator);
            libpd_set_concatenated_printhook(_print);

            libpd_set_banghook(_bang);
            libpd_set_floathook(_float);
            libpd_set_symbolhook(_symbol);
            libpd_set_listhook(_list);
            libpd_set_messagehook(_message);

            libpd_set_noteonhook(_noteon);
            libpd_set_controlchangehook(_controlchange);
            libpd_set_programchangehook(_programchange);
            libpd_set_pitchbendhook(_pitchbend);
            libpd_set_aftertouchhook(_aftertouch);
            libpd_set_polyaftertouchhook(_polyaftertouch);
            libpd_set_midibytehook(_midibyte);
        }

        // init audio
        if(libpd_init_audio(numInChannels,
                            numOutChannels,
                            sampleRate) != 0) {
            return false;
        }
        bInited = true;

        return bInited;
    }

    /// clear resources
    virtual void clear() {
        PDBASE_SETINSTANCE

        // detach callbacks
        if(bInited) {
            computeAudio(false);
            if(bQueued) {
                libpd_set_queued_printhook(NULL);
                libpd_set_concatenated_printhook(NULL);

                libpd_set_queued_banghook(NULL);
                libpd_set_queued_floathook(NULL);
                libpd_set_queued_symbolhook(NULL);
                libpd_set_queued_listhook(NULL);
                libpd_set_queued_messagehook(NULL);

                libpd_set_queued_noteonhook(NULL);
                libpd_set_queued_controlchangehook(NULL);
                libpd_set_queued_programchangehook(NULL);
                libpd_set_queued_pitchbendhook(NULL);
                libpd_set_queued_aftertouchhook(NULL);
                libpd_set_queued_polyaftertouchhook(NULL);
                libpd_set_queued_midibytehook(NULL);

                libpd_queued_release();
            }
            else {
                libpd_set_printhook(NULL);
                libpd_set_concatenated_printhook(NULL);

                libpd_set_banghook(NULL);
                libpd_set_floathook(NULL);
                libpd_set_symbolhook(NULL);
                libpd_set_listhook(NULL);
                libpd_set_messagehook(NULL);

                libpd_set_noteonhook(NULL);
                libpd_set_controlchangehook(NULL);
                libpd_set_programchangehook(NULL);
                libpd_set_pitchbendhook(NULL);
                libpd_set_aftertouchhook(NULL);
                libpd_set_polyaftertouchhook(NULL);
                libpd_set_midibytehook(NULL);
            }
        }
        bInited = false;
        bQueued = false;

        bMsgInProgress = false;
        curMsgLen = 0;
        msgType = MSG;
        midiPort = 0;

        unsubscribeAll();
    }

/// \section Adding Search Paths

    /// add to the pd search path
    /// takes an absolute or relative path (in data folder)
    ///
    /// note: fails silently if path not found
    ///
    virtual void addToSearchPath(const std::string &path) {
        PDBASE_SETINSTANCE
        libpd_add_to_search_path(path.c_str());
    }

    /// clear the current pd search path
    virtual void clearSearchPath() {
        PDBASE_SETINSTANCE
        libpd_clear_search_path();
    }

/// \section Opening Patches

    /// open a patch file (aka somefile.pd) at a specified parent dir path
    /// returns a pd::Patch object
    ///
    /// use pd::Patch::isValid() to check if a patch was opened successfully:
    ///
    ///     pd::Patch p1 = pd.openPatch("somefile.pd", "/some/dir/path/");
    ///     if(!p1.isValid()) {
    ///         std::cout << "aww ... p1 couldn't be opened" << std::endl;
    ///     }
    virtual pd::Patch openPatch(const std::string &patch,
                                const std::string &path) {
        PDBASE_SETINSTANCE
        // [; pd open file folder(
        void *handle = libpd_openfile(patch.c_str(), path.c_str());
        if(handle == NULL) {
            return Patch(); // return empty Patch
        }
        int dollarZero = libpd_getdollarzero(handle);
        return Patch(handle, dollarZero, patch, path);
    }

    /// open a patch file using the filename and path of an existing patch
    ///
    /// set the filename within the patch object or use a previously opened
    /// object
    ///
    ///     // open an instance of "somefile.pd"
    ///     pd::Patch p2("somefile.pd", "/some/path"); // set file and path
    ///     pd.openPatch(p2);
    ///
    ///     // open a new instance of "somefile.pd"
    ///     pd::Patch p3 = pd.openPatch(p2);
    ///
    ///     // p2 and p3 refer to 2 different instances of "somefile.pd"
    ///
    virtual pd::Patch openPatch(pd::Patch &patch) {
        return openPatch(patch.filename(), patch.path());
    }

    /// close a patch file
    /// takes only the patch's basename (filename without extension)
    virtual void closePatch(const std::string &patch) {
        PDBASE_SETINSTANCE
        // [; pd-name menuclose 1(
        std::string patchname = (std::string)"pd-" + patch;
        libpd_start_message(1);
        libpd_add_float(1);
        libpd_finish_message(patchname.c_str(), "menuclose");
    }

    /// close a patch file, takes a patch object
    /// note: clears the given Patch object
    virtual void closePatch(pd::Patch &patch) {
        if(!patch.isValid()) {
            return;
        }
        PDBASE_SETINSTANCE
        libpd_closefile(patch.handle());
        patch.clear();
    }

/// \section Audio Processing
///
/// one of these must be called for audio dsp and message io to occur
///
/// inBuffer must be an array of the right size and never null
/// use inBuffer = new type[0] if no input is desired
///
/// outBuffer must be an array of size outBufferSize from openAudio call
///
/// note: raw does not interlace the buffers
///

    /// process float buffers for a given number of ticks
    /// returns false on error
    bool processFloat(int ticks, const float *inBuffer, float *outBuffer) {
        PDBASE_SETINSTANCE
        return libpd_process_float(ticks, inBuffer, outBuffer) == 0;
    }

    /// process short buffers for a given number of ticks
    /// returns false on error
    bool processShort(int ticks, const short *inBuffer, short *outBuffer) {
        PDBASE_SETINSTANCE
        return libpd_process_short(ticks, inBuffer, outBuffer) == 0;
    }

    /// process double buffers for a given number of ticks
    /// returns false on error
    bool processDouble(int ticks, const double *inBuffer, double *outBuffer) {
        PDBASE_SETINSTANCE
        return libpd_process_double(ticks, inBuffer, outBuffer) == 0;
    }

    /// process one pd tick, writes raw float data to/from buffers
    /// returns false on error
    bool processRaw(const float *inBuffer, float *outBuffer) {
        PDBASE_SETINSTANCE
        return libpd_process_raw(inBuffer, outBuffer) == 0;
    }

    /// process one pd tick, writes raw short data to/from buffers
    /// returns false on error
    bool processRawShort(const short *inBuffer, short *outBuffer) {
        PDBASE_SETINSTANCE
        return libpd_process_raw_short(inBuffer, outBuffer) == 0;
    }

    /// process one pd tick, writes raw double data to/from buffers
    /// returns false on error
    bool processRawDouble(const double *inBuffer, double *outBuffer) {
        PDBASE_SETINSTANCE
        return libpd_process_raw_double(inBuffer, outBuffer) == 0;
    }

/// \section Audio Processing Control

    /// start/stop audio processing
    ///
    /// in general, once started, you won't need to turn off audio
    ///
    /// shortcut for [; pd dsp 1( & [; pd dsp 0(
    ///
    virtual void computeAudio(bool state) {
        PDBASE_SETINSTANCE
        // [; pd dsp $1(
        libpd_start_message(1);
        libpd_add_float((float) state);
        libpd_finish_message("pd", "dsp");
    }

/// \section Message Receiving


    /// subscribe to messages sent by a pd send source
    ///
    /// aka this like a virtual pd receive object
    ///
    ///     [r source]
    ///     |
    ///
    virtual void subscribe(const std::string &source) {
        if(exists(source)) {
            std::cerr << "Pd: unsubscribe: ignoring duplicate source"
                      << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        void *pointer = libpd_bind(source.c_str());
        if(pointer != NULL) {
            sources.insert(std::pair<std::string,void*>(source, pointer));
        }
    }

    /// unsubscribe from messages sent by a pd send source
    virtual void unsubscribe(const std::string &source) {
        std::map<std::string,void*>::iterator iter;
        iter = sources.find(source);
        if(iter == sources.end()) {
            std::cerr << "Pd: unsubscribe: ignoring unknown source"
                      << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_unbind(iter->second);
        sources.erase(iter);
    }

    /// is a pd send source subscribed?
    virtual bool exists(const std::string &source) {
        PDBASE_SETINSTANCE
        if(sources.find(source) != sources.end()) {
            return true;
        }
        return false;
    }

    //// receivers will be unsubscribed from *all* pd send sources
    virtual void unsubscribeAll() {
        PDBASE_SETINSTANCE
        std::map<std::string,void*>::iterator iter;
        for(iter = sources.begin(); iter != sources.end(); ++iter) {
            libpd_unbind(iter->second);
        }
        sources.clear();
    }

/// \section Receiving from the Message Queues
///
/// process the internal message queue if using the ringbuffer
///
/// internally, libpd will use a ringbuffer to pass messages & midi without
/// needing to require locking if you call init() with queued = true
///
/// call these in a loop somewhere in order to receive waiting messages
/// or midi data which are then sent to your PdReceiver & PdMidiReceiver
///
/// *do not* use if inited with queued = false

    /// process waiting messages
    virtual void receiveMessages() {
        PDBASE_SETINSTANCE
        libpd_queued_receive_pd_messages();
    }

    /// process waiting midi messages
    virtual void receiveMidi() {
        PDBASE_SETINSTANCE
        libpd_queued_receive_midi_messages();
    }

/// \section Event Receiving via Callbacks

    /// set the incoming event receiver, disables the event queue
    ///
    /// automatically receives from all currently subscribed sources
    ///
    /// set this to NULL to disable callback receiving and re-enable the
    /// event queue
    ///
    void setReceiver(pd::PdReceiver *receiver) {
        this->receiver = receiver;
    }

/// \section Midi Receiving via Callbacks

    /// set the incoming midi event receiver, disables the midi queue
    ///
    /// automatically receives from all midi channels
    ///
    /// set this to NULL to disable midi events and re-enable the midi queue
    ///
    void setMidiReceiver(pd::PdMidiReceiver *midiReceiver) {
        this->midiReceiver = midiReceiver;
    }

/// \section Send Functions

    /// send a bang message
    virtual void sendBang(const std::string &dest) {
        PDBASE_SETINSTANCE
        libpd_bang(dest.c_str());
    }

    /// send a float
    virtual void sendFloat(const std::string &dest, float value) {
        PDBASE_SETINSTANCE
        libpd_float(dest.c_str(), value);
    }

    /// send a symbol
    virtual void sendSymbol(const std::string &dest,
                            const std::string &symbol) {
        PDBASE_SETINSTANCE
        libpd_symbol(dest.c_str(), symbol.c_str());
    }

/// \section Sending Compound Messages
///
///     pd.startMessage();
///     pd.addSymbol("hello");
///     pd.addFloat(1.23);
///     pd.finishList("test"); // "test" is the receiver name in pd
///
/// sends [list hello 1.23( -> [r test],
/// you will need to use the [list trim] object on the receiving end
///
/// finishMsg sends a typed message -> [; test msg1 hello 1.23(
///
///     pd.startMessage();
///     pd.addSymbol("hello");
///     pd.addFloat(1.23);
///     pd.finishMessage("test", "msg1");
///

    /// start a compound list or message
    virtual void startMessage() {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot start message, message in progress"
                      << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        if(libpd_start_message(maxMsgLen) == 0) {
            bMsgInProgress = true;
            msgType = MSG;
        }
    }

    /// add a float to the current compound list or message
    virtual void addFloat(const float num) {
        if(!bMsgInProgress) {
            std::cerr << "Pd: cannot add float, message not in progress"
                      << std::endl;
            return;
        }
        if(msgType != MSG) {
            std::cerr << "Pd: cannot add float, midi byte stream in progress"
                      << std::endl;
            return;
        }
        if(curMsgLen+1 >= maxMsgLen) {
            std::cerr << "Pd: cannot add float, max message len of "
                      << maxMsgLen << " reached" << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_add_float(num);
        curMsgLen++;
    }

    /// add a symbol to the current compound list or message
    virtual void addSymbol(const std::string &symbol) {
        if(!bMsgInProgress) {
            std::cerr << "Pd: cannot add symbol, message not in progress"
                      << std::endl;
            return;
        }
        if(msgType != MSG) {
            std::cerr << "Pd: cannot add symbol, midi byte stream in progress"
                      << std::endl;
            return;
        }
        if(curMsgLen+1 >= maxMsgLen) {
            std::cerr << "Pd: cannot add symbol, max message len of "
                      << maxMsgLen << " reached" << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_add_symbol(symbol.c_str());
        curMsgLen++;
    }

    /// finish and send as a list
    virtual void finishList(const std::string &dest) {
        if(!bMsgInProgress) {
            std::cerr << "Pd: cannot finish list, "
                      << "message not in progress" << std::endl;
            return;
        }
        if(msgType != MSG) {
            std::cerr << "Pd: cannot finish list, "
                      << "midi byte stream in progress" << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_finish_list(dest.c_str());
        bMsgInProgress = false;
        curMsgLen = 0;
    }

    /// finish and send as a list with a specific message name
    virtual void finishMessage(const std::string &dest,
                               const std::string &msg) {
        if(!bMsgInProgress) {
            std::cerr << "Pd: cannot finish message, "
                      << "message not in progress" << std::endl;
            return;
        }
        if(msgType != MSG) {
            std::cerr << "Pd: cannot finish message, "
                      << "midi byte stream in progress" << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_finish_message(dest.c_str(), msg.c_str());
        bMsgInProgress = false;
        curMsgLen = 0;
    }

    /// send a list using the pd::List type
    ///
    ///     pd::List list;
    ///     list.addSymbol("hello");
    ///     list.addFloat(1.23);
    ///     pd.sendList("test", list);
    ///
    /// sends [list hello 1.23( -> [r test]
    ///
    /// stream operators work as well:
    ///
    ///     list << "hello" << 1.23;
    ///     pd.sendList("test", list);
    ///
    virtual void sendList(const std::string &dest, const pd::List &list) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot send list, message in progress"
                      << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_start_message(list.len());
        bMsgInProgress = true;
        // step through list
        for(int i = 0; i < (int)list.len(); ++i) {
            if(list.isFloat(i))
                addFloat(list.getFloat(i));
            else if(list.isSymbol(i))
                addSymbol(list.getSymbol(i));
        }
        finishList(dest);
    }

    /// send a message using the pd::List type
    ///
    ///     pd::List list;
    ///     list.addSymbol("hello");
    ///     list.addFloat(1.23);
    ///     pd.sendMessage("test", "msg1", list);
    ///
    /// sends a typed message -> [; test msg1 hello 1.23(
    ///
    /// stream operators work as well:
    ///
    //      list << "hello" << 1.23;
    ///     pd.sendMessage("test", "msg1", list);
    ///
    virtual void sendMessage(const std::string &dest,
                             const std::string &msg,
                             const pd::List &list = pd::List()) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot send message, message in progress"
                      << std::endl;
            return;
        }
        PDBASE_SETINSTANCE
        libpd_start_message(list.len());
        bMsgInProgress = true;
        // step through list
        for(int i = 0; i < (int)list.len(); ++i) {
            if(list.isFloat(i))
                addFloat(list.getFloat(i));
            else if(list.isSymbol(i))
                addSymbol(list.getSymbol(i));
        }
        finishMessage(dest, msg);
    }

/// \section Sending MIDI
///
/// any out of range messages will be silently ignored
///
/// number ranges:
/// * channel             0 - 15 * dev# (dev #0: 0-15, dev #1: 16-31, etc)
/// * pitch               0 - 127
/// * velocity            0 - 127
/// * controller value    0 - 127
/// * program value       0 - 127
/// * bend value          -8192 - 8191
/// * touch value         0 - 127
///

    /// send a MIDI note on
    ///
    /// pd does not use note off MIDI messages, so send a note on with vel = 0
    ///
    virtual void sendNoteOn(const int channel,
                            const int pitch,
                            const int velocity=64) {
        PDBASE_SETINSTANCE
        libpd_noteon(channel, pitch, velocity);
    }

    /// send a MIDI control change
    virtual void sendControlChange(const int channel,
                                   const int controller,
                                   const int value) {
        PDBASE_SETINSTANCE
        libpd_controlchange(channel, controller, value);
    }

    /// send a MIDI program change
    virtual void sendProgramChange(const int channel, const int value) {
        PDBASE_SETINSTANCE
        libpd_programchange(channel, value);
    }

    /// send a MIDI pitch bend
    ///
    /// in pd: [bendin] takes 0 - 16383 while [bendout] returns -8192 - 8192
    ///
    virtual void sendPitchBend(const int channel, const int value) {
        PDBASE_SETINSTANCE
        libpd_pitchbend(channel, value);
    }

    /// send a MIDI aftertouch
    virtual void sendAftertouch(const int channel, const int value) {
        PDBASE_SETINSTANCE
        libpd_aftertouch(channel, value);
    }

    /// send a MIDI poly aftertouch
    virtual void sendPolyAftertouch(const int channel,
                                    const int pitch,
                                    const int value) {
        PDBASE_SETINSTANCE
        libpd_polyaftertouch(channel, pitch, value);
    }

    /// send a raw MIDI byte
    ///
    /// value is a raw midi byte value 0 - 255
    /// port is the raw portmidi port #, similar to a channel
    ///
    /// for some reason, [midiin], [sysexin] & [realtimein] add 2 to the
    /// port num, so sending to port 1 in PdBase returns port 3 in pd
    ///
    /// however, [midiout], [sysexout], & [realtimeout] do not add to the
    /// port num, so sending port 1 to [midiout] returns port 1 in PdBase
    ///
    virtual void sendMidiByte(const int port, const int value) {
        PDBASE_SETINSTANCE
        libpd_midibyte(port, value);
    }

    /// send a raw MIDI sysex byte
    virtual void sendSysex(const int port, const int value) {
        PDBASE_SETINSTANCE
        libpd_sysex(port, value);
    }

    /// send a raw MIDI realtime byte
    virtual void sendSysRealTime(const int port, const int value) {
        PDBASE_SETINSTANCE
        libpd_sysrealtime(port, value);
    }

/// \section Stream Interface
///
/// single messages
///
///     pd << Bang("test"); /// "test" is the receiver name in pd
///     pd << Float("test", 100);
///     pd << Symbol("test", "a symbol");
///

    /// send a bang message
    PdBase& operator<<(const pd::Bang &var) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot send Bang, message in progress"
                      << std::endl;
            return *this;
        }
        sendBang(var.dest.c_str());
        return *this;
    }

    /// send a float message
    PdBase& operator<<(const pd::Float &var) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot send Float, message in progress"
                      << std::endl;
            return *this;
        }
        sendFloat(var.dest.c_str(), var.num);
        return *this;
    }

    /// send a symbol message
    PdBase& operator<<(const pd::Symbol &var) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot send Symbol, message in progress"
                      << std::endl;
            return *this;
        }
        sendSymbol(var.dest.c_str(), var.symbol.c_str());
        return *this;
    }

/// \section Stream Interface for Compound Messages
///
/// pd << pd::StartMessage() << 100 << 1.2 << "a symbol" << pd::FinishList("test");
///

    /// start a compound message
    PdBase& operator<<(const pd::StartMessage &) {
        startMessage();
        return *this;
    }

    /// finish a compound message and send it as a list
    PdBase& operator<<(const pd::FinishList &var) {
        finishList(var.dest);
        return *this;
    }

    /// finish a compound message and send it as a message
    PdBase& operator<<(const pd::FinishMessage &var) {
        finishMessage(var.dest, var.msg);
        return *this;
    }

    // add a boolean as a float to the compound message
    PdBase& operator<<(const bool var) {
        addFloat((float) var);
        return *this;
    }

    // add an integer as a float to the compound message
    PdBase& operator<<(const int var) {
        switch(msgType) {
            case MSG:
                addFloat((float) var);
                break;
            case MIDI:
                sendMidiByte(midiPort, var);
                break;
            case SYSEX:
                sendSysex(midiPort, var);
                break;
            case SYSRT:
                sendSysRealTime(midiPort, var);
                break;
        }
        return *this;
    }

    // add a float to the compound message
    PdBase& operator<<(const float var) {
        addFloat((float) var);
        return *this;
    }

    // add a double as a float to the compound message
    PdBase& operator<<(const double var) {
        addFloat((float) var);
        return *this;
    }

    // add a character as a symbol to the compound message
    PdBase& operator<<(const char var) {
        std::string s;
        s = var;
        addSymbol(s);
        return *this;
    }

    // add a C-string char buffer as a symbol to the compound message
    PdBase& operator<<(const char *var) {
        addSymbol((std::string)var);
        return *this;
    }

    // add a string as a symbol to the compound message
    PdBase& operator<<(const std::string &var) {
        addSymbol(var);
        return *this;
    }

/// \section Stream Interface for MIDI
///
/// pd << pd::NoteOn(64) << NoteOn(64, 60) << pd::NoteOn(64, 60, 1);
/// pd << pd::ControlChange(100, 64) << pd::ProgramChange(100, 1);
/// pd << pd::Aftertouch(127, 1) << pd::PolyAftertouch(64, 127, 1);
/// pd << pd::PitchBend(2000, 1);
///

    /// send a MIDI note on
    PdBase& operator<<(const pd::NoteOn &var) {
        sendNoteOn(var.channel, var.pitch, var.velocity);
        return *this;
    }

    /// send a MIDI control change
    PdBase& operator<<(const pd::ControlChange &var) {
        sendControlChange(var.channel, var.controller, var.value);
        return *this;
    }

    /// send a MIDI program change
    PdBase& operator<<(const pd::ProgramChange &var) {
        sendProgramChange(var.channel, var.value);
        return *this;
    }

    /// send a MIDI pitch bend
    PdBase& operator<<(const pd::PitchBend &var) {
        sendPitchBend(var.channel, var.value);
        return *this;
    }

    /// send a MIDI aftertouch
    PdBase& operator<<(const pd::Aftertouch &var) {
        sendAftertouch(var.channel, var.value);
        return *this;
    }

    /// send a MIDI poly aftertouch
    PdBase& operator<<(const pd::PolyAftertouch &var) {
        sendPolyAftertouch(var.channel, var.pitch, var.value);
        return *this;
    }

/// \section Stream Interface for Raw Bytes
///
/// pd << pd::StartMidi() << 0xEF << 0x45 << pd::Finish();
/// pd << pd::StartSysex() << 0xE7 << 0x45 << 0x56 << 0x17 << pd::Finish();
///

    /// start a raw byte MIDI message
    PdBase& operator<<(const pd::StartMidi &var) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot start MidiByte stream, "
                      << "message in progress" << std::endl;
            return *this;
        }
        bMsgInProgress = true;
        msgType = MIDI;
        midiPort = var.port;
        return *this;
    }

    /// start a raw byte MIDI sysex message
    PdBase& operator<<(const pd::StartSysex &var) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot start Sysex stream, "
                      << "message in progress" << std::endl;
            return *this;
        }
        bMsgInProgress = true;
        msgType = SYSEX;
        midiPort = var.port;
        return *this;
    }

    /// start a raw byte MIDI realtime message
    PdBase& operator<<(const pd::StartSysRealTime &var) {
        if(bMsgInProgress) {
            std::cerr << "Pd: cannot start SysRealRime stream, "
                      << "message in progress" << std::endl;
            return *this;
        }
        bMsgInProgress = true;
        msgType = SYSRT;
        midiPort = var.port;
        return *this;
    }

    /// finish and send a raw byte MIDI message
    PdBase& operator<<(const pd::Finish &) {
        if(!bMsgInProgress) {
            std::cerr << "Pd: cannot finish midi byte stream, "
                      << "stream not in progress" << std::endl;
            return *this;
        }
        if(msgType == MSG) {
            std::cerr << "Pd: cannot finish midi byte stream, "
                      << "message in progress" << std::endl;
            return *this;
        }
        bMsgInProgress = false;
        curMsgLen = 0;
        return *this;
    }

    /// is a message or byte stream currently in progress?
    bool isMessageInProgress() {
        return bMsgInProgress;
    }

/// \section Array Access

    /// get the size of a pd array
    /// returns 0 if array not found
    int arraySize(const std::string &name) {
        PDBASE_SETINSTANCE
        int len = libpd_arraysize(name.c_str());
        if(len < 0) {
            std::cerr << "Pd: cannot get size of unknown array \""
                      << name << "\"" << std::endl;
            return 0;
        }
        return len;
    }

    /// (re)size a pd array
    /// sizes <= 0 are clipped to 1
    /// returns true on success, false on failure
    bool resizeArray(const std::string &name, long size) {
        PDBASE_SETINSTANCE
        int ret = libpd_resize_array(name.c_str(), size);
        if(ret < 0) {
            std::cerr << "Pd: cannot resize unknown array \"" << name << "\""
                      << std::endl;
            return false;
        }
        return true;
    }

    /// read from a pd array
    ///
    /// resizes given vector to readLen, checks readLen and offset
    ///
    /// returns true on success, false on failure
    ///
    /// calling without setting readLen and offset reads the whole array:
    ///
    /// std::vector<float> array1;
    /// readArray("array1", array1);
    ///
    virtual bool readArray(const std::string &name,
                           std::vector<float> &dest,
                           int readLen=-1, int offset=0) {
        PDBASE_SETINSTANCE
        int len = libpd_arraysize(name.c_str());
        if(len < 0) {
            std::cerr << "Pd: cannot read unknown array \"" << name << "\""
                      << std::endl;
            return false;
        }
        // full array len?
        if(readLen < 0) {
            readLen = len;
        }
        // check read len
        else if(readLen > len) {
            std::cerr << "Pd: given read len " << readLen << " > len "
                      << len << " of array \"" << name << "\"" << std::endl;
            return false;
        }
        // check offset
        if(offset + readLen > len) {
            std::cerr << "Pd: given read len and offset > len " << readLen
                      << " of array \"" << name << "\"" << std::endl;
            return false;
        }
        // resize if necessary
        if(dest.size() != (std::size_t)readLen) {
            dest.resize(readLen, 0);
        }
        if(libpd_read_array(&dest[0], name.c_str(), offset, readLen) < 0) {
            std::cerr << "Pd: libpd_read_array failed for array \""
                      << name << "\"" << std::endl;
            return false;
        }
        return true;
    }

    /// write to a pd array
    ///
    /// calling without setting writeLen and offset writes the whole array:
    ///
    /// writeArray("array1", array1);
    ///
    virtual bool writeArray(const std::string &name,
                            std::vector<float> &source,
                            int writeLen=-1, int offset=0) {
        PDBASE_SETINSTANCE
        int len = libpd_arraysize(name.c_str());
        if(len < 0) {
            std::cerr << "Pd: cannot write to unknown array \"" << name << "\""
                      << std::endl;
            return false;
        }

        // full array len?
        if(writeLen < 0) {
            writeLen = len;
        }

        // check write len
        else if(writeLen > len) {
            std::cerr << "Pd: given write len " << writeLen << " > len " << len
                      << " of array \"" << name << "\"" << std::endl;
            return false;
        }

        // check offset
        if(offset+writeLen > len) {
            std::cerr << "Pd: given write len and offset > len " << writeLen
                      << " of array \"" << name << "\"" << std::endl;
            return false;
        }

        if(libpd_write_array(name.c_str(), offset,
                             &source[0], writeLen) < 0) {
            std::cerr << "Pd: libpd_write_array failed for array \""
                      << name << "\"" << std::endl;
            return false;
        }
        return true;
    }

    /// clear array and set to a specific value
    virtual void clearArray(const std::string &name, int value=0) {
        PDBASE_SETINSTANCE
        int len = libpd_arraysize(name.c_str());
        if(len < 0) {
            std::cerr << "Pd: cannot clear unknown array \""
                      << name << "\"" << std::endl;
            return;
        }
        std::vector<float> array;
        array.resize(len, value);
        if(libpd_write_array(name.c_str(), 0, &array[0], len) < 0) {
            std::cerr << "Pd: libpd_write_array failed while clearing array \""
                      << name << "\"" << std::endl;
        }
    }

/// \section Utils

    /// has the global pd instance been initialized?
    bool isInited() {
        return bInited;
    }

    /// is the global pd instance using the ringbuffer queue
    /// for message padding?
    bool isQueued() {
        return bQueued;
    }

    /// get the blocksize of pd (sample length per channel)
    static int blockSize() {
        return libpd_blocksize();
    }

    /// set the max length of messages and lists, default: 32
    void setMaxMessageLen(unsigned int len) {
        maxMsgLen = len;
    }

    /// get the max length of messages and lists
    unsigned int maxMessageLen() {
        return maxMsgLen;
    }

    /// get the pd instance pointer
    /// returns main instance when libpd is not compiled with PDINSTANCE
    t_pdinstance *instancePtr() {
        #ifdef PDINSTANCE
            return instance;
        #endif
        return libpd_main_instance();
    }

    /// get the number of pd instances, including the main instance
    /// returns number or 1 when libpd is not compiled with PDINSTANCE
    static int numInstances() {
        return libpd_num_instances();
    }

protected:

    /// compound message status
    enum MsgType {
        MSG,
        MIDI,
        SYSEX,
        SYSRT
    };

/// \section Variables

    bool bMsgInProgress;    ///< is a compound message being constructed?
    int maxMsgLen;          ///< maximum allowed message length
    int curMsgLen;          ///< the length of the current message

    /// compound message status
    PdBase::MsgType msgType;

    int midiPort;   ///< target midi port

    std::map<std::string,void*> sources; ///< subscribed sources

    pd::PdReceiver *receiver;            ///< the message receiver
    pd::PdMidiReceiver *midiReceiver;    ///< the midi receiver

#ifdef PDINSTANCE
    t_pdinstance *instance; ///< instance pointer
#endif

protected:

    bool bInited; ///< is this pd instance inited?
    bool bQueued; ///< is this instance using the libpd_queued ringbuffer?

    // libpd static callback functions
    static void _print(const char *s) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->receiver) {
            base->receiver->print((std::string)s);
        }
    }

    static void _bang(const char *source) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->receiver) {
            base->receiver->receiveBang((std::string)source);
        }
    }

    static void _float(const char *source, float value) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->receiver) {
            base->receiver->receiveFloat((std::string)source, value);
        }
    }

    static void _symbol(const char *source, const char *symbol) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->receiver) {
            base->receiver->receiveSymbol((std::string)source,
                                          (std::string)symbol);
        }
    }

    static void _list(const char *source, int argc, t_atom *argv) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        pd::List list;
        for(int i = 0; i < argc; i++) {
            t_atom a = argv[i];
            if(a.a_type == A_FLOAT) {
                float f = a.a_w.w_float;
                list.addFloat(f);
            }
            else if(a.a_type == A_SYMBOL) {
                const char *s = a.a_w.w_symbol->s_name;
                list.addSymbol((std::string)s);
            }
        }
        if(base->receiver) {
            base->receiver->receiveList((std::string)source, list);
        }
    }

    static void _message(const char *source, const char *symbol,
                         int argc, t_atom *argv) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        pd::List list;
        for(int i = 0; i < argc; i++) {
            t_atom a = argv[i];
            if(a.a_type == A_FLOAT) {
                float f = a.a_w.w_float;
                list.addFloat(f);
            }
            else if(a.a_type == A_SYMBOL) {
                const char *s = a.a_w.w_symbol->s_name;
                list.addSymbol((std::string)s);
            }
        }
        if(base->receiver) {
            base->receiver->receiveMessage((std::string)source,
                                           (std::string)symbol, list);
        }
    }

    static void _noteon(int channel, int pitch, int velocity) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receiveNoteOn(channel, pitch, velocity);
        }
    }

    static void _controlchange(int channel, int controller, int value) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receiveControlChange(channel,
                                                     controller,
                                                     value);
        }
    }

    static void _programchange(int channel, int value) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receiveProgramChange(channel, value);
        }
    }

    static void _pitchbend(int channel, int value) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receivePitchBend(channel, value);
        }
    }

    static void _aftertouch(int channel, int value) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receiveAftertouch(channel, value);
        }
    }

    static void _polyaftertouch(int channel, int pitch, int value) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receivePolyAftertouch(channel,
                                                      pitch,
                                                      value);
        }
    }

    static void _midibyte(int port, int byte) {
        PdBase *base = (PdBase *)libpd_get_instancedata();
        if(base->midiReceiver) {
            base->midiReceiver->receiveMidiByte(port, byte);
        }
    }
};

} // namespace


================================================
FILE: libs/libpd/cpp/PdMidiReceiver.hpp
================================================
/*
 * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>
 *
 * BSD Simplified License.
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd for documentation
 *
 * This file was originally written for the ofxPd openFrameworks addon:
 * https://github.com/danomatika/ofxPd
 *
 */
#pragma once

namespace pd {

/// a pd MIDI receiver base class
class PdMidiReceiver {

public:

    virtual ~PdMidiReceiver() {}

    /// receive a MIDI note on
    virtual void receiveNoteOn(const int /*channel*/,
                               const int /*pitch*/,
                               const int /*velocity*/) {}

    /// receive a MIDI control change
    virtual void receiveControlChange(const int /*channel*/,
                                      const int /*controller*/,
                                      const int /*value*/) {}

    /// receive a MIDI program change,
    /// note: pgm value is 1-128
    virtual void receiveProgramChange(const int /*channel*/, const int /*value*/) {}

    /// receive a MIDI pitch bend
    virtual void receivePitchBend(const int /*channel*/, const int /*value*/) {}

    /// receive a MIDI aftertouch message
    virtual void receiveAftertouch(const int /*channel*/, const int /*value*/) {}

    /// receive a MIDI poly aftertouch message
    virtual void receivePolyAftertouch(const int /*channel*/,
                                       const int /*pitch*/,
                                       const int /*value*/) {}

    /// receive a raw MIDI byte (sysex, realtime, etc)
    virtual void receiveMidiByte(const int /*port*/, const int /*byte*/) {}
};

} // namespace


================================================
FILE: libs/libpd/cpp/PdReceiver.hpp
================================================
/*
 * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>
 *
 * BSD Simplified License.
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd for documentation
 *
 * This file was originally written for the ofxPd openFrameworks addon:
 * https://github.com/danomatika/ofxPd
 *
 */
#pragma once

#include "PdTypes.hpp"

namespace pd {

/// a pd message receiver base class
class PdReceiver {

public:

    virtual ~PdReceiver() {}

    /// receive a print
    virtual void print(const std::string &/*message*/) {}

    /// receive a bang
    virtual void receiveBang(const std::string &/*dest*/) {}

    /// receive a float
    virtual void receiveFloat(const std::string &/*dest*/, float /*num*/) {}

    /// receive a symbol
    virtual void receiveSymbol(const std::string &/*dest*/,
                               const std::string &/*symbol*/) {}

    /// receive a list
    virtual void receiveList(const std::string &/*dest*/, const pd::List &/*list*/) {}

    /// receive a named message ie. sent from a message box like:
    /// [; dest msg arg1 arg2 arg3(
    virtual void receiveMessage(const std::string &/*dest*/,
                                const std::string &/*msg*/,
                                const pd::List &/*list*/) {}
};

} // namespace


================================================
FILE: libs/libpd/cpp/PdTypes.hpp
================================================
/*
 * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>
 *
 * BSD Simplified License.
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd for documentation
 *
 * This file was originally written for the ofxPd openFrameworks addon:
 * https://github.com/danomatika/ofxPd
 *
 */
#pragma once

#include <string>
#include <vector>
#include <iostream>
#include <sstream>

namespace pd {

/// \section Pd Patch

/// a pd patch
///
/// if you use the copy constructor/operator, keep in mind the libpd void*
/// pointer patch handle is copied and problems can arise if one object is used
/// to close a patch that other copies may be referring to
class Patch {

public:

    Patch() :
        _handle(NULL), _dollarZero(0), _dollarZeroStr("0"),
        _filename(""), _path("") {}

    Patch(const std::string &filename, const std::string &path) :
        _handle(NULL), _dollarZero(0), _dollarZeroStr("0"),
        _filename(filename), _path(path) {}

    Patch(void *handle, int dollarZero,
          const std::string &filename,
          const std::string &path) :
        _handle(handle), _dollarZero(dollarZero),
        _filename(filename), _path(path) {
            std::stringstream itoa;
            itoa << dollarZero;
            _dollarZeroStr = itoa.str();
        }

    /// get the raw pointer to the patch instance
    void* handle() const {return _handle;}

    /// get the unqiue instance $0 ID
    int dollarZero() const {return _dollarZero;}

    /// get the patch filename
    std::string filename() const {return _filename;}

    /// get the parent dir path for the file
    std::string path() const {return _path;}

    /// get the unique instance $0 ID as a string
    std::string dollarZeroStr() const {return _dollarZeroStr;}

    /// is the patch pointer valid?
    bool isValid() const {return _handle != NULL;}

    /// clear patch pointer and dollar zero (does not close patch!)
    ///
    /// note: does not clear filename and path so the object can be reused
    //        for opening multiple instances
    void clear()  {
        _handle = NULL;
        _dollarZero = 0;
        _dollarZeroStr = "0";
    }

    /// copy constructor
    Patch(const Patch &from) {
        _handle = from._handle;
        _dollarZero = from._dollarZero;
        _dollarZeroStr = from._dollarZeroStr;
        _filename = from._filename;
        _path = from._path;
    }

    /// copy operator
    void operator=(const Patch &from) {
        _handle = from._handle;
        _dollarZero = from._dollarZero;
        _dollarZeroStr = from._dollarZeroStr;
        _filename = from._filename;
        _path = from._path;
    }

    /// print info to ostream
    friend std::ostream& operator<<(std::ostream &os, const Patch &from) {
        return os << "Patch: \"" << from.filename() << "\" $0: "
                  << from.dollarZeroStr() << " valid: " << from.isValid();
    }

private:

    void *_handle;              ///< patch handle pointer
    int _dollarZero;            ///< the unique $0 patch ID
    std::string _dollarZeroStr; ///< $0 as a string

    std::string _filename;      ///< filename
    std::string _path;          ///< full path to parent folder
};

/// \section Pd stream interface message objects

/// bang event
struct Bang {

    const std::string dest; ///< dest receiver name

    explicit Bang(const std::string &dest) : dest(dest) {}
};

/// float value
struct Float {

    const std::string dest; ///< dest receiver name
    const float num;        ///< the float value

    Float(const std::string &dest, const float num) :
        dest(dest), num(num) {}
};

/// symbol value
struct Symbol {

    const std::string dest;   ///< dest receiver name
    const std::string symbol; ///< the symbol value

    Symbol(const std::string &dest, const std::string &symbol) :
        dest(dest), symbol(symbol) {}
};

/// a compound message containing floats and symbols
class List {

public:

    List() {}

/// \section Read

    /// check if index is a float type
    bool isFloat(const unsigned int index) const {
        if(index < objects.size())
            if(objects[index].type == List::FLOAT)
                return true;
        return false;
    }

    /// check if index is a symbol type
    bool isSymbol(const unsigned int index) const {
        if(index < objects.size())
            if(objects[index].type == List::SYMBOL)
                return true;
        return false;
    }

    /// get index as a float
    float getFloat(const unsigned int index) const {
        if(!isFloat(index)) {
            std::cerr << "Pd: List object " << index << " is not a float"
                      << std::endl;
            return 0;
        }
        return objects[index].value;
    }

    /// get index as a symbol
    std::string getSymbol(const unsigned int index) const {
        if(!isSymbol(index)) {
            std::cerr << "Pd: List object " << index << " is not a symbol"
                      << std::endl;
            return "";
        }
        return objects[index].symbol;
    }

/// \section Write
///
/// add elements to the list
///
/// List list;
/// list.addSymbol("hello");
/// list.addFloat(1.23);
///

    /// add a float to the list
    void addFloat(const float num) {
        MsgObject o;
        o.type = List::FLOAT;
        o.value = num;
        objects.push_back(o);
        typeString += 'f';
    }

    /// add a symbol to the list
    void addSymbol(const std::string &symbol) {
        MsgObject o;
        o.type = List::SYMBOL;
        o.symbol = symbol;
        objects.push_back(o);
        typeString += 's';
    }

/// \section Write Stream Interface
///
/// list << "hello" << 1.23;
///

    /// add a float to the message
    List& operator<<(const bool var) {
        addFloat((float) var);
        return *this;
    }

    /// add a float to the message
    List& operator<<(const int var) {
        addFloat((float) var);
        return *this;
    }

    /// add a float to the message
    List& operator<<(const float var) {
        addFloat((float) var);
        return *this;
    }

    /// add a float to the message
    List& operator<<(const double var) {
        addFloat((float) var);
        return *this;
    }

    /// add a symbol to the message
    List& operator<<(const char var) {
        std::string s;
        s = var;
        addSymbol(s);
        return *this;
    }

    /// add a symbol to the message
    List& operator<<(const char *var) {
        addSymbol((std::string) var);
        return *this;
    }

    /// add a symbol to the message
    List& operator<<(const std::string &var) {
        addSymbol((std::string) var);
        return *this;
    }

/// \section Util

    /// return number of items
    unsigned int len() const {return (unsigned int) objects.size();}

    /// return OSC style type string ie "fsfs"
    const std::string& types() const {return typeString;}

    /// clear all objects
    void clear() {
        typeString = "";
        objects.clear();
    }

    /// get list as a string
    std::string toString() const {
        std::string line;
        std::stringstream itoa;
        for(int i = 0; i < (int)objects.size(); ++i) {
            if(isFloat(i)) {
                itoa << getFloat(i);
                line += itoa.str();
                itoa.str("");
            }
            else {
                line += getSymbol(i);
            }
            if(i < (int)objects.size()-1) {
                line += " ";
            }
        }
        return line;
    }

    /// print to ostream
    friend std::ostream& operator<<(std::ostream &os, const List &from) {
        return os << from.toString();
    }

private:

    std::string typeString; ///< OSC style type string

    // object type
    enum MsgType {
        FLOAT,
        SYMBOL
    };

    // object wrapper
    struct MsgObject {
        MsgType type;
        float value;
        std::string symbol;
    };

    std::vector<MsgObject> objects; ///< list objects
};

/// start a compound message
struct StartMessage {
    explicit StartMessage() {}
};

/// finish a compound message as a list
struct FinishList {

    const std::string dest; ///< dest receiver name

    explicit FinishList(const std::string &dest) : dest(dest) {}
};

/// finish a compound message as a typed message
struct FinishMessage {

    const std::string dest; ///< dest receiver name
    const std::string msg;  ///< target msg at the dest

    FinishMessage(const std::string &dest, const std::string &msg) :
            dest(dest), msg(msg) {}
};

/// \section Pd stream interface midi objects
/// ref: http://www.gweep.net/~prefect/eng/reference/protocol/midispec.html

/// send a note on event (set vel = 0 for noteoff)
struct NoteOn {

    const int channel;  ///< channel (0 - 15 * dev#)
    const int pitch;    ///< pitch (0 - 127)
    const int velocity; ///< velocity (0 - 127)

    NoteOn(const int channel, const int pitch, const int velocity=64) :
        channel(channel), pitch(pitch), velocity(velocity) {}
};

/// change a control value aka send a CC message
struct ControlChange {

    const int channel;    ///< channel (0 - 15 * dev#)
    const int controller; ///< controller (0 - 127)
    const int value;      ///< value (0 - 127)

    ControlChange(const int channel, const int controller, const int value) :
        channel(channel), controller(controller), value(value) {}
};

/// change a program value (ie an instrument)
struct ProgramChange {

    const int channel; ///< channel (0 - 15 * dev#)
    const int value;   ///< value (0 - 127)

    ProgramChange(const int channel, const int value) :
        channel(channel), value(value) {}
};

/// change the pitch bend value
struct PitchBend {

    const int channel; ///< channel (0 - 15 * dev#)
    const int value;   ///< value (-8192 - 8192)

    PitchBend(const int channel, const int value) :
        channel(channel), value(value) {}
};

/// change an aftertouch value
struct Aftertouch {

    const int channel; ///< channel (0 - 15 * dev#)
    const int value;   ///< value (0 - 127)

    Aftertouch(const int channel, const int value) :
        channel(channel), value(value) {}
};

/// change a poly aftertouch value
struct PolyAftertouch {

    const int channel; ///< channel (0 - 15 * dev#)
    const int pitch;   ///< pitch (0 - 127)
    const int value;   ///< value (0 - 127)

    PolyAftertouch(const int channel, const int pitch, const int value) :
        channel(channel), pitch(pitch), value(value) {}
};

/// a raw midi byte
struct MidiByte {

    const int port; ///< raw portmidi port
                    ///< see http://en.wikipedia.org/wiki/PortMidi
    const unsigned char byte; ///< the raw midi byte value

    MidiByte(const int port, unsigned char byte) : port(port), byte(byte) {}
};

/// start a raw midi byte stream
struct StartMidi {

    const int port; ///< raw portmidi port

    explicit StartMidi(const int port=0) : port(port) {}
};

/// start a raw sysex byte stream
struct StartSysex {

    const int port; ///< raw portmidi port

    explicit StartSysex(const int port=0) : port(port) {}
};

/// start a sys realtime byte stream
struct StartSysRealTime {

    const int port; ///< raw portmidi port

    explicit StartSysRealTime(const int port=0) : port(port) {}
};

/// finish a midi byte stream
struct Finish {
    explicit Finish() {}
};

} // namespace


================================================
FILE: libs/libpd/libpd_wrapper/s_libpdmidi.c
================================================
/* Copyright (c) 1997-2010 Miller Puckette and others.
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */

#include "m_pd.h"
#include "z_libpd.h"
#include "z_hooks.h"

#define CLAMP(x, low, high) ((x > high) ? high : ((x < low) ? low : x))
#define CLAMP4BIT(x) CLAMP(x, 0, 0x0f)
#define CLAMP7BIT(x) CLAMP(x, 0, 0x7f)
#define CLAMP8BIT(x) CLAMP(x, 0, 0xff)
#define CLAMP12BIT(x) CLAMP(x, 0, 0x0fff)
#define CLAMP14BIT(x) CLAMP(x, 0, 0x3fff)

#define CHANNEL ((CLAMP12BIT(port) << 4) | CLAMP4BIT(channel))

void outmidi_noteon(int port, int channel, int pitch, int velo) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_noteonhook)
    imp->i_hooks.h_noteonhook(CHANNEL, CLAMP7BIT(pitch), CLAMP7BIT(velo));
}

void outmidi_controlchange(int port, int channel, int ctl, int value) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_controlchangehook)
    imp->i_hooks.h_controlchangehook(CHANNEL, CLAMP7BIT(ctl), CLAMP7BIT(value));
}

void outmidi_programchange(int port, int channel, int value) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_programchangehook)
    imp->i_hooks.h_programchangehook(CHANNEL, CLAMP7BIT(value));
}

void outmidi_pitchbend(int port, int channel, int value) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_pitchbendhook)
    imp->i_hooks.h_pitchbendhook(CHANNEL, CLAMP14BIT(value) - 8192); // remove offset
}

void outmidi_aftertouch(int port, int channel, int value) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_aftertouchhook)
    imp->i_hooks.h_aftertouchhook(CHANNEL, CLAMP7BIT(value));
}

void outmidi_polyaftertouch(int port, int channel, int pitch, int value) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_polyaftertouchhook)
    imp->i_hooks.h_polyaftertouchhook(CHANNEL, CLAMP7BIT(pitch), CLAMP7BIT(value));
}

void outmidi_byte(int port, int value) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp && imp->i_hooks.h_midibytehook)
    imp->i_hooks.h_midibytehook(CLAMP12BIT(port), CLAMP8BIT(value));
}

/* tell Pd GUI that our list of MIDI APIs is empty */
#include <string.h>
void sys_get_midi_apis(char *buf) {strcpy(buf, "{}");}

// the rest is not relevant to libpd
void sys_listmididevs(void) {}
void sys_get_midi_params(int *pnmidiindev, int *pmidiindev,
    int *pnmidioutdev, int *pmidioutdev) {*pnmidiindev = *pnmidioutdev = 0;}
void sys_open_midi(int nmidiindev, int *midiindev,
    int nmidioutdev, int *midioutdev, int enable) {}
void sys_close_midi() {}
void sys_reopen_midi(void) {}
void sys_initmidiqueue(void) {}
void sys_pollmidiqueue(void) {}
void sys_setmiditimediff(double inbuftime, double outbuftime) {}
void glob_midi_setapi(void *dummy, t_floatarg f) {}
void glob_midi_properties(t_pd *dummy, t_floatarg flongform) {}
void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) {}
int sys_mididevnametonumber(int output, const char *name) { return 0; }
void sys_mididevnumbertoname(int output, int devno, char *name, int namesize) {}
void sys_set_midi_api(int api) {}
void sys_gui_midipreferences(void) {}
int sys_midiapi;


================================================
FILE: libs/libpd/libpd_wrapper/util/ringbuffer.c
================================================
/*
 *  Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)
 *
 *  For information on usage and redistribution, and for a DISCLAIMER OF ALL
 *  WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#include "ringbuffer.h"

#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

#if __STDC_VERSION__ >= 201112L // use stdatomic if C11 is available
  #include <stdatomic.h>
  #define SYNC_FETCH(ptr) atomic_fetch_or((_Atomic int *)ptr, 0)
  #define SYNC_COMPARE_AND_SWAP(ptr, oldval, newval) \
          atomic_compare_exchange_strong((_Atomic int *)ptr, &oldval, newval)
#else // use platform specfics
  #ifdef __APPLE__ // apple atomics
    #include <libkern/OSAtomic.h>
    #define SYNC_FETCH(ptr) OSAtomicOr32Barrier(0, (volatile uint32_t *)ptr)
    #define SYNC_COMPARE_AND_SWAP(ptr, oldval, newval) \
            OSAtomicCompareAndSwap32Barrier(oldval, newval, ptr)
  #elif defined(_WIN32) || defined(_WIN64) // win api atomics
    #include <windows.h>
    #define SYNC_FETCH(ptr) InterlockedOr(ptr, 0)
    #define SYNC_COMPARE_AND_SWAP(ptr, oldval, newval) \
            InterlockedCompareExchange(ptr, newval, oldval)
  #else // gcc atomics
    #define SYNC_FETCH(ptr) __sync_fetch_and_or(ptr, 0)
    #define SYNC_COMPARE_AND_SWAP(ptr, oldval, newval) \
            __sync_val_compare_and_swap(ptr, oldval, newval)
  #endif
#endif

ring_buffer *rb_create(int size) {
  if (size & 0xff) return NULL;  // size must be a multiple of 256
  ring_buffer *buffer = malloc(sizeof(ring_buffer));
  if (!buffer) return NULL;
  buffer->buf_ptr = calloc(size, sizeof(char));
  if (!buffer->buf_ptr) {
    free(buffer);
    return NULL;
  }
  buffer->size = size;
  buffer->write_idx = 0;
  buffer->read_idx = 0;
  return buffer;
}

void rb_free(ring_buffer *buffer) {
  free(buffer->buf_ptr);
  free(buffer);
}

int rb_available_to_write(ring_buffer *buffer) {
  if (buffer) {
    // note: the largest possible result is buffer->size - 1 because
    // we adopt the convention that read_idx == write_idx means that the
    // buffer is empty
    int read_idx = SYNC_FETCH(&(buffer->read_idx));
    int write_idx = SYNC_FETCH(&(buffer->write_idx));
    return (buffer->size + read_idx - write_idx - 1) % buffer->size;
  } else {
    return 0;
  }
}

int rb_available_to_read(ring_buffer *buffer) {
  if (buffer) {
    int read_idx = SYNC_FETCH(&(buffer->read_idx));
    int write_idx = SYNC_FETCH(&(buffer->write_idx));
    return (buffer->size + write_idx - read_idx) % buffer->size;
  } else {
    return 0;
  }
}

int rb_write_to_buffer(ring_buffer *buffer, int n, ...) {
  if (!buffer) return -1;
  int write_idx = buffer->write_idx;  // no need for sync in writer thread
  int available = rb_available_to_write(buffer);
  va_list args;
  va_start(args, n);
  int i;
  for (i = 0; i < n; ++i) {
    const char* src = va_arg(args, const char*);
    int len = va_arg(args, int);
    available -= len;
    if (len < 0 || available < 0) return -1;
    if (write_idx + len <= buffer->size) {
      memcpy(buffer->buf_ptr + write_idx, src, len);
    } else {
      int d = buffer->size - write_idx;
      memcpy(buffer->buf_ptr + write_idx, src, d);
      memcpy(buffer->buf_ptr, src + d, len - d);
    }
    write_idx = (write_idx + len) % buffer->size;
  }
  va_end(args);
  SYNC_COMPARE_AND_SWAP(&(buffer->write_idx), buffer->write_idx,
      write_idx);  // includes memory barrier
  return 0;
}

int rb_write_value_to_buffer(ring_buffer *buffer, int value, int n) {
  if (!buffer) return -1;
  int write_idx = buffer->write_idx;  // No need for sync in writer thread.
  int available = rb_available_to_write(buffer);
  available -= n;
  if (n < 0 || available < 0) return -1;
  if (write_idx + n <= buffer->size) {
    memset(buffer->buf_ptr + write_idx, value, n);
  } else {
    int d = buffer->size - write_idx;
    memset(buffer->buf_ptr + write_idx, value, d);
    memset(buffer->buf_ptr, value, n - d);
  }
  write_idx = (write_idx + n) % buffer->size;
  SYNC_COMPARE_AND_SWAP(&(buffer->write_idx), buffer->write_idx,
    write_idx);  // includes memory barrier
  return 0;
}

int rb_read_from_buffer(ring_buffer *buffer, char *dest, int len) {
  if (len == 0) return 0;
  if (!buffer || len < 0 || len > rb_available_to_read(buffer)) return -1;
  // note that rb_available_to_read also serves as a memory barrier, and so any
  // writes to buffer->buf_ptr that precede the update of buffer->write_idx are
  // visible to us now
  int read_idx = buffer->read_idx;  // no need for sync in reader thread
  if (read_idx + len <= buffer->size) {
    memcpy(dest, buffer->buf_ptr + read_idx, len);
  } else {
    int d = buffer->size - read_idx;
    memcpy(dest, buffer->buf_ptr + read_idx, d);
    memcpy(dest + d, buffer->buf_ptr, len - d);
  }
  SYNC_COMPARE_AND_SWAP(&(buffer->read_idx), buffer->read_idx,
       (read_idx + len) % buffer->size);  // includes memory barrier
  return 0;
}

// simply reset the indices
void rb_clear_buffer(ring_buffer *buffer) {
  if (buffer) {
  SYNC_COMPARE_AND_SWAP(&(buffer->read_idx), buffer->read_idx, 0);
  SYNC_COMPARE_AND_SWAP(&(buffer->write_idx), buffer->write_idx, 0);
  }
}


================================================
FILE: libs/libpd/libpd_wrapper/util/ringbuffer.h
================================================
/*
 *  Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)
 *
 *  For information on usage and redistribution, and for a DISCLAIMER OF ALL
 *  WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#ifndef __Z_RING_BUFFER_H__
#define __Z_RING_BUFFER_H__

/// simple lock-free ring buffer implementation for one writer thread
/// and one consumer thread
typedef struct ring_buffer {
    int size;
    char *buf_ptr;
    int write_idx;
    int read_idx;
} ring_buffer;

/// create a ring buffer, size must be a multiple of 256
/// returns NULL on failure
ring_buffer *rb_create(int size);

/// free a ring buffer
void rb_free(ring_buffer *buffer);

/// get the number of bytes that can currently be written
/// this is safe to call from any thread
int rb_available_to_write(ring_buffer *buffer);

/// get the number of bytes that can currently be read
/// this is safe to called from any thread
int rb_available_to_read(ring_buffer *buffer);

/// write bytes from n sources to the ring buffer (if the ring buffer has
/// enough space), varargs are pairs of type (const char*, int) giving a pointer
/// to a buffer and the number of bytes to be copied
/// note: call this from a single writer thread only
/// returns 0 on success
int rb_write_to_buffer(ring_buffer *buffer, int n, ...);

/// writes single byte value n times to the ring buffer (if the ring buffer has
/// enough space)
/// note: call this from a single writer thread only
/// returns 0 on success
int rb_write_value_to_buffer(ring_buffer *buffer, int value, int n);

/// read given number of bytes from the ring buffer to dest (if the ring
/// buffer has enough data)
/// note: call this from a single reader thread only
/// returns 0 on success
int rb_read_from_buffer(ring_buffer *buffer, char *dest, int len);

/// clears the contents of the ring buffer
/// this is safe to call from any thread
void rb_clear_buffer(ring_buffer *buffer);

#endif


================================================
FILE: libs/libpd/libpd_wrapper/util/z_print_util.c
================================================
/*
 * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com) &
 *                    Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2022 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#include "z_print_util.h"

#include <stdlib.h>
#include <string.h>

#include "../z_hooks.h"

#define PRINT_LINE_SIZE 2048

typedef struct _print_util {
  t_libpd_printhook concat_printhook;
  char concat_buf[PRINT_LINE_SIZE]; /* line buffer */
  int concat_len;                   /* current line len */
} print_util;

void libpd_set_concatenated_printhook(const t_libpd_printhook hook) {
  t_libpdimp *imp = LIBPDSTUFF;
  if (hook) {
    if (!imp->i_print_util) {
      imp->i_print_util = calloc(1, sizeof(print_util));
    }
    ((print_util *)imp->i_print_util)->concat_printhook = hook;
  }
  else {
    if (imp->i_print_util) {
      free(imp->i_print_util);
      imp->i_print_util = NULL;
    }
  }
}

void libpd_print_concatenator(const char *s) {
  print_util *util = (print_util *)LIBPDSTUFF->i_print_util;
  if (!util) return;

  util->concat_buf[util->concat_len] = '\0';

  int len = (int)strlen(s);
  while (util->concat_len + len >= PRINT_LINE_SIZE) {
    int d = PRINT_LINE_SIZE - 1 - util->concat_len;
    strncat(util->concat_buf, s, d);
    util->concat_printhook(util->concat_buf);
    s += d;
    len -= d;
    util->concat_len = 0;
    util->concat_buf[0] = '\0';
  }

  strncat(util->concat_buf, s, len);
  util->concat_len += len;

  if (util->concat_len > 0 && util->concat_buf[util->concat_len - 1] == '\n') {
    util->concat_buf[util->concat_len - 1] = '\0';
    util->concat_printhook(util->concat_buf);
    util->concat_len = 0;
  }
}


================================================
FILE: libs/libpd/libpd_wrapper/util/z_print_util.h
================================================
/*
 * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com) &
 *                    Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2022 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#ifndef __Z_PRINT_UTIL_H__
#define __Z_PRINT_UTIL_H__

#include "z_libpd.h"

#ifdef __cplusplus
extern "C"
{
#endif

/// assign the pointer to your print line handler
/// concatenates print messages into single lines before returning them to the
/// print hook:
///   ex: line "hello 123\n" is received in 1 part -> "hello 123"
/// for comparison, the default behavior may receive messages in chunks:
///   ex: line "hello 123" could be sent in 3 parts -> "hello", " ", "123\n"
/// call with NULL pointer to free internal buffer
/// note: do not call before libpd_init()
EXTERN void libpd_set_concatenated_printhook(const t_libpd_printhook hook);

/// assign this function pointer to libpd_printhook or libpd_queued_printhook,
/// depending on whether you're using queued messages, to intercept and
/// concatenate print messages:
///     libpd_set_printhook(libpd_print_concatenator);
///     libpd_set_concatenated_printhook(your_print_handler);
/// note: the char pointer argument is only good for the duration of the print
///       callback; if you intend to use the argument after the callback has
///       returned, you need to make a defensive copy
EXTERN void libpd_print_concatenator(const char *s);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: libs/libpd/libpd_wrapper/util/z_queued.c
================================================
/*
 * Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2022 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#include "z_queued.h"

#include <stdlib.h>
#include <string.h>

#include "../z_hooks.h"
#include "ringbuffer.h"

#define BUFFER_SIZE 16384

typedef struct _queued_stuff {
  t_libpdhooks hooks;
  t_libpd_printhook printhook;
  ring_buffer *pd_receive_buffer;
  ring_buffer *midi_receive_buffer;
  char temp_buffer[BUFFER_SIZE];
} queued_stuff;

#define QUEUEDSTUFF ((queued_stuff *)(LIBPDSTUFF->i_queued))

typedef struct _pd_params {
  enum {
    LIBPD_PRINT, LIBPD_BANG, LIBPD_FLOAT,
    LIBPD_SYMBOL, LIBPD_LIST, LIBPD_MESSAGE,
  } type;
  const char *src;
  t_float x;
  const char *sym;
  int argc;
} pd_params;

typedef struct _midi_params {
  enum {
    LIBPD_NOTEON, LIBPD_CONTROLCHANGE, LIBPD_PROGRAMCHANGE, LIBPD_PITCHBEND,
    LIBPD_AFTERTOUCH, LIBPD_POLYAFTERTOUCH, LIBPD_MIDIBYTE
  } type;
  int midi1;
  int midi2;
  int midi3;
} midi_params;

#define S_PD_PARAMS sizeof(pd_params)
#define S_MIDI_PARAMS sizeof(midi_params)
#define S_ATOM sizeof(t_atom)

static void receive_print(pd_params *p, char **buffer) {
  if (QUEUEDSTUFF->printhook) {
    QUEUEDSTUFF->printhook(*buffer);
  }
  *buffer += p->argc;
}

static void receive_bang(pd_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_banghook) {
    QUEUEDSTUFF->hooks.h_banghook(p->src);
  }
}

static void receive_float(pd_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_floathook) {
    QUEUEDSTUFF->hooks.h_floathook(p->src, (float)p->x);
  }
  else if (QUEUEDSTUFF->hooks.h_doublehook) {
    QUEUEDSTUFF->hooks.h_doublehook(p->src, (double)p->x);
  }
}

static void receive_symbol(pd_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_symbolhook) {
    QUEUEDSTUFF->hooks.h_symbolhook(p->src, p->sym);
  }
}

static void receive_list(pd_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_listhook) {
    QUEUEDSTUFF->hooks.h_listhook(p->src, p->argc, (t_atom *) *buffer);
  }
  *buffer += p->argc * S_ATOM;
}

static void receive_message(pd_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_messagehook) {
    QUEUEDSTUFF->hooks.h_messagehook(p->src, p->sym, p->argc, (t_atom *) *buffer);
  }
  *buffer += p->argc * S_ATOM;
}

#define LIBPD_WORD_ALIGN 8

static void internal_printhook(const char *s) {
  static char padding[LIBPD_WORD_ALIGN];
  queued_stuff *queued = QUEUEDSTUFF;
  int len = (int) strlen(s) + 1; // remember terminating null char
  int rest = len % LIBPD_WORD_ALIGN;
  if (rest) rest = LIBPD_WORD_ALIGN - rest;
  int total = len + rest;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS + total) {
    pd_params p = {LIBPD_PRINT, NULL, 0.0f, NULL, total};
    rb_write_to_buffer(queued->pd_receive_buffer, 3,
        (const char *)&p, S_PD_PARAMS, s, len, padding, rest);
  }
}

static void internal_banghook(const char *src) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS) {
    pd_params p = {LIBPD_BANG, src, 0.0f, NULL, 0};
    rb_write_to_buffer(queued->pd_receive_buffer, 1, (const char *)&p, S_PD_PARAMS);
  }
}

static void internal_floathook(const char *src, float x) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS) {
    pd_params p = {LIBPD_FLOAT, src, x, NULL, 0};
    rb_write_to_buffer(queued->pd_receive_buffer, 1, (const char *)&p, S_PD_PARAMS);
  }
}

static void internal_doublehook(const char *src, double x) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS) {
    pd_params p = {LIBPD_FLOAT, src, (t_float)x, NULL, 0};
    rb_write_to_buffer(queued->pd_receive_buffer, 1, (const char *)&p, S_PD_PARAMS);
  }
}

static void internal_symbolhook(const char *src, const char *sym) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS) {
    pd_params p = {LIBPD_SYMBOL, src, 0.0f, sym, 0};
    rb_write_to_buffer(queued->pd_receive_buffer, 1, (const char *)&p, S_PD_PARAMS);
  }
}

static void internal_listhook(const char *src, int argc, t_atom *argv) {
  queued_stuff *queued = QUEUEDSTUFF;
  int n = argc * S_ATOM;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS + n) {
    pd_params p = {LIBPD_LIST, src, 0.0f, NULL, argc};
    rb_write_to_buffer(queued->pd_receive_buffer, 2,
        (const char *)&p, S_PD_PARAMS, (const char *)argv, n);
  }
}

static void internal_messagehook(const char *src, const char* sym,
  int argc, t_atom *argv) {
  queued_stuff *queued = QUEUEDSTUFF;
  int n = argc * S_ATOM;
  if (rb_available_to_write(queued->pd_receive_buffer) >= S_PD_PARAMS + n) {
    pd_params p = {LIBPD_MESSAGE, src, 0.0f, sym, argc};
    rb_write_to_buffer(queued->pd_receive_buffer, 2,
        (const char *)&p, S_PD_PARAMS, (const char *)argv, n);
  }
}

static void receive_noteon(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_noteonhook) {
    QUEUEDSTUFF->hooks.h_noteonhook(p->midi1, p->midi2, p->midi3);
  }
}

static void receive_controlchange(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_controlchangehook) {
    QUEUEDSTUFF->hooks.h_controlchangehook(p->midi1, p->midi2, p->midi3);
  }
}

static void receive_programchange(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_programchangehook) {
    QUEUEDSTUFF->hooks.h_programchangehook(p->midi1, p->midi2);
  }
}

static void receive_pitchbend(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_pitchbendhook) {
    QUEUEDSTUFF->hooks.h_pitchbendhook(p->midi1, p->midi2);
  }
}

static void receive_aftertouch(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_aftertouchhook) {
    QUEUEDSTUFF->hooks.h_aftertouchhook(p->midi1, p->midi2);
  }
}

static void receive_polyaftertouch(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_polyaftertouchhook) {
    QUEUEDSTUFF->hooks.h_polyaftertouchhook(p->midi1, p->midi2, p->midi3);
  }
}

static void receive_midibyte(midi_params *p, char **buffer) {
  if (QUEUEDSTUFF->hooks.h_midibytehook) {
    QUEUEDSTUFF->hooks.h_midibytehook(p->midi1, p->midi2);
  }
}

static void internal_noteonhook(int channel, int pitch, int velocity) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_NOTEON, channel, pitch, velocity};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

static void internal_controlchangehook(int channel, int controller, int value) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_CONTROLCHANGE, channel, controller, value};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

static void internal_programchangehook(int channel, int value) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_PROGRAMCHANGE, channel, value, 0};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

static void internal_pitchbendhook(int channel, int value) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_PITCHBEND, channel, value, 0};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

static void internal_aftertouchhook(int channel, int value) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_AFTERTOUCH, channel, value, 0};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

static void internal_polyaftertouchhook(int channel, int pitch, int value) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_POLYAFTERTOUCH, channel, pitch, value};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

static void internal_midibytehook(int port, int byte) {
  queued_stuff *queued = QUEUEDSTUFF;
  if (rb_available_to_write(queued->midi_receive_buffer) >= S_MIDI_PARAMS) {
    midi_params p = {LIBPD_MIDIBYTE, port, byte, 0};
    rb_write_to_buffer(queued->midi_receive_buffer, 1, (const char *)&p, S_MIDI_PARAMS);
  }
}

void libpd_set_queued_printhook(const t_libpd_printhook hook) {
  QUEUEDSTUFF->printhook = hook;
}

void libpd_set_queued_banghook(const t_libpd_banghook hook) {
  QUEUEDSTUFF->hooks.h_banghook = hook;
}

void libpd_set_queued_floathook(const t_libpd_floathook hook) {
  QUEUEDSTUFF->hooks.h_floathook = hook;
  QUEUEDSTUFF->hooks.h_doublehook = NULL;
}

void libpd_set_queued_doublehook(const t_libpd_doublehook hook) {
  QUEUEDSTUFF->hooks.h_floathook = NULL;
  QUEUEDSTUFF->hooks.h_doublehook = hook;
}

void libpd_set_queued_symbolhook(const t_libpd_symbolhook hook) {
  QUEUEDSTUFF->hooks.h_symbolhook = hook;
}

void libpd_set_queued_listhook(const t_libpd_listhook hook) {
  QUEUEDSTUFF->hooks.h_listhook = hook;
}

void libpd_set_queued_messagehook(const t_libpd_messagehook hook) {
  QUEUEDSTUFF->hooks.h_messagehook = hook;
}

void libpd_set_queued_noteonhook(const t_libpd_noteonhook hook) {
  QUEUEDSTUFF->hooks.h_noteonhook = hook;
}

void libpd_set_queued_controlchangehook(const t_libpd_controlchangehook hook) {
  QUEUEDSTUFF->hooks.h_controlchangehook = hook;
}

void libpd_set_queued_programchangehook(const t_libpd_programchangehook hook) {
  QUEUEDSTUFF->hooks.h_programchangehook = hook;
}

void libpd_set_queued_pitchbendhook(const t_libpd_pitchbendhook hook) {
  QUEUEDSTUFF->hooks.h_pitchbendhook = hook;
}

void libpd_set_queued_aftertouchhook(const t_libpd_aftertouchhook hook) {
  QUEUEDSTUFF->hooks.h_aftertouchhook = hook;
}

void libpd_set_queued_polyaftertouchhook(const t_libpd_polyaftertouchhook hook) {
  QUEUEDSTUFF->hooks.h_polyaftertouchhook = hook;
}

void libpd_set_queued_midibytehook(const t_libpd_midibytehook hook) {
  QUEUEDSTUFF->hooks.h_midibytehook = hook;
}

static void queued_stuff_free(void *p) {
  queued_stuff *queued = (queued_stuff *)p;
  if (queued->pd_receive_buffer) rb_free(queued->pd_receive_buffer);
  if (queued->midi_receive_buffer) rb_free(queued->midi_receive_buffer);
}

int libpd_queued_init() {
  int ret = libpd_init();

  libpd_set_printhook(internal_printhook);
  libpd_set_banghook(internal_banghook);
  libpd_set_doublehook(internal_doublehook);
  libpd_set_symbolhook(internal_symbolhook);
  libpd_set_listhook(internal_listhook);
  libpd_set_messagehook(internal_messagehook);

  libpd_set_noteonhook(internal_noteonhook);
  libpd_set_controlchangehook(internal_controlchangehook);
  libpd_set_programchangehook(internal_programchangehook);
  libpd_set_pitchbendhook(internal_pitchbendhook);
  libpd_set_aftertouchhook(internal_aftertouchhook);
  libpd_set_polyaftertouchhook(internal_polyaftertouchhook);
  libpd_set_midibytehook(internal_midibytehook);

  t_libpdimp *imp = LIBPDSTUFF;
  if (!imp->i_queued) {
    queued_stuff *queued = (queued_stuff *)calloc(1, sizeof(queued_stuff));
    if(!queued) goto cleanup;
    queued->pd_receive_buffer = rb_create(BUFFER_SIZE);
    if (!queued->pd_receive_buffer) goto cleanup;
    queued->midi_receive_buffer = rb_create(BUFFER_SIZE);
    if (!queued->midi_receive_buffer) goto cleanup;
    imp->i_queued = (void *)queued;
    imp->i_queued_freehook = queued_stuff_free;
  }
  return ret;
cleanup:
  libpd_queued_release();
  return -2;
}

void libpd_queued_release() {
  t_libpdimp *imp = LIBPDSTUFF;
  if (imp->i_queued) {
    queued_stuff_free(imp->i_queued);
    imp->i_queued = NULL;
    imp->i_queued_freehook = NULL;
  }
}

void libpd_queued_receive_pd_messages() {
  queued_stuff *queued = QUEUEDSTUFF;
  size_t available = rb_available_to_read(queued->pd_receive_buffer);
  if (!available) return;
  rb_read_from_buffer(queued->pd_receive_buffer, queued->temp_buffer, (int)available);
  char *end = queued->temp_buffer + available;
  char *buffer = queued->temp_buffer;
  while (buffer < end) {
    pd_params *p = (pd_params *)buffer;
    buffer += S_PD_PARAMS;
    switch (p->type) {
      case LIBPD_PRINT: {
        receive_print(p, &buffer);
        break;
      }
      case LIBPD_BANG: {
        receive_bang(p, &buffer);
        break;
      }
      case LIBPD_FLOAT: {
        receive_float(p, &buffer);
        break;
      }
      case LIBPD_SYMBOL: {
        receive_symbol(p, &buffer);
        break;
      }
      case LIBPD_LIST: {
        receive_list(p, &buffer);
        break;
      }
      case LIBPD_MESSAGE: {
        receive_message(p, &buffer);
        break;
      }
      default:
        break;
    }
  }
}

void libpd_queued_receive_midi_messages() {
  queued_stuff *queued = QUEUEDSTUFF;
  size_t available = rb_available_to_read(queued->midi_receive_buffer);
  if (!available) return;
  rb_read_from_buffer(queued->midi_receive_buffer, queued->temp_buffer, (int)available);
  char *end = queued->temp_buffer + available;
  char *buffer = queued->temp_buffer;
  while (buffer < end) {
    midi_params *p = (midi_params *)buffer;
    buffer += S_MIDI_PARAMS;
    switch (p->type) {
      case LIBPD_NOTEON: {
        receive_noteon(p, &buffer);
        break;
      }
      case LIBPD_CONTROLCHANGE: {
        receive_controlchange(p, &buffer);
        break;
      }
      case LIBPD_PROGRAMCHANGE: {
        receive_programchange(p, &buffer);
        break;
      }
      case LIBPD_PITCHBEND: {
        receive_pitchbend(p, &buffer);
        break;
      }
      case LIBPD_AFTERTOUCH: {
        receive_aftertouch(p, &buffer);
        break;
      }
      case LIBPD_POLYAFTERTOUCH: {
        receive_polyaftertouch(p, &buffer);
        break;
      }
      case LIBPD_MIDIBYTE: {
        receive_midibyte(p, &buffer);
        break;
      }
      default:
        break;
    }
  }
}


================================================
FILE: libs/libpd/libpd_wrapper/util/z_queued.h
================================================
/*
 * Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2022 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#ifndef __Z_QUEUED_H__
#define __Z_QUEUED_H__

#include "z_libpd.h"

#ifdef __cplusplus
extern "C"
{
#endif

/// set the queued print receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_printhook(const t_libpd_printhook hook);

/// set the queued bang receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_banghook(const t_libpd_banghook hook);

/// set the queued float receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
/// note: you can either have a queued float receiver hook, or a queued
///       double receiver hook (see below), but not both.
///       calling this, will automatically unset the queued double receiver
///       hook
EXTERN void libpd_set_queued_floathook(const t_libpd_floathook hook);

/// set the queued double receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
/// note: you can either have a queued double receiver hook, or a queued
///       float receiver hook (see above), but not both.
///       calling this, will automatically unset the queued float receiver
///       hook
EXTERN void libpd_set_queued_doublehook(const t_libpd_doublehook hook);

/// set the queued symbol receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_symbolhook(const t_libpd_symbolhook hook);

/// set the queued list receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_listhook(const t_libpd_listhook hook);

/// set the queued typed message receiver hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_messagehook(const t_libpd_messagehook hook);

/// set the queued MIDI note on hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_noteonhook(const t_libpd_noteonhook hook);

/// set the queued MIDI control change hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_controlchangehook(const t_libpd_controlchangehook hook);

/// set the queued MIDI program change hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_programchangehook(const t_libpd_programchangehook hook);

/// set the queued MIDI pitch bend hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_pitchbendhook(const t_libpd_pitchbendhook hook);

/// set the queued MIDI after touch hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_aftertouchhook(const t_libpd_aftertouchhook hook);

/// set the queued MIDI poly after touch hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_polyaftertouchhook(const t_libpd_polyaftertouchhook hook);

/// set the queued raw MIDI byte hook, NULL by default
/// note: do not call this before libpd_queued_init() or while DSP is running
EXTERN void libpd_set_queued_midibytehook(const t_libpd_midibytehook hook);

/// initialize libpd and the queued ringbuffers, safe to call more than once
/// returns 0 on success, -1 if libpd was already initialized, or -2 if ring
/// buffer allocation failed
///
/// with a single instance, use in place of libpd_init()
///
/// with multiple instances, call once for each instance *before* setting hooks:
///    t_pdinstance *pd1 = libpd_new_instance();
///    libpd_set_instance(pd1);
///    libpd_queued_init();
///    libpd_set_queued_printhook(pdprint);
///    ...
///
EXTERN int libpd_queued_init();

/// free the queued ringbuffers
/// with multiple instances, call before freeing each instance:
///     libpd_set_instance(pd1);
///     libpd_queued_release();
///     libpd_free_instance(pd1);
EXTERN void libpd_queued_release();

/// process and dispatch received messages in message ringbuffer
EXTERN void libpd_queued_receive_pd_messages();

/// process and dispatch receive midi messages in MIDI message ringbuffer
EXTERN void libpd_queued_receive_midi_messages();

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: libs/libpd/libpd_wrapper/x_libpdreceive.c
================================================
/*
 * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2012-2021 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#include "x_libpdreceive.h"
#include "z_libpd.h"
#include "z_hooks.h"

static t_class *libpdrec_class;

typedef struct _libpdrec {
  t_object x_obj;
  t_symbol *x_sym;
  t_libpdhooks *x_hooks;
} t_libpdrec;

static void libpdrecbang(t_libpdrec *x) {
  if (x->x_hooks->h_banghook)
    (*x->x_hooks->h_banghook)(x->x_sym->s_name);
}

static void libpdrecfloat(t_libpdrec *x, t_float f) {
  if (x->x_hooks->h_floathook)
    (*x->x_hooks->h_floathook)(x->x_sym->s_name, f);
  else if (x->x_hooks->h_doublehook)
    (*x->x_hooks->h_doublehook)(x->x_sym->s_name, f);
}

static void libpdrecsymbol(t_libpdrec *x, t_symbol *s) {
  if (x->x_hooks->h_symbolhook)
    (*x->x_hooks->h_symbolhook)(x->x_sym->s_name, s->s_name);
}

static void libpdrecpointer(t_libpdrec *x, t_gpointer *gp) {
  // just ignore pointers for now...
}

static void libpdreclist(t_libpdrec *x, t_symbol *s, int argc, t_atom *argv) {
  if (x->x_hooks->h_listhook)
    (*x->x_hooks->h_listhook)(x->x_sym->s_name, argc, argv);
}

static void libpdrecanything(t_libpdrec *x, t_symbol *s,
                int argc, t_atom *argv) {
  if (x->x_hooks->h_messagehook)
    (*x->x_hooks->h_messagehook)(x->x_sym->s_name, s->s_name, argc, argv);
}

static void libpdreceive_free(t_libpdrec *x) {
  pd_unbind(&x->x_obj.ob_pd, x->x_sym);
}

static void *libpdreceive_donew(t_symbol *s) {
  t_libpdrec *x;
  x = (t_libpdrec *)pd_new(libpdrec_class);
  x->x_sym = s;
  x->x_hooks = &LIBPDSTUFF->i_hooks;
  pd_bind(&x->x_obj.ob_pd, s);
  return x;
}

// this is exposed in the libpd API so must set the lock
void *libpdreceive_new(t_symbol *s) {
  t_libpdrec *x;
  sys_lock();
  x = (t_libpdrec *)libpdreceive_donew(s);
  sys_unlock();
  return x;
}

void libpdreceive_setup(void) {
  sys_lock();
  libpdrec_class = class_new(gensym("libpd_receive"),
       (t_newmethod)libpdreceive_donew, (t_method)libpdreceive_free,
       sizeof(t_libpdrec), CLASS_DEFAULT, A_DEFSYM, 0);
  class_addbang(libpdrec_class, libpdrecbang);
  class_addfloat(libpdrec_class, libpdrecfloat);
  class_addsymbol(libpdrec_class, libpdrecsymbol);
  class_addpointer(libpdrec_class, libpdrecpointer);
  class_addlist(libpdrec_class, libpdreclist);
  class_addanything(libpdrec_class, libpdrecanything);
  sys_unlock();
}


================================================
FILE: libs/libpd/libpd_wrapper/x_libpdreceive.h
================================================
/*
 * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2012-2021 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#ifndef __X_LIBPDREC_H__
#define __X_LIBPDREC_H__

#include "m_pd.h"

// internal "virtual" libpd receive object which forwards events to hooks
// do *not* include this file in a user-facing header

// set up the libpd source receiver class
void libpdreceive_setup(void);

// create a new libpd source receiver with a given name symbol
void *libpdreceive_new(t_symbol *);

#endif


================================================
FILE: libs/libpd/libpd_wrapper/z_hooks.c
================================================
/*
 * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com)
 * Copyright (c) 2013-2021 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#include "z_hooks.h"
#include <stdlib.h>

/* instance */

t_libpdimp libpd_mainimp = {NULL};

t_libpdimp* libpdimp_new(void) {
  t_libpdimp *imp = calloc(1, sizeof(t_libpdimp));
  return imp;
}

void libpdimp_free(t_libpdimp *imp) {
  if (imp == &libpd_mainimp) return;
  if (imp->i_queued) imp->i_queued_freehook(imp->i_queued);
  if (imp->i_print_util) free(imp->i_print_util);
  if (imp->i_data && imp->i_data_freehook) imp->i_data_freehook(imp->i_data);
  free(imp);
}


================================================
FILE: libs/libpd/libpd_wrapper/z_hooks.h
================================================
/*
 * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com)
 * Copyright (c) 2013-2021 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#ifndef __Z_HOOKS_H__
#define __Z_HOOKS_H__

#include "z_libpd.h"
#include "s_stuff.h"

// internal hooks, etc
// do *not* include this file in a user-facing header

/* hooks */

typedef struct _libpdhooks {

  // messages
  // no h_printhook as libpd_set_printhook() sets internal STUFF->st_printhook
  t_libpd_banghook h_banghook;
  t_libpd_floathook h_floathook;
  t_libpd_doublehook h_doublehook;
  t_libpd_symbolhook h_symbolhook;
  t_libpd_listhook h_listhook;
  t_libpd_messagehook h_messagehook;

  // MIDI
  t_libpd_noteonhook h_noteonhook;
  t_libpd_controlchangehook h_controlchangehook;
  t_libpd_programchangehook h_programchangehook;
  t_libpd_pitchbendhook h_pitchbendhook;
  t_libpd_aftertouchhook h_aftertouchhook;
  t_libpd_polyaftertouchhook h_polyaftertouchhook;
  t_libpd_midibytehook h_midibytehook;
} t_libpdhooks;

/* instance */

/// libpd per-instance implementation data
typedef struct _libpdimp {
  t_libpdhooks i_hooks; /* event hooks */
  void *i_queued;       /* queued data, default NULL */
  void *i_print_util;   /* print util data, default NULL */
  void *i_data;         /* user data, default NULL */
  t_libpd_freehook i_queued_freehook; /* i_queued free, default NULL */
  t_libpd_freehook i_data_freehook;   /* i_data free, default NULL */
} t_libpdimp;

/// main instance implementation data, always valid
extern t_libpdimp libpd_mainimp;

/// alloc new instance implementation data
t_libpdimp* libpdimp_new(void);

/// free instance implementation data
/// does nothing if imp is libpd_mainimp
void libpdimp_free(t_libpdimp *imp);

/// get current instance implementation data
#ifdef PDINSTANCE
  #define LIBPDSTUFF ((t_libpdimp *)(STUFF->st_impdata))
#else
  #define LIBPDSTUFF ((t_libpdimp *)&libpd_mainimp)
#endif

#endif


================================================
FILE: libs/libpd/libpd_wrapper/z_libpd.c
================================================
/*
 * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2012-2021 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#ifndef LIBPD_NO_NUMERIC
# include <locale.h>
#endif
#include "z_libpd.h"
#include "x_libpdreceive.h"
#include "z_hooks.h"
#include "m_imp.h"
#include "g_all_guis.h"

// pd_init() doesn't call socket_init() which is needed on windows for
// libpd_start_gui() to work
#if (defined(_WIN32) || defined(_WIN64)) && PD_MINOR_VERSION > 50
# include "s_net.h"
# define SOCKET_INIT socket_init();
#else
# define SOCKET_INIT
#endif

#if PD_MINOR_VERSION < 46
# define HAVE_SCHED_TICK_ARG
#endif

#ifdef HAVE_SCHED_TICK_ARG
# define SCHED_TICK(x) sched_tick(x)
#else
# define SCHED_TICK(x) sched_tick()
#endif

// forward declares
void pd_init(void);
int sys_startgui(const char *libdir);
void sys_stopgui(void);
int sys_pollgui(void);

// (optional) setup functions for built-in "extra" externals
#ifdef LIBPD_EXTRA
  void bob_tilde_setup(void);
  void bonk_tilde_setup(void);
  void choice_setup(void);
  void fiddle_tilde_setup(void);
  void loop_tilde_setup(void);
  void lrshift_tilde_setup(void);
  void pd_tilde_setup(void);
  void pique_setup(void);
  void sigmund_tilde_setup(void);
  void stdout_setup(void);
#endif

static PERTHREAD t_atom *s_argv = NULL;
static PERTHREAD t_atom *s_curr = NULL;
static PERTHREAD int s_argm = 0;
static PERTHREAD int s_argc = 0;

static void *get_object(const char *s) {
  t_pd *x = gensym(s)->s_thing;
  return x;
}

// note: could we use pd_this instead?
static int s_initialized = 0;

// this is called instead of sys_main() to start things
int libpd_init(void) {
  if (s_initialized) return -1; // only allow init once (for now)
  s_initialized = 1;
  signal(SIGFPE, SIG_IGN);
  libpd_start_message(32); // allocate array for message assembly
  sys_externalschedlib = 0;
  sys_printtostderr = 0;
  sys_usestdpath = 0; // don't use pd_extrapath, only sys_searchpath
  sys_debuglevel = 0;
  sys_noloadbang = 0;
  sys_hipriority = 0;
  sys_nmidiin = 0;
  sys_nmidiout = 0;
#ifdef HAVE_SCHED_TICK_ARG
  sys_time = 0;
#endif
  pd_init();
  STUFF->st_soundin = NULL;
  STUFF->st_soundout = NULL;
  STUFF->st_schedblocksize = DEFDACBLKSIZE;
  STUFF->st_impdata = &libpd_mainimp;
  sys_init_fdpoll();
  libpdreceive_setup();
  STUFF->st_searchpath = NULL;
  sys_libdir = gensym("");
  SOCKET_INIT
  post("pd %d.%d.%d%s", PD_MAJOR_VERSION, PD_MINOR_VERSION,
    PD_BUGFIX_VERSION, PD_TEST_VERSION);
#ifdef LIBPD_EXTRA
  bob_tilde_setup();
  bonk_tilde_setup();
  choice_setup();
  fiddle_tilde_setup();
  loop_tilde_setup();
  lrshift_tilde_setup();
  pd_tilde_setup();
  pique_setup();
  sigmund_tilde_setup();
  stdout_setup();
#endif
#ifndef LIBPD_NO_NUMERIC
  setlocale(LC_NUMERIC, "C");
#endif
  return 0;
}

void libpd_clear_search_path(void) {
  sys_lock();
  namelist_free(STUFF->st_searchpath);
  STUFF->st_searchpath = NULL;
  sys_unlock();
}

void libpd_add_to_search_path(const char *path) {
  sys_lock();
  STUFF->st_searchpath = namelist_append(STUFF->st_searchpath, path, 0);
  sys_unlock();
}

void *libpd_openfile(const char *name, const char *dir) {
  void *retval;
  sys_lock();
  pd_globallock();
  retval = (void *)glob_evalfile(NULL, gensym(name), gensym(dir));
  pd_globalunlock();
  sys_unlock();
  return retval;
}

void libpd_closefile(void *p) {
  sys_lock();
  pd_free((t_pd *)p);
  sys_unlock();
}

int libpd_getdollarzero(void *p) {
  sys_lock();
  pd_pushsym((t_pd *)p);
  int dzero = canvas_getdollarzero();
  pd_popsym((t_pd *)p);
  sys_unlock();
  return dzero;
}

int libpd_blocksize(void) {
  return DEFDACBLKSIZE;
}

int libpd_init_audio(int inChannels, int outChannels, int sampleRate) {
  t_audiosettings as;
  as.a_indevvec[0] = as.a_outdevvec[0] = DEFAULTAUDIODEV;
  as.a_nindev = as.a_noutdev = as.a_nchindev = as.a_nchoutdev = 1;
  as.a_chindevvec[0] = inChannels;
  as.a_choutdevvec[0] = outChannels;
  as.a_srate = sampleRate;
  as.a_blocksize = DEFDACBLKSIZE;
  as.a_callback = 0;
  as.a_advance = -1;
  as.a_api = API_DUMMY;
  sys_lock();
  sys_set_audio_settings(&as);
  sched_set_using_audio(SCHED_AUDIO_CALLBACK);
  sys_reopen_audio();
  sys_unlock();
  return 0;
}

static const t_sample sample_to_short = SHRT_MAX,
                      short_to_sample = 1.0 / (t_sample) SHRT_MAX;

#define PROCESS(_x, _y) \
  int i, j, k; \
  t_sample *p0, *p1; \
  sys_lock(); \
  sys_pollgui(); \
  for (i = 0; i < ticks; i++) { \
    for (j = 0, p0 = STUFF->st_soundin; j < DEFDACBLKSIZE; j++, p0++) { \
      for (k = 0, p1 = p0; k < STUFF->st_inchannels; k++, p1 += DEFDACBLKSIZE) \
        { \
        *p1 = *inBuffer++ _x; \
      } \
    } \
    memset(STUFF->st_soundout, 0, \
        STUFF->st_outchannels*DEFDACBLKSIZE*sizeof(t_sample)); \
    SCHED_TICK(pd_this->pd_systime + STUFF->st_time_per_dsp_tick); \
    for (j = 0, p0 = STUFF->st_soundout; j < DEFDACBLKSIZE; j++, p0++) { \
      for (k = 0, p1 = p0; k < STUFF->st_outchannels; k++, p1 += DEFDACBLKSIZE) \
        { \
        *outBuffer++ = *p1 _y; \
      } \
    } \
  } \
  sys_unlock(); \
  return 0;

int libpd_process_short(const int ticks, const short *inBuffer, short *outBuffer) {
  PROCESS(* short_to_sample, * sample_to_short)
}

int libpd_process_float(const int ticks, const float *inBuffer, float *outBuffer) {
  PROCESS(,)
}

int libpd_process_double(const int ticks, const double *inBuffer, double *outBuffer) {
  PROCESS(,)
}

#define PROCESS_RAW(_x, _y) \
  size_t n_in = STUFF->st_inchannels * DEFDACBLKSIZE; \
  size_t n_out = STUFF->st_outchannels * DEFDACBLKSIZE; \
  t_sample *p; \
  size_t i; \
  sys_lock(); \
  sys_pollgui(); \
  for (p = STUFF->st_soundin, i = 0; i < n_in; i++) { \
    *p++ = *inBuffer++ _x; \
  } \
  memset(STUFF->st_soundout, 0, n_out * sizeof(t_sample)); \
  SCHED_TICK(pd_this->pd_systime + STUFF->st_time_per_dsp_tick); \
  for (p = STUFF->st_soundout, i = 0; i < n_out; i++) { \
    *outBuffer++ = *p++ _y; \
  } \
  sys_unlock(); \
  return 0;

int libpd_process_raw(const float *inBuffer, float *outBuffer) {
  PROCESS_RAW(,)
}

int libpd_process_raw_short(const short *inBuffer, short *outBuffer) {
  PROCESS_RAW(* short_to_sample, * sample_to_short)
}

int libpd_process_raw_double(const double *inBuffer, double *outBuffer) {
  PROCESS_RAW(,)
}

#define GETARRAY \
  t_garray *garray = (t_garray *) pd_findbyclass(gensym(name), garray_class); \
  if (!garray) {sys_unlock(); return -1;} \

int libpd_arraysize(const char *name) {
  int retval;
  sys_lock();
  GETARRAY
  retval = garray_npoints(garray);
  sys_unlock();
  return retval;
}

int libpd_resize_array(const char *name, long size) {
  sys_lock();
  GETARRAY
  garray_resize_long(garray, size);
  sys_unlock();
  return 0;
}

#define MEMCPY(_x, _y) \
  GETARRAY \
  if (n < 0 || offset < 0 || offset + n > garray_npoints(garray)) return -2; \
  t_word *vec = ((t_word *) garray_vec(garray)) + offset; \
  int i; \
  for (i = 0; i < n; i++) _x = _y;

int libpd_read_array(float *dest, const char *name, int offset, int n) {
  sys_lock();
  MEMCPY(*dest++, (vec++)->w_float)
  sys_unlock();
  return 0;
}

int libpd_write_array(const char *name, int offset, const float *src, int n) {
  sys_lock();
  MEMCPY((vec++)->w_float, *src++)
  sys_unlock();
  return 0;
}

int libpd_read_array_double(double *dest, const char *name, int offset, int n) {
  sys_lock();
  MEMCPY(*dest++, (vec++)->w_float)
  sys_unlock();
  return 0;
}

int libpd_write_array_double(const char *name, int offset, const double *src, int n) {
  sys_lock();
  MEMCPY((vec++)->w_float, *src++)
  sys_unlock();
  return 0;
}

int libpd_bang(const char *recv) {
  void *obj;
  sys_lock();
  obj = get_object(recv);
  if (obj == NULL)
  {
    sys_unlock();
    return -1;
  }
  pd_bang(obj);
  sys_unlock();
  return 0;
}

static int libpd_dofloat(const char *recv, t_float x) {
  void *obj;
  sys_lock();
  obj = get_object(recv);
  if (obj == NULL)
  {
    sys_unlock();
    return -1;
  }
  pd_float(obj, x);
  sys_unlock();
  return 0;
}

int libpd_float(const char *recv, float x) {
  return libpd_dofloat(recv, x);
}

int libpd_double(const char *recv, double x) {
  return libpd_dofloat(recv, x);
}

int libpd_symbol(const char *recv, const char *symbol) {
  void *obj;
  sys_lock();
  obj = get_object(recv);
  if (obj == NULL)
  {
    sys_unlock();
    return -1;
  }
  pd_symbol(obj, gensym(symbol));
  sys_unlock();
  return 0;
}

int libpd_start_message(int maxlen) {
  if (maxlen > s_argm) {
    t_atom *v = realloc(s_argv, maxlen * sizeof(t_atom));
    if (v) {
      s_argv = v;
      s_argm = maxlen;
    } else {
      return -1;
    }
  }
  s_argc = 0;
  s_curr = s_argv;
  return 0;
}

#define ADD_ARG(f) f(s_curr, x); s_curr++; s_argc++;

void libpd_add_float(float x) {
  ADD_ARG(SETFLOAT);
}

void libpd_add_double(double x) {
  ADD_ARG(SETFLOAT);
}

void libpd_add_symbol(const char *symbol) {
  t_symbol *x;
  sys_lock();
  x = gensym(symbol);
  sys_unlock();
  ADD_ARG(SETSYMBOL);
}

int libpd_finish_list(const char *recv) {
  return libpd_list(recv, s_argc, s_argv);
}

int libpd_finish_message(const char *recv, const char *msg) {
  return libpd_message(recv, msg, s_argc, s_argv);
}

void libpd_set_float(t_atom *a, float x) {
  SETFLOAT(a, x);
}

void libpd_set_double(t_atom *v, double x) {
  SETFLOAT(v, x);
}

void libpd_set_symbol(t_atom *a, const char *symbol) {
  SETSYMBOL(a, gensym(symbol));
}

int libpd_list(const char *recv, int argc, t_atom *argv) {
  t_pd *obj;
  sys_lock();
  obj = get_object(recv);
  if (obj == NULL)
  {
    sys_unlock();
    return -1;
  }
  pd_list(obj, &s_list, argc, argv);
  sys_unlock();
  return 0;
}

int libpd_message(const char *recv, const char *msg, int argc, t_atom *argv) {
  t_pd *obj;
  sys_lock();
  obj = get_object(recv);
  if (obj == NULL)
  {
    sys_unlock();
    return -1;
  }
  pd_typedmess(obj, gensym(msg), argc, argv);
  sys_unlock();
  return 0;
}

void *libpd_bind(const char *recv) {
  t_symbol *x;
  sys_lock();
  x = gensym(recv);
  sys_unlock();
  return libpdreceive_new(x);
}

void libpd_unbind(void *p) {
  sys_lock();
  pd_free((t_pd *)p);
  sys_unlock();
}

int libpd_exists(const char *recv) {
  int retval;
  sys_lock();
  retval = (get_object(recv) != NULL);
  sys_unlock();
  return retval;
}

// when setting hooks, use mainimp if pd is not yet inited
#define IMP (s_initialized ? LIBPDSTUFF : &libpd_mainimp)

void libpd_set_printhook(const t_libpd_printhook hook) {
  if (!s_initialized) // set default hook
    sys_printhook = (t_printhook)hook;
  else // set instance hook
    STUFF->st_printhook = (t_printhook)hook;
}

void libpd_set_banghook(const t_libpd_banghook hook) {
  IMP->i_hooks.h_banghook = hook;
}

void libpd_set_floathook(const t_libpd_floathook hook) {
  IMP->i_hooks.h_floathook = hook;
  IMP->i_hooks.h_doublehook = NULL;
}

void libpd_set_doublehook(const t_libpd_doublehook hook) {
  IMP->i_hooks.h_floathook = NULL;
  IMP->i_hooks.h_doublehook = hook;
}

void libpd_set_symbolhook(const t_libpd_symbolhook hook) {
  IMP->i_hooks.h_symbolhook = hook;
}

void libpd_set_listhook(const t_libpd_listhook hook) {
  IMP->i_hooks.h_listhook = hook;
}

void libpd_set_messagehook(const t_libpd_messagehook hook) {
  IMP->i_hooks.h_messagehook = hook;
}

int libpd_is_float(t_atom *a) {
  return (a)->a_type == A_FLOAT;
}

int libpd_is_symbol(t_atom *a) {
  return (a)->a_type == A_SYMBOL;
}

float libpd_get_float(t_atom *a) {
  return (a)->a_w.w_float;
}

double libpd_get_double(t_atom *a) {
  return (a)->a_w.w_float;
}

const char *libpd_get_symbol(t_atom *a) {
  return (a)->a_w.w_symbol->s_name;
}

t_atom *libpd_next_atom(t_atom *a) {
  return a + 1;
}

#define CHECK_CHANNEL if (channel < 0) return -1;
#define CHECK_PORT if (port < 0 || port > 0x0fff) return -1;
#define CHECK_RANGE_7BIT(v) if (v < 0 || v > 0x7f) return -1;
#define CHECK_RANGE_8BIT(v) if (v < 0 || v > 0xff) return -1;
#define PORT (channel >> 4)
#define CHANNEL (channel & 0x0f)

int libpd_noteon(int channel, int pitch, int velocity) {
  CHECK_CHANNEL
  CHECK_RANGE_7BIT(pitch)
  CHECK_RANGE_7BIT(velocity)
  sys_lock();
  inmidi_noteon(PORT, CHANNEL, pitch, velocity);
  sys_unlock();
  return 0;
}

int libpd_controlchange(int channel, int controller, int value) {
  CHECK_CHANNEL
  CHECK_RANGE_7BIT(controller)
  CHECK_RANGE_7BIT(value)
  sys_lock();
  inmidi_controlchange(PORT, CHANNEL, controller, value);
  sys_unlock();
  return 0;
}

int libpd_programchange(int channel, int value) {
  CHECK_CHANNEL
  CHECK_RANGE_7BIT(value)
  sys_lock();
  inmidi_programchange(PORT, CHANNEL, value);
  sys_unlock();
  return 0;
}

// note: for consistency with Pd, we center the output of [pitchin] at 8192
int libpd_pitchbend(int channel, int value) {
  CHECK_CHANNEL
  if (value < -8192 || value > 8191) return -1;
  sys_lock();
  inmidi_pitchbend(PORT, CHANNEL, value + 8192);
  sys_unlock();
  return 0;
}

int libpd_aftertouch(int channel, int value) {
  CHECK_CHANNEL
  CHECK_RANGE_7BIT(value)
  sys_lock();
  inmidi_aftertouch(PORT, CHANNEL, value);
  sys_unlock();
  return 0;
}

int libpd_polyaftertouch(int channel, int pitch, int value) {
  CHECK_CHANNEL
  CHECK_RANGE_7BIT(pitch)
  CHECK_RANGE_7BIT(value)
  sys_lock();
  inmidi_polyaftertouch(PORT, CHANNEL, pitch, value);
  sys_unlock();
  return 0;
}

int libpd_midibyte(int port, int byte) {
  CHECK_PORT
  CHECK_RANGE_8BIT(byte)
  sys_lock();
  inmidi_byte(port, byte);
  sys_unlock();
  return 0;
}

int libpd_sysex(int port, int byte) {
  CHECK_PORT
  CHECK_RANGE_8BIT(byte)
  sys_lock();
  inmidi_sysex(port, byte);
  sys_unlock();
  return 0;
}

int libpd_sysrealtime(int port, int byte) {
  CHECK_PORT
  CHECK_RANGE_8BIT(byte)
  sys_lock();
  inmidi_realtimein(port, byte);
  sys_unlock();
  return 0;
}

void libpd_set_noteonhook(const t_libpd_noteonhook hook) {
  IMP->i_hooks.h_noteonhook = hook;
}

void libpd_set_controlchangehook(const t_libpd_controlchangehook hook) {
  IMP->i_hooks.h_controlchangehook = hook;
}

void libpd_set_programchangehook(const t_libpd_programchangehook hook) {
  IMP->i_hooks.h_programchangehook = hook;
}

void libpd_set_pitchbendhook(const t_libpd_pitchbendhook hook) {
  IMP->i_hooks.h_pitchbendhook = hook;
}

void libpd_set_aftertouchhook(const t_libpd_aftertouchhook hook) {
  IMP->i_hooks.h_aftertouchhook = hook;
}

void libpd_set_polyaftertouchhook(const t_libpd_polyaftertouchhook hook) {
  IMP->i_hooks.h_polyaftertouchhook = hook;
}

void libpd_set_midibytehook(const t_libpd_midibytehook hook) {
  IMP->i_hooks.h_midibytehook = hook;
}

int libpd_start_gui(const char *path) {
  int retval;
  sys_lock();
  retval = sys_startgui(path);
  sys_unlock();
  return retval;
}

void libpd_stop_gui(void) {
  sys_lock();
  sys_stopgui();
  sys_unlock();
}

int libpd_poll_gui(void) {
  int retval;
  sys_lock();
  retval = sys_pollgui();
  sys_unlock();
  return (retval);
}

t_pdinstance *libpd_new_instance(void) {
#ifdef PDINSTANCE
  t_pdinstance *pd = pdinstance_new();
  pd->pd_stuff->st_impdata = libpdimp_new();
  return pd;
#else
  return NULL;
#endif
}

void libpd_set_instance(t_pdinstance *pd) {
#ifdef PDINSTANCE
  pd_setinstance(pd);
#endif
}

void libpd_free_instance(t_pdinstance *pd) {
#ifdef PDINSTANCE
  if (pd == &pd_maininstance) return;
  libpdimp_free(pd->pd_stuff->st_impdata);
  pdinstance_free(pd);
#endif
}

t_pdinstance *libpd_this_instance(void) {
  return pd_this;
}

t_pdinstance *libpd_main_instance(void) {
  return &pd_maininstance;
}

int libpd_num_instances(void) {
#ifdef PDINSTANCE
  return pd_ninstances;
#else
  return 1;
#endif
}

void libpd_set_instancedata(void *data, t_libpd_freehook freehook) {
  LIBPDSTUFF->i_data = data;
  LIBPDSTUFF->i_data_freehook = freehook;
}

void* libpd_get_instancedata() {
  return LIBPDSTUFF->i_data;
}

void libpd_set_verbose(int verbose) {
  if (verbose < 0) verbose = 0;
  sys_verbose = verbose;
}

int libpd_get_verbose(void) {
  return sys_verbose;
}

// dummy routines needed because we don't use s_file.c
void glob_loadpreferences(t_pd *dummy, t_symbol *s) {}
void glob_savepreferences(t_pd *dummy, t_symbol *s) {}
void glob_forgetpreferences(t_pd *dummy) {}
void sys_loadpreferences(const char *filename, int startingup) {}
int sys_oktoloadfiles(int done) {return 1;}
void sys_savepreferences(const char *filename) {} // used in s_path.c


================================================
FILE: libs/libpd/libpd_wrapper/z_libpd.h
================================================
/*
 * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)
 * Copyright (c) 2012-2021 libpd team
 *
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
 *
 * See https://github.com/libpd/libpd/wiki for documentation
 *
 */

#ifndef __Z_LIBPD_H__
#define __Z_LIBPD_H__

#ifdef __cplusplus
extern "C"
{
#endif

#include "m_pd.h"

/* initializing pd */

/// initialize libpd; it is safe to call this more than once
/// returns 0 on success or -1 if libpd was already initialized
/// note: sets SIGFPE handler to keep bad pd patches from crashing due to divide
///       by 0, set any custom handling after calling this function
EXTERN int libpd_init(void);

/// clear the libpd search path for abstractions and externals
/// note: this is called by libpd_init()
EXTERN void libpd_clear_search_path(void);

/// add a path to the libpd search paths
/// relative paths are relative to the current working directory
/// unlike desktop pd, *no* search paths are set by default (ie. extra)
EXTERN void libpd_add_to_search_path(const char *path);

/* opening patches */

/// open a patch by filename and parent dir path
/// returns an opaque patch handle pointer or NULL on failure
EXTERN void *libpd_openfile(const char *name, const char *dir);

/// close a patch by patch handle pointer
EXTERN void libpd_closefile(void *p);

/// get the $0 id of the patch handle pointer
/// returns $0 value or 0 if the patch is non-existent
EXTERN int libpd_getdollarzero(void *p);

/* audio processing */

/// return pd's fixed block size: the number of sample frames per 1 pd tick
EXTERN int libpd_blocksize(void);

/// initialize audio rendering
/// returns 0 on success
EXTERN int libpd_init_audio(int inChannels, int outChannels, int sampleRate);

/// process interleaved float samples from inBuffer -> libpd -> outBuffer
/// buffer sizes are based on # of ticks and channels where:
///     size = ticks * libpd_blocksize() * (in/out)channels
/// returns 0 on success
EXTERN int libpd_process_float(const int ticks,
    const float *inBuffer, float *outBuffer);

/// process interleaved short samples from inBuffer -> libpd -> outBuffer
/// buffer sizes are based on # of ticks and channels where:
///     size = ticks * libpd_blocksize() * (in/out)channels
/// float samples are converted to short by multiplying by 32767 and casting,
/// so any values received from pd patches beyond -1 to 1 will result in garbage
/// note: for efficiency, does *not* clip input
/// returns 0 on success
EXTERN int libpd_process_short(const int ticks,
    const short *inBuffer, short *outBuffer);

/// process interleaved double samples from inBuffer -> libpd -> outBuffer
/// buffer sizes are based on # of ticks and channels where:
///     size = ticks * libpd_blocksize() * (in/out)channels
/// note: only full-precision when compiled with PD_FLOATSIZE=64
/// returns 0 on success
EXTERN int libpd_process_double(const int ticks,
    const double *inBuffer, double *outBuffer);

/// process non-interleaved float samples from inBuffer -> libpd -> outBuffer
/// copies buffer contents to/from libpd without striping
/// buffer sizes are based on a single tick and # of channels where:
///     size = libpd_blocksize() * (in/out)channels
/// returns 0 on success
EXTERN int libpd_process_raw(const float *inBuffer, float *outBuffer);

/// process non-interleaved short samples from inBuffer -> libpd -> outBuffer
/// copies buffer contents to/from libpd without striping
/// buffer sizes are based on a single tick and # of channels where:
///     size = libpd_blocksize() * (in/out)channels
/// float samples are converted to short by multiplying by 32767 and casting,
/// so any values received from pd patches beyond -1 to 1 will result in garbage
/// note: for efficiency, does *not* clip input
/// returns 0 on success
EXTERN int libpd_process_raw_short(const short *inBuffer, short *outBuffer);

/// process non-interleaved double samples from inBuffer -> libpd -> outBuffer
/// copies buffer contents to/from libpd without striping
/// buffer sizes are based on a single tick and # of channels where:
///     size = libpd_blocksize() * (in/out)channels
/// note: only full-precision when compiled with PD_FLOATSIZE=64
/// returns 0 on success
EXTERN int libpd_process_raw_double(const double *inBuffer, double *outBuffer);

/* array access */

/// get the size of an array by name
/// returns size or negative error code if non-existent
EXTERN int libpd_arraysize(const char *name);

/// (re)size an array by name; sizes <= 0 are clipped to 1
/// returns 0 on success or negative error code if non-existent
EXTERN int libpd_resize_array(const char *name, long size);

/// read n values from named src array and write into dest starting at an offset
/// note: performs no bounds checking on dest
/// returns 0 on success or a negative error code if the array is non-existent
/// or offset + n exceeds range of array
EXTERN int libpd_read_array(float *dest, const char *name, int offset, int n);

/// read n values from src and write into named dest array starting at an offset
/// note: performs no bounds checking on src
/// returns 0 on success or a negative error code if the array is non-existent
/// or offset + n exceeds range of array
EXTERN int libpd_write_array(const char *name, int offset,
    const float *src, int n);

/// read n values from named src array and write into dest starting at an offset
/// note: performs no bounds checking on dest
/// note: only full-precision when compiled with PD_FLOATSIZE=64
/// returns 0 on success or a negative error code if the array is non-existent
/// or offset + n exceeds range of array
/// double-precision variant of libpd_read_array()
EXTERN int libpd_read_array_double(double *dest, const char *src,
    int offset, int n);

/// read n values from src and write into named dest array starting at an offset
/// note: performs no bounds checking on src
/// note: only full-precision when compiled with PD_FLOATSIZE=64
/// returns 0 on success or a negative error code if the array is non-existent
/// or offset + n exceeds range of array
/// double-precision variant of libpd_write_array()
EXTERN int libpd_write_array_double(const char *dest, int offset,
    const double *src, int n);

/* sending messages to pd */

/// send a bang to a destination receiver
/// ex: libpd_bang("foo") will send a bang to [s foo] on the next tick
/// returns 0 on success or -1 if receiver name is non-existent
EXTERN int libpd_bang(const char *recv);

/// send a float to a destination receiver
/// ex: libpd_float("foo", 1) will send a 1.0 to [s foo] on the next tick
/// returns 0 on success or -1 if receiver name is non-existent
EXTERN int libpd_float(const char *recv, float x);

/// send a double to a destination receiver
/// ex: libpd_double("foo", 1.1) will send a 1.1 to [s foo] on the next tick
/// note: only full-precision when compiled with PD_FLOATSIZE=64
/// returns 0 on success or -1 if receiver name is non-existent
EXTERN int libpd_double(const char *recv, double x);

/// send a symbol to a destination receiver
/// ex: libpd_symbol("foo", "bar") will send "bar" to [s foo] on the next tick
/// returns 0 on success or -1 if receiver name is non-existent
EXTERN int libpd_symbol(const char *recv, const char *symbol);

/* sending compound messages: sequenced function calls */

/// start composition of a new list or typed message of up to max element length
/// messages can be of a smaller length as max length is only an upper bound
/// note: no cleanup is required for unfinished messages
/// returns 0 on success or nonzero if the length is too large
EXTERN int libpd_start_message(int maxlen);

/// add a float to the current message in progress
EXTERN void libpd_add_float(float x);

/// add a double to the current message in progress
/// note: only full-precision when compiled with PD_FLOATSIZE=64
EXTERN void libpd_add_double(double x);

/// add a symbol to the current message in progress
EXTERN void libpd_add_symbol(const char *symbol);

/// finish current message and send as a list to a destination receiver
/// returns 0 on success or -1 if receiver name is non-existent
/// ex: send [list 1 2 bar( to [s foo] on the next tick with:
///     libpd_start_message(3);
///     libpd_add_float(1);
///     libpd_add_float(2);
///     libpd_add_symbol("bar");
///     libpd_finish_list("foo");
EXTERN int libpd_finish_list(const char *recv);

/// finish current message and send as a typed message to a destination receiver
/// note: typed message handling currently only supports up to 4 elements
///       internally, additional elements may be ignored
/// returns 0 on success or -1 if receiver name is non-existent
/// ex: send [; pd dsp 1( on the next tick with:
///     libpd_start_message(1);
///     libpd_add_float(1);
///     libpd_finish_message("pd", "dsp");
EXTERN int libpd_finish_message(const char *recv, const char *msg);

/* sending compound messages: atom array */

/// write a float value to the given atom
EXTERN void libpd_set_float(t_atom *a, float x);

/// write a double value to the given atom
/// note: only full-precision when compiled with PD_FLOATSIZE=64
EXTERN void libpd_set_double(t_atom *v, double x);

/// write a symbol value to the given atom
EXTERN void libpd_set_symbol(t_atom *a, const char *symbol);

/// send an atom array of a given length as a list to a destination receiver
/// returns 0 on success or -1 if receiver name is non-existent
/// ex: send [list 1 2 bar( to [r foo] on the next tick with:
///     t_atom v[3];
///     libpd_set_float(v, 1);
///     libpd_set_float(v + 1, 2);
///     libpd_set_symbol(v + 2, "bar");
///     libpd_list("foo", 3, v);
EXTERN int libpd_list(const char *recv, int argc, t_atom *argv);

/// send a atom array of a given length as a typed message to a destination
/// receiver, returns 0 on success or -1 if receiver name is non-existent
/// ex: send [; pd dsp 1( on the next tick with:
///     t_atom v[1];
///     libpd_set_float(v, 1);
///     libpd_message("pd", "dsp", 1, v);
EXTERN int libpd_message(const char *recv, const char *msg,
    int argc, t_atom *argv);

/* receiving messages from pd */

/// subscribe to messages sent to a source receiver
/// ex: libpd_bind("foo") adds a "virtual" [r foo] which forwards messages to
///     the libpd message hooks
/// returns an opaque receiver pointer or NULL on failure
EXTERN void *libpd_bind(const char *recv);

/// unsubscribe and free a source receiver object created by libpd_bind()
EXTERN void libpd_unbind(void *p);

/// check if a source receiver object exists with a given name
/// returns 1 if the receiver exists, otherwise 0
EXTERN int libpd_exists(const char *recv);

/// print receive hook signature, s is the string to be printed
/// note: default behavior returns individual words and spaces:
///     line "hello 123" is received in 4 parts -> "hello", " ", "123\n"
typedef void (*t_libpd_printhook)(const char *s);

/// bang receive hook signature, recv is the source receiver name
typedef void (*t_libpd_banghook)(const char *recv);

/// float receive hook signature, recv is the source receiver name
typedef void (*t_libpd_floathook)(const char *recv, float x);

/// double receive hook signature, recv is the source receiver name
/// note: only full-precision when compiled with PD_FLOATSIZE=64
typedef void (*t_libpd_doublehook)(const char *recv, double x);

/// symbol receive hook signature, recv is the source receiver name
typedef void (*t_libpd_symbolhook)(const char *recv, const char *symbol);

/// list receive hook signature, recv is the source receiver name
/// argc is the list length and vector argv contains the list elements
/// which can be accessed using the atom accessor functions, ex:
///     int i;
///     for (i = 0; i < argc; i++) {
///       t_atom *a = &argv[n];
///       if (libpd_is_float(a)) {
///         float x = libpd_get_float(a);
///         // do something with float x
///       } else if (libpd_is_symbol(a)) {
///         char *s = libpd_get_symbol(a);
///         // do something with c string s
///       }
///     }
/// note: check for both float and symbol types as atom may also be a pointer
typedef void (*t_libpd_listhook)(const char *recv, int argc, t_atom *argv);

/// typed message hook signature, recv is the source receiver name and msg is
/// the typed message name: a message like [; foo bar 1 2 a b( will trigger a
/// function call like libpd_messagehook("foo", "bar", 4, argv)
/// argc is the list length and vector argv contains the
/// list elements which can be accessed using the atom accessor functions, ex:
///     int i;
///     for (i = 0; i < argc; i++) {
///       t_atom *a = &argv[n];
///       if (libpd_is_float(a)) {
///         float x = libpd_get_float(a);
///         // do something with float x
///       } else if (libpd_is_symbol(a)) {
///         char *s = libpd_get_symbol(a);
///         // do something with c string s
///       }
///     }
/// note: check for both float and symbol types as atom may also be a pointer
typedef void (*t_libpd_messagehook)(const char *recv, const char *msg,
    int argc, t_atom *argv);

/// set the print receiver hook, prints to stdout by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_printhook(const t_libpd_printhook hook);

/// set the bang receiver hook, NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_banghook(const t_libpd_banghook hook);

/// set the float receiver hook, NULL by default
/// note: avoid calling this while DSP is running
/// note: you can either have a float receiver hook, or a double receiver
///       hook (see below), but not both.
///       calling this, will automatically unset the double receiver hook
/// note: only full-precision when compiled with PD_FLOATSIZE=64
EXTERN void libpd_set_floathook(const t_libpd_floathook hook);

/// set the double receiver hook, NULL by default
/// note: avoid calling this while DSP is running
/// note: you can either have a double receiver hook, or a float receiver
///       hook (see above), but not both.
///       calling this, will automatically unset the float receiver hook
/// note: only full-precision when compiled with PD_FLOATSIZE=64
EXTERN void libpd_set_doublehook(const t_libpd_doublehook hook);

/// set the symbol receiver hook, NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_symbolhook(const t_libpd_symbolhook hook);

/// set the list receiver hook, NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_listhook(const t_libpd_listhook hook);

/// set the message receiver hook, NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_messagehook(const t_libpd_messagehook hook);

/// check if an atom is a float type: 0 or 1
/// note: no NULL check is performed
EXTERN int libpd_is_float(t_atom *a);

/// check if an atom is a symbol type: 0 or 1
/// note: no NULL check is performed
EXTERN int libpd_is_symbol(t_atom *a);

/// get the float value of an atom
/// note: no NULL or type checks are performed
EXTERN float libpd_get_float(t_atom *a);

/// returns the double value of an atom
/// note: no NULL or type checks are performed
/// note: only full-precision when compiled with PD_FLOATSIZE=64
EXTERN double libpd_get_double(t_atom *a);

/// returns the symbol value of an atom
/// note: no NULL or type checks are performed
EXTERN const char *libpd_get_symbol(t_atom *a);

/// increment to the next atom in an atom vector
/// returns next atom or NULL, assuming the atom vector is NULL-terminated
EXTERN t_atom *libpd_next_atom(t_atom *a);

/* sending MIDI messages to pd */

/// send a MIDI note on message to [notein] objects
/// channel is 0-indexed, pitch is 0-127, and velocity is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: there is no note off message, send a note on with velocity = 0 instead
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_noteon(int channel, int pitch, int velocity);

/// send a MIDI control change message to [ctlin] objects
/// channel is 0-indexed, controller is 0-127, and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_controlchange(int channel, int controller, int value);

/// send a MIDI program change message to [pgmin] objects
/// channel is 0-indexed and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_programchange(int channel, int value);

/// send a MIDI pitch bend message to [bendin] objects
/// channel is 0-indexed and value is -8192-8192
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: [bendin] outputs 0-16383 while [bendout] accepts -8192-8192
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_pitchbend(int channel, int value);

/// send a MIDI after touch message to [touchin] objects
/// channel is 0-indexed and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_aftertouch(int channel, int value);

/// send a MIDI poly after touch message to [polytouchin] objects
/// channel is 0-indexed, pitch is 0-127, and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_polyaftertouch(int channel, int pitch, int value);

/// send a raw MIDI byte to [midiin] objects
/// port is 0-indexed and byte is 0-256
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_midibyte(int port, int byte);

/// send a raw MIDI byte to [sysexin] objects
/// port is 0-indexed and byte is 0-256
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_sysex(int port, int byte);

/// send a raw MIDI byte to [realtimein] objects
/// port is 0-indexed and byte is 0-256
/// returns 0 on success or -1 if an argument is out of range
EXTERN int libpd_sysrealtime(int port, int byte);

/* receiving MIDI messages from pd */

/// MIDI note on receive hook signature
/// channel is 0-indexed, pitch is 0-127, and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: there is no note off message, note on w/ velocity = 0 is used instead
/// note: out of range values from pd are clamped
typedef void (*t_libpd_noteonhook)(int channel, int pitch, int velocity);

/// MIDI control change receive hook signature
/// channel is 0-indexed, controller is 0-127, and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: out of range values from pd are clamped
typedef void (*t_libpd_controlchangehook)(int channel,
    int controller, int value);

/// MIDI program change receive hook signature
/// channel is 0-indexed and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: out of range values from pd are clamped
typedef void (*t_libpd_programchangehook)(int channel, int value);

/// MIDI pitch bend receive hook signature
/// channel is 0-indexed and value is -8192-8192
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: [bendin] outputs 0-16383 while [bendout] accepts -8192-8192
/// note: out of range values from pd are clamped
typedef void (*t_libpd_pitchbendhook)(int channel, int value);

/// MIDI after touch receive hook signature
/// channel is 0-indexed and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: out of range values from pd are clamped
typedef void (*t_libpd_aftertouchhook)(int channel, int value);

/// MIDI poly after touch receive hook signature
/// channel is 0-indexed, pitch is 0-127, and value is 0-127
/// channels encode MIDI ports via: libpd_channel = pd_channel + 16 * pd_port
/// note: out of range values from pd are clamped
typedef void (*t_libpd_polyaftertouchhook)(int channel, int pitch, int value);

/// raw MIDI byte receive hook signature
/// port is 0-indexed and byte is 0-256
/// note: out of range values from pd are clamped
typedef void (*t_libpd_midibytehook)(int port, int byte);

/// set the MIDI note on hook to receive from [noteout] objects, NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_noteonhook(const t_libpd_noteonhook hook);

/// set the MIDI control change hook to receive from [ctlout] objects,
/// NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_controlchangehook(const t_libpd_controlchangehook hook);

/// set the MIDI program change hook to receive from [pgmout] objects,
/// NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_programchangehook(const t_libpd_programchangehook hook);

/// set the MIDI pitch bend hook to receive from [bendout] objects,
/// NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_pitchbendhook(const t_libpd_pitchbendhook hook);

/// set the MIDI after touch hook to receive from [touchout] objects,
/// NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_aftertouchhook(const t_libpd_aftertouchhook hook);

/// set the MIDI poly after touch hook to receive from [polytouchout] objects,
/// NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_polyaftertouchhook(const t_libpd_polyaftertouchhook hook);

/// set the raw MIDI byte hook to receive from [midiout] objects,
/// NULL by default
/// note: do not call this while DSP is running
EXTERN void libpd_set_midibytehook(const t_libpd_midibytehook hook);

/* GUI */

/// open the current patches within a pd vanilla GUI
/// requires the path to pd's main folder that contains bin/, tcl/, etc
/// for a macOS .app bundle: /path/to/Pd-#.#-#.app/Contents/Resources
/// returns 0 on success
EXTERN int libpd_start_gui(const char *path);

/// stop the pd vanilla GUI
EXTERN void libpd_stop_gui(void);

/// manually update and handle any GUI messages
/// this is called automatically when using a libpd_process function,
/// note: this also facilitates network message processing, etc so it can be
///       useful to call repeatedly when idle for more throughput
/// returns 1 if the poll found something, in which case it might be desirable
/// to poll again, up to some reasonable limit
EXTERN int libpd_poll_gui(void);

/* multiple instances */

/// create a new pd instance and set as current
/// note: use this in place of pdinstance_new()
/// returns new instance or NULL when libpd is not compiled with PDINSTANCE
EXTERN t_pdinstance *libpd_new_instance(void);

/// set the current pd instance
/// subsequent libpd calls will affect this instance only
/// note: use this in place of pd_setinstance()
/// does nothing when libpd is not compiled with PDINSTANCE
EXTERN void libpd_set_instance(t_pdinstance *pd);

/// free a pd instance and set main instance as current
/// note: use this in place of pdinstance_free()
/// does nothing when libpd is not compiled with PDINSTANCE
EXTERN void libpd_free_instance(t_pdinstance *pd);

/// get the current pd instance
EXTERN t_pdinstance *libpd_this_instance(void);

/// get the main pd instance, always valid
EXTERN t_pdinstance *libpd_main_instance(void);

/// get the number of pd instances, including the main instance
/// returns number or 1 when libpd is not compiled with PDINSTANCE
EXTERN int libpd_num_instances(void);

/// per-instance data free hook signature
typedef void (*t_libpd_freehook)(void *data);

/// set per-instance user data and optional free hook
/// note: if non-NULL, freehook is called by libpd_free_instance()
EXTERN void libpd_set_instancedata(void *data, t_libpd_freehook freehook);

/// get per-instance user data
EXTERN void* libpd_get_instancedata(void);

/* log level */

/// set verbose print state: 0 or 1
EXTERN void libpd_set_verbose(int verbose);

/// get the verbose print state: 0 or 1
EXTERN int libpd_get_verbose(void);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: libs/libpd/pure-data/extra/README.txt
================================================
This is the README file for the "extras" library, which contains Pd objects
which are too specialized or otherwise non-canonical for inclusion into Pd
proper.   This library is part of the regular ("vanilla") Pd distribution.  It
is all open source; see LICENSE.txt in the Pd distribution for details.

contents:

generally useful externs:
[sigmund~] - pitch and sinusoidal peak analysis
[bonk~] - percussion detector
[lrshift~] - left or right shift an audio vector (probably should be standard)

abstractions:
[hilbert~] - Hilbert transform for SSB modulation
[complex-mod~] - ring modulation for complex (real+imaginary) audio signals
[rev1~], etc. - reverberators
[output~] - stereo output abstraction for convenience

externs aimed at particular tasks:
[pd~] - embed one Pd inside another one
[stdout] - send messages to standard out (useful in pd~ sub-process)
[bob~] - Moog ladder filter simulation using a Runge-Kutte ODE solver
[choice] - find the best fit of a vector to a set of example vectors
[loop~] - sample looper

obsolete:
[pique] - fft-based peak finder (use [sigmund~] instead)
[fiddle~] - pitch tracker (use [sigmund~] instead)

The [sigmund~], [bonk~], and [fiddle~] objects have also been compiled for Max/MSP
by Ted Apel; see his website for details.


================================================
FILE: libs/libpd/pure-data/extra/bob~/README.txt
================================================
The bob~ object.  BSD licensed; Copyright notice is in bob~ source code.

Imitates a Moog resonant filter by Runge-Kutte numerical integration of
a differential equation approximately describing the dynamics of the circuit.

Useful references:

Tim Stilson
Analyzing the Moog VCF with Considerations for Digital Implementation
https://ccrma.stanford.edu/~stilti/papers/moogvcf.ps.gz

(sections 1 and 2 are a reasonably good introduction but the model they use
is highly idealized.)

Timothy E. Stinchcombe
Analysis of the Moog Transistor Ladder and Derivative Filters

(long, but a very thorough description of how the filter works including
its nonlinearities)

Antti Huovilainen
Non-linear digital implementation of the moog ladder filter

(comes close to giving a differential equation for a reasonably realistic
model of the filter).

Th differential equations are:

y1' = k * (S(x - r * y4) - S(y1))
y2' = k * (S(y1) - S(y2))
y3' = k * (S(y2) - S(y3))
y4' = k * (S(y3) - S(y4))

where k controls the cutoff frequency, r is feedback (<= 4 for
stability), and S(x) is a saturation function.


================================================
FILE: libs/libpd/pure-data/extra/bob~/bob~.c
================================================
/* bob~ - use a differential equation solver to imitate an analogue circuit */

/* copyright 2015 Miller Puckette - BSD license */

#include "m_pd.h"
#include <math.h>
#define DIM 4
#define FLOAT double

/* if CALCERROR is defined we compute an error estaimate to verify
the filter, outputting it from a second outlet on demand.  This
doubles the computation time, so it's only compiled in for testing. */

/* #define CALCERROR */

typedef struct _params
{
    FLOAT p_input;
    FLOAT p_cutoff;
    FLOAT p_resonance;
    FLOAT p_saturation;
    FLOAT p_derivativeswere[DIM];
} t_params;

    /* imitate the (tanh) clipping function of a transistor pair.  We
    hope/assume the C compiler is smart enough to inline this so use
    a function instead of a #define. */
#if 0
static FLOAT clip(FLOAT value, FLOAT saturation, FLOAT saturationinverse)
{
    return (saturation * tanh(value * saturationinverse));
}
#else
    /* cheaper way - to 4th order, tanh is x - x*x*x/3; this cubic's
    plateaus are at +/- 1 so clip to 1 and evaluate the cubic.
    This is pretty coarse - for instance if you clip a sinusoid this way you
    can sometimes hear the discontinuity in 4th derivative at the clip point */
static FLOAT clip(FLOAT value, FLOAT saturation, FLOAT saturationinverse)
{
    float v2 = (value*saturationinverse > 1 ? 1 :
        (value*saturationinverse < -1 ? -1:
            value*saturationinverse));
    return (saturation * (v2 - (1./3.) * v2 * v2 * v2));
}
#endif

static void calc_derivatives(FLOAT *dstate, FLOAT *state, t_params *params)
{
    FLOAT k = ((float)(2*3.14159)) * params->p_cutoff;
    FLOAT sat = params->p_saturation, satinv = 1./sat;
    FLOAT satstate0 = clip(state[0], sat, satinv);
    FLOAT satstate1 = clip(state[1], sat, satinv);
    FLOAT satstate2 = clip(state[2], sat, satinv);
    dstate[0] = k *
        (clip(params->p_input - params->p_resonance * state[3], sat, satinv)
            - satstate0);
    dstate[1] = k * (satstate0 - satstate1);
    dstate[2] = k * (satstate1 - satstate2);
    dstate[3] = k * (satstate2 - clip(state[3], sat, satinv));
}

static void solver_euler(FLOAT *state, FLOAT *errorestimate, 
    FLOAT stepsize, t_params *params)
{
    FLOAT cumerror = 0;
    int i;
    FLOAT derivatives[DIM];
    calc_derivatives(derivatives, state, params);
    *errorestimate = 0;
    for (i = 0; i < DIM; i++)
    {
        state[i] += stepsize * derivatives[i];
        *errorestimate += (derivatives[i] > params->p_derivativeswere[i] ?
            derivatives[i] - params->p_derivativeswere[i] :
            params->p_derivativeswere[i] - derivatives[i]);
    }
    for (i = 0; i < DIM; i++)
        params->p_derivativeswere[i] = derivatives[i];
}

static void solver_rungekutte(FLOAT *state, FLOAT *errorestimate, 
    FLOAT stepsize, t_params *params)
{
    FLOAT cumerror = 0;
    int i;
    FLOAT deriv1[DIM], deriv2[DIM], deriv3[DIM], deriv4[DIM], tempstate[DIM];
    FLOAT oldstate[DIM], backstate[DIM];
#if CALCERROR
    for (i = 0; i < DIM; i++)
        oldstate[i] = state[i];
#endif
    *errorestimate = 0;
    calc_derivatives(deriv1, state, params);
    for (i = 0; i < DIM; i++)
        tempstate[i] = state[i] + 0.5 * stepsize * deriv1[i];
    calc_derivatives(deriv2, tempstate, params);
    for (i = 0; i < DIM; i++)
        tempstate[i] = state[i] + 0.5 * stepsize * deriv2[i];
    calc_derivatives(deriv3, tempstate, params);
    for (i = 0; i < DIM; i++)
        tempstate[i] = state[i] + stepsize * deriv3[i];
    calc_derivatives(deriv4, tempstate, params);
    for (i = 0; i < DIM; i++)
        state[i] += (1./6.) * stepsize * 
            (deriv1[i] + 2 * deriv2[i] + 2 * deriv3[i] + deriv4[i]);
#if CALCERROR
    calc_derivatives(deriv1, state, params);
    for (i = 0; i < DIM; i++)
        tempstate[i] = state[i] - 0.5 * stepsize * deriv1[i];
    calc_derivatives(deriv2, tempstate, params);
    for (i = 0; i < DIM; i++)
        tempstate[i] = state[i] - 0.5 * stepsize * deriv2[i];
    calc_derivatives(deriv3, tempstate, params);
    for (i = 0; i < DIM; i++)
        tempstate[i] = state[i] - stepsize * deriv3[i];
    calc_derivatives(deriv4, tempstate, params);
    for (i = 0; i < DIM; i++)
    {
        backstate[i] = state[i ]- (1./6.) * stepsize * 
            (deriv1[i] + 2 * deriv2[i] + 2 * deriv3[i] + deriv4[i]);
        *errorestimate += (backstate[i] > oldstate[i] ?
            backstate[i] - oldstate[i] : oldstate[i] - backstate[i]);
    }
#endif
}

typedef struct _bob
{
    t_object x_obj;
    t_float x_f;
    t_outlet *x_out1;    /* signal output */
#ifdef CALCERROR
    t_outlet *x_out2;    /* error estimate */
    FLOAT x_cumerror;
#endif
    t_params x_params;
    FLOAT x_state[DIM];
    FLOAT x_sr;
    int x_oversample;
    int x_errorcount;
} t_bob;

static t_class *bob_class;

static void bob_saturation(t_bob *x, t_float saturation)
{
    if (saturation <= 1e-3)
        saturation = 1e-3;
    x->x_params.p_saturation = saturation;
}

static void bob_oversample(t_bob *x, t_float oversample)
{
    if (oversample <= 1)
        oversample = 1;
    x->x_oversample = oversample;
}

static void bob_clear(t_bob *x)
{
    int i;
    for (i = 0; i < DIM; i++)
        x->x_state[i] = x->x_params.p_derivativeswere[i] = 0;
}

static void bob_error(t_bob *x)
{
#ifdef CALCERROR
    outlet_float(x->x_out2,
        (x->x_errorcount ? x->x_cumerror/x->x_errorcount : 0));
    x->x_cumerror = 0;
    x->x_errorcount = 0;
#else
    post("error estimate unavailable (not compiled in)");
#endif
}

static void bob_print(t_bob *x)
{
    int i;
    for (i = 0; i < DIM; i++)
        post("state %d: %f", i, x->x_state[i]);
    post("saturation %f", x->x_params.p_saturation);
    post("oversample %d", x->x_oversample);
}

static void *bob_new( void)
{
    t_bob *x = (t_bob *)pd_new(bob_class);
    x->x_out1 = outlet_new(&x->x_obj, gensym("signal"));
    inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
    inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
    x->x_f = 0;
    bob_clear(x);
    bob_saturation(x, 3); 
    bob_oversample(x, 2);
#ifdef CALCERROR
    x->x_cumerror = 0;
    x->x_errorcount = 0;
    x->x_out2 = outlet_new(&x->x_obj, gensym("float"));
#endif
    return (x);
}

static t_int *bob_perform(t_int *w)
{
    t_bob *x = (t_bob *)(w[1]);
    t_float *in1 = (t_float *)(w[2]);
    t_float *cutoffin = (t_float *)(w[3]);
    t_float *resonancein = (t_float *)(w[4]);
    t_float *out = (t_float *)(w[5]);
        /* bug fix: output is last state variable, not first */
    FLOAT *outstate =
        (pd_compatibilitylevel > 51? &x->x_state[3] : &x->x_state[0]);
    int n = (int)(w[6]), i, j;
    FLOAT stepsize = 1./(x->x_oversample * x->x_sr);
    FLOAT errorestimate;
    for (i = 0; i < n; i++)
    {
        x->x_params.p_input = *in1++;
        x->x_params.p_cutoff = *cutoffin++;
        if ((x->x_params.p_resonance = *resonancein++) < 0)
            x->x_params.p_resonance = 0;
        for (j = 0; j < x->x_oversample; j++)
            solver_rungekutte(x->x_state, &errorestimate,
                stepsize, &x->x_params);
        *out++ = *outstate;
#if CALCERROR
        x->x_cumerror += errorestimate;
        x->x_errorcount++;
#endif
    }
    return (w+7);
}

static void bob_dsp(t_bob *x, t_signal **sp)
{
    x->x_sr = sp[0]->s_sr;
    dsp_add(bob_perform, 6, x, sp[0]->s_vec, sp[1]->s_vec,
        sp[2]->s_vec, sp[3]->s_vec, (t_int)sp[0]->s_n);
}

void bob_tilde_setup(void)
{
    int i;
    bob_class = class_new(gensym("bob~"),
        (t_newmethod)bob_new, 0, sizeof(t_bob), 0, 0);
    class_addmethod(bob_class, (t_method)bob_saturation, gensym("saturation"),
        A_FLOAT, 0);
    class_addmethod(bob_class, (t_method)bob_oversample, gensym("oversample"),
        A_FLOAT, 0);
    class_addmethod(bob_class, (t_method)bob_clear, gensym("clear"), 0);
    class_addmethod(bob_class, (t_method)bob_print, gensym("print"), 0);
    class_addmethod(bob_class, (t_method)bob_error, gensym("error"), 0);

    class_addmethod(bob_class, (t_method)bob_dsp, gensym("dsp"), A_CANT, 0);
    CLASS_MAINSIGNALIN(bob_class, t_bob, x_f);
}


================================================
FILE: libs/libpd/pure-data/extra/bonk~/bonk~.c
================================================
/*
 ###########################################################################
 # bonk~ - a Max/MSP external
 # by miller puckette and ted apel
 # http://crca.ucsd.edu/~msp/
 # Max/MSP port by barry threw
 # http://www.barrythrew.com
 # me@barrythrew.com
 # San Francisco, CA
 # (c) 2008
 # for Kesumo - http://www.kesumo.com
 ###########################################################################
 // bonk~ detects attacks in an audio signal
 ###########################################################################
 This software is copyrighted by Miller Puckette and others.  The following
 terms (the "Standard Improved BSD License") apply to all files associated with
 the software unless explicitly disclaimed in individual files:
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
 
 1. Redistributions of source code must retain the above copyright
 notice, this list of conditions and the following disclaimer.
 2. Redistributions in binary form must reproduce the above  
 copyright notice, this list of conditions and the following 
 disclaimer in the documentation and/or other materials provided
 with the distribution.
 3. The name of the author may not be used to endorse or promote
 products derived from this software without specific prior 
 written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   
 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
dolist:
decay and other times in msec 
*/

#include <math.h>
#include <stdio.h>
#include <string.h>

/* These pragmas are only used for MSVC, not MinGW or Cygwin <hans@at.or.at> */
#ifdef _MSC_VER
#pragma warning (disable: 4305 4244)
#endif
 
#ifdef MSP
#include "ext.h"
#include "z_dsp.h"
#include "math.h"
#include "ext_support.h"
#include "ext_proto.h"
#include "ext_obex.h"

typedef double t_floatarg;      /* from m_pd.h */
typedef float t_float;               /* from m_pd.h */
#define flog log
#define fexp exp
#define fsqrt sqrt
#define t_resizebytes(a, b, c) t_resizebytes((char *)(a), (b), (c))

void *bonk_class;
#define getbytes t_getbytes
#define freebytes t_freebytes
#endif /* MSP */

#ifdef PD
#include "m_pd.h"
static t_class *bonk_class;
#endif

#ifdef _WIN32
# include <malloc.h> /* MSVC or mingw on windows */
#elif defined(__linux__) || defined(__APPLE__)
# include <alloca.h> /* linux, mac, mingw, cygwin */
#else
# include <stdlib.h> /* BSDs for example */
#endif

/* ------------------------ bonk~ ----------------------------- */

#define DEFNPOINTS 256
#define MAXCHANNELS 8
#define MINPOINTS 64
#define DEFPERIOD 128
#define DEFNFILTERS 11
#define DEFHALFTONES 6
#define DEFOVERLAP 1
#define DEFFIRSTBIN 1
#define DEFMINBANDWIDTH 1.5
#define DEFHITHRESH 5
#define DEFLOTHRESH 2.5
#define DEFMASKTIME 4
#define DEFMASKDECAY 0.7
#define DEFDEBOUNCEDECAY 0
#define DEFMINVEL 7
#define DEFATTACKBINS 1
#define MAXATTACKWAIT 4

typedef struct _filterkernel
{
    int k_filterpoints;
    int k_hoppoints;
    int k_skippoints;
    int k_nhops;
    t_float k_centerfreq;        /* center frequency, bins */
    t_float k_bandwidth;         /* bandwidth, bins */
    t_float *k_stuff;
} t_filterkernel;

typedef struct _filterbank
{
    int b_nfilters;             /* number of filters in bank */
    int b_npoints;              /* input vector size */
    t_float b_halftones;        /* filter bandwidth in halftones */
    t_float b_overlap;          /* overlap; default 1 for 1/2-power pts */
    t_float b_firstbin;         /* freq of first filter in bins, default 1 */
    t_float b_minbandwidth;     /* minimum bandwidth, default 1.5 */
    t_filterkernel *b_vec;      /* filter kernels */
    int b_refcount;             /* number of bonk~ objects using this */
    struct _filterbank *b_next; /* next in linked list */
} t_filterbank;

#if 0   /* this is the design for 1.0: */
static t_filterkernel bonk_filterkernels[] =
    {{256, 2, .01562}, {256, 4, .01562}, {256, 6, .01562}, {180, 6, .02222},
    {128, 6, .01803}, {90, 6, .02222}, {64, 6, .02362}, {46, 6, .02773},
    {32, 6, .03227}, {22, 6, .03932}, {16, 6, .04489}};
#endif

#if 0
    /* here's the 1.1 rev: */
static t_filterkernel bonk_filterkernels[] =
    {{256, 1, .01562, 0}, {256,
Download .txt
gitextract_4rjwthh6/

├── .gitignore
├── CHANGES.txt
├── LICENSE.txt
├── README.md
├── addon_config.mk
├── doc/
│   ├── interface_sketch.txt
│   └── logo/
│       ├── libpd.pd
│       ├── logo.pd
│       └── openFrameworks.pd
├── libs/
│   └── libpd/
│       ├── cpp/
│       │   ├── LICENSE.txt
│       │   ├── PdBase.hpp
│       │   ├── PdMidiReceiver.hpp
│       │   ├── PdReceiver.hpp
│       │   └── PdTypes.hpp
│       ├── libpd_wrapper/
│       │   ├── s_libpdmidi.c
│       │   ├── util/
│       │   │   ├── ringbuffer.c
│       │   │   ├── ringbuffer.h
│       │   │   ├── z_print_util.c
│       │   │   ├── z_print_util.h
│       │   │   ├── z_queued.c
│       │   │   └── z_queued.h
│       │   ├── x_libpdreceive.c
│       │   ├── x_libpdreceive.h
│       │   ├── z_hooks.c
│       │   ├── z_hooks.h
│       │   ├── z_libpd.c
│       │   └── z_libpd.h
│       └── pure-data/
│           ├── extra/
│           │   ├── README.txt
│           │   ├── bob~/
│           │   │   ├── README.txt
│           │   │   └── bob~.c
│           │   ├── bonk~/
│           │   │   ├── bonk~.c
│           │   │   └── templates.txt
│           │   ├── choice/
│           │   │   └── choice.c
│           │   ├── fiddle~/
│           │   │   └── fiddle~.c
│           │   ├── loop~/
│           │   │   └── loop~.c
│           │   ├── lrshift~/
│           │   │   └── lrshift~.c
│           │   ├── pd~/
│           │   │   ├── binarymsg.c
│           │   │   ├── notes.txt
│           │   │   ├── pdsched.c
│           │   │   └── pd~.c
│           │   ├── pique/
│           │   │   └── pique.c
│           │   ├── sigmund~/
│           │   │   └── sigmund~.c
│           │   └── stdout/
│           │       └── stdout.c
│           └── src/
│               ├── d_arithmetic.c
│               ├── d_array.c
│               ├── d_ctl.c
│               ├── d_dac.c
│               ├── d_delay.c
│               ├── d_fft.c
│               ├── d_fft_fftsg.c
│               ├── d_filter.c
│               ├── d_global.c
│               ├── d_math.c
│               ├── d_misc.c
│               ├── d_osc.c
│               ├── d_resample.c
│               ├── d_soundfile.c
│               ├── d_soundfile.h
│               ├── d_soundfile_aiff.c
│               ├── d_soundfile_caf.c
│               ├── d_soundfile_next.c
│               ├── d_soundfile_wave.c
│               ├── d_ugen.c
│               ├── g_all_guis.c
│               ├── g_all_guis.h
│               ├── g_array.c
│               ├── g_bang.c
│               ├── g_canvas.c
│               ├── g_canvas.h
│               ├── g_clone.c
│               ├── g_editor.c
│               ├── g_editor_extras.c
│               ├── g_graph.c
│               ├── g_guiconnect.c
│               ├── g_io.c
│               ├── g_mycanvas.c
│               ├── g_numbox.c
│               ├── g_radio.c
│               ├── g_readwrite.c
│               ├── g_rtext.c
│               ├── g_scalar.c
│               ├── g_slider.c
│               ├── g_template.c
│               ├── g_text.c
│               ├── g_toggle.c
│               ├── g_traversal.c
│               ├── g_undo.c
│               ├── g_undo.h
│               ├── g_vumeter.c
│               ├── m_atom.c
│               ├── m_binbuf.c
│               ├── m_class.c
│               ├── m_conf.c
│               ├── m_glob.c
│               ├── m_imp.h
│               ├── m_memory.c
│               ├── m_obj.c
│               ├── m_pd.c
│               ├── m_pd.h
│               ├── m_private_utils.h
│               ├── m_sched.c
│               ├── s_audio.c
│               ├── s_audio_dummy.c
│               ├── s_inter.c
│               ├── s_inter_gui.c
│               ├── s_loader.c
│               ├── s_main.c
│               ├── s_net.c
│               ├── s_net.h
│               ├── s_path.c
│               ├── s_print.c
│               ├── s_stuff.h
│               ├── s_utf8.c
│               ├── s_utf8.h
│               ├── x_acoustics.c
│               ├── x_arithmetic.c
│               ├── x_array.c
│               ├── x_connective.c
│               ├── x_file.c
│               ├── x_gui.c
│               ├── x_interface.c
│               ├── x_list.c
│               ├── x_midi.c
│               ├── x_misc.c
│               ├── x_net.c
│               ├── x_scalar.c
│               ├── x_text.c
│               ├── x_time.c
│               ├── x_vexp.c
│               ├── x_vexp.h
│               ├── x_vexp_fun.c
│               └── x_vexp_if.c
├── pdExample/
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── pd/
│   │           ├── abs/
│   │           │   └── test_abs.pd
│   │           ├── instance.pd
│   │           └── test.pd
│   └── src/
│       ├── main.cpp
│       ├── ofApp.cpp
│       └── ofApp.h
├── pdExampleIOS/
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── pd/
│   │           ├── abs/
│   │           │   └── test_abs.pd
│   │           ├── instance.pd
│   │           └── test.pd
│   └── src/
│       ├── main.mm
│       ├── ofApp.h
│       └── ofApp.mm
├── pdMultiExample/
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── test.pd
│   └── src/
│       ├── main.cpp
│       ├── ofApp.cpp
│       └── ofApp.h
├── pitchShifter/
│   ├── LICENSE.txt
│   ├── README.md
│   ├── addons.make
│   ├── bin/
│   │   └── data/
│   │       ├── .gitkeep
│   │       └── pd/
│   │           ├── _main.pd
│   │           └── rc/
│   │               ├── e_pshift~-help.pd
│   │               ├── e_pshift~.pd
│   │               ├── u_spigot~-help.pd
│   │               └── u_spigot~.pd
│   └── src/
│       ├── main.cpp
│       ├── ofApp.cpp
│       ├── ofApp.h
│       ├── ofxSimpleSlider.cpp
│       └── ofxSimpleSlider.h
├── scripts/
│   └── update_libpd.sh
└── src/
    ├── ofxPd.cpp
    └── ofxPd.h
Download .txt
Showing preview only (330K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4033 symbols across 118 files)

FILE: libs/libpd/cpp/PdBase.hpp
  type _atom (line 41) | struct _atom
  type pd (line 43) | namespace pd {
    class PdBase (line 56) | class PdBase {
      method PdBase (line 60) | PdBase() {
      method init (line 114) | virtual bool init(const int numInChannels, const int numOutChannels,
      method clear (line 171) | virtual void clear() {
      method addToSearchPath (line 234) | virtual void addToSearchPath(const std::string &path) {
      method clearSearchPath (line 240) | virtual void clearSearchPath() {
      method openPatch (line 256) | virtual pd::Patch openPatch(const std::string &patch,
      method openPatch (line 282) | virtual pd::Patch openPatch(pd::Patch &patch) {
      method closePatch (line 288) | virtual void closePatch(const std::string &patch) {
      method closePatch (line 299) | virtual void closePatch(pd::Patch &patch) {
      method processFloat (line 322) | bool processFloat(int ticks, const float *inBuffer, float *outBuffer) {
      method processShort (line 329) | bool processShort(int ticks, const short *inBuffer, short *outBuffer) {
      method processDouble (line 336) | bool processDouble(int ticks, const double *inBuffer, double *outBuf...
      method processRaw (line 343) | bool processRaw(const float *inBuffer, float *outBuffer) {
      method processRawShort (line 350) | bool processRawShort(const short *inBuffer, short *outBuffer) {
      method processRawDouble (line 357) | bool processRawDouble(const double *inBuffer, double *outBuffer) {
      method computeAudio (line 370) | virtual void computeAudio(bool state) {
      method subscribe (line 388) | virtual void subscribe(const std::string &source) {
      method unsubscribe (line 402) | virtual void unsubscribe(const std::string &source) {
      method exists (line 416) | virtual bool exists(const std::string &source) {
      method unsubscribeAll (line 425) | virtual void unsubscribeAll() {
      method receiveMessages (line 447) | virtual void receiveMessages() {
      method receiveMidi (line 453) | virtual void receiveMidi() {
      method setReceiver (line 467) | void setReceiver(pd::PdReceiver *receiver) {
      method setMidiReceiver (line 479) | void setMidiReceiver(pd::PdMidiReceiver *midiReceiver) {
      method sendBang (line 486) | virtual void sendBang(const std::string &dest) {
      method sendFloat (line 492) | virtual void sendFloat(const std::string &dest, float value) {
      method sendSymbol (line 498) | virtual void sendSymbol(const std::string &dest,
      method startMessage (line 523) | virtual void startMessage() {
      method addFloat (line 537) | virtual void addFloat(const float num) {
      method addSymbol (line 559) | virtual void addSymbol(const std::string &symbol) {
      method finishList (line 581) | virtual void finishList(const std::string &dest) {
      method finishMessage (line 599) | virtual void finishMessage(const std::string &dest,
      method sendList (line 631) | virtual void sendList(const std::string &dest, const pd::List &list) {
      method sendMessage (line 664) | virtual void sendMessage(const std::string &dest,
      method sendNoteOn (line 703) | virtual void sendNoteOn(const int channel,
      method sendControlChange (line 711) | virtual void sendControlChange(const int channel,
      method sendProgramChange (line 719) | virtual void sendProgramChange(const int channel, const int value) {
      method sendPitchBend (line 728) | virtual void sendPitchBend(const int channel, const int value) {
      method sendAftertouch (line 734) | virtual void sendAftertouch(const int channel, const int value) {
      method sendPolyAftertouch (line 740) | virtual void sendPolyAftertouch(const int channel,
      method sendMidiByte (line 758) | virtual void sendMidiByte(const int port, const int value) {
      method sendSysex (line 764) | virtual void sendSysex(const int port, const int value) {
      method sendSysRealTime (line 770) | virtual void sendSysRealTime(const int port, const int value) {
      method PdBase (line 785) | PdBase& operator<<(const pd::Bang &var) {
      method PdBase (line 796) | PdBase& operator<<(const pd::Float &var) {
      method PdBase (line 807) | PdBase& operator<<(const pd::Symbol &var) {
      method PdBase (line 823) | PdBase& operator<<(const pd::StartMessage &) {
      method PdBase (line 829) | PdBase& operator<<(const pd::FinishList &var) {
      method PdBase (line 835) | PdBase& operator<<(const pd::FinishMessage &var) {
      method PdBase (line 841) | PdBase& operator<<(const bool var) {
      method PdBase (line 847) | PdBase& operator<<(const int var) {
      method PdBase (line 866) | PdBase& operator<<(const float var) {
      method PdBase (line 872) | PdBase& operator<<(const double var) {
      method PdBase (line 878) | PdBase& operator<<(const char var) {
      method PdBase (line 886) | PdBase& operator<<(const char *var) {
      method PdBase (line 892) | PdBase& operator<<(const std::string &var) {
      method PdBase (line 906) | PdBase& operator<<(const pd::NoteOn &var) {
      method PdBase (line 912) | PdBase& operator<<(const pd::ControlChange &var) {
      method PdBase (line 918) | PdBase& operator<<(const pd::ProgramChange &var) {
      method PdBase (line 924) | PdBase& operator<<(const pd::PitchBend &var) {
      method PdBase (line 930) | PdBase& operator<<(const pd::Aftertouch &var) {
      method PdBase (line 936) | PdBase& operator<<(const pd::PolyAftertouch &var) {
      method PdBase (line 948) | PdBase& operator<<(const pd::StartMidi &var) {
      method PdBase (line 961) | PdBase& operator<<(const pd::StartSysex &var) {
      method PdBase (line 974) | PdBase& operator<<(const pd::StartSysRealTime &var) {
      method PdBase (line 987) | PdBase& operator<<(const pd::Finish &) {
      method isMessageInProgress (line 1004) | bool isMessageInProgress() {
      method arraySize (line 1012) | int arraySize(const std::string &name) {
      method resizeArray (line 1026) | bool resizeArray(const std::string &name, long size) {
      method readArray (line 1048) | virtual bool readArray(const std::string &name,
      method writeArray (line 1092) | virtual bool writeArray(const std::string &name,
      method clearArray (line 1132) | virtual void clearArray(const std::string &name, int value=0) {
      method isInited (line 1151) | bool isInited() {
      method isQueued (line 1157) | bool isQueued() {
      method blockSize (line 1162) | static int blockSize() {
      method setMaxMessageLen (line 1167) | void setMaxMessageLen(unsigned int len) {
      method maxMessageLen (line 1172) | unsigned int maxMessageLen() {
      method t_pdinstance (line 1178) | t_pdinstance *instancePtr() {
      method numInstances (line 1187) | static int numInstances() {
      type MsgType (line 1194) | enum MsgType {
      method _print (line 1227) | static void _print(const char *s) {
      method _bang (line 1234) | static void _bang(const char *source) {
      method _float (line 1241) | static void _float(const char *source, float value) {
      method _symbol (line 1248) | static void _symbol(const char *source, const char *symbol) {
      method _list (line 1256) | static void _list(const char *source, int argc, t_atom *argv) {
      method _message (line 1275) | static void _message(const char *source, const char *symbol,
      method _noteon (line 1296) | static void _noteon(int channel, int pitch, int velocity) {
      method _controlchange (line 1303) | static void _controlchange(int channel, int controller, int value) {
      method _programchange (line 1312) | static void _programchange(int channel, int value) {
      method _pitchbend (line 1319) | static void _pitchbend(int channel, int value) {
      method _aftertouch (line 1326) | static void _aftertouch(int channel, int value) {
      method _polyaftertouch (line 1333) | static void _polyaftertouch(int channel, int pitch, int value) {
      method _midibyte (line 1342) | static void _midibyte(int port, int byte) {

FILE: libs/libpd/cpp/PdMidiReceiver.hpp
  type pd (line 16) | namespace pd {
    class PdMidiReceiver (line 19) | class PdMidiReceiver {
      method receiveNoteOn (line 26) | virtual void receiveNoteOn(const int /*channel*/,
      method receiveControlChange (line 31) | virtual void receiveControlChange(const int /*channel*/,
      method receiveProgramChange (line 37) | virtual void receiveProgramChange(const int /*channel*/, const int /...
      method receivePitchBend (line 40) | virtual void receivePitchBend(const int /*channel*/, const int /*val...
      method receiveAftertouch (line 43) | virtual void receiveAftertouch(const int /*channel*/, const int /*va...
      method receivePolyAftertouch (line 46) | virtual void receivePolyAftertouch(const int /*channel*/,
      method receiveMidiByte (line 51) | virtual void receiveMidiByte(const int /*port*/, const int /*byte*/) {}

FILE: libs/libpd/cpp/PdReceiver.hpp
  type pd (line 18) | namespace pd {
    class PdReceiver (line 21) | class PdReceiver {
      method print (line 28) | virtual void print(const std::string &/*message*/) {}
      method receiveBang (line 31) | virtual void receiveBang(const std::string &/*dest*/) {}
      method receiveFloat (line 34) | virtual void receiveFloat(const std::string &/*dest*/, float /*num*/...
      method receiveSymbol (line 37) | virtual void receiveSymbol(const std::string &/*dest*/,
      method receiveList (line 41) | virtual void receiveList(const std::string &/*dest*/, const pd::List...
      method receiveMessage (line 45) | virtual void receiveMessage(const std::string &/*dest*/,

FILE: libs/libpd/cpp/PdTypes.hpp
  type pd (line 21) | namespace pd {
    class Patch (line 30) | class Patch {
      method Patch (line 34) | Patch() :
      method Patch (line 38) | Patch(const std::string &filename, const std::string &path) :
      method Patch (line 42) | Patch(void *handle, int dollarZero,
      method dollarZero (line 56) | int dollarZero() const {return _dollarZero;}
      method filename (line 59) | std::string filename() const {return _filename;}
      method path (line 62) | std::string path() const {return _path;}
      method dollarZeroStr (line 65) | std::string dollarZeroStr() const {return _dollarZeroStr;}
      method isValid (line 68) | bool isValid() const {return _handle != NULL;}
      method clear (line 74) | void clear()  {
      method Patch (line 81) | Patch(const Patch &from) {
    type Bang (line 117) | struct Bang {
      method Bang (line 121) | explicit Bang(const std::string &dest) : dest(dest) {}
    type Float (line 125) | struct Float {
      method Float (line 130) | Float(const std::string &dest, const float num) :
    type Symbol (line 135) | struct Symbol {
      method Symbol (line 140) | Symbol(const std::string &dest, const std::string &symbol) :
    class List (line 145) | class List {
      method List (line 149) | List() {}
      method isFloat (line 154) | bool isFloat(const unsigned int index) const {
      method isSymbol (line 162) | bool isSymbol(const unsigned int index) const {
      method getFloat (line 170) | float getFloat(const unsigned int index) const {
      method getSymbol (line 180) | std::string getSymbol(const unsigned int index) const {
      method addFloat (line 199) | void addFloat(const float num) {
      method addSymbol (line 208) | void addSymbol(const std::string &symbol) {
      method List (line 222) | List& operator<<(const bool var) {
      method List (line 228) | List& operator<<(const int var) {
      method List (line 234) | List& operator<<(const float var) {
      method List (line 240) | List& operator<<(const double var) {
      method List (line 246) | List& operator<<(const char var) {
      method List (line 254) | List& operator<<(const char *var) {
      method List (line 260) | List& operator<<(const std::string &var) {
      method len (line 268) | unsigned int len() const {return (unsigned int) objects.size();}
      method clear (line 274) | void clear() {
      method toString (line 280) | std::string toString() const {
      type MsgType (line 309) | enum MsgType {
      type MsgObject (line 315) | struct MsgObject {
    type StartMessage (line 325) | struct StartMessage {
      method StartMessage (line 326) | explicit StartMessage() {}
    type FinishList (line 330) | struct FinishList {
      method FinishList (line 334) | explicit FinishList(const std::string &dest) : dest(dest) {}
    type FinishMessage (line 338) | struct FinishMessage {
      method FinishMessage (line 343) | FinishMessage(const std::string &dest, const std::string &msg) :
    type NoteOn (line 351) | struct NoteOn {
      method NoteOn (line 357) | NoteOn(const int channel, const int pitch, const int velocity=64) :
    type ControlChange (line 362) | struct ControlChange {
      method ControlChange (line 368) | ControlChange(const int channel, const int controller, const int val...
    type ProgramChange (line 373) | struct ProgramChange {
      method ProgramChange (line 378) | ProgramChange(const int channel, const int value) :
    type PitchBend (line 383) | struct PitchBend {
      method PitchBend (line 388) | PitchBend(const int channel, const int value) :
    type Aftertouch (line 393) | struct Aftertouch {
      method Aftertouch (line 398) | Aftertouch(const int channel, const int value) :
    type PolyAftertouch (line 403) | struct PolyAftertouch {
      method PolyAftertouch (line 409) | PolyAftertouch(const int channel, const int pitch, const int value) :
    type MidiByte (line 414) | struct MidiByte {
      method MidiByte (line 420) | MidiByte(const int port, unsigned char byte) : port(port), byte(byte...
    type StartMidi (line 424) | struct StartMidi {
      method StartMidi (line 428) | explicit StartMidi(const int port=0) : port(port) {}
    type StartSysex (line 432) | struct StartSysex {
      method StartSysex (line 436) | explicit StartSysex(const int port=0) : port(port) {}
    type StartSysRealTime (line 440) | struct StartSysRealTime {
      method StartSysRealTime (line 444) | explicit StartSysRealTime(const int port=0) : port(port) {}
    type Finish (line 448) | struct Finish {
      method Finish (line 449) | explicit Finish() {}

FILE: libs/libpd/libpd_wrapper/s_libpdmidi.c
  function outmidi_noteon (line 18) | void outmidi_noteon(int port, int channel, int pitch, int velo) {
  function outmidi_controlchange (line 24) | void outmidi_controlchange(int port, int channel, int ctl, int value) {
  function outmidi_programchange (line 30) | void outmidi_programchange(int port, int channel, int value) {
  function outmidi_pitchbend (line 36) | void outmidi_pitchbend(int port, int channel, int value) {
  function outmidi_aftertouch (line 42) | void outmidi_aftertouch(int port, int channel, int value) {
  function outmidi_polyaftertouch (line 48) | void outmidi_polyaftertouch(int port, int channel, int pitch, int value) {
  function outmidi_byte (line 54) | void outmidi_byte(int port, int value) {
  function sys_get_midi_apis (line 62) | void sys_get_midi_apis(char *buf) {strcpy(buf, "{}");}
  function sys_listmididevs (line 65) | void sys_listmididevs(void) {}
  function sys_get_midi_params (line 66) | void sys_get_midi_params(int *pnmidiindev, int *pmidiindev,
  function sys_open_midi (line 68) | void sys_open_midi(int nmidiindev, int *midiindev,
  function sys_close_midi (line 70) | void sys_close_midi() {}
  function sys_reopen_midi (line 71) | void sys_reopen_midi(void) {}
  function sys_initmidiqueue (line 72) | void sys_initmidiqueue(void) {}
  function sys_pollmidiqueue (line 73) | void sys_pollmidiqueue(void) {}
  function sys_setmiditimediff (line 74) | void sys_setmiditimediff(double inbuftime, double outbuftime) {}
  function glob_midi_setapi (line 75) | void glob_midi_setapi(void *dummy, t_floatarg f) {}
  function glob_midi_properties (line 76) | void glob_midi_properties(t_pd *dummy, t_floatarg flongform) {}
  function glob_midi_dialog (line 77) | void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) {}
  function sys_mididevnametonumber (line 78) | int sys_mididevnametonumber(int output, const char *name) { return 0; }
  function sys_mididevnumbertoname (line 79) | void sys_mididevnumbertoname(int output, int devno, char *name, int name...
  function sys_set_midi_api (line 80) | void sys_set_midi_api(int api) {}
  function sys_gui_midipreferences (line 81) | void sys_gui_midipreferences(void) {}

FILE: libs/libpd/libpd_wrapper/util/ringbuffer.c
  function ring_buffer (line 40) | ring_buffer *rb_create(int size) {
  function rb_free (line 55) | void rb_free(ring_buffer *buffer) {
  function rb_available_to_write (line 60) | int rb_available_to_write(ring_buffer *buffer) {
  function rb_available_to_read (line 73) | int rb_available_to_read(ring_buffer *buffer) {
  function rb_write_to_buffer (line 83) | int rb_write_to_buffer(ring_buffer *buffer, int n, ...) {
  function rb_write_value_to_buffer (line 110) | int rb_write_value_to_buffer(ring_buffer *buffer, int value, int n) {
  function rb_read_from_buffer (line 129) | int rb_read_from_buffer(ring_buffer *buffer, char *dest, int len) {
  function rb_clear_buffer (line 149) | void rb_clear_buffer(ring_buffer *buffer) {

FILE: libs/libpd/libpd_wrapper/util/ringbuffer.h
  type ring_buffer (line 16) | typedef struct ring_buffer {

FILE: libs/libpd/libpd_wrapper/util/z_print_util.c
  type print_util (line 22) | typedef struct _print_util {
  function libpd_set_concatenated_printhook (line 28) | void libpd_set_concatenated_printhook(const t_libpd_printhook hook) {
  function libpd_print_concatenator (line 44) | void libpd_print_concatenator(const char *s) {

FILE: libs/libpd/libpd_wrapper/util/z_queued.c
  type queued_stuff (line 22) | typedef struct _queued_stuff {
  type pd_params (line 32) | typedef struct _pd_params {
  type midi_params (line 43) | typedef struct _midi_params {
  function receive_print (line 57) | static void receive_print(pd_params *p, char **buffer) {
  function receive_bang (line 64) | static void receive_bang(pd_params *p, char **buffer) {
  function receive_float (line 70) | static void receive_float(pd_params *p, char **buffer) {
  function receive_symbol (line 79) | static void receive_symbol(pd_params *p, char **buffer) {
  function receive_list (line 85) | static void receive_list(pd_params *p, char **buffer) {
  function receive_message (line 92) | static void receive_message(pd_params *p, char **buffer) {
  function internal_printhook (line 101) | static void internal_printhook(const char *s) {
  function internal_banghook (line 115) | static void internal_banghook(const char *src) {
  function internal_floathook (line 123) | static void internal_floathook(const char *src, float x) {
  function internal_doublehook (line 131) | static void internal_doublehook(const char *src, double x) {
  function internal_symbolhook (line 139) | static void internal_symbolhook(const char *src, const char *sym) {
  function internal_listhook (line 147) | static void internal_listhook(const char *src, int argc, t_atom *argv) {
  function internal_messagehook (line 157) | static void internal_messagehook(const char *src, const char* sym,
  function receive_noteon (line 168) | static void receive_noteon(midi_params *p, char **buffer) {
  function receive_controlchange (line 174) | static void receive_controlchange(midi_params *p, char **buffer) {
  function receive_programchange (line 180) | static void receive_programchange(midi_params *p, char **buffer) {
  function receive_pitchbend (line 186) | static void receive_pitchbend(midi_params *p, char **buffer) {
  function receive_aftertouch (line 192) | static void receive_aftertouch(midi_params *p, char **buffer) {
  function receive_polyaftertouch (line 198) | static void receive_polyaftertouch(midi_params *p, char **buffer) {
  function receive_midibyte (line 204) | static void receive_midibyte(midi_params *p, char **buffer) {
  function internal_noteonhook (line 210) | static void internal_noteonhook(int channel, int pitch, int velocity) {
  function internal_controlchangehook (line 218) | static void internal_controlchangehook(int channel, int controller, int ...
  function internal_programchangehook (line 226) | static void internal_programchangehook(int channel, int value) {
  function internal_pitchbendhook (line 234) | static void internal_pitchbendhook(int channel, int value) {
  function internal_aftertouchhook (line 242) | static void internal_aftertouchhook(int channel, int value) {
  function internal_polyaftertouchhook (line 250) | static void internal_polyaftertouchhook(int channel, int pitch, int valu...
  function internal_midibytehook (line 258) | static void internal_midibytehook(int port, int byte) {
  function libpd_set_queued_printhook (line 266) | void libpd_set_queued_printhook(const t_libpd_printhook hook) {
  function libpd_set_queued_banghook (line 270) | void libpd_set_queued_banghook(const t_libpd_banghook hook) {
  function libpd_set_queued_floathook (line 274) | void libpd_set_queued_floathook(const t_libpd_floathook hook) {
  function libpd_set_queued_doublehook (line 279) | void libpd_set_queued_doublehook(const t_libpd_doublehook hook) {
  function libpd_set_queued_symbolhook (line 284) | void libpd_set_queued_symbolhook(const t_libpd_symbolhook hook) {
  function libpd_set_queued_listhook (line 288) | void libpd_set_queued_listhook(const t_libpd_listhook hook) {
  function libpd_set_queued_messagehook (line 292) | void libpd_set_queued_messagehook(const t_libpd_messagehook hook) {
  function libpd_set_queued_noteonhook (line 296) | void libpd_set_queued_noteonhook(const t_libpd_noteonhook hook) {
  function libpd_set_queued_controlchangehook (line 300) | void libpd_set_queued_controlchangehook(const t_libpd_controlchangehook ...
  function libpd_set_queued_programchangehook (line 304) | void libpd_set_queued_programchangehook(const t_libpd_programchangehook ...
  function libpd_set_queued_pitchbendhook (line 308) | void libpd_set_queued_pitchbendhook(const t_libpd_pitchbendhook hook) {
  function libpd_set_queued_aftertouchhook (line 312) | void libpd_set_queued_aftertouchhook(const t_libpd_aftertouchhook hook) {
  function libpd_set_queued_polyaftertouchhook (line 316) | void libpd_set_queued_polyaftertouchhook(const t_libpd_polyaftertouchhoo...
  function libpd_set_queued_midibytehook (line 320) | void libpd_set_queued_midibytehook(const t_libpd_midibytehook hook) {
  function queued_stuff_free (line 324) | static void queued_stuff_free(void *p) {
  function libpd_queued_init (line 330) | int libpd_queued_init() {
  function libpd_queued_release (line 365) | void libpd_queued_release() {
  function libpd_queued_receive_pd_messages (line 374) | void libpd_queued_receive_pd_messages() {
  function libpd_queued_receive_midi_messages (line 415) | void libpd_queued_receive_midi_messages() {

FILE: libs/libpd/libpd_wrapper/x_libpdreceive.c
  type t_libpdrec (line 18) | typedef struct _libpdrec {
  function libpdrecbang (line 24) | static void libpdrecbang(t_libpdrec *x) {
  function libpdrecfloat (line 29) | static void libpdrecfloat(t_libpdrec *x, t_float f) {
  function libpdrecsymbol (line 36) | static void libpdrecsymbol(t_libpdrec *x, t_symbol *s) {
  function libpdrecpointer (line 41) | static void libpdrecpointer(t_libpdrec *x, t_gpointer *gp) {
  function libpdreclist (line 45) | static void libpdreclist(t_libpdrec *x, t_symbol *s, int argc, t_atom *a...
  function libpdrecanything (line 50) | static void libpdrecanything(t_libpdrec *x, t_symbol *s,
  function libpdreceive_free (line 56) | static void libpdreceive_free(t_libpdrec *x) {
  function libpdreceive_setup (line 78) | void libpdreceive_setup(void) {

FILE: libs/libpd/libpd_wrapper/z_hooks.c
  function t_libpdimp (line 19) | t_libpdimp* libpdimp_new(void) {
  function libpdimp_free (line 24) | void libpdimp_free(t_libpdimp *imp) {

FILE: libs/libpd/libpd_wrapper/z_hooks.h
  type t_libpdhooks (line 23) | typedef struct _libpdhooks {
  type t_libpdimp (line 47) | typedef struct _libpdimp {

FILE: libs/libpd/libpd_wrapper/z_libpd.c
  function libpd_init (line 79) | int libpd_init(void) {
  function libpd_clear_search_path (line 125) | void libpd_clear_search_path(void) {
  function libpd_add_to_search_path (line 132) | void libpd_add_to_search_path(const char *path) {
  function libpd_closefile (line 148) | void libpd_closefile(void *p) {
  function libpd_getdollarzero (line 154) | int libpd_getdollarzero(void *p) {
  function libpd_blocksize (line 163) | int libpd_blocksize(void) {
  function libpd_init_audio (line 167) | int libpd_init_audio(int inChannels, int outChannels, int sampleRate) {
  function libpd_process_short (line 214) | int libpd_process_short(const int ticks, const short *inBuffer, short *o...
  function libpd_process_float (line 218) | int libpd_process_float(const int ticks, const float *inBuffer, float *o...
  function libpd_process_double (line 222) | int libpd_process_double(const int ticks, const double *inBuffer, double...
  function libpd_process_raw (line 244) | int libpd_process_raw(const float *inBuffer, float *outBuffer) {
  function libpd_process_raw_short (line 248) | int libpd_process_raw_short(const short *inBuffer, short *outBuffer) {
  function libpd_process_raw_double (line 252) | int libpd_process_raw_double(const double *inBuffer, double *outBuffer) {
  function libpd_arraysize (line 260) | int libpd_arraysize(const char *name) {
  function libpd_resize_array (line 269) | int libpd_resize_array(const char *name, long size) {
  function libpd_read_array (line 284) | int libpd_read_array(float *dest, const char *name, int offset, int n) {
  function libpd_write_array (line 291) | int libpd_write_array(const char *name, int offset, const float *src, in...
  function libpd_read_array_double (line 298) | int libpd_read_array_double(double *dest, const char *name, int offset, ...
  function libpd_write_array_double (line 305) | int libpd_write_array_double(const char *name, int offset, const double ...
  function libpd_bang (line 312) | int libpd_bang(const char *recv) {
  function libpd_dofloat (line 326) | static int libpd_dofloat(const char *recv, t_float x) {
  function libpd_float (line 340) | int libpd_float(const char *recv, float x) {
  function libpd_double (line 344) | int libpd_double(const char *recv, double x) {
  function libpd_symbol (line 348) | int libpd_symbol(const char *recv, const char *symbol) {
  function libpd_start_message (line 362) | int libpd_start_message(int maxlen) {
  function libpd_add_float (line 379) | void libpd_add_float(float x) {
  function libpd_add_double (line 383) | void libpd_add_double(double x) {
  function libpd_add_symbol (line 387) | void libpd_add_symbol(const char *symbol) {
  function libpd_finish_list (line 395) | int libpd_finish_list(const char *recv) {
  function libpd_finish_message (line 399) | int libpd_finish_message(const char *recv, const char *msg) {
  function libpd_set_float (line 403) | void libpd_set_float(t_atom *a, float x) {
  function libpd_set_double (line 407) | void libpd_set_double(t_atom *v, double x) {
  function libpd_set_symbol (line 411) | void libpd_set_symbol(t_atom *a, const char *symbol) {
  function libpd_list (line 415) | int libpd_list(const char *recv, int argc, t_atom *argv) {
  function libpd_message (line 429) | int libpd_message(const char *recv, const char *msg, int argc, t_atom *a...
  function libpd_unbind (line 451) | void libpd_unbind(void *p) {
  function libpd_exists (line 457) | int libpd_exists(const char *recv) {
  function libpd_set_printhook (line 468) | void libpd_set_printhook(const t_libpd_printhook hook) {
  function libpd_set_banghook (line 475) | void libpd_set_banghook(const t_libpd_banghook hook) {
  function libpd_set_floathook (line 479) | void libpd_set_floathook(const t_libpd_floathook hook) {
  function libpd_set_doublehook (line 484) | void libpd_set_doublehook(const t_libpd_doublehook hook) {
  function libpd_set_symbolhook (line 489) | void libpd_set_symbolhook(const t_libpd_symbolhook hook) {
  function libpd_set_listhook (line 493) | void libpd_set_listhook(const t_libpd_listhook hook) {
  function libpd_set_messagehook (line 497) | void libpd_set_messagehook(const t_libpd_messagehook hook) {
  function libpd_is_float (line 501) | int libpd_is_float(t_atom *a) {
  function libpd_is_symbol (line 505) | int libpd_is_symbol(t_atom *a) {
  function libpd_get_float (line 509) | float libpd_get_float(t_atom *a) {
  function libpd_get_double (line 513) | double libpd_get_double(t_atom *a) {
  function t_atom (line 521) | t_atom *libpd_next_atom(t_atom *a) {
  function CHECK_CHANNEL (line 543) | CHECK_CHANNEL
  function libpd_pitchbend (line 562) | int libpd_pitchbend(int channel, int value) {
  function libpd_aftertouch (line 571) | int libpd_aftertouch(int channel, int value) {
  function CHECK_CHANNEL (line 581) | CHECK_CHANNEL
  function libpd_sysex (line 599) | int libpd_sysex(int port, int byte) {
  function libpd_sysrealtime (line 608) | int libpd_sysrealtime(int port, int byte) {
  function libpd_set_noteonhook (line 617) | void libpd_set_noteonhook(const t_libpd_noteonhook hook) {
  function libpd_set_controlchangehook (line 621) | void libpd_set_controlchangehook(const t_libpd_controlchangehook hook) {
  function libpd_set_programchangehook (line 625) | void libpd_set_programchangehook(const t_libpd_programchangehook hook) {
  function libpd_set_pitchbendhook (line 629) | void libpd_set_pitchbendhook(const t_libpd_pitchbendhook hook) {
  function libpd_set_aftertouchhook (line 633) | void libpd_set_aftertouchhook(const t_libpd_aftertouchhook hook) {
  function libpd_set_polyaftertouchhook (line 637) | void libpd_set_polyaftertouchhook(const t_libpd_polyaftertouchhook hook) {
  function libpd_set_midibytehook (line 641) | void libpd_set_midibytehook(const t_libpd_midibytehook hook) {
  function libpd_start_gui (line 645) | int libpd_start_gui(const char *path) {
  function libpd_stop_gui (line 653) | void libpd_stop_gui(void) {
  function libpd_poll_gui (line 659) | int libpd_poll_gui(void) {
  function t_pdinstance (line 667) | t_pdinstance *libpd_new_instance(void) {
  function libpd_set_instance (line 677) | void libpd_set_instance(t_pdinstance *pd) {
  function libpd_free_instance (line 683) | void libpd_free_instance(t_pdinstance *pd) {
  function t_pdinstance (line 691) | t_pdinstance *libpd_this_instance(void) {
  function t_pdinstance (line 695) | t_pdinstance *libpd_main_instance(void) {
  function libpd_num_instances (line 699) | int libpd_num_instances(void) {
  function libpd_set_instancedata (line 707) | void libpd_set_instancedata(void *data, t_libpd_freehook freehook) {
  function libpd_set_verbose (line 716) | void libpd_set_verbose(int verbose) {
  function libpd_get_verbose (line 721) | int libpd_get_verbose(void) {
  function glob_loadpreferences (line 726) | void glob_loadpreferences(t_pd *dummy, t_symbol *s) {}
  function glob_savepreferences (line 727) | void glob_savepreferences(t_pd *dummy, t_symbol *s) {}
  function glob_forgetpreferences (line 728) | void glob_forgetpreferences(t_pd *dummy) {}
  function sys_loadpreferences (line 729) | void sys_loadpreferences(const char *filename, int startingup) {}
  function sys_oktoloadfiles (line 730) | int sys_oktoloadfiles(int done) {return 1;}
  function sys_savepreferences (line 731) | void sys_savepreferences(const char *filename) {}

FILE: libs/libpd/pure-data/extra/bob~/bob~.c
  type t_params (line 16) | typedef struct _params
  function FLOAT (line 29) | static FLOAT clip(FLOAT value, FLOAT saturation, FLOAT saturationinverse)
  function FLOAT (line 38) | static FLOAT clip(FLOAT value, FLOAT saturation, FLOAT saturationinverse)
  function calc_derivatives (line 47) | static void calc_derivatives(FLOAT *dstate, FLOAT *state, t_params *params)
  function solver_euler (line 62) | static void solver_euler(FLOAT *state, FLOAT *errorestimate,
  function solver_rungekutte (line 81) | static void solver_rungekutte(FLOAT *state, FLOAT *errorestimate,
  type t_bob (line 127) | typedef struct _bob
  function bob_saturation (line 145) | static void bob_saturation(t_bob *x, t_float saturation)
  function bob_oversample (line 152) | static void bob_oversample(t_bob *x, t_float oversample)
  function bob_clear (line 159) | static void bob_clear(t_bob *x)
  function bob_error (line 166) | static void bob_error(t_bob *x)
  function bob_print (line 178) | static void bob_print(t_bob *x)
  function t_int (line 205) | static t_int *bob_perform(t_int *w)
  function bob_dsp (line 236) | static void bob_dsp(t_bob *x, t_signal **sp)
  function bob_tilde_setup (line 243) | void bob_tilde_setup(void)

FILE: libs/libpd/pure-data/extra/bonk~/bonk~.c
  type t_floatarg (line 69) | typedef double t_floatarg;
  type t_float (line 70) | typedef float t_float;
  type t_filterkernel (line 114) | typedef struct _filterkernel
  type t_filterbank (line 125) | typedef struct _filterbank
  type t_hist (line 170) | typedef struct _hist
  type t_template (line 179) | typedef struct template
  type t_insig (line 184) | typedef struct _insig
  type t_bonk (line 197) | typedef struct _bonk
  function t_filterbank (line 302) | static t_filterbank *bonk_newfilterbank(int npoints, int nfilters,
  function bonk_freefilterbank (line 396) | static void bonk_freefilterbank(t_filterbank *b)
  function bonk_donew (line 416) | static void bonk_donew(t_bonk *x, int npoints, int period, int nsig,
  function bonk_tick (line 484) | static void bonk_tick(t_bonk *x)
  function bonk_doit (line 635) | static void bonk_doit(t_bonk *x)
  function bonk_perform_generic (line 752) | static void bonk_perform_generic(t_bonk *x, int n) {
  function t_int (line 806) | static t_int *bonk_perform(t_int *w)
  function bonk_dsp (line 814) | static void bonk_dsp(t_bonk *x, t_signal **sp)
  function bonk_thresh (line 827) | static void bonk_thresh(t_bonk *x, t_floatarg f1, t_floatarg f2)
  function bonk_mask (line 836) | static void bonk_mask(t_bonk *x, t_floatarg f1, t_floatarg f2)
  function bonk_debounce (line 846) | static void bonk_debounce(t_bonk *x, t_floatarg f1)
  function bonk_minvel (line 853) | static void bonk_minvel(t_bonk *x, t_floatarg f)
  function bonk_debug (line 859) | static void bonk_debug(t_bonk *x, t_floatarg f)
  function bonk_spew (line 864) | static void bonk_spew(t_bonk *x, t_floatarg f)
  function bonk_useloudness (line 869) | static void bonk_useloudness(t_bonk *x, t_floatarg f)
  function bonk_attackbins (line 874) | static void bonk_attackbins(t_bonk *x, t_floatarg f)
  function bonk_learn (line 883) | static void bonk_learn(t_bonk *x, t_floatarg f)
  function bonk_print (line 898) | static void bonk_print(t_bonk *x, t_floatarg f)
  function bonk_forget (line 964) | static void bonk_forget(t_bonk *x)
  function bonk_bang (line 975) | static void bonk_bang(t_bonk *x)
  function bonk_read (line 990) | static void bonk_read(t_bonk *x, t_symbol *s)
  function bonk_perform64 (line 1039) | static void bonk_perform64(t_bonk *x, t_object *dsp64, double **ins,
  function bonk_dsp64 (line 1054) | static void bonk_dsp64(t_bonk *x, t_object *dsp64, short *count,
  function bonk_read (line 1063) | static void bonk_read(t_bonk *x, t_symbol *s)
  function bonk_doread (line 1068) | static void bonk_doread(t_bonk *x, t_symbol *s)
  function bonk_openfile (line 1088) | static void bonk_openfile(t_bonk *x, char *filename, short path) {
  function bonk_write (line 1146) | static void bonk_write(t_bonk *x, t_symbol *s)
  function bonk_write (line 1176) | static void bonk_write(t_bonk *x, t_symbol *s)
  function bonk_dowrite (line 1181) | static void bonk_dowrite(t_bonk *x, t_symbol *s)
  function bonk_writefile (line 1199) | void bonk_writefile(t_bonk *x, char *filename, short path)
  function bonk_free (line 1231) | static void bonk_free(t_bonk *x)
  function bonk_tilde_setup (line 1355) | void bonk_tilde_setup(void)
  function main (line 1396) | int main()
  function bonk_minvel_set (line 1560) | void bonk_minvel_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_lothresh_set (line 1569) | void bonk_lothresh_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_hithresh_set (line 1579) | void bonk_hithresh_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_masktime_set (line 1589) | void bonk_masktime_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_maskdecay_set (line 1597) | void bonk_maskdecay_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_debouncedecay_set (line 1607) | void bonk_debouncedecay_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_debug_set (line 1617) | void bonk_debug_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_spew_set (line 1625) | void bonk_spew_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_useloudness_set (line 1633) | void bonk_useloudness_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_attackbins_set (line 1641) | void bonk_attackbins_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_learn_set (line 1651) | void bonk_learn_set(t_bonk *x, void *attr, long ac, t_atom *av)
  function bonk_assist (line 1666) | void bonk_assist(t_bonk *x, void *b, long m, long a, char *s)
  function clock_getsystime (line 1671) | double clock_getsystime()
  function clock_gettimesince (line 1677) | double clock_gettimesince(double prevsystime)
  function t_float (line 1682) | t_float qrsqrt(t_float f)

FILE: libs/libpd/pure-data/extra/choice/choice.c
  type t_elem (line 18) | typedef struct _elem
  type t_choice (line 24) | typedef struct _choice
  function choice_clear (line 42) | static void choice_clear(t_choice *x)
  function choice_print (line 48) | static void choice_print(t_choice *x)
  function choice_add (line 62) | static void choice_add(t_choice *x, t_symbol *s, int argc, t_atom *argv)
  function choice_list (line 84) | static void choice_list(t_choice *x, t_symbol *s, int argc, t_atom *argv)
  function choice_free (line 115) | static void choice_free(t_choice *x)
  function choice_setup (line 120) | void choice_setup(void)

FILE: libs/libpd/pure-data/extra/fiddle~/fiddle~.c
  type t_float (line 54) | typedef float t_float;
  type t_floatarg (line 55) | typedef float t_floatarg;
  type fts_symbol_t (line 56) | typedef fts_symbol_t t_symbol;
  function freebytes (line 74) | static void freebytes(void *fatso, size_t nbytes)
  type t_float (line 114) | typedef float t_float;
  type t_floatarg (line 115) | typedef double t_floatarg;
  type t_peakout (line 211) | typedef struct peakout      /* a peak for output */
  type t_peak (line 217) | typedef struct peak         /* a peak for analysis */
  type t_histopeak (line 226) | typedef struct histopeak
  type t_pitchhist (line 235) | typedef struct pitchhist            /* struct for keeping history by pit...
  type t_sigfiddle (line 246) | typedef struct sigfiddle                    /* instance struct */
  function sigfiddle_ilog2 (line 338) | int sigfiddle_ilog2(int n)
  function t_float (line 349) | t_float fiddle_mtof(t_float f)
  function t_float (line 354) | t_float fiddle_ftom(t_float f)
  function sigfiddle_doit (line 361) | void sigfiddle_doit(t_sigfiddle *x)
  function sigfiddle_debug (line 1000) | void sigfiddle_debug(t_sigfiddle *x)
  function sigfiddle_print (line 1005) | void sigfiddle_print(t_sigfiddle *x)
  function sigfiddle_amprange (line 1015) | void sigfiddle_amprange(t_sigfiddle *x, t_floatarg amplo, t_floatarg amphi)
  function sigfiddle_reattack (line 1023) | void sigfiddle_reattack(t_sigfiddle *x,
  function sigfiddle_vibrato (line 1034) | void sigfiddle_vibrato(t_sigfiddle *x, t_floatarg vibtime, t_floatarg vi...
  function sigfiddle_npartial (line 1045) | void sigfiddle_npartial(t_sigfiddle *x, t_floatarg npartial)
  function sigfiddle_auto (line 1051) | void sigfiddle_auto(t_sigfiddle *x, t_floatarg f)
  function sigfiddle_freebird (line 1056) | static void sigfiddle_freebird(t_sigfiddle *x)
  function sigfiddle_setnpoints (line 1077) | int sigfiddle_setnpoints(t_sigfiddle *x, t_floatarg fnpoints)
  function sigfiddle_doinit (line 1113) | int sigfiddle_doinit(t_sigfiddle *x, long npoints, long npitch,
  function sigfiddle_debug13 (line 1183) | void sigfiddle_debug13(fts_object_t *o, int winlet, fts_symbol_t s, int ...
  function sigfiddle_print13 (line 1189) | void sigfiddle_print13(fts_object_t *o, int winlet, fts_symbol_t s,
  function sigfiddle_amprange13 (line 1196) | void sigfiddle_amprange13(fts_object_t *o, int winlet, fts_symbol_t s,
  function sigfiddle_reattack13 (line 1205) | void sigfiddle_reattack13(fts_object_t *o, int winlet, fts_symbol_t s,
  function sigfiddle_vibrato13 (line 1214) | void sigfiddle_vibrato13(fts_object_t *o, int winlet, fts_symbol_t s,
  function sigfiddle_npartial13 (line 1223) | void sigfiddle_npartial13(fts_object_t *o, int winlet, fts_symbol_t s,
  function ftl_sigfiddle (line 1232) | void ftl_sigfiddle(fts_word_t *a)
  function sigfiddle_put (line 1254) | void sigfiddle_put(fts_object_t *o, int winlet, fts_symbol_t *s, int ac,...
  function sigfiddle_tick (line 1270) | void sigfiddle_tick(fts_alarm_t *alarm, void *p)
  function sigfiddle_delete (line 1290) | static void sigfiddle_delete(fts_object_t *o, int winlet, fts_symbol_t *...
  function sigfiddle_init (line 1301) | static void sigfiddle_init(fts_object_t *o, int winlet, fts_symbol_t *s,...
  function fts_status_t (line 1324) | static fts_status_t sigfiddle_instantiate(fts_class_t *cl, int ac,
  function fiddle_config (line 1379) | void fiddle_config(void)
  function t_int (line 1392) | static t_int *fiddle_perform(t_int *w)
  function sigfiddle_dsp (line 1415) | void sigfiddle_dsp(t_sigfiddle *x, t_signal **sp)
  function sigfiddle_bang (line 1427) | void sigfiddle_bang(t_sigfiddle *x)
  function sigfiddle_ff (line 1457) | void sigfiddle_ff(t_sigfiddle *x)               /* cleanup on free */
  function fiddle_tilde_setup (line 1498) | void fiddle_tilde_setup(void)
  function fiddle_setup (line 1528) | void fiddle_setup(void)
  function cu_fiddle (line 1536) | void cu_fiddle(t_float *in1, t_sigfiddle *x, int n)
  function sigfiddle_put (line 1552) | void sigfiddle_put(t_sigfiddle *x, long whether)
  function sigfiddle_tick (line 1565) | void sigfiddle_tick(t_sigfiddle *x)     /* callback function for the clo...
  function sigfiddle_ff (line 1582) | void sigfiddle_ff(t_sigfiddle *x)               /* cleanup on free */
  function fiddle_setup (line 1618) | void fiddle_setup()
  function t_int (line 1642) | static t_int *fiddle_perform(t_int *w)
  function sigfiddle_dsp (line 1668) | void sigfiddle_dsp(t_sigfiddle *x, t_signal **sp)
  function sigfiddle_tick (line 1683) | void sigfiddle_tick(t_sigfiddle *x)     /* callback function for the clo...
  function sigfiddle_bang (line 1713) | void sigfiddle_bang(t_sigfiddle *x)
  function sigfiddle_ff (line 1744) | void sigfiddle_ff(t_sigfiddle *x)               /* cleanup on free  MSP  */
  function main (line 1787) | void main()
  function sigfiddle_assist (line 1812) | void sigfiddle_assist(t_sigfiddle *x, void *b, long m, long a, char *s)
  function msp_fft (line 1817) | void msp_fft(t_float *buf, long np, long inv)

FILE: libs/libpd/pure-data/extra/loop~/loop~.c
  type t_loopctl (line 23) | typedef struct _loopctl
  function loopctl_run (line 31) | static void loopctl_run(t_loopctl *x, t_sample *transposein,
  function loopctl_init (line 93) | static void loopctl_init(t_loopctl *x)
  function loopctl_set (line 100) | static void loopctl_set(t_loopctl *x, t_float val)
  type t_loop (line 110) | typedef struct _loop
  function t_int (line 129) | static t_int *loop_perform(t_int *w)
  function loop_dsp (line 141) | static void loop_dsp(t_loop *x, t_signal **sp)
  function loop_set (line 148) | static void loop_set(t_loop *x, t_floatarg val)
  function loop_bang (line 153) | static void loop_bang(t_loop *x)
  function loop_tilde_setup (line 158) | void loop_tilde_setup(void)

FILE: libs/libpd/pure-data/extra/lrshift~/lrshift~.c
  type t_lrshift_tilde (line 7) | typedef struct _lrshift_tilde
  function t_int (line 14) | static t_int *leftshift_perform(t_int *w)
  function t_int (line 29) | static t_int *rightshift_perform(t_int *w)
  function lrshift_tilde_dsp (line 44) | static void lrshift_tilde_dsp(t_lrshift_tilde *x, t_signal **sp)
  function lrshift_tilde_setup (line 72) | void lrshift_tilde_setup(void)

FILE: libs/libpd/pure-data/extra/pd~/binarymsg.c
  function pd_tilde_putfloat (line 11) | static void pd_tilde_putfloat(float f, FILE *fd)
  function pd_tilde_putsymbol (line 17) | static void pd_tilde_putsymbol(t_symbol *s, FILE *fd)
  function pd_tilde_putsemi (line 26) | static void pd_tilde_putsemi(FILE *fd)
  function pd_tilde_getatom (line 31) | static int pd_tilde_getatom(t_atom *ap, FILE *fd)

FILE: libs/libpd/pure-data/extra/pd~/pdsched.c
  function pollwatchdog (line 27) | static void pollwatchdog( void)
  function pollwatchdog (line 41) | static void pollwatchdog( void)
  function readasciimessage (line 51) | static int readasciimessage(t_binbuf *b)
  function readbinmessage (line 71) | static int readbinmessage(t_binbuf *b)
  function pd_extern_sched (line 88) | int pd_extern_sched(char *flags)

FILE: libs/libpd/pure-data/extra/pd~/pd~.c
  type socklen_t (line 20) | typedef int socklen_t;
  type t_float (line 57) | typedef float t_float;
  type t_pdsample (line 58) | typedef float t_pdsample;
  type t_binbuf (line 67) | typedef struct _binbuf
  type t_pd_tilde (line 148) | typedef struct _pd_tilde
  function t_binbuf (line 199) | t_binbuf *binbuf_new(void)
  function binbuf_free (line 207) | void binbuf_free(t_binbuf *x)
  function binbuf_clear (line 213) | void binbuf_clear(t_binbuf *x)
  function binbuf_resize (line 219) | int binbuf_resize(t_binbuf *x, int newsize)
  function binbuf_add (line 228) | void binbuf_add(t_binbuf *x, int argc, const t_atom *argv)
  function binbuf_text (line 244) | void binbuf_text(t_binbuf *x, const char *text, size_t size)
  function binbuf_getnatom (line 378) | int binbuf_getnatom(const t_binbuf *x)
  function t_atom (line 383) | t_atom *binbuf_getvec(const t_binbuf *x)
  function sys_bashfilename (line 387) | void sys_bashfilename(char *tmpbuf, char *outbuf)
  function barf (line 395) | void barf(const char *s)
  function barf1 (line 406) | void barf1(const char *s, int n1)
  function barf2 (line 414) | void barf2(const char *s, int n1, int n2)
  function barf_getc (line 425) | int barf_getc(FILE *fd)
  function pd_tilde_close (line 448) | static void pd_tilde_close(t_pd_tilde *x)
  function pd_tilde_readmessages (line 470) | static int pd_tilde_readmessages(t_pd_tilde *x, FILE *infd)
  function pd_tilde_dostart (line 541) | static void pd_tilde_dostart(t_pd_tilde *x, const char *pddir,
  function pd_empty (line 783) | void pd_empty(int infd)
  function pd_tilde_doperf (line 799) | static void pd_tilde_doperf(t_pd_tilde *x)
  function pd_tilde_pdtilde (line 942) | static void pd_tilde_pdtilde(t_pd_tilde *x, t_symbol *s,
  function pd_tilde_free (line 1010) | static void pd_tilde_free(t_pd_tilde *x)
  function t_int (line 1026) | static t_int *pd_tilde_perform(t_int *w)
  function pd_tilde_dsp (line 1033) | static void pd_tilde_dsp(t_pd_tilde *x, t_signal **sp)
  function pd_tilde_tick (line 1050) | static void pd_tilde_tick(t_pd_tilde *x)
  function pd_tilde_anything (line 1072) | static void pd_tilde_anything(t_pd_tilde *x, t_symbol *s,
  function pd_tilde_setup (line 1186) | void pd_tilde_setup(void)
  function pd_tilde_perf64 (line 1203) | static void pd_tilde_perf64(t_pd_tilde *x, t_object *dsp64,
  function pd_tilde_dsp64 (line 1230) | static void pd_tilde_dsp64(t_pd_tilde *x, t_object *dsp64,
  function pd_tilde_tick (line 1247) | static void pd_tilde_tick(t_pd_tilde *x)
  function pd_tilde_anything (line 1282) | static void pd_tilde_anything(t_pd_tilde *x, t_symbol *s, long ac, t_ato...
  function ext_main (line 1339) | void ext_main( void *r)
  function pd_tilde_assist (line 1437) | void pd_tilde_assist(t_pd_tilde *x, void *b, long m, long a, char *s)

FILE: libs/libpd/pure-data/extra/pique/pique.c
  type t_pique (line 18) | typedef struct _pique
  function t_float (line 44) | static t_float hanning(t_float pidetune, t_float sinpidetune)
  function t_float (line 54) | static t_float peakerror(t_word *fpreal, t_word *fpimag, t_float pidetune,
  function pique_doit (line 75) | static void pique_doit(int npts, t_word *fpreal, t_word *fpimag,
  function pique_list (line 179) | static void pique_list(t_pique *x, t_symbol *s, int argc, t_atom *argv)
  function pique_errthresh (line 220) | static void pique_errthresh(t_pique *x, t_floatarg f)
  function pique_free (line 225) | static void pique_free(t_pique *x)
  function pique_setup (line 234) | void pique_setup(void)

FILE: libs/libpd/pure-data/extra/sigmund~/sigmund~.c
  type t_floatarg (line 21) | typedef double t_floatarg;
  type t_float (line 22) | typedef float t_float;
  type t_peak (line 67) | typedef struct peak
  type t_pitchpt (line 79) | typedef struct _pitchpt
  function sigmund_ilog2 (line 92) | static unsigned int sigmund_ilog2(int n)
  function t_float (line 103) | static t_float sigmund_ftom(t_float f)
  function t_float (line 109) | static t_float sigmund_powtodb(t_float f)
  function t_float (line 128) | static t_float sinx(t_float theta, t_float sintheta)
  function t_float (line 135) | static t_float window_hann_mag(t_float pidetune, t_float sinpidetune)
  function t_float (line 142) | static t_float window_mag(t_float pidetune, t_float cospidetune)
  function sigmund_cmp_freq (line 150) | static int sigmund_cmp_freq(const void *p1, const void *p2)
  function sigmund_tweak (line 159) | static void sigmund_tweak(int npts, t_float *ftreal, t_float *ftimag,
  function sigmund_remask (line 251) | static void sigmund_remask(int maxbin, int bestindex, t_float powmask,
  function sigmund_getrawpeaks (line 272) | static void sigmund_getrawpeaks(int npts, t_float *insamps,
  function sigmund_getpitch (line 406) | static void sigmund_getpitch(int npeak, t_peak *peakv, t_float *freqp,
  function sigmund_peaktrack (line 533) | static void sigmund_peaktrack(int ninpeak, t_peak *inpeakv,
  type t_histpoint (line 591) | typedef struct _histpoint
  type t_notefinder (line 597) | typedef struct _notefinder
  function notefinder_init (line 608) | static void notefinder_init(t_notefinder *x)
  function notefinder_doit (line 618) | static void notefinder_doit(t_notefinder *x, t_float freq, t_float power,
  type t_varout (line 851) | typedef struct _varout
  type t_sigmund (line 862) | typedef struct _sigmund
  function sigmund_preinit (line 911) | static void sigmund_preinit(t_sigmund *x)
  function sigmund_npts (line 942) | static void sigmund_npts(t_sigmund *x, t_floatarg f)
  function sigmund_hop (line 986) | static void sigmund_hop(t_sigmund *x, t_floatarg f)
  function sigmund_npeak (line 1002) | static void sigmund_npeak(t_sigmund *x, t_floatarg f)
  function sigmund_maxfreq (line 1009) | static void sigmund_maxfreq(t_sigmund *x, t_floatarg f)
  function sigmund_vibrato (line 1014) | static void sigmund_vibrato(t_sigmund *x, t_floatarg f)
  function sigmund_stabletime (line 1021) | static void sigmund_stabletime(t_sigmund *x, t_floatarg f)
  function sigmund_growth (line 1028) | static void sigmund_growth(t_sigmund *x, t_floatarg f)
  function sigmund_minpower (line 1035) | static void sigmund_minpower(t_sigmund *x, t_floatarg f)
  function sigmund_nharmonics (line 1042) | static void sigmund_nharmonics(t_sigmund *x, t_floatarg nharmonics,
  function sigmund_amppowerlaw (line 1062) | static void sigmund_amppowerlaw(t_sigmund *x, t_floatarg f)
  function sigmund_quality (line 1071) | static void sigmund_quality(t_sigmund *x, t_floatarg f)
  function sigmund_outspectrum (line 1080) | static void sigmund_outspectrum(t_sigmund *x, t_outlet *outlet,
  function sigmund_doit (line 1092) | static void sigmund_doit(t_sigmund *x, int npts, t_float *arraypoints,
  function sigmund_dsp (line 1164) | static void sigmund_dsp(t_sigmund *x, t_signal **sp)
  function sigmund_print (line 1185) | static void sigmund_print(t_sigmund *x)
  function sigmund_free (line 1220) | static void sigmund_free(t_sigmund *x)
  function sigmund_tick (line 1255) | static void sigmund_tick(t_sigmund *x)
  function t_int (line 1276) | static t_int *sigmund_perform(t_int *w)
  function sigmund_list (line 1508) | static void sigmund_list(t_sigmund *x, t_symbol *s, int argc, t_atom *argv)
  function sigmund_clear (line 1561) | static void sigmund_clear(t_sigmund *x)
  function sigmund_harmonicweights (line 1568) | static void sigmund_harmonicweights(t_sigmund *x, t_symbol *s,
  function sigmund_param1 (line 1578) | static void sigmund_param1(t_sigmund *x, t_floatarg f)
  function sigmund_param2 (line 1583) | static void sigmund_param2(t_sigmund *x, t_floatarg f)
  function sigmund_param3 (line 1588) | static void sigmund_param3(t_sigmund *x, t_floatarg f)
  function sigmund_printnext (line 1593) | static void sigmund_printnext(t_sigmund *x, t_float f)
  function sigmund_tilde_setup (line 1598) | void sigmund_tilde_setup(void)
  function sigmund_tick (line 1655) | static void sigmund_tick(t_sigmund *x)
  function t_int (line 1668) | static t_int *sigmund_perform(t_int *w)
  function sigmund_npts_set (line 1816) | void sigmund_npts_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_hop_set (line 1822) | void sigmund_hop_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_npeak_set (line 1828) | void sigmund_npeak_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_maxfreq_set (line 1834) | void sigmund_maxfreq_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_vibrato_set (line 1840) | void sigmund_vibrato_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_stabletime_set (line 1846) | void sigmund_stabletime_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_growth_set (line 1852) | void sigmund_growth_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_minpower_set (line 1858) | void sigmund_minpower_set(t_sigmund *x, void *attr, long ac, t_atom *av)
  function sigmund_assist (line 1866) | void sigmund_assist(t_sigmund *x, void *b, long m, long a, char *s)
  function main (line 1870) | int main()

FILE: libs/libpd/pure-data/extra/stdout/stdout.c
  type t_stdout (line 17) | typedef struct _stdout
  function stdout_binary (line 70) | static void stdout_binary(t_stdout *x, int argc, t_atom *argv)
  function pd_tilde_putfloat (line 86) | static void pd_tilde_putfloat(float f, FILE *fd)
  function pd_tilde_putsymbol (line 92) | static void pd_tilde_putsymbol(t_symbol *s, FILE *fd)
  function stdout_anything (line 101) | static void stdout_anything(t_stdout *x, t_symbol *s, int argc, t_atom *...
  function stdout_free (line 152) | static void stdout_free(t_stdout *x)
  function stdout_setup (line 157) | void stdout_setup(void)

FILE: libs/libpd/pure-data/src/d_arithmetic.c
  function dsp_add_multi (line 23) | static void dsp_add_multi(t_sample *vec1, int n1, t_sample *vec2,
  function any_binop_dsp (line 52) | static void any_binop_dsp(t_signal **sp,
  function any_binop_scalar_dsp (line 95) | static void any_binop_scalar_dsp(t_signal **sp, t_sample *g,
  type t_plus (line 108) | typedef struct _plus
  type t_scalarplus (line 114) | typedef struct _scalarplus
  function t_int (line 144) | t_int *scalarplus_perform(t_int *w)
  function t_int (line 154) | t_int *scalarplus_perf8(t_int *w)
  function plus_dsp (line 171) | static void plus_dsp(t_plus *x, t_signal **sp)
  function scalarplus_dsp (line 178) | static void scalarplus_dsp(t_scalarplus *x, t_signal **sp)
  function plus_setup (line 183) | static void plus_setup(void)
  type t_minus (line 203) | typedef struct _minus
  type t_scalarminus (line 209) | typedef struct _scalarminus
  function t_int (line 238) | t_int *minus_perform(t_int *w)
  function t_int (line 248) | t_int *minus_perf8(t_int *w)
  function t_int (line 268) | t_int *scalarminus_perform(t_int *w)
  function t_int (line 278) | t_int *scalarminus_perf8(t_int *w)
  function t_int (line 295) | t_int *reversescalarminus_perform(t_int *w)
  function t_int (line 305) | t_int *reversescalarminus_perf8(t_int *w)
  function minus_dsp (line 322) | static void minus_dsp(t_minus *x, t_signal **sp)
  function scalarminus_dsp (line 329) | static void scalarminus_dsp(t_scalarminus *x, t_signal **sp)
  function minus_setup (line 334) | static void minus_setup(void)
  type t_times (line 355) | typedef struct _times
  type t_scalartimes (line 361) | typedef struct _scalartimes
  function t_int (line 390) | t_int *times_perform(t_int *w)
  function t_int (line 400) | t_int *times_perf8(t_int *w)
  function t_int (line 420) | t_int *scalartimes_perform(t_int *w)
  function t_int (line 430) | t_int *scalartimes_perf8(t_int *w)
  function times_dsp (line 447) | static void times_dsp(t_times *x, t_signal **sp)
  function scalartimes_dsp (line 454) | static void scalartimes_dsp(t_scalartimes *x, t_signal **sp)
  function times_setup (line 459) | static void times_setup(void)
  type t_over (line 479) | typedef struct _over
  type t_scalarover (line 485) | typedef struct _scalarover
  function t_int (line 514) | t_int *over_perform(t_int *w)
  function t_int (line 528) | t_int *over_perf8(t_int *w)
  function t_int (line 554) | t_int *scalarover_perform(t_int *w)
  function t_int (line 565) | t_int *scalarover_perf8(t_int *w)
  function t_int (line 583) | t_int *reversescalarover_perform(t_int *w)
  function t_int (line 597) | t_int *reversescalarover_perf8(t_int *w)
  function over_dsp (line 617) | static void over_dsp(t_over *x, t_signal **sp)
  function scalarover_dsp (line 624) | static void scalarover_dsp(t_scalarover *x, t_signal **sp)
  function over_setup (line 629) | static void over_setup(void)
  type t_max (line 649) | typedef struct _max
  type t_scalarmax (line 655) | typedef struct _scalarmax
  function t_int (line 684) | t_int *max_perform(t_int *w)
  function t_int (line 698) | t_int *max_perf8(t_int *w)
  function t_int (line 720) | t_int *scalarmax_perform(t_int *w)
  function t_int (line 734) | t_int *scalarmax_perf8(t_int *w)
  function max_dsp (line 753) | static void max_dsp(t_max *x, t_signal **sp)
  function scalarmax_dsp (line 760) | static void scalarmax_dsp(t_scalarmax *x, t_signal **sp)
  function max_setup (line 765) | static void max_setup(void)
  type t_min (line 785) | typedef struct _min
  type t_scalarmin (line 791) | typedef struct _scalarmin
  function t_int (line 820) | t_int *min_perform(t_int *w)
  function t_int (line 834) | t_int *min_perf8(t_int *w)
  function t_int (line 856) | t_int *scalarmin_perform(t_int *w)
  function t_int (line 870) | t_int *scalarmin_perf8(t_int *w)
  function min_dsp (line 889) | static void min_dsp(t_min *x, t_signal **sp)
  function scalarmin_dsp (line 896) | static void scalarmin_dsp(t_scalarmin *x, t_signal **sp)
  function min_setup (line 901) | static void min_setup(void)
  type t_log_tilde (line 921) | typedef struct _log_tilde
  type t_scalarlog_tilde (line 927) | typedef struct _scalarlog_tilde
  function t_int (line 957) | t_int *log_tilde_perform(t_int *w)
  function t_int (line 976) | t_int *log_tilde_perform_scalar(t_int *w)
  function t_int (line 995) | t_int *log_tilde_perform_reversescalar(t_int *w)
  function log_tilde_dsp (line 1014) | static void log_tilde_dsp(t_log_tilde *x, t_signal **sp)
  function scalarlog_tilde_dsp (line 1021) | static void scalarlog_tilde_dsp(t_scalarlog_tilde *x, t_signal **sp)
  function log_tilde_setup (line 1027) | static void log_tilde_setup(void)
  type t_pow_tilde (line 1047) | typedef struct _pow_tilde
  type t_scalarpow_tilde (line 1053) | typedef struct _scalarpow_tilde
  function t_int (line 1083) | t_int *pow_tilde_perform(t_int *w)
  function t_int (line 1099) | t_int *pow_tilde_perform_scalar(t_int *w)
  function t_int (line 1115) | t_int *pow_tilde_perform_reversescalar(t_int *w)
  function pow_tilde_dsp (line 1131) | static void pow_tilde_dsp(t_pow_tilde *x, t_signal **sp)
  function scalarpow_tilde_dsp (line 1138) | static void scalarpow_tilde_dsp(t_scalarpow_tilde *x, t_signal **sp)
  function pow_tilde_setup (line 1144) | static void pow_tilde_setup(void)
  function d_arithmetic_setup (line 1162) | void d_arithmetic_setup(void)

FILE: libs/libpd/pure-data/src/d_array.c
  type t_dsparray (line 12) | typedef struct _dsparray
  type t_arrayvec (line 20) | typedef struct _arrayvec
  function dsparray_get_array (line 27) | static int dsparray_get_array(t_dsparray *d, int *npoints, t_word **vec,
  function arrayvec_testvec (line 65) | static void arrayvec_testvec(t_arrayvec *v)
  function arrayvec_set (line 76) | static void arrayvec_set(t_arrayvec *v, int argc, t_atom *argv)
  function arrayvec_init (line 96) | static void arrayvec_init(t_arrayvec *v, void *x, int rawargc, t_atom *r...
  function arrayvec_free (line 119) | static void arrayvec_free(t_arrayvec *v)
  type t_tabwrite_tilde (line 131) | typedef struct _tabwrite_tilde
  function tabwrite_tilde_redraw (line 146) | static void tabwrite_tilde_redraw(t_symbol *arraysym)
  function t_int (line 154) | static t_int *tabwrite_tilde_perform(t_int *w)
  function tabwrite_tilde_set (line 190) | static void tabwrite_tilde_set(t_tabwrite_tilde *x, t_symbol *s,
  function tabwrite_tilde_dsp (line 196) | static void tabwrite_tilde_dsp(t_tabwrite_tilde *x, t_signal **sp)
  function tabwrite_tilde_start (line 206) | static void tabwrite_tilde_start(t_tabwrite_tilde *x, t_floatarg f)
  function tabwrite_tilde_bang (line 213) | static void tabwrite_tilde_bang(t_tabwrite_tilde *x)
  function tabwrite_tilde_stop (line 218) | static void tabwrite_tilde_stop(t_tabwrite_tilde *x)
  function tabwrite_tilde_free (line 229) | static void tabwrite_tilde_free(t_tabwrite_tilde *x)
  function tabwrite_tilde_setup (line 234) | static void tabwrite_tilde_setup(void)
  type t_tabplay_tilde (line 255) | typedef struct _tabplay_tilde
  function t_int (line 277) | static t_int *tabplay_tilde_perform(t_int *w)
  function tabplay_tilde_set (line 319) | static void tabplay_tilde_set(t_tabplay_tilde *x, t_symbol *s,
  function tabplay_tilde_dsp (line 325) | static void tabplay_tilde_dsp(t_tabplay_tilde *x, t_signal **sp)
  function tabplay_tilde_list (line 335) | static void tabplay_tilde_list(t_tabplay_tilde *x, t_symbol *s,
  function tabplay_tilde_stop (line 350) | static void tabplay_tilde_stop(t_tabplay_tilde *x)
  function tabplay_tilde_tick (line 357) | static void tabplay_tilde_tick(t_tabplay_tilde *x)
  function tabplay_tilde_free (line 362) | static void tabplay_tilde_free(t_tabplay_tilde *x)
  function tabplay_tilde_setup (line 368) | static void tabplay_tilde_setup(void)
  type t_tabread_tilde (line 386) | typedef struct _tabread_tilde
  function t_int (line 402) | static t_int *tabread_tilde_perform(t_int *w)
  function tabread_tilde_set (line 430) | static void tabread_tilde_set(t_tabread_tilde *x, t_symbol *s,
  function tabread_tilde_dsp (line 436) | static void tabread_tilde_dsp(t_tabread_tilde *x, t_signal **sp)
  function tabread_tilde_free (line 448) | static void tabread_tilde_free(t_tabread_tilde *x)
  function tabread_tilde_setup (line 453) | static void tabread_tilde_setup(void)
  type t_tabread4_tilde (line 469) | typedef struct _tabread4_tilde
  function t_int (line 487) | static t_int *tabread4_tilde_perform(t_int *w)
  function tabread4_tilde_set (line 537) | static void tabread4_tilde_set(t_tabread4_tilde *x, t_symbol *s,
  function tabread4_tilde_dsp (line 543) | static void tabread4_tilde_dsp(t_tabread4_tilde *x, t_signal **sp)
  function tabread4_tilde_free (line 555) | static void tabread4_tilde_free(t_tabread4_tilde *x)
  function tabread4_tilde_setup (line 560) | static void tabread4_tilde_setup(void)
  type t_tabsend (line 577) | typedef struct _tabsend
  function t_int (line 596) | static t_int *tabsend_perform(t_int *w)
  function tabsend_set (line 627) | static void tabsend_set(t_tabsend *x, t_symbol *s, int argc, t_atom *argv)
  function tabsend_dsp (line 632) | static void tabsend_dsp(t_tabsend *x, t_signal **sp)
  function tabsend_free (line 647) | static void tabsend_free(t_tabsend *x)
  function tabsend_setup (line 652) | static void tabsend_setup(void)
  type t_tabreceive (line 669) | typedef struct _tabreceive
  function t_int (line 683) | static t_int *tabreceive_perform(t_int *w)
  function tabreceive_set (line 707) | static void tabreceive_set(t_tabreceive *x, t_symbol *s,
  function tabreceive_dsp (line 713) | static void tabreceive_dsp(t_tabreceive *x, t_signal **sp)
  function tabreceive_free (line 723) | static void tabreceive_free(t_tabreceive *x)
  function tabreceive_setup (line 728) | static void tabreceive_setup(void)
  type t_tabread (line 744) | typedef struct _tabread
  function tabread_float (line 750) | static void tabread_float(t_tabread *x, t_float f)
  function tabread_set (line 769) | static void tabread_set(t_tabread *x, t_symbol *s)
  function tabread_setup (line 782) | static void tabread_setup(void)
  type t_tabread4 (line 795) | typedef struct _tabread4
  function tabread4_float (line 801) | static void tabread4_float(t_tabread4 *x, t_float f)
  function tabread4_set (line 837) | static void tabread4_set(t_tabread4 *x, t_symbol *s)
  function tabread4_setup (line 850) | static void tabread4_setup(void)
  type t_tabwrite (line 863) | typedef struct _tabwrite
  function tabwrite_float (line 870) | static void tabwrite_float(t_tabwrite *x, t_float f)
  function tabwrite_set (line 892) | static void tabwrite_set(t_tabwrite *x, t_symbol *s)
  function tabwrite_setup (line 906) | void tabwrite_setup(void)
  function d_array_setup (line 917) | void d_array_setup(void)

FILE: libs/libpd/pure-data/src/d_ctl.c
  type t_sig (line 15) | typedef struct _sig
  function sig_tilde_float (line 21) | static void sig_tilde_float(t_sig *x, t_float f)
  function sig_tilde_dsp (line 26) | static void sig_tilde_dsp(t_sig *x, t_signal **sp)
  function sig_tilde_setup (line 39) | static void sig_tilde_setup(void)
  type t_line (line 51) | typedef struct _line
  function t_int (line 66) | static t_int *line_tilde_perform(t_int *w)
  function t_int (line 101) | static t_int *line_tilde_perf8(t_int *w)
  function line_tilde_float (line 138) | static void line_tilde_float(t_line *x, t_float f)
  function line_tilde_stop (line 154) | static void line_tilde_stop(t_line *x)
  function line_tilde_dsp (line 160) | static void line_tilde_dsp(t_line *x, t_signal **sp)
  function line_tilde_setup (line 180) | static void line_tilde_setup(void)
  type t_vseg (line 194) | typedef struct _vseg
  type t_vline (line 202) | typedef struct _vline
  function t_int (line 219) | static t_int *vline_tilde_perform(t_int *w)
  function vline_tilde_stop (line 280) | static void vline_tilde_stop(t_vline *x)
  function vline_tilde_float (line 292) | static void vline_tilde_float(t_vline *x, t_float f)
  function vline_tilde_dsp (line 351) | static void vline_tilde_dsp(t_vline *x, t_signal **sp)
  function vline_tilde_setup (line 374) | static void vline_tilde_setup(void)
  type t_snapshot (line 388) | typedef struct _snapshot
  function t_int (line 404) | static t_int *snapshot_tilde_perform(t_int *w)
  function snapshot_tilde_dsp (line 412) | static void snapshot_tilde_dsp(t_snapshot *x, t_signal **sp)
  function snapshot_tilde_bang (line 418) | static void snapshot_tilde_bang(t_snapshot *x)
  function snapshot_tilde_set (line 423) | static void snapshot_tilde_set(t_snapshot *x, t_floatarg f)
  function snapshot_tilde_setup (line 428) | static void snapshot_tilde_setup(void)
  type t_vsnapshot (line 443) | typedef struct _vsnapshot
  function t_int (line 465) | static t_int *vsnapshot_tilde_perform(t_int *w)
  function vsnapshot_tilde_dsp (line 478) | static void vsnapshot_tilde_dsp(t_vsnapshot *x, t_signal **sp)
  function vsnapshot_tilde_bang (line 493) | static void vsnapshot_tilde_bang(t_vsnapshot *x)
  function vsnapshot_tilde_ff (line 509) | static void vsnapshot_tilde_ff(t_vsnapshot *x)
  function vsnapshot_tilde_setup (line 515) | static void vsnapshot_tilde_setup(void)
  type t_sigenv (line 532) | typedef struct sigenv
  function t_int (line 584) | static t_int *env_tilde_perform(t_int *w)
  function env_tilde_dsp (line 622) | static void env_tilde_dsp(t_sigenv *x, t_signal **sp)
  function env_tilde_tick (line 643) | static void env_tilde_tick(t_sigenv *x) /* callback function for the clo...
  function env_tilde_ff (line 648) | static void env_tilde_ff(t_sigenv *x)           /* cleanup on free */
  function env_tilde_setup (line 655) | void env_tilde_setup(void)
  type t_threshold_tilde (line 668) | typedef struct _threshold_tilde
  function t_threshold_tilde (line 689) | static t_threshold_tilde *threshold_tilde_new(t_floatarg hithresh,
  function threshold_tilde_set (line 707) | static void threshold_tilde_set(t_threshold_tilde *x,
  function threshold_tilde_ft1 (line 721) | static void threshold_tilde_ft1(t_threshold_tilde *x, t_floatarg f)
  function threshold_tilde_tick (line 727) | static void threshold_tilde_tick(t_threshold_tilde *x)
  function t_int (line 734) | static t_int *threshold_tilde_perform(t_int *w)
  function threshold_tilde_dsp (line 773) | void threshold_tilde_dsp(t_threshold_tilde *x, t_signal **sp)
  function threshold_tilde_ff (line 779) | static void threshold_tilde_ff(t_threshold_tilde *x)
  function threshold_tilde_setup (line 784) | static void threshold_tilde_setup(void)
  function d_ctl_setup (line 801) | void d_ctl_setup(void)

FILE: libs/libpd/pure-data/src/d_dac.c
  type t_dac (line 15) | typedef struct _dac
  function dac_dsp (line 45) | static void dac_dsp(t_dac *x, t_signal **sp)
  function dac_set (line 67) | static void dac_set(t_dac *x, t_symbol *s, int argc, t_atom *argv)
  function dac_free (line 75) | static void dac_free(t_dac *x)
  function dac_setup (line 80) | static void dac_setup(void)
  type t_adc (line 93) | typedef struct _adc
  function adc_dsp (line 139) | static void adc_dsp(t_adc *x, t_signal **sp)
  function adc_set (line 164) | static void adc_set(t_adc *x, t_symbol *s, int argc, t_atom *argv)
  function adc_free (line 186) | static void adc_free(t_adc *x)
  function adc_setup (line 191) | static void adc_setup(void)
  function d_dac_setup (line 200) | void d_dac_setup(void)

FILE: libs/libpd/pure-data/src/d_delay.c
  type t_delwritectl (line 14) | typedef struct delwritectl
  type t_sigdelwrite (line 21) | typedef struct _sigdelwrite
  function sigdelwrite_update (line 37) | static void sigdelwrite_update(t_sigdelwrite *x) /* added by Mathieu Bou...
  function sigdelwrite_clear (line 56) | static void sigdelwrite_clear (t_sigdelwrite *x) /* added by Orm Finnend...
  function sigdelwrite_check (line 64) | static void sigdelwrite_check(t_sigdelwrite *x, int vecsize, t_float sr)
  function t_int (line 108) | static t_int *sigdelwrite_perform(t_int *w)
  function sigdelwrite_dsp (line 137) | static void sigdelwrite_dsp(t_sigdelwrite *x, t_signal **sp)
  function sigdelwrite_free (line 145) | static void sigdelwrite_free(t_sigdelwrite *x)
  function sigdelwrite_setup (line 152) | static void sigdelwrite_setup(void)
  type t_sigdelread (line 168) | typedef struct _sigdelread
  function sigdelread_float (line 193) | static void sigdelread_float(t_sigdelread *x, t_float f)
  function t_int (line 208) | static t_int *sigdelread_perform(t_int *w)
  function sigdelread_dsp (line 227) | static void sigdelread_dsp(t_sigdelread *x, t_signal **sp)
  function sigdelread_setup (line 250) | static void sigdelread_setup(void)
  type t_sigvd (line 265) | typedef struct _sigvd
  function t_int (line 285) | static t_int *sigvd_perform(t_int *w)
  function sigvd_dsp (line 333) | static void sigvd_dsp(t_sigvd *x, t_signal **sp)
  function sigvd_setup (line 355) | static void sigvd_setup(void)
  function d_delay_setup (line 367) | void d_delay_setup(void)

FILE: libs/libpd/pure-data/src/d_fft.c
  function fftclass_cleanup (line 19) | static void fftclass_cleanup(t_class *c)
  function t_int (line 27) | static t_int *sigfft_swap(t_int *w)
  function t_int (line 45) | static t_int *sigrfft_flip(t_int *w)
  type t_sigfft (line 58) | typedef struct fft
  function t_int (line 84) | static t_int *sigfft_perform(t_int *w)
  function t_int (line 93) | static t_int *sigifft_perform(t_int *w)
  function sigfft_dspx (line 102) | static void sigfft_dspx(t_sigfft *x, t_signal **sp, t_int *(*f)(t_int *w))
  function sigfft_dsp (line 143) | static void sigfft_dsp(t_sigfft *x, t_signal **sp)
  function sigifft_dsp (line 148) | static void sigifft_dsp(t_sigfft *x, t_signal **sp)
  function sigfft_setup (line 153) | static void sigfft_setup(void)
  type t_sigrfft (line 177) | typedef struct rfft
  function t_int (line 192) | static t_int *sigrfft_perform(t_int *w)
  function sigrfft_dsp (line 200) | static void sigrfft_dsp(t_sigrfft *x, t_signal **sp)
  function sigrfft_setup (line 232) | static void sigrfft_setup(void)
  type t_sigrifft (line 248) | typedef struct rifft
  function t_int (line 263) | static t_int *sigrifft_perform(t_int *w)
  function sigrifft_dsp (line 271) | static void sigrifft_dsp(t_sigrifft *x, t_signal **sp)
  function sigrifft_setup (line 308) | static void sigrifft_setup(void)
  type t_sigframp (line 324) | typedef struct framp
  function t_int (line 342) | static t_int *sigframp_perform(t_int *w)
  function sigframp_dsp (line 388) | static void sigframp_dsp(t_sigframp *x, t_signal **sp)
  function sigframp_setup (line 401) | static void sigframp_setup(void)
  function d_fft_setup (line 414) | void d_fft_setup(void)

FILE: libs/libpd/pure-data/src/d_fft_fftsg.c
  function ooura_init (line 39) | static int ooura_init( int n)
  function ooura_term (line 84) | static void ooura_term( void)
  function mayer_init (line 100) | void mayer_init( void)
  function mayer_term (line 105) | void mayer_term( void)
  function EXTERN (line 112) | EXTERN void mayer_fht(t_sample *fz, int n)
  function EXTERN (line 117) | EXTERN void mayer_dofft(t_sample *fz1, t_sample *fz2, int n, int sgn)
  function EXTERN (line 140) | EXTERN void mayer_fft(int n, t_sample *fz1, t_sample *fz2)
  function EXTERN (line 145) | EXTERN void mayer_ifft(int n, t_sample *fz1, t_sample *fz2)
  function EXTERN (line 150) | EXTERN void mayer_realfft(int n, t_sample *fz)
  function EXTERN (line 168) | EXTERN void mayer_realifft(int n, t_sample *fz)
  function pd_fft (line 188) | void pd_fft(t_float *buf, int npoints, int inverse)
  function cdft (line 487) | void cdft(int n, int isgn, FFTFLT *a, int *ip, FFTFLT *w)
  function rdft (line 507) | void rdft(int n, int isgn, FFTFLT *a, int *ip, FFTFLT *w)
  function ddct (line 551) | void ddct(int n, int isgn, FFTFLT *a, int *ip, FFTFLT *w)
  function ddst (line 607) | void ddst(int n, int isgn, FFTFLT *a, int *ip, FFTFLT *w)
  function dfct (line 663) | void dfct(int n, FFTFLT *a, FFTFLT *t, int *ip, FFTFLT *w)
  function dfst (line 756) | void dfst(int n, FFTFLT *a, FFTFLT *t, int *ip, FFTFLT *w)
  function makewt (line 845) | void makewt(int nw, int *ip, FFTFLT *w)
  function makeipt (line 906) | void makeipt(int nw, int *ip)
  function makect (line 926) | void makect(int nc, int *ip, FFTFLT *c)
  function cftfsub (line 1002) | void cftfsub(int n, FFTFLT *a, int *ip, int nw, FFTFLT *w)
  function cftbsub (line 1050) | void cftbsub(int n, FFTFLT *a, int *ip, int nw, FFTFLT *w)
  function bitrv2 (line 1098) | void bitrv2(int n, int *ip, FFTFLT *a)
  function bitrv2conj (line 1445) | void bitrv2conj(int n, int *ip, FFTFLT *a)
  function bitrv216 (line 1800) | void bitrv216(FFTFLT *a)
  function bitrv216neg (line 1857) | void bitrv216neg(FFTFLT *a)
  function bitrv208 (line 1927) | void bitrv208(FFTFLT *a)
  function bitrv208neg (line 1950) | void bitrv208neg(FFTFLT *a)
  function cftf1st (line 1986) | void cftf1st(int n, FFTFLT *a, FFTFLT *w)
  function cftb1st (line 2192) | void cftb1st(int n, FFTFLT *a, FFTFLT *w)
  type cdft_arg_st (line 2399) | struct cdft_arg_st {
  type cdft_arg_t (line 2406) | typedef struct cdft_arg_st cdft_arg_t;
  function cftrec4_th (line 2409) | void cftrec4_th(int n, FFTFLT *a, int nw, FFTFLT *w)
  function cftrec4 (line 2504) | void cftrec4(int n, FFTFLT *a, int nw, FFTFLT *w)
  function cfttree (line 2526) | int cfttree(int n, int j, int k, FFTFLT *a, int nw, FFTFLT *w)
  function cftleaf (line 2561) | void cftleaf(int n, int isplt, FFTFLT *a, int nw, FFTFLT *w)
  function cftmdl1 (line 2626) | void cftmdl1(int n, FFTFLT *a, FFTFLT *w)
  function cftmdl2 (line 2736) | void cftmdl2(int n, FFTFLT *a, FFTFLT *w)
  function cftfx41 (line 2870) | void cftfx41(int n, FFTFLT *a, int nw, FFTFLT *w)
  function cftf161 (line 2891) | void cftf161(FFTFLT *a, FFTFLT *w)
  function cftf162 (line 3050) | void cftf162(FFTFLT *a, FFTFLT *w)
  function cftf081 (line 3233) | void cftf081(FFTFLT *a, FFTFLT *w)
  function cftf082 (line 3295) | void cftf082(FFTFLT *a, FFTFLT *w)
  function cftf040 (line 3367) | void cftf040(FFTFLT *a)
  function cftb040 (line 3390) | void cftb040(FFTFLT *a)
  function cftx020 (line 3413) | void cftx020(FFTFLT *a)
  function rftfsub (line 3426) | void rftfsub(int n, FFTFLT *a, int nc, FFTFLT *c)
  function rftbsub (line 3451) | void rftbsub(int n, FFTFLT *a, int nc, FFTFLT *c)
  function dctsub (line 3476) | void dctsub(int n, FFTFLT *a, int nc, FFTFLT *c)
  function dstsub (line 3497) | void dstsub(int n, FFTFLT *a, int nc, FFTFLT *c)

FILE: libs/libpd/pure-data/src/d_filter.c
  type t_hipctl (line 11) | typedef struct hipctl
  type t_sighip (line 17) | typedef struct sighip
  function sighip_ft1 (line 41) | static void sighip_ft1(t_sighip *x, t_floatarg f)
  function t_int (line 52) | static t_int *sighip_perform(t_int *w)
  function t_int (line 83) | static t_int *sighip_perform_old(t_int *w)
  function sighip_dsp (line 113) | static void sighip_dsp(t_sighip *x, t_signal **sp)
  function sighip_clear (line 122) | static void sighip_clear(t_sighip *x, t_floatarg q)
  function sighip_setup (line 127) | void sighip_setup(void)
  type t_siglop (line 141) | typedef struct siglop
  function siglop_clear (line 165) | static void siglop_clear(t_siglop *x, t_floatarg q)
  function t_int (line 170) | static t_int *siglop_perf_scalar(t_int *w)
  function t_int (line 198) | static t_int *siglop_perf_vector(t_int *w)
  function siglop_dsp (line 224) | static void siglop_dsp(t_siglop *x, t_signal **sp)
  function siglop_setup (line 232) | void siglop_setup(void)
  type t_bpctl (line 244) | typedef struct bpctl
  type t_sigbp (line 253) | typedef struct sigbp
  function t_float (line 281) | static t_float sigbp_qcos(t_float f)
  function sigbp_docoef (line 291) | static void sigbp_docoef(t_sigbp *x, t_floatarg f, t_floatarg q)
  function sigbp_ft1 (line 310) | static void sigbp_ft1(t_sigbp *x, t_floatarg f)
  function sigbp_ft2 (line 315) | static void sigbp_ft2(t_sigbp *x, t_floatarg q)
  function sigbp_clear (line 320) | static void sigbp_clear(t_sigbp *x, t_floatarg q)
  function t_int (line 325) | static t_int *sigbp_perform(t_int *w)
  function sigbp_dsp (line 353) | static void sigbp_dsp(t_sigbp *x, t_signal **sp)
  function sigbp_setup (line 362) | void sigbp_setup(void)
  type t_biquadctl (line 378) | typedef struct biquadctl
  type t_sigbiquad (line 389) | typedef struct sigbiquad
  function t_int (line 410) | static t_int *sigbiquad_perform(t_int *w)
  function sigbiquad_list (line 438) | static void sigbiquad_list(t_sigbiquad *x, t_symbol *s, int argc, t_atom...
  function sigbiquad_set (line 472) | static void sigbiquad_set(t_sigbiquad *x, t_symbol *s, int argc, t_atom ...
  function sigbiquad_dsp (line 479) | static void sigbiquad_dsp(t_sigbiquad *x, t_signal **sp)
  function sigbiquad_setup (line 486) | void sigbiquad_setup(void)
  type t_sigsamphold (line 502) | typedef struct sigsamphold
  function t_int (line 523) | static t_int *sigsamphold_perform(t_int *w)
  function sigsamphold_dsp (line 545) | static void sigsamphold_dsp(t_sigsamphold *x, t_signal **sp)
  function sigsamphold_reset (line 552) | static void sigsamphold_reset(t_sigsamphold *x, t_symbol *s, int argc,
  function sigsamphold_set (line 559) | static void sigsamphold_set(t_sigsamphold *x, t_float f)
  function sigsamphold_setup (line 564) | void sigsamphold_setup(void)
  type t_sigrpole (line 579) | typedef struct sigrpole
  function t_int (line 599) | static t_int *sigrpole_perform(t_int *w)
  function sigrpole_dsp (line 620) | static void sigrpole_dsp(t_sigrpole *x, t_signal **sp)
  function sigrpole_clear (line 627) | static void sigrpole_clear(t_sigrpole *x)
  function sigrpole_set (line 632) | static void sigrpole_set(t_sigrpole *x, t_float f)
  function sigrpole_setup (line 637) | void sigrpole_setup(void)
  type t_sigrzero (line 652) | typedef struct sigrzero
  function t_int (line 672) | static t_int *sigrzero_perform(t_int *w)
  function sigrzero_dsp (line 692) | static void sigrzero_dsp(t_sigrzero *x, t_signal **sp)
  function sigrzero_clear (line 699) | static void sigrzero_clear(t_sigrzero *x)
  function sigrzero_set (line 704) | static void sigrzero_set(t_sigrzero *x, t_float f)
  function sigrzero_setup (line 709) | void sigrzero_setup(void)
  type t_sigrzero_rev (line 724) | typedef struct sigrzero_rev
  function t_int (line 744) | static t_int *sigrzero_rev_perform(t_int *w)
  function sigrzero_rev_dsp (line 764) | static void sigrzero_rev_dsp(t_sigrzero_rev *x, t_signal **sp)
  function sigrzero_rev_clear (line 771) | static void sigrzero_rev_clear(t_sigrzero_rev *x)
  function sigrzero_rev_set (line 776) | static void sigrzero_rev_set(t_sigrzero_rev *x, t_float f)
  function sigrzero_rev_setup (line 781) | void sigrzero_rev_setup(void)
  type t_sigcpole (line 797) | typedef struct sigcpole
  function t_int (line 824) | static t_int *sigcpole_perform(t_int *w)
  function sigcpole_dsp (line 856) | static void sigcpole_dsp(t_sigcpole *x, t_signal **sp)
  function sigcpole_clear (line 863) | static void sigcpole_clear(t_sigcpole *x)
  function sigcpole_set (line 868) | static void sigcpole_set(t_sigcpole *x, t_float re, t_float im)
  function sigcpole_setup (line 874) | void sigcpole_setup(void)
  type t_sigczero (line 890) | typedef struct sigczero
  function t_int (line 917) | static t_int *sigczero_perform(t_int *w)
  function sigczero_dsp (line 946) | static void sigczero_dsp(t_sigczero *x, t_signal **sp)
  function sigczero_clear (line 953) | static void sigczero_clear(t_sigczero *x)
  function sigczero_set (line 958) | static void sigczero_set(t_sigczero *x, t_float re, t_float im)
  function sigczero_setup (line 964) | void sigczero_setup(void)
  type t_sigczero_rev (line 980) | typedef struct sigczero_rev
  function t_int (line 1007) | static t_int *sigczero_rev_perform(t_int *w)
  function sigczero_rev_dsp (line 1038) | static void sigczero_rev_dsp(t_sigczero_rev *x, t_signal **sp)
  function sigczero_rev_clear (line 1045) | static void sigczero_rev_clear(t_sigczero_rev *x)
  function sigczero_rev_set (line 1050) | static void sigczero_rev_set(t_sigczero_rev *x, t_float re, t_float im)
  function sigczero_rev_setup (line 1056) | void sigczero_rev_setup(void)
  type t_slop_tilde (line 1072) | typedef struct slop_tilde
  function slop_tilde_set (line 1101) | static void slop_tilde_set(t_slop_tilde *x, t_floatarg q)
  function t_int (line 1106) | static t_int *slop_tilde_perform(t_int *w)
  function slop_tilde_dsp (line 1157) | static void slop_tilde_dsp(t_slop_tilde *x, t_signal **sp)
  function slop_tilde_setup (line 1166) | void slop_tilde_setup(void)
  function d_filter_setup (line 1180) | void d_filter_setup(void)

FILE: libs/libpd/pure-data/src/d_global.c
  type t_sigsend (line 13) | typedef struct _sigsend
  function t_int (line 39) | static t_int *sigsend_perform(t_int *w)
  function sigsend_channels (line 53) | static void sigsend_channels(t_sigsend *x, t_float fnchans)
  function sigsend_fixbuf (line 60) | static void sigsend_fixbuf(t_sigsend *x, int length)
  function sigsend_dsp (line 71) | static void sigsend_dsp(t_sigsend *x, t_signal **sp)
  function sigsend_free (line 83) | static void sigsend_free(t_sigsend *x)
  function sigsend_setup (line 90) | static void sigsend_setup(void)
  type t_sigreceive (line 108) | typedef struct _sigreceive
  function t_int (line 128) | static t_int *sigreceive_perform(t_int *w)
  function t_int (line 148) | static t_int *sigreceive_perf8(t_int *w)
  function sigreceive_set (line 175) | static void sigreceive_set(t_sigreceive *x, t_symbol *s)
  function sigreceive_dsp (line 206) | static void sigreceive_dsp(t_sigreceive *x, t_signal **sp)
  function sigreceive_setup (line 218) | static void sigreceive_setup(void)
  type t_sigcatch (line 235) | typedef struct _sigcatch
  function sigcatch_channels (line 260) | static void sigcatch_channels(t_sigcatch *x, t_float fnchans)
  function sigcatch_fixbuf (line 267) | static void sigcatch_fixbuf(t_sigcatch *x, int length)
  function t_int (line 278) | static t_int *sigcatch_perform(t_int *w)
  function sigcatch_dsp (line 292) | static void sigcatch_dsp(t_sigcatch *x, t_signal **sp)
  function sigcatch_free (line 300) | static void sigcatch_free(t_sigcatch *x)
  function sigcatch_setup (line 307) | static void sigcatch_setup(void)
  type t_sigthrow (line 322) | typedef struct _sigthrow
  function t_int (line 342) | static t_int *sigthrow_perform(t_int *w)
  function sigthrow_set (line 357) | static void sigthrow_set(t_sigthrow *x, t_symbol *s)
  function sigthrow_dsp (line 380) | static void sigthrow_dsp(t_sigthrow *x, t_signal **sp)
  function sigthrow_setup (line 388) | static void sigthrow_setup(void)
  function d_global_setup (line 402) | void d_global_setup(void)

FILE: libs/libpd/pure-data/src/d_math.c
  type t_clip (line 18) | typedef struct _clip
  function t_int (line 38) | static t_int *clip_perform(t_int *w)
  function clip_dsp (line 54) | static void clip_dsp(t_clip *x, t_signal **sp)
  function clip_setup (line 60) | static void clip_setup(void)
  function init_rsqrt (line 77) | static void init_rsqrt(void)
  function t_float (line 105) | t_float q8_rsqrt(t_float f0)
  function t_float (line 118) | t_float q8_sqrt(t_float f0)
  function t_float (line 131) | t_float qsqrt(t_float f) {return (q8_sqrt(f)); }
  function t_float (line 132) | t_float qrsqrt(t_float f) {return (q8_rsqrt(f)); }
  type t_sigrsqrt (line 134) | typedef struct sigrsqrt
  function t_int (line 151) | static t_int *sigrsqrt_perform(t_int *w)
  function sigrsqrt_dsp (line 174) | static void sigrsqrt_dsp(t_sigrsqrt *x, t_signal **sp)
  function sigrsqrt_setup (line 180) | void sigrsqrt_setup(void)
  type t_sigsqrt (line 194) | typedef struct sigsqrt
  function t_int (line 211) | t_int *sigsqrt_perform(t_int *w)    /* not static; also used in d_fft.c */
  function sigsqrt_dsp (line 234) | static void sigsqrt_dsp(t_sigsqrt *x, t_signal **sp)
  function sigsqrt_setup (line 240) | void sigsqrt_setup(void)
  type t_sigwrap (line 252) | typedef struct wrap
  function t_int (line 268) | static t_int *sigwrap_perform(t_int *w)
  function t_int (line 285) | static t_int *sigwrap_old_perform(t_int *w)
  function sigwrap_dsp (line 299) | static void sigwrap_dsp(t_sigwrap *x, t_signal **sp)
  function sigwrap_setup (line 307) | void sigwrap_setup(void)
  type t_mtof_tilde (line 318) | typedef struct mtof_tilde
  function t_int (line 334) | static t_int *mtof_tilde_perform(t_int *w)
  function mtof_tilde_dsp (line 351) | static void mtof_tilde_dsp(t_mtof_tilde *x, t_signal **sp)
  function mtof_tilde_setup (line 357) | void mtof_tilde_setup(void)
  type t_ftom_tilde (line 368) | typedef struct ftom_tilde
  function t_int (line 384) | static t_int *ftom_tilde_perform(t_int *w)
  function ftom_tilde_dsp (line 396) | static void ftom_tilde_dsp(t_ftom_tilde *x, t_signal **sp)
  function ftom_tilde_setup (line 402) | void ftom_tilde_setup(void)
  type t_dbtorms_tilde (line 413) | typedef struct dbtorms_tilde
  function t_int (line 429) | static t_int *dbtorms_tilde_perform(t_int *w)
  function dbtorms_tilde_dsp (line 447) | static void dbtorms_tilde_dsp(t_dbtorms_tilde *x, t_signal **sp)
  function dbtorms_tilde_setup (line 454) | void dbtorms_tilde_setup(void)
  type t_rmstodb_tilde (line 466) | typedef struct rmstodb_tilde
  function t_int (line 482) | static t_int *rmstodb_tilde_perform(t_int *w)
  function rmstodb_tilde_dsp (line 499) | static void rmstodb_tilde_dsp(t_rmstodb_tilde *x, t_signal **sp)
  function rmstodb_tilde_setup (line 506) | void rmstodb_tilde_setup(void)
  type t_dbtopow_tilde (line 518) | typedef struct dbtopow_tilde
  function t_int (line 534) | static t_int *dbtopow_tilde_perform(t_int *w)
  function dbtopow_tilde_dsp (line 552) | static void dbtopow_tilde_dsp(t_dbtopow_tilde *x, t_signal **sp)
  function dbtopow_tilde_setup (line 559) | void dbtopow_tilde_setup(void)
  type t_powtodb_tilde (line 570) | typedef struct powtodb_tilde
  function t_int (line 586) | static t_int *powtodb_tilde_perform(t_int *w)
  function powtodb_tilde_dsp (line 603) | static void powtodb_tilde_dsp(t_powtodb_tilde *x, t_signal **sp)
  function powtodb_tilde_setup (line 610) | void powtodb_tilde_setup(void)
  type t_exp_tilde (line 623) | typedef struct _exp_tilde
  function t_int (line 636) | t_int *exp_tilde_perform(t_int *w)
  function exp_tilde_dsp (line 646) | static void exp_tilde_dsp(t_exp_tilde *x, t_signal **sp)
  function exp_tilde_setup (line 653) | static void exp_tilde_setup(void)
  type t_abs_tilde (line 665) | typedef struct _abs_tilde
  function t_int (line 678) | t_int *abs_tilde_perform(t_int *w)
  function abs_tilde_dsp (line 691) | static void abs_tilde_dsp(t_abs_tilde *x, t_signal **sp)
  function abs_tilde_setup (line 698) | static void abs_tilde_setup(void)
  function d_math_setup (line 709) | void d_math_setup(void)

FILE: libs/libpd/pure-data/src/d_misc.c
  type t_print (line 14) | typedef struct _print
  function t_int (line 22) | static t_int *print_perform(t_int *w)
  function print_dsp (line 41) | static void print_dsp(t_print *x, t_signal **sp)
  function print_float (line 46) | static void print_float(t_print *x, t_float f)
  function print_bang (line 52) | static void print_bang(t_print *x)
  function print_setup (line 66) | static void print_setup(void)
  type t_bang (line 80) | typedef struct _bang
  function t_int (line 86) | static t_int *bang_tilde_perform(t_int *w)
  function bang_tilde_dsp (line 93) | static void bang_tilde_dsp(t_bang *x, t_signal **sp)
  function bang_tilde_tick (line 98) | static void bang_tilde_tick(t_bang *x)
  function bang_tilde_free (line 103) | static void bang_tilde_free(t_bang *x)
  function bang_tilde_setup (line 116) | static void bang_tilde_setup(void)
  type t_snake_in (line 129) | typedef struct _snake_in
  function snake_in_tilde_dsp (line 136) | static void snake_in_tilde_dsp(t_snake_in *x, t_signal **sp)
  type t_snake_out (line 163) | typedef struct _snake_out
  function snake_out_tilde_dsp (line 170) | static void snake_out_tilde_dsp(t_snake_out *x, t_signal **sp)
  function snake_tilde_setup (line 220) | static void snake_tilde_setup(void)
  function d_misc_setup (line 244) | void d_misc_setup(void)

FILE: libs/libpd/pure-data/src/d_osc.c
  type t_phasor (line 35) | typedef struct _phasor
  function t_int (line 54) | static t_int *phasor_perform(t_int *w)
  function phasor_dsp (line 81) | static void phasor_dsp(t_phasor *x, t_signal **sp)
  function phasor_ft1 (line 87) | static void phasor_ft1(t_phasor *x, t_float f)
  function phasor_setup (line 92) | static void phasor_setup(void)
  type t_cos (line 111) | typedef struct _cos
  function t_int (line 125) | static t_int *cos_perform(t_int *w)
  function cos_dsp (line 176) | static void cos_dsp(t_cos *x, t_signal **sp)
  function cos_maketable (line 183) | static void cos_maketable(void)
  function cos_cleanup (line 203) | static void cos_cleanup(t_class *c)
  function cos_setup (line 209) | static void cos_setup(void)
  type t_osc (line 223) | typedef struct _osc
  function t_int (line 242) | static t_int *osc_perform(t_int *w)
  function osc_dsp (line 300) | static void osc_dsp(t_osc *x, t_signal **sp)
  function osc_ft1 (line 306) | static void osc_ft1(t_osc *x, t_float f)
  function osc_setup (line 311) | static void osc_setup(void)
  type t_vcfctl (line 324) | typedef struct vcfctl
  type t_sigvcf (line 332) | typedef struct sigvcf
  function sigvcf_ft1 (line 356) | static void sigvcf_ft1(t_sigvcf *x, t_float f)
  function t_int (line 363) | static t_int *sigvcf_perform(t_int *w)
  function sigvcf_dsp (line 426) | static void sigvcf_dsp(t_sigvcf *x, t_signal **sp)
  function sigvcf_setup (line 434) | static
  type t_noise (line 449) | typedef struct _noise
  function t_int (line 466) | static t_int *noise_perform(t_int *w)
  function noise_dsp (line 482) | static void noise_dsp(t_noise *x, t_signal **sp)
  function noise_float (line 487) | static void noise_float(t_noise *x, t_float f)
  function noise_setup (line 493) | static void noise_setup(void)
  type t_tabosc4_tilde (line 508) | typedef struct _tabosc4_tilde
  function t_int (line 533) | static t_int *tabosc4_tilde_perform(t_int *w)
  function tabosc4_tilde_set (line 585) | static void tabosc4_tilde_set(t_tabosc4_tilde *x, t_symbol *s)
  function tabosc4_tilde_ft1 (line 616) | static void tabosc4_tilde_ft1(t_tabosc4_tilde *x, t_float f)
  function tabosc4_tilde_dsp (line 621) | static void tabosc4_tilde_dsp(t_tabosc4_tilde *x, t_signal **sp)
  function tabosc4_tilde_setup (line 630) | static void tabosc4_tilde_setup(void)
  function d_osc_setup (line 645) | void d_osc_setup(void)

FILE: libs/libpd/pure-data/src/d_resample.c
  function t_int (line 9) | t_int *downsampling_perform_0(t_int *w)
  function t_int (line 26) | t_int *upsampling_perform_0(t_int *w)
  function t_int (line 48) | t_int *upsampling_perform_hold(t_int *w)
  function t_int (line 72) | t_int *upsampling_perform_linear(t_int *w)
  function resample_init (line 104) | void resample_init(t_resample *x)
  function resample_free (line 112) | void resample_free(t_resample *x)
  function resample_dsp (line 125) | void resample_dsp(t_resample *x,
  function resamplefrom_dsp (line 169) | void resamplefrom_dsp(t_resample *x,
  function resampleto_dsp (line 192) | void resampleto_dsp(t_resample *x,

FILE: libs/libpd/pure-data/src/d_soundfile.c
  type t_floatuint (line 41) | typedef union _floatuint
  function soundfile_clear (line 49) | void soundfile_clear(t_soundfile *sf)
  function soundfile_copy (line 57) | void soundfile_copy(t_soundfile *dst, const t_soundfile *src)
  function soundfile_needsbyteswap (line 62) | int soundfile_needsbyteswap(const t_soundfile *sf)
  function outlet_soundfileinfo (line 85) | static void outlet_soundfileinfo(t_outlet *out, t_soundfile *sf)
  function object_sferror (line 98) | static void object_sferror(const void *x, const char *header,
  function soundfile_type_setup (line 134) | void soundfile_type_setup(void)
  function soundfile_addtype (line 142) | int soundfile_addtype(const t_soundfile_type *type)
  function t_soundfile_type (line 160) | static t_soundfile_type **soundfile_firsttype(void)
  function t_soundfile_type (line 166) | static t_soundfile_type **soundfile_nexttype(t_soundfile_type **t)
  function t_soundfile_type (line 172) | static t_soundfile_type *soundfile_findtype(const char *name)
  type t_asciiargs (line 187) | typedef struct _asciiargs
  function ascii_hasextension (line 199) | static int ascii_hasextension(const char *filename, size_t size)
  function ascii_addextension (line 207) | static int ascii_addextension(char *filename, size_t size)
  function fd_read (line 218) | ssize_t fd_read(int fd, off_t offset, void *dst, size_t size)
  function fd_write (line 225) | ssize_t fd_write(int fd, off_t offset, const void *src, size_t size)
  function sys_isbigendian (line 234) | int sys_isbigendian(void)
  function swap8 (line 241) | uint64_t swap8(uint64_t n, int doit)
  function swap8s (line 255) | int64_t swap8s(int64_t n, int doit)
  function swap4 (line 268) | uint32_t swap4(uint32_t n, int doit)
  function swap4s (line 276) | int32_t swap4s(int32_t n, int doit)
  function swap2 (line 286) | uint16_t swap2(uint16_t n, int doit)
  function swapstring4 (line 293) | void swapstring4(char *foo, int doit)
  function swapstring8 (line 302) | void swapstring8(char *foo, int doit)
  function open_soundfile_via_fd (line 324) | int open_soundfile_via_fd(int fd, t_soundfile *sf, size_t skipframes)
  function open_soundfile_via_path (line 405) | int open_soundfile_via_path(const char *dirname, const char *filename,
  function open_soundfile_via_canvas (line 421) | int open_soundfile_via_canvas(t_canvas *canvas, const char *filename,
  function soundfile_xferin_sample (line 433) | static void soundfile_xferin_sample(const t_soundfile *sf, int nvecs,
  function soundfile_xferin_words (line 505) | static void soundfile_xferin_words(const t_soundfile *sf, int nvecs,
  type t_soundfiler_writeargs (line 596) | typedef struct _soundfiler_writeargs
  function soundfiler_parsewriteargs (line 616) | static int soundfiler_parsewriteargs(void *obj, int *p_argc, t_atom **p_...
  function create_soundfile (line 745) | static int create_soundfile(t_canvas *canvas, const char *filename,
  function soundfile_finishwrite (line 777) | static void soundfile_finishwrite(void *obj, const char *filename,
  function soundfile_xferout_sample (line 789) | static void soundfile_xferout_sample(const t_soundfile *sf,
  function soundfile_xferout_words (line 897) | static void soundfile_xferout_words(const t_soundfile *sf, t_word **vecs,
  type t_soundfiler (line 1011) | typedef struct _soundfiler
  function t_soundfiler (line 1018) | static t_soundfiler *soundfiler_new(void)
  function soundfiler_readascii (line 1027) | static int soundfiler_readascii(t_soundfiler *x, const char *filename,
  function soundfiler_read (line 1116) | static void soundfiler_read(t_soundfiler *x, t_symbol *s,
  function soundfiler_writeascii (line 1379) | int soundfiler_writeascii(t_soundfiler *x, const char *filename, t_ascii...
  function soundfiler_dowrite (line 1405) | size_t soundfiler_dowrite(void *obj, t_canvas *canvas,
  function soundfiler_write (line 1558) | static void soundfiler_write(t_soundfiler *x, t_symbol *s,
  function soundfiler_setup (line 1568) | static void soundfiler_setup(void)
  type t_soundfile_request (line 1603) | typedef enum _soundfile_request
  type t_soundfile_state (line 1613) | typedef enum _soundfile_state
  type t_readsf (line 1622) | typedef struct _readsf
  function readsf_fakewait (line 1669) | static void readsf_fakewait(pthread_mutex_t *b)
  function readsf_tick (line 2016) | static void readsf_tick(t_readsf *x)
  function t_int (line 2021) | static t_int *readsf_perform(t_int *w)
  function readsf_start (line 2101) | static void readsf_start(t_readsf *x)
  function readsf_stop (line 2109) | static void readsf_stop(t_readsf *x)
  function readsf_float (line 2118) | static void readsf_float(t_readsf *x, t_floatarg f)
  function readsf_open (line 2130) | static void readsf_open(t_readsf *x, t_symbol *s, int argc, t_atom *argv)
  function readsf_dsp (line 2192) | static void readsf_dsp(t_readsf *x, t_signal **sp)
  function readsf_print (line 2204) | static void readsf_print(t_readsf *x)
  function readsf_free (line 2215) | static void readsf_free(t_readsf *x)
  function readsf_setup (line 2237) | static void readsf_setup(void)
  type t_readsf (line 2256) | typedef t_readsf t_writesf;
  function t_int (line 2538) | static t_int *writesf_perform(t_int *w)
  function writesf_start (line 2599) | static void writesf_start(t_writesf *x)
  function writesf_stop (line 2608) | static void writesf_stop(t_writesf *x)
  function writesf_open (line 2622) | static void writesf_open(t_writesf *x, t_symbol *s, int argc, t_atom *argv)
  function writesf_dsp (line 2675) | static void writesf_dsp(t_writesf *x, t_signal **sp)
  function writesf_print (line 2689) | static void writesf_print(t_writesf *x)
  function writesf_free (line 2700) | static void writesf_free(t_writesf *x)
  function writesf_setup (line 2730) | static void writesf_setup(void)
  function d_soundfile_setup (line 2747) | void d_soundfile_setup(void)

FILE: libs/libpd/pure-data/src/d_soundfile.h
  type SSIZE_T (line 29) | typedef SSIZE_T ssize_t;
  type t_soundfile (line 56) | typedef struct _soundfile
  type t_soundfile_errno (line 80) | typedef enum _soundfile_errno
  type t_soundfile_type (line 128) | typedef struct _soundfile_type

FILE: libs/libpd/pure-data/src/d_soundfile_aiff.c
  type t_chunk (line 67) | typedef struct _chunk
  type t_head (line 74) | typedef struct _head
  type t_commchunk (line 83) | typedef struct _commchunk
  type t_datachunk (line 97) | typedef struct _datachunk
  type t_verchunk (line 106) | typedef struct _verchunk
  function aiff_isaiffc (line 116) | static int aiff_isaiffc(const t_soundfile *sf)
  function aiff_getpstring (line 122) | static int aiff_getpstring(const char* pstring, char *cstring)
  function aiff_setpstring (line 133) | static int aiff_setpstring(char *pstring, const char *cstring)
  function aiff_get4 (line 148) | static uint32_t aiff_get4(const uint8_t *src, int swap)
  function aiff_set4 (line 156) | static void aiff_set4(uint8_t* dst, uint32_t ui, int swap)
  function aiff_getsamplerate (line 163) | static double aiff_getsamplerate(const uint8_t *src, int swap)
  function aiff_setsamplerate (line 183) | static void aiff_setsamplerate(uint8_t *dst, double sr)
  function off_t (line 198) | static off_t aiff_firstchunk(const t_soundfile *sf, t_chunk *chunk)
  function off_t (line 208) | static off_t aiff_nextchunk(const t_soundfile *sf, off_t offset, t_chunk...
  function aiff_postchunk (line 223) | static void aiff_postchunk(const t_chunk *chunk, int swap)
  function aiff_posthead (line 229) | static void aiff_posthead(const t_head *head, int swap)
  function aiff_postcomm (line 236) | static void aiff_postcomm(const t_commchunk *comm, int isaiffc, int swap)
  function aiff_postdata (line 254) | static void aiff_postdata(const t_datachunk *data, int swap)
  function aiff_isheader (line 265) | static int aiff_isheader(const char *buf, size_t size)
  function aiff_readheader (line 272) | static int aiff_readheader(t_soundfile *sf)
  function aiff_writeheader (line 444) | static int aiff_writeheader(t_soundfile *sf, size_t nframes)
  function aiff_updateheader (line 524) | static int aiff_updateheader(t_soundfile *sf, size_t nframes)
  function aiff_hasextension (line 570) | static int aiff_hasextension(const char *filename, size_t size)
  function aiff_addextension (line 586) | static int aiff_addextension(char *filename, size_t size)
  function aiff_endianness (line 596) | static int aiff_endianness(int endianness)
  function soundfile_aiff_setup (line 617) | void soundfile_aiff_setup( void)

FILE: libs/libpd/pure-data/src/d_soundfile_caf.c
  type t_chunk (line 57) | typedef struct _chunk {
  type t_head (line 63) | typedef struct _head {
  type t_descchunk (line 71) | typedef struct _descchunk {
  type t_datachunk (line 85) | typedef struct _datachunk {
  function caf_getchunksize (line 93) | static int64_t caf_getchunksize(const t_chunk *chunk, int swap)
  function caf_setchunksize (line 100) | static void caf_setchunksize(t_chunk *chunk, int64_t size, int swap)
  function caf_getsamplerate (line 106) | static double caf_getsamplerate(const t_descchunk *desc, int swap)
  function caf_setsamplerate (line 114) | static void caf_setsamplerate(t_descchunk *desc, double sr, int swap)
  function off_t (line 121) | static off_t caf_firstchunk(const t_soundfile *sf, t_chunk *chunk)
  function off_t (line 131) | static off_t caf_nextchunk(const t_soundfile *sf, off_t offset, t_chunk ...
  function caf_posthead (line 146) | static void caf_posthead(const t_head *head, int swap)
  function caf_postchunk (line 154) | static void caf_postchunk(const t_chunk *chunk, int swap)
  function caf_postdesc (line 160) | static void caf_postdesc(const t_descchunk *desc, int swap)
  function caf_postdata (line 176) | static void caf_postdata(const t_datachunk *data, int swap)
  function caf_isheader (line 186) | static int caf_isheader(const char *buf, size_t size)
  function caf_readheader (line 192) | static int caf_readheader(t_soundfile *sf)
  function caf_writeheader (line 319) | static int caf_writeheader(t_soundfile *sf, size_t nframes)
  function caf_updateheader (line 368) | static int caf_updateheader(t_soundfile *sf, size_t nframes)
  function caf_hasextension (line 385) | static int caf_hasextension(const char *filename, size_t size)
  function caf_addextension (line 395) | static int caf_addextension(char *filename, size_t size)
  function caf_endianness (line 405) | static int caf_endianness(int endianness)
  function soundfile_caf_setup (line 426) | void soundfile_caf_setup( void)

FILE: libs/libpd/pure-data/src/d_soundfile_next.c
  type t_nextstep (line 50) | typedef struct _nextstep
  function next_isbigendian (line 64) | static int next_isbigendian(const t_nextstep *next)
  function next_posthead (line 76) | static void next_posthead(const t_nextstep *next, int swap)
  function next_isheader (line 113) | static int next_isheader(const char *buf, size_t size)
  function next_readheader (line 121) | static int next_readheader(t_soundfile *sf)
  function next_writeheader (line 181) | static int next_writeheader(t_soundfile *sf, size_t nframes)
  function next_updateheader (line 225) | static int next_updateheader(t_soundfile *sf, size_t nframes)
  function next_hasextension (line 249) | static int next_hasextension(const char *filename, size_t size)
  function next_addextension (line 263) | static int next_addextension(char *filename, size_t size)
  function next_endianness (line 273) | static int next_endianness(int endianness)
  function soundfile_next_setup (line 294) | void soundfile_next_setup( void)

FILE: libs/libpd/pure-data/src/d_soundfile_wave.c
  type t_chunk (line 69) | typedef struct _chunk
  type t_head (line 76) | typedef struct _head
  type t_formatchunk (line 84) | typedef struct _formatchunk
  type t_factchunk (line 102) | typedef struct _factchunk
  function wave_isextended (line 112) | static int wave_isextended(const t_soundfile *sf)
  function off_t (line 118) | static off_t wave_firstchunk(const t_soundfile *sf, t_chunk *chunk)
  function off_t (line 128) | static off_t wave_nextchunk(const t_soundfile *sf, off_t offset, t_chunk...
  function wave_postchunk (line 143) | static void wave_postchunk(const t_chunk *chunk, int swap)
  function wave_posthead (line 149) | static void wave_posthead(const t_head *head, int swap)
  function wave_postformat (line 156) | static void wave_postformat(const t_formatchunk *format, int swap)
  function wave_postfact (line 203) | static void wave_postfact(const t_factchunk *fact, int swap)
  function wave_isheader (line 213) | static int wave_isheader(const char *buf, size_t size)
  function wave_readheader (line 219) | static int wave_readheader(t_soundfile *sf)
  function wave_writeheader (line 352) | static int wave_writeheader(t_soundfile *sf, size_t nframes)
  function wave_updateheader (line 432) | static int wave_updateheader(t_soundfile *sf, size_t nframes)
  function wave_hasextension (line 480) | static int wave_hasextension(const char *filename, size_t size)
  function wave_addextension (line 494) | static int wave_addextension(char *filename, size_t size)
  function wave_endianness (line 504) | static int wave_endianness(int endianness)
  function soundfile_wave_setup (line 523) | void soundfile_wave_setup( void)

FILE: libs/libpd/pure-data/src/d_ugen.c
  type _vinlet (line 25) | struct _vinlet
  type _voutlet (line 28) | struct _voutlet
  type _voutlet (line 31) | struct _voutlet
  type _instanceugen (line 35) | struct _instanceugen
  function d_ugen_newpdinstance (line 52) | void d_ugen_newpdinstance(void)
  function d_ugen_freepdinstance (line 60) | void d_ugen_freepdinstance(void)
  function t_int (line 65) | t_int *zero_perform(t_int *w)   /* zero out a vector */
  function t_int (line 73) | t_int *zero_perf8(t_int *w)
  function dsp_add_zero (line 92) | void dsp_add_zero(t_sample *out, int n)
  type t_block (line 132) | typedef struct _block
  function block_set (line 168) | static void block_set(t_block *x, t_floatarg fcalcsize, t_floatarg fover...
  function t_float (line 214) | t_float canvas_getsr(t_canvas *x)
  function canvas_getsignallength (line 234) | int canvas_getsignallength(t_canvas *x)
  function block_float (line 255) | static void block_float(t_block *x, t_floatarg f)
  function block_bang (line 261) | static void block_bang(t_block *x)
  function t_int (line 286) | static t_int *block_prolog(t_int *w)
  function t_int (line 308) | static t_int *block_epilog(t_int *w)
  function block_dsp (line 325) | static void block_dsp(t_block *x, t_signal **sp)
  function block_tilde_setup (line 330) | void block_tilde_setup(void)
  function t_int (line 345) | static t_int dsp_done(t_int *w)
  function dsp_add (line 350) | void dsp_add(t_perfroutine f, int n, ...)
  function dsp_addv (line 375) | void dsp_addv(t_perfroutine f, int n, t_int *vec)
  function dsp_tick (line 388) | void dsp_tick(void)
  function ilog2 (line 400) | int ilog2(int n)
  function signal_cleanup (line 414) | static void signal_cleanup(void)
  function signal_dereference (line 430) | static void signal_dereference(t_signal *s)
  function signal_makereusable (line 442) | void signal_makereusable(t_signal *sig)
  function t_signal (line 496) | t_signal *signal_new(int length, int nchans, t_float sr, t_sample *scala...
  function t_signal (line 554) | t_signal *signal_newlike(const t_signal *sig)
  function signal_setborrowed (line 561) | void signal_setborrowed(t_signal *sig, t_signal *sig2)
  function signal_setmultiout (line 581) | void signal_setmultiout(t_signal **sig, int nchans)
  function signal_compatible (line 588) | static int signal_compatible(t_signal *s1, t_signal *s2)
  type t_ugenbox (line 596) | typedef struct _ugenbox
  type t_siginlet (line 608) | typedef struct _siginlet
  type t_sigoutconnect (line 615) | typedef struct _sigoutconnect
  type t_sigoutlet (line 622) | typedef struct _sigoutlet
  type _dspcontext (line 631) | struct _dspcontext
  function t_signal (line 651) | t_signal *signal_newfromcontext(int borrowed, int nchans)
  function ugen_stop (line 659) | void ugen_stop(void)
  function ugen_start (line 686) | void ugen_start(void)
  function ugen_getsortno (line 697) | int ugen_getsortno(void)
  function glob_ugen_printstate (line 703) | void glob_ugen_printstate(void *dummy, t_symbol *s, int argc, t_atom *argv)
  function t_dspcontext (line 729) | t_dspcontext *ugen_start_graph(int toplevel, t_signal **sp,
  function ugen_add (line 753) | void ugen_add(t_dspcontext *dc, t_object *obj)
  function ugen_connect (line 774) | void ugen_connect(t_dspcontext *dc, t_object *x1, int outno, t_object *x2,
  function ugen_index (line 822) | static int ugen_index(t_dspcontext *dc, t_ugenbox *x)
  function ugen_doit (line 838) | static void ugen_doit(t_dspcontext *dc, t_ugenbox *u)
  function ugen_done_graph (line 1048) | void ugen_done_graph(t_dspcontext *dc)
  function t_signal (line 1332) | static t_signal *ugen_getiosig(int index, int inout)
  function t_int (line 1342) | t_int *plus_perform(t_int *w)
  function t_int (line 1352) | t_int *plus_perf8(t_int *w)
  function dsp_add_plus (line 1372) | void dsp_add_plus(t_sample *in1, t_sample *in2, t_sample *out, int n)
  function t_int (line 1380) | t_int *copy_perform(t_int *w)
  function t_int (line 1389) | t_int *copy_perf8(t_int *w)
  function dsp_add_copy (line 1418) | void dsp_add_copy(t_sample *in, t_sample *out, int n)
  function t_int (line 1426) | t_int *scalarcopy_perform(t_int *w)
  function t_int (line 1436) | t_int *scalarcopy_perf8(t_int *w)
  function dsp_add_scalarcopy (line 1456) | void dsp_add_scalarcopy(t_float *in, t_sample *out, int n)
  type t_samplerate (line 1468) | typedef struct _samplerate
  function samplerate_tilde_bang (line 1475) | static void samplerate_tilde_bang(t_samplerate *x)
  function samplerate_tilde_setup (line 1488) | static void samplerate_tilde_setup(void)
  function d_ugen_setup (line 1497) | void d_ugen_setup(void)

FILE: libs/libpd/pure-data/src/g_all_guis.c
  type t_iemgui_private (line 27) | typedef struct _iemgui_private {
  function srl_is_valid (line 36) | static int srl_is_valid(const t_symbol* s)
  function iemgui_clip_size (line 141) | int iemgui_clip_size(int size)
  function iemgui_modulo_color (line 148) | int iemgui_modulo_color(int col)
  function t_symbol (line 157) | t_symbol *iemgui_dollar2raute(t_symbol *s)
  function t_symbol (line 173) | t_symbol *iemgui_raute2dollar(t_symbol *s)
  function iemgui_verify_snd_ne_rcv (line 189) | void iemgui_verify_snd_ne_rcv(t_iemgui *iemgui)
  function t_symbol (line 199) | t_symbol *iemgui_new_dogetname(t_iemgui *iemgui, int indx, t_atom *argv)
  function iemgui_new_getnames (line 216) | void iemgui_new_getnames(t_iemgui *iemgui, int indx, t_atom *argv)
  function iemgui_init_sym2dollararg (line 246) | static void iemgui_init_sym2dollararg(t_iemgui *iemgui, t_symbol **symp,
  function iemgui_all_sym2dollararg (line 271) | void iemgui_all_sym2dollararg(t_iemgui *iemgui, t_symbol **srlsym)
  function t_symbol (line 285) | static t_symbol*do_all_dollarg2sym(t_iemgui*iemgui, t_symbol**s, size_t ...
  function iemgui_all_dollararg2sym (line 294) | void iemgui_all_dollararg2sym(t_iemgui *iemgui, t_symbol **srlsym)
  function t_symbol (line 304) | static t_symbol* color2symbol(int col) {
  function iemgui_all_col2save (line 321) | static void iemgui_all_col2save(t_iemgui *iemgui, t_symbol**bflcol)
  function iemgui_getcolorarg (line 328) | static int iemgui_getcolorarg(int index, int argc, t_atom*argv)
  function colfromatomload (line 346) | static int colfromatomload(t_atom*colatom)
  function iemgui_all_loadcolors (line 374) | void iemgui_all_loadcolors(t_iemgui *iemgui, t_atom*bcol, t_atom*fcol, t...
  function iemgui_compatible_colorarg (line 381) | int iemgui_compatible_colorarg(int index, int argc, t_atom* argv)
  function iemgui_send (line 399) | void iemgui_send(void *x, t_iemgui *iemgui, t_symbol *s)
  function iemgui_receive (line 425) | void iemgui_receive(void *x, t_iemgui *iemgui, t_symbol *s)
  function iemgui_dolabelpos (line 464) | static void iemgui_dolabelpos(t_object*obj, t_iemgui*iemgui) {
  function iemgui_dolabel (line 480) | void iemgui_dolabel(void *x, t_iemgui *iemgui, t_symbol *s, int senditup)
  function iemgui_label (line 505) | void iemgui_label(void *x, t_iemgui *iemgui, t_symbol *s)
  function iemgui_label_pos (line 512) | void iemgui_label_pos(void *x, t_iemgui *iemgui, t_symbol *s, int ac, t_...
  function iemgui_label_font (line 520) | void iemgui_label_font(void *x, t_iemgui *iemgui, t_symbol *s, int ac, t...
  function iemgui_do_drawmove (line 551) | static void iemgui_do_drawmove(void *x, t_iemgui*iemgui)
  function iemgui_size (line 564) | void iemgui_size(void *x, t_iemgui *iemgui)
  function iemgui_delta (line 574) | void iemgui_delta(void *x, t_iemgui *iemgui, t_symbol *s, int ac, t_atom...
  function iemgui_pos (line 582) | void iemgui_pos(void *x, t_iemgui *iemgui, t_symbol *s, int ac, t_atom *av)
  function iemgui_color (line 590) | void iemgui_color(void *x, t_iemgui *iemgui, t_symbol *s, int ac, t_atom...
  function iemgui_displace (line 606) | void iemgui_displace(t_gobj *z, t_glist *glist, int dx, int dy)
  function iemgui_select (line 615) | void iemgui_select(t_gobj *z, t_glist *glist, int selected)
  function iemgui_delete (line 624) | void iemgui_delete(t_gobj *z, t_glist *glist)
  function iemgui_vis (line 629) | void iemgui_vis(t_gobj *z, t_glist *glist, int vis)
  function iemgui_save (line 645) | void iemgui_save(t_iemgui *iemgui, t_symbol **srl, t_symbol**bflcol)
  function iemgui_zoom (line 662) | void iemgui_zoom(t_iemgui *iemgui, t_floatarg zoom)
  function iemgui_newzoom (line 673) | void iemgui_newzoom(t_iemgui *iemgui)
  function iemgui_properties (line 684) | void iemgui_properties(t_iemgui *iemgui, t_symbol **srl)
  function iemgui_new_dialog (line 700) | void iemgui_new_dialog(void*x, t_iemgui*iemgui,
  function iemgui_dialog (line 733) | int iemgui_dialog(t_iemgui *iemgui, t_symbol **srl, int argc, t_atom *argv)
  function iemgui_setdialogatoms (line 823) | void iemgui_setdialogatoms(t_iemgui *iemgui, int argc, t_atom*argv)
  function iem_inttosymargs (line 872) | void iem_inttosymargs(t_iem_init_symargs *symargp, int n)
  function iem_symargstoint (line 881) | int iem_symargstoint(t_iem_init_symargs *symargp)
  function iem_inttofstyle (line 887) | void iem_inttofstyle(t_iem_fstyle_flags *fstylep, int n)
  function iem_fstyletoint (line 901) | int iem_fstyletoint(t_iem_fstyle_flags *fstylep)
  function iemgui_draw_new (line 906) | static void iemgui_draw_new(t_iemgui*x, t_glist*glist) {;}
  function iemgui_draw_config (line 907) | static void iemgui_draw_config(t_iemgui*x, t_glist*glist) {;}
  function iemgui_draw_update (line 908) | static void iemgui_draw_update(t_iemgui*x, t_glist*glist) {;}
  function iemgui_draw_select (line 909) | static void iemgui_draw_select(t_iemgui*x, t_glist*glist) {;}
  function iemgui_draw_iolets (line 910) | static void iemgui_draw_iolets(t_iemgui*x, t_glist*glist, int old_snd_rc...
  function iemgui_draw_erase (line 952) | static void iemgui_draw_erase(t_iemgui* x, t_glist* glist)
  function iemgui_draw_move (line 961) | static void iemgui_draw_move(t_iemgui *x, t_glist *glist)
  function iemgui_draw (line 973) | static void iemgui_draw(t_iemgui *x, t_glist *glist, int mode)
  function iemgui_setdrawfunctions (line 1013) | void iemgui_setdrawfunctions(t_iemgui *iemgui, t_iemgui_drawfunctions *w)
  function t_iemgui (line 1029) | t_iemgui *iemgui_new(t_class*cls)
  function iemgui_clip_font (line 1061) | int iemgui_clip_font(int size)
  function iemgui_all_dollar2raute (line 1068) | void iemgui_all_dollar2raute(t_symbol **srlsym)
  function iemgui_all_raute2dollar (line 1075) | void iemgui_all_raute2dollar(t_symbol **srlsym)
  function t_symbol (line 1087) | t_symbol *iemgui_put_in_braces(t_symbol *s)
  function iemgui_all_put_in_braces (line 1115) | void iemgui_all_put_in_braces(t_symbol **srlsym)
  function iemgui_all_colfromload (line 1123) | void iemgui_all_colfromload(t_iemgui *iemgui, int *bflcol)

FILE: libs/libpd/pure-data/src/g_all_guis.h
  type t_iem_orientation (line 108) | typedef enum {
  type t_iem_fstyle_flags (line 115) | typedef struct _iem_fstyle_flags
  type t_iem_init_symargs (line 135) | typedef struct _iem_init_symargs
  type t_iemgui_drawfunctions (line 150) | typedef struct _iemgui_drawfunctions {
  type t_iemgui (line 159) | typedef struct _iemgui
  type t_bng (line 188) | typedef struct _bng
  type t_slider (line 200) | typedef struct _slider
  type t_radio (line 214) | typedef struct _radio
  type t_toggle (line 227) | typedef struct _toggle
  type t_my_canvas (line 234) | typedef struct _my_canvas
  type t_vu (line 243) | typedef struct _vu
  type t_my_numbox (line 258) | typedef struct _my_numbox

FILE: libs/libpd/pure-data/src/g_array.c
  function t_array (line 21) | t_array *array_new(t_symbol *templatesym, t_gpointer *parent)
  function array_resize (line 44) | void array_resize(t_array *x, int n)
  function array_resize_and_redraw (line 72) | void array_resize_and_redraw(t_array *array, t_glist *glist, int n)
  function array_free (line 87) | void array_free(t_array *x)
  type _garray (line 105) | struct _garray
  function garray_init (line 135) | void garray_init(void)
  function t_garray (line 160) | static t_garray *graph_scalar(t_glist *gl, t_symbol *s, t_symbol *templa...
  function t_array (line 183) | t_array *garray_getarray(t_garray *x)
  function t_array (line 211) | static t_array *garray_getarray_floatonly(t_garray *x,
  function garray_getname (line 227) | int garray_getname(t_garray *x, t_symbol **namep)
  function t_glist (line 234) | t_glist *garray_getglist(t_garray *x)
  function t_scalar (line 240) | t_scalar *garray_getscalar(t_garray *x)
  function garray_fittograph (line 247) | static void garray_fittograph(t_garray *x, int n, int style)
  function t_garray (line 277) | t_garray *graph_array(t_glist *gl, t_symbol *s, t_symbol *templateargsym,
  function canvas_menuarray (line 346) | void canvas_menuarray(t_glist *canvas)
  function garray_properties (line 363) | void garray_properties(t_garray *x)
  function glist_arraydialog (line 384) | void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size,
  function garray_arraydialog (line 400) | void garray_arraydialog(t_garray *x, t_symbol *name, t_floatarg fsize,
  function garray_arrayviewlist_fillpage (line 475) | static void garray_arrayviewlist_fillpage(t_garray *x,
  function garray_arrayviewlist_new (line 513) | static void garray_arrayviewlist_new(t_garray *x)
  function garray_arrayviewlist_close (line 532) | static void garray_arrayviewlist_close(t_garray *x)
  function garray_free (line 540) | static void garray_free(t_garray *x)
  function array_redraw (line 560) | void array_redraw(t_array *a, t_glist *glist)
  function array_getcoordinate (line 568) | void array_getcoordinate(t_glist *glist,
  function array_getrect (line 600) | static void array_getrect(t_array *array, t_glist *glist,
  function garray_getrect (line 644) | static void garray_getrect(t_gobj *z, t_glist *glist,
  function garray_displace (line 651) | static void garray_displace(t_gobj *z, t_glist *glist, int dx, int dy)
  function garray_select (line 656) | static void garray_select(t_gobj *z, t_glist *glist, int state)
  function garray_activate (line 662) | static void garray_activate(t_gobj *z, t_glist *glist, int state)
  function garray_delete (line 666) | static void garray_delete(t_gobj *z, t_glist *glist)
  function garray_vis (line 671) | static void garray_vis(t_gobj *z, t_glist *glist, int vis)
  function garray_click (line 677) | static int garray_click(t_gobj *z, t_glist *glist,
  function garray_savecontentsto (line 690) | void garray_savecontentsto(t_garray *x, t_binbuf *b)
  function garray_save (line 714) | static void garray_save(t_gobj *z, t_binbuf *b)
  function garray_usedindsp (line 756) | void garray_usedindsp(t_garray *x)
  function garray_doredraw (line 761) | static void garray_doredraw(t_gobj *client, t_glist *glist)
  function garray_redraw (line 771) | void garray_redraw(t_garray *x)
  function t_template (line 790) | t_template *garray_template(t_garray *x)
  function garray_npoints (line 800) | int garray_npoints(t_garray *x) /* get the length */
  function garray_getfloatwords (line 815) | int garray_getfloatwords(t_garray *x, int *size, t_word **vec)
  function garray_getfloatarray (line 835) | int garray_getfloatarray(t_garray *x, int *size, t_float **vec)
  function garray_setsaveit (line 852) | void garray_setsaveit(t_garray *x, int saveit)
  function garray_const (line 861) | static void garray_const(t_garray *x, t_floatarg g)
  function garray_dofo (line 874) | static void garray_dofo(t_garray *x, long npoints, t_float dcval,
  function garray_sinesum (line 907) | static void garray_sinesum(t_garray *x, t_symbol *s, int argc, t_atom *a...
  function garray_cosinesum (line 931) | static void garray_cosinesum(t_garray *x, t_symbol *s, int argc, t_atom ...
  function garray_normalize (line 955) | static void garray_normalize(t_garray *x, t_float f)
  function garray_list (line 991) | static void garray_list(t_garray *x, t_symbol *s, int argc, t_atom *argv)
  function garray_bounds (line 1028) | static void garray_bounds(t_garray *x, t_floatarg x1, t_floatarg y1,
  function garray_xticks (line 1035) | static void garray_xticks(t_garray *x,
  function garray_yticks (line 1041) | static void garray_yticks(t_garray *x,
  function garray_xlabel (line 1047) | static void garray_xlabel(t_garray *x, t_symbol *s, int argc, t_atom *argv)
  function garray_ylabel (line 1052) | static void garray_ylabel(t_garray *x, t_symbol *s, int argc, t_atom *argv)
  function garray_style (line 1057) | static void garray_style(t_garray *x, t_floatarg fstyle)
  function garray_width (line 1089) | static void garray_width(t_garray *x, t_floatarg width)
  function garray_color (line 1110) | static void garray_color(t_garray *x, t_floatarg color)
  function garray_vis_msg (line 1130) | static void garray_vis_msg(t_garray *x, t_floatarg fvis)
  function garray_rename (line 1151) | static void garray_rename(t_garray *x, t_symbol *s)
  function garray_read (line 1164) | static void garray_read(t_garray *x, t_symbol *filename)
  function garray_write (line 1202) | static void garray_write(t_garray *x, t_symbol *filename)
  function garray_resize_long (line 1232) | void garray_resize_long(t_garray *x, long n)
  function garray_resize (line 1248) | void garray_resize(t_garray *x, t_floatarg f)
  function garray_zoom (line 1254) | static void garray_zoom(t_garray *x, t_floatarg f)
  function garray_edit (line 1258) | static void garray_edit(t_garray *x, t_floatarg f)
  function garray_print (line 1263) | static void garray_print(t_garray *x)
  function g_array_setup (line 1270) | void g_array_setup(void)

FILE: libs/libpd/pure-data/src/g_bang.c
  function bng_draw_config (line 22) | static void bng_draw_config(t_bng* x, t_glist* glist)
  function bng_draw_new (line 59) | static void bng_draw_new(t_bng *x, t_glist *glist)
  function bng_draw_select (line 82) | static void bng_draw_select(t_bng* x, t_glist* glist)
  function bng_draw_update (line 99) | static void bng_draw_update(t_bng *x, t_glist *glist)
  function bng_getrect (line 112) | static void bng_getrect(t_gobj *z, t_glist *glist,
  function bng_save (line 123) | static void bng_save(t_gobj *z, t_binbuf *b)
  function bng_check_minmax (line 142) | void bng_check_minmax(t_bng *x, int ftbreak, int fthold)
  function bng_properties (line 160) | static void bng_properties(t_gobj *z, t_glist *owner)
  function bng_set (line 172) | static void bng_set(t_bng *x)
  function bng_bout1 (line 186) | static void bng_bout1(t_bng *x) /* wird nur mehr gesendet, wenn snd != r...
  function bng_bout2 (line 198) | static void bng_bout2(t_bng *x) /* wird immer gesendet, wenn moeglich*/
  function bng_bang (line 210) | static void bng_bang(t_bng *x) /* wird nur mehr gesendet, wenn snd != rcv*/
  function bng_bang2 (line 219) | static void bng_bang2(t_bng *x) /* wird immer gesendet, wenn moeglich*/
  function bng_dialog (line 228) | static void bng_dialog(t_bng *x, t_symbol *s, int argc, t_atom *argv)
  function bng_click (line 253) | static void bng_click(t_bng *x, t_floatarg xpos, t_floatarg ypos, t_floa...
  function bng_newclick (line 259) | static int bng_newclick(t_gobj *z, struct _glist *glist, int xpix, int y...
  function bng_float (line 266) | static void bng_float(t_bng *x, t_floatarg f)
  function bng_symbol (line 269) | static void bng_symbol(t_bng *x, t_symbol *s)
  function bng_pointer (line 272) | static void bng_pointer(t_bng *x, t_gpointer *gp)
  function bng_list (line 275) | static void bng_list(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_anything (line 278) | static void bng_anything(t_bng *x, t_symbol *s, int argc, t_atom *argv)
  function bng_loadbang (line 281) | static void bng_loadbang(t_bng *x, t_floatarg action)
  function bng_size (line 290) | static void bng_size(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_delta (line 297) | static void bng_delta(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_pos (line 300) | static void bng_pos(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_flashtime (line 303) | static void bng_flashtime(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_color (line 309) | static void bng_color(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_send (line 312) | static void bng_send(t_bng *x, t_symbol *s)
  function bng_receive (line 315) | static void bng_receive(t_bng *x, t_symbol *s)
  function bng_label (line 318) | static void bng_label(t_bng *x, t_symbol *s)
  function bng_label_pos (line 321) | static void bng_label_pos(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_label_font (line 324) | static void bng_label_font(t_bng *x, t_symbol *s, int ac, t_atom *av)
  function bng_init (line 327) | static void bng_init(t_bng *x, t_floatarg f)
  function bng_tick_hld (line 332) | static void bng_tick_hld(t_bng *x)
  function bng_tick_lck (line 338) | static void bng_tick_lck(t_bng *x)
  function bng_free (line 403) | static void bng_free(t_bng *x)
  function g_bang_setup (line 412) | void g_bang_setup(void)

FILE: libs/libpd/pure-data/src/g_canvas.c
  type _canvasenvironment (line 24) | struct _canvasenvironment
  type t_canvas_private (line 32) | typedef struct _canvas_private
  function gobj_getrect (line 60) | void gobj_getrect(t_gobj *x, t_glist *glist, int *x1, int *y1,
  function gobj_displace (line 68) | void gobj_displace(t_gobj *x, t_glist *glist, int dx, int dy)
  function gobj_select (line 78) | void gobj_select(t_gobj *x, t_glist *glist, int state)
  function gobj_activate (line 84) | void gobj_activate(t_gobj *x, t_glist *glist, int state)
  function gobj_delete (line 90) | void gobj_delete(t_gobj *x, t_glist *glist)
  function gobj_shouldvis (line 96) | int gobj_shouldvis(t_gobj *x, struct _glist *glist)
  function gobj_vis (line 145) | void gobj_vis(t_gobj *x, struct _glist *glist, int flag)
  function gobj_click (line 151) | int gobj_click(t_gobj *x, struct _glist *glist,
  function canvas_updatewindowlist (line 161) | void canvas_updatewindowlist(void)
  function canvas_addtolist (line 169) | static void canvas_addtolist(t_canvas *x)
  function canvas_takeofflist (line 175) | static void canvas_takeofflist(t_canvas *x)
  function canvas_dosettracing (line 191) | static void canvas_dosettracing(t_canvas *x, int onoff)
  function canvas_settracing (line 204) | void canvas_settracing(int onoff)
  function canvas_setargs (line 213) | void canvas_setargs(int argc, const t_atom *argv)
  function glob_setfilename (line 224) | void glob_setfilename(void *dummy, t_symbol *filesym, t_symbol *dirsym)
  function glob_menunew (line 230) | void glob_menunew(void *dummy, t_symbol *filesym, t_symbol *dirsym)
  function t_canvas (line 237) | t_canvas *canvas_getcurrent(void)
  function canvas_setcurrent (line 242) | void canvas_setcurrent(t_canvas *x)
  function canvas_unsetcurrent (line 247) | void canvas_unsetcurrent(t_canvas *x)
  function t_canvasenvironment (line 252) | t_canvasenvironment *canvas_getenv(const t_canvas *x)
  function canvas_getdollarzero (line 261) | int canvas_getdollarzero(void)
  function canvas_getargs (line 270) | void canvas_getargs(int *argcp, t_atom **argvp)
  function t_symbol (line 278) | t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s)
  function t_symbol (line 293) | t_symbol *canvas_getcurrentdir(void)
  function t_symbol (line 299) | t_symbol *canvas_getdir(const t_canvas *x)
  function canvas_makefilename (line 305) | void canvas_makefilename(const t_canvas *x, const char *file, char *resu...
  function canvas_rename (line 326) | void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir)
  function canvas_getindex (line 342) | int canvas_getindex(t_canvas *x, t_gobj *y)
  function linetraverser_start (line 351) | void linetraverser_start(t_linetraverser *t, t_canvas *x)
  function t_outconnect (line 359) | t_outconnect *linetraverser_next(t_linetraverser *t)
  function linetraverser_skipobject (line 417) | void linetraverser_skipobject(t_linetraverser *t)
  function glist_init (line 426) | void glist_init(t_glist *x)
  function t_canvas (line 440) | t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
  function canvas_coords (line 528) | static void canvas_coords(t_glist *x, t_symbol *s, int argc, t_atom *argv)
  function t_glist (line 552) | t_glist *glist_addglist(t_glist *g, t_symbol *sym,
  function glist_glist (line 624) | void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv)
  function glist_isgraph (line 643) | int glist_isgraph(t_glist *x)
  function canvas_setbounds (line 650) | static void canvas_setbounds(t_canvas *x, t_float left, t_float top,
  function canvas_dosetbounds (line 657) | static void canvas_dosetbounds(t_canvas *x, int x1, int y1, int x2, int y2)
  function t_symbol (line 687) | t_symbol *canvas_makebindsym(t_symbol *s)
  function canvas_bind (line 698) | static void canvas_bind(t_canvas *x)
  function canvas_unbind (line 704) | static void canvas_unbind(t_canvas *x)
  function canvas_reflecttitle (line 710) | void canvas_reflecttitle(t_canvas *x)
  function canvas_dirty (line 747) | void canvas_dirty(t_canvas *x, t_floatarg f)
  function canvas_drawredrect (line 763) | void canvas_drawredrect(t_canvas *x, int doit)
  function canvas_map (line 786) | void canvas_map(t_canvas *x, t_floatarg f)
  function canvas_redraw (line 827) | void canvas_redraw(t_canvas *x)
  function glist_menu_open (line 839) | void glist_menu_open(t_glist *x)
  function glist_isvisible (line 861) | int glist_isvisible(t_glist *x)
  function glist_istoplevel (line 866) | int glist_istoplevel(t_glist *x)
  function glist_getfont (line 874) | int glist_getfont(t_glist *x)
  function glist_getzoom (line 882) | int glist_getzoom(t_glist *x)
  function glist_fontwidth (line 890) | int glist_fontwidth(t_glist *x)
  function glist_fontheight (line 895) | int glist_fontheight(t_glist *x)
  function canvas_free (line 900) | void canvas_free(t_canvas *x)
  function canvas_drawlines (line 935) | static void canvas_drawlines(t_canvas *x)
  function canvas_fixlinesfor (line 954) | void canvas_fixlinesfor(t_canvas *x, t_text *text)
  function _canvas_delete_line (line 973) | static void _canvas_delete_line(t_canvas*x, t_outconnect *oc)
  function canvas_deletelinesfor (line 983) | void canvas_deletelinesfor(t_canvas *x, t_text *text)
  function canvas_deletelinesforio (line 999) | void canvas_deletelinesforio(t_canvas *x, t_text *text,
  function canvas_pop (line 1018) | static void canvas_pop(t_canvas *x, t_floatarg fvis)
  function canvas_restore (line 1037) | void canvas_restore(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
  function canvas_loadbangabstractions (line 1062) | static void canvas_loadbangabstractions(t_canvas *x)
  function canvas_loadbangsubpatches (line 1081) | void canvas_loadbangsubpatches(t_canvas *x)
  function canvas_loadbang (line 1100) | void canvas_loadbang(t_canvas *x)
  function canvas_initbang (line 1112) | void canvas_initbang(t_canvas *x)
  function canvas_closebang (line 1131) | void canvas_closebang(t_canvas *x)
  function canvas_relocate (line 1147) | static void canvas_relocate(t_canvas *x, t_symbol *canvasgeom,
  function canvas_popabstraction (line 1162) | void canvas_popabstraction(t_canvas *x)
  function canvas_logerror (line 1173) | void canvas_logerror(t_object *y)
  function canvas_click (line 1250) | static void canvas_click(t_canvas *x,
  function canvas_fattensub (line 1259) | void canvas_fattensub(t_canvas *x,
  function canvas_rename_method (line 1267) | static void canvas_rename_method(t_canvas *x, t_symbol *s, int ac, t_ato...
  function canvas_isabstraction (line 1285) | int canvas_isabstraction(const t_canvas *x)
  function canvas_showtext (line 1293) | int canvas_showtext(const t_canvas *x)
  function t_canvas (line 1306) | t_canvas *canvas_getrootfor(t_canvas *x)
  function t_undo (line 1313) | t_undo* canvas_undo_get(t_canvas *x)
  function canvas_dodsp (line 1340) | void canvas_dodsp(t_canvas *x, int toplevel, t_signal **sp)
  function canvas_dsp (line 1382) | static void canvas_dsp(t_canvas *x, t_signal **sp)
  function canvas_start_dsp (line 1390) | static void canvas_start_dsp(void)
  function canvas_stop_dsp (line 1405) | static void canvas_stop_dsp(void)
  function canvas_suspend_dsp (line 1422) | int canvas_suspend_dsp(void)
  function canvas_resume_dsp (line 1429) | void canvas_resume_dsp(int oldstate)
  function canvas_update_dsp (line 1435) | void canvas_update_dsp(void)
  function glob_dsp (line 1453) | void glob_dsp(void *dummy, t_symbol *s, int argc, t_atom *argv)
  function template_usestemplate (line 1476) | static int template_usestemplate(t_symbol *usersym, t_template *used)
  function glist_doredrawfortemplate (line 1493) | static void glist_doredrawfortemplate(t_glist *gl,
  function canvas_redrawallfortemplate (line 1521) | void canvas_redrawallfortemplate(t_template *template, int action)
  function canvas_redrawallfortemplatecanvas (line 1530) | void canvas_redrawallfortemplatecanvas(t_canvas *x, int action)
  type t_declare (line 1549) | typedef struct _declare
  function declare_free (line 1571) | static void declare_free(t_declare *x)
  function canvas_savedeclarationsto (line 1577) | void canvas_savedeclarationsto(t_canvas *x, t_binbuf *b)
  function canvas_completepath (line 1598) | static void canvas_completepath(const char *from, char *to, int bufsize,
  function check_exists (line 1626) | static int check_exists(const char*path)
  function check_exists (line 1636) | static int check_exists(const char*path)
  function canvas_path (line 1644) | static void canvas_path(t_canvas *x, t_canvasenvironment *e, const char ...
  function canvas_lib (line 1693) | static void canvas_lib(t_canvas *x, t_canvasenvironment *e, const char *...
  function canvas_stdpath (line 1725) | static void canvas_stdpath(t_canvasenvironment *e, const char *stdpath)
  function canvas_stdlib (line 1759) | static void canvas_stdlib(t_canvasenvironment *e, const char *stdlib)
  function canvas_declare (line 1789) | void canvas_declare(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
  type t_canvasopen (line 1826) | typedef struct _canvasopen
  function canvas_open_iter (line 1837) | static int canvas_open_iter(const char *path, t_canvasopen *co)
  function canvas_open (line 1861) | int canvas_open(const t_canvas *x, const char *name, const char *ext,
  function canvas_path_iterate (line 1890) | int canvas_path_iterate(const t_canvas *x, t_canvas_path_iterator fun,
  function canvas_f (line 1953) | static void canvas_f(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
  function t_glist (line 1982) | t_glist *pd_checkglist(t_pd *x)
  function g_canvas_setup (line 2019) | void g_canvas_setup(void)
  function canvas_add_for_class (line 2138) | void canvas_add_for_class(t_class *c)
  function g_canvas_newpdinstance (line 2155) | void g_canvas_newpdinstance(void)
  function g_canvas_freepdinstance (line 2168) | void g_canvas_freepdinstance(void)
  function EXTERN (line 2175) | EXTERN int pd_getdspstate(void)
  function t_pd (line 2184) | t_pd *glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir)
  function glob_open (line 2214) | void glob_open(t_pd *ignore, t_symbol *name, t_symbol *dir, t_floatarg f)

FILE: libs/libpd/pure-data/src/g_canvas.h
  type t_updateheader (line 63) | typedef struct _updateheader
  type t_selection (line 93) | typedef struct _selection
  type t_editor (line 100) | typedef struct _editor
  type t_arrayvis (line 142) | typedef struct _arrayvis
  type t_tick (line 150) | typedef struct _tick    /* where to put ticks on x or y axes */
  type _glist (line 162) | struct _glist
  type t_dataslot (line 220) | typedef struct _dataslot
  type t_template (line 227) | typedef struct _template
  type _array (line 237) | struct _array
  type t_linetraverser (line 249) | typedef struct _linetraverser
  type _instancecanvas (line 267) | struct _instancecanvas
  type _glist (line 296) | struct _glist
  type _glist (line 299) | struct _glist
  type _glist (line 301) | struct _glist
  type _glist (line 303) | struct _glist
  type _glist (line 305) | struct _glist
  type _glist (line 307) | struct _glist
  type _glist (line 309) | struct _glist
  type _widgetbehavior (line 313) | struct _widgetbehavior
  type _glist (line 334) | struct _glist
  type _glist (line 338) | struct _glist
  type _glist (line 342) | struct _glist
  type _glist (line 346) | struct _glist
  type _glist (line 350) | struct _glist
  type _glist (line 354) | struct _glist
  type _parentwidgetbehavior (line 359) | struct _parentwidgetbehavior
  type _glist (line 396) | struct _glist
  type _glist (line 399) | struct _glist

FILE: libs/libpd/pure-data/src/g_clone.c
  type t_outproxy (line 14) | typedef struct _outproxy
  type t_copy (line 21) | typedef struct _copy
  type t_in (line 27) | typedef struct _in
  type t_out (line 35) | typedef struct _out
  type t_clone (line 42) | typedef struct _clone
  function clone_match (line 62) | int clone_match(t_pd *z, t_symbol *name, t_symbol *dir)
  function clone_in_list (line 73) | static void clone_in_list(t_in *x, t_symbol *s, int argc, t_atom *argv)
  function clone_in_this (line 91) | static void clone_in_this(t_in *x, t_symbol *s, int argc, t_atom *argv)
  function clone_in_next (line 105) | static void clone_in_next(t_in *x, t_symbol *s, int argc, t_atom *argv)
  function clone_in_set (line 114) | static void clone_in_set(t_in *x, t_floatarg f)
  function clone_in_all (line 122) | static void clone_in_all(t_in *x, t_symbol *s, int argc, t_atom *argv)
  function clone_in_vis (line 133) | static void clone_in_vis(t_in *x, t_floatarg fn, t_floatarg vis)
  function clone_in_fwd (line 143) | static void clone_in_fwd(t_in *x, t_symbol *s, int argc, t_atom *argv)
  function clone_in_resize (line 151) | static void clone_in_resize(t_in *x, t_floatarg f)
  function clone_out_anything (line 165) | static void clone_out_anything(t_outproxy *x, t_symbol *s, int argc, t_a...
  function t_canvas (line 182) | static t_canvas *clone_makeone(t_symbol *s, int argc, t_atom *argv)
  function clone_initinstance (line 207) | static void clone_initinstance(t_clone *x, int which, t_canvas *c)
  function clone_freeinstance (line 224) | static void clone_freeinstance(t_clone *x, int which)
  function clone_setn (line 233) | static void clone_setn(t_clone *x, t_floatarg f)
  function clone_click (line 275) | static void clone_click(t_clone *x, t_floatarg xpos, t_floatarg ypos,
  function clone_loadbang (line 283) | static void clone_loadbang(t_clone *x, t_floatarg f)
  function clone_dsp (line 303) | static void clone_dsp(t_clone *x, t_signal **sp)
  function clone_free (line 589) | static void clone_free(t_clone *x)
  function clone_setup (line 613) | void clone_setup(void)
  function clone_get_n (line 650) | int clone_get_n(t_gobj *x)
  function t_glist (line 656) | t_glist *clone_get_instance(t_gobj *x, int n)

FILE: libs/libpd/pure-data/src/g_editor.c
  type _instanceeditor (line 15) | struct _instanceeditor
  function _editor_selectlinecolor (line 60) | static void _editor_selectlinecolor(t_glist*x, const char*color)
  function glist_selectline (line 69) | void glist_selectline(t_glist *x, t_outconnect *oc, int index1,
  function glist_deselectline (line 86) | void glist_deselectline(t_glist *x)
  function glist_isselected (line 95) | int glist_isselected(t_glist *x, t_gobj *y)
  function glist_select (line 107) | void glist_select(t_glist *x, t_gobj *y)
  function glist_checkanddeselectall (line 123) | static void glist_checkanddeselectall(t_glist *gl, t_gobj *g)
  function glist_deselect (line 136) | void glist_deselect(t_glist *x, t_gobj *y)
  function glist_noselect (line 200) | void glist_noselect(t_glist *x)
  function glist_selectall (line 211) | void glist_selectall(t_glist *x)
  function glist_getindex (line 238) | int glist_getindex(t_glist *x, t_gobj *y)
  function glist_selectionindex (line 251) | int glist_selectionindex(t_glist *x, t_gobj *y, int selected)
  function t_gobj (line 262) | static t_gobj *glist_nth(t_glist *x, int n)
  function canvas_applybinbuf (line 274) | static void canvas_applybinbuf(t_canvas *x, t_binbuf *b)
  function canvas_undo_confirmdiscard (line 293) | static int canvas_undo_confirmdiscard(t_gobj *g)
  function canvas_undo_set_name (line 320) | void canvas_undo_set_name(const char*name)
  function canvas_setundo (line 325) | void canvas_setundo(t_canvas *x, t_undofn undofn, void *buf,
  function canvas_noundo (line 350) | void canvas_noundo(t_canvas *x)
  function canvas_undo (line 356) | static void canvas_undo(t_canvas *x)
  function canvas_redo (line 378) | static void canvas_redo(t_canvas *x)
  type t_undo_connect (line 401) | typedef struct _undo_connect
  function canvas_undo_connect (line 419) | int canvas_undo_connect(t_canvas *x, void *z, int action)
  function canvas_connect_with_undo (line 431) | static void canvas_connect_with_undo(t_canvas *x,
  function canvas_disconnect (line 452) | void canvas_disconnect(t_canvas *x,
  function canvas_undo_disconnect (line 477) | int canvas_undo_disconnect(t_canvas *x, void *z, int action)
  function canvas_disconnect_with_undo (line 495) | static void canvas_disconnect_with_undo(t_canvas *x,
  type t_undo_cut (line 513) | typedef struct _undo_cut
  function canvas_undo_cut (line 592) | int canvas_undo_cut(t_canvas *x, void *z, int action)
  type t_undo_move_elem (line 731) | typedef struct _undo_move_elem
  type t_undo_move (line 738) | typedef struct _undo_move
  function canvas_undo_move (line 779) | int canvas_undo_move(t_canvas *x, void *z, int action)
  type t_undo_paste (line 827) | typedef struct _undo_paste
  function canvas_undo_paste (line 869) | int canvas_undo_paste(t_canvas *x, void *z, int action)
  type t_undo_apply (line 918) | typedef struct _undo_apply
  function canvas_undo_apply (line 980) | int canvas_undo_apply(t_canvas *x, void *z, int action)
  function canvas_apply_restore_original_position (line 1019) | int canvas_apply_restore_original_position(t_canvas *x, int orig_pos)
  type t_undo_arrange (line 1049) | typedef struct _undo_arrange
  function canvas_doarrange (line 1083) | static void canvas_doarrange(t_canvas *x, t_float which, t_gobj *oldy,
  function canvas_undo_arrange (line 1135) | int canvas_undo_arrange(t_canvas *x, void *z, int action)
  type t_undo_canvas_properties (line 1243) | typedef struct _undo_canvas_properties
  function canvas_undo_canvas_apply (line 1289) | int canvas_undo_canvas_apply(t_canvas *x, void *z, int action)
  type t_undo_create (line 1384) | typedef struct _undo_create
  function canvas_undo_create (line 1435) | int canvas_undo_create(t_canvas *x, void *z, int action)
  function canvas_undo_recreate (line 1503) | int canvas_undo_recreate(t_canvas *x, void *z, int action)
  type t_undo_font (line 1580) | typedef struct _undo_font
  function canvas_undo_font (line 1596) | int canvas_undo_font(t_canvas *x, void *z, int action)
  function glist_doreload (line 1629) | static void glist_doreload(t_glist *gl, t_symbol *name, t_symbol *dir,
  function canvas_reload (line 1698) | void canvas_reload(t_symbol *name, t_symbol *dir, t_glist *except)
  function canvas_setcursor (line 1733) | void canvas_setcursor(t_canvas *x, unsigned int cursornum)
  function canvas_hitbox (line 1750) | int canvas_hitbox(t_canvas *x, t_gobj *y, int xpos, int ypos,
  function t_gobj (line 1769) | static t_gobj *canvas_findhitbox(t_canvas *x, int xpos, int ypos,
  function canvas_rightclick (line 1796) | static void canvas_rightclick(t_canvas *x, int xpos, int ypos, t_gobj *y)
  function t_editor (line 1809) | static t_editor *editor_new(t_glist *owner)
  function editor_free (line 1822) | static void editor_free(t_editor *x, t_glist *y)
  function canvas_create_editor (line 1835) | void canvas_create_editor(t_glist *x)
  function canvas_destroy_editor (line 1848) | void canvas_destroy_editor(t_glist *x)
  function canvas_vis (line 1870) | void canvas_vis(t_canvas *x, t_floatarg f)
  function canvas_setgraph (line 1974) | void canvas_setgraph(t_glist *x, int flag, int nogoprect)
  function canvas_properties (line 2017) | void canvas_properties(t_gobj*z, t_glist*unused)
  function canvas_donecanvasdialog (line 2048) | static void canvas_donecanvasdialog(t_glist *x,
  function canvas_done_popup (line 2137) | static void canvas_done_popup(t_canvas *x, t_float which,
  function undarken_if_gatom (line 2222) | static void undarken_if_gatom(t_gobj*gobj)
  function canvas_doclick (line 2230) | static void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
  function canvas_mouse (line 2564) | void canvas_mouse(t_canvas *x, t_floatarg xpos, t_floatarg ypos,
  function canvas_isconnected (line 2570) | int canvas_isconnected (t_canvas *x, t_text *ob1, int n1,
  function canconnect (line 2583) | static int canconnect(t_canvas*x, t_object*src, int nout, t_object*sink,...
  function tryconnect (line 2595) | static int tryconnect(t_canvas*x, t_object*src, int nout, t_object*sink,...
  function canvas_doconnect (line 2639) | static void canvas_doconnect(t_canvas *x, int xpos, int ypos, int mod, i...
  function canvas_selectinrect (line 2850) | void canvas_selectinrect(t_canvas *x, int lox, int loy, int hix, int hiy)
  function canvas_doregion (line 2863) | static void canvas_doregion(t_canvas *x, int xpos, int ypos, int doit)
  function canvas_mouseup (line 2884) | void canvas_mouseup(t_canvas *x,
  function canvas_displaceselection (line 2940) | static void canvas_displaceselection(t_canvas *x, int dx, int dy)
  function canvas_key (line 2967) | void canvas_key(t_canvas *x, t_symbol *s, int ac, t_atom *av)
  function delay_move (line 3144) | static void delay_move(t_canvas *x)
  function canvas_motion (line 3158) | void canvas_motion(t_canvas *x, t_floatarg xpos, t_floatarg ypos,
  function canvas_startmotion (line 3247) | void canvas_startmotion(t_canvas *x)
  function canvas_print (line 3261) | void canvas_print(t_canvas *x, t_symbol *s)
  function t_glist (line 3270) | static t_glist *glist_finddirty(t_glist *x)
  function glob_verifyquit (line 3287) | void glob_verifyquit(void *dummy, t_floatarg f)
  function canvas_menuclose (line 3322) | void canvas_menuclose(t_canvas *x, t_floatarg fforce)
  function canvas_menufont (line 3387) | static void canvas_menufont(t_canvas *x)
  function canvas_zoom (line 3398) | static void canvas_zoom(t_canvas *x, t_floatarg zoom)
  function atoms_match (line 3432) | static int atoms_match(int inargc, t_atom *inargv, int searchargc,
  function canvas_dofind (line 3472) | static int canvas_dofind(t_canvas *x, int *myindexp)
  function canvas_find (line 3514) | static void canvas_find(t_canvas *x, t_symbol *s, t_floatarg wholeword)
  function canvas_find_again (line 3533) | static void canvas_find_again(t_canvas *x)
  function canvas_find_parent (line 3546) | static void canvas_find_parent(t_canvas *x)
  function glist_dofinderror (line 3555) | static int glist_dofinderror(t_glist *gl, const void *error_object)
  function canvas_finderror (line 3599) | void canvas_finderror(const void *error_object)
  function canvas_stowconnections (line 3611) | void canvas_stowconnections(t_canvas *x)
  function canvas_restoreconnections (line 3669) | void canvas_restoreconnections(t_canvas *x)
  function t_binbuf (line 3677) | static t_binbuf *canvas_docopy(t_canvas *x)
  function canvas_copy (line 3702) | static void canvas_copy(t_canvas *x)
  function canvas_clearline (line 3721) | static void canvas_clearline(t_canvas *x)
  function canvas_doclear (line 3735) | static void canvas_doclear(t_canvas *x)
  function canvas_cut (line 3783) | static void canvas_cut(t_canvas *x)
  function glist_donewloadbangs (line 3817) | static void glist_donewloadbangs(t_glist *x)
  function binbuf_nextmess (line 3830) | static int binbuf_nextmess(int argc, const t_atom *argv)
  function binbuf_getpos (line 3843) | static int binbuf_getpos(t_binbuf*b, int *x0, int *y0, t_symbol**type)
  function canvas_dopaste (line 3927) | static void canvas_dopaste(t_canvas *x, t_binbuf *b)
  function t_symbol (line 3962) | static t_symbol*get_object_type(t_object *obj)
  function canvas_paste_replace (line 3986) | static void canvas_paste_replace(t_canvas *x)
  function canvas_paste (line 4081) | static void canvas_paste(t_canvas *x)
  function canvas_duplicate (line 4126) | static void canvas_duplicate(t_canvas *x)
  function canvas_selectall (line 4193) | static void canvas_selectall(t_canvas *x)
  function canvas_deselectall (line 4210) | static void canvas_deselectall(t_canvas *x)
  function canvas_cycleselect (line 4214) | static void canvas_cycleselect(t_canvas*x, t_float foffset)
  function canvas_reselect (line 4336) | static void canvas_reselect(t_canvas *x)
  function canvas_connect (line 4369) | void canvas_connect(t_canvas *x, t_floatarg fwhoout, t_floatarg foutno,
  function canvas_tidy (line 4441) | static void canvas_tidy(t_canvas *x)
  function canvas_getconns (line 4546) | static int canvas_getconns(t_object*objsrc, int *outno, t_object*objsink...
  function canvas_try_bypassobj1 (line 4566) | static int canvas_try_bypassobj1(t_canvas* x,
  function canvas_try_insert (line 4599) | static int canvas_try_insert(t_canvas *x
  function canvas_connect_selection (line 4633) | static void canvas_connect_selection(t_canvas *x)
  function canvas_texteditor (line 4788) | static void canvas_texteditor(t_canvas *x)
  function glob_key (line 4799) | void glob_key(void *dummy, t_symbol *s, int ac, t_atom *av)
  function canvas_editmode (line 4805) | void canvas_editmode(t_canvas *x, t_floatarg state)
  function canvas_dofont (line 4843) | static void canvas_dofont(t_canvas *x, t_floatarg font, t_floatarg xresize,
  function canvas_font (line 4868) | static void canvas_font(t_canvas *x, t_floatarg font, t_floatarg resize,
  function glist_getnextxy (line 4890) | void glist_getnextxy(t_glist *gl, int *xpix, int *ypix)
  function glist_setlastxy (line 4898) | static void glist_setlastxy(t_glist *gl, int xval, int yval)
  function g_editor_setup (line 4908) | void g_editor_setup(void)
  function canvas_editor_for_class (line 4979) | void canvas_editor_for_class(t_class *c)
  function g_editor_newpdinstance (line 4997) | void g_editor_newpdinstance(void)
  function g_editor_freepdinstance (line 5004) | void g_editor_freepdinstance(void)

FILE: libs/libpd/pure-data/src/g_editor_extras.c
  type t_triggerize_return (line 17) | typedef struct _triggerize_return {
  function t_gobj (line 23) | static t_gobj*o2g(t_object*obj)
  function t_object (line 27) | static t_object*g2o(t_gobj*gobj)
  function t_gobj (line 31) | static t_gobj*glist_getlast(t_glist*cnv)
  function dereconnect (line 38) | static void dereconnect(t_glist*cnv, t_object*org, t_object*replace)
  function obj_delete_undo (line 74) | static void obj_delete_undo(t_glist*x, t_object *obj)
  function t_object (line 82) | static t_object*triggerize_createobj(t_glist*x, t_binbuf*b)
  function stack_conn (line 95) | static void stack_conn(t_glist*x, t_object*new, int*newoutlet, t_object*...
  function has_fanout (line 117) | static int has_fanout(t_object*obj)
  function only_triggers_selected (line 141) | static int only_triggers_selected(t_glist*cnv)
  function triggerize_fanout_inplace (line 160) | static int triggerize_fanout_inplace(t_glist*x, t_object*obj)
  function triggerize_defanout (line 212) | static void triggerize_defanout(t_glist*x, int count, t_outconnect*conn,
  function triggerize_fanout (line 234) | static int triggerize_fanout(t_glist*x, t_object*obj)
  function triggerize_fanouts (line 318) | static int triggerize_fanouts(t_glist*cnv)
  function triggerize_line (line 336) | static int triggerize_line(t_glist*x, t_triggerize_return*tr)
  function minimize_trigger (line 453) | static int minimize_trigger(t_glist*cnv, t_object*obj)
  function expand_trigger (line 523) | static int expand_trigger(t_glist*cnv, t_object*obj)
  function with_triggers (line 569) | static int with_triggers(t_glist*cnv, t_fun_withobject fun)
  function triggerize_triggers (line 589) | static int triggerize_triggers(t_glist*cnv)
  function canvas_do_triggerize (line 618) | static int canvas_do_triggerize(t_glist*cnv, t_triggerize_return*tr)
  function canvas_triggerize (line 633) | void canvas_triggerize(t_glist*cnv)

FILE: libs/libpd/pure-data/src/g_graph.c
  function glist_add (line 27) | void glist_add(t_glist *x, t_gobj *y)
  function canvas_setdeleting (line 56) | int canvas_setdeleting(t_canvas *x, int flag)
  function glist_delete (line 67) | void glist_delete(t_glist *x, t_gobj *y)
  function glist_clear (line 150) | void glist_clear(t_glist *x)
  function glist_retext (line 171) | void glist_retext(t_glist *glist, t_text *y)
  function glist_grab (line 183) | void glist_grab(t_glist *x, t_gobj *y, t_glistmotionfn motionfn,
  function t_canvas (line 197) | t_canvas *glist_getcanvas(t_glist *x)
  function t_float (line 204) | static t_float gobj_getxforsort(t_gobj *g)
  function t_gobj (line 215) | static t_gobj *glist_merge(t_glist *x, t_gobj *g1, t_gobj *g2)
  function t_gobj (line 258) | static t_gobj *glist_dosort(t_glist *x,
  function glist_sort (line 277) | void glist_sort(t_glist *x)
  function t_inlet (line 297) | t_inlet *canvas_addinlet(t_canvas *x, t_pd *who, t_symbol *s)
  function canvas_rminlet (line 310) | void canvas_rminlet(t_canvas *x, t_inlet *ip)
  function canvas_resortinlets (line 330) | void canvas_resortinlets(t_canvas *x)
  function t_outlet (line 369) | t_outlet *canvas_addoutlet(t_canvas *x, t_pd *who, t_symbol *s)
  function canvas_rmoutlet (line 382) | void canvas_rmoutlet(t_canvas *x, t_outlet *op)
  function canvas_resortoutlets (line 403) | void canvas_resortoutlets(t_canvas *x)
  function graph_bounds (line 445) | static void graph_bounds(t_glist *x, t_floatarg x1, t_floatarg y1,
  function graph_xticks (line 462) | static void graph_xticks(t_glist *x,
  function graph_yticks (line 471) | static void graph_yticks(t_glist *x,
  function graph_xlabel (line 480) | static void graph_xlabel(t_glist *x, t_symbol *s, int argc, t_atom *argv)
  function graph_ylabel (line 496) | static void graph_ylabel(t_glist *x, t_symbol *s, int argc, t_atom *argv)
  function t_float (line 515) | t_float glist_pixelstox(t_glist *x, t_float xpix)
  function t_float (line 543) | t_float glist_pixelstoy(t_glist *x, t_float ypix)
  function t_float (line 562) | t_float glist_xtopixels(t_glist *x, t_float xval)
  function t_float (line 579) | t_float glist_ytopixels(t_glist *x, t_float yval)
  function t_float (line 599) | t_float glist_dpixtodx(t_glist *x, t_float dxpix)
  function t_float (line 604) | t_float glist_dpixtody(t_glist *x, t_float dypix)
  function text_xpix (line 615) | int text_xpix(t_text *x, t_glist *glist)
  function text_ypix (line 627) | int text_ypix(t_text *x, t_glist *glist)
  function glist_redraw (line 643) | void glist_redraw(t_glist *x)
  function _graph_create_line4 (line 688) | static void _graph_create_line4(t_glist *x, int x1, int y1, int x2, int ...
  function _graph_create_text (line 698) | static void _graph_create_text(
  function graph_vis (line 722) | static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
  function graph_graphrect (line 906) | static void graph_graphrect(t_gobj *z, t_glist *glist,
  function graph_getrect (line 924) | static void graph_getrect(t_gobj *z, t_glist *glist,
  function graph_displace (line 976) | static void graph_displace(t_gobj *z, t_glist *glist, int dx, int dy)
  function graph_select (line 992) | static void graph_select(t_gobj *z, t_glist *glist, int state)
  function graph_activate (line 1015) | static void graph_activate(t_gobj *z, t_glist *glist, int state)
  function graph_delete (line 1022) | static void graph_delete(t_gobj *z, t_glist *glist)
  function graph_motion (line 1037) | static void graph_motion(void *z, t_floatarg dx, t_floatarg dy)
  function graph_click (line 1078) | static int graph_click(t_gobj *z, struct _glist *glist,
  function t_glist (line 1124) | t_glist *glist_findgraph(t_glist *x)
  function g_graph_setup_class (line 1135) | void g_graph_setup_class(t_class *c)
  function g_graph_setup (line 1156) | void g_graph_setup(void)

FILE: libs/libpd/pure-data/src/g_guiconnect.c
  type _guiconnect (line 15) | struct _guiconnect
  function t_guiconnect (line 25) | t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym)
  function guiconnect_free (line 35) | static void guiconnect_free(t_guiconnect *x)
  function guiconnect_tick (line 45) | static void guiconnect_tick(t_guiconnect *x)
  function guiconnect_notarget (line 53) | void guiconnect_notarget(t_guiconnect *x, double timedelay)
  function guiconnect_anything (line 69) | static void guiconnect_anything(t_guiconnect *x,
  function guiconnect_signoff (line 79) | static void guiconnect_signoff(t_guiconnect *x)
  function g_guiconnect_setup (line 90) | void g_guiconnect_setup(void)

FILE: libs/libpd/pure-data/src/g_io.c
  function symbol2resamplemethod (line 20) | static int symbol2resamplemethod(t_symbol*s)
  type t_reblocker (line 32) | typedef struct _reblocker
  function reblocker_init (line 38) | static void reblocker_init(t_reblocker *rb, int buflength)
  function reblocker_resize (line 44) | static void reblocker_resize(t_reblocker **rb, int oldn, int newn,
  type t_vinlet (line 61) | typedef struct _vinlet
  function vinlet_bang (line 91) | static void vinlet_bang(t_vinlet *x)
  function vinlet_pointer (line 96) | static void vinlet_pointer(t_vinlet *x, t_gpointer *gp)
  function vinlet_float (line 101) | static void vinlet_float(t_vinlet *x, t_float f)
  function vinlet_symbol (line 106) | static void vinlet_symbol(t_vinlet *x, t_symbol *s)
  function vinlet_list (line 111) | static void vinlet_list(t_vinlet *x, t_symbol *s, int argc, t_atom *argv)
  function vinlet_anything (line 116) | static void vinlet_anything(t_vinlet *x, t_symbol *s, int argc, t_atom *...
  function vinlet_free (line 121) | static void vinlet_free(t_vinlet *x)
  function t_inlet (line 133) | t_inlet *vinlet_getit(t_pd *x)
  function vinlet_issignal (line 140) | int vinlet_issignal(t_vinlet *x)
  function t_int (line 145) | t_int *vinlet_perform(t_int *w)
  function vinlet_fwd (line 163) | static void vinlet_fwd(t_vinlet *x, t_symbol *s, int argc, t_atom *argv)
  function vinlet_dsp (line 172) | static void vinlet_dsp(t_vinlet *x, t_signal **sp)
  function t_int (line 195) | t_int *vinlet_doprolog(t_int *w)
  function vinlet_dspprolog (line 220) | void vinlet_dspprolog(struct _vinlet *x, t_signal **parentsigs,
  function vinlet_setup (line 344) | static void vinlet_setup(void)
  type t_voutlet (line 367) | typedef struct _voutlet
  function voutlet_bang (line 398) | static void voutlet_bang(t_voutlet *x)
  function voutlet_pointer (line 403) | static void voutlet_pointer(t_voutlet *x, t_gpointer *gp)
  function voutlet_float (line 408) | static void voutlet_float(t_voutlet *x, t_float f)
  function voutlet_symbol (line 413) | static void voutlet_symbol(t_voutlet *x, t_symbol *s)
  function voutlet_list (line 418) | static void voutlet_list(t_voutlet *x, t_symbol *s, int argc, t_atom *argv)
  function voutlet_anything (line 423) | static void voutlet_anything(t_voutlet *x, t_symbol *s, int argc, t_atom...
  function voutlet_free (line 428) | static void voutlet_free(t_voutlet *x)
  function t_outlet (line 440) | t_outlet *voutlet_getit(t_pd *x)
  function voutlet_issignal (line 448) | int voutlet_issignal(t_voutlet *x)
  function t_int (line 454) | t_int *voutlet_perform(t_int *w)
  function t_int (line 477) | static t_int *voutlet_doepilog(t_int *w)
  function t_int (line 494) | static t_int *voutlet_doepilog_resample(t_int *w)
  function voutlet_dspprolog (line 515) | void voutlet_dspprolog(struct _voutlet *x, t_signal **parentsigs,
  function voutlet_dsp (line 566) | static void voutlet_dsp(t_voutlet *x, t_signal **sp)
  function voutlet_dspepilog (line 595) | void voutlet_dspepilog(struct _voutlet *x, t_signal **parentsigs,
  function voutlet_setup (line 695) | static void voutlet_setup(void)
  function g_io_setup (line 714) | void g_io_setup(void)

FILE: libs/libpd/pure-data/src/g_mycanvas.c
  function my_canvas_draw_io (line 29) | static void my_canvas_draw_io(t_my_canvas* x, t_glist* glist, int mode) ...
  function my_canvas_draw_config (line 30) | static void my_canvas_draw_config(t_my_canvas* x, t_glist* glist)
  function my_canvas_draw_new (line 68) | static void my_canvas_draw_new(t_my_canvas *x, t_glist *glist)
  function my_canvas_draw_select (line 90) | static void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
  function my_canvas_getrect (line 101) | static void my_canvas_getrect(t_gobj *z, t_glist *glist, int *xp1, int *...
  function my_canvas_save (line 111) | static void my_canvas_save(t_gobj *z, t_binbuf *b)
  function my_canvas_properties (line 127) | static void my_canvas_properties(t_gobj *z, t_glist *owner)
  function my_canvas_get_pos (line 140) | static void my_canvas_get_pos(t_my_canvas *x)
  function my_canvas_dialog (line 150) | static void my_canvas_dialog(t_my_canvas *x, t_symbol *s, int argc, t_at...
  function my_canvas_size (line 184) | static void my_canvas_size(t_my_canvas *x, t_symbol *s, int ac, t_atom *av)
  function my_canvas_delta (line 195) | static void my_canvas_delta(t_my_canvas *x, t_symbol *s, int ac, t_atom ...
  function my_canvas_pos (line 198) | static void my_canvas_pos(t_my_canvas *x, t_symbol *s, int ac, t_atom *av)
  function my_canvas_vis_size (line 201) | static void my_canvas_vis_size(t_my_canvas *x, t_symbol *s, int ac, t_at...
  function my_canvas_color (line 219) | static void my_canvas_color(t_my_canvas *x, t_symbol *s, int ac, t_atom ...
  function my_canvas_send (line 222) | static void my_canvas_send(t_my_canvas *x, t_symbol *s)
  function my_canvas_receive (line 225) | static void my_canvas_receive(t_my_canvas *x, t_symbol *s)
  function my_canvas_label (line 228) | static void my_canvas_label(t_my_canvas *x, t_symbol *s)
  function my_canvas_label_pos (line 231) | static void my_canvas_label_pos(t_my_canvas *x, t_symbol *s, int ac, t_a...
  function my_canvas_label_font (line 234) | static void my_canvas_label_font(t_my_canvas *x, t_symbol *s, int ac, t_...
  function my_canvas_free (line 326) | static void my_canvas_free(t_my_canvas *x)
  function g_mycanvas_setup (line 333) | void g_mycanvas_setup(void)

FILE: libs/libpd/pure-data/src/g_numbox.c
  function my_numbox_clip (line 23) | void my_numbox_clip(t_my_numbox *x)
  function my_numbox_calc_fontwidth (line 31) | void my_numbox_calc_fontwidth(t_my_numbox *x)
  function my_numbox_ftoa (line 45) | void my_numbox_ftoa(t_my_numbox *x)
  function my_numbox_draw_config (line 109) | static void my_numbox_draw_config(t_my_numbox* x, t_glist* glist)
  function my_numbox_draw_new (line 177) | static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
  function my_numbox_draw_select (line 204) | static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
  function my_numbox_draw_update (line 231) | static void my_numbox_draw_update(t_gobj *client, t_glist *glist)
  function my_numbox_tick_wait (line 275) | static void my_numbox_tick_wait(t_my_numbox *x)
  function my_numbox_getrect (line 282) | static void my_numbox_getrect(t_gobj *z, t_glist *glist,
  function my_numbox_save (line 293) | static void my_numbox_save(t_gobj *z, t_binbuf *b)
  function my_numbox_check_minmax (line 318) | int my_numbox_check_minmax(t_my_numbox *x, double min, double max)
  function my_numbox_properties (line 356) | static void my_numbox_properties(t_gobj *z, t_glist *owner)
  function my_numbox_bang (line 374) | static void my_numbox_bang(t_my_numbox *x)
  function my_numbox_dialog (line 381) | static void my_numbox_dialog(t_my_numbox *x, t_symbol *s, int argc,
  function my_numbox_motion (line 424) | static void my_numbox_motion(t_my_numbox *x, t_floatarg dx, t_floatarg dy,
  function my_numbox_click (line 442) | static void my_numbox_click(t_my_numbox *x, t_floatarg xpos, t_floatarg ...
  function my_numbox_newclick (line 449) | static int my_numbox_newclick(t_gobj *z, struct _glist *glist,
  function my_numbox_set (line 478) | static void my_numbox_set(t_my_numbox *x, t_floatarg f)
  function my_numbox_log_height (line 492) | static void my_numbox_log_height(t_my_numbox *x, t_floatarg lh)
  function my_numbox_float (line 503) | static void my_numbox_float(t_my_numbox *x, t_floatarg f)
  function my_numbox_size (line 510) | static void my_numbox_size(t_my_numbox *x, t_symbol *s, int ac, t_atom *av)
  function my_numbox_delta (line 530) | static void my_numbox_delta(t_my_numbox *x, t_symbol *s, int ac, t_atom ...
  function my_numbox_pos (line 533) | static void my_numbox_pos(t_my_numbox *x, t_symbol *s, int ac, t_atom *av)
  function my_numbox_range (line 536) | static void my_numbox_range(t_my_numbox *x, t_symbol *s, int ac, t_atom ...
  function my_numbox_color (line 546) | static void my_numbox_color(t_my_numbox *x, t_symbol *s, int ac, t_atom ...
  function my_numbox_send (line 549) | static void my_numbox_send(t_my_numbox *x, t_symbol *s)
  function my_numbox_receive (line 552) | static void my_numbox_receive(t_my_numbox *x, t_symbol *s)
  function my_numbox_label (line 555) | static void my_numbox_label(t_my_numbox *x, t_symbol *s)
  function my_numbox_label_pos (line 558) | static void my_numbox_label_pos(t_my_numbox *x, t_symbol *s, int ac, t_a...
  function my_numbox_label_font (line 561) | static void my_numbox_label_font(t_my_numbox *x,
  function my_numbox_log (line 577) | static void my_numbox_log(t_my_numbox *x)
  function my_numbox_lin (line 587) | static void my_numbox_lin(t_my_numbox *x)
  function my_numbox_init (line 592) | static void my_numbox_init(t_my_numbox *x, t_floatarg f)
  function my_numbox_loadbang (line 597) | static void my_numbox_loadbang(t_my_numbox *x, t_floatarg action)
  function my_numbox_key (line 606) | static void my_numbox_key(void *z, t_symbol *keysym, t_floatarg fkey)
  function my_numbox_list (line 652) | static void my_numbox_list(t_my_numbox *x, t_symbol *s, int ac, t_atom *av)
  function my_numbox_free (line 740) | static void my_numbox_free(t_my_numbox *x)
  function g_numbox_setup (line 748) | void g_numbox_setup(void)

FILE: libs/libpd/pure-data/src/g_radio.c
  function radio_draw_io (line 27) | static void radio_draw_io(t_radio* x, t_glist* glist, int old_snd_rcv_fl...
  function radio_draw_config (line 72) | static void radio_draw_config(t_radio* x, t_glist* glist)
  function radio_draw_new (line 135) | static void radio_draw_new(t_radio *x, t_glist *glist)
  function radio_draw_select (line 168) | static void radio_draw_select(t_radio* x, t_glist* glist)
  function radio_draw_update (line 185) | static void radio_draw_update(t_gobj *client, t_glist *glist)
  function radio_getrect (line 209) | static void radio_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1,...
  function radio_save (line 225) | static void radio_save(t_gobj *z, t_binbuf *b)
  function radio_properties (line 260) | static void radio_properties(t_gobj *z, t_glist *owner)
  function radio_dialog (line 284) | static void radio_dialog(t_radio *x, t_symbol *s, int argc, t_atom *argv)
  function radio_set (line 332) | static void radio_set(t_radio *x, t_floatarg f)
  function radio_bang (line 356) | static void radio_bang(t_radio *x)
  function radio_fout (line 386) | static void radio_fout(t_radio *x, t_floatarg f)
  function radio_float (line 431) | static void radio_float(t_radio *x, t_floatarg f)
  function radio_click (line 484) | static void radio_click(t_radio *x, t_floatarg xpos, t_floatarg ypos, t_...
  function radio_newclick (line 502) | static int radio_newclick(t_gobj *z, struct _glist *glist, int xpix, int...
  function radio_loadbang (line 509) | static void radio_loadbang(t_radio *x, t_floatarg action)
  function radio_number (line 515) | static void radio_number(t_radio *x, t_floatarg num)
  function radio_orientation (line 540) | static void radio_orientation(t_radio *x, t_floatarg forient)
  function radio_size (line 546) | static void radio_size(t_radio *x, t_symbol *s, int ac, t_atom *av)
  function radio_delta (line 553) | static void radio_delta(t_radio *x, t_symbol *s, int ac, t_atom *av)
  function radio_pos (line 556) | static void radio_pos(t_radio *x, t_symbol *s, int ac, t_atom *av)
  function radio_color (line 559) | static void radio_color(t_radio *x, t_symbol *s, int ac, t_atom *av)
  function radio_send (line 562) | static void radio_send(t_radio *x, t_symbol *s)
  function radio_receive (line 565) | static void radio_receive(t_radio *x, t_symbol *s)
  function radio_label (line 568) | static void radio_label(t_radio *x, t_symbol *s)
  function radio_label_pos (line 571) | static void radio_label_pos(t_radio *x, t_symbol *s, int ac, t_atom *av)
  function radio_label_font (line 574) | static void radio_label_font(t_radio *x, t_symbol *s, int ac, t_atom *av)
  function radio_init (line 577) | static void radio_init(t_radio *x, t_floatarg f)
  function radio_double_change (line 580) | static void radio_double_change(t_radio *x)
  function radio_single_change (line 588) | static void radio_single_change(t_radio *x)
  function radio_free (line 676) | static void radio_free(t_radio *x)
  function g_radio_setup (line 683) | void g_radio_setup(void)

FILE: libs/libpd/pure-data/src/g_readwrite.c
  type t_savestate (line 22) | typedef struct _savestate
  function savestate_doit (line 41) | static void savestate_doit(t_savestate *x, t_binbuf *b)
  function savestate_list (line 52) | static void savestate_list(t_savestate *x, t_symbol *s, int argc, t_atom...
  function savestate_setup (line 63) | static void savestate_setup(void)
  function canvas_statesavers_doit (line 70) | void canvas_statesavers_doit(t_glist *x, t_binbuf *b)
  function canvas_saved (line 80) | void canvas_saved(t_glist *x, t_symbol *s, int argc, t_atom *argv)
  function canvas_scanbinbuf (line 95) | static int canvas_scanbinbuf(int natoms, t_atom *vec, int *p_indexout,
  function canvas_readerror (line 114) | static void canvas_readerror(int natoms, t_atom *vec, int message,
  function glist_readatoms (line 125) | static void glist_readatoms(t_glist *x, int natoms, t_atom *vec,
  function canvas_readscalar (line 183) | int canvas_readscalar(t_glist *x, int natoms, t_atom *vec,
  function glist_readfrombinbuf (line 239) | void glist_readfrombinbuf(t_glist *x, const t_binbuf *b, const char *fil...
  function glist_doread (line 321) | static void glist_doread(t_glist *x, t_symbol *filename, t_symbol *format,
  function glist_read (line 350) | void glist_read(t_glist *x, t_symbol *filename, t_symbol *format)
  function glist_mergefile (line 355) | void glist_mergefile(t_glist *x, t_symbol *filename, t_symbol *format)
  function canvas_dataproperties (line 365) | void canvas_dataproperties(t_canvas *x, t_scalar *sc, t_binbuf *b)
  function canvas_doaddtemplate (line 451) | void canvas_doaddtemplate(t_symbol *templatesym,
  function canvas_writescalar (line 470) | void canvas_writescalar(t_symbol *templatesym, t_word *w, t_binbuf *b,
  function glist_writelist (line 522) | static void glist_writelist(t_gobj *y, t_binbuf *b)
  function canvas_addtemplatesforscalar (line 539) | static void canvas_addtemplatesforscalar(t_symbol *templatesym,
  function canvas_addtemplatesforlist (line 565) | static void canvas_addtemplatesforlist(t_gobj *y,
  function t_binbuf (line 579) | t_binbuf *glist_writetobinbuf(t_glist *x, int wholething)
  function glist_write (line 637) | static void glist_write(t_glist *x, t_symbol *filename, t_symbol *format)
  function canvas_saveto (line 664) | static void canvas_saveto(t_canvas *x, t_binbuf *b)
  function canvas_collecttemplatesfor (line 735) | static void canvas_collecttemplatesfor(t_canvas *x, int *ntemplatesp,
  function canvas_savetemplatesto (line 754) | static void canvas_savetemplatesto(t_canvas *x, t_binbuf *b, int wholeth...
  function canvas_savetofile (line 797) | static void canvas_savetofile(t_canvas *x, t_symbol *filename, t_symbol ...
  function canvas_menusaveas (line 825) | static void canvas_menusaveas(t_canvas *x, t_float fdestroy)
  function canvas_menusave (line 834) | static void canvas_menusave(t_canvas *x, t_float fdestroy)
  function g_readwrite_setup (line 847) | void g_readwrite_setup(void)
  function canvas_readwrite_for_class (line 869) | void canvas_readwrite_for_class(t_class *c)

FILE: libs/libpd/pure-data/src/g_rtext.c
  type _rtext (line 21) | struct _rtext
  function t_rtext (line 37) | t_rtext *rtext_new(t_glist *glist, t_text *who)
  function rtext_free (line 56) | void rtext_free(t_rtext *x)
  function rtext_gettext (line 81) | void rtext_gettext(t_rtext *x, char **buf, int *bufsize)
  function rtext_getseltext (line 86) | void rtext_getseltext(t_rtext *x, char **buf, int *bufsize)
  function t_text (line 92) | t_text *rtext_getowner(t_rtext *x)
  function t_symbol (line 98) | static t_symbol *rtext_gettype(t_rtext *x)
  function firstone (line 121) | static int firstone(char *s, int c, int n)
  function lastone (line 134) | static int lastone(char *s, int c, int n)
  function rtext_formattext (line 164) | static void rtext_formattext(t_rtext *x, int *widthp, int *heightp,
  function rtext_formatatom (line 268) | static void rtext_formatatom(t_rtext *x, int *widthp, int *heightp,
  function rtext_senditup (line 375) | static void rtext_senditup(t_rtext *x, int action, int *widthp, int *hei...
  function rtext_retext (line 476) | void rtext_retext(t_rtext *x)
  function t_rtext (line 489) | t_rtext *glist_findrtext(t_glist *gl, t_text *who)
  function rtext_width (line 499) | int rtext_width(t_rtext *x)
  function rtext_height (line 506) | int rtext_height(t_rtext *x)
  function rtext_draw (line 513) | void rtext_draw(t_rtext *x)
  function rtext_erase (line 519) | void rtext_erase(t_rtext *x)
  function rtext_displace (line 524) | void rtext_displace(t_rtext *x, int dx, int dy)
  function rtext_select (line 530) | void rtext_select(t_rtext *x, int state)
  function rtext_activate (line 539) | void rtext_activate(t_rtext *x, int state)
  function rtext_findatomfor (line 565) | int rtext_findatomfor(t_rtext *x, int xpos, int ypos)
  function rtext_key (line 589) | void rtext_key(t_rtext *x, int keynum, t_symbol *keysym)
  function rtext_mouse (line 728) | void rtext_mouse(t_rtext *x, int xval, int yval, int flag)

FILE: libs/libpd/pure-data/src/g_scalar.c
  function t_gstub (line 19) | t_gstub *gstub_new(t_glist *gl, t_array *a)
  function gstub_dis (line 41) | static void gstub_dis(t_gstub *gs)
  function gstub_cutoff (line 53) | void gstub_cutoff(t_gstub *gs)
  function gpointer_check (line 65) | int gpointer_check(const t_gpointer *gp, int headok)
  function gpointer_copy (line 86) | void gpointer_copy(const t_gpointer *gpfrom, t_gpointer *gpto)
  function gpointer_unset (line 96) | void gpointer_unset(t_gpointer *gp)
  function gpointer_setglist (line 106) | void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x)
  function gpointer_setarray (line 116) | void gpointer_setarray(t_gpointer *gp, t_array *array, t_word *w)
  function gpointer_init (line 126) | void gpointer_init(t_gpointer *gp)
  function t_symbol (line 138) | t_symbol *gpointer_gettemplatesym(const t_gpointer *gp)
  function t_binbuf (line 155) | t_binbuf *pointertobinbuf(t_pd *x, t_gpointer *gp, t_symbol *s,
  function word_init (line 193) | void word_init(t_word *wp, t_template *template, t_gpointer *gp)
  function word_restore (line 211) | void word_restore(t_word *wp, t_template *template,
  function word_free (line 246) | void word_free(t_word *wp, t_template *template)
  function template_cancreate (line 259) | static int template_cancreate(t_template *template)
  function t_scalar (line 284) | t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym)
  function glist_scalar (line 310) | void glist_scalar(t_glist *glist,
  function scalar_getbasexy (line 334) | void scalar_getbasexy(t_scalar *x, t_float *basex, t_float *basey)
  function scalar_getrect (line 341) | static void scalar_getrect(t_gobj *z, t_glist *owner,
  function scalar_drawselectrect (line 384) | static void scalar_drawselectrect(t_scalar *x, t_glist *glist, int state)
  function scalar_select (line 405) | static void scalar_select(t_gobj *z, t_glist *owner, int state)
  function scalar_displace (line 422) | static void scalar_displace(t_gobj *z, t_glist *glist, int dx, int dy)
  function scalar_activate (line 457) | static void scalar_activate(t_gobj *z, t_glist *owner, int state)
  function scalar_delete (line 463) | static void scalar_delete(t_gobj *z, t_glist *glist)
  function scalar_vis (line 468) | static void scalar_vis(t_gobj *z, t_glist *owner, int vis)
  function scalar_doredraw (line 512) | static void scalar_doredraw(t_gobj *client, t_glist *glist)
  function scalar_redraw (line 521) | void scalar_redraw(t_scalar *x, t_glist *glist)
  function scalar_doclick (line 530) | int scalar_doclick(t_word *data, t_template *template, t_scalar *sc,
  function scalar_click (line 559) | static int scalar_click(t_gobj *z, struct _glist *owner,
  function scalar_save (line 568) | static void scalar_save(t_gobj *z, t_binbuf *b)
  function scalar_properties (line 581) | static void scalar_properties(t_gobj *z, struct _glist *owner)
  function scalar_free (line 608) | static void scalar_free(t_scalar *x)
  function g_scalar_setup (line 629) | void g_scalar_setup(void)

FILE: libs/libpd/pure-data/src/g_slider.c
  function slider_draw_io (line 37) | static void slider_draw_io(t_slider* x, t_glist* glist, int old_snd_rcv_...
  function slider_knob_position (line 90) | static void slider_knob_position(t_slider*x, t_glist *glist, int val, in...
  function slider_draw_config (line 112) | static void slider_draw_config(t_slider* x, t_glist* glist)
  function slider_draw_new (line 164) | static void slider_draw_new(t_slider *x, t_glist *glist)
  function slider_draw_select (line 188) | static void slider_draw_select(t_slider* x, t_glist* glist)
  function slider_draw_update (line 203) | static void slider_draw_update(t_gobj *client, t_glist *glist)
  function slider_getrect (line 226) | static void slider_getrect(t_gobj *z, t_glist *glist,
  function slider_save (line 249) | static void slider_save(t_gobj *z, t_binbuf *b)
  function slider_check_range (line 270) | static int slider_check_range(t_slider *x, int v)
  function slider_check_minmax (line 286) | static void slider_check_minmax(t_slider *x, double min, double max, t_f...
  function slider_properties (line 311) | static void slider_properties(t_gobj *z, t_glist *owner)
  function t_float (line 339) | static t_float slider_getfval(t_slider *x)
  function slider_bang (line 356) | static void slider_bang(t_slider *x)
  function slider_dialog (line 368) | static void slider_dialog(t_slider *x, t_symbol *s, int argc, t_atom *argv)
  function slider_motion (line 415) | static void slider_motion(t_slider *x, t_floatarg dx, t_floatarg dy,
  function slider_click (line 460) | static void slider_click(t_slider *x, t_floatarg xpos, t_floatarg ypos,
  function slider_newclick (line 490) | static int slider_newclick(t_gobj *z, struct _glist *glist,
  function slider_set (line 507) | static void slider_set(t_slider *x, t_floatarg f)
  function slider_float (line 538) | static void slider_float(t_slider *x, t_floatarg f)
  function slider_size (line 545) | static void slider_size(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_delta (line 563) | static void slider_delta(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_pos (line 566) | static void slider_pos(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_range (line 569) | static void slider_range(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_color (line 578) | static void slider_color(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_send (line 581) | static void slider_send(t_slider *x, t_symbol *s)
  function slider_receive (line 584) | static void slider_receive(t_slider *x, t_symbol *s)
  function slider_label (line 587) | static void slider_label(t_slider *x, t_symbol *s)
  function slider_label_pos (line 590) | static void slider_label_pos(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_label_font (line 593) | static void slider_label_font(t_slider *x, t_symbol *s, int ac, t_atom *av)
  function slider_log (line 596) | static void slider_log(t_slider *x)
  function slider_lin (line 604) | static void slider_lin(t_slider *x)
  function slider_init (line 612) | static void slider_init(t_slider *x, t_floatarg f)
  function slider_steady (line 617) | static void slider_steady(t_slider *x, t_floatarg f)
  function slider_orientation (line 622) | static void slider_orientation(t_slider *x, t_floatarg forient)
  function slider_zoom (line 646) | static void slider_zoom(t_slider *x, t_floatarg f)
  function slider_loadbang (line 652) | static void slider_loadbang(t_slider *x, t_floatarg action)
  function slider_free (line 755) | static void slider_free(t_slider *x)
  function g_slider_setup (line 762) | void g_slider_setup(void)

FILE: libs/libpd/pure-data/src/g_template.c
  type _gtemplate (line 20) | struct _gtemplate
  type _instancetemplate (line 31) | struct _instancetemplate
  function dataslot_matches (line 93) | static int dataslot_matches(t_dataslot *ds1, t_dataslot *ds2,
  function template_addtolist (line 105) | static void template_addtolist(t_template *x)
  function template_takeofflist (line 111) | static void template_takeofflist(t_template *x)
  function t_template (line 124) | t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv)
  function template_find_field (line 183) | int template_find_field(t_template *x, t_symbol *name, int *p_onset,
  function t_float (line 205) | t_float template_getfloat(t_template *x, t_symbol *fieldname, t_word *wp,
  function template_setfloat (line 223) | void template_setfloat(t_template *x, t_symbol *fieldname, t_word *wp,
  function t_symbol (line 239) | t_symbol *template_getsymbol(t_template *x, t_symbol *fieldname, t_word ...
  function template_setsymbol (line 257) | void template_setsymbol(t_template *x, t_symbol *fieldname, t_word *wp,
  function template_match (line 276) | int template_match(t_template *x1, t_template *x2)
  function template_conformwords (line 304) | static void template_conformwords(t_template *tfrom, t_template *tto,
  function t_scalar (line 322) | static t_scalar *template_conformscalar(t_template *tfrom, t_template *tto,
  function template_conformarray (line 389) | static void template_conformarray(t_template *tfrom, t_template *tto,
  function template_conformglist (line 439) | static void template_conformglist(t_template *tfrom, t_template *tto,
  function template_conform (line 458) | void template_conform(t_template *tfrom, t_template *tto)
  function t_template (line 508) | t_template *template_findbyname(t_symbol *s)
  function t_canvas (line 513) | t_canvas *template_findcanvas(t_template *template)
  function template_notify (line 527) | void template_notify(t_template *template, t_symbol *s, int argc, t_atom...
  function template_notifyforscalar (line 535) | void template_notifyforscalar(t_template *template, t_glist *owner,
  function template_free (line 594) | void template_free(t_template *x)
  function template_setup (line 602) | static void template_setup(void)
  function t_template (line 703) | t_template *gtemplate_get(t_gtemplate *x)
  function gtemplate_free (line 708) | static void gtemplate_free(t_gtemplate *x)
  function gtemplate_setup (line 749) | static void gtemplate_setup(void)
  type _fielddesc (line 766) | struct _fielddesc
  function fielddesc_setfloat_const (line 783) | static void fielddesc_setfloat_const(t_fielddesc *fd, t_float f)
  function fielddesc_setsymbol_const (line 792) | static void fielddesc_setsymbol_const(t_fielddesc *fd, t_symbol *s)
  function fielddesc_setfloat_var (line 801) | static void fielddesc_setfloat_var(t_fielddesc *fd, t_symbol *s)
  function fielddesc_setfloatarg (line 860) | static void fielddesc_setfloatarg(t_fielddesc *fd, int argc, t_atom *argv)
  function fielddesc_setsymbolarg (line 868) | static void fielddesc_setsymbolarg(t_fielddesc *fd, int argc, t_atom *argv)
  function fielddesc_setarrayarg (line 882) | static void fielddesc_setarrayarg(t_fielddesc *fd, int argc, t_atom *argv)
  function t_float (line 896) | static t_float fielddesc_getfloat(t_fielddesc *f, t_template *template,
  function t_float (line 914) | t_float fielddesc_cvttocoord(t_fielddesc *f, t_float val)
  function t_float (line 933) | t_float fielddesc_getcoord(t_fielddesc *f, t_template *template,
  function t_symbol (line 954) | static t_symbol *fielddesc_getsymbol(t_fielddesc *f, t_template *template,
  function t_float (line 972) | t_float fielddesc_cvtfromcoord(t_fielddesc *f, t_float coord)
  function fielddesc_setcoord (line 994) | void fielddesc_setcoord(t_fielddesc *f, t_template *template,
  type t_curve (line 1020) | typedef struct _curve
  function curve_float (line 1108) | void curve_float(t_curve *x, t_floatarg f)
  function curve_getrect (line 1127) | static void curve_getrect(t_gobj *z, t_glist *glist,
  function curve_displace (line 1160) | static void curve_displace(t_gobj *z, t_glist *glist,
  function curve_select (line 1167) | static void curve_select(t_gobj *z, t_glist *glist,
  function curve_activate (line 1174) | static void curve_activate(t_gobj *z, t_glist *glist,
  function rangecolor (line 1182) | static int rangecolor(int n)    /* 0 to 9 in 5 steps */
  function rangecolor (line 1191) | static int rangecolor(int n)    /* 0 to 9 in 5 steps */
  function numbertocolor (line 1199) | static int numbertocolor(int n)
  function curve_vis (line 1212) | static void curve_vis(t_gobj *z, t_glist *glist,
  function curve_motionfn (line 1291) | static void curve_motionfn(void *z, t_floatarg dx, t_floatarg dy, t_floa...
  function curve_click (line 1334) | static int curve_click(t_gobj *z, t_glist *glist,
  function curve_free (line 1406) | static void curve_free(t_curve *x)
  function curve_setup (line 1411) | static void curve_setup(void)
  type t_plot (line 1431) | typedef struct _plot
  function plot_float (line 1532) | void plot_float(t_plot *x, t_floatarg f)
  function plot_readownertemplate (line 1554) | static int plot_readownertemplate(t_plot *x,
  function array_getfields (line 1601) | int array_getfields(t_symbol *elemtemplatesym,
  function plot_getrect (line 1657) | static void plot_getrect(t_gobj *z, t_glist *glist,
  function plot_displace (line 1750) | static void plot_displace(t_gobj *z, t_glist *glist,
  function plot_select (line 1757) | static void plot_select(t_gobj *z, t_glist *glist,
  function plot_activate (line 1764) | static void plot_activate(t_gobj *z, t_glist *glist,
  function plot_vis (line 1773) | static void plot_vis(t_gobj *z, t_glist *glist,
  function array_motionfn (line 2110) | static void array_motionfn(void *z, t_floatarg dx, t_floatarg dy, t_floa...
  type _glist (line 2195) | struct _glist
  function array_doclick_element (line 2201) | static int array_doclick_element(t_array *array, t_glist *glist,
  function array_doclick (line 2243) | static int array_doclick(t_array *array, t_glist *glist, t_scalar *sc,
  function plot_click (line 2479) | static int plot_click(t_gobj *z, t_glist *glist,
  function plot_setup (line 2513) | static void plot_setup(void)
  type t_drawnumber (line 2532) | typedef struct _drawnumber
  function drawnumber_float (line 2590) | void drawnumber_float(t_drawnumber *x, t_floatarg f)
  function drawnumber_gettype (line 2609) | static int drawnumber_gettype(t_drawnumber *x, t_word *data,
  function drawnumber_getbuf (line 2621) | static void drawnumber_getbuf(t_drawnumber *x, t_word *data,
  function drawnumber_getrect (line 2668) | static void drawnumber_getrect(t_gobj *z, t_glist *glist,
  function drawnumber_displace (line 2707) | static void drawnumber_displace(t_gobj *z, t_glist *glist,
  function drawnumber_select (line 2714) | static void drawnumber_select(t_gobj *z, t_glist *glist,
  function drawnumber_activate (line 2722) | static void drawnumber_activate(t_gobj *z, t_glist *glist,
  function drawnumber_vis (line 2729) | static void drawnumber_vis(t_gobj *z, t_glist *glist,
  function drawnumber_motionfn (line 2770) | static void drawnumber_motionfn(void *z, t_floatarg dx, t_floatarg dy,
  function drawnumber_key (line 2804) | static void drawnumber_key(void *z, t_symbol *keysym, t_floatarg fkey)
  function drawnumber_click (line 2877) | static int drawnumber_click(t_gobj *z, t_glist *glist,
  function drawnumber_free (line 2927) | static void drawnumber_free(t_drawnumber *x)
  function drawnumber_setup (line 2931) | static void drawnumber_setup(void)
  function g_template_setup (line 2947) | void g_template_setup(void)
  function g_template_newpdinstance (line 2956) | void g_template_newpdinstance(void)
  function g_template_freepdinstance (line 2961) | void g_template_freepdinstance(void)

FILE: libs/libpd/pure-data/src/g_text.c
  function glist_nograb (line 39) | static void glist_nograb(t_glist *x)
  function glist_text (line 58) | void glist_text(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_error_couldntcreate (line 108) | static void canvas_error_couldntcreate(void*x, t_binbuf*b, const char*er...
  function canvas_objtext (line 122) | static void canvas_objtext(t_glist *gl, int xpix, int ypix, int width,
  function canvas_howputnew (line 169) | static void canvas_howputnew(t_canvas *x, int *connectp, int *xpixp, int...
  function canvas_obj (line 233) | void canvas_obj(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_iemguis (line 266) | void canvas_iemguis(t_glist *gl, t_symbol *guiobjname)
  function canvas_bng (line 288) | void canvas_bng(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_toggle (line 293) | void canvas_toggle(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_vslider (line 298) | void canvas_vslider(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_hslider (line 303) | void canvas_hslider(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_hdial (line 308) | void canvas_hdial(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_vdial (line 313) | void canvas_vdial(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_hradio (line 318) | void canvas_hradio(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_vradio (line 323) | void canvas_vradio(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_vumeter (line 328) | void canvas_vumeter(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_mycnv (line 333) | void canvas_mycnv(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_numbox (line 338) | void canvas_numbox(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_objfor (line 345) | void canvas_objfor(t_glist *gl, t_text *x, int argc, t_atom *argv)
  type t_messresponder (line 358) | typedef struct _messresponder
  type t_message (line 364) | typedef struct _message
  function messresponder_bang (line 374) | static void messresponder_bang(t_messresponder *x)
  function messresponder_float (line 379) | static void messresponder_float(t_messresponder *x, t_float f)
  function messresponder_symbol (line 384) | static void messresponder_symbol(t_messresponder *x, t_symbol *s)
  function messresponder_list (line 389) | static void messresponder_list(t_messresponder *x,
  function messresponder_anything (line 395) | static void messresponder_anything(t_messresponder *x,
  function message_bang (line 401) | static void message_bang(t_message *x)
  function message_float (line 406) | static void message_float(t_message *x, t_float f)
  function message_symbol (line 413) | static void message_symbol(t_message *x, t_symbol *s)
  function message_list (line 420) | static void message_list(t_message *x, t_symbol *s, int argc, t_atom *argv)
  function message_set (line 425) | static void message_set(t_message *x, t_symbol *s, int argc, t_atom *argv)
  function message_add2 (line 432) | static void message_add2(t_message *x, t_symbol *s, int argc, t_atom *argv)
  function message_add (line 438) | static void message_add(t_message *x, t_symbol *s, int argc, t_atom *argv)
  function message_addcomma (line 445) | static void message_addcomma(t_message *x)
  function message_addsemi (line 453) | static void message_addsemi(t_message *x)
  function message_adddollar (line 458) | static void message_adddollar(t_message *x, t_floatarg f)
  function message_adddollsym (line 469) | static void message_adddollsym(t_message *x, t_symbol *s)
  function message_click (line 481) | static void message_click(t_message *x,
  function message_tick (line 501) | static void message_tick(t_message *x)
  function message_free (line 516) | static void message_free(t_message *x)
  function canvas_msg (line 521) | void canvas_msg(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function t_pd (line 561) | t_pd *message_get_responder(t_gobj *x)
  type t_gatom (line 575) | typedef struct _gatom
  function t_symbol (line 598) | static t_symbol *gatom_escapit(t_symbol *s)
  function t_symbol (line 620) | static t_symbol *gatom_unescapit(t_symbol *s)
  function gatom_redraw (line 627) | static void gatom_redraw(t_gobj *client, t_glist *glist)
  function gatom_senditup (line 634) | static void gatom_senditup(t_gatom *x)
  function t_atom (line 641) | static t_atom *gatom_getatom(t_gatom *x)
  function gatom_set (line 658) | static void gatom_set(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
  function gatom_bang (line 708) | static void gatom_bang(t_gatom *x)
  function gatom_float (line 760) | static void gatom_float(t_gatom *x, t_float f)
  function gatom_clipfloat (line 768) | static void gatom_clipfloat(t_gatom *x, t_atom *ap, t_float f)
  function gatom_symbol (line 782) | static void gatom_symbol(t_gatom *x, t_symbol *s)
  function gatom_list (line 792) | static void gatom_list(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
  function gatom_reborder (line 800) | static void gatom_reborder(t_gatom *x)
  function gatom_undarken (line 807) | void gatom_undarken(t_text *x)
  function gatom_key (line 818) | void gatom_key(void *z, t_symbol *keysym, t_floatarg f)
  function gatom_motion (line 877) | static void gatom_motion(void *z, t_floatarg dx, t_floatarg dy,
  function gatom_doclick (line 924) | static int gatom_doclick(t_gobj *z, t_glist *gl, int xpos, int ypos,
  function gatom_click (line 986) | static void gatom_click(t_gatom *x, t_floatarg xpos, t_floatarg ypos,
  function gatom_param (line 994) | static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
  function gatom_fontsize (line 1068) | static int gatom_fontsize(t_gatom *x)
  function gatom_getwherelabel (line 1074) | static void gatom_getwherelabel(t_gatom *x, t_glist *glist, int *xp, int...
  function gatom_displace (line 1103) | static void gatom_displace(t_gobj *z, t_glist *glist,
  function gatom_vis (line 1120) | static void gatom_vis(t_gobj *z, t_glist *glist, int vis)
  function canvas_atom (line 1149) | void canvas_atom(t_glist *gl, t_atomtype type,
  function canvas_floatatom (line 1222) | void canvas_floatatom(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_symbolatom (line 1227) | void canvas_symbolatom(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  function canvas_listbox (line 1232) | void canvas_listbox(t_glist *gl, t_symbol *s, int argc, t
Condensed preview — 171 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,207K chars).
[
  {
    "path": ".gitignore",
    "chars": 873,
    "preview": "\n# built\n*.app\n*.a\n\n# osx\n.DS_Store\n\n# win\n*.exe\n*.dll\n\n# xcode\n*.pbxuser\n*.perspectivev3\n*.mode1v3\nxcuserdata\nbuild\n\n# "
  },
  {
    "path": "CHANGES.txt",
    "chars": 8867,
    "preview": "TBA\n\n* fixed pdMultiExample not using newer ofSoundBuffer audioIn and audioOut\n  functions (reported by Theo Watson)\n\n1."
  },
  {
    "path": "LICENSE.txt",
    "chars": 1586,
    "preview": "Copyright (c) 2011-2023 Dan Wilcox <danomatika@gmail.com>\nAll rights reserved.\n\nThe following terms (the \"Standard Impro"
  },
  {
    "path": "README.md",
    "chars": 22426,
    "preview": "ofxPd\n=====\n<p align=\"center\">\n<img src=\"https://raw.github.com/danomatika/ofxPd/master/ofxaddons_thumbnail.png\"/>\n</p>\n"
  },
  {
    "path": "addon_config.mk",
    "chars": 3091,
    "preview": "# All variables and this file are optional, if they are not present the PG and the\n# makefiles will try to parse the cor"
  },
  {
    "path": "doc/interface_sketch.txt",
    "chars": 4392,
    "preview": "\nTYPES\n\n// message primitives\nBang(string recvName)\nFloat(string recvName, float value)\nSymbol(string recvName, string s"
  },
  {
    "path": "doc/logo/libpd.pd",
    "chars": 117,
    "preview": "#N canvas 0 22 450 300 10;\n#X obj 137 96 inlet;\n#X obj 142 154 outlet;\n#X obj 277 141 outlet~;\n#X obj 273 94 inlet~;\n"
  },
  {
    "path": "doc/logo/logo.pd",
    "chars": 157,
    "preview": "#N canvas 0 22 460 266 12;\n#X obj 278 125 libpd;\n#X obj 154 125 openFrameworks;\n#X connect 0 0 1 1;\n#X connect 1 1 0 0;\n"
  },
  {
    "path": "doc/logo/openFrameworks.pd",
    "chars": 112,
    "preview": "#N canvas 0 22 450 300 10;\n#X obj 80 100 outlet;\n#X obj 81 36 inlet;\n#X obj 218 33 inlet;\n#X obj 217 98 outlet;\n"
  },
  {
    "path": "libs/libpd/cpp/LICENSE.txt",
    "chars": 1579,
    "preview": "Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>\nAll rights reserved.\n\nThe following terms (the \"Standard Impro"
  },
  {
    "path": "libs/libpd/cpp/PdBase.hpp",
    "chars": 42283,
    "preview": "/*\n * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usag"
  },
  {
    "path": "libs/libpd/cpp/PdMidiReceiver.hpp",
    "chars": 1751,
    "preview": "/*\n * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usag"
  },
  {
    "path": "libs/libpd/cpp/PdReceiver.hpp",
    "chars": 1401,
    "preview": "/*\n * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usag"
  },
  {
    "path": "libs/libpd/cpp/PdTypes.hpp",
    "chars": 11513,
    "preview": "/*\n * Copyright (c) 2012-2022 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usag"
  },
  {
    "path": "libs/libpd/libpd_wrapper/s_libpdmidi.c",
    "chars": 3171,
    "preview": "/* Copyright (c) 1997-2010 Miller Puckette and others.\n * For information on usage and redistribution, and for a DISCLAI"
  },
  {
    "path": "libs/libpd/libpd_wrapper/util/ringbuffer.c",
    "chars": 5218,
    "preview": "/*\n *  Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)\n *\n *  For information on usage and redistribution"
  },
  {
    "path": "libs/libpd/libpd_wrapper/util/ringbuffer.h",
    "chars": 2004,
    "preview": "/*\n *  Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)\n *\n *  For information on usage and redistribution"
  },
  {
    "path": "libs/libpd/libpd_wrapper/util/z_print_util.c",
    "chars": 1842,
    "preview": "/*\n * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com) &\n *                    Peter Brinkmann (peter.brinkmann@gmai"
  },
  {
    "path": "libs/libpd/libpd_wrapper/util/z_print_util.h",
    "chars": 1625,
    "preview": "/*\n * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com) &\n *                    Peter Brinkmann (peter.brinkmann@gmai"
  },
  {
    "path": "libs/libpd/libpd_wrapper/util/z_queued.c",
    "chars": 14310,
    "preview": "/*\n * Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)\n * Copyright (c) 2022 libpd team\n *\n * For informat"
  },
  {
    "path": "libs/libpd/libpd_wrapper/util/z_queued.h",
    "chars": 4881,
    "preview": "/*\n * Copyright (c) 2012 Peter Brinkmann (peter.brinkmann@gmail.com)\n * Copyright (c) 2022 libpd team\n *\n * For informat"
  },
  {
    "path": "libs/libpd/libpd_wrapper/x_libpdreceive.c",
    "chars": 2568,
    "preview": "/*\n * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)\n * Copyright (c) 2012-2021 libpd team\n *\n * For inf"
  },
  {
    "path": "libs/libpd/libpd_wrapper/x_libpdreceive.h",
    "chars": 704,
    "preview": "/*\n * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)\n * Copyright (c) 2012-2021 libpd team\n *\n * For inf"
  },
  {
    "path": "libs/libpd/libpd_wrapper/z_hooks.c",
    "chars": 787,
    "preview": "/*\n * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com)\n * Copyright (c) 2013-2021 libpd team\n *\n * For information o"
  },
  {
    "path": "libs/libpd/libpd_wrapper/z_hooks.h",
    "chars": 2080,
    "preview": "/*\n * Copyright (c) 2013 Dan Wilcox (danomatika@gmail.com)\n * Copyright (c) 2013-2021 libpd team\n *\n * For information o"
  },
  {
    "path": "libs/libpd/libpd_wrapper/z_libpd.c",
    "chars": 16574,
    "preview": "/*\n * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)\n * Copyright (c) 2012-2021 libpd team\n *\n * For inf"
  },
  {
    "path": "libs/libpd/libpd_wrapper/z_libpd.h",
    "chars": 24457,
    "preview": "/*\n * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)\n * Copyright (c) 2012-2021 libpd team\n *\n * For inf"
  },
  {
    "path": "libs/libpd/pure-data/extra/README.txt",
    "chars": 1275,
    "preview": "This is the README file for the \"extras\" library, which contains Pd objects\nwhich are too specialized or otherwise non-c"
  },
  {
    "path": "libs/libpd/pure-data/extra/bob~/README.txt",
    "chars": 1094,
    "preview": "The bob~ object.  BSD licensed; Copyright notice is in bob~ source code.\n\nImitates a Moog resonant filter by Runge-Kutte"
  },
  {
    "path": "libs/libpd/pure-data/extra/bob~/bob~.c",
    "chars": 8113,
    "preview": "/* bob~ - use a differential equation solver to imitate an analogue circuit */\n\n/* copyright 2015 Miller Puckette - BSD "
  },
  {
    "path": "libs/libpd/pure-data/extra/bonk~/bonk~.c",
    "chars": 55089,
    "preview": "/*\n ###########################################################################\n # bonk~ - a Max/MSP external\n # by mill"
  },
  {
    "path": "libs/libpd/pure-data/extra/bonk~/templates.txt",
    "chars": 312,
    "preview": " 10.47   9.65  14.95  23.77  28.32  38.84  53.21  41.20  31.25  21.70  16.48 \n  6.52  13.93  27.82  58.05  24.11  35.26 "
  },
  {
    "path": "libs/libpd/pure-data/extra/choice/choice.c",
    "chars": 3439,
    "preview": "/* choice -- match incoming list against a collection of stored templates. */\n\n/*  Copyright 1999 Miller Puckette.\nPermi"
  },
  {
    "path": "libs/libpd/pure-data/extra/fiddle~/fiddle~.c",
    "chars": 60893,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette and Ted Apel.\n* For information on usage and redistribution, and for a DISCLA"
  },
  {
    "path": "libs/libpd/pure-data/extra/loop~/loop~.c",
    "chars": 3855,
    "preview": "/* loop~ -- loop generator for sampling */\n\n/*  Copyright 1997-1999 Miller Puckette.\nPermission is granted to use this s"
  },
  {
    "path": "libs/libpd/pure-data/extra/lrshift~/lrshift~.c",
    "chars": 2024,
    "preview": "#include \"m_pd.h\"\n\n/* ------------------------ lrshift~ ----------------------------- */\n\nstatic t_class *lrshift_tilde_"
  },
  {
    "path": "libs/libpd/pure-data/extra/pd~/binarymsg.c",
    "chars": 1421,
    "preview": "#ifdef MAX\n#define A_PDFLOAT 1\n#define A_PDSYMBOL 2\n#define A_PDSEMI 4\n#else\n#define A_PDFLOAT A_FLOAT\n#define A_PDSYMBO"
  },
  {
    "path": "libs/libpd/pure-data/extra/pd~/notes.txt",
    "chars": 166,
    "preview": "pd -schedlib `pwd`/pdsched\n\ndolist:\npd~ to delay starting subproc until asked\nfigure out about setting nchannels from co"
  },
  {
    "path": "libs/libpd/pure-data/extra/pd~/pdsched.c",
    "chars": 4700,
    "preview": "/* Copyright 2008 Miller Puckette.  Berkeley license; see the\nfile LICENSE.txt in this distribution. */\n\n/* A plug-in sc"
  },
  {
    "path": "libs/libpd/pure-data/extra/pd~/pd~.c",
    "chars": 41886,
    "preview": "/*\n  pd~.c - embed a Pd process within Pd or Max.\n\n  Copyright 2008 Miller Puckette\n  BSD license; see README.txt in thi"
  },
  {
    "path": "libs/libpd/pure-data/extra/pique/pique.c",
    "chars": 9192,
    "preview": "/* Copyright (c) 1999 Miller Puckette.  The\ncontents of this file are free for any use, but BOTH THE AUTHOR AND UCSD\nDIS"
  },
  {
    "path": "libs/libpd/pure-data/extra/sigmund~/sigmund~.c",
    "chars": 63692,
    "preview": "/* Copyright (c) 2005 Miller Puckette.  BSD licensed.  No warranties. */\n\n/*\n    fix parameter settings\n    not to repor"
  },
  {
    "path": "libs/libpd/pure-data/extra/stdout/stdout.c",
    "chars": 4496,
    "preview": "/* stdout -- write messages to standard output.\n\n  Copyright 2008 Miller Puckette\n  BSD license; see README.txt in this "
  },
  {
    "path": "libs/libpd/pure-data/src/d_arithmetic.c",
    "chars": 35698,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_array.c",
    "chars": 25094,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/d_ctl.c",
    "chars": 23776,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_dac.c",
    "chars": 5898,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_delay.c",
    "chars": 11503,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_fft.c",
    "chars": 12571,
    "preview": "/* Copyright (c) 1997- Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIMER O"
  },
  {
    "path": "libs/libpd/pure-data/src/d_fft_fftsg.c",
    "chars": 94718,
    "preview": "/****************** begin Pd-specific prologue ***********************/\n\n/*\nThis is the file, \"fftsg.c\" from the OOURA F"
  },
  {
    "path": "libs/libpd/pure-data/src/d_filter.c",
    "chars": 32849,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_global.c",
    "chars": 11647,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_math.c",
    "chars": 18944,
    "preview": "/* Copyright (c) 1997-2001 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/d_misc.c",
    "chars": 6662,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_osc.c",
    "chars": 17414,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/d_resample.c",
    "chars": 5346,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/d_soundfile.c",
    "chars": 94199,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette. Updated 2019 Dan Wilcox.\n* For information on usage and redistribution, and "
  },
  {
    "path": "libs/libpd/pure-data/src/d_soundfile.h",
    "chars": 7081,
    "preview": "/* Copyright (c) 2019 Dan Wilcox.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIE"
  },
  {
    "path": "libs/libpd/pure-data/src/d_soundfile_aiff.c",
    "chars": 20543,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette. Updated 2020 Dan Wilcox.\n* For information on usage and redistribution, and "
  },
  {
    "path": "libs/libpd/pure-data/src/d_soundfile_caf.c",
    "chars": 14034,
    "preview": "/* Copyright (c) 2020 Dan Wilcox.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIE"
  },
  {
    "path": "libs/libpd/pure-data/src/d_soundfile_next.c",
    "chars": 9497,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette. Updated 2019 Dan Wilcox.\n* For information on usage and redistribution, and "
  },
  {
    "path": "libs/libpd/pure-data/src/d_soundfile_wave.c",
    "chars": 18117,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette. Updated 2019 Dan Wilcox.\n* For information on usage and redistribution, and "
  },
  {
    "path": "libs/libpd/pure-data/src/d_ugen.c",
    "chars": 47901,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_all_guis.c",
    "chars": 34001,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_all_guis.h",
    "chars": 12448,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_array.c",
    "chars": 41327,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_bang.c",
    "chars": 15556,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_canvas.c",
    "chars": 71419,
    "preview": "/* Copyright (c) 1997-2001 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/g_canvas.h",
    "chars": 28301,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_clone.c",
    "chars": 22922,
    "preview": "#include \"m_pd.h\"\n#include \"g_canvas.h\"\n#include \"m_imp.h\"\n#include <string.h>\n\n/* ---------- clone - maintain copies of"
  },
  {
    "path": "libs/libpd/pure-data/src/g_editor.c",
    "chars": 171602,
    "preview": "/* Copyright (c) 1997-2001 Miller Puckette and others.\n * For information on usage and redistribution, and for a DISCLAI"
  },
  {
    "path": "libs/libpd/pure-data/src/g_editor_extras.c",
    "chars": 21894,
    "preview": "/* Copyright (c) 2018 Miller Puckette, IOhannes m zmölnig and others.\n * For information on usage and redistribution, an"
  },
  {
    "path": "libs/libpd/pure-data/src/g_graph.c",
    "chars": 37328,
    "preview": "/* Copyright (c) 1997-2001 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/g_guiconnect.c",
    "chars": 2699,
    "preview": "/* Copyright (c) 1997-2000 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_io.c",
    "chars": 23951,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_mycanvas.c",
    "chars": 13146,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_numbox.c",
    "chars": 25934,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_radio.c",
    "chars": 24757,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_readwrite.c",
    "chars": 29789,
    "preview": "/* Copyright (c) 1997-2002 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/g_rtext.c",
    "chars": 27007,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_scalar.c",
    "chars": 19159,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_slider.c",
    "chars": 26542,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_template.c",
    "chars": 104815,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_text.c",
    "chars": 62335,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_toggle.c",
    "chars": 14877,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/g_traversal.c",
    "chars": 33933,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/g_undo.c",
    "chars": 13601,
    "preview": "#include \"m_pd.h\"\n#include \"g_canvas.h\"\n#include \"g_undo.h\"\n\n#if 0\n# define DEBUG_UNDO(x) startpost(\"[%s:%d] \", __FILE__"
  },
  {
    "path": "libs/libpd/pure-data/src/g_undo.h",
    "chars": 5785,
    "preview": "\n#ifndef __g_undo_h_\n#define __g_undo_h_\n\n/*\nInfinite undo by Ivica Ico Bukvic <ico@vt.edu> Dec. 2011\nModified for Pd-va"
  },
  {
    "path": "libs/libpd/pure-data/src/g_vumeter.c",
    "chars": 20955,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n"
  },
  {
    "path": "libs/libpd/pure-data/src/m_atom.c",
    "chars": 3818,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_binbuf.c",
    "chars": 54213,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_class.c",
    "chars": 37054,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_conf.c",
    "chars": 2529,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_glob.c",
    "chars": 8460,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_imp.h",
    "chars": 4500,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_memory.c",
    "chars": 1933,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_obj.c",
    "chars": 27376,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_pd.c",
    "chars": 8168,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_pd.h",
    "chars": 38410,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/m_private_utils.h",
    "chars": 3424,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/m_sched.c",
    "chars": 13545,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/s_audio.c",
    "chars": 28510,
    "preview": "/* Copyright (c) 2003, Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIMER O"
  },
  {
    "path": "libs/libpd/pure-data/src/s_audio_dummy.c",
    "chars": 711,
    "preview": "/*\n * Copyright (c) 2010 Peter Brinkmann (peter.brinkmann@gmail.com)\n *\n * For information on usage and redistribution, "
  },
  {
    "path": "libs/libpd/pure-data/src/s_inter.c",
    "chars": 58373,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/s_inter_gui.c",
    "chars": 11681,
    "preview": "/* Copyright (c) 2022 IOhannes m zmölnig.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n *"
  },
  {
    "path": "libs/libpd/pure-data/src/s_loader.c",
    "chars": 20509,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/s_main.c",
    "chars": 57101,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/s_net.c",
    "chars": 13174,
    "preview": "/* Copyright (c) 2019 Dan Wilcox.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIE"
  },
  {
    "path": "libs/libpd/pure-data/src/s_net.h",
    "chars": 5077,
    "preview": "/* Copyright (c) 2019 Dan Wilcox.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIE"
  },
  {
    "path": "libs/libpd/pure-data/src/s_path.c",
    "chars": 15405,
    "preview": "/* Copyright (c) 1999 Guenter Geiger and others.\n* For information on usage and redistribution, and for a DISCLAIMER OF "
  },
  {
    "path": "libs/libpd/pure-data/src/s_print.c",
    "chars": 7580,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/s_stuff.h",
    "chars": 15230,
    "preview": "#pragma once\n/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLA"
  },
  {
    "path": "libs/libpd/pure-data/src/s_utf8.c",
    "chars": 8366,
    "preview": "/*\n  Basic UTF-8 manipulation routines\n  by Jeff Bezanson\n  placed in the public domain Fall 2005\n\n  This code is design"
  },
  {
    "path": "libs/libpd/pure-data/src/s_utf8.h",
    "chars": 2304,
    "preview": "#ifndef S_UTF8_H\n#define S_UTF8_H\n\n#include \"m_pd.h\"\n\n#ifndef UCS4\n# define UCS4 uint32_t\n#endif\n\n/* UTF8_SUPPORT_FULL_U"
  },
  {
    "path": "libs/libpd/pure-data/src/x_acoustics.c",
    "chars": 4124,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_arithmetic.c",
    "chars": 26081,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_array.c",
    "chars": 30840,
    "preview": "/* Copyright (c) 1997-2013 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/x_connective.c",
    "chars": 44433,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_file.c",
    "chars": 60145,
    "preview": "/* Copyright (c) 2021 IOhannes m zmölnig.\n * For information on usage and redistribution, and for a DISCLAIMER OF ALL\n *"
  },
  {
    "path": "libs/libpd/pure-data/src/x_gui.c",
    "chars": 15620,
    "preview": "/* Copyright (c) 1997-2000 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_interface.c",
    "chars": 5412,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_list.c",
    "chars": 25520,
    "preview": "/* Copyright (c) 1997- Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIMER O"
  },
  {
    "path": "libs/libpd/pure-data/src/x_midi.c",
    "chars": 33831,
    "preview": "/* Copyright (c) 1997-2001 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/x_misc.c",
    "chars": 24766,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_net.c",
    "chars": 30024,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_scalar.c",
    "chars": 6417,
    "preview": "/* Copyright (c) 1997-2013 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/x_text.c",
    "chars": 76817,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette and others.\n* For information on usage and redistribution, and for a DISCLAIM"
  },
  {
    "path": "libs/libpd/pure-data/src/x_time.c",
    "chars": 18336,
    "preview": "/* Copyright (c) 1997-1999 Miller Puckette.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n*"
  },
  {
    "path": "libs/libpd/pure-data/src/x_vexp.c",
    "chars": 92987,
    "preview": "/* Copyright (c) IRCAM.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIES, see the"
  },
  {
    "path": "libs/libpd/pure-data/src/x_vexp.h",
    "chars": 11262,
    "preview": "/* Copyright (c) IRCAM.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIES, see the"
  },
  {
    "path": "libs/libpd/pure-data/src/x_vexp_fun.c",
    "chars": 56420,
    "preview": "/* Copyright (c) IRCAM.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIES, see the"
  },
  {
    "path": "libs/libpd/pure-data/src/x_vexp_if.c",
    "chars": 42816,
    "preview": "/* Copyright (c) IRCAM.\n* For information on usage and redistribution, and for a DISCLAIMER OF ALL\n* WARRANTIES, see the"
  },
  {
    "path": "pdExample/addons.make",
    "chars": 6,
    "preview": "ofxPd\n"
  },
  {
    "path": "pdExample/bin/data/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "pdExample/bin/data/pd/abs/test_abs.pd",
    "chars": 211,
    "preview": "#N canvas 80 290 336 208 10;\n#X text 14 32 this is a test abstraction ... does it load?;\n#X obj 37 85 inlet;\n#X obj 37 1"
  },
  {
    "path": "pdExample/bin/data/pd/instance.pd",
    "chars": 507,
    "preview": "#N canvas 0 22 364 323 10;\n#X obj 39 45 r \\$0-instance;\n#X obj 175 294 print PD;\n#X obj 244 179 \\$0;\n#X obj 39 120 rando"
  },
  {
    "path": "pdExample/bin/data/pd/test.pd",
    "chars": 7917,
    "preview": "#N canvas 486 364 409 355 10;\n#X obj 272 270 dac~;\n#N canvas 369 98 675 256 test 0;\n#N canvas 0 22 450 300 (subpatch) 0;"
  },
  {
    "path": "pdExample/src/main.cpp",
    "chars": 493,
    "preview": "/*\n * Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdExample/src/ofApp.cpp",
    "chars": 12799,
    "preview": "/*\n * Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdExample/src/ofApp.h",
    "chars": 1884,
    "preview": "/*\n * Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdExampleIOS/addons.make",
    "chars": 6,
    "preview": "ofxPd\n"
  },
  {
    "path": "pdExampleIOS/bin/data/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "pdExampleIOS/bin/data/pd/abs/test_abs.pd",
    "chars": 211,
    "preview": "#N canvas 80 290 336 208 10;\n#X text 14 32 this is a test abstraction ... does it load?;\n#X obj 37 85 inlet;\n#X obj 37 1"
  },
  {
    "path": "pdExampleIOS/bin/data/pd/instance.pd",
    "chars": 507,
    "preview": "#N canvas 0 22 364 323 10;\n#X obj 39 45 r \\$0-instance;\n#X obj 175 294 print PD;\n#X obj 244 179 \\$0;\n#X obj 39 120 rando"
  },
  {
    "path": "pdExampleIOS/bin/data/pd/test.pd",
    "chars": 8142,
    "preview": "#N canvas 711 355 409 355 10;\n#X obj 272 270 dac~;\n#N canvas 369 98 675 256 test 0;\n#N canvas 0 22 450 300 (subpatch) 0;"
  },
  {
    "path": "pdExampleIOS/src/main.mm",
    "chars": 1955,
    "preview": "/*\n * Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdExampleIOS/src/ofApp.h",
    "chars": 2483,
    "preview": "/*\n * Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdExampleIOS/src/ofApp.mm",
    "chars": 16024,
    "preview": "/*\n * Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdMultiExample/addons.make",
    "chars": 6,
    "preview": "ofxPd\n"
  },
  {
    "path": "pdMultiExample/bin/data/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "pdMultiExample/bin/data/test.pd",
    "chars": 520,
    "preview": "#N canvas 406 290 351 173 10;\n#X obj 39 35 loadbang;\n#X obj 143 114 dac~;\n#X obj 39 88 f 0;\n#X obj 70 88 + 1;\n#X obj 143"
  },
  {
    "path": "pdMultiExample/src/main.cpp",
    "chars": 493,
    "preview": "/*\n * Copyright (c) 2015 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdMultiExample/src/ofApp.cpp",
    "chars": 4495,
    "preview": "/*\n * Copyright (c) 2015 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pdMultiExample/src/ofApp.h",
    "chars": 1624,
    "preview": "/*\n * Copyright (c) 2015 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usage and"
  },
  {
    "path": "pitchShifter/LICENSE.txt",
    "chars": 35148,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "pitchShifter/README.md",
    "chars": 1318,
    "preview": "PitchShifter\n============\n\n![image](https://raw.github.com/danomatika/ofxPd/master/examplePitchShifter/screenshot.png)\n\n"
  },
  {
    "path": "pitchShifter/addons.make",
    "chars": 6,
    "preview": "ofxPd\n"
  },
  {
    "path": "pitchShifter/bin/data/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "pitchShifter/bin/data/pd/_main.pd",
    "chars": 1601,
    "preview": "#N canvas 590 417 508 403 10;\n#X declare -path rc;\n#X obj 29 25 adc~ 1;\n#X obj 28 338 dac~ 1 2;\n#X obj 326 18 declare -p"
  },
  {
    "path": "pitchShifter/bin/data/pd/rc/e_pshift~-help.pd",
    "chars": 1568,
    "preview": "#N canvas 1295 97 584 398 10;\n#X text 305 337 danomatika.com | robotcowboy.com;\n#X text 306 352 https://github.com/danom"
  },
  {
    "path": "pitchShifter/bin/data/pd/rc/e_pshift~.pd",
    "chars": 4791,
    "preview": "#N canvas 590 926 392 188 10;\n#X obj 20 20 inlet~;\n#X obj 20 149 outlet~;\n#X obj 50 54 delwrite~ \\$0-del 5000;\n#X text 1"
  },
  {
    "path": "pitchShifter/bin/data/pd/rc/u_spigot~-help.pd",
    "chars": 632,
    "preview": "#N canvas 696 405 404 250 10;\n#X obj 112 114 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0\n1;\n#X obj 61 54 osc~ 4"
  },
  {
    "path": "pitchShifter/bin/data/pd/rc/u_spigot~.pd",
    "chars": 690,
    "preview": "#N canvas 0 22 489 282 10;\n#X text 214 224 danomatika.com | robotcowboy.com;\n#X text 215 239 https://github.com/danomati"
  },
  {
    "path": "pitchShifter/src/main.cpp",
    "chars": 1048,
    "preview": "/*\n * Copyright (c) 2012 Dan Wilcox <danomatika@gmail.com>\n * for Golan Levin & the CMU Studio for Creative Inquiry\n *\n "
  },
  {
    "path": "pitchShifter/src/ofApp.cpp",
    "chars": 4439,
    "preview": "/*\n * Copyright (c) 2012 Dan Wilcox <danomatika@gmail.com>\n * for Golan Levin & the CMU Studio for Creative Inquiry\n *\n "
  },
  {
    "path": "pitchShifter/src/ofApp.h",
    "chars": 1516,
    "preview": "/*\n * Copyright (c) 2012 Dan Wilcox <danomatika@gmail.com>\n * for Golan Levin & the CMU Studio for Creative Inquiry\n *\n "
  },
  {
    "path": "pitchShifter/src/ofxSimpleSlider.cpp",
    "chars": 5527,
    "preview": "/*\n *  ofxSimpleSlider.cpp\n *  Created by Golan Levin on 2/24/12.\n *  Updated by Dan Wilcox 2012.\n */\n#include \"ofxSimpl"
  },
  {
    "path": "pitchShifter/src/ofxSimpleSlider.h",
    "chars": 1226,
    "preview": "/*\n *  ofxSimpleSlider.h\n *  Created by Golan Levin on 2/24/12.\n *  Updated by Dan Wilcox 2012.\n */\n#pragma once\n\n#inclu"
  },
  {
    "path": "scripts/update_libpd.sh",
    "chars": 1959,
    "preview": "#! /bin/sh\n\n# exit on error\nset -e\n\nVER=master\nSRC=libpd\nDEST=../libs/libpd\n\n###\n\ncd \"$(dirname $0)\"\n\n# get source\ngit c"
  },
  {
    "path": "src/ofxPd.cpp",
    "chars": 24838,
    "preview": "/*\n * Copyright (c) 2011-2022 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usag"
  },
  {
    "path": "src/ofxPd.h",
    "chars": 17119,
    "preview": "/*\n * Copyright (c) 2011-2022 Dan Wilcox <danomatika@gmail.com>\n *\n * BSD Simplified License.\n * For information on usag"
  }
]

About this extraction

This page contains the full source code of the danomatika/ofxPd GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 171 files (2.9 MB), approximately 777.8k tokens, and a symbol index with 4033 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!