GithubHelp home page GithubHelp logo

supriya-project / supriya Goto Github PK

View Code? Open in Web Editor NEW
245.0 245.0 28.0 94.15 MB

A Python API for SuperCollider

Home Page: http://supriya-project.github.io/supriya

License: MIT License

Python 98.40% Makefile 0.12% SuperCollider 0.02% Cython 1.46%
audio composition dsp music python sc supercollider synthesis synthesizer

supriya's People

Contributors

arp2600 avatar deeuu avatar dependabot[bot] avatar gitmarek avatar josephine-wolf-oberholtzer avatar josiah-wolf-oberholtzer avatar kureta avatar marksweiss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supriya's Issues

Restructure all docstrings

Restructure docstrings from:

class Foo(object):
    '''Blah blah.
    '''

... to ...

class Foo(object):
    '''
    Blah blah.
    '''

It looks nicer.

python-wavefile not found

Hi, for me python-wavefile wasn't found when installing, I had to rename it to just "wavefile" and it worked fine.

Implement all UGen operators.

Consult the synthdeftools.UnaryOperator and synthdeftools.BinaryOperator enumerations for the names and numeric values of the mathematical operators defined in SuperCollider.

Implement these as Python special methods on synthdeftools.UGenMethodsMixin when possible and desirable. Otherwise, implement them as plain instance methods.

Some of these operations may already be implemented on synthdeftools.Op. Port those over as instance methods when found.

See #14 for more details.

Clarify bus handling in NRT nodes.

Setting a bus map symbol tends to be problematic.

We should provide map() and unmap() methods on nonrealtimetools.Node.

Users should specify that they want to map instead of use a bus's ID, rather than implicitly mapping.

The default should be to use the integer value of the Bus, not its map symbol.

This may require implement first-class node controls like we already have in servertools.

Implement all mathematical special methods on UGenMethodMixin.

UGens should support all mathematical operators available in Python via special methods.

Implement these special methods on synthdeftools.UGenMethodMixin, using the methods already defined there as a template (e.g. UGenMethodMixin.__add__(...)).

Some of these methods may already be implemented on the synthdeftools.Op class. When available, port those methods over from the staticmethods implemented on Op to bound instance methods on UGenMethodMixin. Remove the ported method from Op. Eventually, Op should be removed entirely.

It is not guaranteed that all Python operators will translate into SuperCollider UGen operators, or vice-versa. Use good judgement, and go with whatever is least surprising.

Consult the synthdeftools.UnaryOperator and synthdeftools.BinaryOperator enumerations for the names to use when building new operator methods.

Comparators:

  • object.__lt__(self, other)
  • object.__le__(self, other)
  • object.__gt__(self, other)
  • object.__ge__(self, other)

Do not implement __eq__ or __ne__. Implementing equality operators will cause other crucial functionality to break. Equality is already implemented via Op.is_equal(...) and Op.is_not_equal(...).

See below for more methods to not implement.

Basic arithmetic operations:

  • object.__add__(self, other)
  • object.__and__(self, other)
  • object.__floordiv__(self, other)
  • object.__lshift__(self, other)
  • object.__mod__(self, other)
  • object.__mul__(self, other)
  • object.__or__(self, other)
  • object.__pow__(self, other[, modulo])
  • object.__rshift__(self, other)
  • object.__sub__(self, other)
  • object.__truediv__(self, other)
  • object.__xor__(self, other)

Reflexives:

  • object.__radd__(self, other)
  • object.__rand__(self, other)
  • object.__rfloordiv__(self, other)
  • object.__rlshift__(self, other)
  • object.__rmod__(self, other)
  • object.__rmul__(self, other)
  • object.__ror__(self, other)
  • object.__rpow__(self, other)
  • object.__rrshift__(self, other)
  • object.__rsub__(self, other)
  • object.__rtruediv__(self, other)
  • object.__rxor__(self, other)

In-place operations:

  • object.__iadd__(self, other)
  • object.__iand__(self, other)
  • object.__ifloordiv__(self, other)
  • object.__ilshift__(self, other)
  • object.__imod__(self, other)
  • object.__imul__(self, other)
  • object.__ior__(self, other)
  • object.__ipow__(self, other[, modulo])
  • object.__irshift__(self, other)
  • object.__isub__(self, other)
  • object.__itruediv__(self, other)
  • object.__ixor__(self, other)

Unary operations:

  • object.__abs__(self)
  • object.__invert__(self)
  • object.__neg__(self)
  • object.__pos__(self)

Casting operations:

  • object.__float__(self)
  • object.__int__(self)
  • object.__round__(self[, n])

Do not implement:

  • object.__divmod__(self, other)
  • object.__eq__(self, other)
  • object.__ne__(self, other)
  • object.__matmul__(self, other)
  • object.__rdivmod__(self, other)
  • object.__imatmul__(self, other)
  • object.__rmatmul__(self, other)

Implement bus-to-control unmapping.

Should be as simple as:

my_synth.controls['control_name'] = Bus(0, 'kr')  # mapped
my_synth.controls['control_name'] = None  # unmapped

Small concern: once unmapped, the resting value of the synth control is unknown. Do we want to query for the new value?

Design and implement DAWtools.

