Permalink
Browse files

Release 0.0.4

  • Loading branch information...
jacobjoaquin committed Jul 24, 2009
1 parent 9cefe89 commit 01e1205d3e382c0a1447d8e76e3fdfe34a859d07
View
@@ -21,15 +21,15 @@ demo/score_from_csd.csd
demo/score_from_csd.py
demo/swap_columns.py
demo/swap_columns.sco
-demo/swap_pan_position.sco
-docs/.DS_Store
+demo/test.py
docs/.buildinfo
docs/bugs.html
docs/commandline.html
docs/csd_sco_event.html
docs/genindex.html
docs/glossary.html
docs/index.html
+docs/install.html
docs/modindex.html
docs/objects.inv
docs/search.html
@@ -39,6 +39,7 @@ docs/_sources/commandline.txt
docs/_sources/csd_sco_event.txt
docs/_sources/glossary.txt
docs/_sources/index.txt
+docs/_sources/install.txt
docs/_sources/demo/index.txt
docs/_static/basic.css
docs/_static/default.css
View
65 README
@@ -1,2 +1,65 @@
-Fill me.
+Csound csd Python Package
+By Jacob Joaquin
+
+jacobjoaquin@gmail.com
+http://www.thumbuki.com/
+http://jacobjoaquin.tumblr.com/
+http://twitter.com/JacobJoaquin
+
+copyright (c) Jacob Joaquin 2009
+
+Mission Statement
+-----------------
+
+*"Enable users to process and generate Csound orchestras and scores
+quickly, easily and efficiently."*
+
+
+Quick Installation Instructions
+-------------------------------
+
+After downloading the csd tar file, you can install csd in using the
+following command-lines in a terminal window::
+
+ gunzip -c csd-x.x.x.tar | tar xf -
+ cd csd-x.x.x
+ python setup.py install
+
+See included manual for more details.
+
+About
+-----
+
+CSD provides core functions for building python scripts that can process
+and generate Csound code.
+
+As of this moment, the focus is on score manipulation. CSD comes with
+many functions that can parse, pull, push information in and out of
+Csound scores. In the future, there are plans to provide equivalent
+functions for Csound orchestras.
+
+This package ships with a few demo scripts that can be of great use to
+anyone who writes Csound music the old fashion way, that is, with a text
+editor. The ``sco_align`` script will save you from repeatedly typing
+'space-down-left' by aligning Csound scores auto-magically. If you need
+to run a dozen or more pfields through a function, ``pfunc`` lets your
+write your own function and choose which instruments and pfields to
+operate on with a single command-line in a terminal window. Or if you
+are organizing your pfields, and decided that amp would work better on
+pfield 4 and pitch on pfield 5, then ``swap_columns`` is just what you
+need.
+
+In order to use these demo scripts, you'll need to use a command-line
+terminal. However, using these scripts in applications may be possible
+in the future.
+
+If you are a developer of a Csound front-end, Csound based-app, or are
+just looking to extend the capabilities of your favorites text editor,
+let me know so we can start the process of figuring out our respective
+needs to make this happen. I'm open to any and all ideas from anyone.
+
+This package is currently still very early in the development cycle,
+though quickly approaching a beta release. The scripts have been tested
+primarily with Apple's Python 2.5.1.
+
Binary file not shown.
Binary file not shown.
@@ -39,17 +39,17 @@
master_doc = 'index'
# General information about the project.
-project = u'CSD'
+project = u'csd'
copyright = u'2009, Jacob Joaquin'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '0.0.3'
+version = '0.0.4'
# The full version, including alpha/beta/rc tags.
-release = '0.0.3 alpha'
+release = '0.0.4 alpha'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -17,7 +17,12 @@ Mission Statement
*"Enable users to process and generate Csound orchestras and scores
quickly, easily and efficiently."*
-
+
+Download
+--------
+
+`csd-0.0.4.tar.gz <http://www.thumbuki.com/csd/release/csd-0.0.4.tar.gz>`_
+
About
-----
@@ -59,7 +64,7 @@ primarily with Apple's Python 2.5.1.
Information
-----------
-Csound CSD Package
+Csound csd Python Package
By Jacob Joaquin
@@ -110,8 +110,7 @@ def map_(score, pattern, pfield_index_list, pfunction, *args):
return merge(score, selection_)
def select(score, pattern):
- '''Returns a dict with matched events from a score.
- {index_of_event: event}
+ '''Returns a selection from a score.
Example::
@@ -122,7 +121,7 @@ def select(score, pattern):
... , {0: 'i'})
{1: 'i 1 0 4 1.0 440', 2: 'i 1 4 4 0.5 880'}
- See :term:`pattern`, :term:`score`
+ See :term:`pattern`, :term:`score`, :term:`selection`
'''
@@ -140,7 +139,7 @@ def select(score, pattern):
return selection_
def select_all(score):
- '''Returns a dict of all events in a score, keyed by index.
+ '''Returns a selection of all events in a score.
Example::
@@ -150,11 +149,11 @@ def select_all(score):
... i 1 4 4 0.5 880""")
{0: 'f 1 0 8192 10 1', 1: 'i 1 0 4 1.0 440', 2: 'i 1 4 4 0.5 880'}
- See :term:`score`
+ See :term:`score`, :term:`selection`
'''
- # Convert score string to list
+ # Convert score string to list
s_list = score.splitlines()
# Dictionary to store all events. {index_of_event: event}
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with csd. If not, see <http://www.gnu.org/licenses/>.
-'''Csound score elements.'''
+'''Module for handling Csound score elements.'''
import re
@@ -119,27 +119,8 @@ def insert(event, pfield_index, fill='.'):
def match(event, pattern):
'''Returns a boolean determined whether an event matches the
- requirements of a pattern.
-
- A pattern is built from a Python dict, and must follow strict
- guidelines. The key must be an integer, as the key is the index
- of the pfield in which this function will test. The value of the
- dict can be either a single value or several values in list form.
-
- A pattern that returns True for i-events::
-
- {0: 'i'}
-
- A pattern that returns True for i-events and f-tables::
+ requirements of a :term:`pattern`.
- {0: ['i', 'f']}
-
- A single pattern may check against multiple pfields. The following
- example returns True for an i-event with an identifier of 1, 2, or
- 3::
-
- {0: 'i', 1: [1, 2, 3]}
-
Example::
>>> event.match('i 1 0 4 1.0 440', {0: 'i'})
@@ -148,9 +129,6 @@ def match(event, pattern):
True
>>> event.match('i 1 0 4 1.0 440', {0: 'i', 1: 2})
False
-
- .. note:: Limited support for the moment. Functions for designing
- patterns may come at a later time.
See :term:`event`, :term:`pattern`.
@@ -177,13 +155,13 @@ def match(event, pattern):
return True
def number_of_pfields(event):
- '''Returns an integer of the amounts of pfield elements in an
+ '''Returns an int of the number of pfields that exists in a given
event.
The statement (pfield 0) is also counted. Comments and whitespace
- are omitted from the tally.
-
- Example::
+ are omitted from the tally. The following examples counts 'i',
+ '1', '0', '4', '1.0' and '440', and does not include '; A440' as
+ part of the returned figure::
>>> event.number_of_pfields('i 1 0 4 1.0 440 ; A440')
6
@@ -240,7 +218,7 @@ def remove(event, pfield_index):
>>> event.remove('i 1 0 4 1.0 440 ; A440', 4)
('i 1 0 4 440 ; A440', '1.0')
- See :term:`event`, :term:`pfield`
+ See :term:`event`, :term:`pfield_index`
'''
@@ -254,11 +232,10 @@ def remove(event, pfield_index):
return event, pf
def sanitize(event):
- '''Returns a copy of the score event with extra whitespace and
+ '''Returns a copy of the event with extra whitespace and
comments removed.
- This function will introduce a single space between a statement and
- the following non-whitespace element.
+ A single whitespace separates each pfield in the return.
Example::
@@ -295,7 +272,7 @@ def set(event, pfield_index, value):
>>> event.set('i 1 0 4 1.0 440 ; A440', 5, 1138)
'i 1 0 4 1.0 1138 ; A440'
- See :term:`event`, :term:`pfield`
+ See :term:`event`, :term:`pfield_index`
'''
@@ -326,7 +303,7 @@ def set(event, pfield_index, value):
return ''.join(tokens)
def split(event):
- '''Returns a list that includes all event pfield and comments
+ '''Returns a list that includes all event pfield and comment
elements.
Example::
@@ -400,7 +377,7 @@ def swap(event, pfield_index_a, pfield_index_b):
.. note:: This currently will not swap pfield 0. Not sure if it
should, though throwing an error might be in order.
- See :term:`event`
+ See :term:`event`, :term:`pfield_index`
'''
@@ -422,6 +399,8 @@ def tokenize(event):
.. note:: This function will attempt to tokenize invalid elements.
Be sure that the event you provide is syntactically correct.
+ Though this module should provide an is_valid() that does this
+ for you.
See :term:`event`
Oops, something went wrong.

0 comments on commit 01e1205

Please sign in to comment.