Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jwilkes/purr-data
  • aggraef/purr-data
  • samthursfield/purr-data
  • prakhar/purr-data
  • yadu05/purr-data
  • NegiAkash890/purr-data
  • prateekpardeshi/purr-data
  • Shruti3004/purr-data
  • hidimpu/purr-data
  • Atseosi/purr-data
  • piyushjasaiwal/purr-data
  • deveshprasad/purr-data
  • skm_7/purr-data
  • sankt/purr-data
  • ashim_tom/purr-data
  • dineshsoni02/purr-data
  • chaitanya1-coder/purr-data
  • Nitish0007/purr-data
  • nitin/purr-data
  • shuvam09/purr-data
  • gabrielabittencourt/purr-data
  • sivasai/purr-data
  • flachyjoe/purr-data
  • ishankaler/purr-data
  • prateek/purr-data
  • RukshanJS/purr-data
  • rajatshrm648/purr-data
  • Srashti/purr-data
  • Paarth/purr-data
  • AniruddhaGawali/purr-data
  • brittneyjuliet/purr-data
  • prakharagarwal1/purr-data
  • Shreyanshpaliwalcmsmn/purr-data
  • k_amrut/purr-data
  • AyushAnand/purr-data
  • Va16hav07/purr-data
36 results
Show changes
Commits on Source (4886)
Showing
with 4562 additions and 1228 deletions
name: Makefile CI
on:
push:
branches: [ master, release, testing ]
tags: [ '*' ]
pull_request:
branches: [ master ]
jobs:
macos-build:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: install dependencies
run: |
brew install automake
brew install fftw
brew install fluidsynth
brew install faac
brew install jpeg
brew install speex
brew install gsl
brew install libquicktime
brew install sdl2
pip3 install markdown
- name: version
run: |
echo "version=$(git describe --tags)" >> $GITHUB_ENV
- name: make
run: |
echo version: $version
make V=0
- name: check
run: make check
- name: upload
uses: actions/upload-artifact@v3
with:
name: purr-data-${{ env.version }}-macos-x86_64
path: Purr-Data-*.dmg
retention-days: 2
ubuntu-build:
runs-on: ubuntu-latest
env:
DEBEMAIL: "Albert Graef <aggraef@gmail.com>"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: install dependencies
run: |
# dance around Azure connectivity issues
sudo apt-get update && sudo apt-get -o Acquire::Retries=3 install -q -y debhelper devscripts autoconf automake libtool pkg-config bison flex libgtk2.0-dev libgtk-3-dev dh-python ladspa-sdk libasound2-dev libjack-dev libbluetooth-dev libcairo2-dev libgl-dev libglew-dev libgsl-dev libmagick++-dev libavifile-0.7-dev libdc1394-dev libfftw3-dev libfluidsynth-dev libftgl-dev libgsm1-dev libjpeg-dev libmp3lame-dev libmpeg3-dev libquicktime-dev libraw1394-dev libsmpeg-dev libspeex-dev libstk-dev libtiff5-dev libv4l-dev libdv4-dev libiec61883-dev libxv-dev libxxf86vm-dev libvorbis-dev zlib1g-dev rsync libgconf2-dev libnss3-dev libxtst-dev libxss-dev
pip install markdown
- name: version
run: |
echo "version=$(git describe --tags)" >> $GITHUB_ENV
- name: make
run: |
echo version: $version
cd debuild
make debchange
make deb-us
- name: check
run: echo handled by debuild
- name: upload
uses: actions/upload-artifact@v3
with:
name: purr-data-${{ env.version }}-ubuntu-x86_64
path: debuild/purr-data*.deb
retention-days: 2
windows-build:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
env:
CC: gcc
CXX: g++
steps:
- uses: msys2/setup-msys2@v2
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: install innosetup
run: |
wget https://jrsoftware.org/download.php/is.exe -O innosetup.exe
./innosetup.exe //SILENT //CURRENTUSER
- name: install dependencies
run: |
pacman --noconfirm --disable-download-timeout -S autoconf automake git libtool make mingw-w64-x86_64-dlfcn mingw-w64-x86_64-fftw mingw-w64-x86_64-fluidsynth mingw-w64-x86_64-SDL2 mingw-w64-x86_64-ftgl mingw-w64-x86_64-fribidi mingw-w64-x86_64-ladspa-sdk mingw-w64-x86_64-lame mingw-w64-x86_64-libsndfile mingw-w64-x86_64-libvorbis mingw-w64-x86_64-lua mingw-w64-x86_64-toolchain mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-speex mingw-w64-x86_64-python mingw-w64-x86_64-python-markdown rsync unzip wget
- name: version
run: |
echo "version=$(git describe --tags)" >> $GITHUB_ENV
- name: make
run: |
echo version: $version
echo UNAME: `uname -s`
make V=0
- name: check
run: make check
- name: upload
uses: actions/upload-artifact@v3
with:
name: purr-data-${{ env.version }}-mingw-x86_64
path: Purr-Data-*.exe
retention-days: 2
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [macos-build, ubuntu-build, windows-build]
steps:
- uses: actions/download-artifact@v3
- name: ziptie
run: |
mkdir dist
for x in purr-data-*; do (cd $x && zip -r ../dist/$x.zip *); done
- name: release
uses: softprops/action-gh-release@v1
with:
prerelease: true
draft: true
files: dist/*.zip
......@@ -4,12 +4,7 @@
*diff
TAGS
autom4te.cache
Makefile
Makefile.in
GNUmakefile
GNUmakefile.in
aclocal.m4
configure
config.log
config.status
libtool
......@@ -24,11 +19,22 @@ m4/config
*.d_fat
*.d_fat_o
po/*.msg
bin
src/pd
src/pd-watchdog
src/pdreceive
src/pdsend
ASIOSDK2
pd-0.*
pd.pc
*.deps
*.d
*.d.*
*_stamp
*.a
.svn
packages/linux_make/build/
pd/src/makefile
pd/src/config.h
pd/src/s_version.h
pd/nw/nw/
l2ork_addons/cwiid/defs.mak
CVS
.DS_Store
*.dmg
.vscode/
\ No newline at end of file
# This file creates automated tests on GitLab CI for Purr Data.
# See https://docs.gitlab.com/ee/ci/yaml/README.html for details of the format.
# These are script snippets used in the jobs defined below.
.debian_image_preparation: &debian_image_preparation
- echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y upgrade > /dev/null
.build_all: &build_all
- echo -e "section_start:`date +%s`:build_all\r\e[0KBuilding Purr Data"
- cd l2ork_addons
- export V=0
- ./tar_em_up.sh $BUILD_TYPE_FLAG
- cd ..
- echo -e "section_end:`date +%s`:build_all\r\e[0K"
.test_linux: &test_linux
- echo -e "section_start:`date +%s`:test_linux\r\e[0KTesting Purr Data for Linux"
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive dpkg --force-all -i pd-l2ork*.deb > /dev/null
- valgrind pd-l2ork -noprefs -nogui -nrt -noaudio -send "init dollarzero \$0" scripts/regression_tests.pd
- valgrind pd-l2ork -noprefs -nostdpath -nogui -nrt -noaudio scripts/external-tests.pd
- echo -e "section_end:`date +%s`:text_linux\r\e[0K"
.test_osx: &test_osx
- echo -e "section_start:`date +%s`:test_osx\r\e[0KTesting Purr Data for Mac OSX"
- cd scripts
- ../packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork -noprefs -nogui -noaudio -send "init dollarzero \$0" regression_tests.pd
- ../packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork -noprefs -nostdpath -nogui -noaudio external-tests.pd
- echo -e "section_end:`date +%s`:text_osx\r\e[0K"
.test_windows: &test_windows
- echo -e "section_start:`date +%s`:test_windows\r\e[0KTesting Purr Data for Windows"
- cd scripts
- ../packages/win64_inno/build/bin/pd.com -noprefs -nogui -noaudio -send "init dollarzero \$0" regression_tests.pd
- ../packages/win64_inno/build/bin/pd.com -noprefs -nostdpath -nogui -noaudio external-tests.pd
- echo -e "section_end:`date +%s`:text_windows\r\e[0K"
debian_stretch_x86_64_deb:
tags:
- debian
- stretch
- x86_64
variables:
BUILD_TYPE_FLAG: -B
before_script:
- *debian_image_preparation
script:
- *build_all
- *test_linux
artifacts:
name: "$CI_RUNNER_DESCRIPTION"
expire_in: 1 day
paths:
- pd*.deb
ubuntu_16.04_x86_64_deb:
tags:
- ubuntu
- v16.04
- x86_64
variables:
BUILD_TYPE_FLAG: -B
before_script:
- *debian_image_preparation
script:
- *build_all
- *test_linux
artifacts:
name: "$CI_RUNNER_DESCRIPTION"
expire_in: 1 day
paths:
- pd*.deb
osx_10.11_x86_64_dmg:
tags:
- osx
- v10.11
- dmg
variables:
BUILD_TYPE_FLAG: -X
script:
- echo `pwd`
- *build_all
- *test_osx
artifacts:
name: "$CI_RUNNER_DESCRIPTION"
expire_in: 1 day
paths:
- Purr*.dmg
osx_10.8_x86_64_dmg:
tags:
- osx
- v10.8
- dmg
variables:
BUILD_TYPE_FLAG: -X
osx_version: "10.8"
script:
- echo `pwd`
- *build_all
- *test_osx
artifacts:
name: "$CI_RUNNER_DESCRIPTION"
expire_in: 1 day
paths:
- Purr*.dmg
windows_x86_64_innosetup:
tags:
- windows
- x86_64
variables:
BUILD_TYPE_FLAG: -Z
script:
- echo `pwd`
- *build_all
- *test_windows
artifacts:
name: "$CI_RUNNER_DESCRIPTION"
expire_in: 1 day
paths:
- Purr*.exe
raspbian_stretch_armv7l_deb:
tags:
- raspbian
- arm
- stretch
variables:
BUILD_TYPE_FLAG: -r
before_script:
- *debian_image_preparation
script:
- echo `pwd`
- *build_all
- *test_linux
artifacts:
name: "$CI_RUNNER_DESCRIPTION"
expire_in: 1 day
paths:
- pd*.deb
[submodule "l2ork_addons/rtcmix-in-pd"]
path = externals/rtcmix-in-pd
url = https://github.com/jwmatthys/rtcmix-in-pd.git
[submodule "l2ork_addons/cwiid"]
path = externals/disis/cwiid
url = https://github.com/pd-l2ork/cwiid
[submodule "Gem"]
path = Gem
url = https://github.com/agraef/Gem.git
[submodule "l2ork_addons/raspberry_pi/disis_gpio/wiringPi"]
path = l2ork_addons/raspberry_pi/disis_gpio/wiringPi
url = https://git.purrdata.net/jwilkes/wiringPi.git
[submodule "externals/pd-lua"]
path = externals/pd-lua
url = https://github.com/agraef/pd-lua.git
Subproject commit 305f6a6a0866222c1316bc4b51cb7aed35e9e4a7
Subproject commit 0d5f10cc9166ce8971c6fde32fa0d2d47ab33fa0
This diff is collapsed.
This diff is collapsed.
# Toplevel Makefile for Purr Data. Please note that at present this is just a
# thin wrapper around l2ork_addons/tar_em_up.sh, the traditional Pd-l2ork
# build script.
# The Pd-l2ork build system is very arcane and intricate. Its main purpose is
# putting together a staging area with a complete Pd-l2ork installation and
# then building installers for the supported platforms from that, pulling
# together a bunch of separate packages, each with their own build system.
# Compiling sources is just one of the tasks that the builder does. Therefore
# you'll notice that, unlike with other less complicated source packages,
# `make` will rebuild lots of things even if you just finished another build.
# The available build targets are:
# all: produce a native installer for the host platform (equivalent to
# `tar_em_up.sh -Tk`); note that in order to force a complete rebuild (like
# what `tar_em_up.sh -T` does), you'll have to run `make clean` first
# incremental: like `all`, but does an "incremental build" (equivalent to
# `tar_em_up.sh -tk`), bypassing Gem which takes an eternity to compile; please
# check the tar_em_up.sh script for details
# light: like `incremental`, but does a light build (equivalent to
# `tar_em_up.sh -tkl`) which only includes the most essential externals;
# please check the tar_em_up.sh script for details
# checkout: convenience target to check out all submodules in preparation for
# a subsequent build (the `all`, `incremental` and `dist` targets also do this
# automatically when needed)
# clean: does something similar to what `tar_em_up.sh` does in order to start
# from a clean slate, so that a subsequent build starts from scratch again
# realclean: put the sources into pristine state again (WARNING: this will get
# rid of any uncommitted source changes, too); use this as a last resort to
# get the sources into a compilable state again after things have gone awry
# dist: create a self-contained distribution tarball of the source
# NOTES:
# The realclean and dist targets use git commands and thus only work in a
# working copy of the git repo, not in the static tarball snapshots produced
# by the dist target.
# On Linux systems running `make` will try to produce a Debian package. On
# Linux distributions like Arch which are no Debian derivatives, the Debian
# packaging tools are not available. In this case, `make` will stop right
# before creating the actual package and leave the ready-made staged
# installation tree under `packages/linux_make/build` from where it can be
# copied or packaged up in any desired way.
# The incremental and light builds assume an existing staging area
# (packages/*/build directory) which is *not* cleaned before installing. This
# makes it possible to update the existing staging area after recompiling just
# a part of the system (all but Gem in the case of "incremental", only the
# Pd core and a few essential externals in the case of "light"). Use `make
# clean` beforehand if you want to install into a clean staging area.
# When doing a `light` build, which only includes the most essential
# externals, it may be desirable to manually include additional abstractions
# and externals in the build. To these ends, after running `make light` you
# can run `make` with the `foo_abs` or `foo_ext` target, where `foo` is the
# name of the desired abstraction or external, respectively. E.g., you can run
# `make light memento_abs pdlua_ext` to get a light build with the `memento`
# abstraction and the `pdlua` external included. (This will not rebuild the
# Debian package, though, so you'll have to install manually with `make
# install` instead.) The names of the desired addons must be specified as
# given in abstractions/Makefile and externals/Makefile, respectively (look
# for targets looking like `foo_install`). Also note that even though a
# subsequent `make install` will then include your addons, they won't be
# enabled by default, so you'll have to do that manually in Purr Data's
# `Startup` dialog. Simply adding the name of the addon in the `Libraries`
# list should normally do the trick. Or you can add an option like `-lib foo`
# when running Purr Data from the command line.
.PHONY: all incremental checkout clean realclean dist
# Target platform (OSX/macOS only): On Mojave (10.14 with Xcode 10) this needs
# to be at least 10.9, which is the default now. With older Xcode versions you
# can try earlier versions (>= 10.4) if you need to compile for legacy OSX
# versions.
export macos_target = 10.9
# Installation prefix under which Pd-l2ork is installed (Linux only). If this
# isn't set, a default location will be used (usually /usr/local). NOTE: We
# *always* assume that this variable is set properly in the install targets,
# as well as the (Linux) check target (see below).
prefix = /usr
ifneq ($(prefix),)
env = inst_dir="$(prefix)"
endif
install_vars = DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix)
# You can set the nwjsver variable to indicate the nw.js version to build
# against. This will also clear out any cached nw.js binaries beforehand.
# Note that some nw.js versions for certain platforms have to be hard-coded,
# so the nwjsver variable won't affect these, but it will still cause the
# cache to be cleared and the binaries to be downloaded. See the tar_em_up.sh
# script for details.
ifneq ($(nwjsver),)
env += nwjsver="$(nwjsver)"
endif
# You can set CFLAGS to whatever special compile options are needed. E.g., to
# build the double precision version: CFLAGS = -DPD_FLOATSIZE=64
CFLAGS =
export CFLAGS
# For the light build only, you can add externals to be included in the build.
addons =
export addons
# You can also set this variable to specify externals NOT to be built. E.g.,
# to prevent building Gem (which takes an eternity to build): blacklist = gem
blacklist =
export blacklist
all:
cd l2ork_addons && $(env) ./tar_em_up.sh -Tk
incremental:
cd l2ork_addons && $(env) ./tar_em_up.sh -tk
light:
cd l2ork_addons && $(env) ./tar_em_up.sh -tkl
# Convenience targets to build the double precision version.
# Blacklist of externals which don't work with double precision yet.
double_blacklist = autotune smlib
# These are dubious, passing float* for t_float* pointers, and so are most
# likely broken, even though they compile with double precision.
double_blacklist += cyclone lyonpotpourri
all-double:
cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -Tk
incremental-double:
cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -tk
light-double:
cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -tkl
%_abs:
make -C abstractions $(@:%_abs=%) $(@:%_abs=%_install) $(install_vars)
%_ext:
make -C externals $(@:%_ext=%) $(@:%_ext=%_install) $(install_vars)
checkout:
git submodule update --init --recursive
clean:
test "$(shell uname -s)" = "Darwin" && make -C packages/darwin_app clean || true
cd pd/src && aclocal && autoconf && make clean || true
cd externals/miXed && make clean || true
cd Gem/src/ && test -f Makefile && make distclean || true
cd Gem/src/ && rm -rf ./.libs && rm -rf ./*/.libs || true
cd Gem/ && test -f Makefile && make distclean || true
cd Gem/ && rm -f gemglutwindow.pd_linux Gem.pd_linux || true
rm -rf packages/*/build/
realclean:
# This requires a working copy of the git repo.
@test -d .git || (echo "Not a git repository, bailing out." && false)
git submodule deinit --all -f
git checkout .
git clean -dffx -e pd/nw/nw/
# Check targets. These run the regression tests in scripts.
# Requires a full build.
os = $(shell uname|sed 's/^\(MINGW[0-9]*\)_NT.*/\1/')
ifeq ($(os),Linux)
# Linux (all flavors)
pdprog = packages/linux_make/build$(prefix)/bin/pd-l2ork
else ifeq ($(os),Darwin)
# Mac
pdprog = packages/darwin_app/build/*.app/Contents/Resources/app.nw/bin/pd-l2ork
else ifeq ($(os),MINGW64)
# Msys2 mingw64
pdprog = packages/win64_inno/build/bin/pd.exe
else ifeq ($(os),MINGW32)
# Msys2 mingw32
pdprog = packages/win32_inno/build/bin/pd.exe
endif
ifneq ($(pdprog),)
# This runs just a quick regression test, useful to see whether the program
# works at all.
check1:
$(pdprog) -noprefs -nogui -noaudio -send 'init dollarzero $$0' scripts/regression_tests.pd
# This runs the full test suite, including the test of the externals.
check:
$(pdprog) -noprefs -nogui -noaudio -send 'init dollarzero $$0' scripts/regression_tests.pd
$(pdprog) -noprefs -nostdpath -nogui -noaudio scripts/external-tests.pd
else
check1 check:
@echo "Target $(os) not recognized, can't run 'make $@'!"; false
endif
# Installation targets. These don't work on Mac and Windows right now, you
# should use the generated installers on these systems instead. Also,
# $(prefix) must be set. $(DESTDIR) is supported as well, so you can do staged
# installs (but then again presumably you already have a staged install
# sitting in packages/*/build, so you might as well use that instead).
# Note that these targets simply (un)install whatever is in the
# packages/*/build directory at the time they're invoked. If no build
# directory is present then nothing will happen, so you need to run `make` (or
# `make incremental`, etc.) before running these targets. Also note that some
# old cruft under build/etc (all but the bash auto-completions) isn't
# installed as it isn't needed on modern Linux systems any more.
builddir = $(firstword $(wildcard packages/*/build))
ifneq ($(builddir),)
manifest = etc/bash_completion.d/pd-l2ork $(prefix:/%=%)/include/pd-l2ork $(prefix:/%=%)/lib/pd-l2ork $(patsubst $(builddir)/%,%, $(wildcard $(builddir)/$(prefix:/%=%)/bin/*) $(shell find $(builddir)/usr/share -type f))
endif
ifneq ($(manifest),)
install:
test -z "$(DESTDIR)" || (rm -rf "$(DESTDIR)" && mkdir -p "$(DESTDIR)")
tar -c -C $(builddir) $(manifest) | tar -x -C $(DESTDIR)/
# Edit the library paths in the default user.settings file so that it matches
# our installation prefix.
test -f "$(DESTDIR)"$(prefix)/lib/pd-l2ork/default.settings && cd "$(DESTDIR)"$(prefix)/lib/pd-l2ork && sed -e "s!/usr/lib/pd-l2ork!$(prefix)/lib/pd-l2ork!g" -i default.settings || true
uninstall:
rm -rf $(addprefix $(DESTDIR)/, $(manifest))
else
install:
@echo "no build directory, run make first" && false
uninstall:
@echo "no build directory, run make first" && false
endif
# Build a self-contained distribution tarball (snapshot). This is pretty much
# the same as in debuild/Makefile and must be run in a working copy of the git
# repo.
# The Debian version gets derived from the date and serial number of the last
# commit.
debversion = $(shell grep PD_L2ORK_VERSION pd/src/m_pd.h | sed 's|^.define *PD_L2ORK_VERSION *"\(.*\)".*|\1|')+git$(shell test -d .git && git rev-list --count HEAD)+$(shell test -d .git && git rev-parse --short HEAD)
# Source tarball and folder.
debsrc = purr-data_$(debversion).orig.tar.gz
debdist = purr-data-$(debversion)
# Submodules (Gem, etc.).
submodules = $(sort $(shell test -d .git && (git config --file .gitmodules --get-regexp path | awk '{ print $$2 }')))
dist: $(debsrc)
# Determine the version number of this build. We get this from m_pd.h.
PD_L2ORK_VERSION := $(shell grep PD_L2ORK_VERSION pd/src/m_pd.h | sed 's|^.define *PD_L2ORK_VERSION *"\(.*\)".*|\1|')
# Determine the build version which needs git to be computed, so we can't do
# it in a stand-alone build from a tarball.
PD_BUILD_VERSION := $(shell test -d .git && (git log -1 --format=%cd --date=short | sed -e 's/-//g'))-rev.$(shell test -d .git && git rev-parse --short HEAD)
$(debsrc):
@test -d .git || (echo "Not a git repository, bailing out." && false)
rm -rf $(debdist)
# Make sure that the submodules are initialized.
git submodule update --init
# Grab the main source.
git archive --format=tar.gz --prefix=$(debdist)/ HEAD | tar xfz -
# Grab the submodules.
for x in $(submodules); do (cd $(debdist) && rm -rf $$x && git -C ../$$x archive --format=tar.gz --prefix=$$x/ HEAD | tar xfz -); done
# Pre-generate and put s_version.h into the tarball (see above; the build
# version is generated using git which can't be done outside the git repo).
sed 's|^\(#define PD_BUILD_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|' pd/src/s_version.h.in > $(debdist)/pd/src/s_version.h
# Pre-generate the markdown and html docs so that they will be included in the
# source. This means that we don't need any special tools as a build
# dependency, which makes live a lot easier.
make -C packages/gendoc version="$(PD_L2ORK_VERSION)" build_version="$(PD_BUILD_VERSION)"
mv packages/gendoc/{ReadMe,Welcome}-*.{md,html} $(debdist)/packages/gendoc
make -C packages/gendoc clean
# Create the source tarball.
tar cfz $(debsrc) $(debdist)
rm -rf $(debdist)
This diff is collapsed.
#==============================================================================#
#
# Centralized build system for "abstractions".
#
# see for instructions: http://puredata.org/docs/developer/build
# <hans@at.or.at>
#
#==============================================================================#
CWD := $(shell pwd)
# these are designed to be overridden by the packages/Makefile
cvs_root_dir := $(shell cd $(CWD)/.. && pwd)
DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(cvs_root_dir)/packages
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
#==============================================================================#
#
# OVERARCHING BUILD TARGETS
#
#==============================================================================#
# if your library isn't included in LIB_TARGETS, it won't be built with
# Pd-extended.
#
# WARNING! this MUST be all on one line because the automatic package
# building scripts rely on it being that way.
LIB_TARGETS = controctopus jmmmp la-kitchen list-abs memento nsend parazit pixeltango purepd rradical rtc-lib timestretch memento-p sfruit pd-wavelet
# in case anything needs to be compiled or processed somehow before installing
all:
# clean up after everything is installed
final_setup:
chmod -R ugo-w $(pddocdir)
install: all $(objectsdir) $(helpdir) $(manualsdir) $(examplesdir) \
$(patsubst %, %_install,$(LIB_TARGETS))
@echo " "
@echo "abstractions install succeeded!"
#==============================================================================#
#
# PROJECT TARGETS
#
#==============================================================================#
#-------------------------------------------------------------------------------
# controctopus
CONTROCTOPUS_NAME = controctopus
controctopus_install:
install -d $(DESTDIR)$(objectsdir)/$(CONTROCTOPUS_NAME)
install -p $(abstractions_src)/sfruit/controctopus/*.pd \
$(DESTDIR)$(objectsdir)/$(CONTROCTOPUS_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(CONTROCTOPUS_NAME) \
--author "Luke Iannini" \
--license "GNU GPL" \
--description "objects for learning and mapping midi and OSC controllers to pdpatches with scaling and parameter discovery - requires memento-p"
#-------------------------------------------------------------------------------
# ds-abs
ds-abs_NAME = ds-abs
ds-abs_install:
install -d $(DESTDIR)$(objectsdir)/$(ds-abs_NAME)
install -p $(abstractions_src)/sfruit/ds-abs/*.pd $(DESTDIR)$(objectsdir)/$(ds-abs_NAME)
install -p $(abstractions_src)/sfruit/ds-abs/help/*-help.pd \
$(DESTDIR)$(objectsdir)/$(ds-abs_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(ds-abs_NAME) \
--author "Luke Iannini" \
--description "" \
--license "GNU GPL" \
--version "a comprehensive collection of objects for working with data structures"
#------------------------------------------------------------------------------#
# JMMMP
JMMMP_NAME = jmmmp
jmmmp_install:
install -d $(DESTDIR)$(objectsdir)/$(JMMMP_NAME)
install -d $(DESTDIR)$(objectsdir)/$(JMMMP_NAME)/examples
install -p $(abstractions_src)/$(JMMMP_NAME)/*.* $(DESTDIR)$(objectsdir)/$(JMMMP_NAME)
install -p $(abstractions_src)/$(JMMMP_NAME)/examples/*.* \
$(DESTDIR)$(objectsdir)/$(JMMMP_NAME)/examples
#------------------------------------------------------------------------------#
# LIST-ABS
list-abs:
make -C $(abstractions_src)/footils/list-abs
list-abs_install:
make -C $(abstractions_src)/footils/list-abs DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
list-abs_clean:
make -C $(abstractions_src)/footils/list-abs clean
#-------------------------------------------------------------------------------
# la-kitchen
LA-KITCHEN_NAME = la-kitchen
la-kitchen_install:
install -d $(DESTDIR)$(objectsdir)/$(LA-KITCHEN_NAME)
install -p $(abstractions_src)/La-kitchen/*.pd \
$(DESTDIR)$(objectsdir)/$(LA-KITCHEN_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(LA-KITCHEN_NAME) \
--author "Charles Verron" \
--description "a collection of objects working with sensors"
install -p $(abstractions_src)/La-kitchen/*-help.pd \
$(DESTDIR)$(objectsdir)/$(LA-KITCHEN_NAME)
# install -d $(DESTDIR)$(manualsdir)/$(LA-KITCHEN_NAME)
# install -p $(abstractions_src)/La-kitchen/doc/*.* \
# $(DESTDIR)$(manualsdir)/$(LA-KITCHEN_NAME)
install -p $(abstractions_src)/La-kitchen/readme.txt \
$(DESTDIR)$(objectsdir)/$(LA_KITCHEN_NAME)/README.txt
#-------------------------------------------------------------------------------
# memento
MEMENTO_NAME = memento
memento_install:
install -d $(DESTDIR)$(objectsdir)/$(MEMENTO_NAME)
install -p $(abstractions_src)/rradical/memento/*.pd \
$(DESTDIR)$(objectsdir)/$(MEMENTO_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(MEMENTO_NAME) \
--author "Frank Barknecht" \
--license "GNU GPL" \
--description "a collection of objects for managing state saving"
install -d $(DESTDIR)$(objectsdir)/$(MEMENTO_NAME)/manual
install -p $(abstractions_src)/rradical/memento/tutorial/*.* \
$(DESTDIR)$(objectsdir)/$(MEMENTO_NAME)/manual
install -d $(DESTDIR)$(examplesdir)/$(MEMENTO_NAME)
install -p $(abstractions_src)/rradical/memento/examples/*.* \
$(DESTDIR)$(examplesdir)/$(MEMENTO_NAME)
install -d $(DESTDIR)$(objectsdir)/$(MEMENTO_NAME)/examples
install -p $(abstractions_src)/rradical/memento/examples/*.* \
$(DESTDIR)$(objectsdir)/$(MEMENTO_NAME)/examples
#-------------------------------------------------------------------------------
# memento-p
MEMENTO-P_NAME = memento-p
memento-p_install:
install -d $(DESTDIR)$(objectsdir)/$(MEMENTO-P_NAME)
install -p $(abstractions_src)/sfruit/memento-p/*.pd \
$(DESTDIR)$(objectsdir)/$(MEMENTO-P_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(MEMENTO-P_NAME) \
--author "Luke Iannini" \
--license "GNU GPL" \
--description "an addon for Frank Barknecht's Memento adding local-state saving and support for Controctopus (a controller lib)"
#-------------------------------------------------------------------------------
# nsend
NSEND_NAME = nsend
nsend_install:
install -d $(DESTDIR)$(objectsdir)/$(NSEND_NAME)
install -p $(shell ls -1 $(abstractions_src)/sfruit/nsend/*.pd | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(NSEND_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(NSEND_NAME) \
--author "Luke Iannini" \
--license "GNU GPL" \
--description "multiple-inlet/outlet send and receive"
#-------------------------------------------------------------------------------
# parazit
parazit_install:
install -d $(DESTDIR)$(objectsdir)
install -p $(abstractions_src)/parazit/parazit.pd $(DESTDIR)$(objectsdir)
install -p $(abstractions_src)/parazit/parazit-help.pd $(DESTDIR)$(objectsdir)
#-------------------------------------------------------------------------------
# mtl
MTL_NAME = mtl
mtl_install:
install -d $(DESTDIR)$(objectsdir)/$(MTL_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(MTL_NAME) \
--author "Thomas O Fredericks and 11h11" \
--license "If you use and die, it's not our fault" \
--description "(Pure Data) Montreal Abstractions"
install -p $(shell ls -1 $(abstractions_src)/$(MTL_NAME)/*.pd | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(MTL_NAME)
install -d $(DESTDIR)$(helpdir)/$(MTL_NAME)
install -p $(abstractions_src)/$(MTL_NAME)/*-help.pd \
$(DESTDIR)$(helpdir)/$(MTL_NAME)
install -p $(abstractions_src)/$(MTL_NAME)/*-help.pd \
$(DESTDIR)$(objectsdir)/$(MTL_NAME)
install -p $(abstractions_src)/$(MTL_NAME)/browser.pd \
$(DESTDIR)$(helpdir)/$(MTL_NAME)
# install -p $(abstractions_src)/$(MTL_NAME)/1.mtlBrowser.pd \
# $(DESTDIR)$(helpdir)/$(MTL_NAME)
install -p $(abstractions_src)/$(MTL_NAME)/*.txt \
$(DESTDIR)$(objectsdir)/$(MTL_NAME)
install -p $(abstractions_src)/$(MTL_NAME)/*.txt \
$(DESTDIR)$(helpdir)/$(MTL_NAME)
install -d $(DESTDIR)$(examplesdir)/$(MTL_NAME)
install -p $(abstractions_src)/$(MTL_NAME)/examples/*.pd \
$(DESTDIR)$(examplesdir)/$(MTL_NAME)
#-------------------------------------------------------------------------------
# pdsvn
PDSVN_NAME = pdsvn
pdsvn_install:
install -d $(DESTDIR)$(objectsdir)/$(PDSVN_NAME)
install -p $(shell ls -1 $(abstractions_src)/sfruit/pdsvn/*.pd | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(PDSVN_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PDSVN_NAME) \
--author "Luke Iannini" \
--license "GNU GPL" \
--description "objects for interacting with Subversion from within Pd patches (experimental, but usable)"
install -d $(DESTDIR)$(helpdir)/$(PDSVN_NAME)
install -p $(abstractions_src)/sfruit/pdsvn/*-help.pd \
$(DESTDIR)$(helpdir)/$(PDSVN_NAME)
#-------------------------------------------------------------------------------
# pixeltango
PIXELTANGO_NAME = pixeltango
pixeltango_install:
install -d $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)
install -p $(abstractions_src)/pixelTANGO/abstractions/*.pd \
$(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)
install -d $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/fx
install -p $(abstractions_src)/pixelTANGO/abstractions/fx/*.pd \
$(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/fx
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PIXELTANGO_NAME) \
--author "Ben Bogart" \
--license "GNU GPL" \
--version "0.3.4" \
--description "objects for creating visuals in a live performance setting"
install -p $(abstractions_src)/pixelTANGO/help/*.* \
$(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)
install -d $(DESTDIR)$(examplesdir)/$(PIXELTANGO_NAME)
install -p $(abstractions_src)/pixelTANGO/Example-Patches/*.* \
$(DESTDIR)$(examplesdir)/$(PIXELTANGO_NAME)
install -d $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/manual
install -p $(abstractions_src)/pixelTANGO/*.txt \
$(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/manual
install -p $(abstractions_src)/pixelTANGO/dev-notes/*.txt \
$(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/manual
install -d $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/examples
install -p $(abstractions_src)/pixelTANGO/Example-Patches/*.* \
$(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/examples
pixeltango_clean:
-rm -f -- $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/fx/*.*
-rmdir -- $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/fx
-rm -f -- $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)/*.*
-rmdir -- $(DESTDIR)$(objectsdir)/$(PIXELTANGO_NAME)
-rm -f -- $(DESTDIR)$(examplesdir)/$(PIXELTANGO_NAME)/*.*
-rmdir -- $(DESTDIR)$(examplesdir)/$(PIXELTANGO_NAME)
-rm -f -- $(DESTDIR)$(manualsdir)/$(PIXELTANGO_NAME)/*.*
-rmdir -- $(DESTDIR)$(manualsdir)/$(PIXELTANGO_NAME)
#------------------------------------------------------------------------------#
# PUREPD
purepd:
make -C $(abstractions_src)/purepd
purepd_install:
make -C $(abstractions_src)/purepd DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
purepd_clean:
make -C $(abstractions_src)/purepd clean
#-------------------------------------------------------------------------------
# RRADical
RRADICAL_NAME = rradical
rradical_install:
install -d $(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(RRADICAL_NAME) \
--author "Frank Barknecht" \
--license "GNU GPL"
install -d $(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
install -p $(shell ls -1 $(abstractions_src)/rradical/control/*.* | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
install -p $(shell ls -1 $(abstractions_src)/rradical/effects/*.* | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
install -p $(shell ls -1 $(abstractions_src)/rradical/instruments/*.* | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
install -p $(shell ls -1 $(abstractions_src)/rradical/stuff/*.* | \
grep -v '\-help.pd') $(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
install -p $(abstractions_src)/rradical/*/*-help.pd \
$(DESTDIR)$(objectsdir)/$(RRADICAL_NAME)
install -d $(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)
install -p $(abstractions_src)/rradical/usecases/*.* \
$(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)
install -d $(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)/showcase
install -p $(abstractions_src)/rradical/usecases/showcase/*.* \
$(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)/showcase
install -d $(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)/showcase/impl
install -p $(abstractions_src)/rradical/usecases/showcase/impl/*.* \
$(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)/showcase/impl
install -d $(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)/showcase/songs
install -p $(abstractions_src)/rradical/usecases/showcase/songs/*.* \
$(DESTDIR)$(examplesdir)/$(RRADICAL_NAME)/showcase/songs
#-------------------------------------------------------------------------------
# rtc-lib
RTC-LIB_NAME = rtc
rtc-lib_install:
install -d $(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)
install -p $(abstractions_src)/footils/rtc-lib/rtc/*.pd \
$(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(RTC-LIB_NAME) \
--author "Karlheinz Essl and Frank Barknecht" \
--license "Pd license" \
--description "Realtime Composition Library for Max ported to Pd"
install -p $(abstractions_src)/footils/rtc-lib/rtc/*-help.pd \
$(abstractions_src)/footils/rtc-lib/rtc/RTC-Overview.pd \
$(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)
install -d $(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)/rtc-help
install -p $(abstractions_src)/footils/rtc-lib/rtc/rtc-help/*.pd \
$(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)/rtc-help
install -d $(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)/examples
install -p $(abstractions_src)/footils/rtc-lib/rtc/rtc-help/*.pd \
$(DESTDIR)$(objectsdir)/$(RTC-LIB_NAME)/examples
#-------------------------------------------------------------------------------
# sfruit
SFRUIT_NAME = sfruit
sfruit_install:
install -d $(DESTDIR)$(objectsdir)/$(SFRUIT_NAME)
install -p $(abstractions_src)/sfruit/sfruit/*.pd \
$(DESTDIR)$(objectsdir)/$(SFRUIT_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(SFRUIT_NAME) \
--author "Luke Iannini" \
--license "GNU GPL" \
--description "a large collection of assorted handy utilites"
#-------------------------------------------------------------------------------
# TIMESTRETCH
TIMESTRETCH_NAME = timestretch
timestretch_install:
install -d $(DESTDIR)$(objectsdir)/$(TIMESTRETCH_NAME)
install -p $(abstractions_src)/timestretch/*.pd $(DESTDIR)$(objectsdir)/$(TIMESTRETCH_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(TIMESTRETCH_NAME) \
--author "" \
--description "" \
--license "" \
--version ""
# install -d $(DESTDIR)$(manualsdir)/$(TIMESTRETCH_NAME)
# install -p $(abstractions_src)/timestretch/doc/*.txt \
# $(DESTDIR)$(manualsdir)/$(TIMESTRETCH_NAME)
#-------------------------------------------------------------------------------
# PDWAVELET
PDWAVELET_NAME = pd-wavelet
pd-wavelet_install:
install -d $(DESTDIR)$(objectsdir)/$(PDWAVELET_NAME)
install -p $(abstractions_src)/pd-wavelet/*.pd \
$(DESTDIR)$(objectsdir)/$(PDWAVELET_NAME)
install -p $(abstractions_src)/pd-wavelet/abs/*.pd \
$(DESTDIR)$(objectsdir)/$(PDWAVELET_NAME)
install -p $(abstractions_src)/pd-wavelet/main.pd \
$(DESTDIR)$(objectsdir)/$(PDWAVELET_NAME)
install -p $(abstractions_src)/pd-wavelet/README.txt \
$(DESTDIR)$(objectsdir)/$(PDWAVELET_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PDWAVELET_NAME) \
--author "Raul Diaz Poblete" \
--description "manipulation of audio in the wavelet domain" \
--license "GNU GPL v2" \
--version ""
#==============================================================================#
#
# CLEAN TARGETS
#
#==============================================================================#
# the destination-specific clean targets are in Makefile.buildlayout
clean: install_clean
distclean: clean cruft_clean
test_locations:
@echo "PD_VERSION: $(PD_VERSION)"
@echo "PACKAGE_VERSION: $(PACKAGE_VERSION)"
@echo "CWD $(CWD)"
@echo "DESTDIR $(DESTDIR)"
@echo "PREFIX $(prefix)"
@echo "BINDIR $(bindir)"
@echo "LIBDIR $(libdir)"
@echo "OBJECTSDIR $(objectsdir)"
@echo "PDDOCDIR $(pddocdir)"
@echo "LIBPDDIR $(libpddir)"
@echo "LIBPDBINDIR $(libpdbindir)"
@echo "HELPDIR $(helpdir)"
@echo "MANUALSDIR $(manualsdir)"
@echo "EXAMPLESDIR $(examplesdir)"
## Pd library template version 1.0.3
# For instructions on how to use this template, see:
# http://puredata.info/docs/developer/MakefileTemplate
LIBRARY_NAME = list-abs
# add your .c source files, one object per file, to the SOURCES
# variable, help files will be included automatically
SOURCES =
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
# be included automatically
PDOBJECTS = OSCprepend.pd compare-any.pd last-x.pd list-abs.pd list-accum.pd list-add.pd list-apply.pd list-centroid.pd list-clip.pd list-compare.pd list-delete.pd list-dotprod.pd list-drip.pd list-drip2.pd list-dripslow.pd list-emath.pd list-enumerate.pd list-equalize.pd list-extend.pd list-fifo-delim.pd list-fifo.pd list-filter.pd list-find.pd list-geometric-mean.pd list-group.pd list-harmonic-mean.pd list-idx.pd list-insert.pd list-inter.pd list-inter-many.pd list-iter.pd list-l2s.pd list-lastx.pd list-len.pd list-lifo.pd list-makefilename.pd list-map.pd list-map2.pd list-math.pd list-mean.pd list-minmax.pd list-moses.pd list-mult.pd list-normalize.pd list-nth.pd list-onearg.pd list-pad.pd list-random.pd list-rdrip.pd list-reduce.pd list-replace.pd list-rev.pd list-rot.pd list-round.pd list-sect.pd list-seek.pd list-shellsort.pd list-sieve.pd list-sort.pd list-splat.pd list-sub.pd list-swap.pd list-tabdump.pd list-unique.pd list-unitvec.pd list-wrandom.pd prepent.pd sroute.pd take-two.pd triple-scale.pd
# example patches and related files, in the 'examples' subfolder
EXAMPLES =
# manuals and related files, in the 'manual' subfolder
MANUAL =
# if you want to include any other files in the source and binary tarballs,
# list them here. This can be anything from header files, test patches,
# documentation, etc. README.txt and LICENSE.txt are required and therefore
# automatically included
EXTRA_DIST =
#------------------------------------------------------------------------------#
#
# things you might need to edit if you are using other C libraries
#
#------------------------------------------------------------------------------#
CFLAGS = -DPD -I"$(PD_INCLUDE)" -Wall -W -g
LDFLAGS =
LIBS =
#------------------------------------------------------------------------------#
#
# you shouldn't need to edit anything below here, if we did it right :)
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
CFLAGS += -DVERSION='"$(LIBRARY_VERSION)"'
PD_INCLUDE = $(PD_PATH)/include
# where to install the library, overridden below depending on platform
prefix = /usr/local
libdir = $(prefix)/lib
pkglibdir = $(libdir)/pd-externals
objectsdir = $(pkglibdir)
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -p -m 644
INSTALL_DATA = $(INSTALL) -p -m 644
INSTALL_DIR = $(INSTALL) -p -m 755 -d
ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \
$(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows)
DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
ORIGDIR=pd-$(LIBRARY_NAME)_$(LIBRARY_VERSION)
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CPU := $(shell uname -p)
ifeq ($(CPU),arm) # iPhone/iPod Touch
SOURCES += $(SOURCES_iphoneos)
EXTENSION = pd_darwin
OS = iphoneos
PD_PATH = /Applications/Pd-extended.app/Contents/Resources
IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
CC=$(IPHONE_BASE)/gcc
CPP=$(IPHONE_BASE)/cpp
CXX=$(IPHONE_BASE)/g++
ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk
IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6
OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer
CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS)
LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT)
LIBS += -lc
STRIP = strip -x
DISTBINDIR=$(DISTDIR)-$(OS)
else # Mac OS X
SOURCES += $(SOURCES_macosx)
EXTENSION = pd_darwin
OS = macosx
PD_PATH = /Applications/Pd-extended.app/Contents/Resources
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC
LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup
# if the 'pd' binary exists, check the linking against it to aid with stripping
LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd)
LIBS += -lc
STRIP = strip -x
DISTBINDIR=$(DISTDIR)-$(OS)
# install into ~/Library/Pd on Mac OS X since /usr/local isn't used much
pkglibdir=$(HOME)/Library/Pd
endif
endif
ifeq ($(UNAME),Linux)
CPU := $(shell uname -m)
SOURCES += $(SOURCES_linux)
EXTENSION = pd_linux
OS = linux
PD_PATH = /usr
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
CFLAGS += -fPIC
LDFLAGS += -Wl,--export-dynamic -shared -fPIC
LIBS += -lc
STRIP = strip --strip-unneeded -R .note -R .comment
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
endif
ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
CPU := $(shell uname -m)
SOURCES += $(SOURCES_cygwin)
EXTENSION = dll
OS = cygwin
PD_PATH = $(cygpath $(PROGRAMFILES))/pd
OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
CFLAGS +=
LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin"
LIBS += -lc -lpd
STRIP = strip --strip-unneeded -R .note -R .comment
DISTBINDIR=$(DISTDIR)-$(OS)
endif
ifeq (MINGW,$(findstring MINGW,$(UNAME)))
CPU := $(shell uname -m)
SOURCES += $(SOURCES_windows)
EXTENSION = dll
OS = windows
PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd)
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -march=i686 -mtune=pentium4
CFLAGS += -mms-bitfields
LDFLAGS += -s -shared -Wl,--enable-auto-import
LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" -lpd -lwsock32 -lkernel32 -luser32 -lgdi32
STRIP = strip --strip-unneeded -R .note -R .comment
DISTBINDIR=$(DISTDIR)-$(OS)
endif
# in case somebody manually set the HELPPATCHES above
HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd)
CFLAGS += $(OPT_CFLAGS)
.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags $(LIBRARY_NAME)
all: $(SOURCES:.c=.$(EXTENSION))
%.o: %.c
$(CC) $(CFLAGS) -o "$*.o" -c "$*.c"
%.$(EXTENSION): %.o
$(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
chmod a-x "$*.$(EXTENSION)"
# this links everything into a single binary file
$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o
$(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS)
chmod a-x $(LIBRARY_NAME).$(EXTENSION)
install: libdir_install
# The meta and help files are explicitly installed to make sure they are
# actually there. Those files are not optional, then need to be there.
libdir_install: $(SOURCES:.c=.$(EXTENSION)) install-doc install-examples install-manual
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
$(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
test -z "$(strip $(SOURCES))" || (\
$(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \
$(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION))))
test -z "$(strip $(PDOBJECTS))" || \
$(INSTALL_DATA) $(PDOBJECTS) \
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
# install library linked as single binary
single_install: $(LIBRARY_NAME) install-doc install-exec
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
$(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
$(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION)
install-doc:
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \
$(INSTALL_DATA) $(HELPPATCHES) \
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
$(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt
$(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt
install-examples:
test -z "$(strip $(EXAMPLES))" || \
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \
for file in $(EXAMPLES); do \
$(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \
done
install-manual:
test -z "$(strip $(MANUAL))" || \
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \
for file in $(MANUAL); do \
$(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \
done
clean:
-rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o)
-rm -f -- $(SOURCES:.c=.$(EXTENSION))
-rm -f -- $(LIBRARY_NAME).o
-rm -f -- $(LIBRARY_NAME).$(EXTENSION)
distclean: clean
-rm -f -- $(DISTBINDIR).tar.gz
-rm -rf -- $(DISTBINDIR)
-rm -f -- $(DISTDIR).tar.gz
-rm -rf -- $(DISTDIR)
-rm -f -- $(ORIGDIR).tar.gz
-rm -rf -- $(ORIGDIR)
$(DISTBINDIR):
$(INSTALL_DIR) $(DISTBINDIR)
libdir: all $(DISTBINDIR)
$(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR)
$(INSTALL_DATA) $(SOURCES) $(DISTBINDIR)
$(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR)
test -z "$(strip $(EXTRA_DIST))" || \
$(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR)
# tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR)
$(DISTDIR):
$(INSTALL_DIR) $(DISTDIR)
$(ORIGDIR):
$(INSTALL_DIR) $(ORIGDIR)
dist: $(DISTDIR)
$(INSTALL_DATA) Makefile $(DISTDIR)
$(INSTALL_DATA) README.txt $(DISTDIR)
$(INSTALL_DATA) LICENSE.txt $(DISTDIR)
$(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR)
test -z "$(strip $(ALLSOURCES))" || \
$(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR)
test -z "$(strip $(PDOBJECTS))" || \
$(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR)
test -z "$(strip $(HELPPATCHES))" || \
$(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR)
test -z "$(strip $(EXTRA_DIST))" || \
$(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR)
test -z "$(strip $(EXAMPLES))" || \
$(INSTALL_DIR) $(DISTDIR)/examples && \
for file in $(EXAMPLES); do \
$(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \
done
test -z "$(strip $(MANUAL))" || \
$(INSTALL_DIR) $(DISTDIR)/manual && \
for file in $(MANUAL); do \
$(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \
done
tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR)
# make a Debian source package
dpkg-source:
debclean
make distclean dist
mv $(DISTDIR) $(ORIGDIR)
tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR)
rm -f -- $(DISTDIR).tar.gz
rm -rf -- $(DISTDIR) $(ORIGDIR)
cd .. && dpkg-source -b $(LIBRARY_NAME)
etags:
etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h
showsetup:
@echo "CFLAGS: $(CFLAGS)"
@echo "LDFLAGS: $(LDFLAGS)"
@echo "LIBS: $(LIBS)"
@echo "PD_INCLUDE: $(PD_INCLUDE)"
@echo "PD_PATH: $(PD_PATH)"
@echo "objectsdir: $(objectsdir)"
@echo "LIBRARY_NAME: $(LIBRARY_NAME)"
@echo "LIBRARY_VERSION: $(LIBRARY_VERSION)"
@echo "SOURCES: $(SOURCES)"
@echo "PDOBJECTS: $(PDOBJECTS)"
@echo "ALLSOURCES: $(ALLSOURCES)"
@echo "UNAME: $(UNAME)"
@echo "CPU: $(CPU)"
@echo "pkglibdir: $(pkglibdir)"
@echo "DISTDIR: $(DISTDIR)"
@echo "ORIGDIR: $(ORIGDIR)"
Abstractions from Joo Pais
(c) 2005-9 João Pais - jmmmpais@googlemail.com
Version 0.47
(c) 2005-2016 Joo Pais - jmmmpais@gmail.com
Released under the BSD license (more information in each abstraction).
This package has several base utilities that make coding a bit easier. It is composed of the following abstractions:
This package has several utilities with different functions. It is composed of abstractions only.
array-edit - edit properties of arrays and populate them following several formulas
ardourjack-gui - Controls ardour transport and jack settings from Pd
array-edit - Edit properties of arrays and populate them following several formulas
bezier - Transfer function GUI with one cubic bzier curve
bezier~ - Transfer function GUI with one cubic bzier curve at audio rate
but - Monochrome bang button
butt - Color-changing Toggle Button
clock - Chronometer with display in seconds
dacc~ - dynamic dac~ outlet up to 32 channels
dacm~ - Mono dac~ for lazy people
datei-o - Sends the message "open ../../"
datei-r - Sends the message "read ../../"
datei-w - Sends the message "write ../../"
ds-color-sel - color selector for data structures
dsp01 - DSP switch
f+ - Counter with variable increment
gui-edit - edit standard GUI objects fast
jp.menu - Dropdown menu programmed with data structures
jp.preset - Dropdown preset saver programmed with data structures
lbang - loadbang which can be triggered more often
liner~ - practical implementation of [line~]
liner+~ - practical implementation of signal envelopping
mat~ - Level meter with amplitude control
mat-~ - Level meter with amplitude control, horizontal
maat~ - Level meter with amplitude control, stereo
matrixctrl - GUI for [iemmatrix/mtx_mul~]
met~ - Level meter with amplitude control (with VU, too CPU expensive for me)
metrum - Metro with GUI
m-i - Automatic conversion of MIDI controller
mk - shows the controller number and MIDI value
mk - Visual display of MIDI inputs
oscD - Counts received OSC messages
oscS - Interface for sendOSC
pd-colors - Pd color palettes (Data Structures + Tcl/Tk)
pix2canvas - Convert images into canvas
rec-name - Automatic naming for a record/playback engine
rgb-color - Pick RGB colors for your GUI objects
sguigot - spigot GUI implementation
sliders - GUI for incoming midi data
snaps~ - snapshot~ GUI implementation
spectrogram~ - Spectrogram with 512 bins resolution
stoppuhr - Chronometer with two layers
swatch - Pick a color using the hue-saturation chart
swatch-gui - Pick a color for your GUI using the hue-saturation chart
tastin - Gate for keyboard input
uhr - Shows the time
It is recomended to use these abstractions with Pd-extended, since I don't keep track of which externals are used. Some abstractions use other ones of this package, so it is also better to have always the whole package in one place.
The jmmmp library is dependent from the following libraries: cyclone, ext13, ggee, iemlib, iemmatrix, jmmmp, zexy 2.2.6.
2009.02.20
2016.06.30
Non-working or discarded abstractions:
......
#N canvas 329 129 450 300 10;
#X obj 189 121 appent;
#X text 73 61 [list append]--[list trim] shortcut;
#N canvas 436 287 450 300 10;
#X obj 165 118 ardourjack-gui;
#N canvas 49 336 494 344 META 0;
#X text 12 55 AUTHOR Joo Pais <jmmmpais@googlemail.com>;
#X text 12 95 LICENSE BSD;
#X text 12 75 LIBRARY jmmmp;
#X text 12 5 DESCRIPTION Controls ardour transport and jack settings
from Pd;
#X text 12 35 KEYWORDS ardour jack transport;
#X text 12 135 VERSION 09.05.2013;
#X text 13 115 WEBSITE http://puredata.info/Members/jmmmp;
#X restore 392 276 pd META;
#X text 70 40 Controls ardour transport and jack settings from Pd;
#N struct 1094-graph float x float y float dist float resol float width
float stres array 1094-boxes 1094-box;
#N struct 1094-box float y float width;
#N canvas 330 25 920 794 10;
#N canvas 651 507 450 300 \$0-box 0;
#X obj 40 83 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 22 26 struct \$0-box float y float width;
#X obj 28 114 drawpolygon 0 2 0 0 width 0;
#X connect 0 0 2 0;
#X restore 753 114 pd \$0-box;
#N canvas 600 79 615 150 \$0-graph 0;
#X obj 19 21 struct \$0-graph float x float y float dist float resol
float width float stres array \$0-boxes \$0-box;
#X obj 30 100 plot -y y(0:4)(4:0)(1) \$0-boxes 0 0 0 0 dist;
#X restore 753 134 pd \$0-graph;
#X obj 20 203 pointer;
#X obj 107 454 setsize \$0-graph \$0-boxes;
#X obj 119 163 pointer;
#X obj 119 123 \$0;
#X obj 124 424 set \$0-graph dist;
#X obj 124 404 expr 10/$f1;
#X obj 133 534 element \$0-graph \$0-boxes;
#X msg 139 96 clear;
#X obj 20 183 append \$0-graph x;
#X obj 40 554 set \$0-box width;
#X obj 40 424 until;
#X obj 40 444 f+;
#X obj 40 404 t f b f;
#X obj 79 484 expr 10/$f1;
#X obj 40 504 f;
#X obj 40 464 t b f;
#X obj 20 163 0;
#X obj 98 46 t b b b b;
#X obj 464 144 element \$0-graph \$0-boxes;
#X obj 464 164 get \$0-box y;
#X msg 149 76 donecanvasdialog 1 -1 2 0 0 10 4 100 70 0 0;
#X obj 511 536 element \$0-graph \$0-boxes;
#X obj 442 466 until;
#X obj 442 486 f+;
#X obj 442 506 t b f;
#X obj 442 556 set \$0-box y;
#X obj 442 426 f;
#X obj 442 526 0;
#X obj 90 374 t f f f f;
#X obj 442 446 t f b;
#X obj 98 25 loadbang;
#X obj 611 124 r \$0-pointer-aux;
#X text 356 14 komisches workaround \, weil gop nicht richtig funktioniert
;
#X obj 175 28 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 51 334 \$2;
#N canvas 0 0 450 300 (subpatch) 0;
#X array array1 100 float 3;
#A 0 0.157144 0.17143 0.17143 0.17143 0.17143 0.17143 0.17143 0.17143
0.17143 0.17143 0.17143 0.17143 0.17143 0.185715 0.228573 0.242859
0.261907 0.280954 0.300002 0.328574 0.34286 0.361907 0.380955 0.400003
0.414289 0.44286 0.457146 0.471432 0.485718 0.500004 0.528575 0.542861
0.571433 0.585719 0.600004 0.61429 0.657148 0.671433 0.685719 0.685719
0.685719 0.700005 0.700005 0.700005 0.692862 0.685719 0.671433 0.66429
0.657148 0.628576 0.600004 0.571433 0.542861 0.521432 0.500004 0.485718
0.471432 0.44286 0.433336 0.423812 0.414289 0.407146 0.400003 0.39286
0.385717 0.378574 0.371431 0.364288 0.357145 0.353574 0.350002 0.346431
0.34286 0.34286 0.342859 0.338098 0.333336 0.328574 0.321431 0.314288
0.300002 0.300002 0.27143 0.228573 0.17143 0.157144 0.128572 0.100001
0.0857147 0.0428572 0.0285714 -0.0428577 -0.100001 0.0857148 0.0833339
0.0809529 0.0785719 0.076191 0.07381 0.071429;
#X coords 0 1 99 -1 200 140 1;
#X restore 707 269 graph;
#X msg 730 418 \; array1 0 1 1 1 1 -1 -1 -1;
#X obj 51 354 moses 1;
#N canvas 35 70 367 459 \$0-array 0;
#X scalar 1094-graph 0 0 0 0 0 1 \; 0 0 \; \;;
#X coords 0 0 10 4 100 70 1;
#X restore 753 30 pd \$0-array;
#X obj 149 116 s pd-\$0-array;
#X msg 120 143 traverse pd-\$1-array \, bang;
#X obj 20 223 s \$0-pointer-array;
#X obj 565 506 r \$0-pointer-array;
#X obj 187 504 r \$0-pointer-array;
#X obj 312 246 inlet;
#X text 449 124 [inlet];
#X floatatom 21 303 5 0 0 0 - - -;
#N canvas 55 71 450 300 list-populate 0;
#X obj 26 19 inlet;
#X obj 168 93 r \$0-reset-aux;
#X obj 158 73 r \$0-reset;
#X obj 201 251 element \$0-graph \$0-boxes;
#X obj 132 201 f+;
#X obj 132 271 set \$0-box y;
#X obj 158 118 f;
#X obj 158 138 t f b;
#X obj 255 221 r \$0-pointer-array;
#X obj 26 39 list split 1;
#X obj 26 99 drip;
#X obj 26 79 list;
#X obj 26 59 t b f;
#X obj 41 139 t b f;
#X connect 0 0 9 0;
#X connect 1 0 6 0;
#X connect 2 0 6 0;
#X connect 3 0 5 1;
#X connect 4 0 3 0;
#X connect 6 0 7 0;
#X connect 7 1 4 1;
#X connect 8 0 3 1;
#X connect 9 0 12 0;
#X connect 9 1 11 1;
#X connect 10 0 13 0;
#X connect 11 0 10 0;
#X connect 12 0 11 0;
#X connect 12 1 4 1;
#X connect 13 0 4 0;
#X connect 13 1 5 0;
#X restore 365 286 pd list-populate;
#X msg 372 246 10 -1 1 -1 0.5 -0.5 0.5 -0.2 0.2 -0.2 0.1 -0.1 0;
#X obj 78 96 t b b b;
#X obj 127 675 moses 1;
#X obj 262 695 r \$0-pointer-array;
#X obj 127 655 \$3;
#X text 610 632 \$1 - array name;
#X text 609 651 \$2 - array size;
#X text 608 669 \$3 - step resolution;
#X msg 127 695 1;
#X obj 157 715 set \$0-graph stres;
#X floatatom 84 646 5 0 0 0 - - -;
#X text 97 735 usar uma variavel para o step nao e possivel???;
#X obj 418 306 f;
#X obj 418 326 outlet;
#X obj 312 266 route resize list arraysize const;
#X obj 442 396 t b f;
#X text 482 396 const;
#X text 448 217 read / write / rename / bounds / labels / ticks / gop-size
;
#X connect 2 0 43 0;
#X connect 4 0 10 1;
#X connect 5 0 42 0;
#X connect 7 0 6 0;
#X connect 8 0 11 1;
#X connect 9 0 41 0;
#X connect 10 0 2 0;
#X connect 12 0 13 0;
#X connect 13 0 17 0;
#X connect 14 0 12 0;
#X connect 14 1 13 1;
#X connect 14 2 15 0;
#X connect 15 0 16 1;
#X connect 16 0 11 0;
#X connect 17 0 16 0;
#X connect 17 1 8 0;
#X connect 18 0 10 0;
#X connect 19 0 51 0;
#X connect 19 1 5 0;
#X connect 19 2 9 0;
#X connect 19 3 22 0;
#X connect 20 0 21 0;
#X connect 22 0 41 0;
#X connect 23 0 27 1;
#X connect 24 0 25 0;
#X connect 25 0 26 0;
#X connect 26 0 29 0;
#X connect 26 1 23 0;
#X connect 28 0 31 0;
#X connect 29 0 27 0;
#X connect 30 0 14 0;
#X connect 30 1 3 0;
#X connect 30 2 7 0;
#X connect 30 3 28 1;
#X connect 31 0 24 0;
#X connect 31 1 25 1;
#X connect 32 0 19 0;
#X connect 33 0 20 1;
#X connect 35 0 19 0;
#X connect 36 0 39 0;
#X connect 36 0 62 1;
#X connect 39 1 30 0;
#X connect 42 0 4 0;
#X connect 44 0 23 1;
#X connect 45 0 8 1;
#X connect 45 0 3 1;
#X connect 45 0 6 1;
#X connect 46 0 64 0;
#X connect 48 0 36 0;
#X connect 50 0 64 0;
#X connect 51 0 54 0;
#X connect 51 1 36 0;
#X connect 51 2 18 0;
#X connect 52 0 58 0;
#X connect 52 1 59 0;
#X connect 53 0 59 1;
#X connect 54 0 52 0;
#X connect 58 0 59 0;
#X connect 60 0 52 0;
#X connect 62 0 63 0;
#X connect 64 0 36 0;
#X connect 64 1 49 0;
#X connect 64 2 62 0;
#X connect 64 3 65 0;
#X connect 65 0 28 0;
#X connect 65 1 29 0;
#N canvas 345 87 450 300 10;
#X obj 175 132 array-edit;
#X text 73 84 edit properties of arrays and populate them following
several formulas;
This diff is collapsed.
#N struct bez-array float x float y array bez-c-arr bez-c float p0x
float p0y float p0x. float p0y. float p1x float p1y float p1x. float
p1y. float p2x float p2y float p2x. float p2y. float p3x float p3y
float p3x. float p3y. float rpx float rpy float rpx. float rpy.;
#N struct bez-c float x float y;
#N canvas 280 17 921 908 10;
#N struct 1124-bez-array float x float y array 1124-bez-c-arr 1124-bez-c
float p0x float p0y float p0x. float p0y. float p1x float p1y float
p1x. float p1y. float p2x float p2y float p2x. float p2y. float p3x
float p3y float p3x. float p3y. float rpx float rpy float rpx. float
rpy.;
#N struct 1124-bez-c float x float y;
#N canvas 31 5 921 704 10;
#X floatatom 415 741 5 0 0 0 - - -;
#X obj 418 727 hsl 50 10 0 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 4900 0;
-1 -1 0 0;
#X floatatom 135 195 5 0 0 0 - - -;
#X msg 125 134 canvas \$1;
#X floatatom 135 114 5 0 0 0 - - -;
......@@ -14,18 +15,17 @@ float p3x. float p3y. float rpx float rpy float rpx. float rpy.;
#X msg 415 687 0 \, 1 3000;
#X obj 135 504 pack;
#X obj 145 484 t b f;
#X obj 125 820 unpack;
#X msg 228 820 p0 0.142857 0.244898 \, p1 0.34 0.88 \, p2 0.9 0.4 \,
p3 0.85 0.73;
#X msg 228 820 p0 0.25 0.34 \, p1 0.34 0.88 \, p2 0.9 0.4 \, p3 0.85
0.73;
#X text 543 84 Arguments;
#X obj 148 457 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 700 1;
-1 0 1;
#X obj 148 471 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 1200 1;
#X obj 128 840 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 4165 1;
#X obj 128 854 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 3577 1;
-1 0 1;
#X obj 128 820 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 0 1;
#X obj 128 834 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 0 1;
#X text 135 297 default values;
#X text 135 337 also first and last points can take any value;
#X text 222 154 Two values define x and y coordinates;
......@@ -36,7 +36,6 @@ a square ...;
#X text 172 194 size \$1 - Define array size (minimum 2 points);
#X text 240 789 Dump outlet: connect to a message box \, which you
can later copy-paste.;
#X text 105 869 Output: list with scaled x and y values;
#X text 545 163 If no arguments are given \, the default values are
110 100 100 When no y argument is present \, a square with dimensions
of x is created.;
......@@ -63,13 +62,8 @@ get formatted.;
#X text 543 254 Outlets;
#X text 546 272 - float pair with x / y values;
#X text 546 292 - control point dump;
#X text 21 9 [bezier] - Transfer function with one cubic bzier curve
;
#X text 153 554 readpoint \$1 - Turn readpoint (red) display on or
off. Readpoint shows the curent place in the buffer.;
#X text 543 536 READPOINT NAO FUNCIONA COM VARIOS OBJECTOS \, ENVIA
PARA BEZIER CRIADO PRIMEIRO \; TIRAR TODOS OS SENDS \, OU FAZER UM
LOCAL SEND;
#X text 22 29 Create a transfer function between 0 and 1 \, using the
four control points of a cubic bzier curve.;
#X text 546 232 - floats [0 to 1] / commands (with parameters);
......@@ -82,7 +76,7 @@ the red boundaries. Or send pX coordinates.;
#X text 70 814 OUTPUT;
#X obj 415 761 s \$0-input;
#X obj 135 677 r \$0-input;
#X text 320 667 Send your input values between 0 and 1 here:;
#X text 415 667 Send your input values between 0 and 1 here:;
#X msg 125 317 p0 0 0 \, p1 0.1 0.6 \, p2 0.9 0.4 \, p3 1 1;
#X msg 125 357 p0 0.25 0.34 \, p1 0.34 0.88 \, p2 0.9 0.4 \, p3 0.85
0.73;
......@@ -97,30 +91,45 @@ the box - you won't be able to grab the graphic (see bug description)
;
#X msg 125 583 readpoint \$1;
#X msg 125 624 dump;
#X connect 0 0 52 0;
#X text 65 849 Outputs: scaled x and y values;
#X text 21 9 [bezier] - Transfer function GUI with one cubic bzier
curve;
#N canvas 504 106 494 344 META 0;
#X text 12 55 AUTHOR Joo Pais <jmmmpais@googlemail.com>;
#X text 12 95 LICENSE BSD;
#X text 12 75 LIBRARY jmmmp;
#X text 12 5 DESCRIPTION Transfer function GUI with one cubic bézier
curve;
#X text 12 35 KEYWORDS bezier data structures;
#X text 12 135 VERSION 2010;
#X text 12 165 INLET_0 - all instructions;
#X text 12 185 OUTLET_0 - list with x/y values;
#X text 12 205 OUTLET_1 - dump current parameters;
#X text 13 115 WEBSITE http://puredata.info/Members/jmmmp;
#X restore 542 486 pd META;
#X connect 0 0 48 0;
#X connect 1 0 0 0;
#X connect 2 0 60 0;
#X connect 3 0 27 0;
#X connect 2 0 56 0;
#X connect 3 0 25 0;
#X connect 4 0 3 0;
#X connect 5 0 1 0;
#X connect 6 0 5 0;
#X connect 7 0 58 0;
#X connect 7 0 54 0;
#X connect 8 0 7 0;
#X connect 8 1 7 1;
#X connect 9 0 14 0;
#X connect 9 1 15 0;
#X connect 12 0 7 0;
#X connect 13 0 8 0;
#X connect 26 0 64 0;
#X connect 27 0 9 0;
#X connect 27 1 10 0;
#X connect 53 0 27 0;
#X connect 55 0 27 0;
#X connect 56 0 27 0;
#X connect 57 0 27 0;
#X connect 58 0 27 0;
#X connect 60 0 27 0;
#X connect 61 0 27 0;
#X connect 62 0 27 0;
#X connect 64 0 27 0;
#X connect 65 0 27 0;
#X connect 11 0 7 0;
#X connect 12 0 8 0;
#X connect 24 0 60 0;
#X connect 25 0 13 0;
#X connect 25 1 14 0;
#X connect 25 2 9 0;
#X connect 49 0 25 0;
#X connect 51 0 25 0;
#X connect 52 0 25 0;
#X connect 53 0 25 0;
#X connect 54 0 25 0;
#X connect 56 0 25 0;
#X connect 57 0 25 0;
#X connect 58 0 25 0;
#X connect 60 0 25 0;
#X connect 61 0 25 0;
#N struct bez-array float x float y array bez-c-arr bez-c float p0x
float p0y float p0x. float p0y. float p1x float p1y float p1x. float
p1y. float p2x float p2y float p2x. float p2y. float p3x float p3y
float p3x. float p3y. float rpx float rpy float rpx. float rpy.;
#N struct bez-c float x float y;
#N canvas 0 0 855 754 10;
#X scalar bez-array 0 0 -2 -2 3 3 8 58 13 63 88 38 93 43 98 98 103
103 98 98 103 103 \; 0 0 \; 0.26146 1.71676 \; 0.56528 3.38768 \; 0.91062
5.01372 \; 1.29664 6.59584 \; 1.7225 8.135 \; 2.18736 9.63216 \; 2.69038
11.0883 \; 3.23072 12.5043 \; 3.80754 13.8812 \; 4.42 15.22 \; 5.06726
16.5216 \; 5.74848 17.7869 \; 6.46282 19.0169 \; 7.20944 20.2126 \;
7.9875 21.375 \; 8.79616 22.505 \; 9.63458 23.6035 \; 10.5019 24.6715
\; 11.3973 25.71 \; 12.32 26.72 \; 13.2691 27.7024 \; 14.2437 28.6581
\; 15.243 29.5881 \; 16.2662 30.4934 \; 17.3125 31.375 \; 18.381 32.2338
\; 19.4708 33.0707 \; 20.5811 33.8867 \; 21.7111 34.6828 \; 22.86 35.46
\; 24.0269 36.2192 \; 25.2109 36.9613 \; 26.4112 37.6873 \; 27.627
38.3982 \; 28.8575 39.095 \; 30.1018 39.7786 \; 31.359 40.4499 \; 32.6283
41.1099 \; 33.9089 41.7596 \; 35.2 42.4 \; 36.5007 43.032 \; 37.8101
43.6565 \; 39.1274 44.2745 \; 40.4518 44.887 \; 41.7825 45.495 \; 43.1186
46.0994 \; 44.4592 46.7011 \; 45.8035 47.3011 \; 47.1507 47.9004 \;
48.5 48.5 \; 49.8505 49.1008 \; 51.2013 49.7037 \; 52.5516 50.3097
\; 53.9006 50.9198 \; 55.2475 51.535 \; 56.5914 52.1562 \; 57.9314
52.7843 \; 59.2667 53.4203 \; 60.5965 54.0652 \; 61.92 54.72 \; 63.2363
55.3856 \; 64.5445 56.0629 \; 65.8438 56.7529 \; 67.1334 57.4566 \;
68.4125 58.175 \; 69.6802 58.909 \; 70.9356 59.6595 \; 72.1779 60.4275
\; 73.4063 61.214 \; 74.62 62.02 \; 75.8181 62.8464 \; 76.9997 63.6941
\; 78.164 64.5641 \; 79.3102 65.4574 \; 80.4375 66.375 \; 81.545 67.3178
\; 82.6318 68.2867 \; 83.6971 69.2827 \; 84.7401 70.3068 \; 85.76 71.36
\; 86.7559 72.4432 \; 87.7269 73.5573 \; 88.6722 74.7033 \; 89.591
75.8822 \; 90.4825 77.095 \; 91.3458 78.3425 \; 92.18 79.6259 \; 92.9843
80.9459 \; 93.7579 82.3037 \; 94.5 83.7 \; 95.2097 85.1359 \; 95.8861
86.6125 \; 96.5284 88.1305 \; 97.1358 89.691 \; 97.7075 91.295 \; 98.2426
92.9434 \; 98.7402 94.6371 \; 99.1995 96.3771 \; 100 100 \; \;;
#X obj 217 10 inlet;
#N canvas 627 482 718 464 inside 0;
#X obj 20 82 inlet;
#X obj 346 282 s \$0-bezier-a;
#N canvas 0 0 450 300 element 0;
#X obj 52 46 struct bez-c float x float y;
#X restore 20 322 pd element;
#X obj 52 46 struct \$0-bez-c float x float y;
#X restore 20 302 pd element;
#N canvas 665 149 542 409 array 0;
#X obj 11 87 route change click;
#X obj 31 121 unpack p f;
......@@ -58,12 +26,12 @@ p0x. p0y p0x. p0y. p0x p0y. p0x p0y;
p3x. p3y p3x. p3y. p3x p3y. p3x p3y;
#X obj 166 171 r \$0-read-point-view;
#X text 297 171 read point;
#X obj 11 15 struct bez-array float x float y array bez-c-arr bez-c
float p0x float p0y float p0x. float p0y. float p1x float p1y float
p1x. float p1y. float p2x float p2y float p2x. float p2y. float p3x
float p3y float p3x. float p3y. float rpx float rpy float rpx. float
rpy.;
#X obj 166 111 plot bez-c-arr 9 2 0 0;
#X obj 11 15 struct \$0-bez-array float x float y array \$0-bez-c-arr
\$0-bez-c float p0x float p0y float p0x. float p0y. float p1x float
p1y float p1x. float p1y. float p2x float p2y float p2x. float p2y.
float p3x float p3y float p3x. float p3y. float rpx float rpy float
rpx. float rpy.;
#X obj 166 111 plot \$0-bez-c-arr 9 2 0 0;
#X obj 166 191 filledpolygon 900 900 1 rpx rpy rpx. rpy rpx. rpy. rpx
rpy. rpx rpy;
#X connect 0 0 1 0;
......@@ -74,7 +42,7 @@ rpy. rpx rpy;
#X connect 5 0 3 0;
#X connect 12 0 16 0;
#X connect 14 0 0 0;
#X restore 20 342 pd array;
#X restore 20 322 pd array;
#N canvas 257 223 482 660 calculate 0;
#X obj 27 42 inlet;
#X obj 27 202 until;
......@@ -106,17 +74,17 @@ a escalonar tudo? talvez nao;
#X obj 47 122 t b f f;
#X obj 27 272 *;
#X obj 46 292 *;
#X obj 141 190 get bez-array p0x;
#X obj 151 210 get bez-array p1x;
#X obj 161 230 get bez-array p2x;
#X obj 171 250 get bez-array p3x;
#X obj 311 190 get bez-array p0y;
#X obj 320 210 get bez-array p1y;
#X obj 331 230 get bez-array p2y;
#X obj 341 250 get bez-array p3y;
#X obj 108 498 element bez-array bez-c-arr;
#X obj 27 538 set bez-c x;
#X obj 46 558 set bez-c y;
#X obj 141 190 get \$0-bez-array p0x;
#X obj 151 210 get \$0-bez-array p1x;
#X obj 161 230 get \$0-bez-array p2x;
#X obj 171 250 get \$0-bez-array p3x;
#X obj 311 190 get \$0-bez-array p0y;
#X obj 320 210 get \$0-bez-array p1y;
#X obj 331 230 get \$0-bez-array p2y;
#X obj 341 250 get \$0-bez-array p3y;
#X obj 108 498 element \$0-bez-array \$0-bez-c-arr;
#X obj 27 538 set \$0-bez-c x;
#X obj 46 558 set \$0-bez-c y;
#X connect 0 0 11 0;
#X connect 1 0 2 0;
#X connect 2 0 9 0;
......@@ -168,8 +136,8 @@ a escalonar tudo? talvez nao;
#X connect 34 0 19 0;
#X connect 35 0 8 0;
#X restore 20 362 pd calculate;
#X obj 55 182 outlet;
#N canvas 0 0 333 632 index 0;
#X obj 65 202 outlet;
#N canvas 161 314 333 632 index 0;
#X obj 13 292 outlet;
#X obj 208 142 r \$0-arrpoint;
#X obj 13 62 inlet;
......@@ -178,82 +146,87 @@ a escalonar tudo? talvez nao;
#X obj 106 102 - 1;
#X obj 13 202 * 0.01;
#X obj 106 202 * 0.01;
#X obj 13 222 pack f f;
#X obj 136 332 unpack;
#X obj 226 282 r \$0-arrpoint;
#X obj 123 312 pointer;
#X obj 123 452 t p p p p;
#X obj 123 502 + 5;
#X obj 153 572 + 5;
#X obj 226 382 t p p;
#X obj 179 372 - 2;
#X obj 136 372 - 2;
#X obj 123 262 pack;
#X obj 136 352 * 1;
#X obj 179 352 * 1;
#X obj 123 282 t b l;
#X text 185 256 read point;
#X obj 156 332 unpack;
#X obj 246 282 r \$0-arrpoint;
#X obj 143 312 pointer;
#X obj 143 452 t p p p p;
#X obj 143 502 + 5;
#X obj 173 572 + 5;
#X obj 246 382 t p p;
#X obj 199 372 - 2;
#X obj 156 372 - 2;
#X obj 143 262 pack;
#X obj 156 352 * 1;
#X obj 199 352 * 1;
#X obj 143 282 t b l;
#X text 205 256 read point;
#X obj 53 32 inlet;
#X text 94 31 update read point;
#X obj 53 52 t b b b;
#X obj 13 272 spigot 1;
#X obj 68 252 0;
#X obj 38 252 1;
#X obj 88 242 0;
#X obj 58 242 1;
#X obj 13 102 f;
#X obj 106 82 getsize bez-array bez-c-arr;
#X obj 13 162 element bez-array bez-c-arr;
#X obj 13 182 get bez-c x y;
#X obj 137 402 set bez-array rpx;
#X obj 136 422 set bez-array rpy;
#X obj 123 482 get bez-array rpx;
#X obj 133 522 set bez-array rpx.;
#X obj 153 552 get bez-array rpy;
#X obj 163 592 set bez-array rpy.;
#X connect 1 0 31 1;
#X connect 2 0 29 0;
#X connect 3 0 30 0;
#X connect 4 0 31 0;
#X obj 106 82 getsize \$0-bez-array \$0-bez-c-arr;
#X obj 13 162 element \$0-bez-array \$0-bez-c-arr;
#X obj 13 182 get \$0-bez-c x y;
#X obj 156 402 set \$0-bez-array rpx;
#X obj 155 422 set \$0-bez-array rpy;
#X obj 143 482 get \$0-bez-array rpx;
#X obj 153 522 set \$0-bez-array rpx.;
#X obj 173 552 get \$0-bez-array rpy;
#X obj 183 592 set \$0-bez-array rpy.;
#X obj 233 217 inlet;
#X obj 53 342 outlet;
#X obj 53 322 spigot 1;
#X connect 1 0 30 1;
#X connect 2 0 28 0;
#X connect 3 0 29 0;
#X connect 4 0 30 0;
#X connect 5 0 4 4;
#X connect 6 0 8 0;
#X connect 7 0 8 1;
#X connect 8 0 26 0;
#X connect 9 0 19 0;
#X connect 9 1 20 0;
#X connect 6 0 25 0;
#X connect 7 0 40 0;
#X connect 8 0 18 0;
#X connect 8 1 19 0;
#X connect 9 0 10 0;
#X connect 9 0 14 0;
#X connect 10 0 11 0;
#X connect 10 0 15 0;
#X connect 11 0 12 0;
#X connect 11 0 34 0;
#X connect 11 1 35 1;
#X connect 11 2 36 0;
#X connect 11 3 37 1;
#X connect 12 0 35 0;
#X connect 12 1 36 1;
#X connect 12 2 37 0;
#X connect 12 3 38 1;
#X connect 13 0 36 0;
#X connect 14 0 38 0;
#X connect 15 0 34 1;
#X connect 15 1 33 1;
#X connect 16 0 34 0;
#X connect 17 0 33 0;
#X connect 18 0 21 0;
#X connect 19 0 17 0;
#X connect 20 0 16 0;
#X connect 21 0 11 0;
#X connect 21 1 9 0;
#X connect 23 0 25 0;
#X connect 25 0 28 0;
#X connect 25 1 29 0;
#X connect 25 2 27 0;
#X connect 26 0 0 0;
#X connect 27 0 26 1;
#X connect 28 0 26 1;
#X connect 29 0 4 0;
#X connect 30 0 5 0;
#X connect 31 0 32 0;
#X connect 32 0 6 0;
#X connect 32 0 18 0;
#X connect 32 1 7 0;
#X connect 32 1 18 1;
#X connect 35 0 13 0;
#X connect 37 0 14 0;
#X restore 55 162 pd index;
#X connect 13 0 37 0;
#X connect 14 0 33 1;
#X connect 14 1 32 1;
#X connect 15 0 33 0;
#X connect 16 0 32 0;
#X connect 17 0 20 0;
#X connect 18 0 16 0;
#X connect 19 0 15 0;
#X connect 20 0 10 0;
#X connect 20 1 8 0;
#X connect 22 0 24 0;
#X connect 24 0 27 0;
#X connect 24 1 28 0;
#X connect 24 2 26 0;
#X connect 25 0 0 0;
#X connect 26 0 25 1;
#X connect 26 0 40 1;
#X connect 27 0 25 1;
#X connect 27 0 40 1;
#X connect 28 0 4 0;
#X connect 29 0 5 0;
#X connect 30 0 31 0;
#X connect 31 0 6 0;
#X connect 31 0 17 0;
#X connect 31 1 7 0;
#X connect 31 1 17 1;
#X connect 34 0 12 0;
#X connect 36 0 13 0;
#X connect 38 0 28 0;
#X connect 40 0 39 0;
#X restore 65 182 pd index;
#N canvas 0 0 332 180 size 0;
#X obj 18 17 inlet;
#X obj 213 117 r \$0-arrpoint;
......@@ -262,7 +235,7 @@ a escalonar tudo? talvez nao;
#X obj 18 37 moses 2;
#X msg 18 57 2;
#X text 111 16 size \, wenigstens 2 Punkte;
#X obj 18 137 setsize bez-array bez-c-arr;
#X obj 18 137 setsize \$0-bez-array \$0-bez-c-arr;
#X connect 0 0 4 0;
#X connect 1 0 7 1;
#X connect 3 0 7 0;
......@@ -403,30 +376,30 @@ a escalonar tudo? talvez nao;
#X connect 37 0 1 0;
#X restore 52 546 pd convert-to-dump;
#X obj 228 58 route p0 p1 p2 p3;
#X obj 480 236 set bez-array p3x;
#X obj 480 256 set bez-array p3y;
#X obj 340 236 set bez-array p2x;
#X obj 340 256 set bez-array p2y;
#X obj 199 236 set bez-array p1x;
#X obj 200 256 set bez-array p1y;
#X obj 60 236 set bez-array p0x;
#X obj 60 256 set bez-array p0y;
#X obj 47 362 get bez-array p0x;
#X obj 57 402 set bez-array p0x.;
#X obj 77 432 get bez-array p0y;
#X obj 87 472 set bez-array p0y.;
#X obj 267 472 set bez-array p1y.;
#X obj 257 432 get bez-array p1y;
#X obj 237 402 set bez-array p1x.;
#X obj 227 362 get bez-array p1x;
#X obj 407 362 get bez-array p2x;
#X obj 417 402 set bez-array p2x.;
#X obj 437 433 get bez-array p2y;
#X obj 447 472 set bez-array p2y.;
#X obj 626 472 set bez-array p3y.;
#X obj 616 432 get bez-array p3y;
#X obj 596 402 set bez-array p3x.;
#X obj 586 362 get bez-array p3x;
#X obj 480 236 set \$0-bez-array p3x;
#X obj 480 256 set \$0-bez-array p3y;
#X obj 340 236 set \$0-bez-array p2x;
#X obj 340 256 set \$0-bez-array p2y;
#X obj 199 236 set \$0-bez-array p1x;
#X obj 200 256 set \$0-bez-array p1y;
#X obj 60 236 set \$0-bez-array p0x;
#X obj 60 256 set \$0-bez-array p0y;
#X obj 47 362 get \$0-bez-array p0x;
#X obj 57 402 set \$0-bez-array p0x.;
#X obj 77 432 get \$0-bez-array p0y;
#X obj 87 472 set \$0-bez-array p0y.;
#X obj 267 472 set \$0-bez-array p1y.;
#X obj 257 432 get \$0-bez-array p1y;
#X obj 237 402 set \$0-bez-array p1x.;
#X obj 227 362 get \$0-bez-array p1x;
#X obj 407 362 get \$0-bez-array p2x;
#X obj 417 402 set \$0-bez-array p2x.;
#X obj 437 433 get \$0-bez-array p2y;
#X obj 447 472 set \$0-bez-array p2y.;
#X obj 626 472 set \$0-bez-array p3y.;
#X obj 616 432 get \$0-bez-array p3y;
#X obj 596 402 set \$0-bez-array p3x.;
#X obj 586 362 get \$0-bez-array p3x;
#X connect 0 0 16 0;
#X connect 1 0 43 0;
#X connect 1 1 29 0;
......@@ -530,8 +503,8 @@ a escalonar tudo? talvez nao;
#X connect 71 0 21 0;
#X restore 89 342 pd point-befehle;
#X obj 182 362 outlet;
#X obj 110 222 s \$0-dump;
#X obj 110 202 0;
#X obj 110 152 s \$0-dump;
#X obj 110 132 0;
#N canvas 0 0 450 300 size-init 0;
#X obj 154 93 inlet;
#X obj 154 133 sel 0;
......@@ -545,7 +518,7 @@ a escalonar tudo? talvez nao;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 5 0 4 0;
#X restore 334 82 pd size-init;
#X restore 334 72 pd size-init;
#N canvas 0 0 450 300 create-init 0;
#X obj 129 118 pointer;
#X obj 129 78 symbol \$0-bezier-a;
......@@ -554,7 +527,7 @@ a escalonar tudo? talvez nao;
#X msg 129 98 traverse \$1 \, bang;
#X obj 129 138 t b p;
#X obj 129 58 inlet;
#X obj 129 178 append bez-array x y;
#X obj 129 178 append \$0-bez-array x y;
#X connect 0 0 5 0;
#X connect 1 0 4 0;
#X connect 3 0 7 0;
......@@ -563,7 +536,7 @@ a escalonar tudo? talvez nao;
#X connect 5 1 7 2;
#X connect 6 0 1 0;
#X connect 7 0 2 0;
#X restore 351 62 pd create-init;
#X restore 351 52 pd create-init;
#X obj 310 212 t f f;
#X obj 310 232 pack;
#X obj 300 152 route float list;
......@@ -584,7 +557,6 @@ dann muss man nicht die Grafik clicken.;
#X restore 20 252 pd get-pointer;
#X obj 20 212 t b f;
#X msg 89 312 p0 0 0 \, p1 0.1 0.6 \, p2 0.9 0.4 \, p3 1 1;
#X obj 300 32 t b b b b;
#N canvas 0 0 403 272 canvas-init 0;
#X obj 68 104 sel 0;
#X obj 68 124 110;
......@@ -620,62 +592,61 @@ und vielleicht y zu ber
#X restore 300 132 pd canvas-init;
#X obj 300 172 moses 20;
#X msg 300 192 20;
#X obj 160 162 s \$0-read-point-view;
#X obj 200 262 s \$0-read-point-view;
#X obj 20 112 route size float dump canvas readpoint;
#X obj 245 132 t b a;
#X obj 300 12 lbang;
#X obj 433 136 pointer;
#X obj 433 96 symbol \$0-bezier-a;
#X obj 433 156 s \$0-arrpoint;
#X msg 433 116 traverse \$1 \, next \, bang;
#X obj 469 63 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 377 24 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 330 357 ha demasiada accao a passar no patch \, optimizar;
#X text 366 43 depois apagar?;
#X obj 417 132 pointer;
#X obj 417 92 symbol \$0-bezier-a;
#X obj 417 152 s \$0-arrpoint;
#X msg 417 112 traverse \$1 \, next \, bang;
#X text 321 362 ha demasiada accao a passar no patch \, optimizar;
#X text 323 386 botao para adicionar x curvas (p3 da anterior == p0
da seguinte) \, criando uma mega-curva \; tornar tudo variavel \, nr
pontos do array... \; ajustar tamanha dos pontos kr de acordo com o
tamanho do display;
#X connect 0 0 26 0;
#X connect 3 0 4 0;
#X obj 300 32 t b b b b;
#X obj 20 342 t b b;
#X obj 110 202 outlet;
#X connect 0 0 25 0;
#X connect 3 0 35 0;
#X connect 6 0 5 0;
#X connect 6 1 36 0;
#X connect 8 0 4 1;
#X connect 8 1 9 0;
#X connect 11 0 10 0;
#X connect 12 0 26 0;
#X connect 12 0 25 0;
#X connect 14 0 15 0;
#X connect 14 1 15 1;
#X connect 15 0 17 0;
#X connect 16 0 23 0;
#X connect 16 0 22 0;
#X connect 16 1 17 0;
#X connect 17 0 1 0;
#X connect 19 0 18 0;
#X connect 19 1 7 0;
#X connect 20 0 8 0;
#X connect 21 0 22 0;
#X connect 21 1 20 0;
#X connect 21 2 12 0;
#X connect 21 3 30 0;
#X connect 22 0 16 0;
#X connect 23 0 24 0;
#X connect 23 1 14 0;
#X connect 24 0 14 0;
#X connect 26 0 19 0;
#X connect 26 1 6 0;
#X connect 26 2 11 0;
#X connect 26 3 16 0;
#X connect 26 4 25 0;
#X connect 26 5 27 0;
#X connect 27 0 6 1;
#X connect 27 1 8 0;
#X connect 28 0 21 0;
#X connect 21 0 16 0;
#X connect 22 0 23 0;
#X connect 22 1 14 0;
#X connect 23 0 14 0;
#X connect 25 0 19 0;
#X connect 25 1 6 0;
#X connect 25 2 11 0;
#X connect 25 3 16 0;
#X connect 25 4 24 0;
#X connect 25 5 26 0;
#X connect 26 0 6 1;
#X connect 26 1 8 0;
#X connect 27 0 34 0;
#X connect 28 0 30 0;
#X connect 29 0 31 0;
#X connect 30 0 32 0;
#X connect 32 0 29 0;
#X connect 33 0 30 0;
#X connect 34 0 13 0;
#X connect 31 0 28 0;
#X connect 34 0 21 0;
#X connect 34 1 20 0;
#X connect 34 2 12 0;
#X connect 34 3 13 0;
#X connect 35 0 4 0;
#X connect 35 1 6 2;
#X restore 217 30 pd inside;
#X obj 287 10 namecanvas \$0-bezier-a;
#X obj 217 50 outlet;
......@@ -707,7 +678,9 @@ in the documentation and/or other materials provided with the distribution.
#X text 8 7 Copyright 2010 \, Joo Pais;
#X restore 11 721 pd license;
#X text 8 703 (C) 2010 Joo Pais - jmmmpais@googlemail.com;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
#X connect 2 1 5 0;
#X obj 242 70 outlet;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 1 1 7 0;
#X connect 1 2 4 0;
#X coords -20 120 120 -20 110 110 2 0 0;
#N struct 1118-bez-array float x float y array 1118-bez-c-arr 1118-bez-c
float p0x float p0y float p0x. float p0y. float p1x float p1y float
p1x. float p1y. float p2x float p2y float p2x. float p2y. float p3x
float p3y float p3x. float p3y. float rpx float rpy float rpx. float
rpy.;
#N struct 1118-bez-c float x float y;
#N struct 1113-bez-array float x float y array 1113-bez-c-arr 1113-bez-c
float p0x float p0y float p0x. float p0y. float p1x float p1y float
p1x. float p1y. float p2x float p2y float p2x. float p2y. float p3x
float p3y float p3x. float p3y. float rpx float rpy float rpx. float
rpy.;
#N struct 1113-bez-c float x float y;
#N canvas 88 5 921 704 10;
#X floatatom 415 751 5 0 0 0 - - -;
#X obj 418 737 hsl 50 10 0 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 0 0;
#X floatatom 135 205 5 0 0 0 - - -;
#X msg 125 144 canvas \$1;
#X floatatom 135 124 5 0 0 0 - - -;
#X obj 415 717 line;
#X msg 415 697 0 \, 1 3000;
#X obj 135 514 pack;
#X obj 145 494 t b f;
#X msg 258 830 p0 0.25 0.34 \, p1 0.34 0.88 \, p2 0.9 0.4 \, p3 0.85
0.73;
#X text 543 94 Arguments;
#X obj 148 467 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 0 1;
#X obj 148 481 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 0 1;
#X obj 128 870 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 0 1;
#X obj 128 884 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 0 1;
#X text 135 307 default values;
#X text 135 347 also first and last points can take any value;
#X text 222 164 Two values define x and y coordinates;
#X text 131 275 p[0-3] \$1 \$2 - Control one handle point's coordinates
between 0 and 1 Send either a message with all points...;
#X text 115 90 canvas \$1 [\$2] - Change canvas size. One value creates
a square ...;
#X text 172 204 size \$1 - Define array size (minimum 2 points);
#X text 260 799 Dump outlet: connect to a message box \, which you
can later copy-paste.;
#X text 545 173 If no arguments are given \, the default values are
110 100 100 When no y argument is present \, a square with dimensions
of x is created.;
#X text 542 395 But \, even with the points outside of the box \, the
calculations will still work. You only loose mouse control of the graphic
handles.;
#X obj 135 574 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 125 707 bezier~;
#X text 165 634 dump - Dump the coordinates of the control points through
the right outlet. Connect the outlet to a message box \, and it will
get formatted.;
#X text 541 475 Released under the BSD License;
#X text 541 455 (C) 2010 Joo Pais - jmmmpais@googlemail.com;
#X text 20 94 Object size:;
#X text 20 204 Array size:;
#X text 20 274 Control points:;
#X text 20 574 Readpoint:;
#X text 20 634 Dump parameters:;
#X text 546 112 - Array size;
#X text 546 132 - Canvas size x (+ y);
#X text 546 152 - Canvas size y;
#X text 543 224 Inlets;
#X text 543 264 Outlets;
#X text 546 282 - float pair with x / y values;
#X text 546 302 - control point dump;
#X text 153 564 readpoint \$1 - Turn readpoint (red) display on or
off. Readpoint shows the curent place in the buffer.;
#X text 22 39 Create a transfer function between 0 and 1 \, using the
four control points of a cubic bzier curve.;
#X text 546 242 - floats [0 to 1] / commands (with parameters);
#X text 542 336 BUG ALERT: if the control points get out of the GOP
box \, these won't react when you click on them. You'll have to right-click
\, open \, and then inside the abstraction place the points again inside
the red boundaries. Or send pX coordinates.;
#X text 20 74 CONTROL OPTIONS;
#X text 70 704 INPUT;
#X text 70 864 OUTPUT;
#X obj 415 771 s \$0-input;
#X obj 135 687 r \$0-input;
#X text 415 677 Send your input values between 0 and 1 here:;
#X msg 125 327 p0 0 0 \, p1 0.1 0.6 \, p2 0.9 0.4 \, p3 1 1;
#X msg 125 367 p0 0.25 0.34 \, p1 0.34 0.88 \, p2 0.9 0.4 \, p3 0.85
0.73;
#X msg 125 427 p0 0 0 \, p1 0.34 1.3 \, p2 1.4 0.4 \, p3 1 1;
#X msg 125 534 p0 \$1 \$2;
#X text 144 446 Or move the points separately:;
#X msg 125 224 size \$1;
#X msg 125 245 size 100;
#X msg 125 164 canvas 300 100;
#X text 135 387 values outside the 0-1 boundaries will be outside of
the box - you won't be able to grab the graphic (see bug description)
;
#X msg 125 593 readpoint \$1;
#X msg 125 634 dump;
#X text 65 899 Outputs: scaled x and y values;
#X obj 125 830 snaps~;
#X obj 135 850 snaps~;
#N canvas 176 128 494 344 META 0;
#X text 12 55 AUTHOR Joo Pais <jmmmpais@googlemail.com>;
#X text 12 95 LICENSE BSD;
#X text 12 75 LIBRARY jmmmp;
#X text 12 35 KEYWORDS bezier data structures;
#X text 12 135 VERSION 2010;
#X text 12 165 INLET_0 - all instructions;
#X text 12 5 DESCRIPTION Transfer function GUI with one cubic bézier
curve at audio rate;
#X text 12 225 OUTLET_2 - dump current parameters;
#X text 12 185 OUTLET_0 - x values;
#X text 12 205 OUTLET_1 - y values;
#X text 13 115 WEBSITE http://puredata.info/Members/jmmmp;
#X restore 542 496 pd META;
#X text 21 9 [bezier~] - Transfer function GUI with one cubic bézier
curve at audio rate;
#X connect 0 0 48 0;
#X connect 1 0 0 0;
#X connect 2 0 56 0;
#X connect 3 0 25 0;
#X connect 4 0 3 0;
#X connect 5 0 1 0;
#X connect 6 0 5 0;
#X connect 7 0 54 0;
#X connect 8 0 7 0;
#X connect 8 1 7 1;
#X connect 11 0 7 0;
#X connect 12 0 8 0;
#X connect 24 0 60 0;
#X connect 25 0 63 0;
#X connect 25 1 64 0;
#X connect 25 2 9 0;
#X connect 49 0 25 0;
#X connect 51 0 25 0;
#X connect 52 0 25 0;
#X connect 53 0 25 0;
#X connect 54 0 25 0;
#X connect 56 0 25 0;
#X connect 57 0 25 0;
#X connect 58 0 25 0;
#X connect 60 0 25 0;
#X connect 61 0 25 0;
#X connect 63 0 13 0;
#X connect 64 0 14 0;