Affordances for channels, mixers, faders, sends (pre-fader, post-fader), channel inputs and outputs, multi-channel synth containers for expanding monophonic fx synths.

Write developer documentation.

We need some basic developer documentation:

  • overview of Supriya's dependencies
    • Abjad must be installed from source
  • how to run doctests
  • how to run unit tests
  • what's up with Travis-CI
  • how to build the documentation
  • any coding standards quirks
    • no camel-case
    • no abbreviations (if possible)
    • rename names coming from SC if they are ambiguous

Audit TimespanCollection.

Test TimespanCollection.find_timespans_intersecting_timespan().

It may possibly not return results when it actually should.

Construct a thorough battery to test.

Convert test suit to use unittest.TestCase.

Convert all unit test modules to use unittest.TestCase or a subclass thereof. Abjad's systemtools provides a TestCase class with many convenience methods built-in. Supriya's tests should use either that class, or a custom subclass.

Get Supriya running on Travis-CI.

Continuous-integration testing would help a lot, especially with isolating the build environment, and allowing contributors to run the test-suite. Unfortunately, sound on Travis-CI is a no-go. There's no way to modify the build environment there to support even using dummy sound cards via modprobe.

What are our options?

  • Most desirable: find a CI system that supports dummy audio.
  • Less desirable: mark all tests that require booting the server and skipping them under CI.

Modernize tox.ini.

The tox.ini configuration hasn't been updated to reflect that Python 2.7 is no longer supported.

Add input properties to all UGens.

Every UGen input should be represented by a documented, read-only property.

For example, SinOsc has two input names: "frequency" and "phase". Both of these inputs should have their own property which returns whatever the UGen was instantiated with.

Implement all UGens.

Remaining UGens to implement:

  • Convolution2
  • Convolution2L
  • Convolution3
  • DecodeB2
  • DemandEnvGen
  • DetectIndex
  • Dpoll
  • Duty
  • DynKlang
  • DynKlank
  • FFTTrigger
  • FSinOsc
  • Formant
  • FreeVerb2
  • FreqShift
  • GVerb
  • GrainBuf
  • GrainFM
  • GrainIn
  • GrainSin
  • Hilbert
  • HilbertFIR
  • IEnvGen
  • InBus
  • InRect
  • InTrig
  • Index
  • IndexInBetween
  • IndexL
  • KeyState
  • Klang
  • LagIn
  • LastValue
  • LeastChange
  • LinPan2
  • LinXFade2
  • ModDif
  • MoogFF
  • MostChange
  • OneZero
  • Osc
  • OscN
  • OutputProxy
  • PSinGrain
  • PackFFT
  • PartConv
  • Pitch
  • Pulse
  • PulseCount
  • PulseDivider
  • Resonz
  • RunningSum
  • ScopeOut
  • ScopeOut2
  • Select
  • SelectL
  • SendReply
  • SendTrig
  • SetBuf
  • SetResetFF
  • Shaper
  • SinOscFB
  • Splay
  • SplayAz
  • Stepper
  • StereoConvolution2L
  • Sweep
  • SyncSaw
  • T2A
  • T2K
  • TDuty
  • TGrains
  • Tap
  • Timer
  • TwoZero
  • Unpack1FFT
  • UnpackFFT
  • VOsc
  • VOsc3
  • VarLag
  • Vibrato
  • Warp1
  • WrapIndex
  • XFade2
  • XFadeRotate

RealtimeEventPlayer should handle custom deltas.

Currently RealtimeEventPlayer exhibits incorrect delta behavior when the pattern it plays defines custom deltas for its events. Fix this.

See test_manual_incommunicado_pbind_03 in patterntools/test/test_Pbind.py in the patterns branch for an example of expected (but unfulfilled) behavior.

Code in README.rst does not work

When I try to run the code example in your readme file it throws this error:

Traceback (most recent call last):
  File "/Users/kureta/Documents/Python/supriya-sandbox/main.py", line 24, in <module>
    source = source * builder['amplitude']
  File "/Users/kureta/Documents/Python/supriya/supriya/tools/synthdeftools/UGenMethodMixin.py", line 898, in __mul__
    synthdeftools.BinaryOperator.MULTIPLICATION,
  File "/Users/kureta/Documents/Python/supriya/supriya/tools/synthdeftools/UGenMethodMixin.py", line 1676, in _compute_binary_op
    special_index=special_index,
  File "/Users/kureta/Documents/Python/supriya/supriya/tools/ugentools/BinaryOpUGen.py", line 67, in _new_single
    if b == 0:
  File "/Users/kureta/Documents/Python/supriya/supriya/tools/synthdeftools/Parameter.py", line 58, in __eq__
    return systemtools.TestManager.compare_objects(self, expr)
AttributeError: type object 'TestManager' has no attribute 'compare_objects'

Verify repeats keyword of demand UGens.

Prove that demand UGens repeat as expected. Use str(server) to test the state of a demand-based synth.

The DUGen setting repeats=None should be equivalent to repeats=float('inf'), but repeats=float('inf') should be supported.

Verify how SC byte-compiles demand UGens. How is repeats: inf stored in SC?

Can't import supriya

When I do an import I have the following error

ImportError: No module named 'abjad.tools.commandlinetools.DirectoryScript'

I installed abjad from the git repo. What am I doing wrong?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.