[SCM] python-pyo/master: updating changelog
tiago at users.alioth.debian.org
tiago at users.alioth.debian.org
Sun Aug 31 00:08:37 UTC 2014
The following commit has been merged in the master branch:
commit 6290be9673d82026e1215afaa6a4daf95e3c69e3
Author: Tiago Bortoletto Vaz <tiago at debian.org>
Date: Sat Aug 30 17:13:06 2014 -0400
updating changelog
diff --git a/ChangeLog b/ChangeLog
index e792be3..7679d2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,31 @@
+2014-08-29 belangeo <belangeo at gmail.com>
+
+ * Release tag: 0.7.0.
+ - rev 1224
+
+2014-08-26 belangeo <belangeo at gmail.com>
+
+ * pyo can now be used without any GUI toolkit (WxPython or TKinter). Widgets are simply disabled.
+ - rev 1208
+
+2014-06-22 belangeo <belangeo at gmail.com>
+
+ * Added Server methods to auto-connect Jack ports to already opened ports.
+ - rev 1201
+
+2014-05-23 belangeo <belangeo at gmail.com>
+
+ * E-Pyo: output log now in realtime.
+ - rev 1197
+
+2014-04-24 belangeo <belangeo at gmail.com>
+
+ * Added new object: Tanh, hyperbolic tangent function on audio signal.
+ - rev 1188
+
-------------------------------------------------------------------------------------
-2013-10-16 belangeo <belangeo at gmail.com>
+2014-04-11 belangeo <belangeo at gmail.com>
* Release tag: 0.6.9.
- rev 1185
diff --git a/debian/changelog b/debian/changelog
index 9bb21b2..7e3d573 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-pyo (0.7) unstable; urgency=medium
+
+ * New upstream version.
+
+ -- Tiago Bortoletto Vaz <tiago at debian.org> Sat, 30 Aug 2014 17:12:30 -0400
+
python-pyo (0.6.9-1) unstable; urgency=medium
* New upstream version.
diff --git a/doc-sphinx/source/api/alphabetical.rst b/doc-sphinx/source/api/alphabetical.rst
index 3ad686f..fe0a450 100644
--- a/doc-sphinx/source/api/alphabetical.rst
+++ b/doc-sphinx/source/api/alphabetical.rst
@@ -219,6 +219,7 @@ Alphabetical class reference
- :py:class:`TableRec` : TableRec is for writing samples into a previously created NewTable.
- :py:class:`TableScale` : Scales all the values contained in a PyoTableObject.
- :py:class:`Tan` : Performs a tangent function on audio signal.
+- :py:class:`Tanh` : Performs a hyperbolic tangent function on audio signal.
- :py:class:`Thresh` : Informs when a signal crosses a threshold.
- :py:class:`Timer` : Reports elapsed time between two trigs.
- :py:class:`Tone` : A first-order recursive low-pass filter with variable frequency response.
diff --git a/doc-sphinx/source/api/classes/arithmetic.rst b/doc-sphinx/source/api/classes/arithmetic.rst
index af5fc7f..757bdfc 100644
--- a/doc-sphinx/source/api/classes/arithmetic.rst
+++ b/doc-sphinx/source/api/classes/arithmetic.rst
@@ -23,6 +23,12 @@ Tools to perform arithmetic operations on audio signals.
.. autoclass:: Tan
:members:
+*Tanh*
+------------
+
+.. autoclass:: Tanh
+ :members:
+
*Abs*
------------
diff --git a/doc-sphinx/source/conf.py b/doc-sphinx/source/conf.py
index 413f581..6e6cb21 100644
--- a/doc-sphinx/source/conf.py
+++ b/doc-sphinx/source/conf.py
@@ -49,9 +49,9 @@ copyright = u'2013, Olivier Bélanger'
# built documents.
#
# The short X.Y version.
-version = '0.6.9'
+version = '0.7.0'
# The full version, including alpha/beta/rc tags.
-release = '0.6.9'
+release = '0.7.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/doc-sphinx/source/index.rst b/doc-sphinx/source/index.rst
index 0698ad1..81aa39c 100644
--- a/doc-sphinx/source/index.rst
+++ b/doc-sphinx/source/index.rst
@@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
-Welcome to the Pyo 0.6.9 documentation
+Welcome to the Pyo 0.7.0 documentation
===================================================
.. toctree::
diff --git a/include/pyomodule.h b/include/pyomodule.h
index d83f8f7..3af5f9a 100644
--- a/include/pyomodule.h
+++ b/include/pyomodule.h
@@ -21,7 +21,7 @@
#include "Python.h"
#include <math.h>
-#define PYO_VERSION "0.6.9"
+#define PYO_VERSION "0.7.0"
#ifndef __MYFLT_DEF
#define __MYFLT_DEF
@@ -106,6 +106,7 @@
#define MYATAN2 atan2f
#define MYEXP expf
#define MYROUND roundf
+#define MYTANH tanhf
#else
#define LIB_BASE_NAME "_pyo64"
@@ -187,7 +188,7 @@
#define MYATAN2 atan2
#define MYEXP exp
#define MYROUND round
-
+#define MYTANH tanh
#endif
#endif
@@ -411,6 +412,7 @@ extern PyTypeObject M_Atan2Type;
extern PyTypeObject M_FloorType;
extern PyTypeObject M_CeilType;
extern PyTypeObject M_RoundType;
+extern PyTypeObject M_TanhType;
extern PyTypeObject FFTMainType;
extern PyTypeObject FFTType;
extern PyTypeObject IFFTType;
@@ -586,11 +588,8 @@ extern PyTypeObject Pointer2Type;
/* INIT INPUT STREAM */
#define INIT_INPUT_STREAM \
if ( PyObject_HasAttrString((PyObject *)inputtmp, "server") == 0 ) { \
- PySys_WriteStderr("TypeError: \"input\" argument must be a PyoObject.\n"); \
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) { \
- PyObject_CallMethod(self->server, "shutdown", NULL); \
- } \
- Py_Exit(1); \
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument must be a PyoObject.\n"); \
+ Py_RETURN_NONE; \
} \
Py_INCREF(inputtmp); \
Py_XDECREF(self->input); \
@@ -728,21 +727,44 @@ extern PyTypeObject Pointer2Type;
return samples;
#define GET_VIEW_TABLE \
- int i, y; \
- int w = 500; \
- int h = 200; \
- int h2 = h/2; \
- int amp = h2 - 2; \
- float step = (float)self->size / (float)(w); \
- PyObject *samples; \
+ int i, y, w, h, h2, amp; \
+ float step; \
+ PyObject *samples, *tuple, *sizetmp = NULL; \
+ \
+ static char *kwlist[] = {"size", NULL}; \
+ \
+ if (! PyArg_ParseTupleAndKeywords(args, kwds, "O", kwlist, &sizetmp)) \
+ return PyInt_FromLong(-1); \
+ \
+ if (sizetmp) { \
+ if (PyTuple_Check(sizetmp)) { \
+ w = PyInt_AsLong(PyTuple_GET_ITEM(sizetmp, 0)); \
+ h = PyInt_AsLong(PyTuple_GET_ITEM(sizetmp, 1)); \
+ } \
+ else if (PyList_Check(sizetmp)) { \
+ w = PyInt_AsLong(PyList_GET_ITEM(sizetmp, 0)); \
+ h = PyInt_AsLong(PyList_GET_ITEM(sizetmp, 1)); \
+ } \
+ else { \
+ w = 500; \
+ h = 200; \
+ } \
+ } \
+ else { \
+ w = 500; \
+ h = 200; \
+ } \
+ h2 = h/2; \
+ amp = h2 - 2; \
+ step = (float)self->size / (float)(w); \
\
- samples = PyList_New(w*4); \
+ samples = PyList_New(w); \
for(i=0; i<w; i++) { \
- y = self->data[(int)(i*step)] * amp + amp; \
- PyList_SetItem(samples, i*4, PyInt_FromLong(i)); \
- PyList_SetItem(samples, i*4+1, PyInt_FromLong(h-y)); \
- PyList_SetItem(samples, i*4+2, PyInt_FromLong(i)); \
- PyList_SetItem(samples, i*4+3, PyInt_FromLong(h-y)); \
+ y = self->data[(int)(i*step)] * amp + amp + 2; \
+ tuple = PyTuple_New(2); \
+ PyTuple_SetItem(tuple, 0, PyInt_FromLong(i)); \
+ PyTuple_SetItem(tuple, 1, PyInt_FromLong(h-y)); \
+ PyList_SetItem(samples, i, tuple); \
} \
\
return samples;
diff --git a/include/servermodule.h b/include/servermodule.h
index 396ed16..5367741 100644
--- a/include/servermodule.h
+++ b/include/servermodule.h
@@ -70,6 +70,8 @@ typedef struct {
char *serverName; /* Only used for jack client name */
int jackautoin; /* jack port auto-connection (on by default) */
int jackautoout; /* jack port auto-connection (on by default) */
+ PyObject *jackAutoConnectInputPorts; /* list of regex to match for jack auto-connection */
+ PyObject *jackAutoConnectOutputPorts; /* list of regex to match for jack auto-connection */
PmStream *in;
PmStream *out;
PmEvent midiEvents[200];
diff --git a/installers/osx/PkgResources_i386/License.rtf b/installers/osx/PkgResources_i386/License.rtf
deleted file mode 100755
index 66b2d2a..0000000
--- a/installers/osx/PkgResources_i386/License.rtf
+++ /dev/null
@@ -1,681 +0,0 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
-{\colortbl;\red255\green255\blue255;}
-\margl1440\margr1440\vieww10100\viewh11340\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
-
-\f0\fs26 \cf0 GNU GENERAL PUBLIC LICENSE\
- Version 3, 29 June 2007\
-\
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\
- Everyone is permitted to copy and distribute verbatim copies\
- of this license document, but changing it is not allowed.\
-\
- Preamble\
-\
- The GNU General Public License is a free, copyleft license for\
-software and other kinds of works.\
-\
- The licenses for most software and other practical works are designed\
-to take away your freedom to share and change the works. By contrast,\
-the GNU General Public License is intended to guarantee your freedom to\
-share and change all versions of a program--to make sure it remains free\
-software for all its users. We, the Free Software Foundation, use the\
-GNU General Public License for most of our software; it applies also to\
-any other work released this way by its authors. You can apply it to\
-your programs, too.\
-\
- When we speak of free software, we are referring to freedom, not\
-price. Our General Public Licenses are designed to make sure that you\
-have the freedom to distribute copies of free software (and charge for\
-them if you wish), that you receive source code or can get it if you\
-want it, that you can change the software or use pieces of it in new\
-free programs, and that you know you can do these things.\
-\
- To protect your rights, we need to prevent others from denying you\
-these rights or asking you to surrender the rights. Therefore, you have\
-certain responsibilities if you distribute copies of the software, or if\
-you modify it: responsibilities to respect the freedom of others.\
-\
- For example, if you distribute copies of such a program, whether\
-gratis or for a fee, you must pass on to the recipients the same\
-freedoms that you received. You must make sure that they, too, receive\
-or can get the source code. And you must show them these terms so they\
-know their rights.\
-\
- Developers that use the GNU GPL protect your rights with two steps:\
-(1) assert copyright on the software, and (2) offer you this License\
-giving you legal permission to copy, distribute and/or modify it.\
-\
- For the developers' and authors' protection, the GPL clearly explains\
-that there is no warranty for this free software. For both users' and\
-authors' sake, the GPL requires that modified versions be marked as\
-changed, so that their problems will not be attributed erroneously to\
-authors of previous versions.\
-\
- Some devices are designed to deny users access to install or run\
-modified versions of the software inside them, although the manufacturer\
-can do so. This is fundamentally incompatible with the aim of\
-protecting users' freedom to change the software. The systematic\
-pattern of such abuse occurs in the area of products for individuals to\
-use, which is precisely where it is most unacceptable. Therefore, we\
-have designed this version of the GPL to prohibit the practice for those\
-products. If such problems arise substantially in other domains, we\
-stand ready to extend this provision to those domains in future versions\
-of the GPL, as needed to protect the freedom of users.\
-\
- Finally, every program is threatened constantly by software patents.\
-States should not allow patents to restrict development and use of\
-software on general-purpose computers, but in those that do, we wish to\
-avoid the special danger that patents applied to a free program could\
-make it effectively proprietary. To prevent this, the GPL assures that\
-patents cannot be used to render the program non-free.\
-\
- The precise terms and conditions for copying, distribution and\
-modification follow.\
-\
- TERMS AND CONDITIONS\
-\
- 0. Definitions.\
-\
- "This License" refers to version 3 of the GNU General Public License.\
-\
- "Copyright" also means copyright-like laws that apply to other kinds of\
-works, such as semiconductor masks.\
-\
- "The Program" refers to any copyrightable work licensed under this\
-License. Each licensee is addressed as "you". "Licensees" and\
-"recipients" may be individuals or organizations.\
-\
- To "modify" a work means to copy from or adapt all or part of the work\
-in a fashion requiring copyright permission, other than the making of an\
-exact copy. The resulting work is called a "modified version" of the\
-earlier work or a work "based on" the earlier work.\
-\
- A "covered work" means either the unmodified Program or a work based\
-on the Program.\
-\
- To "propagate" a work means to do anything with it that, without\
-permission, would make you directly or secondarily liable for\
-infringement under applicable copyright law, except executing it on a\
-computer or modifying a private copy. Propagation includes copying,\
-distribution (with or without modification), making available to the\
-public, and in some countries other activities as well.\
-\
- To "convey" a work means any kind of propagation that enables other\
-parties to make or receive copies. Mere interaction with a user through\
-a computer network, with no transfer of a copy, is not conveying.\
-\
- An interactive user interface displays "Appropriate Legal Notices"\
-to the extent that it includes a convenient and prominently visible\
-feature that (1) displays an appropriate copyright notice, and (2)\
-tells the user that there is no warranty for the work (except to the\
-extent that warranties are provided), that licensees may convey the\
-work under this License, and how to view a copy of this License. If\
-the interface presents a list of user commands or options, such as a\
-menu, a prominent item in the list meets this criterion.\
-\
- 1. Source Code.\
-\
- The "source code" for a work means the preferred form of the work\
-for making modifications to it. "Object code" means any non-source\
-form of a work.\
-\
- A "Standard Interface" means an interface that either is an official\
-standard defined by a recognized standards body, or, in the case of\
-interfaces specified for a particular programming language, one that\
-is widely used among developers working in that language.\
-\
- The "System Libraries" of an executable work include anything, other\
-than the work as a whole, that (a) is included in the normal form of\
-packaging a Major Component, but which is not part of that Major\
-Component, and (b) serves only to enable use of the work with that\
-Major Component, or to implement a Standard Interface for which an\
-implementation is available to the public in source code form. A\
-"Major Component", in this context, means a major essential component\
-(kernel, window system, and so on) of the specific operating system\
-(if any) on which the executable work runs, or a compiler used to\
-produce the work, or an object code interpreter used to run it.\
-\
- The "Corresponding Source" for a work in object code form means all\
-the source code needed to generate, install, and (for an executable\
-work) run the object code and to modify the work, including scripts to\
-control those activities. However, it does not include the work's\
-System Libraries, or general-purpose tools or generally available free\
-programs which are used unmodified in performing those activities but\
-which are not part of the work. For example, Corresponding Source\
-includes interface definition files associated with source files for\
-the work, and the source code for shared libraries and dynamically\
-linked subprograms that the work is specifically designed to require,\
-such as by intimate data communication or control flow between those\
-subprograms and other parts of the work.\
-\
- The Corresponding Source need not include anything that users\
-can regenerate automatically from other parts of the Corresponding\
-Source.\
-\
- The Corresponding Source for a work in source code form is that\
-same work.\
-\
- 2. Basic Permissions.\
-\
- All rights granted under this License are granted for the term of\
-copyright on the Program, and are irrevocable provided the stated\
-conditions are met. This License explicitly affirms your unlimited\
-permission to run the unmodified Program. The output from running a\
-covered work is covered by this License only if the output, given its\
-content, constitutes a covered work. This License acknowledges your\
-rights of fair use or other equivalent, as provided by copyright law.\
-\
- You may make, run and propagate covered works that you do not\
-convey, without conditions so long as your license otherwise remains\
-in force. You may convey covered works to others for the sole purpose\
-of having them make modifications exclusively for you, or provide you\
-with facilities for running those works, provided that you comply with\
-the terms of this License in conveying all material for which you do\
-not control copyright. Those thus making or running the covered works\
-for you must do so exclusively on your behalf, under your direction\
-and control, on terms that prohibit them from making any copies of\
-your copyrighted material outside their relationship with you.\
-\
- Conveying under any other circumstances is permitted solely under\
-the conditions stated below. Sublicensing is not allowed; section 10\
-makes it unnecessary.\
-\
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\
-\
- No covered work shall be deemed part of an effective technological\
-measure under any applicable law fulfilling obligations under article\
-11 of the WIPO copyright treaty adopted on 20 December 1996, or\
-similar laws prohibiting or restricting circumvention of such\
-measures.\
-\
- When you convey a covered work, you waive any legal power to forbid\
-circumvention of technological measures to the extent such circumvention\
-is effected by exercising rights under this License with respect to\
-the covered work, and you disclaim any intention to limit operation or\
-modification of the work as a means of enforcing, against the work's\
-users, your or third parties' legal rights to forbid circumvention of\
-technological measures.\
-\
- 4. Conveying Verbatim Copies.\
-\
- You may convey verbatim copies of the Program's source code as you\
-receive it, in any medium, provided that you conspicuously and\
-appropriately publish on each copy an appropriate copyright notice;\
-keep intact all notices stating that this License and any\
-non-permissive terms added in accord with section 7 apply to the code;\
-keep intact all notices of the absence of any warranty; and give all\
-recipients a copy of this License along with the Program.\
-\
- You may charge any price or no price for each copy that you convey,\
-and you may offer support or warranty protection for a fee.\
-\
- 5. Conveying Modified Source Versions.\
-\
- You may convey a work based on the Program, or the modifications to\
-produce it from the Program, in the form of source code under the\
-terms of section 4, provided that you also meet all of these conditions:\
-\
- a) The work must carry prominent notices stating that you modified\
- it, and giving a relevant date.\
-\
- b) The work must carry prominent notices stating that it is\
- released under this License and any conditions added under section\
- 7. This requirement modifies the requirement in section 4 to\
- "keep intact all notices".\
-\
- c) You must license the entire work, as a whole, under this\
- License to anyone who comes into possession of a copy. This\
- License will therefore apply, along with any applicable section 7\
- additional terms, to the whole of the work, and all its parts,\
- regardless of how they are packaged. This License gives no\
- permission to license the work in any other way, but it does not\
- invalidate such permission if you have separately received it.\
-\
- d) If the work has interactive user interfaces, each must display\
- Appropriate Legal Notices; however, if the Program has interactive\
- interfaces that do not display Appropriate Legal Notices, your\
- work need not make them do so.\
-\
- A compilation of a covered work with other separate and independent\
-works, which are not by their nature extensions of the covered work,\
-and which are not combined with it such as to form a larger program,\
-in or on a volume of a storage or distribution medium, is called an\
-"aggregate" if the compilation and its resulting copyright are not\
-used to limit the access or legal rights of the compilation's users\
-beyond what the individual works permit. Inclusion of a covered work\
-in an aggregate does not cause this License to apply to the other\
-parts of the aggregate.\
-\
- 6. Conveying Non-Source Forms.\
-\
- You may convey a covered work in object code form under the terms\
-of sections 4 and 5, provided that you also convey the\
-machine-readable Corresponding Source under the terms of this License,\
-in one of these ways:\
-\
- a) Convey the object code in, or embodied in, a physical product\
- (including a physical distribution medium), accompanied by the\
- Corresponding Source fixed on a durable physical medium\
- customarily used for software interchange.\
-\
- b) Convey the object code in, or embodied in, a physical product\
- (including a physical distribution medium), accompanied by a\
- written offer, valid for at least three years and valid for as\
- long as you offer spare parts or customer support for that product\
- model, to give anyone who possesses the object code either (1) a\
- copy of the Corresponding Source for all the software in the\
- product that is covered by this License, on a durable physical\
- medium customarily used for software interchange, for a price no\
- more than your reasonable cost of physically performing this\
- conveying of source, or (2) access to copy the\
- Corresponding Source from a network server at no charge.\
-\
- c) Convey individual copies of the object code with a copy of the\
- written offer to provide the Corresponding Source. This\
- alternative is allowed only occasionally and noncommercially, and\
- only if you received the object code with such an offer, in accord\
- with subsection 6b.\
-\
- d) Convey the object code by offering access from a designated\
- place (gratis or for a charge), and offer equivalent access to the\
- Corresponding Source in the same way through the same place at no\
- further charge. You need not require recipients to copy the\
- Corresponding Source along with the object code. If the place to\
- copy the object code is a network server, the Corresponding Source\
- may be on a different server (operated by you or a third party)\
- that supports equivalent copying facilities, provided you maintain\
- clear directions next to the object code saying where to find the\
- Corresponding Source. Regardless of what server hosts the\
- Corresponding Source, you remain obligated to ensure that it is\
- available for as long as needed to satisfy these requirements.\
-\
- e) Convey the object code using peer-to-peer transmission, provided\
- you inform other peers where the object code and Corresponding\
- Source of the work are being offered to the general public at no\
- charge under subsection 6d.\
-\
- A separable portion of the object code, whose source code is excluded\
-from the Corresponding Source as a System Library, need not be\
-included in conveying the object code work.\
-\
- A "User Product" is either (1) a "consumer product", which means any\
-tangible personal property which is normally used for personal, family,\
-or household purposes, or (2) anything designed or sold for incorporation\
-into a dwelling. In determining whether a product is a consumer product,\
-doubtful cases shall be resolved in favor of coverage. For a particular\
-product received by a particular user, "normally used" refers to a\
-typical or common use of that class of product, regardless of the status\
-of the particular user or of the way in which the particular user\
-actually uses, or expects or is expected to use, the product. A product\
-is a consumer product regardless of whether the product has substantial\
-commercial, industrial or non-consumer uses, unless such uses represent\
-the only significant mode of use of the product.\
-\
- "Installation Information" for a User Product means any methods,\
-procedures, authorization keys, or other information required to install\
-and execute modified versions of a covered work in that User Product from\
-a modified version of its Corresponding Source. The information must\
-suffice to ensure that the continued functioning of the modified object\
-code is in no case prevented or interfered with solely because\
-modification has been made.\
-\
- If you convey an object code work under this section in, or with, or\
-specifically for use in, a User Product, and the conveying occurs as\
-part of a transaction in which the right of possession and use of the\
-User Product is transferred to the recipient in perpetuity or for a\
-fixed term (regardless of how the transaction is characterized), the\
-Corresponding Source conveyed under this section must be accompanied\
-by the Installation Information. But this requirement does not apply\
-if neither you nor any third party retains the ability to install\
-modified object code on the User Product (for example, the work has\
-been installed in ROM).\
-\
- The requirement to provide Installation Information does not include a\
-requirement to continue to provide support service, warranty, or updates\
-for a work that has been modified or installed by the recipient, or for\
-the User Product in which it has been modified or installed. Access to a\
-network may be denied when the modification itself materially and\
-adversely affects the operation of the network or violates the rules and\
-protocols for communication across the network.\
-\
- Corresponding Source conveyed, and Installation Information provided,\
-in accord with this section must be in a format that is publicly\
-documented (and with an implementation available to the public in\
-source code form), and must require no special password or key for\
-unpacking, reading or copying.\
-\
- 7. Additional Terms.\
-\
- "Additional permissions" are terms that supplement the terms of this\
-License by making exceptions from one or more of its conditions.\
-Additional permissions that are applicable to the entire Program shall\
-be treated as though they were included in this License, to the extent\
-that they are valid under applicable law. If additional permissions\
-apply only to part of the Program, that part may be used separately\
-under those permissions, but the entire Program remains governed by\
-this License without regard to the additional permissions.\
-\
- When you convey a copy of a covered work, you may at your option\
-remove any additional permissions from that copy, or from any part of\
-it. (Additional permissions may be written to require their own\
-removal in certain cases when you modify the work.) You may place\
-additional permissions on material, added by you to a covered work,\
-for which you have or can give appropriate copyright permission.\
-\
- Notwithstanding any other provision of this License, for material you\
-add to a covered work, you may (if authorized by the copyright holders of\
-that material) supplement the terms of this License with terms:\
-\
- a) Disclaiming warranty or limiting liability differently from the\
- terms of sections 15 and 16 of this License; or\
-\
- b) Requiring preservation of specified reasonable legal notices or\
- author attributions in that material or in the Appropriate Legal\
- Notices displayed by works containing it; or\
-\
- c) Prohibiting misrepresentation of the origin of that material, or\
- requiring that modified versions of such material be marked in\
- reasonable ways as different from the original version; or\
-\
- d) Limiting the use for publicity purposes of names of licensors or\
- authors of the material; or\
-\
- e) Declining to grant rights under trademark law for use of some\
- trade names, trademarks, or service marks; or\
-\
- f) Requiring indemnification of licensors and authors of that\
- material by anyone who conveys the material (or modified versions of\
- it) with contractual assumptions of liability to the recipient, for\
- any liability that these contractual assumptions directly impose on\
- those licensors and authors.\
-\
- All other non-permissive additional terms are considered "further\
-restrictions" within the meaning of section 10. If the Program as you\
-received it, or any part of it, contains a notice stating that it is\
-governed by this License along with a term that is a further\
-restriction, you may remove that term. If a license document contains\
-a further restriction but permits relicensing or conveying under this\
-License, you may add to a covered work material governed by the terms\
-of that license document, provided that the further restriction does\
-not survive such relicensing or conveying.\
-\
- If you add terms to a covered work in accord with this section, you\
-must place, in the relevant source files, a statement of the\
-additional terms that apply to those files, or a notice indicating\
-where to find the applicable terms.\
-\
- Additional terms, permissive or non-permissive, may be stated in the\
-form of a separately written license, or stated as exceptions;\
-the above requirements apply either way.\
-\
- 8. Termination.\
-\
- You may not propagate or modify a covered work except as expressly\
-provided under this License. Any attempt otherwise to propagate or\
-modify it is void, and will automatically terminate your rights under\
-this License (including any patent licenses granted under the third\
-paragraph of section 11).\
-\
- However, if you cease all violation of this License, then your\
-license from a particular copyright holder is reinstated (a)\
-provisionally, unless and until the copyright holder explicitly and\
-finally terminates your license, and (b) permanently, if the copyright\
-holder fails to notify you of the violation by some reasonable means\
-prior to 60 days after the cessation.\
-\
- Moreover, your license from a particular copyright holder is\
-reinstated permanently if the copyright holder notifies you of the\
-violation by some reasonable means, this is the first time you have\
-received notice of violation of this License (for any work) from that\
-copyright holder, and you cure the violation prior to 30 days after\
-your receipt of the notice.\
-\
- Termination of your rights under this section does not terminate the\
-licenses of parties who have received copies or rights from you under\
-this License. If your rights have been terminated and not permanently\
-reinstated, you do not qualify to receive new licenses for the same\
-material under section 10.\
-\
- 9. Acceptance Not Required for Having Copies.\
-\
- You are not required to accept this License in order to receive or\
-run a copy of the Program. Ancillary propagation of a covered work\
-occurring solely as a consequence of using peer-to-peer transmission\
-to receive a copy likewise does not require acceptance. However,\
-nothing other than this License grants you permission to propagate or\
-modify any covered work. These actions infringe copyright if you do\
-not accept this License. Therefore, by modifying or propagating a\
-covered work, you indicate your acceptance of this License to do so.\
-\
- 10. Automatic Licensing of Downstream Recipients.\
-\
- Each time you convey a covered work, the recipient automatically\
-receives a license from the original licensors, to run, modify and\
-propagate that work, subject to this License. You are not responsible\
-for enforcing compliance by third parties with this License.\
-\
- An "entity transaction" is a transaction transferring control of an\
-organization, or substantially all assets of one, or subdividing an\
-organization, or merging organizations. If propagation of a covered\
-work results from an entity transaction, each party to that\
-transaction who receives a copy of the work also receives whatever\
-licenses to the work the party's predecessor in interest had or could\
-give under the previous paragraph, plus a right to possession of the\
-Corresponding Source of the work from the predecessor in interest, if\
-the predecessor has it or can get it with reasonable efforts.\
-\
- You may not impose any further restrictions on the exercise of the\
-rights granted or affirmed under this License. For example, you may\
-not impose a license fee, royalty, or other charge for exercise of\
-rights granted under this License, and you may not initiate litigation\
-(including a cross-claim or counterclaim in a lawsuit) alleging that\
-any patent claim is infringed by making, using, selling, offering for\
-sale, or importing the Program or any portion of it.\
-\
- 11. Patents.\
-\
- A "contributor" is a copyright holder who authorizes use under this\
-License of the Program or a work on which the Program is based. The\
-work thus licensed is called the contributor's "contributor version".\
-\
- A contributor's "essential patent claims" are all patent claims\
-owned or controlled by the contributor, whether already acquired or\
-hereafter acquired, that would be infringed by some manner, permitted\
-by this License, of making, using, or selling its contributor version,\
-but do not include claims that would be infringed only as a\
-consequence of further modification of the contributor version. For\
-purposes of this definition, "control" includes the right to grant\
-patent sublicenses in a manner consistent with the requirements of\
-this License.\
-\
- Each contributor grants you a non-exclusive, worldwide, royalty-free\
-patent license under the contributor's essential patent claims, to\
-make, use, sell, offer for sale, import and otherwise run, modify and\
-propagate the contents of its contributor version.\
-\
- In the following three paragraphs, a "patent license" is any express\
-agreement or commitment, however denominated, not to enforce a patent\
-(such as an express permission to practice a patent or covenant not to\
-sue for patent infringement). To "grant" such a patent license to a\
-party means to make such an agreement or commitment not to enforce a\
-patent against the party.\
-\
- If you convey a covered work, knowingly relying on a patent license,\
-and the Corresponding Source of the work is not available for anyone\
-to copy, free of charge and under the terms of this License, through a\
-publicly available network server or other readily accessible means,\
-then you must either (1) cause the Corresponding Source to be so\
-available, or (2) arrange to deprive yourself of the benefit of the\
-patent license for this particular work, or (3) arrange, in a manner\
-consistent with the requirements of this License, to extend the patent\
-license to downstream recipients. "Knowingly relying" means you have\
-actual knowledge that, but for the patent license, your conveying the\
-covered work in a country, or your recipient's use of the covered work\
-in a country, would infringe one or more identifiable patents in that\
-country that you have reason to believe are valid.\
-\
- If, pursuant to or in connection with a single transaction or\
-arrangement, you convey, or propagate by procuring conveyance of, a\
-covered work, and grant a patent license to some of the parties\
-receiving the covered work authorizing them to use, propagate, modify\
-or convey a specific copy of the covered work, then the patent license\
-you grant is automatically extended to all recipients of the covered\
-work and works based on it.\
-\
- A patent license is "discriminatory" if it does not include within\
-the scope of its coverage, prohibits the exercise of, or is\
-conditioned on the non-exercise of one or more of the rights that are\
-specifically granted under this License. You may not convey a covered\
-work if you are a party to an arrangement with a third party that is\
-in the business of distributing software, under which you make payment\
-to the third party based on the extent of your activity of conveying\
-the work, and under which the third party grants, to any of the\
-parties who would receive the covered work from you, a discriminatory\
-patent license (a) in connection with copies of the covered work\
-conveyed by you (or copies made from those copies), or (b) primarily\
-for and in connection with specific products or compilations that\
-contain the covered work, unless you entered into that arrangement,\
-or that patent license was granted, prior to 28 March 2007.\
-\
- Nothing in this License shall be construed as excluding or limiting\
-any implied license or other defenses to infringement that may\
-otherwise be available to you under applicable patent law.\
-\
- 12. No Surrender of Others' Freedom.\
-\
- If conditions are imposed on you (whether by court order, agreement or\
-otherwise) that contradict the conditions of this License, they do not\
-excuse you from the conditions of this License. If you cannot convey a\
-covered work so as to satisfy simultaneously your obligations under this\
-License and any other pertinent obligations, then as a consequence you may\
-not convey it at all. For example, if you agree to terms that obligate you\
-to collect a royalty for further conveying from those to whom you convey\
-the Program, the only way you could satisfy both those terms and this\
-License would be to refrain entirely from conveying the Program.\
-\
- 13. Use with the GNU Affero General Public License.\
-\
- Notwithstanding any other provision of this License, you have\
-permission to link or combine any covered work with a work licensed\
-under version 3 of the GNU Affero General Public License into a single\
-combined work, and to convey the resulting work. The terms of this\
-License will continue to apply to the part which is the covered work,\
-but the special requirements of the GNU Affero General Public License,\
-section 13, concerning interaction through a network will apply to the\
-combination as such.\
-\
- 14. Revised Versions of this License.\
-\
- The Free Software Foundation may publish revised and/or new versions of\
-the GNU General Public License from time to time. Such new versions will\
-be similar in spirit to the present version, but may differ in detail to\
-address new problems or concerns.\
-\
- Each version is given a distinguishing version number. If the\
-Program specifies that a certain numbered version of the GNU General\
-Public License "or any later version" applies to it, you have the\
-option of following the terms and conditions either of that numbered\
-version or of any later version published by the Free Software\
-Foundation. If the Program does not specify a version number of the\
-GNU General Public License, you may choose any version ever published\
-by the Free Software Foundation.\
-\
- If the Program specifies that a proxy can decide which future\
-versions of the GNU General Public License can be used, that proxy's\
-public statement of acceptance of a version permanently authorizes you\
-to choose that version for the Program.\
-\
- Later license versions may give you additional or different\
-permissions. However, no additional obligations are imposed on any\
-author or copyright holder as a result of your choosing to follow a\
-later version.\
-\
- 15. Disclaimer of Warranty.\
-\
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\
-\
- 16. Limitation of Liability.\
-\
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\
-SUCH DAMAGES.\
-\
- 17. Interpretation of Sections 15 and 16.\
-\
- If the disclaimer of warranty and limitation of liability provided\
-above cannot be given local legal effect according to their terms,\
-reviewing courts shall apply local law that most closely approximates\
-an absolute waiver of all civil liability in connection with the\
-Program, unless a warranty or assumption of liability accompanies a\
-copy of the Program in return for a fee.\
-\
- END OF TERMS AND CONDITIONS\
-\
- How to Apply These Terms to Your New Programs\
-\
- If you develop a new program, and you want it to be of the greatest\
-possible use to the public, the best way to achieve this is to make it\
-free software which everyone can redistribute and change under these terms.\
-\
- To do so, attach the following notices to the program. It is safest\
-to attach them to the start of each source file to most effectively\
-state the exclusion of warranty; and each file should have at least\
-the "copyright" line and a pointer to where the full notice is found.\
-\
- <one line to give the program's name and a brief idea of what it does.>\
- Copyright (C) <year> <name of author>\
-\
- This program is free software: you can redistribute it and/or modify\
- it under the terms of the GNU General Public License as published by\
- the Free Software Foundation, either version 3 of the License, or\
- (at your option) any later version.\
-\
- This program is distributed in the hope that it will be useful,\
- but WITHOUT ANY WARRANTY; without even the implied warranty of\
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\
- GNU General Public License for more details.\
-\
- You should have received a copy of the GNU General Public License\
- along with this program. If not, see <http://www.gnu.org/licenses/>.\
-\
-Also add information on how to contact you by electronic and paper mail.\
-\
- If the program does terminal interaction, make it output a short\
-notice like this when it starts in an interactive mode:\
-\
- <program> Copyright (C) <year> <name of author>\
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\
- This is free software, and you are welcome to redistribute it\
- under certain conditions; type `show c' for details.\
-\
-The hypothetical commands `show w' and `show c' should show the appropriate\
-parts of the General Public License. Of course, your program's commands\
-might be different; for a GUI interface, you would use an "about box".\
-\
- You should also get your employer (if you work as a programmer) or school,\
-if any, to sign a "copyright disclaimer" for the program, if necessary.\
-For more information on this, and how to apply and follow the GNU GPL, see\
-<http://www.gnu.org/licenses/>.\
-\
- The GNU General Public License does not permit incorporating your program\
-into proprietary programs. If your program is a subroutine library, you\
-may consider it more useful to permit linking proprietary applications with\
-the library. If this is what you want to do, use the GNU Lesser General\
-Public License instead of this License. But first, please read\
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.\
-}
\ No newline at end of file
diff --git a/installers/osx/PkgResources_i386/ReadMe.rtf b/installers/osx/PkgResources_i386/ReadMe.rtf
deleted file mode 100755
index ab49df1..0000000
--- a/installers/osx/PkgResources_i386/ReadMe.rtf
+++ /dev/null
@@ -1,92 +0,0 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\froman\fcharset0 Times-Roman;}
-{\colortbl;\red255\green255\blue255;}
-\margl1440\margr1440\vieww14120\viewh11700\viewkind0
-\deftab720
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\f0\fs26 \cf0 pyo (version 0.6.6)
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-\cf0 System requirements : OS X 10.5 or higher
-\f1\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\f0\fs26 \cf0 \
-This package installs all the required components to run pyo inside your current Python installation. Python 2.5, 2.6 (preferred) or 2.7 (32-bit Mac OS X Installer) must be already installed on your system.
-\f1\fs24 \
-
-\f0\fs26 \
-This package is divided into two separate installers. If you do not require one of them, please unselect the package in custom installation mode.
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\b \cf0 1. pyo extension:
-\f1\b0\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\f0\fs26 \cf0 The following components will be installed in the site-packages folder of the current Python Framework:
-\f1\fs24 \
-
-\f0\fs26 \
-_pyo.so
-\f1\fs24 \
-
-\f0\fs26 _pyo64.so
-\f1\fs24 \
-
-\f0\fs26 pyo.py
-\f1\fs24 \
-
-\f0\fs26 pyo64.py
-\f1\fs24 \
-
-\f0\fs26 pyolib (folder)
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\b \cf0 2. Support libraries (i386):
-\f1\b0\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\f0\fs26 \cf0 This component will install a number of dynamic libraries on which pyo depends. If you already have these, then you can skip this installation.
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\b \cf0 Warning:
-\b0 this installation will overwrite any previously installed libraries. These are the libraries that will be installed in your /usr/local/lib directory:
-\f1\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-
-\f0\fs26 \cf0 \
-liblo.0.dylib
-\f1\fs24 \
-
-\f0\fs26 libportaudio.2.dylib
-\f1\fs24 \
-
-\f0\fs26 libportmidi.dylib
-\f1\fs24 \
-
-\f0\fs26 libsndfile.1.dylib
-\f1\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\f0\fs26 \cf0 libFLAC.8.dylib\
-libvorbisenc.2.dylib\
-libvorbis.0.dylib\
-libogg.0.dylib\
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720
-\cf0 \
-\pard\pardeftab720\ql\qnatural
-\cf0 Olivier B\'e9langer, 2013
-\f1\fs24 \
-}
\ No newline at end of file
diff --git a/installers/osx/PkgResources_i386/Welcome.rtf b/installers/osx/PkgResources_i386/Welcome.rtf
deleted file mode 100755
index b8b9917..0000000
--- a/installers/osx/PkgResources_i386/Welcome.rtf
+++ /dev/null
@@ -1,7 +0,0 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
-{\colortbl;\red255\green255\blue255;}
-\margl1440\margr1440\vieww10100\viewh11340\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
-
-\f0\fs26 \cf0 You are about to install pyo in your computer. This includes the pyo Python module and support libs.}
\ No newline at end of file
diff --git a/installers/osx/PkgResources_i386/postinstall b/installers/osx/PkgResources_i386/postinstall
deleted file mode 100755
index 21e721a..0000000
--- a/installers/osx/PkgResources_i386/postinstall
+++ /dev/null
@@ -1,106 +0,0 @@
-#! /bin/sh
-
-VERSION=`sw_vers -productVersion | sed -e 's/\.//g'`
-
-if [ $VERSION -ge '1070' ]; then
- echo "Install pyo on OSX 10.7";
-elif [ $VERSION -ge '1060' ]; then
- echo "Install pyo on OSX 10.6";
-else
- echo "Install pyo on OSX 10.5";
-fi
-
-# Removed older versions in the python site-packages builtin directories
-# Removed older versions in the python site-packages from python.org install directories
-PATHS=/Library/Python/2.5/site-packages/:/Library/Python/2.6/site-packages/:/Library/Python/2.7/site-packages/:/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/:/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
-for path in ${PATHS//:/ }; do
- if cd $path; then
- if [ -f pyo.py ]; then
- sudo rm pyo.py;
- fi
- if [ -f pyo64.py ]; then
- sudo rm pyo64.py;
- fi
- if [ -f pyo.pyc ]; then
- sudo rm pyo.pyc;
- fi
- if [ -f pyo64.pyc ]; then
- sudo rm pyo64.pyc;
- fi
- if [ -f _pyo.so ]; then
- sudo rm _pyo.so;
- fi
- if [ -f _pyo64.so ]; then
- sudo rm _pyo64.so;
- fi
- if [ -d pyolib ]; then
- sudo rm -rf pyolib/;
- fi
- ls -1 pyo*-info > /dev/null 2>&1
- if [ "$?" = "0" ]; then
- sudo rm pyo*-info;
- fi
- fi
-done
-
-# Install pyo in the python site-packages builtin directories
-if [ $VERSION -ge '1070' ]; then
- if cd /Library/Python/2.7/site-packages/; then
- sudo cp -r /tmp/python27/* .
- else
- sudo mkdir -p /Library/Python/2.7/site-packages/
- cd /Library/Python/2.7/site-packages/
- sudo cp -r /tmp/python27/* .
- fi
-else
- if cd /Library/Python/2.6/site-packages/; then
- sudo cp -r /tmp/python26/* .
- else
- sudo mkdir -p /Library/Python/2.6/site-packages/
- cd /Library/Python/2.6/site-packages/
- sudo cp -r /tmp/python26/* .
- fi
-fi
-
-# Install pyo in the python site-packages from python.org install directories
-if cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/; then
- sudo cp -r /tmp/python26/* .
-else
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
- cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
- sudo cp -r /tmp/python26/* .
-fi
-
-if cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/; then
- sudo cp -r /tmp/python27/* .
-else
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
- cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
- sudo cp -r /tmp/python27/* .
-fi
-
-sudo rm -rf /tmp/python2*
-
-# Add /usr/local/lib in .bash_profile if not already done
-searchString="/usr/local/lib"
-
-if [ -f ~/.bash_profile ]; then
- if `cat ~/.bash_profile | grep "${searchString}" 1>/dev/null 2>&1`; then
- echo "path already in PATH variable";
- else
- echo "adding path to .bash_profile..."
- echo "export PATH=/usr/local/lib:/usr/local/bin:\$PATH" >> ~/.bash_profile;
- fi
-else
- echo "creating .bash_profile and adding path to it..."
- echo "export PATH=/usr/local/lib:/usr/local/bin:\$PATH" > ~/.bash_profile;
-fi
-
-# Add VERSIONER_PYTHON_PREFER_32_BIT in .bash_profile if not already done
-searchString="VERSIONER_PYTHON_PREFER_32_BIT"
-
-if `cat ~/.bash_profile | grep "${searchString}" 1>/dev/null 2>&1`; then
- echo "Variable VERSIONER_PYTHON_PREFER_32_BIT already set.";
-else
- echo "export VERSIONER_PYTHON_PREFER_32_BIT=yes" >> ~/.bash_profile;
-fi
diff --git a/installers/osx/PkgResources_i386/postupgrade b/installers/osx/PkgResources_i386/postupgrade
deleted file mode 100755
index 21e721a..0000000
--- a/installers/osx/PkgResources_i386/postupgrade
+++ /dev/null
@@ -1,106 +0,0 @@
-#! /bin/sh
-
-VERSION=`sw_vers -productVersion | sed -e 's/\.//g'`
-
-if [ $VERSION -ge '1070' ]; then
- echo "Install pyo on OSX 10.7";
-elif [ $VERSION -ge '1060' ]; then
- echo "Install pyo on OSX 10.6";
-else
- echo "Install pyo on OSX 10.5";
-fi
-
-# Removed older versions in the python site-packages builtin directories
-# Removed older versions in the python site-packages from python.org install directories
-PATHS=/Library/Python/2.5/site-packages/:/Library/Python/2.6/site-packages/:/Library/Python/2.7/site-packages/:/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/:/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
-for path in ${PATHS//:/ }; do
- if cd $path; then
- if [ -f pyo.py ]; then
- sudo rm pyo.py;
- fi
- if [ -f pyo64.py ]; then
- sudo rm pyo64.py;
- fi
- if [ -f pyo.pyc ]; then
- sudo rm pyo.pyc;
- fi
- if [ -f pyo64.pyc ]; then
- sudo rm pyo64.pyc;
- fi
- if [ -f _pyo.so ]; then
- sudo rm _pyo.so;
- fi
- if [ -f _pyo64.so ]; then
- sudo rm _pyo64.so;
- fi
- if [ -d pyolib ]; then
- sudo rm -rf pyolib/;
- fi
- ls -1 pyo*-info > /dev/null 2>&1
- if [ "$?" = "0" ]; then
- sudo rm pyo*-info;
- fi
- fi
-done
-
-# Install pyo in the python site-packages builtin directories
-if [ $VERSION -ge '1070' ]; then
- if cd /Library/Python/2.7/site-packages/; then
- sudo cp -r /tmp/python27/* .
- else
- sudo mkdir -p /Library/Python/2.7/site-packages/
- cd /Library/Python/2.7/site-packages/
- sudo cp -r /tmp/python27/* .
- fi
-else
- if cd /Library/Python/2.6/site-packages/; then
- sudo cp -r /tmp/python26/* .
- else
- sudo mkdir -p /Library/Python/2.6/site-packages/
- cd /Library/Python/2.6/site-packages/
- sudo cp -r /tmp/python26/* .
- fi
-fi
-
-# Install pyo in the python site-packages from python.org install directories
-if cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/; then
- sudo cp -r /tmp/python26/* .
-else
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
- cd /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
- sudo cp -r /tmp/python26/* .
-fi
-
-if cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/; then
- sudo cp -r /tmp/python27/* .
-else
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
- cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
- sudo cp -r /tmp/python27/* .
-fi
-
-sudo rm -rf /tmp/python2*
-
-# Add /usr/local/lib in .bash_profile if not already done
-searchString="/usr/local/lib"
-
-if [ -f ~/.bash_profile ]; then
- if `cat ~/.bash_profile | grep "${searchString}" 1>/dev/null 2>&1`; then
- echo "path already in PATH variable";
- else
- echo "adding path to .bash_profile..."
- echo "export PATH=/usr/local/lib:/usr/local/bin:\$PATH" >> ~/.bash_profile;
- fi
-else
- echo "creating .bash_profile and adding path to it..."
- echo "export PATH=/usr/local/lib:/usr/local/bin:\$PATH" > ~/.bash_profile;
-fi
-
-# Add VERSIONER_PYTHON_PREFER_32_BIT in .bash_profile if not already done
-searchString="VERSIONER_PYTHON_PREFER_32_BIT"
-
-if `cat ~/.bash_profile | grep "${searchString}" 1>/dev/null 2>&1`; then
- echo "Variable VERSIONER_PYTHON_PREFER_32_BIT already set.";
-else
- echo "export VERSIONER_PYTHON_PREFER_32_BIT=yes" >> ~/.bash_profile;
-fi
diff --git a/installers/osx/PkgResources_x86_64/ReadMe.rtf b/installers/osx/PkgResources_x86_64/ReadMe.rtf
index 511c18c..c1b7f9a 100755
--- a/installers/osx/PkgResources_x86_64/ReadMe.rtf
+++ b/installers/osx/PkgResources_x86_64/ReadMe.rtf
@@ -1,88 +1,82 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\froman\fcharset0 Times-Roman;}
-{\colortbl;\red255\green255\blue255;}
-\margl1440\margr1440\vieww13160\viewh13300\viewkind0
-\deftab720
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\f0\fs26 \cf0 pyo (version 0.6.6)
-\f1\fs24 \
-
-\f0\fs26 \
-System requirements : OS X 10.6 to 10.8
-\f1\fs24 \
-
-\f0\fs26 \
-This package installs all the required components to run pyo inside your current Python installation. Python 2.6 or 2.7 (32/64 bit) must be already installed on your system.
-\f1\fs24 \
-
-\f0\fs26 \
-This package is divided into two separate installers. If you do not require one of them, please unselect the package in custom installation mode.
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\b \cf0 1. pyo extension:
-\f1\b0\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\f0\fs26 \cf0 The following components will be installed in the site-packages folder of the current Python Framework:
-\f1\fs24 \
-
-\f0\fs26 \
-_pyo.so
-\f1\fs24 \
-
-\f0\fs26 _pyo64.so
-\f1\fs24 \
-
-\f0\fs26 pyo.py
-\f1\fs24 \
-
-\f0\fs26 pyo64.py
-\f1\fs24 \
-
-\f0\fs26 pyolib (folder)
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\b \cf0 2. Support libraries (i386 and x86_64):
-\f1\b0\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\f0\fs26 \cf0 This component will install a number of dynamic libraries on which pyo depends. If you already have these, then you can skip this installation.
-\f1\fs24 \
-
-\f0\fs26 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\b \cf0 Warning:
-\b0 this installation will overwrite any previously installed libraries. These are the libraries that will be installed in your /usr/local/lib directory:
-\f1\fs24 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural
-
-\f0\fs26 \cf0 \
-liblo.7.dylib
-\f1\fs24 \
-
-\f0\fs26 libportaudio.2.dylib
-\f1\fs24 \
-
-\f0\fs26 libportmidi.dylib
-\f1\fs24 \
-
-\f0\fs26 libsndfile.1.dylib
-\f1\fs24 \
-
-\f0\fs26 libFLAC.8.dylib\
-libvorbisenc.2.dylib\
-libvorbis.0.dylib\
-libogg.0.dylib\
-\
-\pard\pardeftab720\ql\qnatural
-\cf0 Olivier B\'e9langer, 2013
-\f1\fs24 \
-}
\ No newline at end of file
+{\rtf1\ansi\deff3\adeflang1025
+{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq0\fcharset1 LucidaGrande;}{\f5\froman\fprq0\fcharset1 Liberation Serif{\*\falt Times New Roman};}{\f6\fswiss\fprq0\fcharset1 Liberation Sans{\*\falt Arial};}{\f7\fnil\fprq2\fcharset0 Droid Sans Fallback;}{\f8\fnil\fprq2\fcharset0 Arial;}{\f9\fswiss\fprq0\fcharset1 FreeSans;}{\f10\fnil\fprq0\fcharset1 FreeSans;}}
+{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
+{\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084 Normal;}
+{\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs28\alang1081\loch\f6\fs28\lang3084 Heading;}
+{\s16\sbasedon0\snext16\sl288\slmult1\ql\nowidctlpar\sb0\sa140\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084 Text Body;}
+{\s17\sbasedon16\snext17\sl288\slmult1\ql\nowidctlpar\sb0\sa140\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af9\afs24\alang1081\loch\f5\fs24\lang3084 List;}
+{\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\cf1\i\kerning1\dbch\af8\langfe2052\dbch\af9\afs24\alang1081\ai\loch\f5\fs24\lang3084 Caption;}
+{\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af9\afs24\alang1081\loch\f5\fs24\lang3084 Index;}
+}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67240962}}\deftab720
+\viewscale100
+{\*\pgdsctbl
+{\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}}
+\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1440\margr1440\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
+\pgndec\pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\rtlch \ltrch\loch\fs26\loch\f4
+Python-}{\rtlch \ltrch\loch\fs26\loch\f4
+pyo (version 0.7.0)}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\rtlch \ltrch\loch\fs26\loch\f4
+System requirements : OS X 10.6 to 10.}{\rtlch \ltrch\loch\fs26\loch\f4
+9}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\rtlch \ltrch\loch\fs26\loch\f4
+This package installs all the required components to run pyo inside your current Python installation. Python 2.6 or 2.7 (32/64 bit) must be already installed on your system.}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\rtlch \ltrch\loch\fs26\loch\f4
+This package is divided into two separate installers. If you do not require one of them, please unselect the package in custom installation mode.}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b\rtlch \ltrch\loch\fs26\loch\f4
+1. pyo extension:}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+The following components will be installed in the site-packages folder of the current Python Framework:}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\b0\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+_pyo.so}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+_pyo64.so}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+pyo.py}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+pyo64.py}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+pyolib (folder)}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\b0\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b\rtlch \ltrch\loch\fs26\loch\f4
+2. Support libraries (i386 and x86_64):}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+This component will install a number of dynamic libraries on which pyo depends. If you already have these, then you can skip this installation.}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\b0\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b\rtlch \ltrch\loch\fs26\loch\f4
+Warning:}{\b0\rtlch \ltrch\loch\fs26\loch\f4
+ this installation will overwrite any previously installed libraries. These are the libraries that will be installed in your /usr/local/lib directory:}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\b0\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+liblo.7.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libportaudio.2.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libportmidi.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libsndfile.1.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libFLAC.8.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libvorbisenc.2.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libvorbis.0.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720{\b0\rtlch \ltrch\loch\fs26\loch\f4
+libogg.0.dylib}
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\b0\rtlch \ltrch\loch\fs26\loch\f4
+
+\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang3084\ql{\b0\rtlch \ltrch\loch\fs26\loch\f4
+Olivier B\u233\'e9langer, 2014}
+\par }
\ No newline at end of file
diff --git a/installers/osx/PkgResources_x86_64/postinstall b/installers/osx/PkgResources_x86_64/postinstall
index ade04c8..a65db22 100755
--- a/installers/osx/PkgResources_x86_64/postinstall
+++ b/installers/osx/PkgResources_x86_64/postinstall
@@ -1,15 +1,6 @@
#! /bin/sh
-VERSION=`sw_vers -productVersion | sed -e 's/\.//g'`
-
-if [ $VERSION -ge '1070' ]; then
- echo "Install pyo on OSX 10.7";
-else
- echo "Install pyo on OSX 10.6";
-fi
-
-# Removed older versions in the python site-packages builtin directories
-# Removed older versions in the python site-packages from python.org install directories
+# Removed older versions in the python site-packages builtin and in the python site-packages from python.org directories
PATHS=/Library/Python/2.6/site-packages/:/Library/Python/2.7/site-packages/:/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
for path in ${PATHS//:/ }; do
if cd $path; then
@@ -42,22 +33,20 @@ for path in ${PATHS//:/ }; do
done
# Install pyo in the python site-packages builtin directories
-if [ $VERSION -ge '1070' ]; then
- if cd /Library/Python/2.7/site-packages/; then
- sudo cp -r /tmp/python27/* .
- else
- sudo mkdir -p /Library/Python/2.7/site-packages/
- cd /Library/Python/2.7/site-packages/
- sudo cp -r /tmp/python27/* .
- fi
+if cd /Library/Python/2.7/site-packages/; then
+ sudo cp -r /tmp/python27/* .
else
- if cd /Library/Python/2.6/site-packages/; then
- sudo cp -r /tmp/python26/* .
- else
- sudo mkdir -p /Library/Python/2.6/site-packages/
- cd /Library/Python/2.6/site-packages/
- sudo cp -r /tmp/python26/* .
- fi
+ sudo mkdir -p /Library/Python/2.7/site-packages/
+ cd /Library/Python/2.7/site-packages/
+ sudo cp -r /tmp/python27/* .
+fi
+
+if cd /Library/Python/2.6/site-packages/; then
+ sudo cp -r /tmp/python26/* .
+else
+ sudo mkdir -p /Library/Python/2.6/site-packages/
+ cd /Library/Python/2.6/site-packages/
+ sudo cp -r /tmp/python26/* .
fi
# Install pyo in the python.org site-packages directories
diff --git a/installers/osx/PkgResources_x86_64/postupgrade b/installers/osx/PkgResources_x86_64/postupgrade
index ade04c8..a65db22 100755
--- a/installers/osx/PkgResources_x86_64/postupgrade
+++ b/installers/osx/PkgResources_x86_64/postupgrade
@@ -1,15 +1,6 @@
#! /bin/sh
-VERSION=`sw_vers -productVersion | sed -e 's/\.//g'`
-
-if [ $VERSION -ge '1070' ]; then
- echo "Install pyo on OSX 10.7";
-else
- echo "Install pyo on OSX 10.6";
-fi
-
-# Removed older versions in the python site-packages builtin directories
-# Removed older versions in the python site-packages from python.org install directories
+# Removed older versions in the python site-packages builtin and in the python site-packages from python.org directories
PATHS=/Library/Python/2.6/site-packages/:/Library/Python/2.7/site-packages/:/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
for path in ${PATHS//:/ }; do
if cd $path; then
@@ -42,22 +33,20 @@ for path in ${PATHS//:/ }; do
done
# Install pyo in the python site-packages builtin directories
-if [ $VERSION -ge '1070' ]; then
- if cd /Library/Python/2.7/site-packages/; then
- sudo cp -r /tmp/python27/* .
- else
- sudo mkdir -p /Library/Python/2.7/site-packages/
- cd /Library/Python/2.7/site-packages/
- sudo cp -r /tmp/python27/* .
- fi
+if cd /Library/Python/2.7/site-packages/; then
+ sudo cp -r /tmp/python27/* .
else
- if cd /Library/Python/2.6/site-packages/; then
- sudo cp -r /tmp/python26/* .
- else
- sudo mkdir -p /Library/Python/2.6/site-packages/
- cd /Library/Python/2.6/site-packages/
- sudo cp -r /tmp/python26/* .
- fi
+ sudo mkdir -p /Library/Python/2.7/site-packages/
+ cd /Library/Python/2.7/site-packages/
+ sudo cp -r /tmp/python27/* .
+fi
+
+if cd /Library/Python/2.6/site-packages/; then
+ sudo cp -r /tmp/python26/* .
+else
+ sudo mkdir -p /Library/Python/2.6/site-packages/
+ cd /Library/Python/2.6/site-packages/
+ sudo cp -r /tmp/python26/* .
fi
# Install pyo in the python.org site-packages directories
diff --git a/installers/osx/release_i386.sh b/installers/osx/release_i386.sh
deleted file mode 100644
index 3838604..0000000
--- a/installers/osx/release_i386.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-# Need Xcode 3.2.6 or later (pkgbuild and productbuild)
-# 1. install python (and wxpython) 2.6 and 2.7 (32-bit)
-# 2. update pyo sources
-# 3. compile and install pyo float and double
-# 4. cd utils and build E-Pyo
-# 5. cd installer/osx and build the realease
-
-export PACKAGE_NAME=pyo_0.6.9_i386.pkg
-export DMG_DIR="pyo 0.6.9 Intel"
-export DMG_NAME="pyo_0.6.9_OSX-Intel.dmg"
-export INSTALLER_DIR=`pwd`/installer
-export PYO_MODULE_DIR=$INSTALLER_DIR/PyoModule/Package_Contents/tmp
-export SUPPORT_LIBS_DIR=$INSTALLER_DIR/SupportLibs/Package_Contents/usr/local/lib
-export BUILD_RESOURCES=$INSTALLER_DIR/PkgResources/English.lproj
-export PKG_RESOURCES=$INSTALLER_DIR/../PkgResources_i386
-
-mkdir -p $PYO_MODULE_DIR
-mkdir -p $SUPPORT_LIBS_DIR
-mkdir -p $BUILD_RESOURCES
-
-cp $PKG_RESOURCES/License.rtf $BUILD_RESOURCES/License.rtf
-cp $PKG_RESOURCES/Welcome.rtf $BUILD_RESOURCES/Welcome.rtf
-cp $PKG_RESOURCES/ReadMe.rtf $BUILD_RESOURCES/ReadMe.rtf
-
-svn export ../.. installer/pyo-build
-cd installer/pyo-build
-
-echo "building pyo for python 2.6 (32-bit)..."
-sudo /usr/local/bin/python2.6 setup.py install --use-coreaudio --use-double
-
-sudo cp -R build/lib.macosx-10.3-fat-2.6 $PYO_MODULE_DIR/python26
-
-echo "building pyo for python 2.7 (32-bit)..."
-sudo /usr/local/bin/python2.7 setup.py install --use-coreaudio --use-double
-
-sudo cp -R build/lib.macosx-10.3-fat-2.7 $PYO_MODULE_DIR/python27
-
-sudo install_name_tool -change libportmidi.dylib /usr/local/lib/libportmidi.dylib $PYO_MODULE_DIR/python26/_pyo.so
-sudo install_name_tool -change libportmidi.dylib /usr/local/lib/libportmidi.dylib $PYO_MODULE_DIR/python26/_pyo64.so
-sudo install_name_tool -change libportmidi.dylib /usr/local/lib/libportmidi.dylib $PYO_MODULE_DIR/python27/_pyo.so
-sudo install_name_tool -change libportmidi.dylib /usr/local/lib/libportmidi.dylib $PYO_MODULE_DIR/python27/_pyo64.so
-
-cd ..
-
-echo "copying support libs..."
-sudo cp /usr/local/lib/liblo.7.dylib $SUPPORT_LIBS_DIR/liblo.7.dylib
-sudo cp /usr/local/lib/libportaudio.2.dylib $SUPPORT_LIBS_DIR/libportaudio.2.dylib
-sudo cp /usr/local/lib/libportmidi.dylib $SUPPORT_LIBS_DIR/libportmidi.dylib
-sudo cp /usr/local/lib/libsndfile.1.dylib $SUPPORT_LIBS_DIR/libsndfile.1.dylib
-sudo cp /usr/local/lib/libFLAC.8.dylib $SUPPORT_LIBS_DIR/libFLAC.8.dylib
-sudo cp /usr/local/lib/libvorbisenc.2.dylib $SUPPORT_LIBS_DIR/libvorbisenc.2.dylib
-sudo cp /usr/local/lib/libvorbis.0.dylib $SUPPORT_LIBS_DIR/libvorbis.0.dylib
-sudo cp /usr/local/lib/libogg.0.dylib $SUPPORT_LIBS_DIR/libogg.0.dylib
-
-echo "setting permissions..."
-
-sudo chgrp -R admin PyoModule/Package_Contents/tmp
-sudo chown -R root PyoModule/Package_Contents/tmp
-sudo chmod -R 755 PyoModule/Package_Contents/tmp
-
-sudo chgrp -R wheel SupportLibs/Package_Contents/usr
-sudo chown -R root SupportLibs/Package_Contents/usr
-sudo chmod -R 755 SupportLibs/Package_Contents/usr
-
-echo "building packages..."
-
-pkgbuild --identifier com.iact.umontreal.ca.pyo.tmp.pkg \
- --root PyoModule/Package_Contents/ \
- --version 1.0 \
- --scripts $PKG_RESOURCES \
- PyoModule.pkg
-
-pkgbuild --identifier com.iact.umontreal.ca.pyo.usr.pkg \
- --root SupportLibs/Package_Contents/ \
- --version 1.0 \
- SupportLibs.pkg
-
-echo "building product..."
-productbuild --distribution ../Distribution.dist --resources $BUILD_RESOURCES $PACKAGE_NAME
-
-echo "assembling DMG..."
-mkdir "$DMG_DIR"
-cd "$DMG_DIR"
-cp ../$PACKAGE_NAME .
-cp -R ../../../../utils/E-Pyo.app .
-ln -s /Applications .
-cd ..
-
-hdiutil create "$DMG_NAME" -srcfolder "$DMG_DIR"
-
-cd ..
-mv installer/$DMG_NAME .
-
-echo "clean up resources..."
-sudo rm -rf installer
-
-
diff --git a/installers/osx/release_x86_64.sh b/installers/osx/release_x86_64.sh
index 317badf..89e90ee 100644
--- a/installers/osx/release_x86_64.sh
+++ b/installers/osx/release_x86_64.sh
@@ -1,8 +1,16 @@
#!/bin/sh
-export PACKAGE_NAME=pyo_0.6.9_x86_64.pkg
-export DMG_DIR="pyo 0.6.9 Universal"
-export DMG_NAME="pyo_0.6.9_OSX-universal.dmg"
+# Need Xcode 3.2.6 or later (pkgbuild and productbuild)
+# 1. install python (and wxpython) 2.6 and 2.7 (32-bit)
+# 2. update pyo sources
+# 3. compile and install pyo float and double
+# 4. cd utils and build E-Pyo
+# 5. install python (and wxpython) 2.7 (64-bit)
+# 6. cd installer/osx and build the realease, only x86_64 version
+
+export PACKAGE_NAME=pyo_0.7.0_x86_64.pkg
+export DMG_DIR="pyo 0.7.0 Universal"
+export DMG_NAME="pyo_0.7.0_OSX-universal.dmg"
export INSTALLER_DIR=`pwd`/installer
export PYO_MODULE_DIR=$INSTALLER_DIR/PyoModule/Package_Contents/tmp
export SUPPORT_LIBS_DIR=$INSTALLER_DIR/SupportLibs/Package_Contents/usr/local/lib
diff --git a/installers/win/README-win32-py26.txt b/installers/win/README-win32-py26.txt
index bbe9866..e482de4 100644
--- a/installers/win/README-win32-py26.txt
+++ b/installers/win/README-win32-py26.txt
@@ -4,7 +4,7 @@ Pyo is a Python module written in C to help digital signal processing script cre
http://www.python.org/download/releases/2.6.6/
-To use the WxPython toolkit for widgets, you need to install wxPython2.8-win32-unicode-py26:
+To use the WxPython toolkit for widgets, you need to install wxPython 3.0 for python 2.6:
http://www.wxpython.org/download.php#stable
@@ -13,8 +13,8 @@ it's a good starting point to explore the library!
In a Command Prompt:
-cd Desktop\pyo_examples
-python xnoise_example.py
+cd Desktop\pyo_examples\algorithmic
+python 01_music_box.py
Please, send comments and bugs to:
diff --git a/installers/win/README-win32-py27.txt b/installers/win/README-win32-py27.txt
index 872130e..eddb84d 100644
--- a/installers/win/README-win32-py27.txt
+++ b/installers/win/README-win32-py27.txt
@@ -4,7 +4,7 @@ Pyo is a Python module written in C to help digital signal processing script cre
http://www.python.org/download/
-To use the WxPython toolkit for widgets, you need to install wxPython2.8-win32-unicode-py27:
+To use the WxPython toolkit for widgets, you need to install wxPython 3.0 for python 2.7:
http://www.wxpython.org/download.php#stable
@@ -13,8 +13,8 @@ it's a good starting point to explore the library!
In a Command Prompt:
-cd Desktop\pyo_examples
-python xnoise_example.py
+cd Desktop\pyo_examples\algorithmic
+python 01_music_box.py
Please, send comments and bugs to:
diff --git a/installers/win/win_installer_py26.iss b/installers/win/win_installer_py26.iss
index 759d3d1..89e4a8b 100644
--- a/installers/win/win_installer_py26.iss
+++ b/installers/win/win_installer_py26.iss
@@ -7,7 +7,7 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4F72B6EF-CFA0-434F-A2B4-B130F94F54EB}
AppName=Pyo
-AppVersion=0.6.9
+AppVersion=0.7.0
AppPublisher=iACT.umontreal.ca
AppPublisherURL=http://code.google.com/p/pyo
AppSupportURL=http://code.google.com/p/pyo
@@ -16,8 +16,8 @@ DefaultDirName={sd}\Python26
DisableDirPage=yes
DefaultGroupName=pyo
AllowNoIcons=yes
-InfoBeforeFile=C:\Documents and Settings\user\svn\pyo\installers\win\\README-win32-py26.txt
-OutputBaseFilename=pyo_0.6.9_py2.6_setup
+InfoBeforeFile=C:\Users\olipet\svn\pyo\installers\win\\README-win32-py26.txt
+OutputBaseFilename=pyo_0.7.0_py2.6_setup
Compression=lzma
SolidCompression=yes
ChangesAssociations=yes
@@ -42,14 +42,14 @@ Source: "C:\Python26\Lib\site-packages\pthreadVC2.dll"; DestDir: "{sd}\Python26\
Source: "C:\Python26\Lib\site-packages\msvcr90.dll"; DestDir: "{sd}\Python26\Lib\site-packages"; Flags: ignoreversion
Source: "C:\MinGW\bin\libgcc_s_dw2-1.dll"; DestDir: "{sd}\Python26\Lib\site-packages"; Flags: ignoreversion
Source: "C:\MinGW\bin\libstdc++-6.dll"; DestDir: "{sd}\Python26\Lib\site-packages"; Flags: ignoreversion
-Source: "C:\Python26\Lib\site-packages\pyo-0.6.9-py2.6.egg-info"; DestDir: "{sd}\Python26\Lib\site-packages"; Flags: ignoreversion
-Source: "C:\Documents and Settings\user\svn\pyo\examples\*"; DestDir: "{userdesktop}\pyo_examples\"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "C:\Documents and Settings\user\svn\pyo\installers\win\README-win32-py26.txt"; DestDir: "{userdesktop}"; Flags: ignoreversion
+Source: "C:\Python26\Lib\site-packages\pyo-0.7.0-py2.6.egg-info"; DestDir: "{sd}\Python26\Lib\site-packages"; Flags: ignoreversion
+Source: "C:\Users\olipet\svn\pyo\examples\*"; DestDir: "{userdesktop}\pyo_examples\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\olipet\svn\pyo\installers\win\README-win32-py26.txt"; DestDir: "{userdesktop}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
; E-Pyo stuff
-Source: "C:\Documents and Settings\user\svn\pyo\utils\E-Pyo_py26\E-Pyo.exe"; DestDir: "{pf}\E-Pyo"; Flags: ignoreversion
-Source: "C:\Documents and Settings\user\svn\pyo\utils\E-Pyo_py26\Resources\*"; DestDir: "{pf}\E-Pyo\Resources"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\olipet\svn\pyo\utils\E-Pyo_py26\E-Pyo.exe"; DestDir: "{pf}\E-Pyo"; Flags: ignoreversion
+Source: "C:\Users\olipet\svn\pyo\utils\E-Pyo_py26\Resources\*"; DestDir: "{pf}\E-Pyo\Resources"; Flags: ignoreversion recursesubdirs createallsubdirs
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
diff --git a/installers/win/win_installer_py27.iss b/installers/win/win_installer_py27.iss
index e879227..d7a0f83 100644
--- a/installers/win/win_installer_py27.iss
+++ b/installers/win/win_installer_py27.iss
@@ -7,7 +7,7 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{244D309A-C251-481A-AD24-0602D392A634}
AppName=Pyo
-AppVersion=0.6.9
+AppVersion=0.7.0
AppPublisher=iACT.umontreal.ca
AppPublisherURL=http://code.google.com/p/pyo
AppSupportURL=http://code.google.com/p/pyo
@@ -16,8 +16,8 @@ DefaultDirName={sd}\Python27
DisableDirPage=yes
DefaultGroupName=pyo
AllowNoIcons=yes
-InfoBeforeFile=C:\Documents and Settings\user\svn\pyo\installers\win\\README-win32-py27.txt
-OutputBaseFilename=pyo_0.6.9_py2.7_setup
+InfoBeforeFile=C:\Users\olipet\svn\pyo\installers\win\\README-win32-py27.txt
+OutputBaseFilename=pyo_0.7.0_py2.7_setup
Compression=lzma
SolidCompression=yes
ChangesAssociations=yes
@@ -44,14 +44,14 @@ Source: "C:\Python27\Lib\site-packages\pthreadVC2.dll"; DestDir: "{sd}\Python27\
Source: "C:\Python27\Lib\site-packages\msvcr90.dll"; DestDir: "{sd}\Python27\Lib\site-packages"; Flags: ignoreversion
Source: "C:\MinGW\bin\libgcc_s_dw2-1.dll"; DestDir: "{sd}\Python27\Lib\site-packages"; Flags: ignoreversion
Source: "C:\MinGW\bin\libstdc++-6.dll"; DestDir: "{sd}\Python27\Lib\site-packages"; Flags: ignoreversion
-Source: "C:\Python27\Lib\site-packages\pyo-0.6.9-py2.7.egg-info"; DestDir: "{sd}\Python27\Lib\site-packages"; Flags: ignoreversion
-Source: "C:\Documents and Settings\user\svn\pyo\examples\*"; DestDir: "{userdesktop}\pyo_examples\"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "C:\Documents and Settings\user\svn\pyo\installers\win\README-win32-py27.txt"; DestDir: "{userdesktop}"; Flags: ignoreversion
+Source: "C:\Python27\Lib\site-packages\pyo-0.7.0-py2.7.egg-info"; DestDir: "{sd}\Python27\Lib\site-packages"; Flags: ignoreversion
+Source: "C:\Users\olipet\svn\pyo\examples\*"; DestDir: "{userdesktop}\pyo_examples\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\olipet\svn\pyo\installers\win\README-win32-py27.txt"; DestDir: "{userdesktop}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
; E-Pyo stuff
-Source: "C:\Documents and Settings\user\svn\pyo\utils\E-Pyo_py27\E-Pyo.exe"; DestDir: "{pf}\E-Pyo"; Flags: ignoreversion
-Source: "C:\Documents and Settings\user\svn\pyo\utils\E-Pyo_py27\Resources\*"; DestDir: "{pf}\E-Pyo\Resources"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\olipet\svn\pyo\utils\E-Pyo_py27\E-Pyo.exe"; DestDir: "{pf}\E-Pyo"; Flags: ignoreversion
+Source: "C:\Users\olipet\svn\pyo\utils\E-Pyo_py27\Resources\*"; DestDir: "{pf}\E-Pyo\Resources"; Flags: ignoreversion recursesubdirs createallsubdirs
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
diff --git a/pyo.py b/pyo.py
index 081056d..0364e96 100644
--- a/pyo.py
+++ b/pyo.py
@@ -327,7 +327,7 @@ OBJECTS_TREE = {'functions': sorted(['pa_count_devices', 'pa_get_default_input',
'PyoPVObject' : sorted(['PVAnal', 'PVSynth', 'PVTranspose', 'PVVerb', 'PVGate', 'PVAddSynth', 'PVCross', 'PVMult', 'PVMorph', 'PVFilter', 'PVDelay', 'PVBuffer', 'PVShift', 'PVAmpMod', 'PVFreqMod', 'PVBufLoops', 'PVBufTabLoops', 'PVMix']),
'PyoObject': {'analysis': sorted(['Follower', 'Follower2', 'ZCross', 'Yin']),
'arithmetic': sorted(['Sin', 'Cos', 'Tan', 'Abs', 'Sqrt', 'Log', 'Log2', 'Log10', 'Pow', 'Atan2', 'Floor', 'Round',
- 'Ceil']),
+ 'Ceil', 'Tanh']),
'controls': sorted(['Fader', 'Sig', 'SigTo', 'Adsr', 'Linseg', 'Expseg']),
'dynamics': sorted(['Clip', 'Compress', 'Degrade', 'Mirror', 'Wrap', 'Gate', 'Balance', 'Min', 'Max']),
'effects': sorted(['Delay', 'SDelay', 'Disto', 'Freeverb', 'Waveguide', 'Convolve', 'WGVerb',
diff --git a/pyolib/_core.py b/pyolib/_core.py
index aea4c02..09763aa 100644
--- a/pyolib/_core.py
+++ b/pyolib/_core.py
@@ -786,12 +786,12 @@ class PyoObject(PyoObjectBase):
def setSub(self, x):
"""
- Replace and inverse the `mul` attribute.
+ Replace and inverse the `add` attribute.
:Args:
x : float or PyoObject
- New inversed `mul` attribute.
+ New inversed `add` attribute.
"""
self._add = x
@@ -800,12 +800,12 @@ class PyoObject(PyoObjectBase):
def setDiv(self, x):
"""
- Replace and inverse the `add` attribute.
+ Replace and inverse the `mul` attribute.
:Args:
x : float or PyoObject
- New inversed `add` attribute.
+ New inversed `mul` attribute.
"""
self._mul = x
@@ -1275,7 +1275,7 @@ class PyoTableObject(PyoObjectBase):
the server GUI before showing the controller window.
"""
- samples = self._base_objs[0].getViewTable()
+ samples = self._base_objs[0].getViewTable((500,200))
createViewTableWindow(samples, title, wxnoserver, self.__class__.__name__, self)
def _setViewFrame(self, frame):
@@ -1287,7 +1287,8 @@ class PyoTableObject(PyoObjectBase):
"""
if self.viewFrame != None:
- samples = self._base_objs[0].getViewTable()
+ size = self.viewFrame.wavePanel.GetSize()
+ samples = self._base_objs[0].getViewTable((size[0], size[1]))
self.viewFrame.update(samples)
@property
diff --git a/pyolib/_widgets.py b/pyolib/_widgets.py
index 1eb1db9..71d6166 100644
--- a/pyolib/_widgets.py
+++ b/pyolib/_widgets.py
@@ -20,6 +20,7 @@ along with pyo. If not, see <http://www.gnu.org/licenses/>.
"""
from types import ListType, FloatType, IntType
import math, sys, os, random
+import __builtin__
try:
from PIL import Image, ImageDraw, ImageTk
@@ -37,19 +38,30 @@ try:
except:
PYO_USE_WX = False
+if hasattr(__builtin__, 'EPYO_APP_OPENED'):
+ PYO_USE_WX = True
+
+PYO_USE_TK = False
if not PYO_USE_WX:
try:
from Tkinter import *
from _tkwidgets import *
+ PYO_USE_TK = True
+ print """
+WxPython is not found for the current python version.
+Pyo will use a minimal GUI toolkit written with Tkinter.
+This toolkit has limited functionnalities and is no more
+maintained or updated. If you want to use all of pyo's
+GUI features, you should install WxPython, available here:
+http://www.wxpython.org/
+"""
except:
- if sys.platform == "linux2":
- response = raw_input("""python-tk package is missing! It is needed to use pyo graphical interfaces.
-Do you want to install it? (yes/no): """)
- if response == 'yes':
- os.system('sudo apt-get install python-tk')
- else:
- print "Tkinter is missing! It is needed to use pyo graphical interfaces. Please install it!"
- sys.exit()
+ PYO_USE_TK = False
+ print """
+Neither WxPython nor Tkinter are found for the current python version.
+Pyo's GUI features are disabled. For a complete GUI toolkit, you should
+consider installing WxPython, available here: http://www.wxpython.org/
+"""
X, Y, CURRENT_X, MAX_X, NEXT_Y = 800, 700, 30, 30, 30
WINDOWS = []
@@ -60,8 +72,10 @@ TABLEWINDOWS = []
SNDTABLEWINDOWS = []
MATRIXWINDOWS = []
SPECTRUMWINDOWS = []
+WX_APP = False
def createRootWindow():
+ global WX_APP
if not PYO_USE_WX:
if len(WINDOWS) == 0:
root = Tk()
@@ -70,8 +84,9 @@ def createRootWindow():
else:
return None
else:
- if wx.GetApp() == None:
- win = wx.App(False)
+ if not WX_APP:
+ win = wx.App(False)
+ WX_APP = True
return win
else:
return None
@@ -142,8 +157,7 @@ def wxCreateDelayedTableWindows():
global CURRENT_X, MAX_X, NEXT_Y
for win in TABLEWINDOWS:
object = win[3]
- if WITH_PIL: f = ViewTable_withPIL(None, win[0], win[1], object)
- else: f = ViewTable_withoutPIL(None, win[0], win[1], object)
+ f = ViewTable(None, win[0], win[1], object)
if object != None:
object._setViewFrame(f)
wxDisplayWindow(f, win[2])
@@ -183,7 +197,7 @@ def createCtrlWindow(obj, map_list, title, wxnoserver=False):
if title == None: title = obj.__class__.__name__
win.title(title)
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
f = PyoObjectControl(None, obj, map_list)
if title == None: title = obj.__class__.__name__
@@ -195,7 +209,7 @@ def createGraphWindow(obj, mode, xlen, yrange, title, wxnoserver=False):
if not PYO_USE_WX:
print "WxPython must be installed to use the 'graph()' method."
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
f = TableGrapher(None, obj, mode, xlen, yrange)
if title == None: title = obj.__class__.__name__
@@ -207,7 +221,7 @@ def createDataGraphWindow(obj, yrange, title, wxnoserver=False):
if not PYO_USE_WX:
print "WxPython must be installed to use the 'graph()' method."
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
f = DataTableGrapher(None, obj, yrange)
if title == None: title = obj.__class__.__name__
@@ -224,10 +238,9 @@ def createViewTableWindow(samples, title="Table waveform", wxnoserver=False, tab
win.resizable(False, False)
win.title(title)
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
- if WITH_PIL: f = ViewTable_withPIL(None, samples, tableclass, object)
- else: f = ViewTable_withoutPIL(None, samples, tableclass, object)
+ f = ViewTable(None, samples, tableclass, object)
wxShowWindow(f, title, root)
if object != None:
object._setViewFrame(f)
@@ -243,7 +256,7 @@ def createSndViewTableWindow(obj, title="Table waveform", wxnoserver=False, tabl
win.resizable(False, False)
win.title(title)
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
f = SndViewTable(None, obj, tableclass, mouse_callback)
if title == None: title = obj.__class__.__name__
@@ -263,7 +276,7 @@ It helps a lot to speed up matrix drawing!"""
win.resizable(False, False)
win.title(title)
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
if WITH_PIL: f = ViewMatrix_withPIL(None, samples, size, object)
else: f = ViewMatrix_withoutPIL(None, samples, size, object)
@@ -277,7 +290,7 @@ def createSpectrumWindow(object, title, wxnoserver=False):
if not PYO_USE_WX:
print "WxPython must be installed to use the Spectrum display."
else:
- if wxnoserver or wx.GetApp() != None:
+ if wxnoserver or WX_APP:
root = createRootWindow()
f = SpectrumDisplay(None, object)
if title == None: title = object.__class__.__name__
@@ -287,7 +300,7 @@ def createSpectrumWindow(object, title, wxnoserver=False):
else:
SPECTRUMWINDOWS.append([object, title])
-def createServerGUI(nchnls, start, stop, recstart, recstop, setAmp, started, locals, shutdown, meter, timer, amp):
+def createServerGUI(nchnls, start, stop, recstart, recstop, setAmp, started, locals, shutdown, meter, timer, amp, exit):
global X, Y, MAX_X, NEXT_Y
if not PYO_USE_WX:
createRootWindow()
@@ -297,7 +310,7 @@ def createServerGUI(nchnls, start, stop, recstart, recstop, setAmp, started, loc
f.focus_set()
else:
win = createRootWindow()
- f = ServerGUI(None, nchnls, start, stop, recstart, recstop, setAmp, started, locals, shutdown, meter, timer, amp)
+ f = ServerGUI(None, nchnls, start, stop, recstart, recstop, setAmp, started, locals, shutdown, meter, timer, amp, exit)
f.SetTitle("pyo server")
f.SetPosition((30, 30))
f.Show()
diff --git a/pyolib/_wxwidgets.py b/pyolib/_wxwidgets.py
index 5651072..21c0849 100644
--- a/pyolib/_wxwidgets.py
+++ b/pyolib/_wxwidgets.py
@@ -237,13 +237,14 @@ class ControlSlider(wx.Panel):
w, h = self.GetSize()
b = wx.EmptyBitmap(w,h)
dc = wx.MemoryDC(b)
+ gc = wx.GraphicsContext_Create(dc)
dc.SetPen(wx.Pen(self.backgroundColour, width=1))
dc.SetBrush(wx.Brush(self.backgroundColour))
dc.DrawRectangle(0,0,w,h)
- dc.SetBrush(wx.Brush("#999999"))
- dc.SetPen(wx.Pen(self.backgroundColour, width=1))
+ gc.SetBrush(wx.Brush("#999999"))
+ gc.SetPen(wx.Pen(self.backgroundColour, width=1))
h2 = self.sliderHeight / 4
- dc.DrawRoundedRectangle(0,h2,w,self.sliderHeight,2)
+ gc.DrawRoundedRectangle(0,h2,w,self.sliderHeight,2)
dc.SelectObject(wx.NullBitmap)
b.SetMaskColour("#999999")
self.sliderMask = b
@@ -252,15 +253,12 @@ class ControlSlider(wx.Panel):
w, h = self.knobSize, self.GetSize()[1]
b = wx.EmptyBitmap(w,h)
dc = wx.MemoryDC(b)
- rec = wx.Rect(0, 0, w, h)
+ gc = wx.GraphicsContext_Create(dc)
dc.SetPen(wx.Pen(self.backgroundColour, width=1))
dc.SetBrush(wx.Brush(self.backgroundColour))
- dc.DrawRectangleRect(rec)
- h2 = self.sliderHeight / 4
- rec = wx.Rect(0, h2, w, self.sliderHeight)
- dc.GradientFillLinear(rec, "#414753", "#99A7CC", wx.BOTTOM)
- dc.SetBrush(wx.Brush("#999999"))
- dc.DrawRoundedRectangle(0,0,w,h,2)
+ dc.DrawRectangle(0, 0, w, h)
+ gc.SetBrush(wx.Brush("#999999"))
+ gc.DrawRoundedRectangle(0,0,w,h,3)
dc.SelectObject(wx.NullBitmap)
b.SetMaskColour("#999999")
self.knobMask = b
@@ -429,7 +427,7 @@ class ControlSlider(wx.Panel):
# Draw knob
if self._enable: knobColour = '#888888'
else: knobColour = "#DDDDDD"
- rec = wx.Rect(self.pos-self.knobHalfSize, 0, self.knobSize, h)
+ rec = wx.Rect(self.pos-self.knobHalfSize, 0, self.knobSize-1, h)
dc.GradientFillLinear(rec, "#424864", knobColour, wx.RIGHT)
dc.DrawBitmap(self.knobMask, rec[0], rec[1], True)
@@ -524,7 +522,10 @@ class MultiSlider(wx.Panel):
slide = pos[1] / self._height
if 0 <= slide < self._nchnls:
self._values[slide] = pos[0] / float(w)
- self._labels = [self._slmap.get(x) for x in self._values]
+ if self._slmap._res == 'int':
+ self._labels = [int(self._slmap.get(x)) for x in self._values]
+ else:
+ self._labels = [self._slmap.get(x) for x in self._values]
self._command(self._key, self._labels)
self.CaptureMouse()
self.Refresh()
@@ -541,7 +542,10 @@ class MultiSlider(wx.Panel):
slide = pos[1] / self._height
if 0 <= slide < self._nchnls:
self._values[slide] = pos[0] / float(w)
- self._labels = [self._slmap.get(x) for x in self._values]
+ if self._slmap._res == 'int':
+ self._labels = [int(self._slmap.get(x)) for x in self._values]
+ else:
+ self._labels = [self._slmap.get(x) for x in self._values]
self._command(self._key, self._labels)
self.Refresh()
@@ -600,9 +604,10 @@ class VuMeter(wx.Panel):
db = math.log10(self.amplitude[i]+0.00001) * 0.2 + 1.
width = int(db*w)
dc.DrawBitmap(self.backBitmap, 0, i*5)
- dc.SetClippingRegion(0, i*5, width, 5)
- dc.DrawBitmap(self.bitmap, 0, i*5)
- dc.DestroyClippingRegion()
+ if width > 0:
+ dc.SetClippingRegion(0, i*5, width, 5)
+ dc.DrawBitmap(self.bitmap, 0, i*5)
+ dc.DestroyClippingRegion()
event.Skip()
def OnClose(self, evt):
@@ -948,8 +953,8 @@ class PyoObjectControl(wx.Frame):
######################################################################
class ViewTable(wx.Frame):
def __init__(self, parent, samples=None, tableclass=None, object=None):
- wx.Frame.__init__(self, parent)
- self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
+ wx.Frame.__init__(self, parent, size=(500,200))
+ self.SetMinSize((300, 150))
menubar = wx.MenuBar()
fileMenu = wx.Menu()
closeItem = fileMenu.Append(-1, 'Close\tCtrl+W', kind=wx.ITEM_NORMAL)
@@ -958,73 +963,56 @@ class ViewTable(wx.Frame):
self.SetMenuBar(menubar)
self.tableclass = tableclass
self.object = object
- self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_CLOSE, self._destroy)
- self.width, self.height = 500, 200
- self.half_height = self.height / 2
- self.SetClientSize((self.width+10, self.height+10))
- self.SetMinSize(self.GetSize())
- self.SetMaxSize(self.GetSize())
- self.draw(samples)
+ self.panel = wx.Panel(self)
+ self.panel.SetBackgroundColour(BACKGROUND_COLOUR)
+ self.box = wx.BoxSizer(wx.VERTICAL)
+ self.wavePanel = ViewTablePanel(self.panel, object)
+ self.box.Add(self.wavePanel, 1, wx.EXPAND|wx.ALL, 5)
+ self.panel.SetSizerAndFit(self.box)
+ self.update(samples)
def update(self, samples):
- wx.CallAfter(self.draw, samples)
+ wx.CallAfter(self.wavePanel.draw, samples)
def _destroy(self, evt):
self.object._setViewFrame(None)
self.Destroy()
-
-class ViewTable_withPIL(ViewTable):
- _WITH_PIL = True
- def __init__(self, parent, samples=None, tableclass=None, object=None):
- ViewTable.__init__(self, parent, samples, tableclass, object)
-
- def draw(self, samples):
- im = Image.new("L", (self.width, self.height), 255)
- draw = ImageDraw.Draw(im)
- draw.line(samples, fill=0, width=1)
- image = wx.EmptyImage(self.width, self.height)
- image.SetData(im.convert("RGB").tostring())
- self.img = wx.BitmapFromImage(image)
- self.Refresh()
-
- def OnPaint(self, evt):
- dc = wx.PaintDC(self)
- dc.DrawBitmap(self.img, 0, 0)
- dc.SetPen(wx.Pen('#BBBBBB', width=1, style=wx.SOLID))
- dc.DrawLine(0, self.half_height+1, self.width, self.half_height+1)
-class ViewTable_withoutPIL(ViewTable):
- _WITH_PIL = False
- def __init__(self, parent, samples=None, tableclass=None, object=None):
- ViewTable.__init__(self, parent, samples, tableclass, object)
+class ViewTablePanel(wx.Panel):
+ def __init__(self, parent, obj):
+ wx.Panel.__init__(self, parent)
+ self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
+ self.obj = obj
+ self.samples = []
+ self.Bind(wx.EVT_PAINT, self.OnPaint)
+ self.Bind(wx.EVT_SIZE, self.OnSize)
+ if sys.platform == "win32":
+ self.dcref = wx.BufferedPaintDC
+ else:
+ self.dcref = wx.PaintDC
def draw(self, samples):
- if sys.platform == 'win32':
- if self.tableclass == 'SndTable':
- self.samples = [(samples[i], samples[i+1], samples[i+2], samples[i+3]) for i in range(0, len(samples), 4)]
- else:
- self.samples = [(samples[i], samples[i+1]) for i in range(0, len(samples), 2)]
- else:
- self.samples = [(samples[i], samples[i+1], samples[i+2], samples[i+3]) for i in range(0, len(samples), 4)]
+ self.samples = samples
self.Refresh()
def OnPaint(self, evt):
w,h = self.GetSize()
- dc = wx.AutoBufferedPaintDC(self)
+ dc = self.dcref(self)
+ gc = wx.GraphicsContext_Create(dc)
dc.SetBrush(wx.Brush("#FFFFFF"))
+ dc.SetPen(wx.Pen('#BBBBBB', width=1, style=wx.SOLID))
dc.Clear()
dc.DrawRectangle(0,0,w,h)
- if sys.platform == 'win32':
- if self.tableclass == 'SndTable':
- dc.DrawLineList(self.samples)
- else:
- dc.DrawPointList(self.samples)
- else:
- dc.DrawLineList(self.samples)
- dc.SetPen(wx.Pen('#BBBBBB', width=1, style=wx.SOLID))
- dc.DrawLine(0, self.half_height+1, self.width, self.half_height+1)
+ gc.SetPen(wx.Pen('#000000', width=1, style=wx.SOLID))
+ gc.SetBrush(wx.Brush("#FFFFFF"))
+ if len(self.samples) > 1:
+ gc.DrawLines(self.samples)
+ dc.DrawLine(0, h/2+1, w, h/2+1)
+ def OnSize(self, evt):
+ wx.CallAfter(self.obj.refreshView)
+
class SndViewTable(wx.Frame):
def __init__(self, parent, obj=None, tableclass=None, mouse_callback=None):
wx.Frame.__init__(self, parent, size=(500,250))
@@ -2199,8 +2187,8 @@ class DataTableGrapher(wx.Frame):
class ServerGUI(wx.Frame):
def __init__(self, parent=None, nchnls=2, startf=None, stopf=None, recstartf=None,
- recstopf=None, ampf=None, started=0, locals=None, shutdown=None, meter=True, timer=True, amp=1.):
- wx.Frame.__init__(self, parent)
+ recstopf=None, ampf=None, started=0, locals=None, shutdown=None, meter=True, timer=True, amp=1., exit=True):
+ wx.Frame.__init__(self, parent, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER)
self.SetTitle("pyo server")
@@ -2221,6 +2209,7 @@ class ServerGUI(wx.Frame):
self.recstartf = recstartf
self.recstopf = recstopf
self.ampf = ampf
+ self.exit = exit
self._started = False
self._recstarted = False
self._history = []
@@ -2253,7 +2242,7 @@ class ServerGUI(wx.Frame):
box.Add(wx.StaticText(panel, -1, "Amplitude (dB)"), 0, wx.LEFT, leftMargin)
ampBox = wx.BoxSizer(wx.HORIZONTAL)
- self.ampScale = ControlSlider(panel, -60, 18, 20.0 * math.log10(amp), size=(203, 16), outFunction=self.setAmp)
+ self.ampScale = ControlSlider(panel, -60, 18, 20.0 * math.log10(amp), size=(202, 16), outFunction=self.setAmp)
ampBox.Add(self.ampScale, 0, wx.LEFT, leftMargin-10)
box.Add(ampBox, 0, wx.LEFT | wx.RIGHT, 8)
@@ -2275,16 +2264,15 @@ class ServerGUI(wx.Frame):
box.AddSpacer(10)
t = wx.StaticText(panel, -1, "Interpreter")
box.Add(t, 0, wx.LEFT, leftMargin)
- self.text = wx.TextCtrl(panel, -1, "", size=(200, -1), style=wx.TE_PROCESS_ENTER)
+ tw, th = self.GetTextExtent("|")
+ self.text = wx.TextCtrl(panel, -1, "", size=(202, th+8), style=wx.TE_PROCESS_ENTER)
self.text.Bind(wx.EVT_TEXT_ENTER, self.getText)
self.text.Bind(wx.EVT_CHAR, self.onChar)
- box.Add(self.text, 0, wx.LEFT, leftMargin)
+ box.Add(self.text, 0, wx.LEFT, leftMargin-1)
box.AddSpacer(10)
panel.SetSizerAndFit(box)
self.SetClientSize(panel.GetSize())
- self.SetMinSize(self.GetSize())
- self.SetMaxSize(self.GetSize())
if started == 1:
self.start(None, True)
@@ -2298,12 +2286,14 @@ class ServerGUI(wx.Frame):
self.startf()
self._started = True
wx.CallAfter(self.startButton.SetLabel, 'Stop')
- wx.CallAfter(self.quitButton.Disable)
+ if self.exit:
+ wx.CallAfter(self.quitButton.Disable)
else:
- self.stopf()
+ wx.CallLater(100, self.stopf)
self._started = False
wx.CallAfter(self.startButton.SetLabel, 'Start')
- wx.CallAfter(self.quitButton.Enable)
+ if self.exit:
+ wx.CallAfter(self.quitButton.Enable)
def record(self, evt):
if self._recstarted == False:
@@ -2316,9 +2306,11 @@ class ServerGUI(wx.Frame):
self.recButton.SetLabel('Rec Start')
def on_quit(self, evt):
- self.shutdown()
+ if self.exit:
+ self.shutdown()
self.Destroy()
- sys.exit()
+ if self.exit:
+ sys.exit()
def getPrev(self):
self.text.Clear()
@@ -2358,12 +2350,3 @@ class ServerGUI(wx.Frame):
def setRms(self, *args):
self.meter.setRms(*args)
-if __name__ == "__main__":
- def pprint(values):
- print values
-
- app = wx.App(False)
- values = [random.uniform(10, 25) for i in range(10)]
- f = DataTableGrapher(init=values, yrange=(2, 50))
- f.Show()
- app.MainLoop()
diff --git a/pyolib/arithmetic.py b/pyolib/arithmetic.py
index bf10013..9bc37bc 100644
--- a/pyolib/arithmetic.py
+++ b/pyolib/arithmetic.py
@@ -673,3 +673,53 @@ class Round(PyoObject):
return self._input
@input.setter
def input(self, x): self.setInput(x)
+
+class Tanh(PyoObject):
+ """
+ Performs a hyperbolic tangent function on audio signal.
+
+ Returns the hyperbolic tangent of audio signal as input.
+
+ :Parent: :py:class:`PyoObject`
+
+ :Args:
+
+ input : PyoObject
+ Input signal, angle in radians.
+
+ >>> s = Server().boot()
+ >>> s.start()
+ >>> import math
+ >>> a = Phasor(250, mul=math.pi*2)
+ >>> b = Tanh(Sin(a, mul=10), mul=0.3).mix(2).out()
+
+ """
+
+ def __init__(self, input, mul=1, add=0):
+ PyoObject.__init__(self, mul, add)
+ self._input = input
+ self._in_fader = InputFader(input)
+ in_fader, mul, add, lmax = convertArgsToLists(self._in_fader, mul, add)
+ self._base_objs = [M_Tanh_base(wrap(in_fader,i), wrap(mul,i), wrap(add,i)) for i in range(lmax)]
+
+ def setInput(self, x, fadetime=0.05):
+ """
+ Replace the `input` attribute.
+
+ :Args:
+
+ x : PyoObject
+ New signal to process.
+ fadetime : float, optional
+ Crossfade time between old and new input. Default to 0.05.
+
+ """
+ self._input = x
+ self._in_fader.setInput(x, fadetime)
+
+ @property
+ def input(self):
+ """PyoObject. Input signal to process."""
+ return self._input
+ @input.setter
+ def input(self, x): self.setInput(x)
diff --git a/pyolib/generators.py b/pyolib/generators.py
index d4731ca..72fcfc5 100644
--- a/pyolib/generators.py
+++ b/pyolib/generators.py
@@ -1019,10 +1019,9 @@ class LFO(PyoObject):
"""
- if x >= 0 and x < 8:
- self._type = x
- x, lmax = convertArgsToLists(x)
- [obj.setType(wrap(x,i)) for i, obj in enumerate(self._base_objs)]
+ self._type = x
+ x, lmax = convertArgsToLists(x)
+ [obj.setType(wrap(x,i)) for i, obj in enumerate(self._base_objs)]
def reset(self):
"""
diff --git a/pyolib/server.py b/pyolib/server.py
index 73af2ba..d9b1ae0 100644
--- a/pyolib/server.py
+++ b/pyolib/server.py
@@ -140,7 +140,7 @@ class Server(object):
self._globalseed = 0
self._server.__init__(sr, nchnls, buffersize, duplex, audio, jackname)
- def gui(self, locals=None, meter=True, timer=True):
+ def gui(self, locals=None, meter=True, timer=True, exit=True):
"""
Show the server's user interface.
@@ -155,10 +155,14 @@ class Server(object):
timer : boolean, optional
If True, the interface will show a clock of the current time.
Defaults to True.
+ exit : boolean, optional
+ If True, the python interpreter will exit when the 'Quit' button is pressed,
+ Otherwise, the GUI will be closed leaving the interpreter alive.
+ Defaults to True.
"""
f, win = createServerGUI(self._nchnls, self.start, self.stop, self.recstart, self.recstop,
- self.setAmp, self.getIsStarted(), locals, self.shutdown, meter, timer, self._amp)
+ self.setAmp, self.getIsStarted(), locals, self.shutdown, meter, timer, self._amp, exit)
if meter:
self._server.setAmpCallable(f)
if timer:
@@ -349,7 +353,7 @@ class Server(object):
def setJackAuto(self, xin=True, xout=True):
"""
- Tells the server to auto-connect (or not) Jack ports.
+ Tells the server to auto-connect (or not) Jack ports to System ports.
:Args:
@@ -361,6 +365,32 @@ class Server(object):
"""
self._server.setJackAuto(xin, xout)
+ def setJackAutoConnectInputPorts(self, ports):
+ """
+ Tells the server to auto-connect Jack input ports to pre-defined Jack ports.
+
+ :Args:
+
+ ports : string or list of strings
+ Name of the Jack port(s) to auto-connect. Regular Expressions are allowed.
+
+ """
+ ports, lmax = convertArgsToLists(ports)
+ self._server.setJackAutoConnectInputPorts(ports)
+
+ def setJackAutoConnectOutputPorts(self, ports):
+ """
+ Tells the server to auto-connect Jack output ports to pre-defined Jack ports.
+
+ :Args:
+
+ ports : string or list of strings
+ Name of the Jack port(s) to auto-connect. Regular Expressions are allowed.
+
+ """
+ ports, lmax = convertArgsToLists(ports)
+ self._server.setJackAutoConnectOutputPorts(ports)
+
def setGlobalSeed(self, x):
"""
Set the server's global seed used by random objects.
diff --git a/scripts/release_doc_src.sh b/scripts/release_doc_src.sh
index 2c2f029..f24c921 100644
--- a/scripts/release_doc_src.sh
+++ b/scripts/release_doc_src.sh
@@ -6,7 +6,7 @@
# 3. Execute from pyo folder : ./scripts/release_doc_src.sh
#
-version=0.6.9
+version=0.7.0
replace=XXX
doc_rep=pyo_XXX-doc
diff --git a/setup.py b/setup.py
index 1777d95..51244c5 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ from distutils.core import setup, Extension
import os, sys, getopt
import time
-pyo_version = "0.6.9"
+pyo_version = "0.7.0"
build_osx_with_jack_support = False
compile_externals = False
diff --git a/src/engine/inputfadermodule.c b/src/engine/inputfadermodule.c
index 5f6b44e..a8b26f1 100644
--- a/src/engine/inputfadermodule.c
+++ b/src/engine/inputfadermodule.c
@@ -169,11 +169,8 @@ InputFader_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "server") == 0 ) {
- PySys_WriteStderr("TypeError: \"input\" argument must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input1);
diff --git a/src/engine/pyomodule.c b/src/engine/pyomodule.c
index 6de20d9..cb7dde3 100644
--- a/src/engine/pyomodule.c
+++ b/src/engine/pyomodule.c
@@ -2376,6 +2376,7 @@ init_pyo64(void)
module_add_object(m, "M_Floor_base", &M_FloorType);
module_add_object(m, "M_Ceil_base", &M_CeilType);
module_add_object(m, "M_Round_base", &M_RoundType);
+ module_add_object(m, "M_Tanh_base", &M_TanhType);
module_add_object(m, "Snap_base", &SnapType);
module_add_object(m, "Interp_base", &InterpType);
module_add_object(m, "SampHold_base", &SampHoldType);
diff --git a/src/engine/servermodule.c b/src/engine/servermodule.c
index e7418c8..d9bfc89 100644
--- a/src/engine/servermodule.c
+++ b/src/engine/servermodule.c
@@ -578,19 +578,19 @@ int
Server_jack_autoconnect (Server *self)
{
const char **ports;
- int i, ret = 0;
+ int i, j, num = 0, ret = 0;
PyoJackBackendData *be_data = (PyoJackBackendData *) self->audio_be_data;
if (self->jackautoin) {
- if ((ports = jack_get_ports (be_data->jack_client, NULL, NULL, JackPortIsOutput)) == NULL) {
- Server_error(self, "Jack: Cannot find any physical capture ports\n");
+ if ((ports = jack_get_ports (be_data->jack_client, "system", NULL, JackPortIsOutput)) == NULL) {
+ Server_error(self, "Jack: Cannot find any physical capture ports called 'system'\n");
ret = -1;
}
i=0;
while(ports[i]!=NULL && be_data->jack_in_ports[i] != NULL){
if (jack_connect (be_data->jack_client, ports[i], jack_port_name(be_data->jack_in_ports[i]))) {
- Server_error(self, "Jack: cannot connect input ports\n");
+ Server_error(self, "Jack: cannot connect input ports to 'system'\n");
ret = -1;
}
i++;
@@ -599,21 +599,62 @@ Server_jack_autoconnect (Server *self)
}
if (self->jackautoout) {
- if ((ports = jack_get_ports (be_data->jack_client, NULL, NULL, JackPortIsInput)) == NULL) {
- Server_error(self, "Jack: Cannot find any physical playback ports\n");
+ if ((ports = jack_get_ports (be_data->jack_client, "system", NULL, JackPortIsInput)) == NULL) {
+ Server_error(self, "Jack: Cannot find any physical playback ports called 'system'\n");
ret = -1;
}
i=0;
while(ports[i]!=NULL && be_data->jack_out_ports[i] != NULL){
if (jack_connect (be_data->jack_client, jack_port_name (be_data->jack_out_ports[i]), ports[i])) {
- Server_error(self, "Jack: cannot connect output ports\n");
+ Server_error(self, "Jack: cannot connect output ports to 'system'\n");
ret = -1;
}
i++;
}
free (ports);
}
+
+ num = PyList_Size(self->jackAutoConnectInputPorts);
+ if (num > 0) {
+ for (j=0; j<num; j++) {
+ if ((ports = jack_get_ports (be_data->jack_client, PyString_AsString(PyList_GetItem(self->jackAutoConnectInputPorts, j)), NULL, JackPortIsOutput)) == NULL) {
+ Server_error(self, "Jack: cannot connect input ports to %s\n", PyString_AsString(PyList_GetItem(self->jackAutoConnectInputPorts, j)));
+ }
+ else {
+ i = 0;
+ while(ports[i] != NULL && be_data->jack_in_ports[i] != NULL){
+ if (jack_connect (be_data->jack_client, ports[i], jack_port_name (be_data->jack_in_ports[i]))) {
+ Server_error(self, "Jack: cannot connect input ports\n");
+ ret = -1;
+ }
+ i++;
+ }
+ free (ports);
+ }
+ }
+ }
+
+ num = PyList_Size(self->jackAutoConnectOutputPorts);
+ if (num > 0) {
+ for (j=0; j<num; j++) {
+ if ((ports = jack_get_ports (be_data->jack_client, PyString_AsString(PyList_GetItem(self->jackAutoConnectOutputPorts, j)), NULL, JackPortIsInput)) == NULL) {
+ Server_error(self, "Jack: cannot connect output ports to %s\n", PyString_AsString(PyList_GetItem(self->jackAutoConnectOutputPorts, j)));
+ }
+ else {
+ i = 0;
+ while(ports[i] != NULL && be_data->jack_out_ports[i] != NULL){
+ if (jack_connect (be_data->jack_client, jack_port_name (be_data->jack_out_ports[i]), ports[i])) {
+ Server_error(self, "Jack: cannot connect output ports\n");
+ ret = -1;
+ }
+ i++;
+ }
+ free (ports);
+ }
+ }
+ }
+
return ret;
}
@@ -989,19 +1030,19 @@ Server_coreaudio_init(Server *self)
/* Get output device stream configuration */
count = sizeof(AudioStreamBasicDescription);
- err = AudioDeviceGetProperty(mOutputDevice, 0, false, kAudioDevicePropertyStreamFormat, &count, &outputStreamDescription);
+ err = AudioDeviceGetProperty(mOutputDevice, 0, false, kAudioDevicePropertyStreamFormat, &count, &outputStreamDescription);
if (err != kAudioHardwareNoError)
Server_debug(self, "Get kAudioDevicePropertyStreamFormat error %s\n", (char*)&err);
/*
outputStreamDescription.mSampleRate = (Float64)self->samplingRate;
- err = AudioDeviceSetProperty(mOutputDevice, &now, 0, false, kAudioDevicePropertyStreamFormat, count, &outputStreamDescription);
+ err = AudioDeviceSetProperty(mOutputDevice, &now, 0, false, kAudioDevicePropertyStreamFormat, count, &outputStreamDescription);
if (err != kAudioHardwareNoError)
Server_debug(self, "Set kAudioDevicePropertyStreamFormat error %s\n", (char*)&err);
// Print new output stream description
- err = AudioDeviceGetProperty(mOutputDevice, 0, false, kAudioDevicePropertyStreamFormat, &count, &outputStreamDescription);
+ err = AudioDeviceGetProperty(mOutputDevice, 0, false, kAudioDevicePropertyStreamFormat, &count, &outputStreamDescription);
if (err != kAudioHardwareNoError)
Server_debug(self, "Get kAudioDevicePropertyStreamFormat error %s\n", (char*)&err);
*/
@@ -1014,7 +1055,7 @@ Server_coreaudio_init(Server *self)
/********* Set input and output callbacks *********/
/**************************************************/
if (self->duplex == 1) {
- err = AudioDeviceAddIOProc(self->input, coreaudio_input_callback, (void *) self); // setup our device with an IO proc
+ err = AudioDeviceAddIOProc(self->input, coreaudio_input_callback, (void *) self); // setup our device with an IO proc
if (err != kAudioHardwareNoError) {
Server_error(self, "Input AudioDeviceAddIOProc failed %d\n", (int)err);
return -1;
@@ -1029,7 +1070,7 @@ Server_coreaudio_init(Server *self)
err = AudioDeviceSetProperty(self->input, &now, 0, true, kAudioDevicePropertyIOProcStreamUsage, propertySize, input_su);
}
- err = AudioDeviceAddIOProc(self->output, coreaudio_output_callback, (void *) self); // setup our device with an IO proc
+ err = AudioDeviceAddIOProc(self->output, coreaudio_output_callback, (void *) self); // setup our device with an IO proc
if (err != kAudioHardwareNoError) {
Server_error(self, "Output AudioDeviceAddIOProc failed %d\n", (int)err);
return -1;
@@ -1219,7 +1260,7 @@ Server_embedded_ni_start(Server *self)
/* Non-Interleaved */
for (i=0; i<self->bufferSize; i++) {
for (j=0; j<=self->nchnls; j++) {
- /* This could probably be more efficient (ob) */
+ /* TODO: This could probably be more efficient (ob) */
self->output_buffer[i+(self->bufferSize*(j+1))-self->bufferSize] = out[(i*self->nchnls)+j];
}
}
@@ -1465,10 +1506,14 @@ Server_shut_down(Server *self)
return Py_None;
}
+/* handling of PyObjects */
static int
Server_traverse(Server *self, visitproc visit, void *arg)
{
+ /* GUI and TIME ? */
Py_VISIT(self->streams);
+ Py_VISIT(self->jackAutoConnectInputPorts);
+ Py_VISIT(self->jackAutoConnectOutputPorts);
return 0;
}
@@ -1476,6 +1521,8 @@ static int
Server_clear(Server *self)
{
Py_CLEAR(self->streams);
+ Py_CLEAR(self->jackAutoConnectInputPorts);
+ Py_CLEAR(self->jackAutoConnectOutputPorts);
return 0;
}
@@ -1511,9 +1558,8 @@ Server_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (strcmp(audioType, "embedded") != 0)
{
if (PyServer_get_server() != NULL) {
- Server_warning((Server *) PyServer_get_server(), "Warning: A Server is already created!\n"
- "If you put this Server in a new variable, please delete it!\n");
- return PyServer_get_server();
+ PyErr_SetString(PyExc_RuntimeError, "Warning: Trying to create a new Server object while one is already created!\n");
+ Py_RETURN_NONE;
}
}
@@ -1524,7 +1570,8 @@ Server_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
}
if(serverID == MAX_NBR_SERVER){
- return PyString_FromString("You are already using the maximum number of server allowed!");
+ PyErr_SetString(PyExc_RuntimeError, "You are already using the maximum number of server allowed!\n");
+ Py_RETURN_NONE;
}
Server *self;
@@ -1534,6 +1581,8 @@ Server_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->serverName = (char *) calloc(32, sizeof(char));
self->jackautoin = 1;
self->jackautoout = 1;
+ self->jackAutoConnectInputPorts = PyList_New(0);
+ self->jackAutoConnectOutputPorts = PyList_New(0);
self->samplingRate = 44100.0;
self->nchnls = 2;
self->record = 0;
@@ -1623,7 +1672,7 @@ Server_setInputOffset(Server *self, PyObject *arg)
Py_INCREF(Py_None);
return Py_None;
}
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->input_offset = PyInt_AsLong(arg);
}
@@ -1639,7 +1688,7 @@ Server_setOutputOffset(Server *self, PyObject *arg)
Py_INCREF(Py_None);
return Py_None;
}
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->output_offset = PyInt_AsLong(arg);
}
@@ -1650,7 +1699,7 @@ Server_setOutputOffset(Server *self, PyObject *arg)
static PyObject *
Server_setInputDevice(Server *self, PyObject *arg)
{
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->input = PyInt_AsLong(arg);
}
@@ -1661,7 +1710,7 @@ Server_setInputDevice(Server *self, PyObject *arg)
static PyObject *
Server_setInOutDevice(Server *self, PyObject *arg)
{
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->input = PyInt_AsLong(arg);
self->output = PyInt_AsLong(arg);
@@ -1673,7 +1722,7 @@ Server_setInOutDevice(Server *self, PyObject *arg)
static PyObject *
Server_setOutputDevice(Server *self, PyObject *arg)
{
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->output = PyInt_AsLong(arg);
}
@@ -1684,7 +1733,7 @@ Server_setOutputDevice(Server *self, PyObject *arg)
static PyObject *
Server_setMidiInputDevice(Server *self, PyObject *arg)
{
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->midi_input = PyInt_AsLong(arg);
}
@@ -1695,7 +1744,7 @@ Server_setMidiInputDevice(Server *self, PyObject *arg)
static PyObject *
Server_setMidiOutputDevice(Server *self, PyObject *arg)
{
- if (arg != NULL) {
+ if (arg != NULL) {
if (PyInt_Check(arg))
self->midi_output = PyInt_AsLong(arg);
}
@@ -1791,6 +1840,42 @@ Server_setJackAuto(Server *self, PyObject *args)
}
static PyObject *
+Server_setJackAutoConnectInputPorts(Server *self, PyObject *arg)
+{
+ PyObject *tmp;
+
+ if (arg != NULL) {
+ if (PyList_Check(arg)) {
+ tmp = arg;
+ Py_XDECREF(self->jackAutoConnectInputPorts);
+ Py_INCREF(tmp);
+ self->jackAutoConnectInputPorts = tmp;
+ }
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+Server_setJackAutoConnectOutputPorts(Server *self, PyObject *arg)
+{
+ PyObject *tmp;
+
+ if (arg != NULL) {
+ if (PyList_Check(arg)) {
+ tmp = arg;
+ Py_XDECREF(self->jackAutoConnectOutputPorts);
+ Py_INCREF(tmp);
+ self->jackAutoConnectOutputPorts = tmp;
+ }
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
Server_setGlobalSeed(Server *self, PyObject *arg)
{
unsigned int tmp;
@@ -2633,6 +2718,8 @@ static PyMethodDef Server_methods[] = {
{"setNchnls", (PyCFunction)Server_setNchnls, METH_O, "Sets the server's number of channels."},
{"setDuplex", (PyCFunction)Server_setDuplex, METH_O, "Sets the server's duplex mode (0 = only out, 1 = in/out)."},
{"setJackAuto", (PyCFunction)Server_setJackAuto, METH_VARARGS, "Tells the server to auto-connect Jack ports (0 = disable, 1 = enable)."},
+ {"setJackAutoConnectInputPorts", (PyCFunction)Server_setJackAutoConnectInputPorts, METH_O, "Sets a list of ports to auto-connect inputs when using Jack."},
+ {"setJackAutoConnectOutputPorts", (PyCFunction)Server_setJackAutoConnectOutputPorts, METH_O, "Sets a list of ports to auto-connect outputs when using Jack."},
{"setGlobalSeed", (PyCFunction)Server_setGlobalSeed, METH_O, "Sets the server's global seed for random objects."},
{"setAmp", (PyCFunction)Server_setAmp, METH_O, "Sets the overall amplitude."},
{"setAmpCallable", (PyCFunction)Server_setAmpCallable, METH_O, "Sets the Server's GUI callable object."},
@@ -2701,10 +2788,10 @@ PyTypeObject ServerType = {
"Pyo Server object. Handles communication with Portaudio and processing callback loop.", /* tp_doc */
(traverseproc)Server_traverse, /* tp_traverse */
(inquiry)Server_clear, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
Server_methods, /* tp_methods */
Server_members, /* tp_members */
0, /* tp_getset */
diff --git a/src/objects/arithmeticmodule.c b/src/objects/arithmeticmodule.c
index 1c06284..79157db 100644
--- a/src/objects/arithmeticmodule.c
+++ b/src/objects/arithmeticmodule.c
@@ -3771,3 +3771,268 @@ PyTypeObject M_RoundType = {
0, /* tp_alloc */
M_Round_new, /* tp_new */
};
+
+/************/
+/* M_Tanh */
+/************/
+typedef struct {
+ pyo_audio_HEAD
+ PyObject *input;
+ Stream *input_stream;
+ int modebuffer[2]; // need at least 2 slots for mul & add
+} M_Tanh;
+
+static void
+M_Tanh_process(M_Tanh *self) {
+ int i;
+ MYFLT *in = Stream_getData((Stream *)self->input_stream);
+
+ for (i=0; i<self->bufsize; i++) {
+ self->data[i] = MYTANH(in[i]);
+ }
+}
+
+static void M_Tanh_postprocessing_ii(M_Tanh *self) { POST_PROCESSING_II };
+static void M_Tanh_postprocessing_ai(M_Tanh *self) { POST_PROCESSING_AI };
+static void M_Tanh_postprocessing_ia(M_Tanh *self) { POST_PROCESSING_IA };
+static void M_Tanh_postprocessing_aa(M_Tanh *self) { POST_PROCESSING_AA };
+static void M_Tanh_postprocessing_ireva(M_Tanh *self) { POST_PROCESSING_IREVA };
+static void M_Tanh_postprocessing_areva(M_Tanh *self) { POST_PROCESSING_AREVA };
+static void M_Tanh_postprocessing_revai(M_Tanh *self) { POST_PROCESSING_REVAI };
+static void M_Tanh_postprocessing_revaa(M_Tanh *self) { POST_PROCESSING_REVAA };
+static void M_Tanh_postprocessing_revareva(M_Tanh *self) { POST_PROCESSING_REVAREVA };
+
+static void
+M_Tanh_setProcMode(M_Tanh *self)
+{
+ int muladdmode;
+ muladdmode = self->modebuffer[0] + self->modebuffer[1] * 10;
+
+ self->proc_func_ptr = M_Tanh_process;
+
+ switch (muladdmode) {
+ case 0:
+ self->muladd_func_ptr = M_Tanh_postprocessing_ii;
+ break;
+ case 1:
+ self->muladd_func_ptr = M_Tanh_postprocessing_ai;
+ break;
+ case 2:
+ self->muladd_func_ptr = M_Tanh_postprocessing_revai;
+ break;
+ case 10:
+ self->muladd_func_ptr = M_Tanh_postprocessing_ia;
+ break;
+ case 11:
+ self->muladd_func_ptr = M_Tanh_postprocessing_aa;
+ break;
+ case 12:
+ self->muladd_func_ptr = M_Tanh_postprocessing_revaa;
+ break;
+ case 20:
+ self->muladd_func_ptr = M_Tanh_postprocessing_ireva;
+ break;
+ case 21:
+ self->muladd_func_ptr = M_Tanh_postprocessing_areva;
+ break;
+ case 22:
+ self->muladd_func_ptr = M_Tanh_postprocessing_revareva;
+ break;
+ }
+}
+
+static void
+M_Tanh_compute_next_data_frame(M_Tanh *self)
+{
+ (*self->proc_func_ptr)(self);
+ (*self->muladd_func_ptr)(self);
+}
+
+static int
+M_Tanh_traverse(M_Tanh *self, visitproc visit, void *arg)
+{
+ pyo_VISIT
+ Py_VISIT(self->input);
+ Py_VISIT(self->input_stream);
+ return 0;
+}
+
+static int
+M_Tanh_clear(M_Tanh *self)
+{
+ pyo_CLEAR
+ Py_CLEAR(self->input);
+ Py_CLEAR(self->input_stream);
+ return 0;
+}
+
+static void
+M_Tanh_dealloc(M_Tanh* self)
+{
+ pyo_DEALLOC
+ M_Tanh_clear(self);
+ self->ob_type->tp_free((PyObject*)self);
+}
+
+static PyObject *
+M_Tanh_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ int i;
+ PyObject *inputtmp, *input_streamtmp, *multmp=NULL, *addtmp=NULL;
+ M_Tanh *self;
+ self = (M_Tanh *)type->tp_alloc(type, 0);
+
+ self->modebuffer[0] = 0;
+ self->modebuffer[1] = 0;
+
+ INIT_OBJECT_COMMON
+ Stream_setFunctionPtr(self->stream, M_Tanh_compute_next_data_frame);
+ self->mode_func_ptr = M_Tanh_setProcMode;
+
+ static char *kwlist[] = {"input", "mul", "add", NULL};
+
+ if (! PyArg_ParseTupleAndKeywords(args, kwds, "O|OO", kwlist, &inputtmp, &multmp, &addtmp))
+ Py_RETURN_NONE;
+
+ INIT_INPUT_STREAM
+
+ if (multmp) {
+ PyObject_CallMethod((PyObject *)self, "setMul", "O", multmp);
+ }
+
+ if (addtmp) {
+ PyObject_CallMethod((PyObject *)self, "setAdd", "O", addtmp);
+ }
+
+ PyObject_CallMethod(self->server, "addStream", "O", self->stream);
+
+ (*self->mode_func_ptr)(self);
+
+ return (PyObject *)self;
+}
+
+static PyObject * M_Tanh_getServer(M_Tanh* self) { GET_SERVER };
+static PyObject * M_Tanh_getStream(M_Tanh* self) { GET_STREAM };
+static PyObject * M_Tanh_setMul(M_Tanh *self, PyObject *arg) { SET_MUL };
+static PyObject * M_Tanh_setAdd(M_Tanh *self, PyObject *arg) { SET_ADD };
+static PyObject * M_Tanh_setSub(M_Tanh *self, PyObject *arg) { SET_SUB };
+static PyObject * M_Tanh_setDiv(M_Tanh *self, PyObject *arg) { SET_DIV };
+
+static PyObject * M_Tanh_play(M_Tanh *self, PyObject *args, PyObject *kwds) { PLAY };
+static PyObject * M_Tanh_out(M_Tanh *self, PyObject *args, PyObject *kwds) { OUT };
+static PyObject * M_Tanh_stop(M_Tanh *self) { STOP };
+
+static PyObject * M_Tanh_multiply(M_Tanh *self, PyObject *arg) { MULTIPLY };
+static PyObject * M_Tanh_inplace_multiply(M_Tanh *self, PyObject *arg) { INPLACE_MULTIPLY };
+static PyObject * M_Tanh_add(M_Tanh *self, PyObject *arg) { ADD };
+static PyObject * M_Tanh_inplace_add(M_Tanh *self, PyObject *arg) { INPLACE_ADD };
+static PyObject * M_Tanh_sub(M_Tanh *self, PyObject *arg) { SUB };
+static PyObject * M_Tanh_inplace_sub(M_Tanh *self, PyObject *arg) { INPLACE_SUB };
+static PyObject * M_Tanh_div(M_Tanh *self, PyObject *arg) { DIV };
+static PyObject * M_Tanh_inplace_div(M_Tanh *self, PyObject *arg) { INPLACE_DIV };
+
+static PyMemberDef M_Tanh_members[] = {
+{"server", T_OBJECT_EX, offsetof(M_Tanh, server), 0, "Pyo server."},
+{"stream", T_OBJECT_EX, offsetof(M_Tanh, stream), 0, "Stream object."},
+{"input", T_OBJECT_EX, offsetof(M_Tanh, input), 0, "Input sound object."},
+{"mul", T_OBJECT_EX, offsetof(M_Tanh, mul), 0, "Mul factor."},
+{"add", T_OBJECT_EX, offsetof(M_Tanh, add), 0, "Add factor."},
+{NULL} /* Sentinel */
+};
+
+static PyMethodDef M_Tanh_methods[] = {
+{"getServer", (PyCFunction)M_Tanh_getServer, METH_NOARGS, "Returns server object."},
+{"_getStream", (PyCFunction)M_Tanh_getStream, METH_NOARGS, "Returns stream object."},
+{"play", (PyCFunction)M_Tanh_play, METH_VARARGS|METH_KEYWORDS, "Starts computing without sending sound to soundcard."},
+{"stop", (PyCFunction)M_Tanh_stop, METH_NOARGS, "Stops computing."},
+{"out", (PyCFunction)M_Tanh_out, METH_VARARGS|METH_KEYWORDS, "Starts computing and sends sound to soundcard channel speficied by argument."},
+{"setMul", (PyCFunction)M_Tanh_setMul, METH_O, "Sets oscillator mul factor."},
+{"setAdd", (PyCFunction)M_Tanh_setAdd, METH_O, "Sets oscillator add factor."},
+{"setSub", (PyCFunction)M_Tanh_setSub, METH_O, "Sets inverse add factor."},
+{"setDiv", (PyCFunction)M_Tanh_setDiv, METH_O, "Sets inverse mul factor."},
+{NULL} /* Sentinel */
+};
+
+static PyNumberMethods M_Tanh_as_number = {
+(binaryfunc)M_Tanh_add, /*nb_add*/
+(binaryfunc)M_Tanh_sub, /*nb_subtract*/
+(binaryfunc)M_Tanh_multiply, /*nb_multiply*/
+(binaryfunc)M_Tanh_div, /*nb_divide*/
+0, /*nb_remainder*/
+0, /*nb_divmod*/
+0, /*nb_power*/
+0, /*nb_neg*/
+0, /*nb_pos*/
+0, /*(unaryfunc)array_abs,*/
+0, /*nb_nonzero*/
+0, /*nb_invert*/
+0, /*nb_lshift*/
+0, /*nb_rshift*/
+0, /*nb_and*/
+0, /*nb_xor*/
+0, /*nb_or*/
+0, /*nb_coerce*/
+0, /*nb_int*/
+0, /*nb_long*/
+0, /*nb_float*/
+0, /*nb_oct*/
+0, /*nb_hex*/
+(binaryfunc)M_Tanh_inplace_add, /*inplace_add*/
+(binaryfunc)M_Tanh_inplace_sub, /*inplace_subtract*/
+(binaryfunc)M_Tanh_inplace_multiply, /*inplace_multiply*/
+(binaryfunc)M_Tanh_inplace_div, /*inplace_divide*/
+0, /*inplace_remainder*/
+0, /*inplace_power*/
+0, /*inplace_lshift*/
+0, /*inplace_rshift*/
+0, /*inplace_and*/
+0, /*inplace_xor*/
+0, /*inplace_or*/
+0, /*nb_floor_divide*/
+0, /*nb_true_divide*/
+0, /*nb_inplace_floor_divide*/
+0, /*nb_inplace_true_divide*/
+0, /* nb_index */
+};
+
+PyTypeObject M_TanhType = {
+PyObject_HEAD_INIT(NULL)
+0, /*ob_size*/
+"_pyo.M_Tanh_base", /*tp_name*/
+sizeof(M_Tanh), /*tp_basicsize*/
+0, /*tp_itemsize*/
+(destructor)M_Tanh_dealloc, /*tp_dealloc*/
+0, /*tp_print*/
+0, /*tp_getattr*/
+0, /*tp_setattr*/
+0, /*tp_compare*/
+0, /*tp_repr*/
+&M_Tanh_as_number, /*tp_as_number*/
+0, /*tp_as_sequence*/
+0, /*tp_as_mapping*/
+0, /*tp_hash */
+0, /*tp_call*/
+0, /*tp_str*/
+0, /*tp_getattro*/
+0, /*tp_setattro*/
+0, /*tp_as_buffer*/
+Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES, /*tp_flags*/
+"M_Tanh objects. Performs tanh function on audio samples.", /* tp_doc */
+(traverseproc)M_Tanh_traverse, /* tp_traverse */
+(inquiry)M_Tanh_clear, /* tp_clear */
+0, /* tp_richcompare */
+0, /* tp_weaklistoffset */
+0, /* tp_iter */
+0, /* tp_iternext */
+M_Tanh_methods, /* tp_methods */
+M_Tanh_members, /* tp_members */
+0, /* tp_getset */
+0, /* tp_base */
+0, /* tp_dict */
+0, /* tp_descr_get */
+0, /* tp_descr_set */
+0, /* tp_dictoffset */
+0, /* tp_init */
+0, /* tp_alloc */
+M_Tanh_new, /* tp_new */
+};
diff --git a/src/objects/convolvemodule.c b/src/objects/convolvemodule.c
index 63b3fc3..f19da5a 100644
--- a/src/objects/convolvemodule.c
+++ b/src/objects/convolvemodule.c
@@ -174,11 +174,8 @@ Convolve_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
INIT_INPUT_STREAM
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Convolve must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Convolve must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
diff --git a/src/objects/filtremodule.c b/src/objects/filtremodule.c
index de7c575..eb8fb7f 100644
--- a/src/objects/filtremodule.c
+++ b/src/objects/filtremodule.c
@@ -6707,11 +6707,8 @@ Vocoder_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
INIT_INPUT_STREAM
if ( PyObject_HasAttrString((PyObject *)input2tmp, "server") == 0 ) {
- PySys_WriteStderr("TypeError: \"input2\" argument of Vocoder must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of Vocoder must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->input2);
self->input2 = input2tmp;
diff --git a/src/objects/granulatormodule.c b/src/objects/granulatormodule.c
index 44eaf46..7af19e7 100644
--- a/src/objects/granulatormodule.c
+++ b/src/objects/granulatormodule.c
@@ -711,21 +711,15 @@ Granulator_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Granulator must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Granulator must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
if ( PyObject_HasAttrString((PyObject *)envtmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"env\" argument of Granulator must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"env\" argument of Granulator must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->env);
self->env = PyObject_CallMethod((PyObject *)envtmp, "getTableStream", "");
@@ -1866,11 +1860,8 @@ Looper_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Looper must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Looper must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -2648,21 +2639,15 @@ Granule_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Granule must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Granule must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
if ( PyObject_HasAttrString((PyObject *)envtmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"env\" argument of Granule must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"env\" argument of Granule must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->env);
self->env = PyObject_CallMethod((PyObject *)envtmp, "getTableStream", "");
diff --git a/src/objects/matrixprocessmodule.c b/src/objects/matrixprocessmodule.c
index 19a5018..ef30191 100644
--- a/src/objects/matrixprocessmodule.c
+++ b/src/objects/matrixprocessmodule.c
@@ -159,6 +159,10 @@ MatrixPointer_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (! PyArg_ParseTupleAndKeywords(args, kwds, "OOO|OO", kwlist, &matrixtmp, &xtmp, &ytmp, &multmp, &addtmp))
Py_RETURN_NONE;
+ if ( PyObject_HasAttrString((PyObject *)matrixtmp, "getMatrixStream") == 0 ) {
+ PyErr_SetString(PyExc_TypeError, "\"matrix\" argument of MatrixPointer must be a PyoMatrixObject.\n");
+ Py_RETURN_NONE;
+ }
Py_XDECREF(self->matrix);
self->matrix = PyObject_CallMethod((PyObject *)matrixtmp, "getMatrixStream", "");
@@ -221,6 +225,11 @@ MatrixPointer_setMatrix(MatrixPointer *self, PyObject *arg)
}
tmp = arg;
+ if ( PyObject_HasAttrString((PyObject *)tmp, "getMatrixStream") == 0 ) {
+ PyErr_SetString(PyExc_TypeError, "\"matrix\" argument of MatrixPointer must be a PyoMatrixObject.\n");
+ Py_RETURN_NONE;
+ }
+
Py_DECREF(self->matrix);
self->matrix = PyObject_CallMethod((PyObject *)tmp, "getMatrixStream", "");
@@ -238,16 +247,13 @@ MatrixPointer_setX(MatrixPointer *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("MatrixPointer x attributes must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ tmp = arg;
+
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"x\" attribute of MatrixPointer must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
- tmp = arg;
Py_INCREF(tmp);
Py_XDECREF(self->x);
@@ -271,16 +277,13 @@ MatrixPointer_setY(MatrixPointer *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("MatrixPointer y attributes must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ tmp = arg;
+
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"y\" attribute of MatrixPointer must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
- tmp = arg;
Py_INCREF(tmp);
Py_XDECREF(self->y);
diff --git a/src/objects/oscbankmodule.c b/src/objects/oscbankmodule.c
index b8b4cd3..9f98380 100644
--- a/src/objects/oscbankmodule.c
+++ b/src/objects/oscbankmodule.c
@@ -452,11 +452,8 @@ OscBank_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of OscBank must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of OscBank must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
diff --git a/src/objects/oscilmodule.c b/src/objects/oscilmodule.c
index ca15b18..722521e 100644
--- a/src/objects/oscilmodule.c
+++ b/src/objects/oscilmodule.c
@@ -1207,11 +1207,8 @@ Osc_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Osc must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Osc must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -1742,11 +1739,8 @@ OscLoop_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of OscLoop must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of OscLoop must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -2268,11 +2262,8 @@ OscTrig_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of OscTrig must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of OscTrig must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -3198,11 +3189,8 @@ Pointer_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Pointer must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Pointer must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -3279,16 +3267,12 @@ Pointer_setIndex(Pointer *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("TypeError: \"index\" attribute of Pointer must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ tmp = arg;
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"index\" argument of Pointer must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
- tmp = arg;
Py_INCREF(tmp);
Py_XDECREF(self->index);
@@ -3578,11 +3562,8 @@ Pointer2_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Pointer2 must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Pointer2 must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -3661,16 +3642,12 @@ Pointer2_setIndex(Pointer2 *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("TypeError: \"index\" attribute of Pointer2 must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ tmp = arg;
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"index\" argument of Pointer2 must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
- tmp = arg;
Py_INCREF(tmp);
Py_XDECREF(self->index);
@@ -3969,11 +3946,8 @@ TableIndex_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TableIndex must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TableIndex must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -4050,16 +4024,12 @@ TableIndex_setIndex(TableIndex *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("TypeError: \"index\" attribute of TableIndex must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ tmp = arg;
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"index\" argument of TableIndex must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
- tmp = arg;
Py_INCREF(tmp);
Py_XDECREF(self->index);
@@ -4326,11 +4296,8 @@ Lookup_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Lookup must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Lookup must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -4407,16 +4374,12 @@ Lookup_setIndex(Lookup *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("TypeError: \"index\" attribute of Lookup must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
- }
-
tmp = arg;
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"index\" argument of Lookup must be a PyoObject.\n");
+ Py_RETURN_NONE;
+ }
+
Py_INCREF(tmp);
Py_XDECREF(self->index);
@@ -5055,21 +5018,15 @@ Pulsar_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of Pulsar must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of Pulsar must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
if ( PyObject_HasAttrString((PyObject *)envtmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"env\" argument of Pulsar must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"env\" argument of Pulsar must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->env);
self->env = PyObject_CallMethod((PyObject *)envtmp, "getTableStream", "");
@@ -5637,11 +5594,8 @@ TableRead_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TableRead must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TableRead must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
@@ -11397,21 +11351,15 @@ TableScale_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TableScale must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TableScale must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
if ( PyObject_HasAttrString((PyObject *)outtabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"outtable\" argument of TableScale must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"outtable\" argument of TableScale must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->outtable);
self->outtable = PyObject_CallMethod((PyObject *)outtabletmp, "getTableStream", "");
diff --git a/src/objects/oscmodule.c b/src/objects/oscmodule.c
index 51fb4ef..65cd201 100644
--- a/src/objects/oscmodule.c
+++ b/src/objects/oscmodule.c
@@ -937,7 +937,7 @@ int OscDataReceive_handler(const char *path, const char *types, lo_arg **argv, i
void *data, void *user_data)
{
OscDataReceive *self = user_data;
- PyObject *tup, *result;
+ PyObject *tup, *result=NULL;
tup = PyTuple_New(argc+1);
int i, ok = 0;
@@ -976,6 +976,8 @@ int OscDataReceive_handler(const char *path, const char *types, lo_arg **argv, i
if (result == NULL)
PyErr_Print();
}
+ Py_XDECREF(tup);
+ Py_XDECREF(result);
return 0;
}
diff --git a/src/objects/phasevocmodule.c b/src/objects/phasevocmodule.c
index af5d3dc..5ed4bb0 100644
--- a/src/objects/phasevocmodule.c
+++ b/src/objects/phasevocmodule.c
@@ -612,11 +612,8 @@ PVSynth_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVSynth \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVSynth must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -653,9 +650,8 @@ PVSynth_setInput(PVSynth *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVSynth \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVSynth must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -1087,11 +1083,8 @@ PVAddSynth_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVAddSynth \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVAddSynth must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -1137,9 +1130,8 @@ PVAddSynth_setInput(PVAddSynth *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVAddSynth \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVAddSynth must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -1573,11 +1565,8 @@ PVTranspose_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVTranspose \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVTranspose must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -1621,9 +1610,8 @@ PVTranspose_setInput(PVTranspose *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVTranspose \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVTranspose must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -1752,6 +1740,7 @@ typedef struct {
int hopsize;
int overcount;
MYFLT *l_magn;
+ MYFLT *l_freq;
MYFLT **magn;
MYFLT **freq;
int *count;
@@ -1766,8 +1755,9 @@ PVVerb_realloc_memories(PVVerb *self) {
inputLatency = self->size - self->hopsize;
self->overcount = 0;
self->l_magn = (MYFLT *)realloc(self->l_magn, self->hsize * sizeof(MYFLT));
+ self->l_freq = (MYFLT *)realloc(self->l_freq, self->hsize * sizeof(MYFLT));
for (i=0; i<self->hsize; i++)
- self->l_magn[i] = 0.0;
+ self->l_magn[i] = self->l_freq[i] = 0.0;
self->magn = (MYFLT **)realloc(self->magn, self->olaps * sizeof(MYFLT *));
self->freq = (MYFLT **)realloc(self->freq, self->olaps * sizeof(MYFLT *));
for (i=0; i<self->olaps; i++) {
@@ -1788,7 +1778,7 @@ PVVerb_realloc_memories(PVVerb *self) {
static void
PVVerb_process_ii(PVVerb *self) {
int i, k;
- MYFLT revtime, damp, mag, amp;
+ MYFLT revtime, damp, mag, amp, fre;
MYFLT **magn = PVStream_getMagn((PVStream *)self->input_stream);
MYFLT **freq = PVStream_getFreq((PVStream *)self->input_stream);
int *count = PVStream_getCount((PVStream *)self->input_stream);
@@ -1819,11 +1809,15 @@ PVVerb_process_ii(PVVerb *self) {
amp = 1.0;
for (k=0; k<self->hsize; k++) {
mag = magn[self->overcount][k];
- if (mag > self->l_magn[k])
+ fre = freq[self->overcount][k];
+ if (mag > self->l_magn[k]) {
self->magn[self->overcount][k] = self->l_magn[k] = mag;
- else
+ self->freq[self->overcount][k] = self->l_freq[k] = fre;
+ }
+ else {
self->magn[self->overcount][k] = self->l_magn[k] = mag + (self->l_magn[k] - mag) * revtime * amp;
- self->freq[self->overcount][k] = freq[self->overcount][k];
+ self->freq[self->overcount][k] = self->l_freq[k] = fre + (self->l_freq[k] - fre) * revtime * amp;
+ }
amp *= damp;
}
self->overcount++;
@@ -1836,7 +1830,7 @@ PVVerb_process_ii(PVVerb *self) {
static void
PVVerb_process_ai(PVVerb *self) {
int i, k;
- MYFLT revtime, damp, mag, amp;
+ MYFLT revtime, damp, mag, amp, fre;
MYFLT **magn = PVStream_getMagn((PVStream *)self->input_stream);
MYFLT **freq = PVStream_getFreq((PVStream *)self->input_stream);
int *count = PVStream_getCount((PVStream *)self->input_stream);
@@ -1868,11 +1862,15 @@ PVVerb_process_ai(PVVerb *self) {
amp = 1.0;
for (k=0; k<self->hsize; k++) {
mag = magn[self->overcount][k];
- if (mag > self->l_magn[k])
+ fre = freq[self->overcount][k];
+ if (mag > self->l_magn[k]) {
self->magn[self->overcount][k] = self->l_magn[k] = mag;
- else
+ self->freq[self->overcount][k] = self->l_freq[k] = fre;
+ }
+ else {
self->magn[self->overcount][k] = self->l_magn[k] = mag + (self->l_magn[k] - mag) * revtime * amp;
- self->freq[self->overcount][k] = freq[self->overcount][k];
+ self->freq[self->overcount][k] = self->l_freq[k] = fre + (self->l_freq[k] - fre) * revtime * amp;
+ }
amp *= damp;
}
self->overcount++;
@@ -1885,7 +1883,7 @@ PVVerb_process_ai(PVVerb *self) {
static void
PVVerb_process_ia(PVVerb *self) {
int i, k;
- MYFLT revtime, damp, mag, amp;
+ MYFLT revtime, damp, mag, amp, fre;
MYFLT **magn = PVStream_getMagn((PVStream *)self->input_stream);
MYFLT **freq = PVStream_getFreq((PVStream *)self->input_stream);
int *count = PVStream_getCount((PVStream *)self->input_stream);
@@ -1917,11 +1915,15 @@ PVVerb_process_ia(PVVerb *self) {
amp = 1.0;
for (k=0; k<self->hsize; k++) {
mag = magn[self->overcount][k];
- if (mag > self->l_magn[k])
+ fre = freq[self->overcount][k];
+ if (mag > self->l_magn[k]) {
self->magn[self->overcount][k] = self->l_magn[k] = mag;
- else
+ self->freq[self->overcount][k] = self->l_freq[k] = fre;
+ }
+ else {
self->magn[self->overcount][k] = self->l_magn[k] = mag + (self->l_magn[k] - mag) * revtime * amp;
- self->freq[self->overcount][k] = freq[self->overcount][k];
+ self->freq[self->overcount][k] = self->l_freq[k] = fre + (self->l_freq[k] - fre) * revtime * amp;
+ }
amp *= damp;
}
self->overcount++;
@@ -1934,7 +1936,7 @@ PVVerb_process_ia(PVVerb *self) {
static void
PVVerb_process_aa(PVVerb *self) {
int i, k;
- MYFLT revtime, damp, mag, amp;
+ MYFLT revtime, damp, mag, amp, fre;
MYFLT **magn = PVStream_getMagn((PVStream *)self->input_stream);
MYFLT **freq = PVStream_getFreq((PVStream *)self->input_stream);
int *count = PVStream_getCount((PVStream *)self->input_stream);
@@ -1967,11 +1969,15 @@ PVVerb_process_aa(PVVerb *self) {
amp = 1.0;
for (k=0; k<self->hsize; k++) {
mag = magn[self->overcount][k];
- if (mag > self->l_magn[k])
+ fre = freq[self->overcount][k];
+ if (mag > self->l_magn[k]) {
self->magn[self->overcount][k] = self->l_magn[k] = mag;
- else
+ self->freq[self->overcount][k] = self->l_freq[k] = fre;
+ }
+ else {
self->magn[self->overcount][k] = self->l_magn[k] = mag + (self->l_magn[k] - mag) * revtime * amp;
- self->freq[self->overcount][k] = freq[self->overcount][k];
+ self->freq[self->overcount][k] = self->l_freq[k] = fre + (self->l_freq[k] - fre) * revtime * amp;
+ }
amp *= damp;
}
self->overcount++;
@@ -2049,6 +2055,7 @@ PVVerb_dealloc(PVVerb* self)
free(self->magn);
free(self->freq);
free(self->l_magn);
+ free(self->l_freq);
free(self->count);
PVVerb_clear(self);
self->ob_type->tp_free((PyObject*)self);
@@ -2076,11 +2083,8 @@ PVVerb_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVVerb \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVVerb must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -2128,9 +2132,8 @@ PVVerb_setInput(PVVerb *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVVerb \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVVerb must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -2570,11 +2573,8 @@ PVGate_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVGate \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVGate must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -2622,9 +2622,8 @@ PVGate_setInput(PVGate *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVGate \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVGate must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -2970,11 +2969,8 @@ PVCross_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVCross \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVCross must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -2985,11 +2981,8 @@ PVCross_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->input_stream = (PVStream *)input_streamtmp;
if ( PyObject_HasAttrString((PyObject *)input2tmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVCross \"input2\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVCross must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(input2tmp);
Py_XDECREF(self->input2);
@@ -3033,9 +3026,8 @@ PVCross_setInput(PVCross *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVCross \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVCross must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -3057,9 +3049,8 @@ PVCross_setInput2(PVCross *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVCross \"input2\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVCross must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -3318,11 +3309,8 @@ PVMult_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMult \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVMult must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -3333,11 +3321,8 @@ PVMult_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->input_stream = (PVStream *)input_streamtmp;
if ( PyObject_HasAttrString((PyObject *)input2tmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMult \"input2\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVMult must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(input2tmp);
Py_XDECREF(self->input2);
@@ -3377,9 +3362,8 @@ PVMult_setInput(PVMult *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMult \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVMult must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -3401,9 +3385,8 @@ PVMult_setInput2(PVMult *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMult \"input2\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVMult must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -3689,11 +3672,8 @@ PVMorph_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMorph \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVMorph must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -3704,11 +3684,8 @@ PVMorph_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->input_stream = (PVStream *)input_streamtmp;
if ( PyObject_HasAttrString((PyObject *)input2tmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMorph \"input2\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVMorph must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(input2tmp);
Py_XDECREF(self->input2);
@@ -3752,9 +3729,8 @@ PVMorph_setInput(PVMorph *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMorph \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVMorph must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -3776,9 +3752,8 @@ PVMorph_setInput2(PVMorph *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMorph \"input2\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVMorph must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -4138,11 +4113,8 @@ PVFilter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVFilter \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVFilter must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -4189,9 +4161,8 @@ PVFilter_setInput(PVFilter *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVFilter \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVFilter must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -4624,11 +4595,8 @@ PVDelay_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVDelay \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVDelay must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -4675,9 +4643,8 @@ PVDelay_setInput(PVDelay *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVDelay \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVDelay must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -5088,11 +5055,8 @@ PVBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVBuffer \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVBuffer must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -5144,9 +5108,8 @@ PVBuffer_setInput(PVBuffer *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVBuffer \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVBuffer must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -5171,16 +5134,12 @@ PVBuffer_setIndex(PVBuffer *self, PyObject *arg)
return Py_None;
}
- int isNumber = PyNumber_Check(arg);
- if (isNumber == 1) {
- PySys_WriteStderr("TypeError: \"index\" attribute of PVBuffer must be a PyoObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ tmp = arg;
+ if (PyObject_HasAttrString((PyObject *)tmp, "server") == 0) {
+ PyErr_SetString(PyExc_TypeError, "\"index\" argument of PVBuffer must be a PyoObject.\n");
+ Py_RETURN_NONE;
}
- tmp = arg;
Py_INCREF(tmp);
Py_XDECREF(self->index);
@@ -5501,11 +5460,8 @@ PVShift_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVShift \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVShift must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -5549,9 +5505,8 @@ PVShift_setInput(PVShift *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVShift \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVShift must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -5980,11 +5935,8 @@ PVAmpMod_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVAmpMod \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVAmpMod must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -6037,9 +5989,8 @@ PVAmpMod_setInput(PVAmpMod *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVAmpMod \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVAmpMod must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -6589,11 +6540,8 @@ PVFreqMod_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVFreqMod \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVFreqMod must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -6650,9 +6598,8 @@ PVFreqMod_setInput(PVFreqMod *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVFreqMod \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVFreqMod must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -7137,11 +7084,8 @@ PVBufLoops_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVBufLoops \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVBufLoops must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -7196,9 +7140,8 @@ PVBufLoops_setInput(PVBufLoops *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVBufLoops \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVBufLoops must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -7570,11 +7513,8 @@ PVBufTabLoops_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVBufTabLoops \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVBufTabLoops must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -7624,9 +7564,8 @@ PVBufTabLoops_setInput(PVBufTabLoops *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVBufTabLoops \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVBufTabLoops must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -7884,11 +7823,8 @@ PVMix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMix \"input\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVMix must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
Py_XDECREF(self->input);
@@ -7899,11 +7835,8 @@ PVMix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->input_stream = (PVStream *)input_streamtmp;
if ( PyObject_HasAttrString((PyObject *)input2tmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMix \"input2\" argument must be a PyoPVObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVMix must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(input2tmp);
Py_XDECREF(self->input2);
@@ -7943,9 +7876,8 @@ PVMix_setInput(PVMix *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMix \"input\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input\" argument of PVMix must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
@@ -7967,9 +7899,8 @@ PVMix_setInput2(PVMix *self, PyObject *arg)
inputtmp = arg;
if ( PyObject_HasAttrString((PyObject *)inputtmp, "pv_stream") == 0 ) {
- PySys_WriteStderr("TypeError: PVMix \"input2\" argument must be a PyoPVObject.\n");
- Py_INCREF(Py_None);
- return Py_None;
+ PyErr_SetString(PyExc_TypeError, "\"input2\" argument of PVMix must be a PyoPVObject.\n");
+ Py_RETURN_NONE;
}
Py_INCREF(inputtmp);
diff --git a/src/objects/tablemodule.c b/src/objects/tablemodule.c
index 285deb9..3852057 100644
--- a/src/objects/tablemodule.c
+++ b/src/objects/tablemodule.c
@@ -241,7 +241,7 @@ static PyObject * HarmTable_pow(HarmTable *self, PyObject *args, PyObject *kwds)
static PyObject * HarmTable_copy(HarmTable *self, PyObject *arg) { COPY };
static PyObject * HarmTable_setTable(HarmTable *self, PyObject *arg) { SET_TABLE };
static PyObject * HarmTable_getTable(HarmTable *self) { GET_TABLE };
-static PyObject * HarmTable_getViewTable(HarmTable *self) { GET_VIEW_TABLE };
+static PyObject * HarmTable_getViewTable(HarmTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * HarmTable_put(HarmTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * HarmTable_get(HarmTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -309,7 +309,7 @@ static PyMethodDef HarmTable_methods[] = {
{"getServer", (PyCFunction)HarmTable_getServer, METH_NOARGS, "Returns server object."},
{"setTable", (PyCFunction)HarmTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)HarmTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)HarmTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)HarmTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)HarmTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"normalize", (PyCFunction)HarmTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
{"reset", (PyCFunction)HarmTable_reset, METH_NOARGS, "Resets table samples to 0.0"},
@@ -529,7 +529,7 @@ static PyObject * ChebyTable_pow(ChebyTable *self, PyObject *args, PyObject *kwd
static PyObject * ChebyTable_copy(ChebyTable *self, PyObject *arg) { COPY };
static PyObject * ChebyTable_setTable(ChebyTable *self, PyObject *arg) { SET_TABLE };
static PyObject * ChebyTable_getTable(ChebyTable *self) { GET_TABLE };
-static PyObject * ChebyTable_getViewTable(ChebyTable *self) { GET_VIEW_TABLE };
+static PyObject * ChebyTable_getViewTable(ChebyTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * ChebyTable_put(ChebyTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * ChebyTable_get(ChebyTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -671,7 +671,7 @@ static PyMethodDef ChebyTable_methods[] = {
{"copy", (PyCFunction)ChebyTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)ChebyTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)ChebyTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)ChebyTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)ChebyTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)ChebyTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)ChebyTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)ChebyTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -825,7 +825,7 @@ static PyObject * HannTable_pow(HannTable *self, PyObject *args, PyObject *kwds)
static PyObject * HannTable_copy(HannTable *self, PyObject *arg) { COPY };
static PyObject * HannTable_setTable(HannTable *self, PyObject *arg) { SET_TABLE };
static PyObject * HannTable_getTable(HannTable *self) { GET_TABLE };
-static PyObject * HannTable_getViewTable(HannTable *self) { GET_VIEW_TABLE };
+static PyObject * HannTable_getViewTable(HannTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * HannTable_put(HannTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * HannTable_get(HannTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -870,7 +870,7 @@ static PyMethodDef HannTable_methods[] = {
{"copy", (PyCFunction)HannTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)HannTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)HannTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)HannTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)HannTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)HannTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)HannTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)HannTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -1043,7 +1043,7 @@ static PyObject * SincTable_pow(SincTable *self, PyObject *args, PyObject *kwds)
static PyObject * SincTable_copy(SincTable *self, PyObject *arg) { COPY };
static PyObject * SincTable_setTable(SincTable *self, PyObject *arg) { SET_TABLE };
static PyObject * SincTable_getTable(SincTable *self) { GET_TABLE };
-static PyObject * SincTable_getViewTable(SincTable *self) { GET_VIEW_TABLE };
+static PyObject * SincTable_getViewTable(SincTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * SincTable_put(SincTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * SincTable_get(SincTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -1122,7 +1122,7 @@ static PyMethodDef SincTable_methods[] = {
{"copy", (PyCFunction)SincTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)SincTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)SincTable_getTable, METH_NOARGS, "Returns a list of table samples."},
- {"getViewTable", (PyCFunction)SincTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+ {"getViewTable", (PyCFunction)SincTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)SincTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)SincTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)SincTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -1269,7 +1269,7 @@ static PyObject * WinTable_pow(WinTable *self, PyObject *args, PyObject *kwds) {
static PyObject * WinTable_copy(WinTable *self, PyObject *arg) { COPY };
static PyObject * WinTable_setTable(WinTable *self, PyObject *arg) { SET_TABLE };
static PyObject * WinTable_getTable(WinTable *self) { GET_TABLE };
-static PyObject * WinTable_getViewTable(WinTable *self) { GET_VIEW_TABLE };
+static PyObject * WinTable_getViewTable(WinTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * WinTable_put(WinTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * WinTable_get(WinTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -1335,7 +1335,7 @@ static PyMethodDef WinTable_methods[] = {
{"copy", (PyCFunction)WinTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)WinTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)WinTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)WinTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)WinTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)WinTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)WinTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)WinTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -1495,7 +1495,7 @@ static PyObject * ParaTable_pow(ParaTable *self, PyObject *args, PyObject *kwds)
static PyObject * ParaTable_copy(ParaTable *self, PyObject *arg) { COPY };
static PyObject * ParaTable_setTable(ParaTable *self, PyObject *arg) { SET_TABLE };
static PyObject * ParaTable_getTable(ParaTable *self) { GET_TABLE };
-static PyObject * ParaTable_getViewTable(ParaTable *self) { GET_VIEW_TABLE };
+static PyObject * ParaTable_getViewTable(ParaTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * ParaTable_put(ParaTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * ParaTable_get(ParaTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -1540,7 +1540,7 @@ static PyMethodDef ParaTable_methods[] = {
{"copy", (PyCFunction)ParaTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)ParaTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)ParaTable_getTable, METH_NOARGS, "Returns a list of table samples."},
- {"getViewTable", (PyCFunction)ParaTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+ {"getViewTable", (PyCFunction)ParaTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)ParaTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)ParaTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)ParaTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -1733,7 +1733,7 @@ static PyObject * LinTable_pow(LinTable *self, PyObject *args, PyObject *kwds) {
static PyObject * LinTable_copy(LinTable *self, PyObject *arg) { COPY };
static PyObject * LinTable_setTable(LinTable *self, PyObject *arg) { SET_TABLE };
static PyObject * LinTable_getTable(LinTable *self) { GET_TABLE };
-static PyObject * LinTable_getViewTable(LinTable *self) { GET_VIEW_TABLE };
+static PyObject * LinTable_getViewTable(LinTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * LinTable_put(LinTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * LinTable_get(LinTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -1832,7 +1832,7 @@ static PyMethodDef LinTable_methods[] = {
{"copy", (PyCFunction)LinTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)LinTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)LinTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)LinTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)LinTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)LinTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)LinTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)LinTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -2051,7 +2051,7 @@ static PyObject * LogTable_pow(LogTable *self, PyObject *args, PyObject *kwds) {
static PyObject * LogTable_copy(LogTable *self, PyObject *arg) { COPY };
static PyObject * LogTable_setTable(LogTable *self, PyObject *arg) { SET_TABLE };
static PyObject * LogTable_getTable(LogTable *self) { GET_TABLE };
-static PyObject * LogTable_getViewTable(LogTable *self) { GET_VIEW_TABLE };
+static PyObject * LogTable_getViewTable(LogTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * LogTable_put(LogTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * LogTable_get(LogTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -2150,7 +2150,7 @@ static PyMethodDef LogTable_methods[] = {
{"copy", (PyCFunction)LogTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)LogTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)LogTable_getTable, METH_NOARGS, "Returns a list of table samples."},
- {"getViewTable", (PyCFunction)LogTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+ {"getViewTable", (PyCFunction)LogTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)LogTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)LogTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)LogTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -2347,7 +2347,7 @@ static PyObject * CosTable_pow(CosTable *self, PyObject *args, PyObject *kwds) {
static PyObject * CosTable_copy(CosTable *self, PyObject *arg) { COPY };
static PyObject * CosTable_setTable(CosTable *self, PyObject *arg) { SET_TABLE };
static PyObject * CosTable_getTable(CosTable *self) { GET_TABLE };
-static PyObject * CosTable_getViewTable(CosTable *self) { GET_VIEW_TABLE };
+static PyObject * CosTable_getViewTable(CosTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * CosTable_put(CosTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * CosTable_get(CosTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -2446,7 +2446,7 @@ static PyMethodDef CosTable_methods[] = {
{"copy", (PyCFunction)CosTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)CosTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)CosTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)CosTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)CosTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)CosTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)CosTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)CosTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -2667,7 +2667,7 @@ static PyObject * CosLogTable_pow(CosLogTable *self, PyObject *args, PyObject *k
static PyObject * CosLogTable_copy(CosLogTable *self, PyObject *arg) { COPY };
static PyObject * CosLogTable_setTable(CosLogTable *self, PyObject *arg) { SET_TABLE };
static PyObject * CosLogTable_getTable(CosLogTable *self) { GET_TABLE };
-static PyObject * CosLogTable_getViewTable(CosLogTable *self) { GET_VIEW_TABLE };
+static PyObject * CosLogTable_getViewTable(CosLogTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * CosLogTable_put(CosLogTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * CosLogTable_get(CosLogTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -2766,7 +2766,7 @@ static PyMethodDef CosLogTable_methods[] = {
{"copy", (PyCFunction)CosLogTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)CosLogTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)CosLogTable_getTable, METH_NOARGS, "Returns a list of table samples."},
- {"getViewTable", (PyCFunction)CosLogTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+ {"getViewTable", (PyCFunction)CosLogTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)CosLogTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)CosLogTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)CosLogTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -2990,7 +2990,7 @@ static PyObject * CurveTable_pow(CurveTable *self, PyObject *args, PyObject *kwd
static PyObject * CurveTable_copy(CurveTable *self, PyObject *arg) { COPY };
static PyObject * CurveTable_setTable(CurveTable *self, PyObject *arg) { SET_TABLE };
static PyObject * CurveTable_getTable(CurveTable *self) { GET_TABLE };
-static PyObject * CurveTable_getViewTable(CurveTable *self) { GET_VIEW_TABLE };
+static PyObject * CurveTable_getViewTable(CurveTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * CurveTable_put(CurveTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * CurveTable_get(CurveTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -3131,7 +3131,7 @@ static PyMethodDef CurveTable_methods[] = {
{"copy", (PyCFunction)CurveTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)CurveTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)CurveTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)CurveTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)CurveTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)CurveTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)CurveTable_setData, METH_O, "Sets the table from samples in a text file."},
{"setSize", (PyCFunction)CurveTable_setSize, METH_O, "Sets the size of the table in samples"},
@@ -3354,7 +3354,7 @@ static PyObject * ExpTable_pow(ExpTable *self, PyObject *args, PyObject *kwds) {
static PyObject * ExpTable_copy(ExpTable *self, PyObject *arg) { COPY };
static PyObject * ExpTable_setTable(ExpTable *self, PyObject *arg) { SET_TABLE };
static PyObject * ExpTable_getTable(ExpTable *self) { GET_TABLE };
-static PyObject * ExpTable_getViewTable(ExpTable *self) { GET_VIEW_TABLE };
+static PyObject * ExpTable_getViewTable(ExpTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * ExpTable_put(ExpTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * ExpTable_get(ExpTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -3494,7 +3494,7 @@ static PyMethodDef ExpTable_methods[] = {
{"copy", (PyCFunction)ExpTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)ExpTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)ExpTable_getTable, METH_NOARGS, "Returns a list of table samples."},
-{"getViewTable", (PyCFunction)ExpTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+{"getViewTable", (PyCFunction)ExpTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)ExpTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)ExpTable_setData, METH_O, "Sets the table from samples in a text file."},
{"setSize", (PyCFunction)ExpTable_setSize, METH_O, "Sets the size of the table in samples"},
@@ -4803,7 +4803,7 @@ static PyObject * DataTable_pow(DataTable *self, PyObject *args, PyObject *kwds)
static PyObject * DataTable_copy(DataTable *self, PyObject *arg) { COPY };
static PyObject * DataTable_setTable(DataTable *self, PyObject *arg) { SET_TABLE };
static PyObject * DataTable_getTable(DataTable *self) { GET_TABLE };
-static PyObject * DataTable_getViewTable(DataTable *self) { GET_VIEW_TABLE };
+static PyObject * DataTable_getViewTable(DataTable *self, PyObject *args, PyObject *kwds) { GET_VIEW_TABLE };
static PyObject * DataTable_put(DataTable *self, PyObject *args, PyObject *kwds) { TABLE_PUT };
static PyObject * DataTable_get(DataTable *self, PyObject *args, PyObject *kwds) { TABLE_GET };
@@ -4831,7 +4831,7 @@ static PyMethodDef DataTable_methods[] = {
{"copy", (PyCFunction)DataTable_copy, METH_O, "Copy data from table given in argument."},
{"setTable", (PyCFunction)DataTable_setTable, METH_O, "Sets the table content from a list of floats (must be the same size as the object size)."},
{"getTable", (PyCFunction)DataTable_getTable, METH_NOARGS, "Returns a list of table samples."},
- {"getViewTable", (PyCFunction)DataTable_getViewTable, METH_NOARGS, "Returns a list of pixel coordinates for drawing the table."},
+ {"getViewTable", (PyCFunction)DataTable_getViewTable, METH_VARARGS|METH_KEYWORDS, "Returns a list of pixel coordinates for drawing the table."},
{"getTableStream", (PyCFunction)DataTable_getTableStream, METH_NOARGS, "Returns table stream object created by this table."},
{"setData", (PyCFunction)DataTable_setData, METH_O, "Sets the table from samples in a text file."},
{"normalize", (PyCFunction)DataTable_normalize, METH_NOARGS, "Normalize table samples between -1 and 1"},
@@ -5035,11 +5035,8 @@ TableRec_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
INIT_INPUT_STREAM
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TableRec must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TableRec must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
Py_INCREF(tabletmp);
@@ -5526,11 +5523,8 @@ TableMorph_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
INIT_INPUT_STREAM
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TableMorph must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TableMorph must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
Py_INCREF(tabletmp);
@@ -5847,11 +5841,8 @@ TrigTableRec_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->trigger_stream = (Stream *)trig_streamtmp;
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TrigTableRec must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TrigTableRec must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
Py_INCREF(tabletmp);
@@ -6309,11 +6300,8 @@ TablePut_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
INIT_INPUT_STREAM
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TablePut must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TablePut must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
Py_INCREF(tabletmp);
diff --git a/src/objects/trigmodule.c b/src/objects/trigmodule.c
index 29176d2..be86e0c 100644
--- a/src/objects/trigmodule.c
+++ b/src/objects/trigmodule.c
@@ -1692,11 +1692,8 @@ TrigEnv_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
INIT_INPUT_STREAM
if ( PyObject_HasAttrString((PyObject *)tabletmp, "getTableStream") == 0 ) {
- PySys_WriteStderr("TypeError: \"table\" argument of TrigEnv must be a PyoTableObject.\n");
- if (PyInt_AsLong(PyObject_CallMethod(self->server, "getIsBooted", NULL))) {
- PyObject_CallMethod(self->server, "shutdown", NULL);
- }
- Py_Exit(1);
+ PyErr_SetString(PyExc_TypeError, "\"table\" argument of TrigEnv must be a PyoTableObject.\n");
+ Py_RETURN_NONE;
}
Py_XDECREF(self->table);
self->table = PyObject_CallMethod((PyObject *)tabletmp, "getTableStream", "");
diff --git a/utils/E-Pyo.py b/utils/E-Pyo.py
index 87656d1..31f0b5f 100755
--- a/utils/E-Pyo.py
+++ b/utils/E-Pyo.py
@@ -3,13 +3,26 @@
"""
E-Pyo is a simple text editor especially configured to edit pyo audio programs.
-You can do absolutely everything you want to with this piece of software.
+You can do absolutely everything you want with this piece of software.
Olivier Belanger - 2012
+TODO:
+ - Fix printing to pdf
+ - Output panel close button on OSX (display only)
"""
from __future__ import with_statement
-import sys, os, string, inspect, keyword, wx, codecs, subprocess, unicodedata, contextlib, StringIO, shutil, copy, pprint, random, time, threading
+import sys
+import __builtin__
+__builtin__.EPYO_APP_OPENED = True
+
+if sys.platform == "linux2":
+ WX_VERSION = '3.0'
+ import wxversion
+ wxversion.select(WX_VERSION)
+
+import os, string, inspect, keyword, wx, codecs, subprocess, unicodedata
+import contextlib, StringIO, shutil, copy, pprint, random, time, threading
from types import UnicodeType, MethodType, ListType
from wx.lib.wordwrap import wordwrap
from wx.lib.embeddedimage import PyEmbeddedImage
@@ -17,7 +30,7 @@ import wx.lib.colourselect as csel
import wx.lib.scrolledpanel as scrolled
import wx.lib.dialogs
import wx.combo
-import wx.stc as stc
+import wx.stc as stc
import FlatNotebook as FNB
from pyo import *
from PyoDoc import ManualFrame
@@ -378,7 +391,7 @@ class MyFrame(wx.Frame):
self.frTxt.SetLabel("Freq: %.2f" % x)
self.freqPort.value = x
-app = wx.PySimpleApp()
+app = wx.App(False)
mainFrame = MyFrame(None, title='Simple App', pos=(100,100), size=(500,300))
mainFrame.Show()
app.MainLoop()
@@ -396,7 +409,7 @@ class MyFrame(wx.Frame):
if __name__ == "__main__":
- app = wx.PySimpleApp()
+ app = wx.App(False)
mainFrame = MyFrame(None, title='Simple App', pos=(100,100), size=(500,300))
mainFrame.Show()
app.MainLoop()
@@ -645,7 +658,9 @@ KEY_COMMANDS = {
"29. Alt + 'D'": "Line Duplicate",
"30. Alt + 'X'": "Line Cut",
"31. Alt + 'V'": "Line Paste",
-"32. Alt + CLICK + DRAG": "Rectangular selection"
+"32. Alt + CLICK + DRAG": "Rectangular selection",
+"33. Shit + Return": "Show the init line of a pyo object in a tooltip",
+"34. Ctrl/Cmd + Return": "Show the __doc__ string of a python object, module or function"
}
############## Allowed Extensions ##############
@@ -763,7 +778,6 @@ class DataEvent(wx.PyEvent):
def Clone (self):
self.__class__ (self.GetId())
-
class RunningThread(threading.Thread):
def __init__(self, path, cwd, event_receiver):
threading.Thread.__init__(self)
@@ -796,30 +810,38 @@ class RunningThread(threading.Thread):
vars_to_remove = "PYTHONHOME PYTHONPATH EXECUTABLEPATH RESOURCEPATH ARGVZERO PYTHONOPTIMIZE"
prelude = "export -n %s;export PATH=/usr/local/bin:/usr/local/lib:$PATH;" % vars_to_remove
if CALLER_NEED_TO_INVOKE_32_BIT:
- self.proc = subprocess.Popen(['%s%s%s "%s"' % (prelude, SET_32_BIT_ARCH, WHICH_PYTHON, self.path)],
+ self.proc = subprocess.Popen(['%s%s%s -u "%s"' % (prelude, SET_32_BIT_ARCH, WHICH_PYTHON, self.path)],
shell=True, cwd=self.cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
- self.proc = subprocess.Popen(['%s%s "%s"' % (prelude, WHICH_PYTHON, self.path)], cwd=self.cwd,
+ self.proc = subprocess.Popen(['%s%s -u "%s"' % (prelude, WHICH_PYTHON, self.path)], cwd=self.cwd,
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
elif PLATFORM == "darwin":
if CALLER_NEED_TO_INVOKE_32_BIT:
- self.proc = subprocess.Popen(['%s%s "%s"' % (SET_32_BIT_ARCH, WHICH_PYTHON, self.path)],
+ self.proc = subprocess.Popen(['%s%s -u "%s"' % (SET_32_BIT_ARCH, WHICH_PYTHON, self.path)],
shell=True, cwd=self.cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
- self.proc = subprocess.Popen(['%s "%s"' % (WHICH_PYTHON, self.path)], cwd=self.cwd,
+ self.proc = subprocess.Popen(['%s -u "%s"' % (WHICH_PYTHON, self.path)], cwd=self.cwd,
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
elif PLATFORM == "win32":
- self.proc = subprocess.Popen([WHICH_PYTHON, self.path], cwd=self.cwd, shell=False,
+ self.proc = subprocess.Popen([WHICH_PYTHON, "-u", self.path], cwd=self.cwd, shell=False,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
- self.proc = subprocess.Popen([WHICH_PYTHON, self.path], cwd=self.cwd,
+ self.proc = subprocess.Popen([WHICH_PYTHON, "-u", self.path], cwd=self.cwd,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ header = '=== Output log of process "%s", launched: %s ===\n' % (self.filename, time.strftime('"%d %b %Y %H:%M:%S"', time.localtime()))
+ data_event = DataEvent({"log": header, "pid": self.pid, "filename": self.filename, "active": True})
+ wx.PostEvent(self.event_receiver, data_event)
while self.proc.poll() == None and not self.terminated:
- time.sleep(.25)
+ log = ""
+ for line in self.proc.stdout.readline():
+ log = log + line
+ data_event = DataEvent({"log": log, "pid": self.pid, "filename": self.filename, "active": True})
+ wx.PostEvent(self.event_receiver, data_event)
+ sys.stdout.flush()
+ time.sleep(.025)
stdout, stderr = self.proc.communicate()
- header = '=== Output log of process "%s", launched: %s ===\n' % (self.filename, time.strftime('"%d %b %Y %H:%M:%S"', time.localtime()))
- output = header + stdout + stderr
+ output = stdout + stderr
if "StartNotification name = default" in output:
output = output.replace("StartNotification name = default", "")
if "epyo_tempfile.py" in output:
@@ -841,12 +863,12 @@ class RunningThread(threading.Thread):
pos += 1
elinepos = pos
linenum = int(output[slinepos:elinepos].strip())
- output = output[:slinepos] + str(linenum-2) + output[elinepos:]
+ output = output[:slinepos] + str(linenum-3) + output[elinepos:]
except:
pass
if self.terminated:
output = output + "\n=== Process killed. ==="
- data_event = DataEvent({"log": output, "pid": self.pid, "filename": self.filename})
+ data_event = DataEvent({"log": output, "pid": self.pid, "filename": self.filename, "active": False})
wx.PostEvent(self.event_receiver, data_event)
class KeyCommandsFrame(wx.Frame):
@@ -985,6 +1007,9 @@ class EditorPreview(stc.StyledTextCtrl):
self.SetFoldMarginHiColour(True, STYLES['foldmarginback']['colour'])
self.SetEdgeColumn(60)
+ # WxPython 3 needs the lexer to be set before folding property
+ self.SetProperty("fold", "1")
+
class ComponentPanel(scrolled.ScrolledPanel):
def __init__(self, parent, size):
scrolled.ScrolledPanel.__init__(self, parent, wx.ID_ANY, pos=(0,0), size=size, style=wx.SUNKEN_BORDER)
@@ -998,17 +1023,17 @@ class ComponentPanel(scrolled.ScrolledPanel):
box = wx.BoxSizer(wx.HORIZONTAL)
label = wx.StaticText(self, wx.ID_ANY, label=STYLES_LABELS[component])
box.Add(label, 1, wx.EXPAND|wx.TOP|wx.LEFT, 3)
- btog = wx.ToggleButton(self, wx.ID_ANY, label="B", size=(20,20))
+ btog = wx.ToggleButton(self, wx.ID_ANY, label="B", size=(24,20))
btog.SetValue(STYLES[component]['bold'])
box.Add(btog, 0, wx.TOP|wx.ALIGN_RIGHT, 1)
btog.Bind(wx.EVT_TOGGLEBUTTON, self.OnBToggleButton)
self.bTogRefs[btog] = component
- itog = wx.ToggleButton(self, wx.ID_ANY, label="I", size=(20,20))
+ itog = wx.ToggleButton(self, wx.ID_ANY, label="I", size=(24,20))
itog.SetValue(STYLES[component]['italic'])
box.Add(itog, 0, wx.TOP|wx.ALIGN_RIGHT, 1)
itog.Bind(wx.EVT_TOGGLEBUTTON, self.OnIToggleButton)
self.iTogRefs[itog] = component
- utog = wx.ToggleButton(self, wx.ID_ANY, label="U", size=(20,20))
+ utog = wx.ToggleButton(self, wx.ID_ANY, label="U", size=(24,20))
utog.SetValue(STYLES[component]['underline'])
box.Add(utog, 0, wx.TOP|wx.ALIGN_RIGHT, 1)
utog.Bind(wx.EVT_TOGGLEBUTTON, self.OnUToggleButton)
@@ -1092,7 +1117,12 @@ class ColourEditor(wx.Frame):
self.cur_style = ""
- toolbar = self.CreateToolBar()
+ self.panel = wx.Panel(self)
+ self.panel.SetAutoLayout(True)
+ mainSizer = wx.BoxSizer(wx.VERTICAL)
+ self.panel.SetSizer(mainSizer)
+
+ toolbar = wx.ToolBar(self.panel, -1)
saveButton = wx.Button(toolbar, wx.ID_ANY, label="Save Style")
saveButton.Bind(wx.EVT_BUTTON, self.OnSave)
toolbar.AddControl(saveButton)
@@ -1109,25 +1139,22 @@ class ColourEditor(wx.Frame):
toolbar.AddControl(deleteButton)
toolbar.Realize()
- self.panel = wx.Panel(self)
- self.panel.SetAutoLayout(True)
- mainSizer = wx.BoxSizer(wx.VERTICAL)
- self.panel.SetSizer(mainSizer)
+ mainSizer.Add(toolbar, 0, wx.EXPAND)
enum = wx.FontEnumerator()
enum.EnumerateFacenames(fixedWidthOnly=True)
facelist = enum.GetFacenames()
facelist.sort()
- buttonData = [ (STYLES_GENERALS[0], STYLES['default']['colour'], (50, 20), STYLES_LABELS['default']),
- (STYLES_GENERALS[1], STYLES['background']['colour'], (50, 20), STYLES_LABELS['background']),
- (STYLES_GENERALS[2], STYLES['selback']['colour'], (50, 20), STYLES_LABELS['selback']),
- (STYLES_GENERALS[3], STYLES['caret']['colour'], (50, 20), STYLES_LABELS['caret']) ]
+ buttonData = [ (STYLES_GENERALS[0], STYLES['default']['colour'], (50, 24), STYLES_LABELS['default']),
+ (STYLES_GENERALS[1], STYLES['background']['colour'], (50, 24), STYLES_LABELS['background']),
+ (STYLES_GENERALS[2], STYLES['selback']['colour'], (50, 24), STYLES_LABELS['selback']),
+ (STYLES_GENERALS[3], STYLES['caret']['colour'], (50, 24), STYLES_LABELS['caret']) ]
self.buttonRefs = {}
section1Sizer = wx.BoxSizer(wx.HORIZONTAL)
- buttonSizer1 = wx.FlexGridSizer(1, 2, 25, 5)
+ buttonSizer1 = wx.FlexGridSizer(0, 2, 25, 5)
for name, color, size, label in buttonData[:2]:
b = csel.ColourSelect(self.panel, -1, "", hex_to_rgb(color), size=size)
b.Bind(csel.EVT_COLOURSELECT, self.OnSelectColour)
@@ -1136,7 +1163,7 @@ class ColourEditor(wx.Frame):
(b, 0, wx.LEFT|wx.RIGHT, 5)])
section1Sizer.Add(buttonSizer1, 0, wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP|wx.ALIGN_LEFT, 10)
section1Sizer.AddSpacer(110)
- buttonSizer2 = wx.FlexGridSizer(1, 2, 25, 5)
+ buttonSizer2 = wx.FlexGridSizer(0, 2, 25, 5)
for name, color, size, label in buttonData[2:4]:
b = csel.ColourSelect(self.panel, -1, "", hex_to_rgb(color), size=size)
b.Bind(csel.EVT_COLOURSELECT, self.OnSelectColour)
@@ -1318,7 +1345,7 @@ class SnippetTree(wx.Panel):
self.sizer = wx.BoxSizer(wx.VERTICAL)
toolbarbox = wx.BoxSizer(wx.HORIZONTAL)
- self.toolbar = wx.ToolBar(self, -1, size=(-1,36))
+ self.toolbar = wx.ToolBar(self, -1)
self.toolbar.SetToolBitmapSize(tsize)
self.toolbar.AddLabelTool(SNIPPET_ADD_FOLDER_ID, "Add Category", folder_add_bmp, shortHelp="Add a New Category")
self.toolbar.AddLabelTool(SNIPPET_DEL_FILE_ID, "Delete", file_add_bmp, shortHelp="Delete Snippet or Category")
@@ -1436,7 +1463,7 @@ class SnippetTree(wx.Panel):
name = self.tree.GetItemText(item)
ritem = self.tree.GetItemParent(item)
category = self.tree.GetItemText(ritem)
- self.GetParent().GetParent().onLoad(name, category)
+ self.GetParent().GetParent().onLoad(name, category)
def select(self, item):
self.tree.SelectItem(item)
@@ -1531,13 +1558,12 @@ class SnippetFrame(wx.Frame):
saveButton = wx.Button(self.toolbar, wx.ID_ANY, label="Save Snippet")
self.toolbar.AddControl(saveButton)
self.Bind(wx.EVT_BUTTON, self.onSave, id=saveButton.GetId())
-
+ self.toolbar.Realize()
+
toolbarBox.Add(self.toolbar, 1, wx.ALIGN_LEFT|wx.EXPAND|wx.LEFT, 5)
toolbar2 = wx.ToolBar(self.panel, -1)
self.tagButton = wx.Button(toolbar2, wx.ID_ANY, label="Tag Selection")
- X = self.tagButton.GetSize()[0]
- toolbar2.SetSize((X+8, 40))
toolbar2.AddControl(self.tagButton)
self.Bind(wx.EVT_BUTTON, self.onTagSelection, id=self.tagButton.GetId())
toolbar2.Realize()
@@ -1594,6 +1620,7 @@ class SnippetFrame(wx.Frame):
def onSave(self, evt):
dlg = wx.SingleChoiceDialog(self, 'Choose the Snippet Category',
'Snippet Category', SNIPPETS_CATEGORIES, wx.OK)
+ dlg.SetSize((250,300))
dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_OK:
category = dlg.GetStringSelection()
@@ -1789,6 +1816,14 @@ class MainFrame(wx.Frame):
EVT_DATA_EVENT(self, self.format_outputLog)
+ if sys.platform == "darwin":
+ accel_ctrl = wx.ACCEL_CMD
+ else:
+ accel_ctrl = wx.ACCEL_CTRL
+ # To set up an accelerator key
+ #aEntry = wx.AcceleratorEntry(accel_ctrl|wx.ACCEL_SHIFT, wx.WXK_UP, 602)
+ # "\t%s" % aEntry.ToString()
+
self.snippet_frame = SnippetFrame(self, title='Snippet Editor', pos=(25,25), size=(700,450))
self.style_frame = ColourEditor(self, title='Style Editor', pos=(100,100), size=(500,550))
self.style_frame.setCurrentStyle(PREF_STYLE)
@@ -1849,11 +1884,12 @@ class MainFrame(wx.Frame):
self.Bind(wx.EVT_MENU, self.save, id=wx.ID_SAVE)
menu1.Append(wx.ID_SAVEAS, "Save As...\tShift+Ctrl+S")
self.Bind(wx.EVT_MENU, self.saveas, id=wx.ID_SAVEAS)
- menu1.AppendSeparator()
- menu1.Append(wx.ID_PREVIEW, "Print Preview")
- self.Bind(wx.EVT_MENU, self.OnPrintPreview, id=wx.ID_PREVIEW)
- menu1.Append(wx.ID_PRINT, "Print\tCtrl+P")
- self.Bind(wx.EVT_MENU, self.OnPrint, id=wx.ID_PRINT)
+ # TODO : printing not working well enough
+ #menu1.AppendSeparator()
+ #menu1.Append(wx.ID_PREVIEW, "Print Preview")
+ #self.Bind(wx.EVT_MENU, self.OnPrintPreview, id=wx.ID_PREVIEW)
+ #menu1.Append(wx.ID_PRINT, "Print\tCtrl+P")
+ #self.Bind(wx.EVT_MENU, self.OnPrint, id=wx.ID_PRINT)
if sys.platform != "darwin":
menu1.AppendSeparator()
prefItem = menu1.Append(wx.ID_PREFERENCES, "Preferences...\tCtrl+;")
@@ -1892,8 +1928,12 @@ class MainFrame(wx.Frame):
menu2.Append(107, "Remove Trailing White Space")
self.Bind(wx.EVT_MENU, self.removeTrailingWhiteSpace, id=107)
menu2.AppendSeparator()
- menu2.Append(103, "Collapse/Expand\tCtrl+I")
+ menu2.Append(103, "Fold All\tCtrl+I")
self.Bind(wx.EVT_MENU, self.fold, id=103)
+ menu2.Append(104, "Expand All\tShift+Ctrl+I")
+ self.Bind(wx.EVT_MENU, self.fold, id=104)
+ menu2.Append(105, "Fold/Expand Current Scope\tCtrl+8")
+ self.Bind(wx.EVT_MENU, self.foldExpandScope, id=105)
menu2.Append(108, "Un/Comment Selection\tCtrl+J")
self.Bind(wx.EVT_MENU, self.OnComment, id=108)
menu2.Append(114, "Show AutoCompletion\tCtrl+K")
@@ -1965,6 +2005,10 @@ class MainFrame(wx.Frame):
self.Bind(wx.EVT_MENU, self.showDocFrame, id=190)
menu4.Append(180, "Open Documentation for Pyo Object Under Caret\tCtrl+D")
self.Bind(wx.EVT_MENU, self.showDoc, id=180)
+ menu4.Append(181, "Show args for Pyo Object Under Caret\tShift+Return")
+ self.Bind(wx.EVT_MENU, self.showArgs, id=181)
+ menu4.Append(182, "Show __doc__ String for Word Under Caret\tCtrl+Return")
+ self.Bind(wx.EVT_MENU, self.showDocString, id=182)
menu4.AppendSeparator()
menu4.Append(185, "Rebuild Documentation")
self.Bind(wx.EVT_MENU, self.rebuildDoc, id=185)
@@ -1987,11 +2031,6 @@ class MainFrame(wx.Frame):
self.makeSnippetMenu()
self.menuBar.Append(self.menu7, "Snippets")
- if sys.platform == "darwin":
- accel_ctrl = wx.ACCEL_CMD
- else:
- accel_ctrl = wx.ACCEL_CTRL
-
menu8 = wx.Menu()
menu8.Append(600, "Add Marker to Current Line\tShift+Ctrl+M")
self.Bind(wx.EVT_MENU, self.addMarker, id=600)
@@ -2000,10 +2039,8 @@ class MainFrame(wx.Frame):
menu8.Append(604, "Delete All Markers")
self.Bind(wx.EVT_MENU, self.deleteAllMarkers, id=604)
menu8.AppendSeparator()
- aEntry = wx.AcceleratorEntry(accel_ctrl|wx.ACCEL_SHIFT, wx.WXK_UP, 602)
- menu8.Append(602, 'Navigate Markers Upward\t%s' % aEntry.ToString())
- aEntry = wx.AcceleratorEntry(accel_ctrl|wx.ACCEL_SHIFT, wx.WXK_DOWN, 603)
- menu8.Append(603, 'Navigate Markers Downward\t%s' % aEntry.ToString())
+ menu8.Append(602, 'Navigate Markers Upward\tCtrl+9')
+ menu8.Append(603, 'Navigate Markers Downward\tCtrl+0')
self.Bind(wx.EVT_MENU, self.navigateMarkers, id=602, id2=603)
self.menuBar.Append(menu8, "Markers")
@@ -2052,22 +2089,23 @@ class MainFrame(wx.Frame):
self.SetMenuBar(self.menuBar)
+ self.status = self.CreateStatusBar()
+ self.status.Bind(wx.EVT_SIZE, self.StatusOnSize)
+ self.status.SetFieldsCount(3)
+
if PLATFORM == "darwin":
ststyle = wx.TE_PROCESS_ENTER|wx.NO_BORDER
- sth = 17
+ sth = self.status.GetSize()[1] #16
cch = -1
elif PLATFORM == "linux2":
ststyle = wx.TE_PROCESS_ENTER|wx.SIMPLE_BORDER
- sth = 20
- cch = 21
+ sth = self.status.GetSize()[1]+1 #20
+ cch = self.status.GetSize()[1] #21
elif PLATFORM == "win32":
ststyle = wx.TE_PROCESS_ENTER|wx.SIMPLE_BORDER
sth = 20
cch = 20
- self.status = self.CreateStatusBar()
- self.status.Bind(wx.EVT_SIZE, self.StatusOnSize)
- self.status.SetFieldsCount(3)
self.field1X, field1Y = self.status.GetTextExtent("Quick Search:")
self.status.SetStatusWidths([self.field1X+9,-1,-2])
self.status.SetStatusText("Quick Search:", 0)
@@ -2104,11 +2142,11 @@ class MainFrame(wx.Frame):
yoff1 = -1
yoff2 = -5
elif PLATFORM == "linux2":
- yoff1 = 1
- yoff2 = 0
- elif PLATFORM == "win32":
yoff1 = -2
- yoff2 = -2
+ yoff2 = -1
+ elif PLATFORM == "win32":
+ yoff1 = 0
+ yoff2 = -1
self.status.SetStatusText("Quick Search:", 0)
rect = self.status.GetFieldRect(1)
@@ -2142,6 +2180,7 @@ class MainFrame(wx.Frame):
def makeSnippetMenu(self):
itemId = 30000
+ accel_entries = []
for cat in SNIPPETS_CATEGORIES:
submenu = wx.Menu(title=cat)
files = [f for f in os.listdir(os.path.join(SNIPPETS_PATH, cat))]
@@ -2171,6 +2210,7 @@ class MainFrame(wx.Frame):
short = short.replace("-", "")
if short != "":
accel_tuple = wx.AcceleratorEntry(accel, ord(short), itemId)
+ accel_entries.append(accel_tuple)
short = accel_tuple.ToString()
submenu.Append(itemId, "%s\t%s" % (file, short))
else:
@@ -2179,6 +2219,10 @@ class MainFrame(wx.Frame):
itemId += 1
self.menu7.AppendMenu(itemId, cat, submenu)
itemId += 1
+ if accel_entries != []:
+ accel_table = wx.AcceleratorTable(accel_entries)
+ self.SetAcceleratorTable(accel_table)
+
self.menu7.AppendSeparator()
self.menu7.Append(51, "Open Snippet Editor")
self.Bind(wx.EVT_MENU, self.showSnippetEditor, id=51)
@@ -2341,19 +2385,32 @@ class MainFrame(wx.Frame):
val = int(dlg.GetValue())
except:
val = -1
- dlg.Destroy()
+ dlg.Destroy()
if val != -1:
- pos = self.panel.editor.FindColumn(val-1, 0)
- self.panel.editor.SetCurrentPos(pos)
- self.panel.editor.EnsureVisible(val)
- self.panel.editor.EnsureCaretVisible()
+ val -= 1
+ pos = self.panel.editor.FindColumn(val, 0)
+ self.panel.editor.GotoLine(val)
+ first = self.panel.editor.GetFirstVisibleLine()
+ if val == first:
+ self.panel.editor.LineScroll(0, -self.panel.editor.LinesOnScreen()/2)
+ else:
+ self.panel.editor.LineScroll(0, self.panel.editor.LinesOnScreen()/2)
+ #self.panel.editor.SetCurrentPos(pos)
+ #self.panel.editor.EnsureVisible(val)
+ #self.panel.editor.EnsureCaretVisible()
wx.CallAfter(self.panel.editor.SetAnchor, pos)
def OnComment(self, evt):
self.panel.editor.OnComment()
def fold(self, event):
- self.panel.editor.FoldAll()
+ if event.GetId() == 103:
+ self.panel.editor.FoldAll()
+ else:
+ self.panel.editor.ExpandAll()
+
+ def foldExpandScope(self, evt):
+ self.panel.editor.foldExpandCurrentScope()
def autoComp(self, evt):
try:
@@ -2481,7 +2538,7 @@ class MainFrame(wx.Frame):
def insertSnippet(self, evt):
id = evt.GetId()
- menu = self.menu7 #event.GetEventObject()
+ menu = self.menu7
item = menu.FindItemById(id)
name = item.GetLabel()
category = item.GetMenu().GetTitle()
@@ -2773,8 +2830,9 @@ class MainFrame(wx.Frame):
def format_outputLog(self, evt):
data = evt.data
- self.panel.outputlog.setLog(data["log"])
- self.panel.outputlog.removeProcess(data["pid"], data["filename"])
+ self.panel.outputlog.appendToLog(data["log"])
+ if not data["active"]:
+ self.panel.outputlog.removeProcess(data["pid"], data["filename"])
def run(self, path):
cwd = self.getCurrentWorkingDirectory()
@@ -2894,15 +2952,25 @@ class MainFrame(wx.Frame):
self.sendToServerItem.Enable(False)
def sendSelectionToBackgroundServer(self, evt):
+ end = None
text = self.panel.editor.GetSelectedTextUTF8()
if text == "":
pos = self.panel.editor.GetCurrentPos()
line = self.panel.editor.LineFromPosition(pos)
text = self.panel.editor.GetLineUTF8(line)
+ else:
+ end = self.panel.editor.GetSelectionEnd()
if self.server_pipe != None:
for line in text.splitlines():
self.server_pipe.write(line + "\n")
self.server_pipe.write("\n")
+ if end != None:
+ self.panel.editor.SetCurrentPos(end)
+ self.panel.editor.LineDown()
+ line = self.panel.editor.GetCurrentLine()
+ pos = self.panel.editor.PositionFromLine(line)
+ self.panel.editor.SetCurrentPos(pos)
+ self.panel.editor.SetSelectionEnd(pos)
def buildDoc(self):
self.doc_frame = ManualFrame(osx_app_bundled=OSX_APP_BUNDLED, which_python=WHICH_PYTHON,
@@ -2927,6 +2995,12 @@ class MainFrame(wx.Frame):
except:
pass
self.buildDoc()
+
+ def showArgs(self, evt):
+ self.panel.editor.onShowTip()
+
+ def showDocString(self, evt):
+ self.panel.editor.onShowDocString()
def onShowEditorKeyCommands(self, evt):
if not self.keyCommandsFrame.IsShown():
@@ -3016,7 +3090,6 @@ class MainPanel(wx.Panel):
self.left_splitter = wx.SplitterWindow(self.splitter, -1, style=wx.SP_LIVE_UPDATE|wx.SP_3DSASH)
self.right_splitter = wx.SplitterWindow(self.splitter, -1, style=wx.SP_LIVE_UPDATE|wx.SP_3DSASH)
- #self.right_splitter.SetMinimumPaneSize(150)
self.project = ProjectTree(self.left_splitter, self, (-1, -1))
self.markers = MarkersPanel(self.left_splitter, self, (-1, -1))
@@ -3063,6 +3136,11 @@ class MainPanel(wx.Panel):
except:
continue
editor.setText(ensureNFD(text))
+
+ # Scan the entire document (needed for FoldAll to fold everything)
+ editor.GotoLine(editor.GetLineCount())
+ wx.CallAfter(editor.GotoLine, 0)
+
editor.path = file
editor.saveMark = True
editor.EmptyUndoBuffer()
@@ -3125,6 +3203,21 @@ class MainPanel(wx.Panel):
ed = self.notebook.GetPage(i)
ed.Close()
+#######################################################
+### The idea of EditorPanel is to allow multiple views
+### at the same time in a single notebook page.
+### Not yet implemented... ( TODO )
+#######################################################
+class EditorPanel(wx.Panel):
+ def __init__(self, parent):
+ wx.Panel.__init__(self, parent, -1)
+ self.editor = Editor(parent, -1, size=(0, -1))
+ self.editor2 = Editor(parent, -1, size=(0, -1))
+ box = wx.BoxSizer(wx.HORIZONTAL)
+ box.Add(self.editor, 1, wx.ALL|wx.EXPAND, 5)
+ box.Add(self.editor2, 1, wx.ALL|wx.EXPAND, 5)
+ self.SetSizerAndFit(box)
+
class Editor(stc.StyledTextCtrl):
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style= wx.NO_BORDER | wx.WANTS_CHARS,
setTitle=None, getTitle=None):
@@ -3199,19 +3292,12 @@ class Editor(stc.StyledTextCtrl):
self.Bind(stc.EVT_STC_UPDATEUI, self.OnUpdateUI)
self.Bind(stc.EVT_STC_MARGINCLICK, self.OnMarginClick)
self.Bind(wx.EVT_CLOSE, self.OnClose)
- self.Bind(wx.EVT_FIND, self.OnFind)
- self.Bind(wx.EVT_FIND_NEXT, self.OnFind)
- self.Bind(wx.EVT_FIND_REPLACE, self.OnFind)
- self.Bind(wx.EVT_FIND_REPLACE_ALL, self.OnFind)
- self.Bind(wx.EVT_FIND_CLOSE, self.OnFindClose)
self.EmptyUndoBuffer()
self.SetFocus()
self.setStyle()
# Remove unwanted KeyCommands
- self.CmdKeyClear(stc.STC_KEY_UP, stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(stc.STC_KEY_DOWN, stc.STC_SCMOD_CTRL)
self.CmdKeyClear(stc.STC_KEY_RIGHT, stc.STC_SCMOD_ALT)
self.CmdKeyClear(stc.STC_KEY_LEFT, stc.STC_SCMOD_ALT)
self.CmdKeyClear(stc.STC_KEY_RIGHT, stc.STC_SCMOD_SHIFT | stc.STC_SCMOD_ALT)
@@ -3220,20 +3306,10 @@ class Editor(stc.StyledTextCtrl):
self.CmdKeyClear(stc.STC_KEY_LEFT, stc.STC_SCMOD_CTRL)
self.CmdKeyClear(stc.STC_KEY_RIGHT, stc.STC_SCMOD_SHIFT | stc.STC_SCMOD_CTRL)
self.CmdKeyClear(stc.STC_KEY_LEFT, stc.STC_SCMOD_SHIFT | stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(stc.STC_KEY_HOME, 0)
- self.CmdKeyClear(stc.STC_KEY_HOME, stc.STC_SCMOD_ALT)
- self.CmdKeyClear(stc.STC_KEY_HOME, stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(stc.STC_KEY_HOME, stc.STC_SCMOD_SHIFT)
- self.CmdKeyClear(stc.STC_KEY_HOME, stc.STC_SCMOD_ALT | stc.STC_SCMOD_SHIFT)
- self.CmdKeyClear(stc.STC_KEY_HOME, stc.STC_SCMOD_CTRL | stc.STC_SCMOD_SHIFT)
- self.CmdKeyClear(stc.STC_KEY_END, 0)
- self.CmdKeyClear(stc.STC_KEY_END, stc.STC_SCMOD_ALT)
- self.CmdKeyClear(stc.STC_KEY_END, stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(stc.STC_KEY_END, stc.STC_SCMOD_SHIFT)
- self.CmdKeyClear(stc.STC_KEY_END, stc.STC_SCMOD_ALT | stc.STC_SCMOD_SHIFT)
- self.CmdKeyClear(stc.STC_KEY_END, stc.STC_SCMOD_CTRL | stc.STC_SCMOD_SHIFT)
self.CmdKeyClear(stc.STC_KEY_DELETE, 0)
self.CmdKeyClear(stc.STC_KEY_DELETE, stc.STC_SCMOD_SHIFT)
+ self.CmdKeyClear(stc.STC_KEY_DELETE, stc.STC_SCMOD_CTRL)
+ self.CmdKeyClear(stc.STC_KEY_DELETE, stc.STC_SCMOD_SHIFT | stc.STC_SCMOD_CTRL)
self.CmdKeyClear(stc.STC_KEY_BACK, stc.STC_SCMOD_ALT)
self.CmdKeyClear(stc.STC_KEY_BACK, stc.STC_SCMOD_SHIFT)
self.CmdKeyClear(stc.STC_KEY_BACK, stc.STC_SCMOD_CTRL)
@@ -3241,22 +3317,19 @@ class Editor(stc.StyledTextCtrl):
self.CmdKeyClear(stc.STC_KEY_INSERT, 0)
self.CmdKeyClear(stc.STC_KEY_INSERT, stc.STC_SCMOD_SHIFT)
self.CmdKeyClear(stc.STC_KEY_INSERT, stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(ord('Z'), stc.STC_SCMOD_CTRL)
self.CmdKeyClear(ord('Y'), stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(ord('X'), stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(ord('C'), stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(ord('V'), stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(ord('A'), stc.STC_SCMOD_CTRL)
+ self.CmdKeyClear(ord('D'), stc.STC_SCMOD_CTRL)
self.CmdKeyClear(ord('L'), stc.STC_SCMOD_CTRL)
self.CmdKeyClear(ord('T'), stc.STC_SCMOD_CTRL)
- self.CmdKeyClear(ord('U'), stc.STC_SCMOD_CTRL)
self.CmdKeyClear(ord('L'), stc.STC_SCMOD_CTRL | stc.STC_SCMOD_SHIFT)
- self.CmdKeyClear(ord('U'), stc.STC_SCMOD_CTRL | stc.STC_SCMOD_SHIFT)
self.CmdKeyClear(stc.STC_KEY_RETURN, stc.STC_SCMOD_SHIFT)
self.CmdKeyClear(stc.STC_KEY_ADD, stc.STC_SCMOD_CTRL)
self.CmdKeyClear(stc.STC_KEY_SUBTRACT, stc.STC_SCMOD_CTRL)
self.CmdKeyClear(stc.STC_KEY_DIVIDE, stc.STC_SCMOD_CTRL)
+ self.CmdKeyAssign(ord('U'), stc.STC_SCMOD_CTRL, stc.STC_CMD_UPPERCASE)
+ self.CmdKeyAssign(ord('U'), stc.STC_SCMOD_CTRL | stc.STC_SCMOD_SHIFT, stc.STC_CMD_LOWERCASE)
+
wx.CallAfter(self.SetAnchor, 0)
self.Refresh()
@@ -3276,6 +3349,7 @@ class Editor(stc.StyledTextCtrl):
if STYLES[forekey]['underline']:
st += ",underline"
return st
+
self.StyleSetSpec(stc.STC_STYLE_DEFAULT, buildStyle('default', 'background'))
self.StyleClearAll() # Reset all to be like the default
@@ -3294,8 +3368,19 @@ class Editor(stc.StyledTextCtrl):
self.StyleSetSpec(stc.STC_STYLE_BRACEBAD, buildStyle('default', 'bracebad') + ",bold")
ext = os.path.splitext(self.path)[1].strip(".")
+ if ext == "":
+ try:
+ with open(self.path, "r") as f:
+ fline = f.readline()
+ if fline.startswith("#!"):
+ fline = fline.replace("/", " ")
+ last = fline.split()[-1]
+ ext = {"python": "py", "bash": "sh", "sh": "sh"}.get(last, "")
+ except:
+ pass
if ext in ["py", "pyw", "c5"]:
self.SetLexer(stc.STC_LEX_PYTHON)
+ self.SetStyleBits(self.GetStyleBitsNeeded())
self.SetKeyWords(0, " ".join(keyword.kwlist) + " None True False ")
self.SetKeyWords(1, " ".join(PYO_WORDLIST))
self.StyleSetSpec(stc.STC_P_DEFAULT, buildStyle('default'))
@@ -3312,8 +3397,13 @@ class Editor(stc.StyledTextCtrl):
self.StyleSetSpec(stc.STC_P_OPERATOR, buildStyle('operator'))
self.StyleSetSpec(stc.STC_P_IDENTIFIER, buildStyle('default'))
self.StyleSetSpec(stc.STC_P_COMMENTBLOCK, buildStyle('commentblock'))
- elif ext in ["c", "cc", "cpp", "cxx", "cs", "h", "hh", "hpp", "hxx"]:
+ elif ext in ["c", "cc", "cpp", "cxx", "cs", "h", "hh", "hpp", "hxx", "jsfx-inc"]:
self.SetLexer(stc.STC_LEX_CPP)
+ self.SetStyleBits(self.GetStyleBitsNeeded())
+ self.SetProperty('fold.comment', '1')
+ self.SetProperty('fold.preprocessor', '1')
+ self.SetProperty('fold.compact', '1')
+ self.SetProperty('styling.within.preprocessor', '0')
self.SetKeyWords(0, "auto break case char const continue default do double else enum extern float for goto if int long \
register return short signed sizeof static struct switch typedef union unsigned void volatile while ")
self.StyleSetSpec(stc.STC_C_DEFAULT, buildStyle('default'))
@@ -3330,6 +3420,7 @@ class Editor(stc.StyledTextCtrl):
self.StyleSetSpec(stc.STC_C_PREPROCESSOR, buildStyle('commentblock'))
elif ext == "sh":
self.SetLexer(stc.STC_LEX_BASH)
+ self.SetStyleBits(self.GetStyleBitsNeeded())
self.SetKeyWords(0, "! [[ ]] case do done elif else esac fi for function if in select then time until while { } \
alias bg bind break builtin caller cd command compgen complete compopt continue declare dirs disown echo enable \
eval exec exit export fc fg getopts hash help history jobs kill let local logout mapfile popd printf pushd pwd \
@@ -3350,6 +3441,11 @@ class Editor(stc.StyledTextCtrl):
self.SetSelBackground(1, STYLES['selback']['colour'])
self.SetFoldMarginColour(True, STYLES['foldmarginback']['colour'])
self.SetFoldMarginHiColour(True, STYLES['foldmarginback']['colour'])
+ self.CallTipSetForeground(STYLES['default']['colour'])
+ self.CallTipSetBackground(STYLES['background']['colour'])
+
+ # WxPython 3 needs the lexer to be set before folding property
+ self.SetProperty("fold", "1")
def OnQuickSearch(self, str, next=True):
if self.GetSelection() != (0,0):
@@ -3376,10 +3472,14 @@ class Editor(stc.StyledTextCtrl):
self.ScrollToLine(line - halfNumLinesOnScreen)
def OnShowFindReplace(self):
- data = wx.FindReplaceData()
- self.findReplace = wx.FindReplaceDialog(self, data, "Find & Replace", wx.FR_REPLACEDIALOG | wx.FR_NOUPDOWN)
- self.findReplace.data = data # save a reference to it...
- self.findReplace.Show(True)
+ self.data = wx.FindReplaceData()
+ dlg = wx.FindReplaceDialog(self, self.data, "Find & Replace", wx.FR_REPLACEDIALOG | wx.FR_NOUPDOWN)
+ dlg.Bind(wx.EVT_FIND, self.OnFind)
+ dlg.Bind(wx.EVT_FIND_NEXT, self.OnFind)
+ dlg.Bind(wx.EVT_FIND_REPLACE, self.OnFind)
+ dlg.Bind(wx.EVT_FIND_REPLACE_ALL, self.OnFind)
+ dlg.Bind(wx.EVT_FIND_CLOSE, self.OnFindClose)
+ dlg.Show(True)
def OnFind(self, evt):
map = { wx.wxEVT_COMMAND_FIND : "FIND",
@@ -3417,11 +3517,14 @@ class Editor(stc.StyledTextCtrl):
startpos = selection[0]
while startpos != -1:
startpos = self.FindText(self.anchor1, self.anchor2, findTxt)
- endpos = startpos+len(findTxt)
- self.anchor1 = endpos
if startpos != -1:
+ endpos = startpos+len(findTxt)
self.SetSelection(startpos, endpos)
self.ReplaceSelection(evt.GetReplaceString())
+ self.anchor1 = endpos + 1
+ line = self.GetCurrentLine()
+ halfNumLinesOnScreen = self.LinesOnScreen() / 2
+ self.ScrollToLine(line - halfNumLinesOnScreen)
def OnFindClose(self, evt):
evt.GetDialog().Destroy()
@@ -3803,6 +3906,36 @@ class Editor(stc.StyledTextCtrl):
except:
pass
+ def onShowDocString(self):
+ if self.GetSelectedText() != "":
+ currentword = self.GetSelectedText()
+ else:
+ currentword = self.getWordUnderCaret()
+ firstCaretPos = self.GetCurrentPos()
+ caretPos = self.GetCurrentPos()
+ startpos = self.WordStartPosition(caretPos, True)
+ while chr(self.GetCharAt(startpos-1)) == ".":
+ self.GotoPos(startpos-2)
+ parent = self.getWordUnderCaret()
+ currentword = parent + "." + currentword
+ caretPos = self.GetCurrentPos()
+ startpos = self.WordStartPosition(caretPos, True)
+ self.GotoPos(firstCaretPos)
+ lineCount = self.GetLineCount()
+ text = ""
+ for i in range(lineCount):
+ line = self.GetLine(i)
+ if "import " in line:
+ text = text + line
+ try:
+ exec text in locals()
+ docstr = eval(currentword).__doc__
+ dlg = wx.lib.dialogs.ScrolledMessageDialog(self, docstr, "__doc__ string for %s" % currentword, size=(700,500))
+ dlg.CenterOnParent()
+ dlg.ShowModal()
+ except:
+ pass
+
def navigateMarkers(self, down=True):
if self.markers_dict != {}:
llen = len(self.markers_dict)
@@ -3835,6 +3968,10 @@ class Editor(stc.StyledTextCtrl):
elif evt.GetKeyCode() == wx.WXK_RETURN and evt.ShiftDown():
self.onShowTip()
propagate = False
+ # Stop propagation on Tip Show of __doc__ string --- Ctrl+Return
+ elif evt.GetKeyCode() == wx.WXK_RETURN and ControlDown():
+ self.onShowDocString()
+ propagate = False
# Move and/or Select one word left or right --- (Shift+)Alt+Arrows left/right
elif evt.GetKeyCode() == wx.WXK_LEFT and evt.AltDown() and evt.ShiftDown():
@@ -3860,6 +3997,11 @@ class Editor(stc.StyledTextCtrl):
self.CmdKeyExecute(stc.STC_CMD_LINEEND)
propagate = False
+ # Delete forward DELETE
+ elif evt.GetKeyCode() == wx.WXK_DELETE:
+ self.CmdKeyExecute(stc.STC_CMD_CHARRIGHT)
+ self.CmdKeyExecute(stc.STC_CMD_DELETEBACK)
+ propagate = False
# Delete the word to the right of the caret --- Shift+Alt+BACK
elif evt.GetKeyCode() == wx.WXK_BACK and evt.AltDown() and evt.ShiftDown():
self.DelWordRight()
@@ -3891,6 +4033,19 @@ class Editor(stc.StyledTextCtrl):
self.Paste()
propagate = False
+ # Show documentation for pyo object under the caret
+ elif evt.GetKeyCode() == ord('D') and ControlDown():
+ self.GetParent().GetParent().GetParent().GetParent().GetParent().showDoc(None)
+ propagate = False
+ # Goto line
+ elif evt.GetKeyCode() == ord('L') and ControlDown():
+ self.GetParent().GetParent().GetParent().GetParent().GetParent().gotoLine(None)
+ propagate = False
+ # Send line/selection to pyo background server
+ elif evt.GetKeyCode() == ord('T') and ControlDown():
+ self.GetParent().GetParent().GetParent().GetParent().GetParent().sendSelectionToBackgroundServer(None)
+ propagate = False
+
# Process Return key --- automatic indentation
elif evt.GetKeyCode() == wx.WXK_RETURN:
wx.CallAfter(self.processReturn)
@@ -4054,40 +4209,50 @@ class Editor(stc.StyledTextCtrl):
self.addMarkerComment(lineClicked)
elif evt.GetMargin() == 2:
if evt.GetShift() and evt.GetControl():
- self.FoldAll()
+ self.ToggleFoldAll()
else:
lineClicked = self.LineFromPosition(evt.GetPosition())
-
if self.GetFoldLevel(lineClicked) & stc.STC_FOLDLEVELHEADERFLAG:
- if evt.GetShift():
- self.SetFoldExpanded(lineClicked, True)
- self.Expand(lineClicked, True, True, 1)
- elif evt.GetControl():
- if self.GetFoldExpanded(lineClicked):
- self.SetFoldExpanded(lineClicked, False)
- self.Expand(lineClicked, False, True, 0)
- else:
- self.SetFoldExpanded(lineClicked, True)
- self.Expand(lineClicked, True, True, 100)
- else:
- self.ToggleFold(lineClicked)
+ self.ToggleFold(lineClicked)
def FoldAll(self):
lineCount = self.GetLineCount()
- expanding = True
+ lineNum = 0
+ while lineNum < lineCount:
+ level = self.GetFoldLevel(lineNum)
+ if level & stc.STC_FOLDLEVELHEADERFLAG and \
+ (level & stc.STC_FOLDLEVELNUMBERMASK) == stc.STC_FOLDLEVELBASE:
+ lastChild = self.GetLastChild(lineNum, -1)
+ self.SetFoldExpanded(lineNum, False)
+ if lastChild > lineNum:
+ self.HideLines(lineNum+1, lastChild)
+ lineNum = lineNum + 1
+ def ExpandAll(self):
+ lineCount = self.GetLineCount()
+ lineNum = 0
+ while lineNum < lineCount:
+ level = self.GetFoldLevel(lineNum)
+ if level & stc.STC_FOLDLEVELHEADERFLAG and \
+ (level & stc.STC_FOLDLEVELNUMBERMASK) == stc.STC_FOLDLEVELBASE:
+ self.SetFoldExpanded(lineNum, True)
+ lineNum = self.Expand(lineNum, True)
+ lineNum = lineNum - 1
+ lineNum = lineNum + 1
+
+ def ToggleFoldAll(self):
+ lineCount = self.GetLineCount()
+ expanding = True
# find out if we are folding or unfolding
for lineNum in range(lineCount):
if self.GetFoldLevel(lineNum) & stc.STC_FOLDLEVELHEADERFLAG:
expanding = not self.GetFoldExpanded(lineNum)
break
-
lineNum = 0
while lineNum < lineCount:
level = self.GetFoldLevel(lineNum)
if level & stc.STC_FOLDLEVELHEADERFLAG and \
(level & stc.STC_FOLDLEVELNUMBERMASK) == stc.STC_FOLDLEVELBASE:
-
if expanding:
self.SetFoldExpanded(lineNum, True)
lineNum = self.Expand(lineNum, True)
@@ -4099,6 +4264,16 @@ class Editor(stc.StyledTextCtrl):
self.HideLines(lineNum+1, lastChild)
lineNum = lineNum + 1
+ def foldExpandCurrentScope(self):
+ line = self.GetCurrentLine()
+ while (line >= 0):
+ level = self.GetFoldLevel(line)
+ if level & stc.STC_FOLDLEVELHEADERFLAG and (level & stc.STC_FOLDLEVELNUMBERMASK) == stc.STC_FOLDLEVELBASE:
+ self.ToggleFold(line)
+ self.GotoLine(line)
+ break
+ line -= 1
+
def Expand(self, line, doExpand, force=False, visLevels=0, level=-1):
lastChild = self.GetLastChild(line, level)
line = line + 1
@@ -4195,6 +4370,12 @@ class OutputLogEditor(SimpleEditor):
def __init__(self, parent, ID=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style= wx.NO_BORDER):
SimpleEditor.__init__(self, parent=parent, ID=ID, pos=pos, size=size, style=style)
+ def appendToLog(self, text):
+ self.SetReadOnly(False)
+ self.AppendText(text)
+ self.GotoLine(self.GetLineCount())
+ self.SetReadOnly(True)
+
def setLog(self, text):
self.SetReadOnly(False)
self.SetText(text)
@@ -4212,7 +4393,7 @@ class OutputLogPanel(wx.Panel):
self.sizer = wx.BoxSizer(wx.VERTICAL)
toolbarbox = wx.BoxSizer(wx.HORIZONTAL)
- self.toolbar = wx.ToolBar(self, -1, size=(-1,36))
+ self.toolbar = wx.ToolBar(self, -1)
self.toolbar.SetMargins((5, 0))
font, psize = self.toolbar.GetFont(), self.toolbar.GetFont().GetPointSize()
if PLATFORM == "darwin":
@@ -4221,7 +4402,7 @@ class OutputLogPanel(wx.Panel):
if PLATFORM == "win32":
self.toolbar.AddSeparator()
- title = wx.StaticText(self.toolbar, -1, "Output panel")
+ title = wx.StaticText(self.toolbar, -1, " Output panel")
title.SetFont(font)
self.toolbar.AddControl(title)
self.toolbar.AddSeparator()
@@ -4232,17 +4413,17 @@ class OutputLogPanel(wx.Panel):
self.toolbar.AddControl(self.processPopup)
if PLATFORM == "win32":
self.toolbar.AddSeparator()
- self.processKill = wx.Button(self.toolbar, -1, label="Kill", size=(40,-1))
+ self.processKill = wx.Button(self.toolbar, -1, label="Kill", size=(40,self.processPopup.GetSize()[1]))
self.processKill.SetFont(font)
self.toolbar.AddControl(self.processKill)
self.processKill.Bind(wx.EVT_BUTTON, self.killProcess)
if PLATFORM == "win32":
self.toolbar.AddSeparator()
- self.runningLabel = wx.StaticText(self.toolbar, -1, "Running: 0")
+ self.runningLabel = wx.StaticText(self.toolbar, -1, " Running: 0")
self.runningLabel.SetFont(font)
self.toolbar.AddControl(self.runningLabel)
self.toolbar.AddSeparator()
- self.copyLog = wx.Button(self.toolbar, -1, label="Copy log", size=(70,-1))
+ self.copyLog = wx.Button(self.toolbar, -1, label="Copy log", size=(70,self.processPopup.GetSize()[1]))
self.copyLog.SetFont(font)
self.toolbar.AddControl(self.copyLog)
self.copyLog.Bind(wx.EVT_BUTTON, self.onCopy)
@@ -4259,8 +4440,10 @@ class OutputLogPanel(wx.Panel):
self.toolbar.Realize()
toolbarbox.Add(self.toolbar, 1, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
- tb2 = wx.ToolBar(self, -1, size=(-1,36))
- tb2.SetToolBitmapSize(tsize)
+ tb2 = wx.ToolBar(self, -1, size=(-1,32))
+ if PLATFORM == "darwin":
+ tb2.SetToolBitmapSize(tsize)
+ tb2.AddSeparator()
tb2.AddLabelTool(17, "Close Panel", close_panel_bmp, shortHelp="Close Panel")
tb2.Realize()
toolbarbox.Add(tb2, 0, wx.ALIGN_RIGHT, 0)
@@ -4287,6 +4470,7 @@ class OutputLogPanel(wx.Panel):
self.processPopup.SetStringSelection("%d :: %s" % (procID, filename))
self.running += 1
self.runningLabel.SetLabel("Running: %d" % self.running)
+ self.editor.setLog("")
def removeProcess(self, procID, filename):
str = "%d :: %s" % (procID, filename)
@@ -4302,6 +4486,9 @@ class OutputLogPanel(wx.Panel):
thread = self.mainPanel.mainFrame.processes[procID][0]
thread.kill()
+ def appendToLog(self, text):
+ self.editor.appendToLog(text)
+
def setLog(self, text):
self.editor.setLog(text)
@@ -4605,11 +4792,11 @@ class ProjectTree(wx.Panel):
filename = os.path.join(parent, filename)
dirPath = os.path.split(self.projectDict[parent])[0]
path = os.path.join(dirPath, filename)
-# for root, dirs, files in os.walk(dirPath):
-# if files:
-# for file in files:
-# if file == self.tree.GetItemText(item):
-# path = os.path.join(root, file)
+ #for root, dirs, files in os.walk(dirPath):
+ # if files:
+ # for file in files:
+ # if file == self.tree.GetItemText(item):
+ # path = os.path.join(root, file)
self.mainPanel.addPage(path)
def select(self, item):
@@ -4769,7 +4956,7 @@ class PreferencesDialog(wx.Dialog):
font.SetWeight(wx.BOLD)
if PLATFORM == "linux2":
- entryfont.SetPointSize(pointsize-1)
+ entryfont.SetPointSize(pointsize)
elif PLATFORM == "win32":
entryfont.SetPointSize(pointsize)
else:
@@ -4987,9 +5174,10 @@ class STCPrintout(wx.Printout):
a wrapped line, so it may be a difficult task to ever implement printing
with line wrapping using the wx.StyledTextCtrl.FormatRange method.
"""
- debuglevel = 0
+ debuglevel = 1
- def __init__(self, stc, page_setup_data=None, print_mode=None, title=None, border=False, lines_per_page=None, output_point_size=None):
+ def __init__(self, stc, page_setup_data=None, print_mode=None, title=None,
+ border=False, lines_per_page=None, output_point_size=None):
"""Constructor.
@param stc: wx.StyledTextCtrl to print
@@ -5050,6 +5238,7 @@ class STCPrintout(wx.Printout):
except (TypeError, ValueError):
self.user_lines_per_page = None
+ self.page_count = 2
self.border_around_text = border
self.setHeaderFont()
@@ -5396,6 +5585,36 @@ class MyFileDropTarget(wx.FileDropTarget):
else:
pass
+class EPyoApp(wx.App):
+ def __init__(self, *args, **kwargs):
+ wx.App.__init__(self, *args, **kwargs)
+
+ def OnInit(self):
+ X,Y = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X), wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
+ if X < 850: X -= 50
+ else: X = 850
+ if Y < 750: Y -= 50
+ else: Y = 750
+ self.frame = MainFrame(None, -1, title='E-Pyo Editor', pos=(10,25), size=(X, Y))
+ self.frame.Show()
+ return True
+
+ def MacOpenFiles(self, filenames):
+ if type(filenames) != ListType:
+ filenames = [filenames]
+ for filename in filenames:
+ if os.path.isdir(filename):
+ self.frame.panel.project.loadFolder(filename)
+ sys.path.append(filename)
+ elif os.path.isfile(filename):
+ self.frame.panel.addPage(filename)
+
+ def MacReopenApp(self):
+ try:
+ self.frame.Raise()
+ except:
+ pass
+
if __name__ == '__main__':
filesToOpen = []
foldersToOpen = []
@@ -5409,12 +5628,5 @@ if __name__ == '__main__':
else:
pass
- app = wx.App(False)
- X,Y = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X), wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
- if X < 850: X -= 50
- else: X = 850
- if Y < 750: Y -= 50
- else: Y = 750
- frame = MainFrame(None, -1, title='E-Pyo Editor', pos=(10,25), size=(X, Y))
- frame.Show()
+ app = EPyoApp(redirect=False)
app.MainLoop()
diff --git a/utils/PyoDoc.py b/utils/PyoDoc.py
index 737c317..fa4a210 100644
--- a/utils/PyoDoc.py
+++ b/utils/PyoDoc.py
@@ -23,7 +23,7 @@ DOC_STYLES = {'Default': {'default': '#000000', 'comment': '#007F7F', 'commentbl
'number': '#005000', 'string': '#7F007F', 'triple': '#7F0000', 'keyword': '#00007F', 'keyword2': '#007F9F',
'class': '#0000FF', 'function': '#007F7F', 'identifier': '#000000', 'caret': '#00007E',
'background': '#EEEEEE', 'linenumber': '#000000', 'marginback': '#B0B0B0', 'markerfg': '#CCCCCC',
- 'markerbg': '#000000', 'bracelight': '#AABBDD', 'bracebad': '#DD0000', 'lineedge': '#CCCCCC'}}
+ 'markerbg': '#000000', 'bracelight': '#AABBDD', 'bracebad': '#DD0000', 'lineedge': '#CCCCCC'}}
if wx.Platform == '__WXMSW__':
DOC_FACES = {'face': 'Verdana', 'size' : 8, 'size2': 7}
diff --git a/utils/epyo_builder_OSX.sh b/utils/epyo_builder_OSX.sh
index a715ead..f950767 100755
--- a/utils/epyo_builder_OSX.sh
+++ b/utils/epyo_builder_OSX.sh
@@ -27,20 +27,19 @@ else
exit;
fi
-ditto --rsrc --arch i386 E-Pyo.app E-Pyo-i386.app
+# keep only 64-bit arch
+ditto --rsrc --arch x86_64 E-Pyo.app E-Pyo-x86_64.app
rm -rf E-Pyo.app
-mv E-Pyo-i386.app E-Pyo.app
+mv E-Pyo-x86_64.app E-Pyo.app
cd ..
cp -R E-Pyo_OSX/E-Pyo.app .
-# Fixed wrong path in Info.plist
-cd E-Pyo.app/Contents
-awk '{gsub("Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python", "@executable_path/../Frameworks/Python.framework/Versions/2.6/Python")}1' Info.plist > Info.plist_tmp && mv Info.plist_tmp Info.plist
+# Fixed wrong path in Info.plist (no more needed python 2.7.8, py2app 0.9)
+#cd E-Pyo.app/Contents
+#awk '{gsub("Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python", "@executable_path/../Frameworks/Python.framework/Versions/2.7/Python")}1' Info.plist > Info.plist_tmp && mv Info.plist_tmp Info.plist
+#cd ../..
-cd ../..
-#tar -cjvf E-Pyo_OSX-0.6.1.tar.bz2 E-Pyo.app
-#rm -rf E-Pyo.app
rm -rf E-Pyo_OSX
rm -rf Resources
rm -rf examples
diff --git a/utils/epyo_builder_win32.py b/utils/epyo_builder_win32.py
index e4265c3..1c942d3 100644
--- a/utils/epyo_builder_win32.py
+++ b/utils/epyo_builder_win32.py
@@ -15,9 +15,9 @@ os.system("svn export ../examples Resources/examples/")
os.system("svn export snippets Resources/snippets/")
os.system("svn export styles Resources/styles/")
-os.system("C:\Python%d%d\python ..\..\pyinstaller\Configure.py" % version)
-os.system('C:\Python%d%d\python ..\..\pyinstaller\Makespec.py -F -c --icon=Resources\E-PyoIcon.ico "E-Pyo.py"' % version)
-os.system('C:\Python%d%d\python ..\..\pyinstaller\Build.py "E-Pyo.spec"' % version)
+#os.system("C:\Python%d%d\python ..\..\pyinstaller\Configure.py" % version)
+os.system('C:\Python%d%d\Scripts\pyi-makespec -F -c --icon=Resources\E-PyoIcon.ico "E-Pyo.py"' % version)
+os.system('C:\Python%d%d\Scripts\pyi-build "E-Pyo.spec"' % version)
os.mkdir("E-Pyo_py%d%d" % version)
shutil.copytree("Resources", "E-Pyo_py%d%d/Resources" % version)
diff --git a/utils/info.plist b/utils/info.plist
index cc6108e..b9d9054 100644
--- a/utils/info.plist
+++ b/utils/info.plist
@@ -32,17 +32,17 @@
<key>CFBundleIdentifier</key>
<string>org.pythonmac.unspecified.E-Pyo</string>
<key>CFBundleInfoDictionaryVersion</key>
- <string>0.6.9</string>
+ <string>0.7.0</string>
<key>CFBundleName</key>
<string>E-Pyo</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>0.6.9</string>
+ <string>0.7.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>0.6.9</string>
+ <string>0.7.0</string>
<key>LSHasLocalizedDisplayName</key>
<false/>
<key>NSAppleScriptEnabled</key>
@@ -78,17 +78,16 @@
<array/>
<key>PyRuntimeLocations</key>
<array>
- <string>@executable_path/../Frameworks/Python.framework/Versions/2.6/Python</string>
+ <string>@executable_path/../Frameworks/Python.framework/Versions/2.7/Python</string>
</array>
<key>PythonInfoDict</key>
<dict>
<key>PythonExecutable</key>
- <string>@executable_path/../Frameworks/Python.framework/Versions/2.6/Python</string>
+ <string>@executable_path/../Frameworks/Python.framework/Versions/2.7/Python</string>
<key>PythonLongVersion</key>
- <string>2.6.5 (r265:79359, Mar 24 2010, 01:32:55)
-[GCC 4.0.1 (Apple Inc. build 5493)]</string>
+ <string>2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]</string>
<key>PythonShortVersion</key>
- <string>2.6</string>
+ <string>2.7</string>
<key>py2app</key>
<dict>
<key>alias</key>
@@ -96,7 +95,7 @@
<key>template</key>
<string>app</string>
<key>version</key>
- <string>0.4.4</string>
+ <string>0.9</string>
</dict>
</dict>
</dict>
--
python-pyo packaging
More information about the pkg-multimedia-commits
mailing list