csound-expression 0.3.4 → 1.0.0
raw patch · 170 files changed
+5041/−32805 lines, 170 filesdep +arraydep +data-defaultdep +data-fixdep −directorydep −filepathdep −mtldep ~Boolean
Dependencies added: array, data-default, data-fix, data-fix-cse, transformers, wl-pprint
Dependencies removed: directory, filepath, mtl, pretty, process, temporal-music-notation
Dependency ranges changed: Boolean
Files
- Changelog +0/−58
- LICENSE +1/−1
- csound-expression.cabal +84/−181
- examples/Orchestra.hs +0/−92
- examples/Readme.hs +0/−31
- examples/arpeggi.hs +0/−79
- examples/choral.hs +0/−250
- examples/dm.hs +0/−28
- examples/teardrop.hs +0/−40
- examples/tmp/new.csd +0/−1395
- src/Csound/Base.hs +95/−0
- src/Csound/Exp.hs +236/−0
- src/Csound/Exp/Cons.hs +191/−0
- src/Csound/Exp/Logic.hs +90/−0
- src/Csound/Exp/Numeric.hs +272/−0
- src/Csound/Exp/Wrapper.hs +451/−0
- src/Csound/LowLevel.hs +85/−0
- src/Csound/Opcode.hs +22/−0
- src/Csound/Opcode/Advanced.hs +918/−0
- src/Csound/Opcode/Basic.hs +992/−0
- src/Csound/Opcode/Data.hs +551/−0
- src/Csound/Opcode/Interaction.hs +126/−0
- src/Csound/Render.hs +99/−0
- src/Csound/Render/Instr.hs +130/−0
- src/Csound/Render/Options.hs +90/−0
- src/Csound/Render/Pretty.hs +221/−0
- src/Csound/Render/Sco.hs +137/−0
- src/Csound/Tfm/RateGraph.hs +215/−0
- src/Csound/Tfm/TfmTree.hs +35/−0
- src/CsoundExpr.hs +0/−283
- src/CsoundExpr/Base.hs +0/−31
- src/CsoundExpr/Base/Arithmetic.hs +0/−159
- src/CsoundExpr/Base/Boolean.hs +0/−85
- src/CsoundExpr/Base/Gens.hs +0/−561
- src/CsoundExpr/Base/Header.hs +0/−161
- src/CsoundExpr/Base/Imperative.hs +0/−147
- src/CsoundExpr/Base/MultiOut.hs +0/−247
- src/CsoundExpr/Base/Pitch.hs +0/−71
- src/CsoundExpr/Base/Pretty.hs +0/−97
- src/CsoundExpr/Base/SideEffect.hs +0/−99
- src/CsoundExpr/Base/Types.hs +0/−62
- src/CsoundExpr/Base/UserDefined.hs +0/−135
- src/CsoundExpr/Opcodes.hs +0/−43
- src/CsoundExpr/Opcodes/Control.hs +0/−36
- src/CsoundExpr/Opcodes/Control/Clockctl.hs +0/−53
- src/CsoundExpr/Opcodes/Control/Durctl.hs +0/−95
- src/CsoundExpr/Opcodes/Control/FltkAppearance.hs +0/−411
- src/CsoundExpr/Opcodes/Control/FltkGeneral.hs +0/−32
- src/CsoundExpr/Opcodes/Control/FltkIntro.hs +0/−366
- src/CsoundExpr/Opcodes/Control/FltkOther.hs +0/−456
- src/CsoundExpr/Opcodes/Control/FltkValuators.hs +0/−207
- src/CsoundExpr/Opcodes/Control/Invocat.hs +0/−58
- src/CsoundExpr/Opcodes/Control/Pgmctl.hs +0/−54
- src/CsoundExpr/Opcodes/Control/Realtime.hs +0/−164
- src/CsoundExpr/Opcodes/Control/Reinitn.hs +0/−98
- src/CsoundExpr/Opcodes/Control/Sensing.hs +0/−604
- src/CsoundExpr/Opcodes/Control/Stacks.hs +0/−76
- src/CsoundExpr/Opcodes/Control/Subinstrument.hs +0/−13
- src/CsoundExpr/Opcodes/Control/Timeread.hs +0/−256
- src/CsoundExpr/Opcodes/Imageopcodes.hs +0/−8
- src/CsoundExpr/Opcodes/Imageopcodes/Top.hs +0/−125
- src/CsoundExpr/Opcodes/Math.hs +0/−18
- src/CsoundExpr/Opcodes/Math/Amp.hs +0/−122
- src/CsoundExpr/Opcodes/Math/Matfunc.hs +0/−336
- src/CsoundExpr/Opcodes/Math/Opeqfunc.hs +0/−191
- src/CsoundExpr/Opcodes/Math/Rndfunc.hs +0/−54
- src/CsoundExpr/Opcodes/Math/SigmodCompaccum.hs +0/−350
- src/CsoundExpr/Opcodes/Math/Trig.hs +0/−200
- src/CsoundExpr/Opcodes/Midi.hs +0/−24
- src/CsoundExpr/Opcodes/Midi/Convert.hs +0/−258
- src/CsoundExpr/Opcodes/Midi/Extender.hs +0/−58
- src/CsoundExpr/Opcodes/Midi/Generic.hs +0/−54
- src/CsoundExpr/Opcodes/Midi/Input.hs +0/−661
- src/CsoundExpr/Opcodes/Midi/Interop.hs +0/−304
- src/CsoundExpr/Opcodes/Midi/Onoff.hs +0/−164
- src/CsoundExpr/Opcodes/Midi/Output.hs +0/−326
- src/CsoundExpr/Opcodes/Midi/Realtime.hs +0/−53
- src/CsoundExpr/Opcodes/Midi/Slidrbk.hs +0/−421
- src/CsoundExpr/Opcodes/Miscopcodes.hs +0/−8
- src/CsoundExpr/Opcodes/Miscopcodes/Top.hs +0/−69
- src/CsoundExpr/Opcodes/MixerOpcodes.hs +0/−8
- src/CsoundExpr/Opcodes/MixerOpcodes/MixerOpcodes.hs +0/−147
- src/CsoundExpr/Opcodes/OSCNetwork.hs +0/−12
- src/CsoundExpr/Opcodes/OSCNetwork/Network.hs +0/−63
- src/CsoundExpr/Opcodes/OSCNetwork/OSC.hs +0/−81
- src/CsoundExpr/Opcodes/OSCNetwork/Remote.hs +0/−33
- src/CsoundExpr/Opcodes/Other.hs +0/−26
- src/CsoundExpr/Opcodes/Pitch.hs +0/−10
- src/CsoundExpr/Opcodes/Pitch/Funcs.hs +0/−246
- src/CsoundExpr/Opcodes/Pitch/Tuning.hs +0/−98
- src/CsoundExpr/Opcodes/Plugin.hs +0/−10
- src/CsoundExpr/Opcodes/Plugin/Dssi4cs.hs +0/−123
- src/CsoundExpr/Opcodes/Plugin/Vst4cs.hs +0/−174
- src/CsoundExpr/Opcodes/Siggen.hs +0/−38
- src/CsoundExpr/Opcodes/Siggen/Additive.hs +0/−117
- src/CsoundExpr/Opcodes/Siggen/Basic.hs +0/−661
- src/CsoundExpr/Opcodes/Siggen/Dynamic.hs +0/−213
- src/CsoundExpr/Opcodes/Siggen/Envelope.hs +0/−409
- src/CsoundExpr/Opcodes/Siggen/Fmsynth.hs +0/−491
- src/CsoundExpr/Opcodes/Siggen/Granular.hs +0/−588
- src/CsoundExpr/Opcodes/Siggen/Hvs.hs +0/−124
- src/CsoundExpr/Opcodes/Siggen/Lineexp.hs +0/−631
- src/CsoundExpr/Opcodes/Siggen/Models.hs +0/−715
- src/CsoundExpr/Opcodes/Siggen/Noise.hs +0/−2725
- src/CsoundExpr/Opcodes/Siggen/Phasors.hs +0/−125
- src/CsoundExpr/Opcodes/Siggen/Sample.hs +0/−1076
- src/CsoundExpr/Opcodes/Siggen/ScanTop.hs +0/−250
- src/CsoundExpr/Opcodes/Siggen/Tableacc.hs +0/−447
- src/CsoundExpr/Opcodes/Siggen/Waveterr.hs +0/−38
- src/CsoundExpr/Opcodes/Siggen/Wavguide.hs +0/−315
- src/CsoundExpr/Opcodes/Sigio.hs +0/−18
- src/CsoundExpr/Opcodes/Sigio/FileIO.hs +0/−506
- src/CsoundExpr/Opcodes/Sigio/Input.hs +0/−348
- src/CsoundExpr/Opcodes/Sigio/Output.hs +0/−535
- src/CsoundExpr/Opcodes/Sigio/Pdisplay.hs +0/−234
- src/CsoundExpr/Opcodes/Sigio/Queries.hs +0/−95
- src/CsoundExpr/Opcodes/Sigio/SoftwareBus.hs +0/−575
- src/CsoundExpr/Opcodes/Sigmod.hs +0/−30
- src/CsoundExpr/Opcodes/Sigmod/Delay.hs +0/−464
- src/CsoundExpr/Opcodes/Sigmod/Panspatl.hs +0/−711
- src/CsoundExpr/Opcodes/Sigmod/Reverbtn.hs +0/−282
- src/CsoundExpr/Opcodes/Sigmod/Sample.hs +0/−370
- src/CsoundExpr/Opcodes/Sigmod/SigProcAmpMod.hs +0/−138
- src/CsoundExpr/Opcodes/Sigmod/SigProcConmorph.hs +0/−157
- src/CsoundExpr/Opcodes/Sigmod/Siglimit.hs +0/−221
- src/CsoundExpr/Opcodes/Sigmod/Speciale.hs +0/−161
- src/CsoundExpr/Opcodes/Sigmod/Speciali.hs +0/−283
- src/CsoundExpr/Opcodes/Sigmod/Standard.hs +0/−976
- src/CsoundExpr/Opcodes/Sigmod/Wavguide.hs +0/−33
- src/CsoundExpr/Opcodes/Sigmod/Wavshape.hs +0/−166
- src/CsoundExpr/Opcodes/SignalFlowGraphOpcodes.hs +0/−8
- src/CsoundExpr/Opcodes/SignalFlowGraphOpcodes/SignalFlowGraphOpcodes.hs +0/−119
- src/CsoundExpr/Opcodes/Spectral.hs +0/−18
- src/CsoundExpr/Opcodes/Spectral/ATS.hs +0/−261
- src/CsoundExpr/Opcodes/Spectral/Loris.hs +0/−97
- src/CsoundExpr/Opcodes/Spectral/Lpcresyn.hs +0/−119
- src/CsoundExpr/Opcodes/Spectral/Nonstand.hs +0/−13
- src/CsoundExpr/Opcodes/Spectral/RealTime.hs +0/−13
- src/CsoundExpr/Opcodes/Spectral/SiggenStft.hs +0/−268
- src/CsoundExpr/Opcodes/Table.hs +0/−12
- src/CsoundExpr/Opcodes/Table/Queries.hs +0/−162
- src/CsoundExpr/Opcodes/Table/Readwrit.hs +0/−600
- src/CsoundExpr/Opcodes/Table/Select.hs +0/−122
- src/CsoundExpr/Opcodes/Vectorial.hs +0/−20
- src/CsoundExpr/Opcodes/Vectorial/EnvelopeGenerators.hs +0/−82
- src/CsoundExpr/Opcodes/Vectorial/Vectorialdelay.hs +0/−78
- src/CsoundExpr/Opcodes/Vectorial/Vectorialimiting.hs +0/−74
- src/CsoundExpr/Opcodes/Vectorial/Vectorialrandom.hs +0/−61
- src/CsoundExpr/Opcodes/Vectorial/Vectorialscalar.hs +0/−183
- src/CsoundExpr/Opcodes/Vectorial/Vectorialtables.hs +0/−294
- src/CsoundExpr/Opcodes/Vectorial/Vectorialvectorial.hs +0/−335
- src/CsoundExpr/Opcodes/Zak.hs +0/−8
- src/CsoundExpr/Opcodes/Zak/Top.hs +0/−326
- src/CsoundExpr/Translator/AssignmentElimination.hs +0/−159
- src/CsoundExpr/Translator/Cs/CsBoolean.hs +0/−144
- src/CsoundExpr/Translator/Cs/CsTree.hs +0/−295
- src/CsoundExpr/Translator/Cs/CsoundFile.hs +0/−320
- src/CsoundExpr/Translator/Cs/IM.hs +0/−8
- src/CsoundExpr/Translator/Cs/Utils.hs +0/−37
- src/CsoundExpr/Translator/Csd.hs +0/−97
- src/CsoundExpr/Translator/ExprTree/ExprTree.hs +0/−87
- src/CsoundExpr/Translator/ExprTree/Tree.hs +0/−74
- src/CsoundExpr/Translator/ExprTree/TreeSeq.hs +0/−123
- src/CsoundExpr/Translator/Ftable.hs +0/−110
- src/CsoundExpr/Translator/Header.hs +0/−84
- src/CsoundExpr/Translator/Instr.hs +0/−32
- src/CsoundExpr/Translator/InstrOrder.hs +0/−54
- src/CsoundExpr/Translator/MultiOutsFolding.hs +0/−110
- src/CsoundExpr/Translator/Score.hs +0/−146
- src/CsoundExpr/Translator/Types.hs +0/−236
− Changelog
@@ -1,58 +0,0 @@--> 0.3.4 package Boolean is changed. Keeping dependencies up to date---> 0.3.3 score representation is changed (temporal-media package)---> 0.3.2 adds new GEN functionality:- new functions for specific gens creation: - toFtgen, toFtgentmp, toFtgenonce - skipNorm accepts not only values created with genXX,- but gen-like values also (created with toFtgenXXX functions)---> 0.3.1 underlying temporal-media package updates---> 0.3.0 update for Score api. Now there is no Score api by default.- Consider using 'temporal-media'[1] or 'temporal-music-notation'[2]- packages for csound score events composition. - 'temporal-media' is general package for functional construction - of list of events with fixed start time and duration, like- csound notes. -- Tutorial moves to root-module 'CsoundExpr'.-- [1] http://hackage.haskell.org/package/temporal-media- [2] http://hackage.haskell.org/package/temporal-music-notation---> 0.2.0 fixes docs bugs,-- new functions in CsoundExpr.Base.Score :-- extends TemporalFunctor with new methods- tmap, dmap, tdmap for mapping dependent on time/duration,- enveloping on Score level (diminuendo or crescendo)- - WARNING : API changes : tmap is now dmap and tmap stands for time - dependent mapping (not duration as it was before),-- new class Sustainable, adds ability for legato and pedal (sustain,- sustainBy functions)-- new class TemporalStretch, adds ability to stretch score dependent- on note's start time (ritardando or accelerando)-- adds list-like operations on Scores : reverseS, takeS, dropS-- new function in CsoundExpr.Base.Arithmetic - ^+ - shift with Irate- ---> 0.1.0 new type BoolRate, functional if/then/else is possible- new operators : <^>, <%>- scaling becomes ^* (due to <* is defined as lower then for signals)---> 0.0.3 fixes a bug with p-fields assignment---> 0.0.2 fixes a bug in dependencies---> 0.0.1 adds Tutorial--0.0
LICENSE view
@@ -1,4 +1,4 @@-Copyright Anton Kholomiov 2011-2012+Copyright Anton Kholomiov 2010 All rights reserved.
csound-expression.cabal view
@@ -1,195 +1,98 @@ Name: csound-expression-Version: 0.3.4-Cabal-Version: >= 1.2+Version: 1.0.0+Cabal-Version: >= 1.6 License: BSD3-License-File: LICENSE+License-file: LICENSE Author: Anton Kholomiov-Maintainer: <anton.kholomiov@gmail.com>-Synopsis: Csound combinator library-Description: Csound code generator. See root module "CsoundExpr" - for introduction guides. Score module is no longer - available inside 'csound-expression' package, consider - using 'temporal-media' or 'temporal-music-notation'- packages. See source directory for examples.--Category: Sound, Music+Synopsis: library to make electronic music Stability: Experimental-Tested-With: GHC==6.12.3+Tested-With: GHC==7.4 Build-Type: Simple+Category: Music, Sound+Maintainer: <anton.kholomiov@gmail.com> +Description: + Let's make music with text! We can use Csound to describe our music. Csound has so many fantastic sound generators.+ It's very efficient. But sometimes Csound is too low level. So many details: integer identifiers for instruments + and arrays, should I use control rate or audio rate signals, lack of abstractions, no nested expressions and it has limited set of types. + This library embeds Csound in Haskell. It's Csound code generator. We can use powerful Csound's primitives and glue them+ together with Haskell abstractions. Start with the module "Csound.Base". It contains basic types and functions. + .+ Key principles+ .+ * Keep it simple and compact.+ .+ * Try to hide low level csound's wiring as much as we can (no ids for ftables, instruments, global variables).+ .+ * Don't describe the whole csound in all it's generality but give the user some handy tools+ to play with sound.+ .+ * No distinction between audio and control rates on the type level. Derive all rates from the context.+ If the user plugs signal to an opcode that expects an audio rate signal the argument is converted to the right rate.+ . + * Watch out for side-effects. There is a special type called 'SE'. It functions as 'IO' in Haskell. + .+ * Less typing, more music. Use short names for all types. Make library so that all expressions can be+ built without type annotations. Make it simple for the compiler to derive all types. Don't use complex type classes.+ . + * Make low level opcode definitions simple. Let user define his own opcodes (if they are missing).+ .+ * Make it independent from any Score-generation library. Let user choose his favorite library.+ By the way, my favorite is the package 'temporal-music-notation' (but i'm biased as an author). You can+ find it on hackage alongside with 'temporal-csound'. It brings 'csound-expression' and 'temporal-music-notation'+ together. + .+ * Ensure that output signal is limited by amplitude. Csound can produce signals with HUGE amplitudes. Little typo can damage your ears + and your speakers. In generated code all signals are clipped by 0dbfs value. 0dbfs is set to 1. Just as in Pure Data. So 1 is absolute maximum value+ for amplitude. + .+ For the future+ . + * Make composable guis. Just plug the slider in the opcode and see it on the screen. Interactive instruments should be easy to make.+ .+ * Remove score/instrument barrier. Let instrument play a score within a note and trigger+ other instruments. + .+ * Timing of events. User can set the beat rate and align events by beat events.+ .+ * Set Csound flags with meaningful (well-typed) values. Derive as much as you can from the context.+ Extra-Source-Files : - Changelog- examples/Readme.hs - examples/dm.hs - examples/arpeggi.hs - examples/choral.hs - examples/teardrop.hs - examples/Orchestra.hs - examples/tmp/new.csd +Homepage: https://github.com/anton-k/csound-expression+Bug-Reports: https://github.com/anton-k/csound-expression/issues++Source-repository head+ Type: git+ Location: https://github.com/anton-k/csound-expression++ Library Build-Depends:- base >= 4, base < 5, containers, mtl >= 2.0, pretty, - filepath, directory, process >= 1, Boolean >= 0.1.1, temporal-music-notation >= 0.2+ base >= 4, base < 5, containers, array, transformers, wl-pprint,+ data-default, Boolean >= 0.1.0, data-fix, data-fix-cse Hs-Source-Dirs: src/ Exposed-Modules:- CsoundExpr--- Base- CsoundExpr.Base- CsoundExpr.Base.Types- CsoundExpr.Base.Boolean- CsoundExpr.Base.Imperative- CsoundExpr.Base.MultiOut- CsoundExpr.Base.SideEffect- CsoundExpr.Base.Arithmetic- CsoundExpr.Base.Header- CsoundExpr.Base.Gens- CsoundExpr.Base.Pitch- CsoundExpr.Base.UserDefined- CsoundExpr.Base.Pretty--- Tutorial--- CsoundExpr.Tutorial--- CsoundExpr.Tutorial.Intro--- CsoundExpr.Tutorial.Composition--- CsoundExpr.Tutorial.Orchestra--- CsoundExpr.Tutorial.Limits---- Opcodes- CsoundExpr.Opcodes- - CsoundExpr.Opcodes.Other-- CsoundExpr.Opcodes.Siggen- CsoundExpr.Opcodes.Sigio- CsoundExpr.Opcodes.Sigmod- CsoundExpr.Opcodes.Control- CsoundExpr.Opcodes.Table- CsoundExpr.Opcodes.Math- CsoundExpr.Opcodes.Pitch- CsoundExpr.Opcodes.Midi- CsoundExpr.Opcodes.Spectral- CsoundExpr.Opcodes.Vectorial- CsoundExpr.Opcodes.Zak- CsoundExpr.Opcodes.Plugin- CsoundExpr.Opcodes.OSCNetwork- CsoundExpr.Opcodes.MixerOpcodes- CsoundExpr.Opcodes.SignalFlowGraphOpcodes- CsoundExpr.Opcodes.Imageopcodes- CsoundExpr.Opcodes.Miscopcodes- CsoundExpr.Opcodes.Siggen.Additive- CsoundExpr.Opcodes.Siggen.Basic- CsoundExpr.Opcodes.Siggen.Dynamic- CsoundExpr.Opcodes.Siggen.Fmsynth- CsoundExpr.Opcodes.Siggen.Granular- CsoundExpr.Opcodes.Siggen.Hvs- CsoundExpr.Opcodes.Siggen.Lineexp- CsoundExpr.Opcodes.Siggen.Envelope- CsoundExpr.Opcodes.Siggen.Models- CsoundExpr.Opcodes.Siggen.Phasors- CsoundExpr.Opcodes.Siggen.Noise- CsoundExpr.Opcodes.Siggen.Sample- CsoundExpr.Opcodes.Siggen.ScanTop- CsoundExpr.Opcodes.Siggen.Tableacc- CsoundExpr.Opcodes.Siggen.Waveterr- CsoundExpr.Opcodes.Siggen.Wavguide- CsoundExpr.Opcodes.Sigio.FileIO- CsoundExpr.Opcodes.Sigio.Input- CsoundExpr.Opcodes.Sigio.Output- CsoundExpr.Opcodes.Sigio.SoftwareBus- CsoundExpr.Opcodes.Sigio.Pdisplay- CsoundExpr.Opcodes.Sigio.Queries- CsoundExpr.Opcodes.Sigmod.SigProcAmpMod- CsoundExpr.Opcodes.Sigmod.SigProcConmorph- CsoundExpr.Opcodes.Sigmod.Delay- CsoundExpr.Opcodes.Sigmod.Panspatl- CsoundExpr.Opcodes.Sigmod.Reverbtn- CsoundExpr.Opcodes.Sigmod.Sample- CsoundExpr.Opcodes.Sigmod.Siglimit- CsoundExpr.Opcodes.Sigmod.Speciale- CsoundExpr.Opcodes.Sigmod.Standard- CsoundExpr.Opcodes.Sigmod.Speciali- CsoundExpr.Opcodes.Sigmod.Wavguide- CsoundExpr.Opcodes.Sigmod.Wavshape- CsoundExpr.Opcodes.Control.Clockctl- CsoundExpr.Opcodes.Control.Durctl- CsoundExpr.Opcodes.Control.FltkIntro- CsoundExpr.Opcodes.Control.FltkValuators- CsoundExpr.Opcodes.Control.FltkOther- CsoundExpr.Opcodes.Control.FltkAppearance- CsoundExpr.Opcodes.Control.FltkGeneral- CsoundExpr.Opcodes.Control.Invocat- CsoundExpr.Opcodes.Control.Pgmctl- CsoundExpr.Opcodes.Control.Realtime- CsoundExpr.Opcodes.Control.Reinitn- CsoundExpr.Opcodes.Control.Sensing- CsoundExpr.Opcodes.Control.Stacks- CsoundExpr.Opcodes.Control.Subinstrument- CsoundExpr.Opcodes.Control.Timeread- CsoundExpr.Opcodes.Table.Queries- CsoundExpr.Opcodes.Table.Readwrit- CsoundExpr.Opcodes.Table.Select- CsoundExpr.Opcodes.Math.Amp- CsoundExpr.Opcodes.Math.SigmodCompaccum- CsoundExpr.Opcodes.Math.Matfunc- CsoundExpr.Opcodes.Math.Opeqfunc- CsoundExpr.Opcodes.Math.Rndfunc- CsoundExpr.Opcodes.Math.Trig- CsoundExpr.Opcodes.Pitch.Funcs- CsoundExpr.Opcodes.Pitch.Tuning- CsoundExpr.Opcodes.Midi.Input- CsoundExpr.Opcodes.Midi.Output- CsoundExpr.Opcodes.Midi.Generic- CsoundExpr.Opcodes.Midi.Convert- CsoundExpr.Opcodes.Midi.Extender- CsoundExpr.Opcodes.Midi.Onoff- CsoundExpr.Opcodes.Midi.Interop- CsoundExpr.Opcodes.Midi.Realtime- CsoundExpr.Opcodes.Midi.Slidrbk- CsoundExpr.Opcodes.Spectral.SiggenStft- CsoundExpr.Opcodes.Spectral.Lpcresyn- CsoundExpr.Opcodes.Spectral.Nonstand- CsoundExpr.Opcodes.Spectral.RealTime- CsoundExpr.Opcodes.Spectral.ATS- CsoundExpr.Opcodes.Spectral.Loris- CsoundExpr.Opcodes.Vectorial.Vectorialtables- CsoundExpr.Opcodes.Vectorial.Vectorialscalar- CsoundExpr.Opcodes.Vectorial.Vectorialvectorial- CsoundExpr.Opcodes.Vectorial.EnvelopeGenerators- CsoundExpr.Opcodes.Vectorial.Vectorialimiting- CsoundExpr.Opcodes.Vectorial.Vectorialdelay- CsoundExpr.Opcodes.Vectorial.Vectorialrandom- CsoundExpr.Opcodes.Zak.Top- CsoundExpr.Opcodes.Plugin.Dssi4cs- CsoundExpr.Opcodes.Plugin.Vst4cs- CsoundExpr.Opcodes.OSCNetwork.OSC- CsoundExpr.Opcodes.OSCNetwork.Network- CsoundExpr.Opcodes.OSCNetwork.Remote- CsoundExpr.Opcodes.MixerOpcodes.MixerOpcodes- CsoundExpr.Opcodes.SignalFlowGraphOpcodes.SignalFlowGraphOpcodes- CsoundExpr.Opcodes.Imageopcodes.Top- CsoundExpr.Opcodes.Miscopcodes.Top----------------------------------------------------------------------------------- + Csound.Base+ Csound.LowLevel+ Csound.Opcode+ Csound.Opcode.Basic+ Csound.Opcode.Advanced+ Csound.Opcode.Data+ Csound.Opcode.Interaction Other-Modules:--- Trees- CsoundExpr.Translator.ExprTree.Tree- CsoundExpr.Translator.ExprTree.TreeSeq- CsoundExpr.Translator.ExprTree.ExprTree--- Cs- CsoundExpr.Translator.Cs.CsoundFile- CsoundExpr.Translator.Cs.CsTree- CsoundExpr.Translator.Cs.CsBoolean- CsoundExpr.Translator.Cs.IM- CsoundExpr.Translator.Cs.Utils--- Translator- CsoundExpr.Translator.Csd- CsoundExpr.Translator.Ftable- CsoundExpr.Translator.Header- CsoundExpr.Translator.Instr- CsoundExpr.Translator.Score- CsoundExpr.Translator.InstrOrder- CsoundExpr.Translator.Types- CsoundExpr.Translator.AssignmentElimination- CsoundExpr.Translator.MultiOutsFolding--+ Csound.Exp + Csound.Exp.Wrapper+ Csound.Exp.Cons+ Csound.Exp.Logic+ Csound.Exp.Numeric + + Csound.Tfm.RateGraph+ Csound.Tfm.TfmTree+ + Csound.Render+ Csound.Render.Pretty+ Csound.Render.Options+ Csound.Render.Instr+ Csound.Render.Sco
− examples/Orchestra.hs
@@ -1,92 +0,0 @@--- | csound instruments-module Orchestra-where--import CsoundExpr.Base-import qualified CsoundExpr.Opcodes as C--import Temporal.Music.Western.P12 hiding (Amp)---type ScoreN = Score (Note ())-type ScoreD = Score (Drum ())--type CsdNote = (Amp, Cps)--type Amp = Irate-type Cps = Irate---- | converts note representation to csound values-absCsdNote :: Note a -> CsdNote-absCsdNote x = (double amp, double cps)- where (amp, cps) = absNote x--absNote :: Note a -> (Double, Double)-absNote x = (amp x, hz x)---- | converts note representation to csound values-absCsdDrum :: Drum a -> Amp-absCsdDrum = double . amp--ftsin = gen10 8192 [1]---- csound instruments--bassDrum :: (Irate, Irate) -> SignalOut-bassDrum (amp, pch) = C.out $ C.oscilA [] env cps ftsin- where env = amp ^* C.exponA 1 0.2 0.001- cps = C.exponK pch 0.2 20--openHiHat :: Irate -> SignalOut-openHiHat amp = C.out $ C.buthp [] sig (num 7000)- where sig = fst $ se1 $ C.noise env (num 0)- env = amp ^* C.exponA 1 1.5 0.001 --pluckInstr :: (Irate, Irate) -> SignalOut -pluckInstr (amp, pch) = outList [- C.out $ env <*> C.wgpluck2 0.75 amp pch (num 0.75) (num 0.5), - C.xtratim 1]- where env = C.linsegrK [0, idur * 0.05, 1, idur * 0.9, 1] 1 0 ---pipeOrgan :: CsdNote -> SignalOut-pipeOrgan (amp, cps) = C.out sig- where ft = ftsin- outch1 = num 1- outch2 = num 2- atk = num 10- op1f = cps- op2f = 2.01 * cps- op3f = 3.99 * cps- op4f = 8 * cps- op5f = 0.5 * cps- op7f = 16 * cps- dclick = C.linsegK [0, 0.001, amp, idur-0.002, amp, 0.001, 0]- amp1 = C.linsegK [0, 0.01, 1, idur-0.02, 1, 0.01, 0]- amp2 = C.linsegK [0, 0.05, 1, 0.1, 0.7, idur-0.16, 0.7, 0.01, 0]- amp3 = C.linsegK [0, 0.03, 0.8, 0.05, 0, 0.01, 0]- amp4 = C.linsegK [0, 0.1, 0.3, 0.1, 0.05, idur-0.3, 0.1, 0.1, 0]- op8 = C.oscilA [] amp4 op5f ft- p1 = op8 + 1- op1 = C.oscilA [] amp1 (op1f ^* p1) ft- op2 = C.oscilA [] amp2 (op2f ^* p1) ft- op3 = C.oscilA [] amp2 (op3f) ft- op4 = C.oscilA [] amp2 (op4f) ft- op5 = C.oscilA [] amp3 (op5f * 5) ft- op7 = C.oscilA [] amp2 (op7f) ft- sig = (dclick <*>) $ op1 + op2 + op3 + op3 + op4 + op5 + op7---- instruments on notes-----bassDrum', pipeOrgan', guitar :: ScoreN -> Score SignalOut -openHiHat' :: ScoreD -> Score SignalOut--bassDrum' = fmap (bassDrum . absCsdNote) . setDiap (1e3, 1.5 * 1e4)-openHiHat' = fmap (openHiHat . absCsdDrum) . setDiap (1e3, 1.0 * 1e4)--pipeOrgan' = fmap (pipeOrgan . absCsdNote) . setDiap (1e2, 5*1e3)-guitar = fmap (pluckInstr . absCsdNote). setDiap (1000, 1.5*1e4) - . lower 1--
− examples/Readme.hs
@@ -1,31 +0,0 @@--- Examples------ In this folder you can find some examples for 'temporal-music-notation'--- package. It can produce no sound but can combine events in--- functional way. Package 'csound-expression' is responsible for --- sound output. 'csound-expression' allows to construct csounds '.csd' --- files from haskell. See Orchestra.hs to see how it can be done.------ warning : external libraries are used--- 'temporal-music-notation', 'temporal-music-notation-western',--- and 'csound-expression'------ If you have installed only 'temporal-music-notation', --- to run examples make first: ------ cabal update--- cabal install temporal-music-notation-western--- cabal install csound-expression------ Sound is produced with csound language. --- 'temporal-music-notation' combines --- notes tigether. Output of the example is out.csd--- file, which is for csound. ------ If you are not familliar with csound. Csound is--- language for musical composition and sound synthesis.--- It can be downloaded here <http://csounds.com>.--- Run csound on out.csd to hear result finally.------ >csound out.csd-
− examples/arpeggi.hs
@@ -1,79 +0,0 @@--- radiohead - weird fishes (intro)--import CsoundExpr.Base(csd, play, headerMono)--import Temporal.Music.Western.P12 --import Orchestra(guitar, ScoreN)---- accent every fourth beat-beat = cycle [accent 0.5, id, id, id]---- chords--guitarChord1, guitarChord2, guitarChord3 :: [ScoreN] -> ScoreN---- guitar 1--guitarChord1 = line . zipWith ($) beat . map en . concat . replicate 10--wholeTone = 2--ch11 = [high d, g, e]-ch12 = map (step wholeTone) ch11-ch13 = [high a, a, high cs]-ch14 = [high fs, b, g]--chSeq1 = [ch11, ch12, ch13, ch14]---- guitar 2--guitarChord2 = - line . zipWith ($) beat . map en . - concat . replicate 6 . arpeggi . map high- where arpeggi x = x ++ take 2 x---ch21 = [low g, d, e]-ch22 = map (step wholeTone) ch21-ch23 = [cs, e, a]-ch24 = [d, g, e]--chSeq2 = [ch21, ch22, ch23, ch24]---- guitar 3--guitarChord3 = - line . zipWith ($) beat . map en . - concat . replicate 6 . arpeggi . map high- where arpeggi x = take 2 x ++ x--ch31 = [e, g, b]-ch32 = map (step wholeTone) ch31-ch33 = [fs, a, high cs]-ch34 = [high d, g, b]--chSeq3 = [ch31, ch32, ch33, ch34]---- score--scoG1 = mf' $ line $ map guitarChord1 chSeq1-scoG2 = p' $ line $ map guitarChord2 chSeq2-scoG3 = ppp' $ line $ map guitarChord3 chSeq3---scoG2intro = clip (3*30/8) (4*30/8) scoG2--intro = chord [scoG1, scoG3, delay (3*30/8) scoG2intro]-chords = loop 3 $ chord [scoG1, scoG2, scoG3] --sco = bpm (presto 0.4) $ guitar $ intro +:+ chords--file = "out.csd"-flags = "-d"--out = csd flags headerMono sco----main = writeFile file $ show out-main = play "totem" "tmp" "new" out-
− examples/choral.hs
@@ -1,250 +0,0 @@--- J.S. Bach - Choral prelude F-moll 'Ich ruf zu dir Herr Jesu Christ'--import Temporal.Music.Western.P12--import CsoundExpr(headerMono, csd, play) --import Orchestra(pipeOrgan', ScoreN)--pedal = sustainT-trill n a b = loop n $ line [a, b]---- alto dynamics--up :: Double -> [ScoreN] -> ScoreN-up x = envelopeRel [x, x + accDiap] . line . map sn --down :: Double -> [ScoreN] -> ScoreN-down x = envelopeRel [x + accDiap, x] . line . map sn --upDown :: Double -> [ScoreN] -> ScoreN-upDown x = envelopeRel [x, x + accDiap, x] . line . map sn --downUp :: Double -> [ScoreN] -> ScoreN-downUp x = envelopeRel [x, x-accDiap, x] . line . map sn --flat :: Double -> [ScoreN] -> ScoreN-flat x = accent x . line . map sn--accDiap = 0.5------------------------------------------------------- solo---- Part I--solo0 = qn $ high c--solo1 = line [--- 1 bar- qn af, qn bf, den af, sn g, den f, sn g,--- 2 bar- envelopeRel [0, 0.2, 0] $ line [line $ map sn [af, bf, af, bf],- trill 3 (accent 0.2 $ tn $ high c) (tn bf), tn af, tn bf], - high $ line [accent 0.2 $ qn $ c, den c, sn df, --- 3 bar- qn ef, tn df, stretch (1/4 - 3/32) $ wn c, - sn $ low bf, qn $ low af, en $ low bf, en c] - ]--solo11 = high $ line [- stretch (1/4 + 1/16) $ wn df, - line $ map tn [ef, f, ef, df], sn c, qn c, qn c]---solo12 = high $ line [- qn df, sn df,- line $ map tn [ef, f, ef, df],sn c, qn c, qn ef]-- -soloI = line [solo0, reprise solo1 solo11 solo12]----- Part II--solo21 = high $ line [--- 1 bar- qn f, en ef, tn df, tn c, sn df,- low $ line $ map en [high c, bf, af, bf],--- 2 bar- qn c, qn c, qn $ low bf, qn $ low af,--- 3 bar- low $ line [hn g, hn f, --- 4 bar - qn af, qn g, hn f]- ]--solo22 = line [--- 5 bar- dhn ef, qn ef,--- 6 bar- qn af, qn af, qn bf, qn bf,--- 7 bar - high $ line [dhn c, qn df],--- 8 bar- high $ qn c, qn bf, qn af, den f, sn g,--- 9 bar- qn af, qn g, qn f- ]--soloII = solo21 +:+ solo22--solo = pedal (1/128) $ pp' $ soloI +:+ soloII-------------------------------------------------------- alto---- Part I--alto0 = high $ up 0 [low af, c, f, e] --alto1 = line [--- 1 bar- high $ down 0.5 [f, c, low af, low f], - upDown 0 [g, bf, high df, high c],- upDown 0 [f, af, high c, bf],- downUp 0 [af, f, af, high c],---- 2 bar- high $ downUp 0.2 [f, e, f, af],- high $ down 0 [g, f, e, f],- high $ downUp 0 [e, c, low g, low bf, low af, c, f, af],---- 3 bar- high $ flat 0 [g, ef, af, g],- high $ up 0 [af, ef, f, gf, f, df, f, af, g, df, c, gf]- ] --alto11 = high $ line [- upDown 0 [f, low bf, df, f, bf, af, g, af, g, c, e, low bf],- upDown 0 [low f, c, f, e]- ]--alto12 = high $ line [- upDown 0 [f, low bf, df, f, bf, af, g, af],- down 0 [g, low bf, low af, f, low g, df, low af, c]- ]-- -altoI = line [alto0, reprise alto1 alto11 alto12]---- Part II--alto21 = high $ line [--- 1 bar- upDown 0 [- low af, c, low bf, df, low bf, df, af, g, - af, ef, df, g, c, f, af, g],--- 2 bar- down (-accDiap) [- af, ef, low af, gf, f, low af, low g, df, - c, low af, c, ef, g, c, low bf, g,--- 3 bar - df, f, g, f],- up (-accDiap) [- e, low bf, df, c,- low af, c, f, e, f, c, low af, low f],--- 4 bar- flat 0 [- low bf, f, g, f, low bf, ef, f, ef,- c, ef, f, ef, d, low g, low b, d- ]- ]--alto22 = high $ line [--- 5 bar- down (-accDiap) $ [- low g, c, ef, df, low g, low bf, df, c] ++- map low [ef, af, high c, bf, high df, bf, c, high df,--- 6 bar- f, af, high df, high c, f, af, high c, bf, - f, af, bf, af, g, bf, high df, high c],---- 7 bar- up (-accDiap) [- low af, c, ef, af, ef, bf, high c, bf,- a, ef, gf, low a, low bf, g, low af, f- ],---- 8 bar- down (-accDiap) [- low af, ef, d, ef, low f, df, ef, df, - low ef, c, df, c, low bf, f, g, f,--- 9 bar- d, f, g, f, e, df, low bf, low g, - low a, c]-- ]--alto23 = en $ high f--altoII = line [alto21, alto22, alto23]--alto = pedal (1/132) $ lower 3 $ p' $ line [altoI, altoII]---------------------------------------------------------------- bass ---- Part I--bass0 = lower 1 $ line [en f, en f]--bass1 = (line $ map en [--- 1 bar- f, f, f, e, f, f, f, ef,--- 2 bar- df, df, df, df, c, c, f, f]) +:+--- 3 bar- (high $ line $ map en [c, c, c, c, c, c, low bf, low a])--bass11 = line $ map en [bf, af, g, f, e, c, low f, low f]--bass12 = line $ map en [bf, af, g, f, e, f, c, c]--bassI = line [bass0, reprise bass1 bass11 bass12]----- Part II--bass21 = line $ map en [--- 1 bar- df, df, ef, ef, af, ef, f, df,--- 2 bar- low f, low f, f, f, d, e, f, df,--- 3 bar- low bf, low g, c, c, df, df, df , df,--- 4 bar- d, d, d, d, low a, low a, low b, low b- ] - -bass22 = low $ line $ map en [--- 5 bar- high c, high c, bf, bf, af, af, g, g,--- 6 bar- f, f, ef, ef, d, d, ef, ef, --- 7 bar- af, af, gf, gf, f, f, bf, bf,--- 8 bar- bf, af, af, g, g, f, high df, high df,--- 9 bar- b, b, high c, high c- ]--bass23 = qn $ low f-- -bassII = line [bass21, bass22, bass23]--bass = lower 3 $ line [bassI, bassII]--sco = delay (-4) $ bpm (lento $ -0.5) $ pipeOrgan' $ chord [solo, alto, bass]--file = "out.csd"-flags = "-d"--out = csd flags headerMono sco----main = writeFile file $ show out-main = play "totem" "tmp" "new" out-
− examples/dm.hs
@@ -1,28 +0,0 @@--- D minor chord--import CsoundExpr.Base-import qualified CsoundExpr.Opcodes as C--import Temporal.Music.Western.P12 ---- | sinusoidal oscilator-instr :: Irate -> SignalOut-instr cps = C.out $ C.oscilA [] (num 3000) cps (gen10 4096 [1])---- | pythagorean scale from middle C-scale = pyth c1---- | d minor chord-sco = fmap (instr . double . hz) $ setScale scale $- line notes +:+ (stretch 2 $ chord notes)- where notes = [d, f, a, high d]--file = "out.csd"-flags = "-d"--out = csd flags headerMono sco--main = writeFile file $ show out---main = play "totem" "tmp" "new" out--
− examples/teardrop.hs
@@ -1,40 +0,0 @@--- massive attack - teardrop (intro)--import CsoundExpr.Base-import qualified CsoundExpr.Opcodes as C--import Temporal.Music.Western.P12 --import Orchestra(pipeOrgan', openHiHat', bassDrum', guitar)--scoBassDrum = low $ line [en c, qn c, en c, accent 0.5 $ hn f]-scoHiHat = line [hnr, dim 3 $ loop 4 $ ed 0]--scoDrums = loop 20 $ chord [- bassDrum' $ f' scoBassDrum,- openHiHat' $ p' scoHiHat ]---scoGuitar = sustain (1/16) $ guitar $ - envelopeRel [0, 2, 4, 4, 2] $- loop 4 $ - pp' $ high $ line [qnr, line $ map qn - [low a, e, low a, d, low a, d, e]] --scoOrgan = pipeOrgan' $ chord [q, low q]- where q = loop 2 $ lower 3 $ line $ map bn [a, g, d, low a]--sco = bpm (moderato 0.7) $ chord [- delay 10 $ scoGuitar,- scoDrums,- delay 2 $ scoOrgan,- rest 0]--file = "out.csd"-flags = "-d"--out = csd flags headerMono sco----main = writeFile file $ show out-main = play "totem" "tmp" "new" out-
− examples/tmp/new.csd
@@ -1,1395 +0,0 @@-<CsoundSynthesizer>-<CsOptions>--d-</CsOptions>-<CsInstruments>-; --------------------------------; Header-sr = 44100.0-kr = 4410.0-ksmps = 10.0-nchnls = 1.0---; --------------------------------; Instruments- - instr 33-a4 wgpluck2 0.75, p4, p5, 0.75, 0.5-k12 linsegr 0.0, (p3*5.0e-2), 1.0, (p3*0.9), 1.0, 1.0, 0.0- out (k12*a4)- xtratim 1.0- endin - ---</CsInstruments>-<CsScore>-; --------------------------------; Ftables-f 0 79.64601769911503---; --------------------------------; Tempo----; --------------------------------; Notes-i 33 0.0 0.165929203539823 5813.789703166071 293.665255850988-i 33 0.0 0.165929203539823 1501.114046580957 329.6281045997961-i 33 0.165929203539823 0.165929203539823 5077.556391987408 195.99804364746933-i 33 0.165929203539823 0.165929203539823 1311.01942303975 391.99608729493866-i 33 0.331858407079646 0.165929203539823 5077.556391987408 164.81405229989804-i 33 0.331858407079646 0.165929203539823 1311.01942303975 329.6281045997961-i 33 0.49778761061946897 0.165929203539823 5077.556391987408 293.665255850988-i 33 0.49778761061946897 0.165929203539823 1311.01942303975 391.99608729493866-i 33 0.663716814159292 0.165929203539823 5813.789703166071 195.99804364746933-i 33 0.663716814159292 0.165929203539823 1501.114046580957 493.8841218593214-i 33 0.829646017699115 0.165929203539823 5077.556391987408 164.81405229989804-i 33 0.829646017699115 0.165929203539823 1311.01942303975 329.6281045997961-i 33 0.9955752212389379 0.165929203539823 5077.556391987408 293.665255850988-i 33 0.9955752212389379 0.165929203539823 1311.01942303975 391.99608729493866-i 33 1.161504424778761 0.165929203539823 5077.556391987408 195.99804364746933-i 33 1.161504424778761 0.165929203539823 1311.01942303975 329.6281045997961-i 33 1.327433628318584 0.165929203539823 5813.789703166071 164.81405229989804-i 33 1.327433628318584 0.165929203539823 1501.114046580957 391.99608729493866-i 33 1.493362831858407 0.165929203539823 5077.556391987408 293.665255850988-i 33 1.493362831858407 0.165929203539823 1311.01942303975 493.8841218593214-i 33 1.65929203539823 0.165929203539823 5077.556391987408 195.99804364746933-i 33 1.65929203539823 0.165929203539823 1311.01942303975 329.6281045997961-i 33 1.8252212389380529 0.165929203539823 5077.556391987408 164.81405229989804-i 33 1.8252212389380529 0.165929203539823 1311.01942303975 391.99608729493866-i 33 1.9911504424778759 0.165929203539823 5813.789703166071 293.665255850988-i 33 1.9911504424778759 0.165929203539823 1501.114046580957 329.6281045997961-i 33 2.157079646017699 0.165929203539823 5077.556391987408 195.99804364746933-i 33 2.157079646017699 0.165929203539823 1311.01942303975 391.99608729493866-i 33 2.323008849557522 0.165929203539823 5077.556391987408 164.81405229989804-i 33 2.323008849557522 0.165929203539823 1311.01942303975 493.8841218593214-i 33 2.488938053097345 0.165929203539823 5077.556391987408 293.665255850988-i 33 2.488938053097345 0.165929203539823 1311.01942303975 329.6281045997961-i 33 2.654867256637168 0.165929203539823 5813.789703166071 195.99804364746933-i 33 2.654867256637168 0.165929203539823 1501.114046580957 391.99608729493866-i 33 2.820796460176991 0.165929203539823 5077.556391987408 164.81405229989804-i 33 2.820796460176991 0.165929203539823 1311.01942303975 329.6281045997961-i 33 2.986725663716814 0.165929203539823 5077.556391987408 293.665255850988-i 33 2.986725663716814 0.165929203539823 1311.01942303975 391.99608729493866-i 33 3.152654867256637 0.165929203539823 5077.556391987408 195.99804364746933-i 33 3.152654867256637 0.165929203539823 1311.01942303975 493.8841218593214-i 33 3.31858407079646 0.165929203539823 5813.789703166071 164.81405229989804-i 33 3.31858407079646 0.165929203539823 1501.114046580957 329.6281045997961-i 33 3.4845132743362828 0.165929203539823 5077.556391987408 293.665255850988-i 33 3.4845132743362828 0.165929203539823 1311.01942303975 391.99608729493866-i 33 3.6504424778761058 0.165929203539823 5077.556391987408 195.99804364746933-i 33 3.6504424778761058 0.165929203539823 1311.01942303975 329.6281045997961-i 33 3.8163716814159288 0.165929203539823 5077.556391987408 164.81405229989804-i 33 3.8163716814159288 0.165929203539823 1311.01942303975 391.99608729493866-i 33 3.9823008849557517 0.165929203539823 5813.789703166071 293.665255850988-i 33 3.9823008849557517 0.165929203539823 1501.114046580957 493.8841218593214-i 33 4.148230088495575 0.165929203539823 5077.556391987408 195.99804364746933-i 33 4.148230088495575 0.165929203539823 1311.01942303975 329.6281045997961-i 33 4.314159292035399 0.165929203539823 5077.556391987408 164.81405229989804-i 33 4.314159292035399 0.165929203539823 1311.01942303975 391.99608729493866-i 33 4.480088495575222 0.165929203539823 5077.556391987408 293.665255850988-i 33 4.480088495575222 0.165929203539823 1311.01942303975 329.6281045997961-i 33 4.6460176991150455 0.165929203539823 5813.789703166071 195.99804364746933-i 33 4.6460176991150455 0.165929203539823 1501.114046580957 391.99608729493866-i 33 4.811946902654869 0.165929203539823 5077.556391987408 164.81405229989804-i 33 4.811946902654869 0.165929203539823 1311.01942303975 493.8841218593214-i 33 4.97787610619469 0.165929203539823 5813.789703166071 329.6281045997961-i 33 4.97787610619469 0.165929203539823 1501.114046580957 369.9950374694234-i 33 5.143805309734512 0.165929203539823 5077.556391987408 220.00036553716828-i 33 5.143805309734512 0.165929203539823 1311.01942303975 440.00073107433656-i 33 5.309734513274336 0.165929203539823 5077.556391987408 184.9975187347117-i 33 5.309734513274336 0.165929203539823 1311.01942303975 369.9950374694234-i 33 5.475663716814159 0.165929203539823 5077.556391987408 329.6281045997961-i 33 5.475663716814159 0.165929203539823 1311.01942303975 440.00073107433656-i 33 5.6415929203539825 0.165929203539823 5813.789703166071 220.00036553716828-i 33 5.6415929203539825 0.165929203539823 1501.114046580957 554.36618304969-i 33 5.807522123893806 0.165929203539823 5077.556391987408 184.9975187347117-i 33 5.807522123893806 0.165929203539823 1311.01942303975 369.9950374694234-i 33 5.973451327433629 0.165929203539823 5077.556391987408 329.6281045997961-i 33 5.973451327433629 0.165929203539823 1311.01942303975 440.00073107433656-i 33 6.139380530973453 0.165929203539823 5077.556391987408 220.00036553716828-i 33 6.139380530973453 0.165929203539823 1311.01942303975 369.9950374694234-i 33 6.305309734513276 0.165929203539823 5813.789703166071 184.9975187347117-i 33 6.305309734513276 0.165929203539823 1501.114046580957 440.00073107433656-i 33 6.4712389380531 0.165929203539823 5077.556391987408 329.6281045997961-i 33 6.4712389380531 0.165929203539823 1311.01942303975 554.36618304969-i 33 6.637168141592923 0.165929203539823 5077.556391987408 220.00036553716828-i 33 6.637168141592923 0.165929203539823 1311.01942303975 369.9950374694234-i 33 6.8030973451327466 0.165929203539823 5077.556391987408 184.9975187347117-i 33 6.8030973451327466 0.165929203539823 1311.01942303975 440.00073107433656-i 33 6.96902654867257 0.165929203539823 5813.789703166071 329.6281045997961-i 33 6.96902654867257 0.165929203539823 1501.114046580957 369.9950374694234-i 33 7.134955752212393 0.165929203539823 5077.556391987408 220.00036553716828-i 33 7.134955752212393 0.165929203539823 1311.01942303975 440.00073107433656-i 33 7.300884955752217 0.165929203539823 5077.556391987408 184.9975187347117-i 33 7.300884955752217 0.165929203539823 1311.01942303975 554.36618304969-i 33 7.46681415929204 0.165929203539823 5077.556391987408 329.6281045997961-i 33 7.46681415929204 0.165929203539823 1311.01942303975 369.9950374694234-i 33 7.632743362831864 0.165929203539823 5813.789703166071 220.00036553716828-i 33 7.632743362831864 0.165929203539823 1501.114046580957 440.00073107433656-i 33 7.798672566371687 0.165929203539823 5077.556391987408 184.9975187347117-i 33 7.798672566371687 0.165929203539823 1311.01942303975 369.9950374694234-i 33 7.964601769911511 0.165929203539823 5077.556391987408 329.6281045997961-i 33 7.964601769911511 0.165929203539823 1311.01942303975 440.00073107433656-i 33 8.130530973451334 0.165929203539823 5077.556391987408 220.00036553716828-i 33 8.130530973451334 0.165929203539823 1311.01942303975 554.36618304969-i 33 8.296460176991157 0.165929203539823 5813.789703166071 184.9975187347117-i 33 8.296460176991157 0.165929203539823 1501.114046580957 369.9950374694234-i 33 8.46238938053098 0.165929203539823 5077.556391987408 329.6281045997961-i 33 8.46238938053098 0.165929203539823 1311.01942303975 440.00073107433656-i 33 8.628318584070804 0.165929203539823 5077.556391987408 220.00036553716828-i 33 8.628318584070804 0.165929203539823 1311.01942303975 369.9950374694234-i 33 8.794247787610628 0.165929203539823 5077.556391987408 184.9975187347117-i 33 8.794247787610628 0.165929203539823 1311.01942303975 440.00073107433656-i 33 8.960176991150451 0.165929203539823 5813.789703166071 329.6281045997961-i 33 8.960176991150451 0.165929203539823 1501.114046580957 554.36618304969-i 33 9.126106194690275 0.165929203539823 5077.556391987408 220.00036553716828-i 33 9.126106194690275 0.165929203539823 1311.01942303975 369.9950374694234-i 33 9.292035398230098 0.165929203539823 5077.556391987408 184.9975187347117-i 33 9.292035398230098 0.165929203539823 1311.01942303975 440.00073107433656-i 33 9.457964601769921 0.165929203539823 5077.556391987408 329.6281045997961-i 33 9.457964601769921 0.165929203539823 1311.01942303975 369.9950374694234-i 33 9.623893805309745 0.165929203539823 5813.789703166071 220.00036553716828-i 33 9.623893805309745 0.165929203539823 1501.114046580957 440.00073107433656-i 33 9.789823008849568 0.165929203539823 5077.556391987408 184.9975187347117-i 33 9.789823008849568 0.165929203539823 1311.01942303975 554.36618304969-i 33 9.95575221238938 0.165929203539823 5813.789703166071 440.00073107433656-i 33 9.95575221238938 0.165929203539823 1501.114046580957 369.9950374694234-i 33 10.121681415929203 0.165929203539823 5077.556391987408 220.00036553716828-i 33 10.121681415929203 0.165929203539823 1311.01942303975 440.00073107433656-i 33 10.287610619469026 0.165929203539823 5077.556391987408 277.183091524845-i 33 10.287610619469026 0.165929203539823 1311.01942303975 369.9950374694234-i 33 10.45353982300885 0.165929203539823 5077.556391987408 440.00073107433656-i 33 10.45353982300885 0.165929203539823 1311.01942303975 440.00073107433656-i 33 10.619469026548673 0.165929203539823 5813.789703166071 220.00036553716828-i 33 10.619469026548673 0.165929203539823 1501.114046580957 554.36618304969-i 33 10.785398230088497 0.165929203539823 5077.556391987408 277.183091524845-i 33 10.785398230088497 0.165929203539823 1311.01942303975 369.9950374694234-i 33 10.95132743362832 0.165929203539823 5077.556391987408 440.00073107433656-i 33 10.95132743362832 0.165929203539823 1311.01942303975 440.00073107433656-i 33 11.117256637168143 0.165929203539823 5077.556391987408 220.00036553716828-i 33 11.117256637168143 0.165929203539823 1311.01942303975 369.9950374694234-i 33 11.283185840707967 0.165929203539823 5813.789703166071 277.183091524845-i 33 11.283185840707967 0.165929203539823 1501.114046580957 440.00073107433656-i 33 11.44911504424779 0.165929203539823 5077.556391987408 440.00073107433656-i 33 11.44911504424779 0.165929203539823 1311.01942303975 554.36618304969-i 33 11.615044247787614 0.165929203539823 5077.556391987408 220.00036553716828-i 33 11.615044247787614 0.165929203539823 1311.01942303975 369.9950374694234-i 33 11.780973451327437 0.165929203539823 5077.556391987408 277.183091524845-i 33 11.780973451327437 0.165929203539823 1311.01942303975 440.00073107433656-i 33 11.94690265486726 0.165929203539823 5813.789703166071 440.00073107433656-i 33 11.94690265486726 0.165929203539823 1501.114046580957 369.9950374694234-i 33 12.112831858407084 0.165929203539823 5077.556391987408 220.00036553716828-i 33 12.112831858407084 0.165929203539823 1311.01942303975 440.00073107433656-i 33 12.278761061946907 0.165929203539823 5077.556391987408 277.183091524845-i 33 12.278761061946907 0.165929203539823 1311.01942303975 554.36618304969-i 33 12.44469026548673 0.165929203539823 5077.556391987408 440.00073107433656-i 33 12.44469026548673 0.165929203539823 1311.01942303975 369.9950374694234-i 33 12.610619469026554 0.165929203539823 5813.789703166071 220.00036553716828-i 33 12.610619469026554 0.165929203539823 1501.114046580957 440.00073107433656-i 33 12.776548672566378 0.165929203539823 5077.556391987408 277.183091524845-i 33 12.776548672566378 0.165929203539823 1311.01942303975 369.9950374694234-i 33 12.942477876106201 0.165929203539823 5077.556391987408 440.00073107433656-i 33 12.942477876106201 0.165929203539823 1311.01942303975 440.00073107433656-i 33 13.108407079646025 0.165929203539823 5077.556391987408 220.00036553716828-i 33 13.108407079646025 0.165929203539823 1311.01942303975 554.36618304969-i 33 13.274336283185848 0.165929203539823 5813.789703166071 277.183091524845-i 33 13.274336283185848 0.165929203539823 1501.114046580957 369.9950374694234-i 33 13.440265486725671 0.165929203539823 5077.556391987408 440.00073107433656-i 33 13.440265486725671 0.165929203539823 1311.01942303975 440.00073107433656-i 33 13.606194690265495 0.165929203539823 5077.556391987408 220.00036553716828-i 33 13.606194690265495 0.165929203539823 1311.01942303975 369.9950374694234-i 33 13.772123893805318 0.165929203539823 5077.556391987408 277.183091524845-i 33 13.772123893805318 0.165929203539823 1311.01942303975 440.00073107433656-i 33 13.938053097345142 0.165929203539823 5813.789703166071 440.00073107433656-i 33 13.938053097345142 0.165929203539823 1501.114046580957 554.36618304969-i 33 14.103982300884965 0.165929203539823 5077.556391987408 220.00036553716828-i 33 14.103982300884965 0.165929203539823 1311.01942303975 369.9950374694234-i 33 14.269911504424789 0.165929203539823 5077.556391987408 277.183091524845-i 33 14.269911504424789 0.165929203539823 1311.01942303975 440.00073107433656-i 33 14.435840707964612 0.165929203539823 5077.556391987408 440.00073107433656-i 33 14.435840707964612 0.165929203539823 1311.01942303975 369.9950374694234-i 33 14.601769911504435 0.165929203539823 5813.789703166071 220.00036553716828-i 33 14.601769911504435 0.165929203539823 1501.114046580957 440.00073107433656-i 33 14.767699115044259 0.165929203539823 5077.556391987408 277.183091524845-i 33 14.767699115044259 0.165929203539823 1311.01942303975 554.36618304969-i 33 14.93362831858407 0.165929203539823 5813.789703166071 369.9950374694234-i 33 14.93362831858407 0.165929203539823 1501.114046580957 587.330511701976-i 33 14.93362831858407 0.165929203539823 2580.0726833705917 293.665255850988-i 33 15.099557522123892 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 15.099557522123893 0.165929203539823 5077.556391987408 246.9420609296607-i 33 15.099557522123893 0.165929203539823 1311.01942303975 391.99608729493866-i 33 15.265486725663715 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 15.265486725663717 0.165929203539823 5077.556391987408 195.99804364746933-i 33 15.265486725663717 0.165929203539823 1311.01942303975 587.330511701976-i 33 15.431415929203538 0.165929203539823 2253.3433808426553 293.665255850988-i 33 15.43141592920354 0.165929203539823 5077.556391987408 369.9950374694234-i 33 15.43141592920354 0.165929203539823 1311.01942303975 391.99608729493866-i 33 15.59734513274336 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 15.597345132743364 0.165929203539823 5813.789703166071 246.9420609296607-i 33 15.597345132743364 0.165929203539823 1501.114046580957 493.8841218593214-i 33 15.763274336283184 0.165929203539823 2253.3433808426553 293.665255850988-i 33 15.763274336283187 0.165929203539823 5077.556391987408 195.99804364746933-i 33 15.763274336283187 0.165929203539823 1311.01942303975 587.330511701976-i 33 15.929203539823007 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 15.92920353982301 0.165929203539823 5077.556391987408 369.9950374694234-i 33 15.92920353982301 0.165929203539823 1311.01942303975 391.99608729493866-i 33 16.09513274336283 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 16.095132743362832 0.165929203539823 5077.556391987408 246.9420609296607-i 33 16.095132743362832 0.165929203539823 1311.01942303975 587.330511701976-i 33 16.261061946902654 0.165929203539823 5813.789703166071 195.99804364746933-i 33 16.261061946902654 0.165929203539823 1501.114046580957 391.99608729493866-i 33 16.261061946902654 0.165929203539823 2580.0726833705917 293.665255850988-i 33 16.426991150442475 0.165929203539823 5077.556391987408 369.9950374694234-i 33 16.426991150442475 0.165929203539823 1311.01942303975 493.8841218593214-i 33 16.426991150442475 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 16.592920353982297 0.165929203539823 5077.556391987408 246.9420609296607-i 33 16.592920353982297 0.165929203539823 1311.01942303975 587.330511701976-i 33 16.5929203539823 0.165929203539823 2253.3433808426553 293.665255850988-i 33 16.75884955752212 0.165929203539823 5077.556391987408 195.99804364746933-i 33 16.75884955752212 0.165929203539823 1311.01942303975 391.99608729493866-i 33 16.758849557522122 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 16.92477876106194 0.165929203539823 5813.789703166071 369.9950374694234-i 33 16.92477876106194 0.165929203539823 1501.114046580957 587.330511701976-i 33 16.924778761061944 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 17.090707964601762 0.165929203539823 5077.556391987408 246.9420609296607-i 33 17.090707964601762 0.165929203539823 1311.01942303975 391.99608729493866-i 33 17.09070796460177 0.165929203539823 2253.3433808426553 293.665255850988-i 33 17.256637168141584 0.165929203539823 5077.556391987408 195.99804364746933-i 33 17.256637168141584 0.165929203539823 1311.01942303975 493.8841218593214-i 33 17.25663716814159 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 17.422566371681405 0.165929203539823 5077.556391987408 369.9950374694234-i 33 17.422566371681405 0.165929203539823 1311.01942303975 587.330511701976-i 33 17.422566371681413 0.165929203539823 2253.3433808426553 293.665255850988-i 33 17.588495575221227 0.165929203539823 5813.789703166071 246.9420609296607-i 33 17.588495575221227 0.165929203539823 1501.114046580957 391.99608729493866-i 33 17.588495575221238 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 17.75442477876105 0.165929203539823 5077.556391987408 195.99804364746933-i 33 17.75442477876105 0.165929203539823 1311.01942303975 587.330511701976-i 33 17.75442477876106 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 17.92035398230087 0.165929203539823 5077.556391987408 369.9950374694234-i 33 17.92035398230087 0.165929203539823 1311.01942303975 391.99608729493866-i 33 17.92035398230088 0.165929203539823 2253.3433808426553 293.665255850988-i 33 18.086283185840692 0.165929203539823 5077.556391987408 246.9420609296607-i 33 18.086283185840692 0.165929203539823 1311.01942303975 493.8841218593214-i 33 18.086283185840706 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 18.252212389380514 0.165929203539823 5813.789703166071 195.99804364746933-i 33 18.252212389380514 0.165929203539823 1501.114046580957 587.330511701976-i 33 18.252212389380528 0.165929203539823 2580.0726833705917 293.665255850988-i 33 18.418141592920335 0.165929203539823 5077.556391987408 369.9950374694234-i 33 18.418141592920335 0.165929203539823 1311.01942303975 391.99608729493866-i 33 18.418141592920353 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 18.584070796460157 0.165929203539823 5077.556391987408 246.9420609296607-i 33 18.584070796460157 0.165929203539823 1311.01942303975 587.330511701976-i 33 18.584070796460175 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 18.74999999999998 0.165929203539823 5077.556391987408 195.99804364746933-i 33 18.74999999999998 0.165929203539823 1311.01942303975 391.99608729493866-i 33 18.749999999999996 0.165929203539823 2253.3433808426553 293.665255850988-i 33 18.9159292035398 0.165929203539823 5813.789703166071 369.9950374694234-i 33 18.9159292035398 0.165929203539823 1501.114046580957 493.8841218593214-i 33 18.91592920353982 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 19.081858407079622 0.165929203539823 5077.556391987408 246.9420609296607-i 33 19.081858407079622 0.165929203539823 1311.01942303975 587.330511701976-i 33 19.081858407079643 0.165929203539823 2253.3433808426553 293.665255850988-i 33 19.247787610619444 0.165929203539823 5077.556391987408 195.99804364746933-i 33 19.247787610619444 0.165929203539823 1311.01942303975 391.99608729493866-i 33 19.24778761061947 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 19.413716814159265 0.165929203539823 5077.556391987408 369.9950374694234-i 33 19.413716814159265 0.165929203539823 1311.01942303975 587.330511701976-i 33 19.41371681415929 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 19.579646017699087 0.165929203539823 5813.789703166071 246.9420609296607-i 33 19.579646017699087 0.165929203539823 1501.114046580957 391.99608729493866-i 33 19.579646017699112 0.165929203539823 2580.0726833705917 293.665255850988-i 33 19.74557522123891 0.165929203539823 5077.556391987408 195.99804364746933-i 33 19.74557522123891 0.165929203539823 1311.01942303975 493.8841218593214-i 33 19.745575221238937 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 19.91150442477876 0.165929203539823 5813.789703166071 293.665255850988-i 33 19.91150442477876 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 19.91150442477876 0.165929203539823 1501.114046580957 329.6281045997961-i 33 20.07743362831858 0.165929203539823 5077.556391987408 195.99804364746933-i 33 20.07743362831858 0.165929203539823 2253.3433808426553 293.665255850988-i 33 20.07743362831858 0.165929203539823 1311.01942303975 391.99608729493866-i 33 20.243362831858402 0.165929203539823 5077.556391987408 164.81405229989804-i 33 20.243362831858402 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 20.243362831858402 0.165929203539823 1311.01942303975 329.6281045997961-i 33 20.409292035398224 0.165929203539823 5077.556391987408 293.665255850988-i 33 20.409292035398224 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 20.409292035398224 0.165929203539823 1311.01942303975 391.99608729493866-i 33 20.575221238938045 0.165929203539823 5813.789703166071 195.99804364746933-i 33 20.575221238938045 0.165929203539823 2580.0726833705917 293.665255850988-i 33 20.575221238938045 0.165929203539823 1501.114046580957 493.8841218593214-i 33 20.741150442477867 0.165929203539823 5077.556391987408 164.81405229989804-i 33 20.741150442477867 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 20.741150442477867 0.165929203539823 1311.01942303975 329.6281045997961-i 33 20.90707964601769 0.165929203539823 5077.556391987408 293.665255850988-i 33 20.90707964601769 0.165929203539823 2253.3433808426553 293.665255850988-i 33 20.90707964601769 0.165929203539823 1311.01942303975 391.99608729493866-i 33 21.07300884955751 0.165929203539823 5077.556391987408 195.99804364746933-i 33 21.07300884955751 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 21.07300884955751 0.165929203539823 1311.01942303975 329.6281045997961-i 33 21.238938053097332 0.165929203539823 5813.789703166071 164.81405229989804-i 33 21.238938053097332 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 21.238938053097332 0.165929203539823 1501.114046580957 391.99608729493866-i 33 21.404867256637154 0.165929203539823 5077.556391987408 293.665255850988-i 33 21.404867256637154 0.165929203539823 2253.3433808426553 293.665255850988-i 33 21.404867256637154 0.165929203539823 1311.01942303975 493.8841218593214-i 33 21.570796460176975 0.165929203539823 5077.556391987408 195.99804364746933-i 33 21.570796460176975 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 21.570796460176975 0.165929203539823 1311.01942303975 329.6281045997961-i 33 21.736725663716797 0.165929203539823 5077.556391987408 164.81405229989804-i 33 21.736725663716797 0.165929203539823 2253.3433808426553 293.665255850988-i 33 21.736725663716797 0.165929203539823 1311.01942303975 391.99608729493866-i 33 21.90265486725662 0.165929203539823 5813.789703166071 293.665255850988-i 33 21.90265486725662 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 21.90265486725662 0.165929203539823 1501.114046580957 329.6281045997961-i 33 22.06858407079644 0.165929203539823 5077.556391987408 195.99804364746933-i 33 22.06858407079644 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 22.06858407079644 0.165929203539823 1311.01942303975 391.99608729493866-i 33 22.234513274336262 0.165929203539823 5077.556391987408 164.81405229989804-i 33 22.234513274336262 0.165929203539823 2253.3433808426553 293.665255850988-i 33 22.234513274336262 0.165929203539823 1311.01942303975 493.8841218593214-i 33 22.400442477876084 0.165929203539823 5077.556391987408 293.665255850988-i 33 22.400442477876084 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 22.400442477876084 0.165929203539823 1311.01942303975 329.6281045997961-i 33 22.566371681415905 0.165929203539823 5813.789703166071 195.99804364746933-i 33 22.566371681415905 0.165929203539823 2580.0726833705917 293.665255850988-i 33 22.566371681415905 0.165929203539823 1501.114046580957 391.99608729493866-i 33 22.732300884955727 0.165929203539823 5077.556391987408 164.81405229989804-i 33 22.732300884955727 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 22.732300884955727 0.165929203539823 1311.01942303975 329.6281045997961-i 33 22.89823008849555 0.165929203539823 5077.556391987408 293.665255850988-i 33 22.89823008849555 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 22.89823008849555 0.165929203539823 1311.01942303975 391.99608729493866-i 33 23.06415929203537 0.165929203539823 5077.556391987408 195.99804364746933-i 33 23.06415929203537 0.165929203539823 2253.3433808426553 293.665255850988-i 33 23.06415929203537 0.165929203539823 1311.01942303975 493.8841218593214-i 33 23.230088495575192 0.165929203539823 5813.789703166071 164.81405229989804-i 33 23.230088495575192 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 23.230088495575192 0.165929203539823 1501.114046580957 329.6281045997961-i 33 23.396017699115013 0.165929203539823 5077.556391987408 293.665255850988-i 33 23.396017699115013 0.165929203539823 2253.3433808426553 293.665255850988-i 33 23.396017699115013 0.165929203539823 1311.01942303975 391.99608729493866-i 33 23.561946902654835 0.165929203539823 5077.556391987408 195.99804364746933-i 33 23.561946902654835 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 23.561946902654835 0.165929203539823 1311.01942303975 329.6281045997961-i 33 23.727876106194657 0.165929203539823 5077.556391987408 164.81405229989804-i 33 23.727876106194657 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 23.727876106194657 0.165929203539823 1311.01942303975 391.99608729493866-i 33 23.89380530973448 0.165929203539823 5813.789703166071 293.665255850988-i 33 23.89380530973448 0.165929203539823 2580.0726833705917 293.665255850988-i 33 23.89380530973448 0.165929203539823 1501.114046580957 493.8841218593214-i 33 24.0597345132743 0.165929203539823 5077.556391987408 195.99804364746933-i 33 24.0597345132743 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 24.0597345132743 0.165929203539823 1311.01942303975 329.6281045997961-i 33 24.225663716814122 0.165929203539823 5077.556391987408 164.81405229989804-i 33 24.225663716814122 0.165929203539823 2253.3433808426553 293.665255850988-i 33 24.225663716814122 0.165929203539823 1311.01942303975 391.99608729493866-i 33 24.391592920353943 0.165929203539823 5077.556391987408 293.665255850988-i 33 24.391592920353943 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 24.391592920353943 0.165929203539823 1311.01942303975 329.6281045997961-i 33 24.557522123893765 0.165929203539823 5813.789703166071 195.99804364746933-i 33 24.557522123893765 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 24.557522123893765 0.165929203539823 1501.114046580957 391.99608729493866-i 33 24.723451327433587 0.165929203539823 5077.556391987408 164.81405229989804-i 33 24.723451327433587 0.165929203539823 2253.3433808426553 293.665255850988-i 33 24.723451327433587 0.165929203539823 1311.01942303975 493.8841218593214-i 33 24.889380530973447 0.165929203539823 5813.789703166071 329.6281045997961-i 33 24.889380530973447 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 24.889380530973447 0.165929203539823 1501.114046580957 369.9950374694234-i 33 25.05530973451327 0.165929203539823 5077.556391987408 220.00036553716828-i 33 25.05530973451327 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 25.05530973451327 0.165929203539823 1311.01942303975 440.00073107433656-i 33 25.22123893805309 0.165929203539823 5077.556391987408 184.9975187347117-i 33 25.22123893805309 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 25.22123893805309 0.165929203539823 1311.01942303975 369.9950374694234-i 33 25.387168141592912 0.165929203539823 5077.556391987408 329.6281045997961-i 33 25.387168141592912 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 25.387168141592912 0.165929203539823 1311.01942303975 440.00073107433656-i 33 25.553097345132734 0.165929203539823 5813.789703166071 220.00036553716828-i 33 25.553097345132734 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 25.553097345132734 0.165929203539823 1501.114046580957 554.36618304969-i 33 25.719026548672556 0.165929203539823 5077.556391987408 184.9975187347117-i 33 25.719026548672556 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 25.719026548672556 0.165929203539823 1311.01942303975 369.9950374694234-i 33 25.884955752212377 0.165929203539823 5077.556391987408 329.6281045997961-i 33 25.884955752212377 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 25.884955752212377 0.165929203539823 1311.01942303975 440.00073107433656-i 33 26.0508849557522 0.165929203539823 5077.556391987408 220.00036553716828-i 33 26.0508849557522 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 26.0508849557522 0.165929203539823 1311.01942303975 369.9950374694234-i 33 26.21681415929202 0.165929203539823 5813.789703166071 184.9975187347117-i 33 26.21681415929202 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 26.21681415929202 0.165929203539823 1501.114046580957 440.00073107433656-i 33 26.382743362831842 0.165929203539823 5077.556391987408 329.6281045997961-i 33 26.382743362831842 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 26.382743362831842 0.165929203539823 1311.01942303975 554.36618304969-i 33 26.548672566371664 0.165929203539823 5077.556391987408 220.00036553716828-i 33 26.548672566371664 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 26.548672566371664 0.165929203539823 1311.01942303975 369.9950374694234-i 33 26.714601769911486 0.165929203539823 5077.556391987408 184.9975187347117-i 33 26.714601769911486 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 26.714601769911486 0.165929203539823 1311.01942303975 440.00073107433656-i 33 26.880530973451307 0.165929203539823 5813.789703166071 329.6281045997961-i 33 26.880530973451307 0.165929203539823 2580.0726833705917 369.9950374694234-i 33 26.880530973451307 0.165929203539823 1501.114046580957 369.9950374694234-i 33 27.04646017699113 0.165929203539823 5077.556391987408 220.00036553716828-i 33 27.04646017699113 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 27.04646017699113 0.165929203539823 1311.01942303975 440.00073107433656-i 33 27.21238938053095 0.165929203539823 5077.556391987408 184.9975187347117-i 33 27.21238938053095 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 27.21238938053095 0.165929203539823 1311.01942303975 554.36618304969-i 33 27.378318584070772 0.165929203539823 5077.556391987408 329.6281045997961-i 33 27.378318584070772 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 27.378318584070772 0.165929203539823 1311.01942303975 369.9950374694234-i 33 27.544247787610594 0.165929203539823 5813.789703166071 220.00036553716828-i 33 27.544247787610594 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 27.544247787610594 0.165929203539823 1501.114046580957 440.00073107433656-i 33 27.710176991150416 0.165929203539823 5077.556391987408 184.9975187347117-i 33 27.710176991150416 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 27.710176991150416 0.165929203539823 1311.01942303975 369.9950374694234-i 33 27.876106194690237 0.165929203539823 5077.556391987408 329.6281045997961-i 33 27.876106194690237 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 27.876106194690237 0.165929203539823 1311.01942303975 440.00073107433656-i 33 28.04203539823006 0.165929203539823 5077.556391987408 220.00036553716828-i 33 28.04203539823006 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 28.04203539823006 0.165929203539823 1311.01942303975 554.36618304969-i 33 28.20796460176988 0.165929203539823 5813.789703166071 184.9975187347117-i 33 28.20796460176988 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 28.20796460176988 0.165929203539823 1501.114046580957 369.9950374694234-i 33 28.373893805309702 0.165929203539823 5077.556391987408 329.6281045997961-i 33 28.373893805309702 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 28.373893805309702 0.165929203539823 1311.01942303975 440.00073107433656-i 33 28.539823008849524 0.165929203539823 5077.556391987408 220.00036553716828-i 33 28.539823008849524 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 28.539823008849524 0.165929203539823 1311.01942303975 369.9950374694234-i 33 28.705752212389346 0.165929203539823 5077.556391987408 184.9975187347117-i 33 28.705752212389346 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 28.705752212389346 0.165929203539823 1311.01942303975 440.00073107433656-i 33 28.871681415929167 0.165929203539823 5813.789703166071 329.6281045997961-i 33 28.871681415929167 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 28.871681415929167 0.165929203539823 1501.114046580957 554.36618304969-i 33 29.03761061946899 0.165929203539823 5077.556391987408 220.00036553716828-i 33 29.03761061946899 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 29.03761061946899 0.165929203539823 1311.01942303975 369.9950374694234-i 33 29.20353982300881 0.165929203539823 5077.556391987408 184.9975187347117-i 33 29.20353982300881 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 29.20353982300881 0.165929203539823 1311.01942303975 440.00073107433656-i 33 29.369469026548632 0.165929203539823 5077.556391987408 329.6281045997961-i 33 29.369469026548632 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 29.369469026548632 0.165929203539823 1311.01942303975 369.9950374694234-i 33 29.535398230088454 0.165929203539823 5813.789703166071 220.00036553716828-i 33 29.535398230088454 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 29.535398230088454 0.165929203539823 1501.114046580957 440.00073107433656-i 33 29.701327433628276 0.165929203539823 5077.556391987408 184.9975187347117-i 33 29.701327433628276 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 29.701327433628276 0.165929203539823 1311.01942303975 554.36618304969-i 33 29.867256637168136 0.165929203539823 5813.789703166071 440.00073107433656-i 33 29.867256637168136 0.165929203539823 2580.0726833705917 277.183091524845-i 33 29.867256637168136 0.165929203539823 1501.114046580957 369.9950374694234-i 33 30.033185840707958 0.165929203539823 5077.556391987408 220.00036553716828-i 33 30.033185840707958 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 30.033185840707958 0.165929203539823 1311.01942303975 440.00073107433656-i 33 30.19911504424778 0.165929203539823 5077.556391987408 277.183091524845-i 33 30.19911504424778 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 30.19911504424778 0.165929203539823 1311.01942303975 369.9950374694234-i 33 30.3650442477876 0.165929203539823 5077.556391987408 440.00073107433656-i 33 30.3650442477876 0.165929203539823 2253.3433808426553 277.183091524845-i 33 30.3650442477876 0.165929203539823 1311.01942303975 440.00073107433656-i 33 30.530973451327423 0.165929203539823 5813.789703166071 220.00036553716828-i 33 30.530973451327423 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 30.530973451327423 0.165929203539823 1501.114046580957 554.36618304969-i 33 30.696902654867245 0.165929203539823 5077.556391987408 277.183091524845-i 33 30.696902654867245 0.165929203539823 2253.3433808426553 277.183091524845-i 33 30.696902654867245 0.165929203539823 1311.01942303975 369.9950374694234-i 33 30.862831858407066 0.165929203539823 5077.556391987408 440.00073107433656-i 33 30.862831858407066 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 30.862831858407066 0.165929203539823 1311.01942303975 440.00073107433656-i 33 31.028761061946888 0.165929203539823 5077.556391987408 220.00036553716828-i 33 31.028761061946888 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 31.028761061946888 0.165929203539823 1311.01942303975 369.9950374694234-i 33 31.19469026548671 0.165929203539823 5813.789703166071 277.183091524845-i 33 31.19469026548671 0.165929203539823 2580.0726833705917 277.183091524845-i 33 31.19469026548671 0.165929203539823 1501.114046580957 440.00073107433656-i 33 31.36061946902653 0.165929203539823 5077.556391987408 440.00073107433656-i 33 31.36061946902653 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 31.36061946902653 0.165929203539823 1311.01942303975 554.36618304969-i 33 31.526548672566353 0.165929203539823 5077.556391987408 220.00036553716828-i 33 31.526548672566353 0.165929203539823 2253.3433808426553 277.183091524845-i 33 31.526548672566353 0.165929203539823 1311.01942303975 369.9950374694234-i 33 31.692477876106175 0.165929203539823 5077.556391987408 277.183091524845-i 33 31.692477876106175 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 31.692477876106175 0.165929203539823 1311.01942303975 440.00073107433656-i 33 31.858407079645996 0.165929203539823 5813.789703166071 440.00073107433656-i 33 31.858407079645996 0.165929203539823 2580.0726833705917 440.00073107433656-i 33 31.858407079645996 0.165929203539823 1501.114046580957 369.9950374694234-i 33 32.02433628318582 0.165929203539823 5077.556391987408 220.00036553716828-i 33 32.02433628318582 0.165929203539823 2253.3433808426553 277.183091524845-i 33 32.02433628318582 0.165929203539823 1311.01942303975 440.00073107433656-i 33 32.19026548672564 0.165929203539823 5077.556391987408 277.183091524845-i 33 32.19026548672564 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 32.19026548672564 0.165929203539823 1311.01942303975 554.36618304969-i 33 32.35619469026547 0.165929203539823 5077.556391987408 440.00073107433656-i 33 32.35619469026547 0.165929203539823 2253.3433808426553 277.183091524845-i 33 32.35619469026547 0.165929203539823 1311.01942303975 369.9950374694234-i 33 32.52212389380529 0.165929203539823 5813.789703166071 220.00036553716828-i 33 32.52212389380529 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 32.52212389380529 0.165929203539823 1501.114046580957 440.00073107433656-i 33 32.68805309734512 0.165929203539823 5077.556391987408 277.183091524845-i 33 32.68805309734512 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 32.68805309734512 0.165929203539823 1311.01942303975 369.9950374694234-i 33 32.853982300884944 0.165929203539823 5077.556391987408 440.00073107433656-i 33 32.853982300884944 0.165929203539823 2253.3433808426553 277.183091524845-i 33 32.853982300884944 0.165929203539823 1311.01942303975 440.00073107433656-i 33 33.01991150442477 0.165929203539823 5077.556391987408 220.00036553716828-i 33 33.01991150442477 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 33.01991150442477 0.165929203539823 1311.01942303975 554.36618304969-i 33 33.185840707964594 0.165929203539823 5813.789703166071 277.183091524845-i 33 33.185840707964594 0.165929203539823 2580.0726833705917 277.183091524845-i 33 33.185840707964594 0.165929203539823 1501.114046580957 369.9950374694234-i 33 33.35176991150442 0.165929203539823 5077.556391987408 440.00073107433656-i 33 33.35176991150442 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 33.35176991150442 0.165929203539823 1311.01942303975 440.00073107433656-i 33 33.517699115044245 0.165929203539823 5077.556391987408 220.00036553716828-i 33 33.517699115044245 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 33.517699115044245 0.165929203539823 1311.01942303975 369.9950374694234-i 33 33.68362831858407 0.165929203539823 5077.556391987408 277.183091524845-i 33 33.68362831858407 0.165929203539823 2253.3433808426553 277.183091524845-i 33 33.68362831858407 0.165929203539823 1311.01942303975 440.00073107433656-i 33 33.849557522123895 0.165929203539823 5813.789703166071 440.00073107433656-i 33 33.849557522123895 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 33.849557522123895 0.165929203539823 1501.114046580957 554.36618304969-i 33 34.01548672566372 0.165929203539823 5077.556391987408 220.00036553716828-i 33 34.01548672566372 0.165929203539823 2253.3433808426553 277.183091524845-i 33 34.01548672566372 0.165929203539823 1311.01942303975 369.9950374694234-i 33 34.181415929203546 0.165929203539823 5077.556391987408 277.183091524845-i 33 34.181415929203546 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 34.181415929203546 0.165929203539823 1311.01942303975 440.00073107433656-i 33 34.34734513274337 0.165929203539823 5077.556391987408 440.00073107433656-i 33 34.34734513274337 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 34.34734513274337 0.165929203539823 1311.01942303975 369.9950374694234-i 33 34.513274336283196 0.165929203539823 5813.789703166071 220.00036553716828-i 33 34.513274336283196 0.165929203539823 2580.0726833705917 277.183091524845-i 33 34.513274336283196 0.165929203539823 1501.114046580957 440.00073107433656-i 33 34.67920353982302 0.165929203539823 5077.556391987408 277.183091524845-i 33 34.67920353982302 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 34.67920353982302 0.165929203539823 1311.01942303975 554.36618304969-i 33 34.845132743362825 0.165929203539823 5813.789703166071 369.9950374694234-i 33 34.845132743362825 0.165929203539823 2580.0726833705917 293.665255850988-i 33 34.845132743362825 0.165929203539823 1501.114046580957 587.330511701976-i 33 35.01106194690265 0.165929203539823 5077.556391987408 246.9420609296607-i 33 35.01106194690265 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 35.01106194690265 0.165929203539823 1311.01942303975 391.99608729493866-i 33 35.176991150442475 0.165929203539823 5077.556391987408 195.99804364746933-i 33 35.176991150442475 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 35.176991150442475 0.165929203539823 1311.01942303975 587.330511701976-i 33 35.3429203539823 0.165929203539823 5077.556391987408 369.9950374694234-i 33 35.3429203539823 0.165929203539823 2253.3433808426553 293.665255850988-i 33 35.3429203539823 0.165929203539823 1311.01942303975 391.99608729493866-i 33 35.508849557522126 0.165929203539823 5813.789703166071 246.9420609296607-i 33 35.508849557522126 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 35.508849557522126 0.165929203539823 1501.114046580957 493.8841218593214-i 33 35.67477876106195 0.165929203539823 5077.556391987408 195.99804364746933-i 33 35.67477876106195 0.165929203539823 2253.3433808426553 293.665255850988-i 33 35.67477876106195 0.165929203539823 1311.01942303975 587.330511701976-i 33 35.840707964601776 0.165929203539823 5077.556391987408 369.9950374694234-i 33 35.840707964601776 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 35.840707964601776 0.165929203539823 1311.01942303975 391.99608729493866-i 33 36.0066371681416 0.165929203539823 5077.556391987408 246.9420609296607-i 33 36.0066371681416 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 36.0066371681416 0.165929203539823 1311.01942303975 587.330511701976-i 33 36.17256637168143 0.165929203539823 5813.789703166071 195.99804364746933-i 33 36.17256637168143 0.165929203539823 2580.0726833705917 293.665255850988-i 33 36.17256637168143 0.165929203539823 1501.114046580957 391.99608729493866-i 33 36.33849557522125 0.165929203539823 5077.556391987408 369.9950374694234-i 33 36.33849557522125 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 36.33849557522125 0.165929203539823 1311.01942303975 493.8841218593214-i 33 36.50442477876108 0.165929203539823 5077.556391987408 246.9420609296607-i 33 36.50442477876108 0.165929203539823 2253.3433808426553 293.665255850988-i 33 36.50442477876108 0.165929203539823 1311.01942303975 587.330511701976-i 33 36.6703539823009 0.165929203539823 5077.556391987408 195.99804364746933-i 33 36.6703539823009 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 36.6703539823009 0.165929203539823 1311.01942303975 391.99608729493866-i 33 36.83628318584073 0.165929203539823 5813.789703166071 369.9950374694234-i 33 36.83628318584073 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 36.83628318584073 0.165929203539823 1501.114046580957 587.330511701976-i 33 37.00221238938055 0.165929203539823 5077.556391987408 246.9420609296607-i 33 37.00221238938055 0.165929203539823 2253.3433808426553 293.665255850988-i 33 37.00221238938055 0.165929203539823 1311.01942303975 391.99608729493866-i 33 37.16814159292038 0.165929203539823 5077.556391987408 195.99804364746933-i 33 37.16814159292038 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 37.16814159292038 0.165929203539823 1311.01942303975 493.8841218593214-i 33 37.3340707964602 0.165929203539823 5077.556391987408 369.9950374694234-i 33 37.3340707964602 0.165929203539823 2253.3433808426553 293.665255850988-i 33 37.3340707964602 0.165929203539823 1311.01942303975 587.330511701976-i 33 37.50000000000003 0.165929203539823 5813.789703166071 246.9420609296607-i 33 37.50000000000003 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 37.50000000000003 0.165929203539823 1501.114046580957 391.99608729493866-i 33 37.665929203539854 0.165929203539823 5077.556391987408 195.99804364746933-i 33 37.665929203539854 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 37.665929203539854 0.165929203539823 1311.01942303975 587.330511701976-i 33 37.83185840707968 0.165929203539823 5077.556391987408 369.9950374694234-i 33 37.83185840707968 0.165929203539823 2253.3433808426553 293.665255850988-i 33 37.83185840707968 0.165929203539823 1311.01942303975 391.99608729493866-i 33 37.997787610619504 0.165929203539823 5077.556391987408 246.9420609296607-i 33 37.997787610619504 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 37.997787610619504 0.165929203539823 1311.01942303975 493.8841218593214-i 33 38.16371681415933 0.165929203539823 5813.789703166071 195.99804364746933-i 33 38.16371681415933 0.165929203539823 2580.0726833705917 293.665255850988-i 33 38.16371681415933 0.165929203539823 1501.114046580957 587.330511701976-i 33 38.329646017699154 0.165929203539823 5077.556391987408 369.9950374694234-i 33 38.329646017699154 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 38.329646017699154 0.165929203539823 1311.01942303975 391.99608729493866-i 33 38.49557522123898 0.165929203539823 5077.556391987408 246.9420609296607-i 33 38.49557522123898 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 38.49557522123898 0.165929203539823 1311.01942303975 587.330511701976-i 33 38.661504424778805 0.165929203539823 5077.556391987408 195.99804364746933-i 33 38.661504424778805 0.165929203539823 2253.3433808426553 293.665255850988-i 33 38.661504424778805 0.165929203539823 1311.01942303975 391.99608729493866-i 33 38.82743362831863 0.165929203539823 5813.789703166071 369.9950374694234-i 33 38.82743362831863 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 38.82743362831863 0.165929203539823 1501.114046580957 493.8841218593214-i 33 38.993362831858455 0.165929203539823 5077.556391987408 246.9420609296607-i 33 38.993362831858455 0.165929203539823 2253.3433808426553 293.665255850988-i 33 38.993362831858455 0.165929203539823 1311.01942303975 587.330511701976-i 33 39.15929203539828 0.165929203539823 5077.556391987408 195.99804364746933-i 33 39.15929203539828 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 39.15929203539828 0.165929203539823 1311.01942303975 391.99608729493866-i 33 39.325221238938106 0.165929203539823 5077.556391987408 369.9950374694234-i 33 39.325221238938106 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 39.325221238938106 0.165929203539823 1311.01942303975 587.330511701976-i 33 39.49115044247793 0.165929203539823 5813.789703166071 246.9420609296607-i 33 39.49115044247793 0.165929203539823 2580.0726833705917 293.665255850988-i 33 39.49115044247793 0.165929203539823 1501.114046580957 391.99608729493866-i 33 39.657079646017756 0.165929203539823 5077.556391987408 195.99804364746933-i 33 39.657079646017756 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 39.657079646017756 0.165929203539823 1311.01942303975 493.8841218593214-i 33 39.82300884955752 0.165929203539823 5813.789703166071 293.665255850988-i 33 39.82300884955752 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 39.82300884955752 0.165929203539823 1501.114046580957 329.6281045997961-i 33 39.98893805309734 0.165929203539823 5077.556391987408 195.99804364746933-i 33 39.98893805309734 0.165929203539823 2253.3433808426553 293.665255850988-i 33 39.98893805309734 0.165929203539823 1311.01942303975 391.99608729493866-i 33 40.15486725663717 0.165929203539823 5077.556391987408 164.81405229989804-i 33 40.15486725663717 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 40.15486725663717 0.165929203539823 1311.01942303975 329.6281045997961-i 33 40.32079646017699 0.165929203539823 5077.556391987408 293.665255850988-i 33 40.32079646017699 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 40.32079646017699 0.165929203539823 1311.01942303975 391.99608729493866-i 33 40.48672566371682 0.165929203539823 5813.789703166071 195.99804364746933-i 33 40.48672566371682 0.165929203539823 2580.0726833705917 293.665255850988-i 33 40.48672566371682 0.165929203539823 1501.114046580957 493.8841218593214-i 33 40.65265486725664 0.165929203539823 5077.556391987408 164.81405229989804-i 33 40.65265486725664 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 40.65265486725664 0.165929203539823 1311.01942303975 329.6281045997961-i 33 40.81858407079647 0.165929203539823 5077.556391987408 293.665255850988-i 33 40.81858407079647 0.165929203539823 2253.3433808426553 293.665255850988-i 33 40.81858407079647 0.165929203539823 1311.01942303975 391.99608729493866-i 33 40.984513274336294 0.165929203539823 5077.556391987408 195.99804364746933-i 33 40.984513274336294 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 40.984513274336294 0.165929203539823 1311.01942303975 329.6281045997961-i 33 41.15044247787612 0.165929203539823 5813.789703166071 164.81405229989804-i 33 41.15044247787612 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 41.15044247787612 0.165929203539823 1501.114046580957 391.99608729493866-i 33 41.316371681415944 0.165929203539823 5077.556391987408 293.665255850988-i 33 41.316371681415944 0.165929203539823 2253.3433808426553 293.665255850988-i 33 41.316371681415944 0.165929203539823 1311.01942303975 493.8841218593214-i 33 41.48230088495577 0.165929203539823 5077.556391987408 195.99804364746933-i 33 41.48230088495577 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 41.48230088495577 0.165929203539823 1311.01942303975 329.6281045997961-i 33 41.648230088495595 0.165929203539823 5077.556391987408 164.81405229989804-i 33 41.648230088495595 0.165929203539823 2253.3433808426553 293.665255850988-i 33 41.648230088495595 0.165929203539823 1311.01942303975 391.99608729493866-i 33 41.81415929203542 0.165929203539823 5813.789703166071 293.665255850988-i 33 41.81415929203542 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 41.81415929203542 0.165929203539823 1501.114046580957 329.6281045997961-i 33 41.980088495575245 0.165929203539823 5077.556391987408 195.99804364746933-i 33 41.980088495575245 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 41.980088495575245 0.165929203539823 1311.01942303975 391.99608729493866-i 33 42.14601769911507 0.165929203539823 5077.556391987408 164.81405229989804-i 33 42.14601769911507 0.165929203539823 2253.3433808426553 293.665255850988-i 33 42.14601769911507 0.165929203539823 1311.01942303975 493.8841218593214-i 33 42.311946902654896 0.165929203539823 5077.556391987408 293.665255850988-i 33 42.311946902654896 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 42.311946902654896 0.165929203539823 1311.01942303975 329.6281045997961-i 33 42.47787610619472 0.165929203539823 5813.789703166071 195.99804364746933-i 33 42.47787610619472 0.165929203539823 2580.0726833705917 293.665255850988-i 33 42.47787610619472 0.165929203539823 1501.114046580957 391.99608729493866-i 33 42.643805309734546 0.165929203539823 5077.556391987408 164.81405229989804-i 33 42.643805309734546 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 42.643805309734546 0.165929203539823 1311.01942303975 329.6281045997961-i 33 42.80973451327437 0.165929203539823 5077.556391987408 293.665255850988-i 33 42.80973451327437 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 42.80973451327437 0.165929203539823 1311.01942303975 391.99608729493866-i 33 42.975663716814196 0.165929203539823 5077.556391987408 195.99804364746933-i 33 42.975663716814196 0.165929203539823 2253.3433808426553 293.665255850988-i 33 42.975663716814196 0.165929203539823 1311.01942303975 493.8841218593214-i 33 43.14159292035402 0.165929203539823 5813.789703166071 164.81405229989804-i 33 43.14159292035402 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 43.14159292035402 0.165929203539823 1501.114046580957 329.6281045997961-i 33 43.30752212389385 0.165929203539823 5077.556391987408 293.665255850988-i 33 43.30752212389385 0.165929203539823 2253.3433808426553 293.665255850988-i 33 43.30752212389385 0.165929203539823 1311.01942303975 391.99608729493866-i 33 43.47345132743367 0.165929203539823 5077.556391987408 195.99804364746933-i 33 43.47345132743367 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 43.47345132743367 0.165929203539823 1311.01942303975 329.6281045997961-i 33 43.6393805309735 0.165929203539823 5077.556391987408 164.81405229989804-i 33 43.6393805309735 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 43.6393805309735 0.165929203539823 1311.01942303975 391.99608729493866-i 33 43.80530973451332 0.165929203539823 5813.789703166071 293.665255850988-i 33 43.80530973451332 0.165929203539823 2580.0726833705917 293.665255850988-i 33 43.80530973451332 0.165929203539823 1501.114046580957 493.8841218593214-i 33 43.97123893805315 0.165929203539823 5077.556391987408 195.99804364746933-i 33 43.97123893805315 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 43.97123893805315 0.165929203539823 1311.01942303975 329.6281045997961-i 33 44.13716814159297 0.165929203539823 5077.556391987408 164.81405229989804-i 33 44.13716814159297 0.165929203539823 2253.3433808426553 293.665255850988-i 33 44.13716814159297 0.165929203539823 1311.01942303975 391.99608729493866-i 33 44.3030973451328 0.165929203539823 5077.556391987408 293.665255850988-i 33 44.3030973451328 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 44.3030973451328 0.165929203539823 1311.01942303975 329.6281045997961-i 33 44.46902654867262 0.165929203539823 5813.789703166071 195.99804364746933-i 33 44.46902654867262 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 44.46902654867262 0.165929203539823 1501.114046580957 391.99608729493866-i 33 44.63495575221245 0.165929203539823 5077.556391987408 164.81405229989804-i 33 44.63495575221245 0.165929203539823 2253.3433808426553 293.665255850988-i 33 44.63495575221245 0.165929203539823 1311.01942303975 493.8841218593214-i 33 44.80088495575221 0.165929203539823 5813.789703166071 329.6281045997961-i 33 44.80088495575221 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 44.80088495575221 0.165929203539823 1501.114046580957 369.9950374694234-i 33 44.966814159292035 0.165929203539823 5077.556391987408 220.00036553716828-i 33 44.966814159292035 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 44.966814159292035 0.165929203539823 1311.01942303975 440.00073107433656-i 33 45.13274336283186 0.165929203539823 5077.556391987408 184.9975187347117-i 33 45.13274336283186 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 45.13274336283186 0.165929203539823 1311.01942303975 369.9950374694234-i 33 45.298672566371685 0.165929203539823 5077.556391987408 329.6281045997961-i 33 45.298672566371685 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 45.298672566371685 0.165929203539823 1311.01942303975 440.00073107433656-i 33 45.46460176991151 0.165929203539823 5813.789703166071 220.00036553716828-i 33 45.46460176991151 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 45.46460176991151 0.165929203539823 1501.114046580957 554.36618304969-i 33 45.630530973451336 0.165929203539823 5077.556391987408 184.9975187347117-i 33 45.630530973451336 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 45.630530973451336 0.165929203539823 1311.01942303975 369.9950374694234-i 33 45.79646017699116 0.165929203539823 5077.556391987408 329.6281045997961-i 33 45.79646017699116 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 45.79646017699116 0.165929203539823 1311.01942303975 440.00073107433656-i 33 45.962389380530986 0.165929203539823 5077.556391987408 220.00036553716828-i 33 45.962389380530986 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 45.962389380530986 0.165929203539823 1311.01942303975 369.9950374694234-i 33 46.12831858407081 0.165929203539823 5813.789703166071 184.9975187347117-i 33 46.12831858407081 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 46.12831858407081 0.165929203539823 1501.114046580957 440.00073107433656-i 33 46.29424778761064 0.165929203539823 5077.556391987408 329.6281045997961-i 33 46.29424778761064 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 46.29424778761064 0.165929203539823 1311.01942303975 554.36618304969-i 33 46.46017699115046 0.165929203539823 5077.556391987408 220.00036553716828-i 33 46.46017699115046 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 46.46017699115046 0.165929203539823 1311.01942303975 369.9950374694234-i 33 46.62610619469029 0.165929203539823 5077.556391987408 184.9975187347117-i 33 46.62610619469029 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 46.62610619469029 0.165929203539823 1311.01942303975 440.00073107433656-i 33 46.79203539823011 0.165929203539823 5813.789703166071 329.6281045997961-i 33 46.79203539823011 0.165929203539823 2580.0726833705917 369.9950374694234-i 33 46.79203539823011 0.165929203539823 1501.114046580957 369.9950374694234-i 33 46.95796460176994 0.165929203539823 5077.556391987408 220.00036553716828-i 33 46.95796460176994 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 46.95796460176994 0.165929203539823 1311.01942303975 440.00073107433656-i 33 47.12389380530976 0.165929203539823 5077.556391987408 184.9975187347117-i 33 47.12389380530976 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 47.12389380530976 0.165929203539823 1311.01942303975 554.36618304969-i 33 47.28982300884959 0.165929203539823 5077.556391987408 329.6281045997961-i 33 47.28982300884959 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 47.28982300884959 0.165929203539823 1311.01942303975 369.9950374694234-i 33 47.45575221238941 0.165929203539823 5813.789703166071 220.00036553716828-i 33 47.45575221238941 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 47.45575221238941 0.165929203539823 1501.114046580957 440.00073107433656-i 33 47.62168141592924 0.165929203539823 5077.556391987408 184.9975187347117-i 33 47.62168141592924 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 47.62168141592924 0.165929203539823 1311.01942303975 369.9950374694234-i 33 47.78761061946906 0.165929203539823 5077.556391987408 329.6281045997961-i 33 47.78761061946906 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 47.78761061946906 0.165929203539823 1311.01942303975 440.00073107433656-i 33 47.95353982300889 0.165929203539823 5077.556391987408 220.00036553716828-i 33 47.95353982300889 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 47.95353982300889 0.165929203539823 1311.01942303975 554.36618304969-i 33 48.119469026548714 0.165929203539823 5813.789703166071 184.9975187347117-i 33 48.119469026548714 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 48.119469026548714 0.165929203539823 1501.114046580957 369.9950374694234-i 33 48.28539823008854 0.165929203539823 5077.556391987408 329.6281045997961-i 33 48.28539823008854 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 48.28539823008854 0.165929203539823 1311.01942303975 440.00073107433656-i 33 48.451327433628364 0.165929203539823 5077.556391987408 220.00036553716828-i 33 48.451327433628364 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 48.451327433628364 0.165929203539823 1311.01942303975 369.9950374694234-i 33 48.61725663716819 0.165929203539823 5077.556391987408 184.9975187347117-i 33 48.61725663716819 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 48.61725663716819 0.165929203539823 1311.01942303975 440.00073107433656-i 33 48.783185840708015 0.165929203539823 5813.789703166071 329.6281045997961-i 33 48.783185840708015 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 48.783185840708015 0.165929203539823 1501.114046580957 554.36618304969-i 33 48.94911504424784 0.165929203539823 5077.556391987408 220.00036553716828-i 33 48.94911504424784 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 48.94911504424784 0.165929203539823 1311.01942303975 369.9950374694234-i 33 49.115044247787665 0.165929203539823 5077.556391987408 184.9975187347117-i 33 49.115044247787665 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 49.115044247787665 0.165929203539823 1311.01942303975 440.00073107433656-i 33 49.28097345132749 0.165929203539823 5077.556391987408 329.6281045997961-i 33 49.28097345132749 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 49.28097345132749 0.165929203539823 1311.01942303975 369.9950374694234-i 33 49.446902654867316 0.165929203539823 5813.789703166071 220.00036553716828-i 33 49.446902654867316 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 49.446902654867316 0.165929203539823 1501.114046580957 440.00073107433656-i 33 49.61283185840714 0.165929203539823 5077.556391987408 184.9975187347117-i 33 49.61283185840714 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 49.61283185840714 0.165929203539823 1311.01942303975 554.36618304969-i 33 49.7787610619469 0.165929203539823 5813.789703166071 440.00073107433656-i 33 49.7787610619469 0.165929203539823 2580.0726833705917 277.183091524845-i 33 49.7787610619469 0.165929203539823 1501.114046580957 369.9950374694234-i 33 49.94469026548673 0.165929203539823 5077.556391987408 220.00036553716828-i 33 49.94469026548673 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 49.94469026548673 0.165929203539823 1311.01942303975 440.00073107433656-i 33 50.11061946902655 0.165929203539823 5077.556391987408 277.183091524845-i 33 50.11061946902655 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 50.11061946902655 0.165929203539823 1311.01942303975 369.9950374694234-i 33 50.27654867256638 0.165929203539823 5077.556391987408 440.00073107433656-i 33 50.27654867256638 0.165929203539823 2253.3433808426553 277.183091524845-i 33 50.27654867256638 0.165929203539823 1311.01942303975 440.00073107433656-i 33 50.4424778761062 0.165929203539823 5813.789703166071 220.00036553716828-i 33 50.4424778761062 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 50.4424778761062 0.165929203539823 1501.114046580957 554.36618304969-i 33 50.60840707964603 0.165929203539823 5077.556391987408 277.183091524845-i 33 50.60840707964603 0.165929203539823 2253.3433808426553 277.183091524845-i 33 50.60840707964603 0.165929203539823 1311.01942303975 369.9950374694234-i 33 50.77433628318585 0.165929203539823 5077.556391987408 440.00073107433656-i 33 50.77433628318585 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 50.77433628318585 0.165929203539823 1311.01942303975 440.00073107433656-i 33 50.94026548672568 0.165929203539823 5077.556391987408 220.00036553716828-i 33 50.94026548672568 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 50.94026548672568 0.165929203539823 1311.01942303975 369.9950374694234-i 33 51.106194690265504 0.165929203539823 5813.789703166071 277.183091524845-i 33 51.106194690265504 0.165929203539823 2580.0726833705917 277.183091524845-i 33 51.106194690265504 0.165929203539823 1501.114046580957 440.00073107433656-i 33 51.27212389380533 0.165929203539823 5077.556391987408 440.00073107433656-i 33 51.27212389380533 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 51.27212389380533 0.165929203539823 1311.01942303975 554.36618304969-i 33 51.438053097345154 0.165929203539823 5077.556391987408 220.00036553716828-i 33 51.438053097345154 0.165929203539823 2253.3433808426553 277.183091524845-i 33 51.438053097345154 0.165929203539823 1311.01942303975 369.9950374694234-i 33 51.60398230088498 0.165929203539823 5077.556391987408 277.183091524845-i 33 51.60398230088498 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 51.60398230088498 0.165929203539823 1311.01942303975 440.00073107433656-i 33 51.769911504424805 0.165929203539823 5813.789703166071 440.00073107433656-i 33 51.769911504424805 0.165929203539823 2580.0726833705917 440.00073107433656-i 33 51.769911504424805 0.165929203539823 1501.114046580957 369.9950374694234-i 33 51.93584070796463 0.165929203539823 5077.556391987408 220.00036553716828-i 33 51.93584070796463 0.165929203539823 2253.3433808426553 277.183091524845-i 33 51.93584070796463 0.165929203539823 1311.01942303975 440.00073107433656-i 33 52.101769911504455 0.165929203539823 5077.556391987408 277.183091524845-i 33 52.101769911504455 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 52.101769911504455 0.165929203539823 1311.01942303975 554.36618304969-i 33 52.26769911504428 0.165929203539823 5077.556391987408 440.00073107433656-i 33 52.26769911504428 0.165929203539823 2253.3433808426553 277.183091524845-i 33 52.26769911504428 0.165929203539823 1311.01942303975 369.9950374694234-i 33 52.433628318584105 0.165929203539823 5813.789703166071 220.00036553716828-i 33 52.433628318584105 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 52.433628318584105 0.165929203539823 1501.114046580957 440.00073107433656-i 33 52.59955752212393 0.165929203539823 5077.556391987408 277.183091524845-i 33 52.59955752212393 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 52.59955752212393 0.165929203539823 1311.01942303975 369.9950374694234-i 33 52.765486725663756 0.165929203539823 5077.556391987408 440.00073107433656-i 33 52.765486725663756 0.165929203539823 2253.3433808426553 277.183091524845-i 33 52.765486725663756 0.165929203539823 1311.01942303975 440.00073107433656-i 33 52.93141592920358 0.165929203539823 5077.556391987408 220.00036553716828-i 33 52.93141592920358 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 52.93141592920358 0.165929203539823 1311.01942303975 554.36618304969-i 33 53.097345132743406 0.165929203539823 5813.789703166071 277.183091524845-i 33 53.097345132743406 0.165929203539823 2580.0726833705917 277.183091524845-i 33 53.097345132743406 0.165929203539823 1501.114046580957 369.9950374694234-i 33 53.26327433628323 0.165929203539823 5077.556391987408 440.00073107433656-i 33 53.26327433628323 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 53.26327433628323 0.165929203539823 1311.01942303975 440.00073107433656-i 33 53.42920353982306 0.165929203539823 5077.556391987408 220.00036553716828-i 33 53.42920353982306 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 53.42920353982306 0.165929203539823 1311.01942303975 369.9950374694234-i 33 53.59513274336288 0.165929203539823 5077.556391987408 277.183091524845-i 33 53.59513274336288 0.165929203539823 2253.3433808426553 277.183091524845-i 33 53.59513274336288 0.165929203539823 1311.01942303975 440.00073107433656-i 33 53.76106194690271 0.165929203539823 5813.789703166071 440.00073107433656-i 33 53.76106194690271 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 53.76106194690271 0.165929203539823 1501.114046580957 554.36618304969-i 33 53.92699115044253 0.165929203539823 5077.556391987408 220.00036553716828-i 33 53.92699115044253 0.165929203539823 2253.3433808426553 277.183091524845-i 33 53.92699115044253 0.165929203539823 1311.01942303975 369.9950374694234-i 33 54.09292035398236 0.165929203539823 5077.556391987408 277.183091524845-i 33 54.09292035398236 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 54.09292035398236 0.165929203539823 1311.01942303975 440.00073107433656-i 33 54.25884955752218 0.165929203539823 5077.556391987408 440.00073107433656-i 33 54.25884955752218 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 54.25884955752218 0.165929203539823 1311.01942303975 369.9950374694234-i 33 54.42477876106201 0.165929203539823 5813.789703166071 220.00036553716828-i 33 54.42477876106201 0.165929203539823 2580.0726833705917 277.183091524845-i 33 54.42477876106201 0.165929203539823 1501.114046580957 440.00073107433656-i 33 54.59070796460183 0.165929203539823 5077.556391987408 277.183091524845-i 33 54.59070796460183 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 54.59070796460183 0.165929203539823 1311.01942303975 554.36618304969-i 33 54.756637168141594 0.165929203539823 5813.789703166071 369.9950374694234-i 33 54.756637168141594 0.165929203539823 2580.0726833705917 293.665255850988-i 33 54.756637168141594 0.165929203539823 1501.114046580957 587.330511701976-i 33 54.92256637168142 0.165929203539823 5077.556391987408 246.9420609296607-i 33 54.92256637168142 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 54.92256637168142 0.165929203539823 1311.01942303975 391.99608729493866-i 33 55.088495575221245 0.165929203539823 5077.556391987408 195.99804364746933-i 33 55.088495575221245 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 55.088495575221245 0.165929203539823 1311.01942303975 587.330511701976-i 33 55.25442477876107 0.165929203539823 5077.556391987408 369.9950374694234-i 33 55.25442477876107 0.165929203539823 2253.3433808426553 293.665255850988-i 33 55.25442477876107 0.165929203539823 1311.01942303975 391.99608729493866-i 33 55.420353982300895 0.165929203539823 5813.789703166071 246.9420609296607-i 33 55.420353982300895 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 55.420353982300895 0.165929203539823 1501.114046580957 493.8841218593214-i 33 55.58628318584072 0.165929203539823 5077.556391987408 195.99804364746933-i 33 55.58628318584072 0.165929203539823 2253.3433808426553 293.665255850988-i 33 55.58628318584072 0.165929203539823 1311.01942303975 587.330511701976-i 33 55.752212389380546 0.165929203539823 5077.556391987408 369.9950374694234-i 33 55.752212389380546 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 55.752212389380546 0.165929203539823 1311.01942303975 391.99608729493866-i 33 55.91814159292037 0.165929203539823 5077.556391987408 246.9420609296607-i 33 55.91814159292037 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 55.91814159292037 0.165929203539823 1311.01942303975 587.330511701976-i 33 56.084070796460196 0.165929203539823 5813.789703166071 195.99804364746933-i 33 56.084070796460196 0.165929203539823 2580.0726833705917 293.665255850988-i 33 56.084070796460196 0.165929203539823 1501.114046580957 391.99608729493866-i 33 56.25000000000002 0.165929203539823 5077.556391987408 369.9950374694234-i 33 56.25000000000002 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 56.25000000000002 0.165929203539823 1311.01942303975 493.8841218593214-i 33 56.41592920353985 0.165929203539823 5077.556391987408 246.9420609296607-i 33 56.41592920353985 0.165929203539823 2253.3433808426553 293.665255850988-i 33 56.41592920353985 0.165929203539823 1311.01942303975 587.330511701976-i 33 56.58185840707967 0.165929203539823 5077.556391987408 195.99804364746933-i 33 56.58185840707967 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 56.58185840707967 0.165929203539823 1311.01942303975 391.99608729493866-i 33 56.7477876106195 0.165929203539823 5813.789703166071 369.9950374694234-i 33 56.7477876106195 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 56.7477876106195 0.165929203539823 1501.114046580957 587.330511701976-i 33 56.91371681415932 0.165929203539823 5077.556391987408 246.9420609296607-i 33 56.91371681415932 0.165929203539823 2253.3433808426553 293.665255850988-i 33 56.91371681415932 0.165929203539823 1311.01942303975 391.99608729493866-i 33 57.07964601769915 0.165929203539823 5077.556391987408 195.99804364746933-i 33 57.07964601769915 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 57.07964601769915 0.165929203539823 1311.01942303975 493.8841218593214-i 33 57.24557522123897 0.165929203539823 5077.556391987408 369.9950374694234-i 33 57.24557522123897 0.165929203539823 2253.3433808426553 293.665255850988-i 33 57.24557522123897 0.165929203539823 1311.01942303975 587.330511701976-i 33 57.4115044247788 0.165929203539823 5813.789703166071 246.9420609296607-i 33 57.4115044247788 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 57.4115044247788 0.165929203539823 1501.114046580957 391.99608729493866-i 33 57.57743362831862 0.165929203539823 5077.556391987408 195.99804364746933-i 33 57.57743362831862 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 57.57743362831862 0.165929203539823 1311.01942303975 587.330511701976-i 33 57.74336283185845 0.165929203539823 5077.556391987408 369.9950374694234-i 33 57.74336283185845 0.165929203539823 2253.3433808426553 293.665255850988-i 33 57.74336283185845 0.165929203539823 1311.01942303975 391.99608729493866-i 33 57.90929203539827 0.165929203539823 5077.556391987408 246.9420609296607-i 33 57.90929203539827 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 57.90929203539827 0.165929203539823 1311.01942303975 493.8841218593214-i 33 58.0752212389381 0.165929203539823 5813.789703166071 195.99804364746933-i 33 58.0752212389381 0.165929203539823 2580.0726833705917 293.665255850988-i 33 58.0752212389381 0.165929203539823 1501.114046580957 587.330511701976-i 33 58.241150442477924 0.165929203539823 5077.556391987408 369.9950374694234-i 33 58.241150442477924 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 58.241150442477924 0.165929203539823 1311.01942303975 391.99608729493866-i 33 58.40707964601775 0.165929203539823 5077.556391987408 246.9420609296607-i 33 58.40707964601775 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 58.40707964601775 0.165929203539823 1311.01942303975 587.330511701976-i 33 58.573008849557574 0.165929203539823 5077.556391987408 195.99804364746933-i 33 58.573008849557574 0.165929203539823 2253.3433808426553 293.665255850988-i 33 58.573008849557574 0.165929203539823 1311.01942303975 391.99608729493866-i 33 58.7389380530974 0.165929203539823 5813.789703166071 369.9950374694234-i 33 58.7389380530974 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 58.7389380530974 0.165929203539823 1501.114046580957 493.8841218593214-i 33 58.904867256637225 0.165929203539823 5077.556391987408 246.9420609296607-i 33 58.904867256637225 0.165929203539823 2253.3433808426553 293.665255850988-i 33 58.904867256637225 0.165929203539823 1311.01942303975 587.330511701976-i 33 59.07079646017705 0.165929203539823 5077.556391987408 195.99804364746933-i 33 59.07079646017705 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 59.07079646017705 0.165929203539823 1311.01942303975 391.99608729493866-i 33 59.236725663716875 0.165929203539823 5077.556391987408 369.9950374694234-i 33 59.236725663716875 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 59.236725663716875 0.165929203539823 1311.01942303975 587.330511701976-i 33 59.4026548672567 0.165929203539823 5813.789703166071 246.9420609296607-i 33 59.4026548672567 0.165929203539823 2580.0726833705917 293.665255850988-i 33 59.4026548672567 0.165929203539823 1501.114046580957 391.99608729493866-i 33 59.568584070796526 0.165929203539823 5077.556391987408 195.99804364746933-i 33 59.568584070796526 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 59.568584070796526 0.165929203539823 1311.01942303975 493.8841218593214-i 33 59.73451327433628 0.165929203539823 5813.789703166071 293.665255850988-i 33 59.73451327433628 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 59.73451327433628 0.165929203539823 1501.114046580957 329.6281045997961-i 33 59.900442477876105 0.165929203539823 5077.556391987408 195.99804364746933-i 33 59.900442477876105 0.165929203539823 2253.3433808426553 293.665255850988-i 33 59.900442477876105 0.165929203539823 1311.01942303975 391.99608729493866-i 33 60.06637168141593 0.165929203539823 5077.556391987408 164.81405229989804-i 33 60.06637168141593 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 60.06637168141593 0.165929203539823 1311.01942303975 329.6281045997961-i 33 60.232300884955755 0.165929203539823 5077.556391987408 293.665255850988-i 33 60.232300884955755 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 60.232300884955755 0.165929203539823 1311.01942303975 391.99608729493866-i 33 60.39823008849558 0.165929203539823 5813.789703166071 195.99804364746933-i 33 60.39823008849558 0.165929203539823 2580.0726833705917 293.665255850988-i 33 60.39823008849558 0.165929203539823 1501.114046580957 493.8841218593214-i 33 60.564159292035406 0.165929203539823 5077.556391987408 164.81405229989804-i 33 60.564159292035406 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 60.564159292035406 0.165929203539823 1311.01942303975 329.6281045997961-i 33 60.73008849557523 0.165929203539823 5077.556391987408 293.665255850988-i 33 60.73008849557523 0.165929203539823 2253.3433808426553 293.665255850988-i 33 60.73008849557523 0.165929203539823 1311.01942303975 391.99608729493866-i 33 60.896017699115056 0.165929203539823 5077.556391987408 195.99804364746933-i 33 60.896017699115056 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 60.896017699115056 0.165929203539823 1311.01942303975 329.6281045997961-i 33 61.06194690265488 0.165929203539823 5813.789703166071 164.81405229989804-i 33 61.06194690265488 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 61.06194690265488 0.165929203539823 1501.114046580957 391.99608729493866-i 33 61.22787610619471 0.165929203539823 5077.556391987408 293.665255850988-i 33 61.22787610619471 0.165929203539823 2253.3433808426553 293.665255850988-i 33 61.22787610619471 0.165929203539823 1311.01942303975 493.8841218593214-i 33 61.39380530973453 0.165929203539823 5077.556391987408 195.99804364746933-i 33 61.39380530973453 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 61.39380530973453 0.165929203539823 1311.01942303975 329.6281045997961-i 33 61.55973451327436 0.165929203539823 5077.556391987408 164.81405229989804-i 33 61.55973451327436 0.165929203539823 2253.3433808426553 293.665255850988-i 33 61.55973451327436 0.165929203539823 1311.01942303975 391.99608729493866-i 33 61.72566371681418 0.165929203539823 5813.789703166071 293.665255850988-i 33 61.72566371681418 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 61.72566371681418 0.165929203539823 1501.114046580957 329.6281045997961-i 33 61.89159292035401 0.165929203539823 5077.556391987408 195.99804364746933-i 33 61.89159292035401 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 61.89159292035401 0.165929203539823 1311.01942303975 391.99608729493866-i 33 62.05752212389383 0.165929203539823 5077.556391987408 164.81405229989804-i 33 62.05752212389383 0.165929203539823 2253.3433808426553 293.665255850988-i 33 62.05752212389383 0.165929203539823 1311.01942303975 493.8841218593214-i 33 62.22345132743366 0.165929203539823 5077.556391987408 293.665255850988-i 33 62.22345132743366 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 62.22345132743366 0.165929203539823 1311.01942303975 329.6281045997961-i 33 62.38938053097348 0.165929203539823 5813.789703166071 195.99804364746933-i 33 62.38938053097348 0.165929203539823 2580.0726833705917 293.665255850988-i 33 62.38938053097348 0.165929203539823 1501.114046580957 391.99608729493866-i 33 62.55530973451331 0.165929203539823 5077.556391987408 164.81405229989804-i 33 62.55530973451331 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 62.55530973451331 0.165929203539823 1311.01942303975 329.6281045997961-i 33 62.72123893805313 0.165929203539823 5077.556391987408 293.665255850988-i 33 62.72123893805313 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 62.72123893805313 0.165929203539823 1311.01942303975 391.99608729493866-i 33 62.88716814159296 0.165929203539823 5077.556391987408 195.99804364746933-i 33 62.88716814159296 0.165929203539823 2253.3433808426553 293.665255850988-i 33 62.88716814159296 0.165929203539823 1311.01942303975 493.8841218593214-i 33 63.053097345132784 0.165929203539823 5813.789703166071 164.81405229989804-i 33 63.053097345132784 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 63.053097345132784 0.165929203539823 1501.114046580957 329.6281045997961-i 33 63.21902654867261 0.165929203539823 5077.556391987408 293.665255850988-i 33 63.21902654867261 0.165929203539823 2253.3433808426553 293.665255850988-i 33 63.21902654867261 0.165929203539823 1311.01942303975 391.99608729493866-i 33 63.384955752212434 0.165929203539823 5077.556391987408 195.99804364746933-i 33 63.384955752212434 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 63.384955752212434 0.165929203539823 1311.01942303975 329.6281045997961-i 33 63.55088495575226 0.165929203539823 5077.556391987408 164.81405229989804-i 33 63.55088495575226 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 63.55088495575226 0.165929203539823 1311.01942303975 391.99608729493866-i 33 63.716814159292085 0.165929203539823 5813.789703166071 293.665255850988-i 33 63.716814159292085 0.165929203539823 2580.0726833705917 293.665255850988-i 33 63.716814159292085 0.165929203539823 1501.114046580957 493.8841218593214-i 33 63.88274336283191 0.165929203539823 5077.556391987408 195.99804364746933-i 33 63.88274336283191 0.165929203539823 2253.3433808426553 195.99804364746933-i 33 63.88274336283191 0.165929203539823 1311.01942303975 329.6281045997961-i 33 64.04867256637174 0.165929203539823 5077.556391987408 164.81405229989804-i 33 64.04867256637174 0.165929203539823 2253.3433808426553 293.665255850988-i 33 64.04867256637174 0.165929203539823 1311.01942303975 391.99608729493866-i 33 64.21460176991155 0.165929203539823 5077.556391987408 293.665255850988-i 33 64.21460176991155 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 64.21460176991155 0.165929203539823 1311.01942303975 329.6281045997961-i 33 64.38053097345137 0.165929203539823 5813.789703166071 195.99804364746933-i 33 64.38053097345137 0.165929203539823 2580.0726833705917 195.99804364746933-i 33 64.38053097345137 0.165929203539823 1501.114046580957 391.99608729493866-i 33 64.54646017699119 0.165929203539823 5077.556391987408 164.81405229989804-i 33 64.54646017699119 0.165929203539823 2253.3433808426553 293.665255850988-i 33 64.54646017699119 0.165929203539823 1311.01942303975 493.8841218593214-i 33 64.71238938053096 0.165929203539823 5813.789703166071 329.6281045997961-i 33 64.71238938053096 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 64.71238938053096 0.165929203539823 1501.114046580957 369.9950374694234-i 33 64.87831858407078 0.165929203539823 5077.556391987408 220.00036553716828-i 33 64.87831858407078 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 64.87831858407078 0.165929203539823 1311.01942303975 440.00073107433656-i 33 65.0442477876106 0.165929203539823 5077.556391987408 184.9975187347117-i 33 65.0442477876106 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 65.0442477876106 0.165929203539823 1311.01942303975 369.9950374694234-i 33 65.21017699115042 0.165929203539823 5077.556391987408 329.6281045997961-i 33 65.21017699115042 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 65.21017699115042 0.165929203539823 1311.01942303975 440.00073107433656-i 33 65.37610619469024 0.165929203539823 5813.789703166071 220.00036553716828-i 33 65.37610619469024 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 65.37610619469024 0.165929203539823 1501.114046580957 554.36618304969-i 33 65.54203539823006 0.165929203539823 5077.556391987408 184.9975187347117-i 33 65.54203539823006 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 65.54203539823006 0.165929203539823 1311.01942303975 369.9950374694234-i 33 65.70796460176987 0.165929203539823 5077.556391987408 329.6281045997961-i 33 65.70796460176987 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 65.70796460176987 0.165929203539823 1311.01942303975 440.00073107433656-i 33 65.87389380530969 0.165929203539823 5077.556391987408 220.00036553716828-i 33 65.87389380530969 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 65.87389380530969 0.165929203539823 1311.01942303975 369.9950374694234-i 33 66.03982300884951 0.165929203539823 5813.789703166071 184.9975187347117-i 33 66.03982300884951 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 66.03982300884951 0.165929203539823 1501.114046580957 440.00073107433656-i 33 66.20575221238933 0.165929203539823 5077.556391987408 329.6281045997961-i 33 66.20575221238933 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 66.20575221238933 0.165929203539823 1311.01942303975 554.36618304969-i 33 66.37168141592915 0.165929203539823 5077.556391987408 220.00036553716828-i 33 66.37168141592915 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 66.37168141592915 0.165929203539823 1311.01942303975 369.9950374694234-i 33 66.53761061946896 0.165929203539823 5077.556391987408 184.9975187347117-i 33 66.53761061946896 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 66.53761061946896 0.165929203539823 1311.01942303975 440.00073107433656-i 33 66.70353982300878 0.165929203539823 5813.789703166071 329.6281045997961-i 33 66.70353982300878 0.165929203539823 2580.0726833705917 369.9950374694234-i 33 66.70353982300878 0.165929203539823 1501.114046580957 369.9950374694234-i 33 66.8694690265486 0.165929203539823 5077.556391987408 220.00036553716828-i 33 66.8694690265486 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 66.8694690265486 0.165929203539823 1311.01942303975 440.00073107433656-i 33 67.03539823008842 0.165929203539823 5077.556391987408 184.9975187347117-i 33 67.03539823008842 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 67.03539823008842 0.165929203539823 1311.01942303975 554.36618304969-i 33 67.20132743362824 0.165929203539823 5077.556391987408 329.6281045997961-i 33 67.20132743362824 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 67.20132743362824 0.165929203539823 1311.01942303975 369.9950374694234-i 33 67.36725663716805 0.165929203539823 5813.789703166071 220.00036553716828-i 33 67.36725663716805 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 67.36725663716805 0.165929203539823 1501.114046580957 440.00073107433656-i 33 67.53318584070787 0.165929203539823 5077.556391987408 184.9975187347117-i 33 67.53318584070787 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 67.53318584070787 0.165929203539823 1311.01942303975 369.9950374694234-i 33 67.69911504424769 0.165929203539823 5077.556391987408 329.6281045997961-i 33 67.69911504424769 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 67.69911504424769 0.165929203539823 1311.01942303975 440.00073107433656-i 33 67.86504424778751 0.165929203539823 5077.556391987408 220.00036553716828-i 33 67.86504424778751 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 67.86504424778751 0.165929203539823 1311.01942303975 554.36618304969-i 33 68.03097345132733 0.165929203539823 5813.789703166071 184.9975187347117-i 33 68.03097345132733 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 68.03097345132733 0.165929203539823 1501.114046580957 369.9950374694234-i 33 68.19690265486715 0.165929203539823 5077.556391987408 329.6281045997961-i 33 68.19690265486715 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 68.19690265486715 0.165929203539823 1311.01942303975 440.00073107433656-i 33 68.36283185840696 0.165929203539823 5077.556391987408 220.00036553716828-i 33 68.36283185840696 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 68.36283185840696 0.165929203539823 1311.01942303975 369.9950374694234-i 33 68.52876106194678 0.165929203539823 5077.556391987408 184.9975187347117-i 33 68.52876106194678 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 68.52876106194678 0.165929203539823 1311.01942303975 440.00073107433656-i 33 68.6946902654866 0.165929203539823 5813.789703166071 329.6281045997961-i 33 68.6946902654866 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 68.6946902654866 0.165929203539823 1501.114046580957 554.36618304969-i 33 68.86061946902642 0.165929203539823 5077.556391987408 220.00036553716828-i 33 68.86061946902642 0.165929203539823 2253.3433808426553 220.00036553716828-i 33 68.86061946902642 0.165929203539823 1311.01942303975 369.9950374694234-i 33 69.02654867256624 0.165929203539823 5077.556391987408 184.9975187347117-i 33 69.02654867256624 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 69.02654867256624 0.165929203539823 1311.01942303975 440.00073107433656-i 33 69.19247787610605 0.165929203539823 5077.556391987408 329.6281045997961-i 33 69.19247787610605 0.165929203539823 2253.3433808426553 369.9950374694234-i 33 69.19247787610605 0.165929203539823 1311.01942303975 369.9950374694234-i 33 69.35840707964587 0.165929203539823 5813.789703166071 220.00036553716828-i 33 69.35840707964587 0.165929203539823 2580.0726833705917 220.00036553716828-i 33 69.35840707964587 0.165929203539823 1501.114046580957 440.00073107433656-i 33 69.52433628318569 0.165929203539823 5077.556391987408 184.9975187347117-i 33 69.52433628318569 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 69.52433628318569 0.165929203539823 1311.01942303975 554.36618304969-i 33 69.69026548672565 0.165929203539823 5813.789703166071 440.00073107433656-i 33 69.69026548672565 0.165929203539823 2580.0726833705917 277.183091524845-i 33 69.69026548672565 0.165929203539823 1501.114046580957 369.9950374694234-i 33 69.85619469026547 0.165929203539823 5077.556391987408 220.00036553716828-i 33 69.85619469026547 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 69.85619469026547 0.165929203539823 1311.01942303975 440.00073107433656-i 33 70.02212389380529 0.165929203539823 5077.556391987408 277.183091524845-i 33 70.02212389380529 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 70.02212389380529 0.165929203539823 1311.01942303975 369.9950374694234-i 33 70.1880530973451 0.165929203539823 5077.556391987408 440.00073107433656-i 33 70.1880530973451 0.165929203539823 2253.3433808426553 277.183091524845-i 33 70.1880530973451 0.165929203539823 1311.01942303975 440.00073107433656-i 33 70.35398230088492 0.165929203539823 5813.789703166071 220.00036553716828-i 33 70.35398230088492 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 70.35398230088492 0.165929203539823 1501.114046580957 554.36618304969-i 33 70.51991150442474 0.165929203539823 5077.556391987408 277.183091524845-i 33 70.51991150442474 0.165929203539823 2253.3433808426553 277.183091524845-i 33 70.51991150442474 0.165929203539823 1311.01942303975 369.9950374694234-i 33 70.68584070796456 0.165929203539823 5077.556391987408 440.00073107433656-i 33 70.68584070796456 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 70.68584070796456 0.165929203539823 1311.01942303975 440.00073107433656-i 33 70.85176991150438 0.165929203539823 5077.556391987408 220.00036553716828-i 33 70.85176991150438 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 70.85176991150438 0.165929203539823 1311.01942303975 369.9950374694234-i 33 71.0176991150442 0.165929203539823 5813.789703166071 277.183091524845-i 33 71.0176991150442 0.165929203539823 2580.0726833705917 277.183091524845-i 33 71.0176991150442 0.165929203539823 1501.114046580957 440.00073107433656-i 33 71.18362831858401 0.165929203539823 5077.556391987408 440.00073107433656-i 33 71.18362831858401 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 71.18362831858401 0.165929203539823 1311.01942303975 554.36618304969-i 33 71.34955752212383 0.165929203539823 5077.556391987408 220.00036553716828-i 33 71.34955752212383 0.165929203539823 2253.3433808426553 277.183091524845-i 33 71.34955752212383 0.165929203539823 1311.01942303975 369.9950374694234-i 33 71.51548672566365 0.165929203539823 5077.556391987408 277.183091524845-i 33 71.51548672566365 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 71.51548672566365 0.165929203539823 1311.01942303975 440.00073107433656-i 33 71.68141592920347 0.165929203539823 5813.789703166071 440.00073107433656-i 33 71.68141592920347 0.165929203539823 2580.0726833705917 440.00073107433656-i 33 71.68141592920347 0.165929203539823 1501.114046580957 369.9950374694234-i 33 71.84734513274329 0.165929203539823 5077.556391987408 220.00036553716828-i 33 71.84734513274329 0.165929203539823 2253.3433808426553 277.183091524845-i 33 71.84734513274329 0.165929203539823 1311.01942303975 440.00073107433656-i 33 72.0132743362831 0.165929203539823 5077.556391987408 277.183091524845-i 33 72.0132743362831 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 72.0132743362831 0.165929203539823 1311.01942303975 554.36618304969-i 33 72.17920353982292 0.165929203539823 5077.556391987408 440.00073107433656-i 33 72.17920353982292 0.165929203539823 2253.3433808426553 277.183091524845-i 33 72.17920353982292 0.165929203539823 1311.01942303975 369.9950374694234-i 33 72.34513274336274 0.165929203539823 5813.789703166071 220.00036553716828-i 33 72.34513274336274 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 72.34513274336274 0.165929203539823 1501.114046580957 440.00073107433656-i 33 72.51106194690256 0.165929203539823 5077.556391987408 277.183091524845-i 33 72.51106194690256 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 72.51106194690256 0.165929203539823 1311.01942303975 369.9950374694234-i 33 72.67699115044238 0.165929203539823 5077.556391987408 440.00073107433656-i 33 72.67699115044238 0.165929203539823 2253.3433808426553 277.183091524845-i 33 72.67699115044238 0.165929203539823 1311.01942303975 440.00073107433656-i 33 72.8429203539822 0.165929203539823 5077.556391987408 220.00036553716828-i 33 72.8429203539822 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 72.8429203539822 0.165929203539823 1311.01942303975 554.36618304969-i 33 73.00884955752201 0.165929203539823 5813.789703166071 277.183091524845-i 33 73.00884955752201 0.165929203539823 2580.0726833705917 277.183091524845-i 33 73.00884955752201 0.165929203539823 1501.114046580957 369.9950374694234-i 33 73.17477876106183 0.165929203539823 5077.556391987408 440.00073107433656-i 33 73.17477876106183 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 73.17477876106183 0.165929203539823 1311.01942303975 440.00073107433656-i 33 73.34070796460165 0.165929203539823 5077.556391987408 220.00036553716828-i 33 73.34070796460165 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 73.34070796460165 0.165929203539823 1311.01942303975 369.9950374694234-i 33 73.50663716814147 0.165929203539823 5077.556391987408 277.183091524845-i 33 73.50663716814147 0.165929203539823 2253.3433808426553 277.183091524845-i 33 73.50663716814147 0.165929203539823 1311.01942303975 440.00073107433656-i 33 73.67256637168128 0.165929203539823 5813.789703166071 440.00073107433656-i 33 73.67256637168128 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 73.67256637168128 0.165929203539823 1501.114046580957 554.36618304969-i 33 73.8384955752211 0.165929203539823 5077.556391987408 220.00036553716828-i 33 73.8384955752211 0.165929203539823 2253.3433808426553 277.183091524845-i 33 73.8384955752211 0.165929203539823 1311.01942303975 369.9950374694234-i 33 74.00442477876092 0.165929203539823 5077.556391987408 277.183091524845-i 33 74.00442477876092 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 74.00442477876092 0.165929203539823 1311.01942303975 440.00073107433656-i 33 74.17035398230074 0.165929203539823 5077.556391987408 440.00073107433656-i 33 74.17035398230074 0.165929203539823 2253.3433808426553 440.00073107433656-i 33 74.17035398230074 0.165929203539823 1311.01942303975 369.9950374694234-i 33 74.33628318584056 0.165929203539823 5813.789703166071 220.00036553716828-i 33 74.33628318584056 0.165929203539823 2580.0726833705917 277.183091524845-i 33 74.33628318584056 0.165929203539823 1501.114046580957 440.00073107433656-i 33 74.50221238938038 0.165929203539823 5077.556391987408 277.183091524845-i 33 74.50221238938038 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 74.50221238938038 0.165929203539823 1311.01942303975 554.36618304969-i 33 74.66814159292034 0.165929203539823 5813.789703166071 369.9950374694234-i 33 74.66814159292034 0.165929203539823 2580.0726833705917 293.665255850988-i 33 74.66814159292034 0.165929203539823 1501.114046580957 587.330511701976-i 33 74.83407079646015 0.165929203539823 5077.556391987408 246.9420609296607-i 33 74.83407079646015 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 74.83407079646015 0.165929203539823 1311.01942303975 391.99608729493866-i 33 74.99999999999997 0.165929203539823 5077.556391987408 195.99804364746933-i 33 74.99999999999997 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 74.99999999999997 0.165929203539823 1311.01942303975 587.330511701976-i 33 75.16592920353979 0.165929203539823 5077.556391987408 369.9950374694234-i 33 75.16592920353979 0.165929203539823 2253.3433808426553 293.665255850988-i 33 75.16592920353979 0.165929203539823 1311.01942303975 391.99608729493866-i 33 75.33185840707961 0.165929203539823 5813.789703166071 246.9420609296607-i 33 75.33185840707961 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 75.33185840707961 0.165929203539823 1501.114046580957 493.8841218593214-i 33 75.49778761061943 0.165929203539823 5077.556391987408 195.99804364746933-i 33 75.49778761061943 0.165929203539823 2253.3433808426553 293.665255850988-i 33 75.49778761061943 0.165929203539823 1311.01942303975 587.330511701976-i 33 75.66371681415924 0.165929203539823 5077.556391987408 369.9950374694234-i 33 75.66371681415924 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 75.66371681415924 0.165929203539823 1311.01942303975 391.99608729493866-i 33 75.82964601769906 0.165929203539823 5077.556391987408 246.9420609296607-i 33 75.82964601769906 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 75.82964601769906 0.165929203539823 1311.01942303975 587.330511701976-i 33 75.99557522123888 0.165929203539823 5813.789703166071 195.99804364746933-i 33 75.99557522123888 0.165929203539823 2580.0726833705917 293.665255850988-i 33 75.99557522123888 0.165929203539823 1501.114046580957 391.99608729493866-i 33 76.1615044247787 0.165929203539823 5077.556391987408 369.9950374694234-i 33 76.1615044247787 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 76.1615044247787 0.165929203539823 1311.01942303975 493.8841218593214-i 33 76.32743362831852 0.165929203539823 5077.556391987408 246.9420609296607-i 33 76.32743362831852 0.165929203539823 2253.3433808426553 293.665255850988-i 33 76.32743362831852 0.165929203539823 1311.01942303975 587.330511701976-i 33 76.49336283185833 0.165929203539823 5077.556391987408 195.99804364746933-i 33 76.49336283185833 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 76.49336283185833 0.165929203539823 1311.01942303975 391.99608729493866-i 33 76.65929203539815 0.165929203539823 5813.789703166071 369.9950374694234-i 33 76.65929203539815 0.165929203539823 2580.0726833705917 329.6281045997961-i 33 76.65929203539815 0.165929203539823 1501.114046580957 587.330511701976-i 33 76.82522123893797 0.165929203539823 5077.556391987408 246.9420609296607-i 33 76.82522123893797 0.165929203539823 2253.3433808426553 293.665255850988-i 33 76.82522123893797 0.165929203539823 1311.01942303975 391.99608729493866-i 33 76.99115044247779 0.165929203539823 5077.556391987408 195.99804364746933-i 33 76.99115044247779 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 76.99115044247779 0.165929203539823 1311.01942303975 493.8841218593214-i 33 77.1570796460176 0.165929203539823 5077.556391987408 369.9950374694234-i 33 77.1570796460176 0.165929203539823 2253.3433808426553 293.665255850988-i 33 77.1570796460176 0.165929203539823 1311.01942303975 587.330511701976-i 33 77.32300884955743 0.165929203539823 5813.789703166071 246.9420609296607-i 33 77.32300884955743 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 77.32300884955743 0.165929203539823 1501.114046580957 391.99608729493866-i 33 77.48893805309724 0.165929203539823 5077.556391987408 195.99804364746933-i 33 77.48893805309724 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 77.48893805309724 0.165929203539823 1311.01942303975 587.330511701976-i 33 77.65486725663706 0.165929203539823 5077.556391987408 369.9950374694234-i 33 77.65486725663706 0.165929203539823 2253.3433808426553 293.665255850988-i 33 77.65486725663706 0.165929203539823 1311.01942303975 391.99608729493866-i 33 77.82079646017688 0.165929203539823 5077.556391987408 246.9420609296607-i 33 77.82079646017688 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 77.82079646017688 0.165929203539823 1311.01942303975 493.8841218593214-i 33 77.9867256637167 0.165929203539823 5813.789703166071 195.99804364746933-i 33 77.9867256637167 0.165929203539823 2580.0726833705917 293.665255850988-i 33 77.9867256637167 0.165929203539823 1501.114046580957 587.330511701976-i 33 78.15265486725652 0.165929203539823 5077.556391987408 369.9950374694234-i 33 78.15265486725652 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 78.15265486725652 0.165929203539823 1311.01942303975 391.99608729493866-i 33 78.31858407079633 0.165929203539823 5077.556391987408 246.9420609296607-i 33 78.31858407079633 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 78.31858407079633 0.165929203539823 1311.01942303975 587.330511701976-i 33 78.48451327433615 0.165929203539823 5077.556391987408 195.99804364746933-i 33 78.48451327433615 0.165929203539823 2253.3433808426553 293.665255850988-i 33 78.48451327433615 0.165929203539823 1311.01942303975 391.99608729493866-i 33 78.65044247787597 0.165929203539823 5813.789703166071 369.9950374694234-i 33 78.65044247787597 0.165929203539823 2580.0726833705917 391.99608729493866-i 33 78.65044247787597 0.165929203539823 1501.114046580957 493.8841218593214-i 33 78.81637168141579 0.165929203539823 5077.556391987408 246.9420609296607-i 33 78.81637168141579 0.165929203539823 2253.3433808426553 293.665255850988-i 33 78.81637168141579 0.165929203539823 1311.01942303975 587.330511701976-i 33 78.9823008849556 0.165929203539823 5077.556391987408 195.99804364746933-i 33 78.9823008849556 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 78.9823008849556 0.165929203539823 1311.01942303975 391.99608729493866-i 33 79.14823008849542 0.165929203539823 5077.556391987408 369.9950374694234-i 33 79.14823008849542 0.165929203539823 2253.3433808426553 329.6281045997961-i 33 79.14823008849542 0.165929203539823 1311.01942303975 587.330511701976-i 33 79.31415929203524 0.165929203539823 5813.789703166071 246.9420609296607-i 33 79.31415929203524 0.165929203539823 2580.0726833705917 293.665255850988-i 33 79.31415929203524 0.165929203539823 1501.114046580957 391.99608729493866-i 33 79.48008849557506 0.165929203539823 5077.556391987408 195.99804364746933-i 33 79.48008849557506 0.165929203539823 2253.3433808426553 391.99608729493866-i 33 79.48008849557506 0.165929203539823 1311.01942303975 493.8841218593214--e---</CsScore>-</CsoundSynthesizer>
+ src/Csound/Base.hs view
@@ -0,0 +1,95 @@+-- | Basic types and functions.+--+-- Example (a concert A)+--+-- > module Main where+-- > +-- > import Csound.Base+-- > +-- > osc :: Sig -> Sig+-- > osc phs = oscil1 1 phs (genHigh 10 [1])+-- > +-- > instr :: D -> Out+-- > instr pch = out $ 0.5 * (osc $ kr pch)+-- > +-- > res = score instr [(0, 1, 440)]+-- > +-- > main :: IO ()+-- > main = writeFile "tmp.csd" $ renderCsd [res]+--+-- Now you can invoke Csound on tmp.csd and listen to the result with your favourite player.+--+-- > csound tmp.csd -o a.wav+module Csound.Base(++ -- * Types+ Val,+ + -- ** Constants + -- | A constant value doesn't change while instrument is playing a note.+ -- Only constants can be passed as arguments to the instruments.+ D, I, Tab, Str,+ withInits,+ + -- ** Signals+ -- | Signals can be audio or control rate. Rate is derived from the code.+ -- If there are rate-collisions, values will be converted to the right rates. + -- For example, if you are trying to apply an opcode that expects control+ -- rate signal to some audio rate signal, the signal will be downsampled behind the scenes.+ Sig, BoolSig, Spec,+ module Data.Boolean,++ -- ** Side effects+ SE, ++ -- ** Tuples+ CsdTuple,+ + -- ** Converters+ ToSig(..), ir, int, double, str, + + -- * Making a sound+ + -- | Let's make some noise. Sound is build from list of tracks ("SigOut").+ Out, SigOut, effect, out, outs, + + -- ** Scores+ -- | We can define an instrument and tell it to play some notes.+ score, Arg(..), ArgMethods, makeArgMethods,++ -- ** Midi+ -- | We can define a midi-instrument. Then we can trigger the instrument with a midi-keyboard.+ Msg, massign, pgmassign,++ -- ** Rendering+ -- | Now we are ready to create a csound-file. The function "renderCsd" creates a 'String' that+ -- contains the description of our music. We can save it to a file and compile it with our @csound@+ -- wizard. + renderCsd,+ + -- ** Opcodes + -- | Some colors to paint our soundscapes.+ module Csound.Opcode,++ -- ** Options+ -- | We can set some csound options.+ renderCsdBy, + Channel, CtrlId, CsdOptions(..), module Data.Default, mixing, mixingBy+) where++import Data.Default+import Data.Boolean++import Csound.Exp+import Csound.Exp.Cons+import Csound.Exp.Wrapper+import Csound.Opcode+import Csound.Exp.Numeric+import Csound.Exp.Logic++import Csound.Render.Sco+import Csound.Render.Options+import Csound.Render+++
+ src/Csound/Exp.hs view
@@ -0,0 +1,236 @@+module Csound.Exp(+ E, RatedExp(..), RatedVar(..), onExp, Exp(..), Name,+ VarType(..), Var(..), Info(..), OpcType(..), Rate(..), + Signature(..), isProcedure, isInfix, isPrefix, + Prim(..), Tab(..),+ Inline(..), InlineExp(..), PreInline(..),+ BoolExp, CondInfo, CondOp(..), isTrue, isFalse, + NumExp, NumOp(..) +) where++import Control.Applicative+import Data.Monoid+import Data.Traversable+import Data.Foldable hiding (concat)++import Data.Map(Map)+import qualified Data.IntMap as IM+import Data.Fix++-- | The inner representation of csound expressions.+type E = Fix RatedExp++type Name = String++data RatedExp a = RatedExp + { ratedExpRate :: Maybe Rate+ , ratedExpDepends :: Maybe a+ , ratedExpExp :: Exp a+ } deriving (Show, Eq, Ord)++data RatedVar = RatedVar + { ratedVarRate :: Rate + , ratedVarId :: Int + } deriving (Show)++onExp :: (Exp a -> Exp a) -> RatedExp a -> RatedExp a+onExp f a = a{ ratedExpExp = f (ratedExpExp a) }++data VarType = LocalVar | GlobalVar+ deriving (Show, Eq, Ord)++data Exp a + = ExpPrim Prim+ | Tfm Info [a]+ | ConvertRate Rate Rate a+ | Select Rate Int a+ | If (CondInfo a) a a + | ExpBool (BoolExp a)+ | ExpNum (NumExp a)+ | ReadVar Var+ | WriteVar Var a + deriving (Show, Eq, Ord) ++data Var + = Var+ { varType :: VarType+ , varRate :: Rate+ , varName :: Name } + | VarVerbatim + { varRate :: Rate+ , varName :: Name + } deriving (Show, Eq, Ord) + ++data Info = Info + { infoName :: Name + , infoSignature :: Signature+ , infoOpcType :: OpcType+ , infoNextSE :: Maybe Int+ } deriving (Show, Eq, Ord) + +isPrefix, isInfix, isProcedure :: Info -> Bool++isPrefix = (Prefix ==) . infoOpcType+isInfix = (Infix ==) . infoOpcType+isProcedure = (Procedure ==) . infoOpcType+ +data OpcType = Prefix | Infix | Procedure+ deriving (Show, Eq, Ord)++-- | The Csound rates.+data Rate = Xr | Ar | Kr | Ir | Sr | Fr+ deriving (Show, Eq, Ord, Enum, Bounded)+ +data Signature + = SingleRate (Map Rate [Rate])+ | MultiRate + { outMultiRate :: [Rate] + , inMultiRate :: [Rate] } + deriving (Show, Eq, Ord)+ +data Prim + = P Int + | PString Int -- >> p-string: + | PrimInt Int + | PrimDouble Double + | PrimTab Tab + | PrimString String + deriving (Show, Eq, Ord)+ +-- | Csound f-tables. You can make a value of 'Tab' with the function 'gen'.+data Tab = Tab + { tabSize :: Int+ , tabGen :: Int+ , tabArgs :: [Double]+ } deriving (Show, Eq, Ord)++------------------------------------------------------------+-- types for arithmetic and boolean expressions++data Inline a b = Inline + { inlineExp :: InlineExp a+ , inlineEnv :: IM.IntMap b + } deriving (Show, Eq, Ord)++data InlineExp a+ = InlinePrim Int+ | InlineExp a [InlineExp a]+ deriving (Show, Eq, Ord)++data PreInline a b = PreInline a [b]+ deriving (Show, Eq, Ord)++-- booleans++type BoolExp a = PreInline CondOp a+type CondInfo a = Inline CondOp a++data CondOp + = TrueOp | FalseOp | Not | And | Or+ | Equals | NotEquals | Less | Greater | LessEquals | GreaterEquals+ deriving (Show, Eq, Ord) ++isTrue, isFalse :: CondInfo a -> Bool++isTrue = isCondOp TrueOp+isFalse = isCondOp FalseOp++isCondOp op = maybe False (op == ) . getCondInfoOp++getCondInfoOp :: CondInfo a -> Maybe CondOp+getCondInfoOp x = case inlineExp x of+ InlineExp op _ -> Just op+ _ -> Nothing++-- numbers++type NumExp a = PreInline NumOp a++data NumOp + = Add | Sub | Neg | Mul | Div+ | Pow | Mod + | Sin | Cos | Sinh | Cosh | Tan | Tanh | Sininv | Cosinv | Taninv+ | Abs | Ceil | ExpOp | Floor | Frac| IntOp | Log | Log10 | Logbtwo | Round | Sqrt + | Ampdb | Ampdbfs | Dbamp | Dbfsamp + | Cpspch+ deriving (Show, Eq, Ord)++-------------------------------------------------------+-- instances for cse++instance Functor RatedExp where+ fmap f (RatedExp r d a) = RatedExp r (fmap f d) (fmap f a)++instance Foldable RatedExp where+ foldMap f (RatedExp _ d a) = foldMap f d <> foldMap f a+ +instance Traversable RatedExp where+ traverse f (RatedExp r d a) = RatedExp r <$> traverse f d <*> traverse f a++instance Functor Exp where+ fmap f x = case x of+ ExpPrim p -> ExpPrim p+ Tfm t xs -> Tfm t $ map f xs+ ConvertRate ra rb a -> ConvertRate ra rb $ f a+ Select r n a -> Select r n $ f a+ If info a b -> If (fmap f info) (f a) (f b)+ ExpBool a -> ExpBool $ fmap f a+ ExpNum a -> ExpNum $ fmap f a+ ReadVar v -> ReadVar v+ WriteVar v a -> WriteVar v (f a) +++instance Foldable Exp where+ foldMap f x = case x of+ ExpPrim p -> mempty+ Tfm t xs -> foldMap f xs+ ConvertRate ra rb a -> f a+ Select r n a -> f a+ If info a b -> foldMap f info <> f a <> f b+ ExpBool a -> foldMap f a+ ExpNum a -> foldMap f a+ ReadVar v -> mempty+ WriteVar v a -> f a+ +instance Traversable Exp where+ traverse f x = case x of+ ExpPrim p -> pure $ ExpPrim p+ Tfm t xs -> Tfm t <$> traverse f xs+ ConvertRate ra rb a -> ConvertRate ra rb <$> f a+ Select r n a -> Select r n <$> f a+ If info a b -> If <$> traverse f info <*> f a <*> f b+ ExpBool a -> ExpBool <$> traverse f a+ ExpNum a -> ExpNum <$> traverse f a+ ReadVar v -> pure $ ReadVar v+ WriteVar v a -> WriteVar v <$> f a+++instance Functor (Inline a) where+ fmap f a = a{ inlineEnv = fmap f $ inlineEnv a }++instance Foldable (Inline a) where+ foldMap f a = foldMap f $ inlineEnv a++instance Traversable (Inline a) where+ traverse f (Inline a b) = Inline a <$> traverse f b++instance Functor (PreInline a) where+ fmap f (PreInline op as) = PreInline op $ fmap f as++instance Foldable (PreInline a) where+ foldMap f (PreInline _ as) = foldMap f as++instance Traversable (PreInline a) where+ traverse f (PreInline op as) = PreInline op <$> traverse f as++++-- comments+-- +-- p-string +--+-- separate p-param for strings (we need it to read strings from global table) +-- Csound doesn't permits us to use more than four string params so we need to+-- keep strings in the global table and use `strget` to read them+
+ src/Csound/Exp/Cons.hs view
@@ -0,0 +1,191 @@+module Csound.Exp.Cons (+ Spec1, Specs,+ toE, fromE,+ withInits,+ bi,+ opcs, opc0, opc1, opc2, opc3, opc4, opc5, opc6, opc7, opc8, opc9, opc10, opc11,+ mopcs, mopc0, mopc1, mopc2, mopc3, mopc4, mopc5, mopc6, mopc7+) where++import Data.String+import Control.Applicative+import Data.Default+import qualified Data.Map as M+import Control.Monad.Trans.State++import Data.Fix++import Csound.Exp+import Csound.Exp.Wrapper++-- | Converts a value to the private representation.+toE :: Val a => a -> E+toE = Fix . unwrap++-- | Constructs a value from the private representation.+fromE :: Val a => E -> a+fromE = wrap . unFix++-- | Appends initialisation arguments. It's up to you to supply arguments with the right types. For example:+--+-- > oscil 0.5 440 sinWave `withInits` (0.5 :: D)+withInits :: (Val a, CsdTuple inits) => a -> inits -> Sig+withInits a b = wrap $ onExp phi $ unwrap a+ where phi x = case x of+ Tfm t xs -> Tfm t (xs ++ fromCsdTuple b)+ x -> x++------------------------------------------------+-- helper constructors++instance IsString Str where+ fromString = str++------------------------------------------------+-- constructor for simple arithmetic operators++bi :: (Val a1, Val a2, Val b) => Name -> a1 -> a2 -> b+bi name = opc2 name biSignature++biSignature :: Spec1+biSignature = [+ (Ar, [Ar, Ar]),+ (Kr, [Kr, Kr]),+ (Ir, [Ir, Ir])]++idSignature :: Spec1+idSignature = [+ (Ar, repeat Ar),+ (Kr, repeat Kr),+ (Ir, repeat Ir)]++----------------------------+-- spec tfms++tfms :: (Val a, Val b) => Info -> [a] -> b+tfms t as = tfm t $ map unwrap as++tfm0 :: (Val a) => Info -> a+tfm0 t = tfm t []++tfm1 :: (Val a, Val b) => Info -> a -> b+tfm1 t a = tfm t [unwrap a]++tfm2 :: (Val a1, Val a2, Val b) => Info -> a1 -> a2 -> b+tfm2 t a1 a2 = tfm t [unwrap a1, unwrap a2]++tfm3 :: (Val a1, Val a2, Val a3, Val b) => Info -> a1 -> a2 -> a3 -> b+tfm3 t a1 a2 a3 = tfm t [unwrap a1, unwrap a2, unwrap a3]++tfm4 :: (Val a1, Val a2, Val a3, Val a4, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> b+tfm4 t a1 a2 a3 a4 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4]++tfm5 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> b+tfm5 t a1 a2 a3 a4 a5 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5]++tfm6 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> b+tfm6 t a1 a2 a3 a4 a5 a6 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5, unwrap a6]++tfm7 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> b+tfm7 t a1 a2 a3 a4 a5 a6 a7 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5, unwrap a6, unwrap a7]++tfm8 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> b+tfm8 t a1 a2 a3 a4 a5 a6 a7 a8 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5, unwrap a6, unwrap a7, unwrap a8]++tfm9 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val a9, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> b+tfm9 t a1 a2 a3 a4 a5 a6 a7 a8 a9 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5, unwrap a6, unwrap a7, unwrap a8, unwrap a9]++tfm10 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val a9, Val a10, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> b+tfm10 t a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5, unwrap a6, unwrap a7, unwrap a8, unwrap a9, unwrap a10]++tfm11 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val a9, Val a10, Val a11, Val b) => Info -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> a11 -> b+tfm11 t a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 = tfm t [unwrap a1, unwrap a2, unwrap a3, unwrap a4, unwrap a5, unwrap a6, unwrap a7, unwrap a8, unwrap a9, unwrap a10, unwrap a11]++-------------------------------+-- single out++type Spec1 = [(Rate, [Rate])]++spec1 :: Spec1 -> Signature+spec1 = SingleRate . M.fromList++opcs :: (Val a, Val b) => Name -> Spec1 -> [a] -> b+opcs name signature = tfms (pref name $ spec1 signature)++opc0 :: (Val a) => Name -> Spec1 -> a+opc0 name signature = tfm0 (pref name $ spec1 signature)++opc1 :: (Val a, Val b) => Name -> Spec1 -> a -> b+opc1 name signature = tfm1 (pref name $ spec1 signature)++opc2 :: (Val a1, Val a2, Val b) => Name -> Spec1 -> a1 -> a2 -> b+opc2 name signature = tfm2 (pref name $ spec1 signature)++opc3 :: (Val a1, Val a2, Val a3, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> b+opc3 name signature = tfm3 (pref name $ spec1 signature)++opc4 :: (Val a1, Val a2, Val a3, Val a4, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> b+opc4 name signature = tfm4 (pref name $ spec1 signature)++opc5 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> b+opc5 name signature = tfm5 (pref name $ spec1 signature)++opc6 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> b+opc6 name signature = tfm6 (pref name $ spec1 signature)++opc7 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> b+opc7 name signature = tfm7 (pref name $ spec1 signature)++opc8 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> b+opc8 name signature = tfm8 (pref name $ spec1 signature)++opc9 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val a9, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> b+opc9 name signature = tfm9 (pref name $ spec1 signature)++opc10 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val a9, Val a10, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> b+opc10 name signature = tfm10 (pref name $ spec1 signature)++opc11 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, Val a8, Val a9, Val a10, Val a11, Val b) => Name -> Spec1 -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> a11 -> b+opc11 name signature = tfm11 (pref name $ spec1 signature)++-------------------------------+-- multiple outs++type Specs = ([Rate], [Rate])++specs :: Specs -> Signature+specs = uncurry MultiRate ++mo :: (CsdTuple a) => E -> a+mo = multiOuts++mopcs :: (Val a, CsdTuple b) => Name -> Specs -> [a] -> b+mopcs name signature as = mo $ tfms (pref name $ specs signature) as++mopc0 :: (CsdTuple a) => Name -> Specs -> a+mopc0 name signature = mo $ tfm0 (pref name $ specs signature)++mopc1 :: (Val a, CsdTuple b) => Name -> Specs -> a -> b+mopc1 name signature a1 = mo $ tfm1 (pref name $ specs signature) a1++mopc2 :: (Val a1, Val a2, CsdTuple b) => Name -> Specs -> a1 -> a2 -> b+mopc2 name signature a1 a2 = mo $ tfm2 (pref name $ specs signature) a1 a2++mopc3 :: (Val a1, Val a2, Val a3, CsdTuple b) => Name -> Specs -> a1 -> a2 -> a3 -> b+mopc3 name signature a1 a2 a3 = mo $ tfm3 (pref name $ specs signature) a1 a2 a3++mopc4 :: (Val a1, Val a2, Val a3, Val a4, CsdTuple b) => Name -> Specs -> a1 -> a2 -> a3 -> a4 -> b+mopc4 name signature a1 a2 a3 a4 = mo $ tfm4 (pref name $ specs signature) a1 a2 a3 a4++mopc5 :: (Val a1, Val a2, Val a3, Val a4, Val a5, CsdTuple b) => Name -> Specs -> a1 -> a2 -> a3 -> a4 -> a5 -> b+mopc5 name signature a1 a2 a3 a4 a5 = mo $ tfm5 (pref name $ specs signature) a1 a2 a3 a4 a5++mopc6 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, CsdTuple b) => Name -> Specs -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> b+mopc6 name signature a1 a2 a3 a4 a5 a6 = mo $ tfm6 (pref name $ specs signature) a1 a2 a3 a4 a5 a6++mopc7 :: (Val a1, Val a2, Val a3, Val a4, Val a5, Val a6, Val a7, CsdTuple b) => Name -> Specs -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> b+mopc7 name signature a1 a2 a3 a4 a5 a6 a7 = mo $ tfm7 (pref name $ specs signature) a1 a2 a3 a4 a5 a6 a7++++
+ src/Csound/Exp/Logic.hs view
@@ -0,0 +1,90 @@+{-# Language TypeFamilies #-}+module Csound.Exp.Logic() where++import Control.Monad.Trans.State+import Data.Fix+import qualified Data.IntMap as IM+import Control.Applicative++import Data.Boolean++import Csound.Exp.Wrapper+import Csound.Exp++instance Boolean BoolSig where+ true = boolOp0 TrueOp+ false = boolOp0 FalseOp+ notB = BoolSig . notE . unBoolSig+ (&&*) = boolOp2 And+ (||*) = boolOp2 Or++type instance BooleanOf Sig = BoolSig++instance IfB Sig where+ ifB = cond'+ +instance EqB Sig where+ (==*) = boolOp2 Equals+ (/=*) = boolOp2 NotEquals+ +instance OrdB Sig where+ (<*) = boolOp2 Less+ (>*) = boolOp2 Greater+ (<=*) = boolOp2 LessEquals+ (>=*) = boolOp2 GreaterEquals++--------------------------------------------+-- if-then-else++boolExp = PreInline++cond' :: BoolSig -> Sig -> Sig -> Sig+cond' p t e = wrap $ mkCond (condInfo $ Fix $ unwrap p) (unwrap t) (unwrap e)+ where mkCond :: CondInfo E -> RatedExp E -> RatedExp E -> RatedExp E+ mkCond p t e + | isTrue p = t+ | isFalse p = e+ | otherwise = noRate $ If p (Fix t) (Fix e) ++condInfo :: E -> CondInfo E+condInfo exp = (\(a, b) -> Inline a (IM.fromList b)) $ evalState (condInfo' exp) 0+ where condInfo' :: E -> State Int (InlineExp CondOp, [(Int, E)])+ condInfo' e = maybe (onLeaf e) (onExp e) $ parseNode e+ onLeaf e = state $ \n -> ((InlinePrim n, [(n, e)]), n+1) + onExp e (op, args) = mkNode <$> mapM condInfo' args+ where mkNode as = (InlineExp op (map fst as), concat $ map snd as) ++ parseNode :: E -> Maybe (CondOp, [E])+ parseNode x = case ratedExpExp $ unFix x of+ ExpBool (PreInline op args) -> Just (op, args)+ _ -> Nothing +++boolOps :: (Val a) => CondOp -> [E] -> a+boolOps op as = noRate $ ExpBool $ boolExp op as++boolOp0 :: Val a => CondOp -> a+boolOp0 op = boolOps op []++boolOp1 :: Val a => CondOp -> a -> a+boolOp1 op a = boolOps op [setRate Kr $ Fix $ unwrap a]++boolOp2 :: (Val a1, Val a2, Val b) => CondOp -> a1 -> a2 -> b+boolOp2 op a b = boolOps op $ map (Fix . setRate Kr) [unwrap a, unwrap b]++-- no support for not in csound so we perform not-elimination+notE :: E -> E+notE x = Fix $ onExp phi $ unFix x+ where phi (ExpBool (PreInline op args)) = ExpBool $ case op of+ TrueOp -> boolExp FalseOp []+ FalseOp -> boolExp TrueOp []+ And -> boolExp Or $ map notE args+ Or -> boolExp And $ map notE args+ Equals -> boolExp NotEquals args+ NotEquals -> boolExp Equals args+ Less -> boolExp GreaterEquals args+ Greater -> boolExp LessEquals args+ LessEquals -> boolExp Greater args+ GreaterEquals -> boolExp Less args + +
+ src/Csound/Exp/Numeric.hs view
@@ -0,0 +1,272 @@+{-# Language TypeSynonymInstances, FlexibleInstances #-}+module Csound.Exp.Numeric() where++import Data.Maybe(fromJust)+import Control.Applicative+import Data.Fix++import Csound.Exp+import Csound.Exp.Wrapper+import Csound.Exp.Cons ++-------------------------------------------------------+-- instances for numerical expressions++instance NumOpt E where+ maybeInt x = case ratedExpExp $ unFix x of+ ExpPrim (PrimInt n) -> Just n+ _ -> Nothing+ + maybeDouble x = case ratedExpExp $ unFix x of+ ExpPrim (PrimDouble d) -> Just d+ _ -> Nothing+ + fromInt = prim . PrimInt+ fromDouble = prim . PrimDouble+ fromNum = noRate . ExpNum ++--------------------------------------------+-- numeric instances++instance Num E where + (+) a b + | isZero a = b+ | isZero b = a+ | otherwise = biOpt (+) (+) Add a b+ + (*) a b + | isZero a || isZero b = fromInt 0+ | otherwise = biOpt (*) (*) Mul a b+ + (-) a b + | isZero a = negate b+ | isZero b = a+ | otherwise = biOpt (-) (-) Sub a b + + negate = unOpt negate negate Neg+ + fromInteger = fromInt . fromInteger+ abs = unOpt abs abs Abs+ signum = undefined++instance Fractional E where+ (/) a b + | isZero a = fromInt 0+ | isZero b = error "csound (/): division by zero" + | otherwise = biOptOnDouble (/) Div a b++ fromRational = fromDouble . fromRational ++instance Floating E where+ pi = fromDouble pi+ exp = funOpt exp ExpOp+ sqrt = funOpt sqrt Sqrt+ log = funOpt log Log+ logBase a n = case n of+ 2 -> funOpt (flip logBase 2) Logbtwo a+ 10 -> funOpt (flip logBase 10) Log10 a+ b -> log a / log b+ (**) = biOpt (^) (**) Pow+ sin = funOpt sin Sin + tan = funOpt tan Tan+ cos = funOpt cos Cos+ asin = funOpt asin Sininv+ atan = funOpt atan Taninv+ acos = funOpt acos Cosinv+ sinh = funOpt sinh Sinh+ tanh = funOpt tanh Tanh+ cosh = funOpt cosh Cosh+ asinh a = log $ a + sqrt (a * a + 1)+ acosh a = log $ a + sqrt (a + 1) * sqrt (a - 1)+ atanh a = 0.5 * log ((1 + a) / (1 - a))++{- +instance Enum E where+ succ = (+1)+ pred = \x -> x - 1+ toEnum = fromInt+ enumFrom a = a : enumFrom (a+1)+ enumFromThen a b = a : enumFromThen (a+b) b+ enumFromTo = undefined+ enumFromThenTo = undefined+ +instance Real E where+ toRational = undefined+ +instance Integral E where+ quot a b = truncate $ (truncate a) / (truncate b)+ rem a b = (a `quot` b)*b - a+ mod = mod'+ div a b = truncate $ a - mod a b / b+ toInteger = undefined + +instance RealFrac E where+ properFraction a = (floor' a, frac' a)+ truncate = truncate'+ floor = floor'+ ceiling = ceil'+ round = round' . kr +-} +onE1 :: (Val a, Val b) => (E -> E) -> (a -> b)+onE1 f = wrap . unFix . f . Fix . unwrap++onE2 :: (Val a, Val b, Val c) => (E -> E -> E) -> (a -> b -> c)+onE2 f a b = wrap $ unFix $ f (Fix $ unwrap a) (Fix $ unwrap b)++onConst :: Val b => (a -> E) -> (a -> b)+onConst f = wrap . unFix . f ++-------------------------------------------+-- wrappers++instance Num Sig where + (+) = onE2 (+)+ (*) = onE2 (*)+ (-) = onE2 (-)+ negate = onE1 negate+ fromInteger = onConst fromInteger+ abs = onE1 abs+ signum = onE1 signum++instance Num I where+ (+) = onE2 (+)+ (*) = onE2 (*)+ (-) = onE2 (-)+ negate = onE1 negate+ fromInteger = onConst fromInteger+ abs = onE1 abs+ signum = onE1 signum++instance Num D where+ (+) = onE2 (+)+ (*) = onE2 (*)+ (-) = onE2 (-)+ negate = onE1 negate+ fromInteger = onConst fromInteger+ abs = onE1 abs+ signum = onE1 signum++instance Fractional Sig where+ (/) = onE2 (/)+ fromRational = onConst fromRational++instance Fractional D where+ (/) = onE2 (/)+ fromRational = onConst fromRational++instance Floating Sig where+ pi = wrap $ unFix pi+ exp = onE1 exp+ sqrt = onE1 sqrt+ log = onE1 log+ logBase = onE2 logBase+ (**) = onE2 (**)+ sin = onE1 sin+ tan = onE1 tan+ cos = onE1 cos+ asin = onE1 asin+ atan = onE1 atan+ acos = onE1 acos+ sinh = onE1 sinh+ tanh = onE1 tanh+ cosh = onE1 cosh+ asinh = onE1 asinh+ acosh = onE1 acosh+ atanh = onE1 atanh+ +instance Floating D where+ pi = wrap $ unFix pi+ exp = onE1 exp+ sqrt = onE1 sqrt+ log = onE1 log+ logBase = onE2 logBase+ (**) = onE2 (**)+ sin = onE1 sin+ tan = onE1 tan+ cos = onE1 cos+ asin = onE1 asin+ atan = onE1 atan+ acos = onE1 acos+ sinh = onE1 sinh+ tanh = onE1 tanh+ cosh = onE1 cosh+ asinh = onE1 asinh+ acosh = onE1 acosh+ atanh = onE1 atanh++------------------------------------------------------------++class NumOpt a where+ maybeInt :: a -> Maybe Int+ maybeDouble :: a -> Maybe Double+ fromInt :: Int -> a+ fromDouble :: Double -> a+ fromNum :: NumExp a -> a+ +isZero :: NumOpt a => a -> Bool+isZero a = maybe False id $ liftA2 (||) ((== 0) <$> maybeInt a) ((==0) <$> maybeDouble a)++getDouble :: NumOpt a => a -> Maybe Double+getDouble a = maybe (fromIntegral <$> maybeInt a) Just $ maybeDouble a ++unOpt :: (NumOpt a) => (Int -> Int) -> (Double -> Double) -> NumOp -> a -> a+unOpt intOp doubleOp op a = fromJust $+ (fromInt . intOp <$> maybeInt a)+ <|> (fromDouble . doubleOp <$> maybeDouble a)+ <|> Just (noOpt1 op a)++biOpt :: (NumOpt a) => (Int -> Int -> Int) -> (Double -> Double -> Double) -> NumOp -> a -> a -> a+biOpt intOp doubleOp op a b = fromJust $+ intOpA (maybeInt a) (maybeInt b) + <|> doubleOpA (getDouble a) (getDouble b)+ <|> Just (noOpt2 op a b)+ where intOpA a b = fromInt <$> liftA2 intOp a b+ doubleOpA a b = fromDouble <$> liftA2 doubleOp a b++biOptOnDouble :: (NumOpt a) => (Double -> Double -> Double) -> NumOp -> a -> a -> a+biOptOnDouble doubleOp op a b = fromJust $+ (fromDouble <$> liftA2 doubleOp (getDouble a) (getDouble b))+ <|> Just (noOpt2 op a b) + ++funOpt :: NumOpt a => (Double -> Double) -> NumOp -> a -> a+funOpt doubleOp op a = fromJust $+ (fromDouble . doubleOp <$> getDouble a)+ <|> Just (noOpt1 op a)++noOpt1 :: NumOpt a => NumOp -> a -> a+noOpt1 op a = fromNum $ PreInline op [a]++noOpt2 :: NumOpt a => NumOp -> a -> a -> a+noOpt2 op a b = fromNum $ PreInline op [a, b]++doubleToInt :: NumOpt a => (Double -> Int) -> NumOp -> a -> a+doubleToInt fun op a = fromJust $+ (fromInt <$> maybeInt a)+ <|> (fromInt . fun <$> maybeDouble a)+ <|> Just (noOpt1 op a)++-- arithmetic++mod' :: NumOpt a => a -> a -> a+mod' = biOpt mod (\a b -> fromIntegral $ mod (floor a) (floor b)) Pow+ +-- other functions++ceil', floor', frac', int', round' :: NumOpt a => a -> a++ceil' = doubleToInt ceiling Ceil +floor' = doubleToInt floor Floor+round' = doubleToInt round Round+frac' = unOpt (const 0) (snd . properFraction) Frac +int' = doubleToInt truncate IntOp + ++++ +++++
+ src/Csound/Exp/Wrapper.hs view
@@ -0,0 +1,451 @@+{-# Language + TypeSynonymInstances,+ FlexibleInstances #-}+module Csound.Exp.Wrapper(+ Out, Sig, I, D, Str, BoolSig(..), Spec, ToSig(..),+ SE, se, se_, runSE, execSE,+ Arg(..), ArgMethods(..), toArg, makeArgMethods,+ CsdTuple(..), multiOuts,+ Val(..),+ str, double, int, ir,+ tfm, pref, prim, p,+ isMultiOutSignature,+ noRate, setRate, getRates,+ readVar, writeVar, gOutVar,+ Channel+) where++import Control.Applicative+import Control.Monad(ap)+import Control.Monad.Trans.State++import Data.String+import Data.Fix+import Control.Monad.Trans.State++import Csound.Exp++type Channel = Int++-- | Output of the instrument.+type Out = SE [Sig]+++-- | Audio or control rate signals. +newtype Sig = Sig { unSig :: E }++-- | Integers.+newtype I = I { unI :: E }++-- | Doubles.+newtype D = D { unD :: E }++-- | Strings.+newtype Str = Str { unStr :: E }++-- | Boolean signals. Use functions from the module "Data.Boolean" to make boolean signals+-- out of simple signals.+newtype BoolSig = BoolSig { unBoolSig :: E }++-- | Spectrum of the signal (see "FFT and Spectral Processing" in the "Csound.Opcode.Advanced"). +newtype Spec = Spec { unSpec :: E }++------------------------------------------------+-- side effects++-- | Csound's synonym for 'IO'-monad. 'SE' means Side Effect. +-- You will bump into 'SE' trying to read and write to delay lines,+-- making random signals or trying to save your audio to file. +-- Instrument is expected to return a value of @SE [Sig]@. +-- So it's okay to do some side effects when playing a note.+newtype SE a = SE { unSE :: State E a }++instance Functor SE where+ fmap f = SE . fmap f . unSE++instance Applicative SE where+ pure = return+ (<*>) = ap++instance Monad SE where+ return = SE . return+ ma >>= mf = SE $ unSE ma >>= unSE . mf++runSE :: SE a -> (a, E)+runSE a = runState (unSE a) (unD (p 3 :: D))++execSE :: SE a -> E+execSE = snd . runSE++------------------------------------------------+-- basic constructors+ +noRate :: Val a => Exp E -> a+noRate = ratedExp Nothing+ +withRate :: Val a => Rate -> Exp E -> a+withRate r = ratedExp (Just r)++ratedExp :: Val a => Maybe Rate -> Exp E -> a+ratedExp r = wrap . RatedExp r Nothing++prim :: Val a => Prim -> a+prim = wrap . noRate . ExpPrim ++pref :: Name -> Signature -> Info+pref name signature = Info name signature Prefix Nothing++inf :: Name -> Signature -> Info+inf name signature = Info name signature Infix Nothing+ +tfm :: Val a => Info -> [RatedExp E] -> a+tfm info args = wrap $ noRate $ Tfm info $ map Fix args++gvar, var :: Val a => Rate -> Name -> a++var = mkVar LocalVar +gvar = mkVar GlobalVar++mkVar :: Val a => VarType -> Rate -> String -> a+mkVar ty rate name = wrap $ noRate $ ReadVar (Var ty rate name)++p :: Val a => Int -> a+p = prim . P++-- | Converts Haskell's integers to Csound's integers+int :: Int -> I+int = prim . PrimInt++-- | Converts Haskell's doubles to Csound's doubles+double :: Double -> D+double = prim . PrimDouble++-- | Converts Haskell's strings to Csound's strings+str :: String -> Str+str = prim . PrimString++writeVar :: (Val a) => Var -> a -> SE ()+writeVar v x = se_ $ noRate $ WriteVar v $ Fix $ unwrap x ++readVar :: (Val a) => Var -> a+readVar v = noRate $ ReadVar v++gOutVar :: Int -> Int -> Var+gOutVar instrId portId = Var GlobalVar Ar (gOutName instrId portId)+ where gOutName instrId portId = "Out" ++ show instrId ++ "_" ++ show portId++-------------------------------+-- side effects++se :: (Val a) => E -> SE a+se a = SE $ state $ \s -> + let x = (unwrap a) { ratedExpDepends = Just s }+ in (wrap x, Fix $ x)++se_ :: E -> SE ()+se_ = fmap (const ()) . (se :: E -> SE E)++------------------------------------------------+-- basic destructors++getPrimUnsafe :: Val a => a -> Prim+getPrimUnsafe a = case ratedExpExp $ unwrap a of+ ExpPrim p -> p++--------------------------------------------+-- signals from primitive types++-- | Values that can be converted to signals. +class ToSig a where+ ar :: a -> Sig -- ^ Forces signal to audio rate. + kr :: a -> Sig -- ^ Forces signal to control rate. + +instance ToSig I where+ ar = setRate Ar+ kr = setRate Kr ++instance ToSig D where+ ar = setRate Ar+ kr = setRate Kr ++instance ToSig Sig where+ ar = setRate Ar+ kr = setRate Kr + +instance ToSig Int where+ ar = ar . int+ kr = kr . int+ +instance ToSig Double where+ ar = ar . double+ kr = kr . double+ +--------------------------------------------+-- rate conversion ++setRate :: (Val a, Val b) => Rate -> a -> b+setRate r a = wrap $ (\x -> x { ratedExpRate = Just r }) $ unwrap a++-- | Converts signal to double.+ir :: Sig -> D+ir = setRate Ir++------------------------------------------------------+-- values++class Val a where+ wrap :: RatedExp E -> a + unwrap :: a -> RatedExp E++instance Val (RatedExp E) where+ wrap = id+ unwrap = id+ +instance Val E where+ wrap = Fix+ unwrap = unFix+ +instance Val Sig where+ wrap = Sig . Fix+ unwrap = unFix . unSig++instance Val I where+ wrap = I . Fix+ unwrap = unFix . unI++instance Val D where+ wrap = D . Fix+ unwrap = unFix . unD++instance Val Str where+ wrap = Str . Fix+ unwrap = unFix . unStr++instance Val Tab where+ wrap = undefined+ unwrap = prim . PrimTab++instance Val BoolSig where+ wrap = BoolSig . Fix+ unwrap = unFix . unBoolSig ++instance Val Spec where+ wrap = Spec . Fix+ unwrap = unFix . unSpec++------------------------------------------------+-- arguments++-- | The abstract type of methods for the class 'Arg'.+data ArgMethods a = ArgMethods + { arg :: Int -> a+ , toNote :: a -> [Prim]+ , arity :: a -> Int+ }++toArg :: Arg a => a+toArg = arg argMethods 4++-- | Defines instance of type class 'Arg' for a new type in terms of an old one.+makeArgMethods :: (Arg a) => (a -> b) -> (b -> a) -> ArgMethods b+makeArgMethods to from = ArgMethods {+ arg = to . arg argMethods,+ toNote = toNote argMethods . from,+ arity = arity argMethods . from }++-- | Describes all Csound values that can be used in the score section. +-- Instruments are triggered with the values from this type class.+-- Actual methods are hidden, but you can easily make instances for your own types+-- with function 'makeArgMethods'. You need to describe the new instance in terms +-- of some existing one. For example:+--+-- > data Note = Note +-- > { noteAmplitude :: D+-- > , notePitch :: D+-- > , noteVibrato :: D+-- > , noteSample :: S+-- > }+-- > +-- > instance Arg Note where+-- > argMethods = makeArgMethods to from+-- > where to (amp, pch, vibr, sample) = Note amp pch vibr sample+-- > from (Note amp pch vibr sample) = (amp, pch, vibr, sample)+-- +-- Then you can use this type in an instrument definition.+-- +-- > instr :: Note -> Out+-- > instr x = ...++class Arg a where+ argMethods :: ArgMethods a++instance Arg () where+ argMethods = ArgMethods + { arg = const ()+ , toNote = const []+ , arity = const 0 }++instance Arg I where+ argMethods = ArgMethods {+ arg = p,+ toNote = pure . getPrimUnsafe,+ arity = const 1 }+ +instance Arg D where+ argMethods = ArgMethods {+ arg = p,+ toNote = pure . getPrimUnsafe,+ arity = const 1 }++instance Arg Str where+ argMethods = ArgMethods {+ arg = p,+ toNote = pure . getPrimUnsafe,+ arity = const 1 }++instance Arg Tab where+ argMethods = ArgMethods {+ arg = p,+ toNote = pure . getPrimUnsafe,+ arity = const 1 }++instance (Arg a, Arg b) => Arg (a, b) where+ argMethods = ArgMethods arg' toNote' arity' + where arg' n = (a, b)+ where a = arg argMethods n+ b = arg argMethods (n + arity argMethods a)+ toNote' (a, b) = toNote argMethods a ++ toNote argMethods b+ arity' (a, b) = arity argMethods a + arity argMethods b +++instance (Arg a, Arg b, Arg c) => Arg (a, b, c) where+ argMethods = makeArgMethods to from+ where to (a, (b, c)) = (a, b, c)+ from (a, b, c) = (a, (b, c))++instance (Arg a, Arg b, Arg c, Arg d) => Arg (a, b, c, d) where+ argMethods = makeArgMethods to from+ where to (a, (b, c, d)) = (a, b, c, d)+ from (a, b, c, d) = (a, (b, c, d))++instance (Arg a, Arg b, Arg c, Arg d, Arg e) => Arg (a, b, c, d, e) where+ argMethods = makeArgMethods to from+ where to (a, (b, c, d, e)) = (a, b, c, d, e)+ from (a, b, c, d, e) = (a, (b, c, d, e))++instance (Arg a, Arg b, Arg c, Arg d, Arg e, Arg f) => Arg (a, b, c, d, e, f) where+ argMethods = makeArgMethods to from+ where to (a, (b, c, d, e, f)) = (a, b, c, d, e, f)+ from (a, b, c, d, e, f) = (a, (b, c, d, e, f))++instance (Arg a, Arg b, Arg c, Arg d, Arg e, Arg f, Arg g) => Arg (a, b, c, d, e, f, g) where+ argMethods = makeArgMethods to from+ where to (a, (b, c, d, e, f, g)) = (a, b, c, d, e, f, g)+ from (a, b, c, d, e, f, g) = (a, (b, c, d, e, f, g))+++instance (Arg a, Arg b, Arg c, Arg d, Arg e, Arg f, Arg g, Arg h) => Arg (a, b, c, d, e, f, g, h) where+ argMethods = makeArgMethods to from+ where to (a, (b, c, d, e, f, g, h)) = (a, b, c, d, e, f, g, h)+ from (a, b, c, d, e, f, g, h) = (a, (b, c, d, e, f, g, h))+++------------------------------------------------+-- tuples++-- | Describes tuples of Csound values. It's used for functions that can return +-- several results (such as 'soundin' or 'diskin2'). Tuples can be nested. +class CsdTuple a where+ fromCsdTuple :: a -> [E]+ toCsdTuple :: [E] -> a+ arityCsdTuple :: a -> Int++instance CsdTuple Sig where+ fromCsdTuple = return . Fix . unwrap+ toCsdTuple = wrap . unFix . head+ arityCsdTuple = const 1++instance CsdTuple I where+ fromCsdTuple = return . Fix . unwrap+ toCsdTuple = wrap . unFix . head+ arityCsdTuple = const 1++instance CsdTuple D where+ fromCsdTuple = return . Fix . unwrap+ toCsdTuple = wrap . unFix . head+ arityCsdTuple = const 1++instance CsdTuple Str where+ fromCsdTuple = return . Fix . unwrap+ toCsdTuple = wrap . unFix . head+ arityCsdTuple = const 1++instance CsdTuple Spec where+ fromCsdTuple = return . Fix . unwrap+ toCsdTuple = wrap . unFix . head+ arityCsdTuple = const 1++instance (CsdTuple a, CsdTuple b) => CsdTuple (a, b) where+ fromCsdTuple (a, b) = fromCsdTuple a ++ fromCsdTuple b+ arityCsdTuple (a, b) = arityCsdTuple a + arityCsdTuple b+ toCsdTuple xs = (a, b)+ where a = toCsdTuple $ take (arityCsdTuple a) xs+ xsb = drop (arityCsdTuple a) xs + b = toCsdTuple (take (arityCsdTuple b) xsb)++instance (CsdTuple a, CsdTuple b, CsdTuple c) => CsdTuple (a, b, c) where+ fromCsdTuple (a, b, c) = fromCsdTuple (a, (b, c))+ arityCsdTuple (a, b, c) = arityCsdTuple (a, (b, c))+ toCsdTuple = (\(a, (b, c)) -> (a, b, c)) . toCsdTuple ++instance (CsdTuple a, CsdTuple b, CsdTuple c, CsdTuple d) => CsdTuple (a, b, c, d) where+ fromCsdTuple (a, b, c, d) = fromCsdTuple (a, (b, c, d))+ arityCsdTuple (a, b, c, d) = arityCsdTuple (a, (b, c, d))+ toCsdTuple = (\(a, (b, c, d)) -> (a, b, c, d)) . toCsdTuple++instance (CsdTuple a, CsdTuple b, CsdTuple c, CsdTuple d, CsdTuple e) => CsdTuple (a, b, c, d, e) where+ fromCsdTuple (a, b, c, d, e) = fromCsdTuple (a, (b, c, d, e))+ arityCsdTuple (a, b, c, d, e) = arityCsdTuple (a, (b, c, d, e))+ toCsdTuple = (\(a, (b, c, d, e)) -> (a, b, c, d, e)) . toCsdTuple++instance (CsdTuple a, CsdTuple b, CsdTuple c, CsdTuple d, CsdTuple e, CsdTuple f) => CsdTuple (a, b, c, d, e, f) where+ fromCsdTuple (a, b, c, d, e, f) = fromCsdTuple (a, (b, c, d, e, f))+ arityCsdTuple (a, b, c, d, e, f) = arityCsdTuple (a, (b, c, d, e, f))+ toCsdTuple = (\(a, (b, c, d, e, f)) -> (a, b, c, d, e, f)) . toCsdTuple++instance (CsdTuple a, CsdTuple b, CsdTuple c, CsdTuple d, CsdTuple e, CsdTuple f, CsdTuple g) => CsdTuple (a, b, c, d, e, f, g) where+ fromCsdTuple (a, b, c, d, e, f, g) = fromCsdTuple (a, (b, c, d, e, f, g))+ arityCsdTuple (a, b, c, d, e, f, g) = arityCsdTuple (a, (b, c, d, e, f, g))+ toCsdTuple = (\(a, (b, c, d, e, f, g)) -> (a, b, c, d, e, f, g)) . toCsdTuple++instance (CsdTuple a, CsdTuple b, CsdTuple c, CsdTuple d, CsdTuple e, CsdTuple f, CsdTuple g, CsdTuple h) => CsdTuple (a, b, c, d, e, f, g, h) where+ fromCsdTuple (a, b, c, d, e, f, g, h) = fromCsdTuple (a, (b, c, d, e, f, g, h))+ arityCsdTuple (a, b, c, d, e, f, g, h) = arityCsdTuple (a, (b, c, d, e, f, g, h))+ toCsdTuple = (\(a, (b, c, d, e, f, g, h)) -> (a, b, c, d, e, f, g, h)) . toCsdTuple++------------------------------------------------+-- multiple outs++multiOuts :: CsdTuple a => E -> a+multiOuts exp = res+ where res = toCsdTuple $ multiOutsSection (arityCsdTuple res) exp++multiOutsSection :: Int -> E -> [E]+multiOutsSection n e = zipWith (\n r -> select n r e') [0 ..] rates+ where rates = take n $ getRates $ ratedExpExp $ unFix e + e' = Fix $ onExp (setMultiRate rates) $ unFix e+ + setMultiRate rates (Tfm info xs) = Tfm (info{ infoSignature = MultiRate rates ins }) xs + where MultiRate _ ins = infoSignature info+ + select n r e = withRate r $ Select r n e++getRates :: Exp a -> [Rate]+getRates (Tfm info _) = case infoSignature info of+ MultiRate outs _ -> outs+ +isMultiOutSignature :: Signature -> Bool+isMultiOutSignature x = case x of+ MultiRate _ _ -> True+ _ -> False+
+ src/Csound/LowLevel.hs view
@@ -0,0 +1,85 @@+-- | Functions to make your own opcodes.+-- You can find a lot of examples in source code (see directory @Csound/Opcode@)+module Csound.LowLevel(+ -- * Types + Rate(..), Name, E, ++ -- * Handy shortcuts+ i, k, a, x, s, f, is, ks, as,++ -- * Standard opcodes++ -- | Example:+ --+ -- > oscil :: Sig -> Sig -> Tab -> Sig + -- > oscil = opc3 "oscil" [+ -- > (a, [x, x, i, i]),+ -- > (k, [k, k, i, i])]++ Spec1, + opcs, opc0, opc1, opc2, opc3, opc4, opc5, opc6, opc7, opc8, opc9, opc10, opc11,++ -- * Multiple outputs+ -- | Examples:+ --+ -- > pan2 :: Sig -> Sig -> (Sig, Sig)+ -- > pan2 = mopc2 "pan2" ([a, a], [a, x, i])+ --+ -- When you don't want to specify precise number of outputs:+ --+ -- > soundin :: CsdTuple a => S -> a+ -- > soundin = mopc1 "soundin" (repeat a, s : is 4)++ Specs,+ mopcs, mopc0, mopc1, mopc2, mopc3, mopc4, mopc5, mopc6, mopc7,++ -- * Side effects++ -- | Examples:+ --+ -- > delayr :: D -> SE Sig+ -- > delayr a1 = se $ opc1 "delayr" [(a, [i])] a1+ -- > + -- > delayw :: Sig -> SE ()+ -- > delayw a1 = se_ $ opc1 "delayw" [(x, [a])] a1+ --+ -- Functions that produce no values (procedures) should return value of the type 'Xr'.++ -- * When standard functions are not enough+ + -- | Sometimes Csound opcodes take too many parameters. If you want to + -- use them, you can always use functions that are defined on lists ('opcs' or 'mopcs').+ -- But in this case you have to convert all arguments to the same type 'E':+ --+ -- For example:+ --+ -- > oscil :: Sig -> Sig -> Tab -> Sig + -- > oscil a1 a2 a3 = opcs "oscil" signature [toE a1, toE a2, toE a3]+ -- > where signature = [+ -- > (a, [x, x, i, i]),+ -- > (k, [k, k, i, i])]+ + toE,++ se, se_+) where++import Data.Fix++import Csound.Exp+import Csound.Exp.Wrapper+import Csound.Exp.Cons+import Csound.Render.Sco(Msg)++i = Ir+k = Kr+a = Ar+x = Xr+s = Sr+f = Fr++is n = replicate n i+ks n = replicate n k +as n = replicate n a ++
+ src/Csound/Opcode.hs view
@@ -0,0 +1,22 @@+-- | Here you will find all opcodes from the Csound floss manual (<http://en.flossmanuals.net/csound/overview/>). +-- If you are missing some opcodes feel free to use "Csound.LowLevel". It's easy. +--+-- All opcodes are defined without initialisation arguments. If you want to supply the auxiliary arguments+-- use the function 'withInits'.+module Csound.Opcode (+ module Csound.Opcode.Basic,+ module Csound.Opcode.Advanced,+ module Csound.Opcode.Data,+ module Csound.Opcode.Interaction+) where++import Csound.Opcode.Basic+import Csound.Opcode.Advanced+import Csound.Opcode.Data+import Csound.Opcode.Interaction++ ++++
+ src/Csound/Opcode/Advanced.hs view
@@ -0,0 +1,918 @@+-- | Advanced Signal Processing+module Csound.Opcode.Advanced (+ -----------------------------------------------------+ -- * Modulation and Distortion++ -- ** Frequency Modulation+ foscil, foscili,+ crossfm, crossfmi, crosspm, crosspmi, crossfmpm, crossfmpmi,++ -- ** Distortion and Wave Shaping+ distort, distort1, powershape, polynomial, chebyshevpoly, ++ -- ** Flanging, Phasing, Phase Shaping+ flanger, harmon, phaser1, phaser2, pdclip, pdhalf, pdhalfy,++ -- ** Doppler Shift+ doppler,+ + -----------------------------------------------------+ -- * Convolution+ pconvolve, convolve, ftconv, dconv, ++ -----------------------------------------------------+ -- * FFT and Spectral Processing++ -- ** Realtime Analysis And Resynthesis+ pvsanal, pvstanal, pvsynth, pvsadsyn,++ -- ** Writing FFT Data To A File And Reading From It+ pvswrite, pvsfread, pvsdiskin,+ + -- ** FFT Info+ pvsinfo, pvsbin, pvscent, ++ -- ** Manipulating FFT Signals+ pvscale, pvshift, pvsbandp, pvsbandr, pvsmix, pvscross, pvsfilter,+ pvsvoc, pvsmorph, pvsfreeze, pvsmaska, pvsblur, pvstencil, pvsarp, pvsmooth,+ + -----------------------------------------------------+ -- * Physical Models and FM Instruments++ -- ** Waveguide Physical Modelling+ streson, pluck, repluck, wgbow, wgbowedbar, wgbrass,+ wgclar, wgflute, wgpluck, wgpluck2, wguide1, wguide2,++ -- ** FM Instrument Models+ fmb3, fmbell, fmmetal, fmpercfl, fmrhode, fmvoice, fmwurlie,+ + -- ** PhISEM opcodes+ -- | PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects. + bamboo, cabasa, crunch, dripwater, guiro, sandpaper, sekere, sleighbells, stix, tambourine,+ + -- ** Some Perry Cook's instruments+ -- | The method is a physically inspired model developed from Perry Cook, but re-coded for Csound. + gogobel, marimba, shaker, vibes,+ + -- ** Other Models + barmodel, mandol, moog, voice+) where++import Csound.Exp+import Csound.Exp.Wrapper+import Csound.LowLevel++-----------------------------------------------------+-- * Modulation and Distortion++-----------------------------------------------------+-- ** Frequency Modulation++-- | A basic frequency modulated oscillator. +--+-- > ares foscil xamp, kcps, xcar, xmod, kndx, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/foscil.html>+foscil :: Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+foscil = opc6 "foscil" [(a, [x, k, x, x, k, i, i])]++-- | Basic frequency modulated oscillator with linear interpolation. +--+-- > ares foscili xamp, kcps, xcar, xmod, kndx, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/foscili.html>+foscili :: Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+foscili = opc6 "foscili" [(a, [x, k, x, x, k, i, i])]+++-- | Two oscillators, mutually frequency and/or phase modulated by each other. +--+-- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+-- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+-- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+-- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+-- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+-- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]+--+-- doc: <http://www.csounds.com/manual/html/crossfm.html> +crossfmGen :: Name -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> (Sig, Sig)+crossfmGen name = mopc7 name ([a, a], [x, x, x, x, k, i, i, i, i])++crossfm, crossfmi, crosspm, crosspmi, crossfmpm, crossfmpmi :: Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> (Sig, Sig)++crossfm = crossfmGen "crossfm"+crossfmi = crossfmGen "crossfmi"+crosspm = crossfmGen "crosspm"+crosspmi = crossfmGen "crosspmi"+crossfmpm = crossfmGen "crossfmpm"+crossfmpmi = crossfmGen "crossfmpmi"++-----------------------------------------------------+-- ** Distortion and Wave Shaping++-- | Distort an audio signal via waveshaping and optional clipping. +--+-- > ar distort asig, kdist, ifn[, ihp, istor]+--+-- doc: <http://www.csounds.com/manual/html/distort.html>+distort :: Sig -> Sig -> Tab -> Sig+distort = opc3 "distort" [(a, [a, k, i, i, i])]++-- | Implementation of modified hyperbolic tangent distortion. distort1 can be used to generate wave shaping distortion based on a modification of the tanh function.+--+-- > exp(asig * (shape1 + pregain)) - exp(asig * (shape2 - pregain))+-- > aout = ---------------------------------------------------------------+-- > exp(asig * pregain) + exp(-asig * pregain)+--+-- > ares distort1 asig, kpregain, kpostgain, kshape1, kshape2[, imode]+--+-- doc: <http://www.csounds.com/manual/html/distort1.html>+distort1 :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig+distort1 = opc5 "distort1" [(a, [a, k, k, k, k, i])]++-- | The powershape opcode raises an input signal to a power with pre- and post-scaling of the signal so that +-- the output will be in a predictable range. It also processes negative inputs in a symmetrical way to positive inputs, calculating a dynamic transfer function that is useful for waveshaping. +--+-- > aout powershape ain, kShapeAmount [, ifullscale]+--+-- doc: <http://www.csounds.com/manual/html/powershape.html>+powershape :: Sig -> Sig -> Sig+powershape = opc2 "powershape" [(a, [a, k, i])]++-- | The polynomial opcode calculates a polynomial with a single a-rate input variable. The polynomial is a sum +-- of any number of terms in the form kn*x^n where kn is the nth coefficient of the expression. These coefficients are k-rate values. +--+-- > aout polynomial ain, k0 [, k1 [, k2 [...]]]+--+-- doc: <http://www.csounds.com/manual/html/polynomial.html>+polynomial :: Sig -> [Sig] -> Sig+polynomial a1 a2 = opcs "polynomial" [(a, a:repeat k)] (a1:a2)++-- | The chebyshevpoly opcode calculates the value of a polynomial expression with a single a-rate input variable that is +-- made up of a linear combination of the first N Chebyshev polynomials of the first kind. Each Chebyshev polynomial, Tn(x), +-- is weighted by a k-rate coefficient, kn, so that the opcode is calculating a sum of any number of terms in the form kn*Tn(x). +-- Thus, the chebyshevpoly opcode allows for the waveshaping of an audio signal with a dynamic transfer function that gives +-- precise control over the harmonic content of the output. +--+-- > aout chebyshevpoly ain, k0 [, k1 [, k2 [...]]]+--+-- doc: <http://www.csounds.com/manual/html/chebyshevpoly.html>+chebyshevpoly :: Sig -> [Sig] -> Sig+chebyshevpoly a1 a2 = opcs "chebyshevpoly" [(a, a:repeat k)] (a1:a2)++-----------------------------------------------------+-- ** Flanging, Phasing, Phase Shaping++-- | A user controlled flanger. +--+-- > ares flanger asig, adel, kfeedback [, imaxd]+--+-- doc: <http://www.csounds.com/manual/html/flanger.html>+flanger :: Sig -> Sig -> Sig -> Sig+flanger = opc3 "flanger" [(a, [a, a, k, i])]++-- | Analyze an audio input and generate harmonizing voices in synchrony. +--+-- > ares harmon asig, kestfrq, kmaxvar, kgenfreq1, kgenfreq2, imode, \+-- > iminfrq, iprd+--+-- doc: <http://www.csounds.com/manual/html/harmon.html>+harmon :: Sig -> Sig -> Sig -> Sig -> Sig -> D -> D -> D -> Sig +harmon = opc8 "harmon" [(a, [a, k, k, k, k, i, i, i])]++-- | An implementation of iord number of first-order allpass filters in series. +--+-- > ares phaser1 asig, kfreq, kord, kfeedback [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/phaser1.html>+phaser1 :: Sig -> Sig -> Sig -> Sig -> Sig+phaser1 = opc4 "phaser1" [(a, [a, k, k, k, i])]++-- | An implementation of iord number of second-order allpass filters in series. +--+-- > ares phaser2 asig, kfreq, kq, kord, kmode, ksep, kfeedback+--+-- doc: <http://www.csounds.com/manual/html/phaser2.html>+phaser2 :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+phaser2 = opc7 "phaser2" [(a, [a, k, k, k, k, k, k])]++-- | The pdclip opcode allows a percentage of the input range of a signal to be clipped to fullscale. +-- It is similar to simply multiplying the signal and limiting the range of the result, but pdclip +-- allows you to think about how much of the signal range is being distorted instead of the scalar +-- factor and has a offset parameter for assymetric clipping of the signal range. pdclip is also useful+-- for remapping phasors for phase distortion synthesis. +--+-- > aout pdclip ain, kWidth, kCenter [, ibipolar [, ifullscale]]+--+-- doc: <http://www.csounds.com/manual/html/pdclip.html>+pdclip :: Sig -> Sig -> Sig -> Sig+pdclip = opc3 "pdclip" [(a, [a, k, k, i, i])]++-- | The pdhalf opcode is designed to emulate the "classic" phase distortion synthesis method of the +-- Casio CZ-series of synthesizers from the mid-1980's. This technique reads the first and second halves +-- of a function table at different rates in order to warp the waveform. For example, pdhalf can smoothly +-- transform a sine wave into something approximating the shape of a saw wave. +--+-- > aout pdhalf ain, kShapeAmount [, ibipolar [, ifullscale]]+--+-- doc: <http://www.csounds.com/manual/html/pdhalf.html>+pdhalf :: Sig -> Sig -> Sig -> Sig+pdhalf = opc3 "pdhalf" [(a, [a, k, k, i, i])]++-- | The pdhalfy opcode is a variation on the phase distortion synthesis method of the pdhalf opcode. +-- It is useful for distorting a phasor in order to read two unequal portions of a table in the same number of samples. +--+-- > aout pdhalfy ain, kShapeAmount [, ibipolar [, ifullscale]]+--+-- doc: <http://www.csounds.com/manual/html/pdhalfy.html>+pdhalfy :: Sig -> Sig -> Sig -> Sig+pdhalfy = opc3 "pdhalfy" [(a, [a, k, k, i, i])]++-----------------------------------------------------+-- ** Doppler Shift++-- | A fast and robust method for approximating sound propagation, achieving convincing +-- Doppler shifts without having to solve equations. The method computes frequency shifts +-- based on reading an input delay line at a delay time computed from the distance between +-- source and mic and the speed of sound. One instance of the opcode is required for each +-- dimension of space through which the sound source moves. If the source sound moves at +-- a constant speed from in front of the microphone, through the microphone, to behind +-- the microphone, then the output will be frequency shifted above the source frequency +-- at a constant frequency while the source approaches, then discontinuously will be +-- shifted below the source frequency at a constant frequency as the source recedes from +-- the microphone. If the source sound moves at a constant speed through a point to one +-- side of the microphone, then the rate of change of position will not be constant, and +-- the familiar Doppler frequency shift typical of a siren or engine approaching and +-- receding along a road beside a listener will be heard. +--+-- > ashifted doppler asource, ksourceposition, kmicposition [, isoundspeed, ifiltercutoff]+--+-- doc: <http://www.csounds.com/manual/html/doppler.html>+doppler :: Sig -> Sig -> Sig -> Sig+doppler = opc3 "doppler" [(a, [a, k, k, i, i])]++-----------------------------------------------------+-- * Granular Synthesis++-----------------------------------------------------+-- * Convolution++-- | Convolution based on a uniformly partitioned overlap-save algorithm. Compared to the convolve opcode, pconvolve has these benefits:+--+-- * small delay+--+-- * possible to run in real-time for shorter impulse files+--+-- * no pre-process analysis pass+--+-- * can often render faster than convolve+--+--+-- > ar1 [, ar2] [, ar3] [, ar4] pconvolve ain, ifilcod [, ipartitionsize, ichannel]+--+-- doc: <http://www.csounds.com/manual/html/pconvolve.html>+pconvolve :: CsdTuple a => Sig -> Str -> a+pconvolve = mopc2 "pconvolve" ([a,a,a,a], [a,s,i,i])++-- | Output is the convolution of signal ain and the impulse response contained in ifilcod. If more than one +-- output signal is supplied, each will be convolved with the same impulse response. Note that it is +-- considerably more efficient to use one instance of the operator when processing a mono input to create stereo, or quad, outputs. +--+-- > ar1 [, ar2] [, ar3] [, ar4] convolve ain, ifilcod [, ichannel]+--+-- doc: <http://www.csounds.com/manual/html/convolve.html>+convolve :: CsdTuple a => Sig -> D -> a+convolve = mopc2 "convolve" ([a, a, a, a], [a, i, i])++-- | Low latency multichannel convolution, using a function table as impulse response source. The algorithm is to split the +-- impulse response to partitions of length determined by the iplen parameter, and delay and mix partitions so that the original, +-- full length impulse response is reconstructed without gaps. The output delay (latency) is iplen samples, and does not depend +-- on the control rate, unlike in the case of other convolve opcodes. +--+-- > a1[, a2[, a3[, ... a8]]] ftconv ain, ift, iplen[, iskipsamples \+-- > [, iirlen[, iskipinit]]]+--+-- doc: <http://www.csounds.com/manual/html/ftconv.html>+ftconv :: CsdTuple a => Sig -> Tab -> D -> a+ftconv = mopc3 "ftconv" (as 8, [a,i,i,i,i,i])++-- | A direct convolution opcode. +--+-- > ares dconv asig, isize, ifn+--+-- doc: <http://www.csounds.com/manual/html/dconv.html>+dconv :: Sig -> I -> Tab -> Sig+dconv = opc3 "dconv" [(a, [a,i,i])]++-----------------------------------------------------+-- * FFT and Spectral Processing++-----------------------------------------------------+-- ** Realtime Analysis And Resynthesis++-- | Generate an fsig from a mono audio source ain, using phase vocoder overlap-add analysis. +--+-- > fsig pvsanal ain, ifftsize, ioverlap, iwinsize, iwintype [, iformat] [, iinit]+--+-- doc: <http://www.csounds.com/manual/html/pvsanal.html>+pvsanal :: Sig -> I -> I -> I -> I -> Spec+pvsanal = opc5 "pvsanal" [(f, a:is 6)]++-- | pvstanal implements phase vocoder analysis by reading function tables containing sampled-sound sources, with GEN01, and pvstanal will accept deferred allocation tables.+-- +-- This opcode allows for time and frequency-independent scaling. Time is advanced internally, but controlled by a tempo scaling parameter; when an onset is detected, +-- timescaling is momentarily stopped to avoid smearing of attacks. The quality of the effect is generally improved with phase locking switched on.+-- +-- pvstanal will also scale pitch, independently of frequency, using a transposition factor (k-rate). +--+-- > fsig pvstanal ktimescal, kamp, kpitch, ktab, [kdetect, kwrap, ioffset,ifftsize, ihop, idbthresh]+--+-- doc: <http://www.csounds.com/manual/html/pvstanal.html>+pvstanal :: Sig -> Sig -> Sig -> Sig -> Spec+pvstanal = opc4 "pvstanal" [(f, ks 6 ++ is 4)]++-- | Resynthesise phase vocoder data (f-signal) using a FFT overlap-add. +--+-- > ares pvsynth fsrc, [iinit]+--+-- doc: <http://www.csounds.com/manual/html/pvsynth.html>+pvsynth :: Spec -> Sig+pvsynth = opc1 "pvsynth" [(a, [f,i])]++-- | Resynthesize using a fast oscillator-bank. +--+-- > ares pvsadsyn fsrc, inoscs, kfmod [, ibinoffset] [, ibinincr] [, iinit]+--+-- doc: <http://www.csounds.com/manual/html/pvsadsyn.html>+pvsadsyn :: Spec -> I -> Sig -> Sig+pvsadsyn = opc3 "pvsadsyn" [(a, [f,i,k,i,i,i])]++-----------------------------------------------------+-- ** Writing FFT Data To A File And Reading From It++-- | This opcode writes a fsig to a PVOCEX file (which in turn can be read by pvsfread or other programs that support PVOCEX file input). +--+-- > pvsfwrite fsig, ifile+--+-- doc: <http://www.csounds.com/manual/html/pvsfwrite.html>+pvswrite :: Spec -> Str -> SE ()+pvswrite a1 a2 = se_ $ opc2 "pvswrite" [(x, [f,s])] a1 a2++-- | Create an fsig stream by reading a selected channel from a PVOC-EX analysis file loaded into memory, with frame +-- interpolation. Only format 0 files (amplitude+frequency) are currently supported. The operation of this opcode +-- mirrors that of pvoc, but outputs an fsig instead of a resynthesized signal. +--+-- > fsig pvsfread ktimpt, ifn [, ichan]+--+-- doc: <http://www.csounds.com/manual/html/pvsfread.html>+pvsfread :: Sig -> Str -> Spec+pvsfread = opc2 "pvsfread" [(f, [k,s,i])]++-- | Create an fsig stream by reading a selected channel from a PVOC-EX analysis file, with frame interpolation. +--+-- > fsig pvsdiskin SFname,ktscal,kgain[,ioffset, ichan]+--+-- doc: <http://www.csounds.com/manual/html/pvsdiskin.html>+pvsdiskin :: Str -> Sig -> Sig -> Spec+pvsdiskin = opc3 "pvsdiskin" [(f, [s,k,k,i,i])]++-----------------------------------------------------+-- ** FFT Info++-- | Get format information about fsrc, whether created by an opcode such as pvsanal, or obtained from +-- a PVOCEX file by pvsfread. This information is available at init time, and can be used to set parameters +-- for other pvs opcodes, and in particular for creating function tables (e.g. for pvsftw), or setting +-- the number of oscillators for pvsadsyn. +--+-- > ioverlap, inumbins, iwinsize, iformat pvsinfo fsrc+--+-- doc: <http://www.csounds.com/manual/html/pvsinfo.html>+pvsinfo :: Spec -> (I, I, I, I)+pvsinfo = mopc1 "pvsinfo" ([i,i,i,i], [f])++-- | Obtain the amp and freq values off a PVS signal bin as k-rate variables. +--+-- > kamp, kfr pvsbin fsig, kbin+--+-- doc: <http://www.csounds.com/manual/html/pvsbin.html>+pvsbin :: Spec -> Sig -> (Sig, Sig)+pvsbin = mopc2 "pvsbin" ([k,k], [f,k])++-- | Calculate the spectral centroid of a signal from its discrete Fourier transform. +--+-- > kcent pvscent fsig+--+-- doc: <http://www.csounds.com/manual/html/pvscent.html>+pvscent :: Spec -> Sig+pvscent = opc1 "pvscent" [(k, [f])]++-----------------------------------------------------+-- ** Manipulating FFT Signals++-- | Scale the frequency components of a pv stream, resulting in pitch shift. Output amplitudes can be optionally modified in order to attempt formant preservation. +--+-- > fsig pvscale fsigin, kscal[, kkeepform, kgain, kcoefs]+--+-- doc: <http://www.csounds.com/manual/html/pvscale.html>+pvscale :: Spec -> Sig -> Spec+pvscale = opc2 "pvscale" [(f, [f,k,k,k,k])]++-- | Shift the frequency components of a pv stream, stretching/compressing its spectrum. +--+-- > fsig pvshift fsigin, kshift, klowest[, kkeepform, igain, kcoefs]+--+-- doc: <http://www.csounds.com/manual/html/pvshift.html>+pvshift :: Spec -> Sig -> Sig -> Spec+pvshift = opc3 "pvshift" [(f, [f,k,k,k,i,k])]++-- | Filter the pvoc frames, passing bins whose frequency is within a band, and with linear interpolation for transitional bands. +--+-- > fsig pvsbandp fsigin, xlowcut, xlowfull, \+-- > xhighfull, xhighcut[, ktype]+--+-- doc: <http://www.csounds.com/manual/html/pvsbandp.html>+pvsbandp :: Spec -> Sig -> Sig -> Sig -> Sig -> Spec +pvsbandp = opc5 "pvsbandp" [(f, [f,x,x,x,x,k])]++-- | Filter the pvoc frames, rejecting bins whose frequency is within a band, and with linear interpolation for transitional bands. +--+-- > fsig pvsbandr fsigin, xlowcut, xlowfull, \+-- > xhighfull, xhighcut[, ktype]+--+-- doc: <http://www.csounds.com/manual/html/pvsbandr.html>+pvsbandr :: Spec -> Sig -> Sig -> Sig -> Sig -> Spec +pvsbandr = opc5 "pvsbandr" [(f, [f,x,x,x,x,k])]++-- | Mix 'seamlessly' two pv signals. This opcode combines the most prominent components of two pvoc streams into a single mixed stream. +--+-- > fsig pvsmix fsigin1, fsigin2+--+-- doc: <http://www.csounds.com/manual/html/pvsmix.html>+pvsmix :: Spec -> Spec -> Spec+pvsmix = opc2 "pvsmix" [(f, [f,f])]++-- | Performs cross-synthesis between two source fsigs. +--+-- > fsig pvscross fsrc, fdest, kamp1, kamp2+--+-- doc: <http://www.csounds.com/manual/html/pvscross.html>+pvscross :: Spec -> Spec -> Sig -> Sig -> Spec+pvscross = opc4 "pvscross" [(f, [f,f,k,k])]++-- | Multiply amplitudes of a pvoc stream by those of a second pvoc stream, with dynamic scaling. +--+-- > fsig pvsfilter fsigin, fsigfil, kdepth[, igain]+--+-- doc: <http://www.csounds.com/manual/html/pvsfilter.html>+pvsfilter :: Spec -> Spec -> Sig -> Spec+pvsfilter = opc3 "pvsfilter" [(f, [f,f,k,i])]++-- | This opcode provides support for cross-synthesis of amplitudes and frequencies. It takes the amplitudes +-- of one input fsig and combines with frequencies from another. It is a spectral version of the well-known channel vocoder. +--+-- > fsig pvsvoc famp, fexc, kdepth, kgain [,kcoefs]+--+-- doc: <http://www.csounds.com/manual/html/pvsvoc.html>+pvsvoc :: Spec -> Spec -> Sig -> Sig -> Spec+pvsvoc = opc4 "pvsvoc" [(f, [f,f,k,k,k])]++-- | Performs morphing (or interpolation) between two source fsigs. +--+-- > fsig pvsmorph fsrc, fdest, kamp1, kamp2+--+-- doc: <http://www.csounds.com/manual/html/pvsmotph.html>+pvsmorph :: Spec -> Spec -> Sig -> Sig -> Spec+pvsmorph = opc4 "pvsmorph" [(f, [f,f,k,k])]++-- | This opcodes 'freezes' the evolution of pvs stream by locking into steady amplitude and/or frequency +-- values for each bin. The freezing is controlled, independently for amplitudes and frequencies, by a +-- control-rate trigger, which switches the freezing 'on' if equal to or above 1 and 'off' if below 1. +--+-- > fsig pvsfreeze fsigin, kfreeza, kfreezf+--+-- doc: <http://www.csounds.com/manual/html/pvsfreeze.html>+pvsfreeze :: Spec -> Sig -> Sig -> Sig+pvsfreeze = opc3 "pvsfreeze" [(f, [f,k,k])]++-- | Modify amplitudes of fsrc using function table, with dynamic scaling. +--+-- > fsig pvsmaska fsrc, ifn, kdepth+--+-- doc: <http://www.csounds.com/manual/html/pvsmaska.html>+pvsmaska :: Spec -> Tab -> Sig -> Spec+pvsmaska = opc3 "pvsmaska" [(f, [f,i,k])]++-- | Average the amp/freq time functions of each analysis channel for a specified time (truncated to number of frames). As a side-effect the input pvoc stream will be delayed by that amount. +--+-- > fsig pvsblur fsigin, kblurtime, imaxdel+--+-- doc: <http://www.csounds.com/manual/html/pvsblur.html>+pvsblur :: Spec -> Sig -> D -> Spec+pvsblur = opc3 "pvsblur" [(f, [f,k,i])]++-- | Transforms a pvoc stream according to a masking function table; if the pvoc stream amplitude +-- falls below the value of the function for a specific pvoc channel, it applies a gain to that channel.+-- +-- The pvoc stream amplitudes are compared to a masking table, if the fall below the table values, they+-- are scaled by kgain. Prior to the operation, table values are scaled by klevel, which can be used as masking depth control.+-- +-- Tables have to be at least fftsize/2 in size; for most GENS it is important to use an extended-guard +-- point (size power-of-two plus one), however this is not necessary with GEN43.+-- +-- One of the typical uses of pvstencil would be in noise reduction. A noise print can be analysed with +-- pvanal into a PVOC-EX file and loaded in a table with GEN43. This then can be used as the masking table+-- for pvstencil and the amount of reduction would be controlled by kgain. Skipping post-normalisation will +-- keep the original noise print average amplitudes. This would provide a good starting point for a successful +-- noise reduction (so that klevel can be generally set to close to 1).+-- +-- Other possible transformation effects are possible, such as filtering and `inverse-masking'.+--+-- > fsig pvstencil fsigin, kgain, klevel, iftable+--+-- doc: <http://www.csounds.com/manual/html/pvstencil.html>+pvstencil :: Spec -> Sig -> Sig -> Tab -> Sig+pvstencil = opc4 "pvstencil" [(f, [f,k,k,i])]++-- | This opcode arpeggiates spectral components, by amplifying one bin and attenuating all the others around +-- it. Used with an LFO it will provide a spectral arpeggiator similar to Trevor Wishart's CDP program specarp. +--+-- > fsig pvsarp fsigin, kbin, kdepth, kgain+--+-- doc: <http://www.csounds.com/manual/html/pvsarp.html>+pvsarp :: Spec -> Sig -> Sig -> Sig -> Spec+pvsarp = opc4 "pvsarp" [(f, [f,k,k,k])]++-- | Smooth the amplitude and frequency time functions of a pv stream using a 1st order lowpass IIR with time-varying +-- cutoff frequency. This opcode uses the same filter as the tone opcode, but this time acting separately on the amplitude+-- and frequency time functions that make up a pv stream. The cutoff frequency parameter runs at the control-rate, but unlike +-- tone and tonek, it is not specified in Hz, but as fractions of 1/2 frame-rate (actually the pv stream sampling rate),+-- which is easier to understand. This means that the highest cutoff frequency is 1 and the lowest 0; the lower the +-- frequency the smoother the functions and more pronounced the effect will be.+-- +-- These are filters applied to control signals so the effect is basically blurring the spectral evolution. The effects +-- produced are more or less similar to pvsblur, but with two important differences: 1.smoothing of amplitudes and +-- frequencies use separate sets of filters; and 2. there is no increase in computational cost when higher amounts +-- of "blurring" (smoothing) are desired. +--+-- > fsig pvsmooth fsigin, kacf, kfcf+--+-- doc: <http://www.csounds.com/manual/html/pvsmooth.html>+pvsmooth :: Spec -> Sig -> Sig -> Spec+pvsmooth = opc3 "pvsmooth" [(f, [f,k,k])]++-----------------------------------------------------+-- * Physical Models and FM Instruments++-----------------------------------------------------+-- ** Waveguide Physical Modelling++-- | An audio signal is modified by a string resonator with variable fundamental frequency. +--+-- > ares streson asig, kfr, ifdbgain+--+-- doc: <http://www.csounds.com/manual/html/streson.html>+streson :: Sig -> Sig -> D -> Sig+streson = opc3 "streson" [(a, [a,k,i])]++-- | Audio output is a naturally decaying plucked string or drum sound based on the Karplus-Strong algorithms. +--+-- > ares pluck kamp, kcps, icps, ifn, imeth [, iparm1] [, iparm2] +--+-- doc: <http://www.csounds.com/manual/html/pluck.html>+pluck :: Sig -> Sig -> D -> Tab -> I -> Sig+pluck = opc5 "pluck" [(a, [k,k,i,i,i,i,i])]++-- | repluck is an implementation of the physical model of the plucked string. A user can control the pluck point, +-- the pickup point, the filter, and an additional audio signal, axcite. axcite is used to excite the 'string'. Based on the Karplus-Strong algorithm. +--+-- > ares repluck iplk, kamp, icps, kpick, krefl, axcite+--+-- doc: <http://www.csounds.com/manual/html/repluck.html>+repluck :: D -> Sig -> D -> Sig -> Sig -> Sig -> Sig+repluck = opc6 "repluck" [(a, [i,k,i,k,k,a])]++-- | Audio output is a tone similar to a bowed string, using a physical model developed from Perry Cook, but re-coded for Csound. +--+-- > ares wgbow kamp, kfreq, kpres, krat, kvibf, kvamp, ifn [, iminfreq]+--+-- doc: <http://www.csounds.com/manual/html/wgbow.html>+wgbow :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+wgbow = opc7 "wgbow" [(a, ks 6 ++ is 2)]++-- | A physical model of a bowed bar, belonging to the Perry Cook family of waveguide instruments. +--+-- > ares wgbowedbar kamp, kfreq, kpos, kbowpres, kgain [, iconst] [, itvel] \+-- > [, ibowpos] [, ilow]+--+-- doc: <http://www.csounds.com/manual/html/wgbowedbar.html>+wgbowedbar :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig+wgbowedbar = opc5 "wgbowedbar" [(a, ks 5 ++ is 2)]++-- | Audio output is a tone related to a brass instrument, using a physical model developed from Perry Cook, but re-coded for Csound. +--+-- > ares wgbrass kamp, kfreq, ktens, iatt, kvibf, kvamp, ifn [, iminfreq] +--+-- doc: <http://www.csounds.com/manual/html/wgbrass.html>+wgbrass :: Sig -> Sig -> Sig -> D -> Sig -> Sig -> Tab -> Sig +wgbrass = opc7 "wgbrass" [(a, [k,k,k,i,k,k,i,i])]++-- | Audio output is a tone similar to a clarinet, using a physical model developed from Perry Cook, but re-coded for Csound. +--+-- > ares wgclar kamp, kfreq, kstiff, iatt, idetk, kngain, kvibf, kvamp, ifn \+-- > [, iminfreq]+--+-- doc: <http://www.csounds.com/manual/html/wgclar.html>+wgclar :: Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> Tab -> Sig+wgclar = opc9 "wgclar" [(a, [k,k,k,i,i,k,k,k,i,i])]++-- | Audio output is a tone similar to a flute, using a physical model developed from Perry Cook, but re-coded for Csound. +--+-- > ares wgflute kamp, kfreq, kjet, iatt, idetk, kngain, kvibf, kvamp, ifn \+-- > [, iminfreq] [, ijetrf] [, iendrf]+--+-- doc: <http://www.csounds.com/manual/html/wgflute.html>+wgflute :: Sig -> Sig -> Sig -> D -> D -> Sig -> Sig -> Sig -> Tab -> Sig+wgflute = opc9 "wgflute" [(a, [k,k,k,i,i,k,k,k,i,i,i,i])]++-- | A high fidelity simulation of a plucked string, using interpolating delay-lines. +--+-- > ares wgpluck icps, iamp, kpick, iplk, idamp, ifilt, axcite+--+-- doc: <http://www.csounds.com/manual/html/wgpluck.html>+wgpluck :: D -> D -> Sig -> D -> D -> D -> Sig -> Sig+wgpluck = opc7 "wgplusk" [(a, [i,i,k,i,i,i,a])]++-- | wgpluck2 is an implementation of the physical model of the plucked string, with control over the pluck point, the pickup point and the filter. Based on the Karplus-Strong algorithm. +--+-- > ares wgpluck2 iplk, kamp, icps, kpick, krefl+--+-- doc: <http://www.csounds.com/manual/html/wgpluck2.html>+wgpluck2 :: D -> Sig -> D -> Sig -> Sig -> Sig+wgpluck2 = opc5 "wgpluck2" [(a, [i,k,i,k,k])]++-- | A simple waveguide model consisting of one delay-line and one first-order lowpass filter. +--+-- > ares wguide1 asig, xfreq, kcutoff, kfeedback+--+-- doc: <http://www.csounds.com/manual/html/wguide1.html>+wguide1 :: Sig -> Sig -> Sig -> Sig -> Sig+wguide1 = opc4 "wguide1" [(a, [a,x,k,k])]++-- | A model of beaten plate consisting of two parallel delay-lines and two first-order lowpass filters. +--+-- > ares wguide2 asig, xfreq1, xfreq2, kcutoff1, kcutoff2, \+-- > kfeedback1, kfeedback2+--+-- doc: <http://www.csounds.com/manual/html/wguide2.html>+wguide2 :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig+wguide2 = opc7 "wguide2" [(a, [a,x,x,k,k,k,k])]+ +----------------------------------------------------+-- ** FM Instrument Models+++fmGen :: Name -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+fmGen name = opc11 name [(a, ks 6 ++ is 6)]+++-- | Uses FM synthesis to create a Hammond B3 organ sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer. +--+-- > ares fmb3 kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, \+-- > ifn4, ivfn+--+-- doc: <http://www.csounds.com/manual/html/fmb3.html>+fmb3 :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+++-- | Uses FM synthesis to create a tublar bell sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer. +--+-- > ares fmbell kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, \+-- > ifn4, ivfn[, isus]+--+-- doc: <http://www.csounds.com/manual/html/fmbell.html>+fmbell :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig++-- | Uses FM synthesis to create a “Heavy Metal” sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer. +--+-- > ares fmmetal kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, \+-- > ifn4, ivfn+--+-- doc: <http://www.csounds.com/manual/html/fmmetal.html>+fmmetal :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig++-- | Uses FM synthesis to create a percussive flute sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer. +--+-- > ares fmpercfl kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, \+-- > ifn3, ifn4, ivfn+--+-- doc: <http://www.csounds.com/manual/html/fmpercfl.html>+fmpercfl :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig++-- | Uses FM synthesis to create a Fender Rhodes electric piano sound. It comes from a family of FM sounds, all using 4 basic oscillators and various architectures, as used in the TX81Z synthesizer. +--+-- > ares fmrhode kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, \+-- > ifn3, ifn4, ivfn+--+-- doc: <http://www.csounds.com/manual/html/fmrhode.html>++fmrhode :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig++-- | FM Singing Voice Synthesis +--+-- > ares fmvoice kamp, kfreq, kvowel, ktilt, kvibamt, kvibrate, ifn1, \+-- > ifn2, ifn3, ifn4, ivibfn+--+-- doc: <http://www.csounds.com/manual/html/fmvoice.html>+fmvoice :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+++fmwurlie :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Tab -> Tab -> Sig+ +fmb3 = fmGen "fmb3"+fmbell = fmGen "fmbell"+fmmetal = fmGen "fmmetal"+fmpercfl = fmGen "fmpercfl"+fmrhode = fmGen "fmrhode"+fmvoice = fmGen "fmvoice"+fmwurlie = fmGen "fmwurlie"++--------------------------------------------------------------------+-- PhISEM percussion opcodes. ++-- | bamboo is a semi-physical model of a bamboo sound.+-- +-- > ares bamboo kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- > [, ifreq1] [, ifreq2]+--+-- doc: <http://www.csounds.com/manual/html/bamboo.html> ++bamboo :: Sig -> D -> Sig+bamboo = opc2 "bamboo" [(a, k:is 7)]++-- | cabasa is a semi-physical model of a cabasa sound.+--+-- > ares cabasa iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- doc: <http://www.csounds.com/manual/html/cabasa.html> +cabasa :: D -> D -> Sig+cabasa = opc2 "cabasa" [(a, is 5)]++-- | crunch is a semi-physical model of a crunch sound.+--+-- > ares crunch iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- doc: <http://www.csounds.com/manual/html/crunch.html> ++crunch :: D -> D -> Sig+crunch = opc2 "crunch" [(a, is 5)]++-- | dripwater is a semi-physical model of a water drop.+--+-- > ares dripwater kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- > [, ifreq1] [, ifreq2]+--+-- doc: <http://www.csounds.com/manual/html/dripwater.html> ++dripwater :: Sig -> D -> Sig+dripwater = opc2 "dripwater" [(a, k:is 7)]++-- | guiro is a semi-physical model of a guiro sound.+--+-- > ares guiro kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] [, ifreq1]+--+-- doc: <http://www.csounds.com/manual/html/guiro.html> ++guiro :: Sig -> D -> Sig+guiro = opc2 "guiro" [(a, k:is 7)]++-- | sandpaper is a semi-physical model of a sandpaper sound.+--+-- > ares sandpaper iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- doc: <http://www.csounds.com/manual/html/sandpaper.html> ++sandpaper :: D -> D -> Sig+sandpaper = opc2 "sandpaper" [(a, is 5)]++-- | sekere is a semi-physical model of a sekere sound.+--+-- > ares sekere iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- doc: <http://www.csounds.com/manual/html/sekere.html> ++sekere :: D -> D -> Sig+sekere = opc2 "sekere" [(a, is 5)]++-- | sleighbells is a semi-physical model of a sleighbell sound.+--+-- > ares sleighbells kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- > [, ifreq1] [, ifreq2]+--+-- doc: <http://www.csounds.com/manual/html/sleighbells.html> ++sleighbells :: Sig -> D -> Sig+sleighbells = opc2 "sleighbells" [(a, k:is 7)]++-- | stix is a semi-physical model of a stick sound.+--+-- > ares stix iamp, idettack [, inum] [, idamp] [, imaxshake]+--+-- doc: <http://www.csounds.com/manual/html/stix.html> ++stix :: D -> D -> Sig+stix = opc2 "stix" [(a, is 5)]++-- | tambourine is a semi-physical model of a tambourine sound.+--+-- > ares tambourine kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] \+-- > [, ifreq1] [, ifreq2]+--+-- doc: <http://www.csounds.com/manual/html/tambourine.html> +tambourine :: Sig -> D -> Sig+tambourine = opc2 "tambourine" [(a, k:is 7)]++-------------------------------------------------------------+-- by Perry Cook++-- | Audio output is a tone related to the striking of a cow bell or similar. +--+-- > ares gogobel kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivfn+--+-- doc: <http://www.csounds.com/manual/html/gogobel.html> ++gogobel :: Sig -> Sig -> D -> D -> D -> Sig -> Sig -> Tab -> Sig+gogobel = opc8 "gogobel" [(a, [k,k,i,i,i,k,k,i])]+++-- | Audio output is a tone related to the striking of a wooden block as found in a marimba.+--+-- > ares marimba kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec \+-- > [, idoubles] [, itriples]+--+-- doc: <http://www.csounds.com/manual/html/marimba.html> ++marimba :: Sig -> Sig -> D -> D -> Tab -> Sig -> Sig -> Tab -> D -> Sig+marimba = opc9 "marimba" [(a, [k,k,i,i,i,k,k,i,i,i,i])]++-- | Audio output is a tone related to the shaking of a maraca or similar gourd instrument.+--+-- > ares shaker kamp, kfreq, kbeans, kdamp, ktimes [, idecay]+--+-- doc: <http://www.csounds.com/manual/html/shaker.html> ++shaker :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig+shaker = opc5 "shaker" [(a, ks 5 ++ [i])]+++-- | Audio output is a tone related to the striking of a metal block as found in a vibraphone.+--+-- > ares vibes kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec+--+-- doc: <http://www.csounds.com/manual/html/vibes.html> ++vibes :: Sig -> Sig -> D -> D -> Tab -> Sig -> Sig -> Tab -> D -> Sig+vibes = opc9 "vibes" [(a, [k,k,i,i,i,k,k,i,i])]++---------------------------------------------------------------+-- other models+++-- | Audio output is a tone similar to a struck metal bar, using a physical model developed from solving the partial+-- differential equation. There are controls over the boundary conditions as well as the bar characteristics. +--+-- > ares barmodel kbcL, kbcR, iK, ib, kscan, iT30, ipos, ivel, iwid+--+-- doc: <http://www.csounds.com/manual/html/barmodel.html> +barmodel :: Sig -> Sig -> D -> D -> Sig -> D -> D -> D -> D -> Sig+barmodel = opc9 "barmodel" [(a, [k,k,i,i,k,i,i,i,i])]++-- | An emulation of a mandolin. +--+-- > ares mandol kamp, kfreq, kpluck, kdetune, kgain, ksize, ifn [, iminfreq]+--+-- doc: <http://www.csounds.com/manual/html/mandol.html> ++mandol :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+mandol = opc7 "mandol" [(a, ks 6 ++ is 2)]+++-- | An emulation of a mini-Moog synthesizer. +--+-- > ares moog kamp, kfreq, kfiltq, kfiltrate, kvibf, kvamp, iafn, iwfn, ivfn+--+-- doc: <http://www.csounds.com/manual/html/moog.html> ++moog :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Tab -> Sig+moog = opc9 "moog" [(a, ks 6 ++ is 3)]+ ++-- | An emulation of a human voice. +--+-- > ares voice kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn+--+-- doc: <http://www.csounds.com/manual/html/voice.html> ++voice :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Tab -> Sig+voice = opc9 "voice" [(a, [k,k,k,k,k,k,k,i,i])]+ +
+ src/Csound/Opcode/Basic.hs view
@@ -0,0 +1,992 @@+-- | Basic signal processing+module Csound.Opcode.Basic(+ -----------------------------------------------------+ -- * Global constants+ idur, zeroDbfs, sampleRate, blockSize,++ -----------------------------------------------------+ -- * Oscillators and phasors++ -- ** Standard Oscillators+ oscils, poscil, poscil3, oscil, oscili, oscil3,++ -- ** Dynamic Sprectrum Oscillators+ buzz, gbuzz, mpulse, vco, vco2, ++ -- ** Phasors+ phasor, syncphasor,++ -----------------------------------------------------+ -- * Random and Noise generators + rand, randi, randh, rnd31, random, randomi, randomh, pinkish, noise,++ -----------------------------------------------------+ -- * Envelopes+ linseg, expseg, linsegr, expsegr,+ lpshold, loopseg, looptseg, ++ -----------------------------------------------------+ -- * Delays++ -- ** Audio delays+ vdelay, vdelayx, vdelayxw,+ delayr, delayw, deltap, deltapi, deltap3, deltapx, deltapxw,++ -- ** Control delays++ -----------------------------------------------------+ -- * Filters++ -- ** Low Pass Filters+ tone, butlp,++ -- ** High Pass Filters+ atone, buthp,++ -- ** Band Pass And Resonant Filters+ reson, butbp,++ -- ** Band Reject Filters+ areson, butbr,++ -- ** Filters For Smoothing Control Signals+ port, portk,++ -- ** Other filters+ moogladder, vcomb, bqrez, comb,++ -----------------------------------------------------+ -- * Reverb+ freeverb, reverbsc, reverb, nreverb, babo, ++ -----------------------------------------------------+ -- * Signal Measurement, Dynamic Processing, Sample Level Operations++ -- ** Amplitude Measurement And Following+ rms, balance, follow, follow2, peak, max_k,++ -- ** Pitch Estimation+ ptrack, pitch, pitchamdf, tempest,++ -- ** Tempo Estimation++ -- ** Dynamic Processing+ compress, dam, clip, ++ -- ** Sample Level Operations+ limit, samphold, vaget, vaset, ++ -----------------------------------------------------+ -- * Spatialization++ -- ** Panning+ pan, pan2,++ -- ** Binaural / HTRF+ hrtfstat, hrtfmove, hrtfmove2,++ -----------------------------------------------------+ -- * Other + xtratim+) where++import Csound.Exp+import Csound.Exp.Wrapper+import Csound.LowLevel++-- | Reads @p3@-argument for the current instrument.+idur :: D+idur = p 3+ +-- | Reads @0dbfs@ value.+zeroDbfs :: D+zeroDbfs = (setRate Ir :: E -> D) $ readVar (VarVerbatim Ir "0dbfs")++-- | Reads @sr@ value.+sampleRate :: D+sampleRate = (setRate Ir :: E -> I) $ readVar (VarVerbatim Ir "sr")++-- | Reads @ksmps@ value.+blockSize :: D+blockSize = (setRate Ir :: E -> I) $ readVar (VarVerbatim Ir "ksmps")++-----------------------------------------------------+-- Standard Oscillators+++-- | Simple, fast sine oscillator, that uses only one multiply, and two add operations to generate one sample of output, and does not require a function table. +--+-- > ares oscils iamp, icps, iphs [, iflg]+--+-- doc: <http://www.csounds.com/manual/html/oscils.html>+oscils :: D -> D -> D -> Sig+oscils = opc3 "oscils" [(a, [i, i, i])]++oscGen :: Name -> Sig -> Sig -> Tab -> Sig +oscGen name = opc3 name [+ (a, [x, x, i, i]),+ (k, [k, k, i, i])]++-- | oscil reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp. +--+-- > ares oscil xamp, xcps, ifn [, iphs]+-- > kres oscil kamp, kcps, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/oscil.html>+oscil :: Sig -> Sig -> Tab -> Sig+oscil = oscGen "oscil"++-- | oscili reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp. Linear interpolation is applied for table look up from internal phase values. +--+-- > ares oscili xamp, xcps, ifn [, iphs]+-- > kres oscili kamp, kcps, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/oscili.html>+oscili :: Sig -> Sig -> Tab -> Sig+oscili = oscGen "oscili"++-- | oscil3 reads table ifn sequentially and repeatedly at a frequency xcps. The amplitude is scaled by xamp. Cubic interpolation is applied for table look up from internal phase values. +--+-- > ares oscil3 xamp, xcps, ifn [, iphs]+-- > kres oscil3 kamp, kcps, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/oscil3.html>++oscil3 :: Sig -> Sig -> Tab -> Sig+oscil3 = oscGen "oscil3"++-- | High precision oscillator. +--+-- > ares poscil xamp, xcps, ifn [, iphs]+-- > kres poscil kamp, kcps, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/poscil.html>++poscil :: Sig -> Sig -> Tab -> Sig+poscil = oscGen "poscil"++-- | High precision oscillator with cubic interpolation. +--+-- > ares poscil3 xamp, xcps, ifn [, iphs]+-- > kres poscil3 kamp, kcps, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/poscil3.html>++poscil3 :: Sig -> Sig -> Tab -> Sig+poscil3 = oscGen "poscil3"++-----------------------------------------------------+-- Dynamic Sprectrum Oscillators++-- buzz, gbuzz, mpulse, vco, vco2 ++-- | Output is a set of harmonically related sine partials. +--+-- > ares buzz xamp, xcps, knh, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/buzz.html> ++buzz :: Sig -> Sig -> Sig -> Tab -> Sig+buzz = opc4 "buzz" [(a, [x, x, k, i, i])]++-- | Output is a set of harmonically related cosine partials. +--+-- > ares gbuzz xamp, xcps, knh, klh, kmul, ifn [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/gbuzz.html> ++gbuzz :: Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig+gbuzz = opc6 "gbuzz" [(a, [x, x, k, k, k, i, i])]++-- | Generates a set of impulses of amplitude kamp separated by kintvl seconds (or samples if kintvl is negative). The first impulse is generated after a delay of ioffset seconds. +--+-- > ares mpulse kamp, kintvl [, ioffset]+--+-- doc: <http://www.csounds.com/manual/html/mpulse.html> ++mpulse :: Sig -> Sig -> Sig+mpulse = opc2 "mpulse" [(a, [k, k, i])]++-- | Implementation of a band limited, analog modeled oscillator, based on integration of band limited impulses. vco can be used to simulate a variety of analog wave forms. +--+-- > ares vco xamp, xcps, iwave, kpw [, ifn] [, imaxd] [, ileak] [, inyx] \+-- > [, iphs] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/vco.html> ++vco :: Sig -> Sig -> I -> Sig -> Sig+vco = opc4 "vco" [(a, [x, x, i, k] ++ is 6)]++-- | vco2 is similar to vco. But the implementation uses pre-calculated tables of band-limited waveforms (see also GEN30) +-- rather than integrating impulses. This opcode can be faster than vco (especially if a low control-rate is used) and also +-- allows better sound quality. Additionally, there are more waveforms and oscillator phase can be modulated at k-rate. +-- The disadvantage is increased memory usage. For more details about vco2 tables, see also vco2init and vco2ft.+--+-- > ares vco2 kamp, kcps [, imode] [, kpw] [, kphs] [, inyx]+--+-- doc: <http://www.csounds.com/manual/html/vco2.html> ++vco2 :: Sig -> Sig -> Sig+vco2 = opc2 "vco2" [(a, [k, k, i, k, k, i])]+++-----------------------------------------------------+-- Phasors++-- | Produce a normalized moving phase value. +--+-- > ares phasor xcps [, iphs]+-- > kres phasor kcps [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/phasor.html> ++phasor :: Sig -> Sig +phasor = opc1 "phasor" [+ (a, [x, i]),+ (k, [x, i])]++-- | Produces a moving phase value between zero and one and an extra impulse output ("sync out") whenever its phase value+-- crosses or is reset to zero. The phase can be reset at any time by an impulse on the "sync in" parameter. +--+-- > aphase, asyncout syncphasor xcps, asyncin, [, iphs]+--+-- doc: <http://www.csounds.com/manual/html/syncphasor.html> ++syncphasor :: Sig -> Sig -> (Sig, Sig)+syncphasor = mopc2 "syncphasor" ([a, a], [x, a, i])+++-----------------------------------------------------+-- Random++-- | Output is a controlled random number series between -amp and +amp +--+-- > ares rand xamp [, iseed] [, isel] [, ioffset]+-- > kres rand xamp [, iseed] [, isel] [, ioffset]+--+-- doc: <http://www.csounds.com/manual/html/rand.html> ++rand :: Sig -> SE Sig+rand sig = se $ opc1 "rand" [+ (a, x:rest),+ (k, k:rest)] sig+ where rest = is 3++-- | Generates a controlled random number series with interpolation between each new number. +--+-- > ares randi xamp, xcps [, iseed] [, isize] [, ioffset]+-- > kres randi kamp, kcps [, iseed] [, isize] [, ioffset]+--+-- doc: <http://www.csounds.com/manual/html/randi.html> ++randi :: Sig -> Sig -> SE Sig+randi = randiGen "randi"++-- | Generates random numbers and holds them for a period of time. +--+-- > ares randh xamp, xcps [, iseed] [, isize] [, ioffset]+-- > kres randh kamp, kcps [, iseed] [, isize] [, ioffset]+--+-- doc: <http://www.csounds.com/manual/html/randh.html> ++randh :: Sig -> Sig -> SE Sig+randh = randiGen "randh"++randiGen :: Name -> Sig -> Sig -> SE Sig+randiGen name a1 a2 = se $ opc2 name [+ (a, x:x:rest),+ (k, k:k:rest)] a1 a2+ where rest = is 3++-- | 31-bit bipolar random opcodes with controllable distribution. These units are portable, i.e. using the same seed +-- value will generate the same random sequence on all systems. The distribution of --generated random numbers can be varied at k-rate. +--+-- > ax rnd31 kscl, krpow [, iseed]+-- > ix rnd31 iscl, irpow [, iseed]+-- > kx rnd31 kscl, krpow [, iseed]+--+-- doc: <http://www.csounds.com/manual/html/rnd31.html> ++rnd31 :: Sig -> Sig -> SE Sig+rnd31 a1 a2 = se $ opc2 "rnd31" [+ (a, [k, k, i]),+ (k, [k, k, i]),+ (i, [i, i, i])] a1 a2++-- | Generates is a controlled pseudo-random number series between min and max values. +--+-- > ax random kscl, krpow+-- > ix random iscl, irpow+-- > kx random kscl, krpow+--+-- doc: <http://www.csounds.com/manual/html/random.html> ++random :: Sig -> Sig -> SE Sig+random a1 a2 = se $ opc2 "random" [+ (a, [k, k]),+ (k, [k, k]),+ (i, [i, i])] a1 a2++-- | Generates a user-controlled random number series with interpolation between each new number. +--+-- > ares randomi kmin, kmax, xcps [,imode] [,ifirstval]+-- > kres randomi kmin, kmax, kcps [,imode] [,ifirstval]+--+-- doc: <http://www.csounds.com/manual/html/randomi.html> +randomi :: Sig -> Sig -> Sig -> SE Sig+randomi a1 a2 a3 = se $ opc3 "randomi" [+ (a, [k, k, x, i, i]),+ (k, [k, k, k, i, i])] a1 a2 a3++-- | Generates random numbers with a user-defined limit and holds them for a period of time.+--+-- > ares randomh kmin, kmax, xcps [,imode] [,ifirstval]+-- > kres randomh kmin, kmax, kcps [,imode] [,ifirstval]+--+-- doc: <http://www.csounds.com/manual/html/randomh.html> ++randomh :: Sig -> Sig -> Sig -> SE Sig+randomh a1 a2 a3 = se $ opc3 "randomh" [+ (a, [k, k, x, i, i]),+ (k, [k, k, k, i, i])] a1 a2 a3++-- | Generates approximate pink noise (-3dB/oct response) by one of two different methods:+--+-- * a multirate noise generator after Moore, coded by Martin Gardner+--+-- * a filter bank designed by Paul Kellet+--+-- > ares pinkish xin [, imethod] [, inumbands] [, iseed] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/pinkish.html> ++pinkish :: Sig -> SE Sig +pinkish a1 = se $ opc1 "pinkish" [(a, x: replicate 4 i)] a1++-- | Unsafe version of the 'pinkish' opcode. Unsafe means that there can be possible alias+-- on the expression level. Two expressions with the same arguments can be unexpectedly+-- rendered as the same expression within one instrument. ++pinkish' :: Sig -> Sig+pinkish' = opc1 "pinkish" [(a, x: replicate 4 i)]++-- | A white noise generator with an IIR lowpass filter. +--+-- > ares noise xamp, kbeta+--+-- doc: <http://www.csounds.com/manual/html/noise.html>+ +noise :: Sig -> Sig -> SE Sig+noise a1 a2 = se $ opc2 "noise" [(a, [x, k])] a1 a2++-- | Unsafe version of the 'noise' opcode. Unsafe means that there can be possible alias+-- on the expression level. Two expressions with the same arguments can be unexpectedly+-- rendered as the same expression within one instrument. ++noise' :: Sig -> Sig -> Sig+noise' = opc2 "noise" [(a, [x, k])]++--------------------------------------------------+-- envelopes++-- | Trace a series of line segments between specified points. +--+-- > ares linseg ia, idur1, ib [, idur2] [, ic] [...]+-- > kres linseg ia, idur1, ib [, idur2] [, ic] [...]+--+-- doc: <http://www.csounds.com/manual/html/linseg.html>+linseg :: [D] -> Sig+linseg = opcs "linseg" [+ (a, repeat i),+ (k, repeat i)]++-- | Trace a series of line segments between specified points including a release segment. +--+-- > ares linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz+-- > kres linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz+--+-- doc: <http://www.csounds.com/manual/html/linsegr.html>++linsegr :: [D] -> D -> D -> Sig+linsegr xs relDur relVal = opcs "linsegr" ([+ (a, repeat i),+ (k, repeat i)]) (xs ++ [relDur, relVal])+++-- | Trace a series of exponential segments between specified points.+--+-- > ares expseg ia, idur1, ib [, idur2] [, ic] [...]+-- > kres expseg ia, idur1, ib [, idur2] [, ic] [...]+--+-- doc: <http://www.csounds.com/manual/html/expseg.html>++expseg :: [D] -> Sig+expseg = opcs "expseg" [+ (a, repeat i),+ (k, repeat i)]++-- | Trace a series of exponential segments between specified points including a release segment. +--+-- > ares expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz+-- > kres expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz+--+-- doc: <http://www.csounds.com/manual/html/expsegr.html>++expsegr :: [D] -> D -> D -> Sig+expsegr xs relDur relVal = opcs "expsegr" ([+ (a, repeat i),+ (k, repeat i)]) (xs ++ [relDur, relVal])++-- | Generate control signal consisting of held segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate. +--+-- > ksig lpshold kfreq, ktrig, ktime0, kvalue0 [, ktime1] [, kvalue1] \+-- > [, ktime2] [, kvalue2] [...]+--+-- doc: <http://www.csounds.com/manual/html/lpshold.html>++lpshold :: Sig -> Sig -> [Sig] -> Sig+lpshold = mkLps "lpshold"++-- | Generate control signal consisting of linear segments delimited by two or more specified points. The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate. +--+-- > ksig loopseg kfreq, ktrig, iphase, ktime0, kvalue0 [, ktime1] [, kvalue1] \+-- > [, ktime2] [, kvalue2] [...]+--+-- doc: <http://www.csounds.com/manual/html/loopseg.html>++loopseg :: Sig -> Sig -> [Sig] -> Sig+loopseg = mkLps "loopseg"++-- | Generate control signal consisting of controllable exponential segments or linear segments delimited by two or more specified points. +-- The entire envelope is looped at kfreq rate. Each parameter can be varied at k-rate. +--+-- > ksig looptseg kfreq, ktrig, ktime0, kvalue0, ktype0, [, ktime1] [, kvalue1] [,ktype1] \+-- > [, ktime2] [, kvalue2] [,ktype2] [...][, ktimeN] [, kvalueN]+--+-- doc: <http://www.csounds.com/manual/html/looptseg.html>++looptseg :: Sig -> Sig -> [Sig] -> Sig+looptseg = mkLps "looptseg"++mkLps :: Name -> Sig -> Sig -> [Sig] -> Sig+mkLps name kfreq ktrig kvals = opcs name signature $ kfreq:ktrig:kvals+ where signature = [(k, repeat k)]++----------------------------------------------------+-- audio delays++-- | This is an interpolating variable time delay, it is not very different from the existing implementation (deltapi), it is only easier to use. +--+-- > ares vdelay asig, adel, imaxdel [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/vdelay.html>+vdelay :: Sig -> Sig -> D -> Sig+vdelay = opc3 "vdelay" [(a, [a, a, i, i])]++-- | A variable delay opcode with high quality interpolation. +--+-- > aout vdelayx ain, adl, imd, iws [, ist]+--+-- doc: <http://www.csounds.com/manual/html/vdelayx.html>+vdelayx :: Sig -> Sig -> D -> D -> Sig+vdelayx = opc4 "vdelayx" [(a, [a, a, i, i, i])]++-- | Variable delay opcodes with high quality interpolation. +--+-- aout vdelayxw ain, adl, imd, iws [, ist]+--+-- doc: <http://www.csounds.com/manual/html/vdelayxw.html>+vdelayxw :: Sig -> Sig -> D -> D -> Sig+vdelayxw = opc4 "vdelayxw" [(a, [a, a, i, i, i])]++----------------------------------------------------+-- delay lines++-- | Reads from an automatically established digital delay line. +--+-- > ares delayr idlt [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/delayr.html>+delayr :: D -> SE Sig+delayr a1 = se $ opc1 "delayr" [(a, [i])] a1++-- | Writes the audio signal to a digital delay line. +--+-- > delayw asig+--+-- doc: <http://www.csounds.com/manual/html/delayw.html>+delayw :: Sig -> SE ()+delayw a1 = se_ $ opc1 "delayw" [(x, [a])] a1++-- | Tap a delay line at variable offset times. +--+-- > ares deltap kdlt+-- +-- doc: <http://www.csounds.com/manual/html/deltap.html>+deltap :: Sig -> SE Sig+deltap a1 = se $ opc1 "deltap" [(a, [k])] a1++-- | Taps a delay line at variable offset times, uses interpolation. +--+-- > ares deltapi xdlt+--+-- doc: <http://www.csounds.com/manual/html/deltapi.html>+deltapi :: Sig -> SE Sig+deltapi a1 = se $ opc1 "deltapi" [(a, [x])] a1++-- | Taps a delay line at variable offset times, uses cubic interpolation. +--+-- > ares deltap3 xdlt+--+-- doc: <http://www.csounds.com/manual/html/deltap3.html>+deltap3 :: Sig -> SE Sig+deltap3 a1 = se $ opc1 "deltap3" [(a, [x])] a1++-- | deltapx is similar to deltapi or deltap3. However, it allows higher quality interpolation. This opcode can read from and write to a delayr/delayw delay line with interpolation. +--+-- > aout deltapx adel, iwsize+--+-- doc: <http://www.csounds.com/manual/html/deltapx.html>+deltapx :: Sig -> D -> SE Sig+deltapx a1 a2 = se $ opc2 "deltapx" [(a, [a, i])] a1 a2++-- | deltapxw mixes the input signal to a delay line. This opcode can be mixed with reading units +-- (deltap, deltapn, deltapi, deltap3, and deltapx) in any order; the actual delay time is the difference of+-- the read and write time. This opcode can read from and write to a delayr/delayw delay line with interpolation. +--+-- > deltapxw ain, adel, iwsize+--+-- doc: <http://www.csounds.com/manual/html/deltapxw.html>+deltapxw :: Sig -> Sig -> D -> SE ()+deltapxw a1 a2 a3 = se_ $ opc3 "deltapxw" [(x, [a, a, i])] a1 a2 a3++---------------------------------------------------+-- filters++filterSignature1 = [(a, [a, k, i])]+mkFilter1 name = opc2 name filterSignature1++filterSignature2 = [(a, [a, k, k, i])]+mkFilter2 name = opc3 name filterSignature2+++-- | A first-order recursive low-pass filter with variable frequency response.+--+-- tone is a 1 term IIR filter. Its formula is:+--+-- > yn = c1 * xn + c2 * yn-1+--+-- where+--+-- * b = 2 - cos(2 π hp/sr);+--+-- * c2 = b - sqrt(b2 - 1.0)+--+-- * c1 = 1 - c2+--+-- > ares tone asig, khp [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/tone.html>++tone :: Sig -> Sig -> Sig++-- | A hi-pass filter whose transfer functions are the complements of the tone opcode. +--+-- > ares atone asig, khp [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/atone.html>+atone :: Sig -> Sig -> Sig++-- | Implementation of a second-order low-pass Butterworth filter. +--+-- > ares butlp asig, kfreq [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/butterlp.html>+butlp :: Sig -> Sig -> Sig++-- | Implementation of second-order high-pass Butterworth filter.+--+-- > ares buthp asig, kfreq [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/butterhp.html>++buthp :: Sig -> Sig -> Sig++-- | A second-order resonant filter.+--+-- > ares reson asig, kcf, kbw [, iscl] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/reson.html>+ +reson :: Sig -> Sig -> Sig -> Sig++-- | A notch filter whose transfer functions are the complements of the reson opcode. +--+-- > ares areson asig, kcf, kbw [, iscl] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/areson.html>++areson :: Sig -> Sig -> Sig -> Sig++-- | Implementation of a second-order band-pass Butterworth filter. +--+-- > ares butbp asig, kfreq, kband [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/butterbp.html>+butbp :: Sig -> Sig -> Sig -> Sig++-- | Implementation of a second-order band-reject Butterworth filter. +--+-- > ares butbr asig, kfreq, kband [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/butterbr.html>+butbr :: Sig -> Sig -> Sig -> Sig++-- | Moogladder is an new digital implementation of the Moog ladder filter based on the work of +-- Antti Huovilainen, described in the paper "Non-Linear Digital Implementation of the Moog Ladder Filter" (Proceedings of DaFX04, Univ of Napoli). +-- This implementation is probably a more accurate digital representation of the original analogue filter.+--+-- > asig moogladder ain, kcf, kres[, istor]+--+-- doc: <http://www.csounds.com/manual/html/moogladder.html>+moogladder :: Sig -> Sig -> Sig -> Sig++tone = mkFilter1 "tone"+atone = mkFilter1 "atone"+butlp = mkFilter1 "butlp"+buthp = mkFilter1 "buthp"++reson = mkFilter2 "reson"+areson = mkFilter2 "areson"+butbp = mkFilter2 "butbp"+butbr = mkFilter2 "butbr"+moogladder = mkFilter2 "moogladder"++-- | Variably reverberates an input signal with a “colored” frequency response. +--+-- > ares vcomb asig, krvt, xlpt, imaxlpt [, iskip] [, insmps]+--+-- doc: <http://www.csounds.com/manual/html/vcomb.html>+vcomb :: Sig -> Sig -> Sig -> D -> Sig+vcomb = opc4 "vcomb" [(a, [a, k, x, i, i, i])]++-- | A second-order multi-mode filter. +--+-- > ares bqrez asig, xfco, xres [, imode] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/bqrez.html>+bqrez :: Sig -> Sig -> Sig -> Sig+bqrez = opc3 "bqrez" [(a, [a, x, x, i, i])]++-- | Reverberates an input signal with a “colored” frequency response. +--+-- > ares comb asig, krvt, ilpt [, iskip] [, insmps]+--+-- doc: <http://www.csounds.com/manual/html/comb.html>+comb :: Sig -> Sig -> D -> Sig+comb = opc3 "comb" [(a, [a, k, i, i, i])]++-- | Applies portamento to a step-valued control signal. +--+-- > kres port ksig, ihtim [, isig]+--+-- doc: <http://www.csounds.com/manual/html/port.html>+port :: Sig -> D -> Sig+port = opc2 "port" [(k, [k, i, i])]++-- | Applies portamento to a step-valued control signal. +--+-- > kres portk ksig, khtim [, isig]+--+-- doc: <http://www.csounds.com/manual/html/portk.html>+portk :: Sig -> Sig -> Sig+portk = opc2 "portk" [(k, [k, k, i])]++---------------------------------------------------+-- reverberation++-- | freeverb is a stereo reverb unit based on Jezar's public domain C++ sources, composed of eight parallel +-- comb filters on both channels, followed by four allpass units in series. The filters on the right channel +-- are slightly detuned compared to the left channel in order to create a stereo effect.+--+-- > aoutL, aoutR freeverb ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]] +--+-- doc: <http://www.csounds.com/manual/html/freeverb.html>+freeverb :: Sig -> Sig -> Sig -> Sig -> (Sig, Sig)+freeverb = mopc4 "freeverb" ([a, a], [a, a, k, k, i, i])++-- | 8 delay line stereo FDN reverb, with feedback matrix based upon physical modeling scattering junction of 8 +-- lossless waveguides of equal characteristic impedance. Based on Csound orchestra version by Sean Costello. +--+-- > aoutL, aoutR reverbsc ainL, ainR, kfblvl, kfco[, israte[, ipitchm[, iskip]]] +--+-- doc: <http://www.csounds.com/manual/html/reverbsc.html>+reverbsc :: Sig -> Sig -> Sig -> Sig -> (Sig, Sig)+reverbsc = mopc4 "reverbsc" ([a, a], [a, a, k, k, i, i, i])++-- | Reverberates an input signal with a “natural room” frequency response. +--+-- > ares reverb asig, krvt [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/reverb.html>+reverb :: Sig -> Sig -> Sig+reverb = opc2 "reverb" [(a, [a, k, i])]++-- | This is a reverberator consisting of 6 parallel comb-lowpass filters being fed into a series +-- of 5 allpass filters. nreverb replaces reverb2 (version 3.48) and so both opcodes are identical. +--+-- > ares nreverb asig, ktime, khdif [, iskip] [,inumCombs] [, ifnCombs] \+-- > [, inumAlpas] [, ifnAlpas]+--+-- doc: <http://www.csounds.com/manual/html/nreverb.html>+nreverb :: Sig -> Sig -> Sig -> Sig+nreverb = opc3 "nreverb" [(a, [a, k, k] ++ is 5)]++-- | babo stands for ball-within-the-box. It is a physical model reverberator based on the paper+-- by Davide Rocchesso "The Ball within the Box: a sound-processing metaphor", Computer Music Journal, Vol 19, N.4, pp.45-47, Winter 1995.+--+-- The resonator geometry can be defined, along with some response characteristics, the position of the listener within the resonator, and the position of the sound source. +--+-- > a1, a2 babo asig, ksrcx, ksrcy, ksrcz, irx, iry, irz [, idiff] [, ifno]+--+-- doc: <http://www.csounds.com/manual/html/babo.html>+babo :: Sig -> Sig -> Sig -> Sig -> D -> D -> D -> (Sig, Sig)+babo = mopc7 "babo" ([a, a], [a, k, k, k] ++ is 5)++---------------------------------------------------+-- Amplitude Measurement And Following++-- | Determines the root-mean-square amplitude of an audio signal. It low-pass filters the actual value, to average in the manner of a VU meter. +--+-- > kres rms asig [, ihp] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/rms.html>+rms :: Sig -> Sig+rms = opc1 "rms" [(k, [a, i, i])]++-- | The rms power of asig can be interrogated, set, or adjusted to match that of a comparator signal. +--+-- > ares balance asig, acomp [, ihp] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/balance.html>+balance :: Sig -> Sig -> Sig+balance = opc2 "balance" [(a, [a, a, i, i])]++-- | Envelope follower unit generator. +--+-- > ares follow asig, idt+--+-- doc: <http://www.csounds.com/manual/html/follow.html>+follow :: Sig -> D -> Sig+follow = opc2 "follow" [(a, [a, i])]++-- | A controllable envelope extractor using the algorithm attributed to Jean-Marc Jot. +--+-- > ares follow2 asig, katt, krel+--+-- doc: <http://www.csounds.com/manual/html/follow2.html>+follow2 :: Sig -> Sig -> Sig -> Sig+follow2 = opc3 "follow2" [(a, [a, k, k])]++-- | These opcodes maintain the output k-rate variable as the peak absolute level so far received. +--+-- > kres peak asig+-- > kres peak ksig+--+-- doc: <http://www.csounds.com/manual/html/peak.html>+peak :: Sig -> Sig+peak = opc1 "peak" [(k, [x])]++-- | max_k outputs the local maximum (or minimum) value of the incoming asig signal, checked in the time interval between ktrig has become true twice. +--+-- > knumkout max_k asig, ktrig, itype+--+-- doc: <http://www.csounds.com/manual/html/max_k.html>+max_k :: Sig -> Sig -> I -> Sig+max_k = opc3 "max_k" [(k, [a, k, i])]++-------------------------------------------------+-- Pitch Estimation++-- | ptrack takes an input signal, splits it into ihopsize blocks and using a STFT method, extracts an estimated +-- pitch for its fundamental frequency as well as estimating the total amplitude of the signal in dB, relative to+-- full-scale (0dB). The method implies an analysis window size of 2*ihopsize samples (overlaping by 1/2 window), which+-- has to be a power-of-two, between 128 and 8192 (hopsizes between 64 and 4096). Smaller windows will give better time+-- precision, but worse frequency accuracy (esp. in low fundamentals).This opcode is based on an original algorithm by M. Puckette. +--+-- > kcps, kamp ptrack asig, ihopsize[,ipeaks]+--+-- doc: <http://www.csounds.com/manual/html/ptrack.html>+ptrack :: Sig -> D -> (Sig, Sig)+ptrack = mopc2 "ptrack" ([k, k], [a, i, i])++-- | Using the same techniques as spectrum and specptrk, pitch tracks the pitch of the signal in octave point decimal form, and amplitude in dB. +--+-- > koct, kamp pitch asig, iupdte, ilo, ihi, idbthresh [, ifrqs] [, iconf] \+-- > [, istrt] [, iocts] [, iq] [, inptls] [, irolloff] [, iskip]+--+-- doc: <http://www.csounds.com/manual/html/pitch.html>+pitch :: Sig -> D -> D -> D -> D -> (Sig, Sig) +pitch = mopc5 "pitch" ([k, k], a:is 12)++-- | Follows the pitch of a signal based on the AMDF method (Average Magnitude Difference Function). Outputs pitch and amplitude +-- tracking signals. The method is quite fast and should run in realtime. This technique usually works best for monophonic signals. +--+-- > kcps, krms pitchamdf asig, imincps, imaxcps [, icps] [, imedi] \+-- > [, idowns] [, iexcps] [, irmsmedi]+--+-- doc: <http://www.csounds.com/manual/html/pitchamdf.html>+pitchamdf :: Sig -> D -> D -> (Sig, Sig)+pitchamdf = mopc3 "pitchamdf" ([k, k], a:is 8)++-- | Estimate the tempo of beat patterns in a control signal. +--+-- > ktemp tempest kin, iprd, imindur, imemdur, ihp, ithresh, ihtim, ixfdbak, \+-- > istartempo, ifn [, idisprd] [, itweek]+--+-- doc: <http://www.csounds.com/manual/html/tempest.html>+tempest :: Sig -> D -> D -> D -> D -> D -> D -> D -> D -> Tab -> Sig+tempest = opc10 "tempest" [(k, k:is 11)]++-------------------------------------------------+-- Dynamic Processing++-- | This unit functions as an audio compressor, limiter, expander, or noise gate, using either soft-knee or hard-knee +-- mapping, and with dynamically variable performance characteristics. It takes two audio input signals, aasig and acsig,+-- the first of which is modified by a running analysis of the second. Both signals can be the same, or the first can be +-- modified by a different controlling signal.+--+-- compress first examines the controlling acsig by performing envelope detection. This is directed by two control+-- values katt and krel, defining the attack and release time constants (in seconds) of the detector. The detector +-- rides the peaks (not the RMS) of the control signal. Typical values are .01 and .1, the latter usually being similar+-- to ilook.+-- +-- The running envelope is next converted to decibels, then passed through a mapping function to determine what compresser+-- action (if any) should be taken. The mapping function is defined by four decibel control values. These are given as +-- positive values, where 0 db corresponds to an amplitude of 1, and 90 db corresponds to an amplitude of 32768. +--+-- > ar compress aasig, acsig, kthresh, kloknee, khiknee, kratio, katt, krel, ilook+--+-- doc: <http://www.csounds.com/manual/html/compress.html>+compress :: Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> Sig -> D -> Sig+compress = opc9 "compress" [(a, [a, a, k, k, k, k, k, k, i])]++-- | This opcode dynamically modifies a gain value applied to the input sound ain by comparing its power level to a given +-- threshold level. The signal will be compressed/expanded with different factors regarding that it is over or under the threshold. +--+-- > ares dam asig, kthreshold, icomp1, icomp2, irtime, iftime+--+-- doc: <http://www.csounds.com/manual/html/dam.html>+dam :: Sig -> Sig -> D -> D -> D -> D -> Sig+dam = opc6 "dam" [(a, a:k:is 4)]++-- | Clips an a-rate signal to a predefined limit, in a “soft” manner, using one of three methods. +--+-- > ares clip asig, imeth, ilimit [, iarg]+--+-- doc: <http://www.csounds.com/manual/html/clip.html>+clip :: Sig -> I -> D -> Sig+clip = opc3 "clip" [(a, [a, i, i])]++-------------------------------------------------+-- Sample Level Operations++-- | Sets the lower and upper limits of the value it processes. +--+-- > ares limit asig, klow, khigh+-- > ires limit isig, ilow, ihigh+-- > kres limit ksig, klow, khigh+--+-- doc: <http://www.csounds.com/manual/html/limit.html>+limit :: Sig -> Sig -> Sig -> Sig+limit = opc3 "limit" [+ (a, [a, k, k]),+ (k, [k, k, k]),+ (i, [i, i, i])]++-- | Performs a sample-and-hold operation on its input. +--+-- > ares samphold asig, agate [, ival] [, ivstor]+-- > kres samphold ksig, kgate [, ival] [, ivstor]+--+-- doc: <http://www.csounds.com/manual/html/samphold.html>+samphold :: Sig -> Sig -> Sig+samphold = opc2 "samphold" [+ (a, [a, a, i, i]),+ (k, [k, k, i, i])]++-- | Access values of the current buffer of an a-rate variable by indexing. Useful for doing sample-by-sample manipulation at k-rate without using setksmps 1. +--+-- > kval vaget kndx, avar+--+-- doc: <http://www.csounds.com/manual/html/vaget.html>+vaget :: Sig -> Sig -> Sig+vaget = opc2 "vaget" [(k, [k, a])]++-- | Write values into the current buffer of an a-rate variable at the given index. Useful for doing sample-by-sample manipulation at k-rate without using setksmps 1. +--+-- > vaset kval, kndx, avar+--+-- doc: <http://www.csounds.com/manual/html/vaset.html>+vaset :: Sig -> Sig -> Sig -> SE ()+vaset a1 a2 a3 = se_ $ opc3 "vaset" [(x, [k, k, a])] a1 a2 a3++---------------------------------------------------+-- panning++-- | Distribute an audio signal amongst four channels with localization control. +--+-- > a1, a2, a3, a4 pan asig, kx, ky, ifn [, imode] [, ioffset]+--+-- doc: <http://www.csounds.com/manual/html/pan.html>+pan :: Sig -> Sig -> Sig -> Tab -> (Sig, Sig, Sig, Sig)+pan = mopc4 "pan" ([a, a, a, a], [a, k, k, i, i, i])++-- | Distribute an audio signal across two channels with a choice of methods. +--+-- > a1, a2 pan2 asig, xp [, imode]+--+-- doc: <http://www.csounds.com/manual/html/pan2.html>+pan2 :: Sig -> Sig -> (Sig, Sig)+pan2 = mopc2 "pan2" ([a, a], [a, x, i])+++-- HRTF++-- | This opcode takes a source signal and spatialises it in the 3 dimensional space around a listener using head related +-- transfer function (HRTF) based filters. It produces a static output (azimuth and elevation parameters are i-rate), +-- because a static source allows much more efficient processing than hrtfmove and hrtfmove2,. +--+-- > aleft, aright hrtfstat asrc, iAz, iElev, ifilel, ifiler [,iradius, isr]+--+-- doc: <http://www.csounds.com/manual/html/hrtfstat.html>+hrtfstat :: Sig -> D -> D -> Str -> Str -> (Sig, Sig)+hrtfstat = mopc5 "hrtfstat" ([a, a], a:s:i:i:s:is 2)++-- | This opcode takes a source signal and spatialises it in the 3 dimensional space around a listener by convolving the source with stored head related transfer function (HRTF) based filters. +--+-- > aleft, aright hrtfmove asrc, kAz, kElev, ifilel, ifiler [, imode, ifade, isr]+--+-- doc: <http://www.csounds.com/manual/html/hrtfmove.html>+hrtfmove :: Sig -> Sig -> Sig -> Str -> Str -> (Sig, Sig)+hrtfmove = mopc5 "hrtfmove" ([a, a], a:k:k:s:s:is 3)++-- | This opcode takes a source signal and spatialises it in the 3 dimensional space around a listener using head related transfer function (HRTF) based filters. +--+-- > aleft, aright hrtfmove2 asrc, kAz, kElev, ifilel, ifiler [,ioverlap, iradius, isr]+--+-- doc: <http://www.csounds.com/manual/html/hrtfmove2.html>+hrtfmove2 :: Sig -> Sig -> Sig -> Str -> Str -> (Sig, Sig)+hrtfmove2 = mopc5 "hrtfmove2" ([a, a], a:k:k:s:s:is 3)++--------------------------------------------------------------------------+-- Other opcodes++-- | Extend the duration of real-time generated events and handle their extra life (Usually for usage along with release instead of linenr, linsegr, etc). +--+-- > xtratim iextradur+--+-- doc: <http://www.csounds.com/manual/html/xtratim.html>+xtratim :: D -> SE ()+xtratim a1 = se_ $ opc1 "xtratim" [(x, [i])] a1+
+ src/Csound/Opcode/Data.hs view
@@ -0,0 +1,551 @@+-- | Data+module Csound.Opcode.Data (++ -----------------------------------------------------+ -- * Buffer and Function tables++ -- ** Creating Function Tables (Buffers)+ gen, skipNorm,+ + -- ** Handy shortcuts+ + -- | The table size is set to:+ --+ -- > low = 4096+ -- > mid = 8192+ -- > high = 16384+ -- > higher = 65536+ --+ -- genXxx1 means that the size is set to @Xxx + 1@.+ genLow, genMid, genHigh, genHigher,+ genLow1, genMid1, genHigh1, genHigher1,++ {-+ -- ** Writing To Tables+ tableiw, tablew, tabw_i, tabw, + -}++ -- ** Reading From Tables+ table, tablei, table3, tab_i, tab, ++ -----------------------------------------------------+ -- * Signal Input and Output, Sample and Loop Playback, Soundfonts++ -- ** Signal Input And Output+ inch, outch,++ -- ** Sample Playback With Optional Looping+ flooper2, sndloop,++ -----------------------------------------------------+ -- * File Input and Output++ -- ** Sound File Input+ soundin, diskin2, mp3in,++ -- ** Sound File Queries+ filelen, filesr, filenchnls, filepeak, filebit,++ -- ** Sound File Output+ fout,++ -- ** Non-Soundfile Input And Output++ -----------------------------------------------------+ -- * Converters of Data Types+ Nums,+ + -- ** Rate conversions+ downsamp, upsamp, interp,+ + -- ** Amplitude conversions+ ampdb, ampdbfs, dbamp, dbfsamp,++ -- ** Pitch conversions+ cpspch,+ + -----------------------------------------------------+ -- * Printing and Strings++ -- ** Simple Printing+ printi, printk,++ -- ** Formatted Printing++ -- ** String Variables+ sprintf, sprintfk,++ -- ** String Manipulation And Conversion+ strcat, strcatk++) where++import Csound.Exp+import Csound.Exp.Wrapper+import Csound.LowLevel++-----------------------------------------------------+-- * Buffer and Function tables++-- ** Creating Function Tables (Buffers)++-- | Creates a table of doubles (It's f-table in Csound).+-- Arguments are:+--+-- * table size+--+-- * identificator of the GEN routine+--+-- * GEN routine arguments+--+-- All tables are created at 0 and memory is never released.+gen :: Int -> Int -> [Double] -> Tab+gen = Tab ++low = 4096+mid = 8192+high = 16384+higher = 65536++genLow, genMid, genHigh, genHigher, genLow1, genMid1, genHigh1, genHigher1 :: Int -> [Double] -> Tab++genLow = gen low+genMid = gen mid+genHigh = gen high+genHigher = gen higher++genLow1 = gen (low + 1)+genMid1 = gen (mid + 1)+genHigh1 = gen (high + 1)+genHigher1 = gen (higher + 1)++-- | Skips normalization (sets table size to negative value)+skipNorm :: Tab -> Tab+skipNorm (Tab size name args) = Tab (negate $ abs size) name args++{-+-- ** Writing To Tables++-- | This opcode operates on existing function tables, changing their contents. tablew is for writing +-- at k- or at a-rates, with the table number being specified at init time. Using tablew with i-rate signal +-- and index values is allowed, but the specified data will always be written to the function table at k-rate, +-- not during the initialization pass. The valid combinations of variable types are shown by the first letter of the variable names. +--+-- > tablew asig, andx, ifn [, ixmode] [, ixoff] [, iwgmode]+-- > tablew isig, indx, ifn [, ixmode] [, ixoff] [, iwgmode]+-- > tablew ksig, kndx, ifn [, ixmode] [, ixoff] [, iwgmode]+--+-- doc: <http://www.csounds.com/manual/html/tablew.html>+tablew :: Sig -> Sig -> Tab -> SE ()+tablew a1 a2 a3 = se_ $ opc3 "tablew" (map sign [a, k, i]) a1 a2 a3+ where sign t = (x, t:t:is 4)++-- | This opcode operates on existing function tables, changing their contents. tableiw is +-- used when all inputs are init time variables or constants and you only want to run it at +-- the initialization of the instrument. The valid combinations of variable types are shown by the first letter of the variable names.+--+-- > tableiw isig, indx, ifn [, ixmode] [, ixoff] [, iwgmode]+--+-- doc: <http://www.csounds.com/manual/html/tableiw.html>+tableiw :: D -> D -> Tab -> SE ()+tableiw a1 a2 a3 = se_ $ opc3 "tableiw" [(i, is 6)] a1 a2 a3++-- | Fast table opcodes. Faster than table and tablew because don't allow wrap-around +-- and limit and don't check index validity. Have been implemented in order to provide +-- fast access to arrays. Support non-power of two tables (can be generated by any GEN function by giving a negative length value).+--+-- > tabw ksig, kndx, ifn [,ixmode]+-- > tabw asig, andx, ifn [,ixmode]+--+-- doc: <http://www.csounds.com/manual/html/tab.html>+tabw :: Sig -> Sig -> Tab -> SE ()+tabw a1 a2 a3 = se_ $ opc3 "tabw" (map sign [a, k]) a1 a2 a3+ where sign t = (x, t:t:is 2)++-- | Fast table opcodes. Faster than table and tablew because don't allow wrap-around +-- and limit and don't check index validity. Have been implemented in order to provide +-- fast access to arrays. Support non-power of two tables (can be generated by any GEN function by giving a negative length value).+--+-- > tabw_i isig, indx, ifn [,ixmode]+--+-- doc: <http://www.csounds.com/manual/html/tab.html>+tabw_i :: D -> D -> Tab -> SE ()+tabw_i a1 a2 a3 = se_ $ opc3 "tabw_i" [(x, is 4)] a1 a2 a3+-}++-- ** Reading From Tables++-- | Accesses table values by direct indexing. +--+-- > ares table andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires table indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres table kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- doc: <http://www.csounds.com/manual/html/table.html>+table :: Sig -> Tab -> Sig++-- | Accesses table values by direct indexing with linear interpolation. +--+-- > ares tablei andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires tablei indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres tablei kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- doc: <http://www.csounds.com/manual/html/tablei.html>+tablei :: Sig -> Tab -> Sig+++-- | Accesses table values by direct indexing with cubic interpolation. +--+-- > ares table3 andx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > ires table3 indx, ifn [, ixmode] [, ixoff] [, iwrap]+-- > kres table3 kndx, ifn [, ixmode] [, ixoff] [, iwrap]+--+-- doc: <http://www.csounds.com/manual/html/table3.html>+table3 :: Sig -> Tab -> Sig++table = mkTable "table"+tablei = mkTable "tablei"+table3 = mkTable "table3"++mkTable :: Name -> Sig -> Tab -> Sig+mkTable name = opc2 name [+ (a, a:rest),+ (k, k:rest),+ (i, i:rest)]+ where rest = [i, i, i]++-- | Fast table opcodes. Faster than table and tablew because don't allow wrap-around +-- and limit and don't check index validity. Have been implemented in order to provide +-- fast access to arrays. Support non-power of two tables (can be generated by any GEN function by giving a negative length value).+--+-- > kr tab kndx, ifn[, ixmode]+-- > ar tab xndx, ifn[, ixmode]+--+-- doc: <http://www.csounds.com/manual/html/tab.html>+tab :: Sig -> Tab -> Sig+tab = opc2 "tab" [+ (a, [x,i,i]),+ (k, [k,i,i])]++-- | Fast table opcodes. Faster than table and tablew because don't allow wrap-around +-- and limit and don't check index validity. Have been implemented in order to provide +-- fast access to arrays. Support non-power of two tables (can be generated by any GEN function by giving a negative length value).+--+-- > ir tab_i indx, ifn[, ixmode]+--+-- doc: <http://www.csounds.com/manual/html/tab.html>+tab_i :: D -> Tab -> D+tab_i = opc2 "tab_i" [(i, [i,i,i])]++-- ** Saving Tables To Files++{-+-- ftsave "filename", iflag, ifn1 [, ifn2] [...]+ftsave :: S -> I -> [Tab] -> SE ()+ftsave a1 a2 a3 = opcs "ftsave" [(x, repeat i)] (phi a1 : phi a2 : map phi a3)+ where phi :: Val a => a -> E+ phi = Fix . unwrap ++-- ftsavek "filename", ktrig, iflag, ifn1 [, ifn2] [...]+ftsavek :: S -> Sig -> I -> [Tab] -> SE ()+ftsavek a1 a2 a3 a4 = opcs "ftsavek" [(x, repeat i)] (phi a1 : phi a2 : phi a3 : map phi a4)+ where phi :: Val a => a -> E+ phi = Fix . unwrap +-}++-- ** Reading Tables From Files++-----------------------------------------------------+-- * Signal Input and Output, Sample and Loop Playback, Soundfonts++-- ** Signal Input And Output++-- | Reads from numbered channels in an external audio signal or stream. +--+-- > ain1[, ...] inch kchan1[,...]+--+-- doc: <http://www.csounds.com/manual/html/inch.html>+inch :: CsdTuple a => [Sig] -> a+inch = mopcs "inch" (repeat a, repeat k)++-- | Writes multi-channel audio data, with user-controllable channels, to an external device or stream. +--+-- > outch kchan1, asig1 [, kchan2] [, asig2] [...]+--+-- doc: <http://www.csounds.com/manual/html/outch.html>+outch :: [(Sig, Sig)] -> SE ()+outch ts = se_ $ opcs "outch" [(x, cycle [a,k])] $ (\(a, b) -> [a, b]) =<< ts++-- ** Sample Playback With Optional Looping++-- | This opcode implements a crossfading looper with variable loop parameters and three +-- looping modes, optionally using a table for its crossfade shape. It accepts non-power-of-two tables +-- for its source sounds, such as deferred-allocation GEN01 tables.+--+-- > asig flooper2 kamp, kpitch, kloopstart, kloopend, kcrossfade, ifn \+-- > [, istart, imode, ifenv, iskip]+--+-- doc: <http://www.csounds.com/manual/html/flooper2.html>+flooper2 :: Sig -> Sig -> Sig -> Sig -> Sig -> Tab -> Sig +flooper2 = opc6 "flooper2" [(a, ks 5 ++ is 5)]++-- | This opcode records input audio and plays it back in a loop with user-defined duration and +-- crossfade time. It also allows the pitch of the loop to be controlled, including reversed playback. +--+-- > asig, krec sndloop ain, kpitch, ktrig, idur, ifad+--+-- doc: <http://www.csounds.com/manual/html/sndloop.html>+sndloop :: Sig -> Sig -> Sig -> D -> D -> (Sig, Sig)+sndloop = mopc5 "sndloop" ([a, k], [a,k,k,i,i])++-- ** Soundfonts And Fluid Opcodes++-----------------------------------------------------+-- * File Input and Output++-- ** Sound File Input++-- | Reads audio data from an external device or stream. Up to 24 channels may be read before v5.14, extended to 40 in later versions. +--+-- > ar1[, ar2[, ar3[, ... a24]]] soundin ifilcod [, iskptim] [, iformat] \+-- > [, iskipinit] [, ibufsize]+--+-- doc: <http://www.csounds.com/manual/html/soundin.html>+soundin :: CsdTuple a => Str -> a+soundin = mopc1 "soundin" (repeat a, s:is 4)++-- | Reads audio data from a file, and can alter its pitch using one of several available interpolation +-- types, as well as convert the sample rate to match the orchestra sr setting. diskin2 can also read +-- multichannel files with any number of channels in the range 1 to 24 in versions before 5.14, and +-- 40 after. . diskin2 allows more control and higher sound quality than diskin, but there is also the disadvantage of higher CPU usage.+--+-- > a1[, a2[, ... aN]] diskin2 ifilcod, kpitch[, iskiptim \+-- > [, iwrap[, iformat [, iwsize[, ibufsize[, iskipinit]]]]]]+--+-- doc: <http://www.csounds.com/manual/html/diskin2.html>+diskin2 :: CsdTuple a => Str -> Sig -> a+diskin2 = mopc2 "diskin2" (repeat a, s:k:is 6)++-- | Reads stereo audio data from an external MP3 file. +--+-- > ar1, ar2 mp3in ifilcod[, iskptim, iformat, iskipinit, ibufsize]+--+-- doc: <http://www.csounds.com/manual/html/mp3in.html>+mp3in :: Str -> (Sig, Sig)+mp3in = mopc1 "mp3in" ([a,a], s:is 4)+++-- ** Sound File Queries++-- | Returns the length of a sound file. +--+-- > ir filelen ifilcod, [iallowraw]+--+-- doc: <http://www.csounds.com/manual/html/filelen.html>+filelen :: Str -> D+filelen = opc1 "filelen" [(i, [i,i])]++-- | Returns the sample rate of a sound file. +--+-- > ir filesr ifilcod [, iallowraw]+--+-- doc: <http://www.csounds.com/manual/html/filesr.html>+filesr :: Str -> D+filesr = opc1 "filesr" [(i, [i,i])]++-- | Returns the number of channels in a sound file.+--+-- > ir filenchnls ifilcod [, iallowraw]+--+-- doc: <http://www.csounds.com/manual/html/filechnls.html>+filenchnls :: Str -> D+filenchnls = opc1 "filenchnls" [(i, [i,i])]++-- | Returns the peak absolute value of a sound file. +--+-- > ir filepeak ifilcod [, ichnl]+--+-- doc: <http://www.csounds.com/manual/html/filepeak.html>+filepeak :: Str -> D+filepeak = opc1 "filepeak" [(i, [i,i])]++-- | Returns the number of bits in each sample in a sound file.+--+-- > ir filebit ifilcod [, iallowraw]+--+-- doc: <http://www.csounds.com/manual/html/filebit.html>+filebit :: Str -> D+filebit = opc1 "filebit" [(i, [i,i])] ++-- ** Sound File Output++-- | fout outputs N a-rate signals to a specified file of N channels. +--+-- > fout ifilename, iformat, aout1 [, aout2, aout3,...,aoutN]+--+-- doc: <http://www.csounds.com/manual/html/fout.html>+fout :: [Sig] -> SE ()+fout as = se_ $ opcs "fout" [(x, repeat a)] as++-- ** Non-Soundfile Input And Output++-----------------------------------------------------+-- * Converters of Data Types++-- | Modify a signal by down-sampling. +--+-- > kres downsamp asig [, iwlen]+--+-- doc: <http://www.csounds.com/manual/html/downsamp.html>+downsamp :: Sig -> Sig +downsamp = opc1 "downsamp" [(k, [a,i])]++-- | Modify a signal by up-sampling. +--+-- > ares upsamp ksig+--+-- doc: <http://www.csounds.com/manual/html/upsamp.html>+upsamp :: Sig -> Sig+upsamp = opc1 "upsamp" [(a, [k])]++-- | Converts a control signal to an audio signal using linear interpolation. +--+-- > ares interp ksig [, iskip] [, imode]+--+-- doc: <http://www.csounds.com/manual/html/interp.html>+interp :: Sig -> Sig+interp = opc1 "interp" [(a, [k,i,i])]++------------------------------------------------------------------------------------------+-- amplitude conversions++-- | Floating number types: 'Sig' or 'D'.+class Val a => Nums a +instance Nums Sig+instance Nums D++conv :: Nums a => NumOp -> a -> a+conv op a = noRate $ ExpNum $ PreInline op [toE a]+++-- | Returns the amplitude equivalent of the decibel value x. Thus:+--+-- * 60 dB = 1000+--+-- * 66 dB = 1995.262+--+-- * 72 dB = 3891.07+--+-- * 78 dB = 7943.279+--+-- * 84 dB = 15848.926+--+-- * 90 dB = 31622.764+--+-- > ampdb(x) (no rate restriction)+--+-- doc: <http://www.csounds.com/manual/html/ampdb.html>++ampdb :: Nums a => a -> a+ampdb = conv Ampdb ++-- | Returns the amplitude equivalent of the full scale decibel (dB FS) value x. +-- The logarithmic full scale decibel values will be converted to linear 16-bit signed integer values from −32,768 to +32,767. +--+-- > ampdbfs(x) (no rate restriction)+--+-- doc: <http://www.csounds.com/manual/html/ampdbfs.html>++ampdbfs :: Nums a => a -> a+ampdbfs = conv Ampdbfs++-- | Returns the decibel equivalent of the raw amplitude x. +--+-- > dbamp(x) (init-rate or control-rate args only)+--+-- doc: <http://www.csounds.com/manual/html/dbamp.html>++dbamp :: Nums a => a -> a+dbamp = conv Dbamp++-- | Returns the decibel equivalent of the raw amplitude x, relative to full scale amplitude. Full scale is assumed to be 16 bit. New is Csound version 4.10. +--+-- > dbfsamp(x) (init-rate or control-rate args only)+--+-- doc: <http://www.csounds.com/manual/html/dbfsamp.html>+dbfsamp :: Nums a => a -> a +dbfsamp = conv Dbfsamp ++------------------------------------------------------------------------------------------+-- pitch conversions++-- | Converts a pitch-class value to cycles-per-second. +--+-- > cpspch (pch) (init- or control-rate args only)+--+-- doc: <http://www.csounds.com/manual/html/cpspch.html>+cpspch :: Nums a => a -> a+cpspch = conv Cpspch++-----------------------------------------------------+-- * Printing and Strings++-- ** Simple Printing++-- | These units will print orchestra init-values. +--+-- > print iarg [, iarg1] [, iarg2] [...]+--+-- doc: <http://www.csounds.com/manual/html/print.html>+printi :: [D] -> SE ()+printi a1 = se_ $ opcs "print" [(x, repeat i)] a1++-- | Prints one k-rate value at specified intervals. +--+-- > printk itime, kval [, ispace]+--+-- doc: <http://www.csounds.com/manual/html/printk.html>+printk :: D -> Sig -> SE ()+printk a1 a2 = se_ $ opc2 "printk" [(x, [i,k,i])] a1 a2+++-- ** Formatted Printing++-- ** String Variables++-- | sprintf write printf-style formatted output to a string variable, similarly to the C function sprintf(). sprintf runs at i-time only. +--+-- > Sdst sprintf Sfmt, xarg1[, xarg2[, ... ]]+--+-- doc: <http://www.csounds.com/manual/html/sprintf.html>+sprintf :: Str -> [D] -> Str+sprintf a1 a2 = opcs "sprintf" [(s, s:repeat i)] (toE a1 : map toE a2)++-- | sprintfk writes printf-style formatted output to a string variable, similarly to the C function sprintf(). sprintfk runs both at initialization and performance time. +--+-- > Sdst sprintfk Sfmt, xarg1[, xarg2[, ... ]]+--+-- doc: <http://www.csounds.com/manual/html/sprintfk.html>+sprintfk :: Str -> [Sig] -> Str+sprintfk a1 a2 = opcs "sprintfk" [(s, s:repeat k)] (toE a1 : map toE a2)++-- ** String Manipulation And Conversion++-- | Concatenate two strings and store the result in a variable. strcat runs at i-time only. It is allowed for any of the input arguments to be the same as the output variable. +--+-- > Sdst strcat Ssrc1, Ssrc2+--+-- doc: <http://www.csounds.com/manual/html/strcat.html>+strcat :: Str -> Str -> Str+strcat = opc2 "strcat" [(s, [s,s])]++-- | Concatenate two strings and store the result in a variable. strcatk does the +-- concatenation both at initialization and performance time. It is allowed for any of the input arguments to be the same as the output variable. +--+-- > Sdst strcatk Ssrc1, Ssrc2+--+-- doc: <http://www.csounds.com/manual/html/strcatk.html>+strcatk :: Str -> Str -> Str+strcatk = opc2 "strcatk" [(s, [s,s])]++
+ src/Csound/Opcode/Interaction.hs view
@@ -0,0 +1,126 @@+-- | Realtime Interaction+module Csound.Opcode.Interaction (++ -----------------------------------------------------+ -- * MIDI++ -- ** Opcodes For Use In MIDI-Triggered Instruments+ cpsmidi, ampmidi, pchbend, aftouch,++ -- ** Opcodes For Use In All Instruments+ ctrl7,++ -----------------------------------------------------+ -- * Human Interfaces++ -- ** Keys+ sensekey,++ -- ** Mouse+ xyin +) where++import Csound.Render.Sco(Msg)+import Csound.Exp.Wrapper+import Csound.LowLevel++-----------------------------------------------------+-- * MIDI++-- ** Opcodes For Use In MIDI-Triggered Instruments++-- | Get the note number of the current MIDI event, expressed in cycles-per-second. +--+-- > icps cpsmidi+--+-- doc: <http://www.csounds.com/manual/html/cpsmidi.html>++cpsmidi :: Msg -> D+cpsmidi = const $ constOpc "cpsmidi"++-- | Get the velocity of the current MIDI event. +--+-- > iamp ampmidi iscal [, ifn]+--+-- doc: <http://www.csounds.com/manual/html/ampmidi.html>+ampmidi :: Msg -> D+ampmidi = const $ constOpc "ampmidi"++-- | Get the current pitch-bend value for this channel. +--+-- > kbend pchbend [imin] [, imax]+--+-- doc: <http://www.csounds.com/manual/html/pchbend.html>+pchbend :: Msg -> Sig +pchbend = const $ constDiap "pchbend"++-- | Get the current after-touch value for this channel. +--+-- > kaft aftouch [imin] [, imax]+--+-- doc: <http://www.csounds.com/manual/html/.html>+aftouch :: Msg -> Sig+aftouch = const $ constDiap "aftouch"++-- ** Opcodes For Use In All Instruments++-- | Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. +--+-- > idest ctrl7 ichan, ictlno, imin, imax [, ifn]+-- > kdest ctrl7 ichan, ictlno, kmin, kmax [, ifn]+-- > adest ctrl7 ichan, ictlno, kmin, kmax [, ifn] [, icutoff]+--+-- doc: <http://www.csounds.com/manual/html/ctrl7.html>+ctrl7 :: I -> I -> Sig -> Sig -> Sig+ctrl7 = opc4 "ctrl7" [+ (i, replicate 5 i),+ (k, [i, i, k, k, i]),+ (a, [i, i, k, k, i, i])]+++constOpc :: Val a => Name -> a+constOpc name = opc0 name [(i, [])]++constDiap :: Val a => Name -> a+constDiap name = opc0 name [(k, [i, i])]++-----------------------------------------------------+-- * Open Sound Control and Network++-- ** Open Sound Control++-- ** Remote Instruments++-- ** Network Audio++-----------------------------------------------------+-- * Human Interfaces++-- ** Widgets++-- ** Keys++-- | Returns the ASCII code of a key that has been pressed, or -1 if no key has been pressed. +--+-- > kres[, kkeydown] sensekey+--+-- doc: <http://www.csounds.com/manual/html/sensekey.html>+sensekey :: (Sig, Sig)+sensekey = mopc0 "sensekey" ([k,k], [])++-- ** Mouse++-- | Sense the cursor position in an output window. When xyin is called the position of the mouse within +-- the output window is used to reply to the request. This simple mechanism does mean that only one xyin +-- can be used accurately at once. The position of the mouse is reported in the output window. +--+-- > kx, ky xyin iprd, ixmin, ixmax, iymin, iymax [, ixinit] [, iyinit]+--+-- doc: <http://www.csounds.com/manual/html/xyin.html>+xyin :: D -> D -> D -> D -> D -> (Sig, Sig)+xyin = mopc5 "xyin" ([k,k], is 7)++-- ** WII++-- ** P5 Glove+
+ src/Csound/Render.hs view
@@ -0,0 +1,99 @@+module Csound.Render(+ renderCsd, renderCsdBy, out, outs+) where++import Data.Default+import Data.Maybe(catMaybes)+import qualified Data.Map as M+import qualified Data.Set as S++import Control.Monad.Trans.State(evalState)+import Data.Fix++import Csound.Exp+import Csound.Exp.Wrapper hiding (double, int)+import Csound.Tfm.TfmTree(tabMap)+import Csound.Render.Sco+import Csound.Render.Instr+import Csound.Render.Options+import Csound.Tfm.TfmTree(TabMap)+import Csound.Exp.Numeric++import Csound.Render.Pretty++import Csound.Opcode(clip, zeroDbfs)++-- | Synonym for @return . return@.+out :: Sig -> Out+out = return . return++-- | Synonym for @return@.+outs :: [Sig] -> Out+outs = return++-- | Renders Csound file.+renderCsd :: [SigOut] -> String+renderCsd = renderCsdBy def++-- | Renders Csound file with options.+renderCsdBy :: CsdOptions -> [SigOut] -> String+renderCsdBy opt as = show $ ppCsdFile + (renderFlags opt)+ (renderInstr0 (nchnls lastInstrExp) (midiAssignTable ids as) opt)+ (ppOrc $ firstInstr : lastInstr : zipWith (renderInstr krateSet fts) ids instrs)+ (ppSco $ firstInstrNote : lastInstrNote : zipWith (renderScores strs fts) ids scos)+ (renderStringTable strs)+ (renderTotalDur $$ renderTabs fts)+ where scos = map (scoSigOut' . sigOutContent) as + (instrs, effects, initOuts) = unzip3 $ zipWith runExpReader as ids + fts = tabMap $ lastInstrExp : instrs+ strs = stringMap $ concat scos+ ids = take nInstr [2 .. ]+ + nInstr = length as+ firstInstrId = 1+ lastInstrId = nInstr + 2 + + firstInstr = renderInstr krateSet fts firstInstrId $ execSE $ sequence_ initOuts+ lastInstr = renderInstr krateSet fts lastInstrId lastInstrExp+ + lastInstrExp = mixingInstrExp globalEffect effects+ + scoSigOut' x = case x of+ PlainSigOut _ _ -> scoSigOut x+ _ -> [] ++ dur = maybe 64000000 id $ totalDur as+ renderTotalDur = ppTotalDur dur+ firstInstrNote = alwayson firstInstrId dur+ lastInstrNote = alwayson lastInstrId dur+ alwayson instrId time = ppNote instrId 0 time []+ krateSet = S.fromList $ csdKrate opt+ globalEffect = csdEffect opt+++midiAssignTable :: [Int] -> [SigOut] -> [MidiAssign]+midiAssignTable ids instrs = catMaybes $ zipWith mk ids instrs+ where mk n instr = case sigOutContent $ instr of+ Midi ty chn _ -> Just $ MidiAssign ty chn n+ _ -> Nothing++renderTabs = ppMapTable ppTabDef+renderStringTable = ppMapTable ppStrset++mixingInstrExp :: ([[Sig]] -> SE [Sig]) -> [SE [Sig]] -> E+mixingInstrExp globalEffect effects = execSE $ outs' . fmap clip' =<< globalEffect =<< sequence effects+ where clip' x = clip x 0 zeroDbfs+ +totalDur :: [SigOut] -> Maybe Double+totalDur as + | null as' = Nothing+ | otherwise = Just $ maximum $ map eventEnd . scoSigOut =<< as' + where as' = filter isNotMidi $ map sigOutContent as+ isNotMidi x = case x of+ Midi _ _ _ -> False+ _ -> True+ +++
+ src/Csound/Render/Instr.hs view
@@ -0,0 +1,130 @@+{-# Language TupleSections #-}+module Csound.Render.Instr(+ renderInstr+) where++import qualified Data.IntMap as IM+import Control.Monad.Trans.State.Strict+import Data.Char(toLower)+import Data.List(partition, sortBy)+import Control.Arrow(second)+import Data.Ord(comparing)+import Data.Maybe(fromJust)++import Data.Fix.Cse(fromDag, cse)++import Csound.Exp+import Csound.Exp.Wrapper hiding (double, int)++import Csound.Tfm.RateGraph+import Csound.Tfm.TfmTree+import Csound.Render.Pretty++type InstrId = Int+type Dag f = [(Int, f Int)]++renderInstr :: KrateSet -> TabMap -> InstrId -> E -> Doc+renderInstr krateSet ft instrId exp = ppInstr instrId $ renderInstrBody krateSet ft exp++renderInstrBody :: KrateSet -> TabMap -> E -> [Doc]+renderInstrBody krateSet ft sig = map (stmt . clearEmptyResults) $ collectRates krateSet st g+ where stmt :: ([RatedVar], Exp RatedVar) -> Doc+ stmt (res, exp) = renderExp (ppOuts res) exp+ + st = getRenderState g+ g = toDag ft sig+++data RenderState = RenderState + { multiOutsLinks :: IM.IntMap [MultiOutPort]+ , multiOutsRates :: [(Int, Rate)] + }++data MultiOutPort = MultiOutPort+ { idMultiOutPort :: Int+ , orderMultiOutPort :: Int+ } ++getRenderState :: Dag RatedExp -> RenderState+getRenderState a = RenderState moLinks moRates+ where moLinks = IM.fromListWith (++) $ map extract selectInfo+ moRates = fmap (second getRate) selectInfo ++ selectInfo = filter (isSelect . ratedExpExp . snd) a + + extract (n, x) = case ratedExpExp x of+ Select rate order parent -> (parent, [MultiOutPort n order])++filterMultiOutHelpers :: [(RatedVar, Exp RatedVar)] -> [(RatedVar, Exp RatedVar)]+filterMultiOutHelpers = filter (not . isSelect . snd) ++isSelect x = case x of+ Select _ _ _ -> True+ _ -> False+++toDag :: TabMap -> E -> Dag RatedExp +toDag ft exp = fromDag $ cse $ substTabs ft exp+++clearEmptyResults :: ([RatedVar], Exp RatedVar) -> ([RatedVar], Exp RatedVar)+clearEmptyResults (res, exp) = (filter ((/= Xr) . ratedVarRate) res, exp)+ +collectRates :: KrateSet -> RenderState -> Dag RatedExp -> [([RatedVar], Exp RatedVar)]+collectRates krateSet st dag = evalState res lastFreshId + where res = tfmMultiRates st $ filterMultiOutHelpers dag1+ (dag1, lastFreshId) = grate krateSet dag+++tfmMultiRates :: RenderState -> [(RatedVar, Exp RatedVar)] -> State Int [([RatedVar], Exp RatedVar)]+tfmMultiRates st as = mapM substRate as+ where substRate (n, exp) + | isMultiOutExp exp = fmap (,exp) $ getMultiOutVars (multiOutsLinks st IM.! ratedVarId n) exp+ | otherwise = return ([n], exp)++ isMultiOutExp x = case x of+ Tfm i _ -> isMultiOutSignature (infoSignature i)+ _ -> False+ +getMultiOutVars :: [MultiOutPort] -> Exp RatedVar -> State Int [RatedVar]+getMultiOutVars ports exp = fmap (zipWith RatedVar (getRates exp)) (getPorts ports)+ where getPorts ps = state $ \lastFreshId -> + let ps' = sortBy (comparing orderMultiOutPort) ps+ (ids, lastPortOrder) = runState (mapM (fillMissingPorts lastFreshId) ps') 0+ ids' = ids ++ [map (+ lastFreshId) [lastPortOrder + 1 .. portsSize - 1]] + in (concat ids', lastFreshId + portsSize - inUsePortsSize) + + + rates = getRates exp+ portsSize = length rates + inUsePortsSize = length ports + + + fillMissingPorts :: Int -> MultiOutPort -> State Int [Int]+ fillMissingPorts lastFreshId port = state $ \s ->+ if s == order+ then ([e], next) + else (fmap (+ lastFreshId) [s .. order - 1] ++ [e], next)+ where e = idMultiOutPort port+ order = orderMultiOutPort port + next = order + 1+ ++getRate :: RatedExp a -> Rate+getRate = fromJust . ratedExpRate++renderExp :: Doc -> Exp RatedVar -> Doc+renderExp res exp = case fmap ppRatedVar exp of+ ExpPrim (PString n) -> ppStrget res n+ ExpPrim p -> res $= ppPrim p+ Tfm info [a, b] | isInfix info -> res $= binary (infoName info) a b+ Tfm info xs -> ppOpc res (infoName info) xs+ ConvertRate to from x -> ppConvertRate res to from x+ If info t e -> res $= ppIf (ppInline ppCondOp info) t e+ ExpNum (PreInline op as) -> res $= ppNumOp op as+ WriteVar v a -> ppVar v $= a+ ReadVar v -> res $= ppVar v+ x -> error $ "unknown expression: " ++ show x++ +
+ src/Csound/Render/Options.hs view
@@ -0,0 +1,90 @@+module Csound.Render.Options(+ CsdOptions(..), mixing, mixingBy,+ renderInstr0, renderFlags, MidiAssign(..), CtrlId+) where++import Data.List(transpose)+import Data.Default++import Csound.Exp.Wrapper(Channel, Sig, SE, Out)+import Csound.Render.Sco+import Csound.Render.Pretty++type CtrlId = Int++-- | Sums signals for every channel.+mixing :: [[Sig]] -> Out+mixing = return . fmap sum . transpose++-- | Sums signals for every channel and the processes the output with the given function.+mixingBy :: ([Sig] -> Out) -> ([[Sig]] -> Out)+mixingBy f = (f =<<) . mixing ++-- | Csound options. The default value is+--+-- > instance Default CsdOptions where+-- > def = CsdOptions +-- > { csdFlags = ""+-- > , csdRate = 44100+-- > , csdBlockSize = 64+-- > , csdSeed = Nothing+-- > , csdInitc7 = []+-- > , csdEffect = mixing+-- > , csdKrate = ["linseg", "expseg", "linsegr", "expsegr"] }++data CsdOptions = CsdOptions + { csdFlags :: String + , csdRate :: Int + , csdBlockSize :: Int + , csdSeed :: Maybe Int + , csdInitc7 :: [(Channel, CtrlId, Double)]+ , csdEffect :: [[Sig]] -> SE [Sig]+ , csdKrate :: [String]+ }++instance Default CsdOptions where+ def = CsdOptions + { csdFlags = ""+ , csdRate = 44100+ , csdBlockSize = 64+ , csdSeed = Nothing+ , csdInitc7 = []+ , csdEffect = mixing+ , csdKrate = ["linseg", "expseg", "linsegr", "expsegr"] }++renderFlags = text . csdFlags++type Nchnls = Int++data MidiAssign = MidiAssign + { midiAssignType :: MidiType+ , midiAssignChannel :: Channel+ , midiAssignInstr :: Int }++type InstrId = Int++renderInstr0 :: Nchnls -> [MidiAssign] -> CsdOptions -> Doc+renderInstr0 nchnls massignTable opt = ppInstr0 $ [+ stmt "sr" $ csdRate opt,+ stmt "ksmps" $ csdBlockSize opt,+ stmt "nchnls" nchnls, + stmt "0dbfs" 1,+ maybe empty seed $ csdSeed opt] + ++ map initc7 (csdInitc7 opt)+ ++ fmap renderMidiAssign massignTable+ where stmt a b = text a $= int b+ seed n = ppProc "seed" [int n]+ initc7 (chn, ctl, val) = ppProc "initc7" [int chn, int ctl, double val]+ + +renderMidiAssign :: MidiAssign -> Doc+renderMidiAssign a = ppProc opcode $ [int $ midiAssignChannel a, int $ midiAssignInstr a] ++ auxParams+ where opcode = case midiAssignType a of+ Massign -> "massign"+ Pgmassign _ -> "pgmassign"+ auxParams = case midiAssignType a of + Pgmassign (Just n) -> [int n]+ _ -> [] +++
+ src/Csound/Render/Pretty.hs view
@@ -0,0 +1,221 @@+module Csound.Render.Pretty (+ Doc, int, double, text, empty, ($$),++ binaries, unaries, funcs,+ binary, unary, func,+ ppMapTable,+ ($=), ppRatedVar, ppOuts, ppOpc, ppProc, ppVar,+ ppPrim, ppTab, ppStrget, ppStrset, ppTabDef, ppConvertRate, ppIf,+ ppCsdFile, ppInstr, ppInstr0, ppScore, ppNote, ppTotalDur, ppOrc, ppSco, + ppInline, ppCondOp, ppNumOp+) where++import Data.Char(toLower)+import qualified Data.Map as M+import qualified Data.IntMap as IM+import Text.PrettyPrint.Leijen++import Csound.Exp++($$) = (<$$>)++binaries, unaries, funcs :: String -> [Doc] -> Doc++binaries op as = binary op (as !! 0) (as !! 1)+unaries op as = unary op (as !! 0)+funcs op as = func op (as !! 0)++binary :: String -> Doc -> Doc -> Doc+binary op a b = parens $ a <+> text op <+> b++unary :: String -> Doc -> Doc+unary op a = parens $ text op <> a++func :: String -> Doc -> Doc+func op a = text op <> parens a++ppMapTable :: (a -> Int -> Doc) -> M.Map a Int -> Doc+ppMapTable phi = vcat . map (uncurry phi) . M.toList+++ppRate :: Rate -> Doc+ppRate x = case x of+ Sr -> char 'S'+ _ -> phi x+ where phi = text . map toLower . show +++ppRatedVar :: RatedVar -> Doc+ppRatedVar (RatedVar r x) = ppRate r <> int x++ppOuts :: [RatedVar] -> Doc+ppOuts xs = hsep $ punctuate comma $ map ppRatedVar xs++($=) :: Doc -> Doc -> Doc+($=) a b = a <+> equals <+> b++ppOpc :: Doc -> String -> [Doc] -> Doc+ppOpc out name xs = out <+> ppProc name xs++ppProc :: String -> [Doc] -> Doc+ppProc name xs = text name <+> (hsep $ punctuate comma xs)++ppVar :: Var -> Doc+ppVar v = case v of+ Var ty rate name -> ppVarType ty <> ppRate rate <> text name+ VarVerbatim _ name -> text name++ppVarType :: VarType -> Doc+ppVarType x = case x of+ LocalVar -> empty+ GlobalVar -> char 'g'++ppPrim :: Prim -> Doc+ppPrim x = case x of+ P n -> char 'p' <> int n+ PrimInt n -> int n+ PrimDouble d -> double d+ PrimString s -> text s+ PrimTab f -> ppTab f+ +ppTab :: Tab -> Doc+ppTab (Tab size n xs) = text "gen" <> int n <+> int size <+> (hsep $ map double xs)+ +ppIf :: Doc -> Doc -> Doc -> Doc+ppIf p t e = p <+> char '?' <+> t <+> char ':' <+> e++ppStrget :: Doc -> Int -> Doc+ppStrget out n = ppOpc out "strget" [char 'p' <> int n]++ppConvertRate :: Doc -> Rate -> Rate -> Doc -> Doc+ppConvertRate out to from var = case (to, from) of+ (Ar, Kr) -> upsamp var + (Ar, Ir) -> upsamp $ k var+ (Kr, Ar) -> downsamp var+ (Kr, Ir) -> out $= k var+ (Ir, Ar) -> downsamp var+ (Ir, Kr) -> out $= i var+ where upsamp x = ppOpc out "upsamp" [x]+ downsamp x = ppOpc out "downsamp" [x]+ k = func "k"+ i = func "i"++ppTabDef ft id = char 'f' + <> int id + <+> int 0 + <+> (int $ tabSize ft)+ <+> (int $ tabGen ft) + <+> (hsep $ map double $ tabArgs ft)++ppStrset str id = text "strset" <+> int id <> comma <+> (dquotes $ text str)++-- file++newline = line++ +ppCsdFile flags instr0 instrs scores strTable tabs = + tag "CsoundSynthesizer" [+ tag "CsOptions" [flags],+ tag "CsInstruments" [+ instr0, strTable, instrs],+ tag "CsScore" [+ tabs, scores]] ++tag :: String -> [Doc] -> Doc+tag name content = vcat $ punctuate newline [+ char '<' <> text name <> char '>', + vcat $ punctuate newline content, + text "</" <> text name <> char '>'] ++-- instrument++ppInstr :: Int -> [Doc] -> Doc+ppInstr instrId body = vcat [+ text "instr" <+> int instrId,+ vcat body,+ text "endin"]++ppInstr0 = vcat++ppOrc :: [Doc] -> Doc+ppOrc = vcat . punctuate newline++-- score++ppSco = vcat++ppScore = vcat++ppNote instrId time dur args = char 'i' <> int instrId <+> double time <+> double dur <+> hsep args++ppTotalDur d = text "f0" <+> double d++-- expressions++ppInline :: (a -> [Doc] -> Doc) -> Inline a Doc -> Doc+ppInline ppNode a = ppExp $ inlineExp a + where ppExp x = case x of+ InlinePrim n -> inlineEnv a IM.! n+ InlineExp op args -> ppNode op $ fmap ppExp args ++-- booleans++ppCondOp :: CondOp -> [Doc] -> Doc +ppCondOp op = case op of+ TrueOp -> const $ text "(1 == 1)" + FalseOp -> const $ text "(0 == 1)"+ Not -> uno "~" + And -> bi "&&"+ Or -> bi "||"+ Equals -> bi "=="+ NotEquals -> bi "!="+ Less -> bi "<"+ Greater -> bi ">"+ LessEquals -> bi "<=" + GreaterEquals -> bi ">=" + where bi = binaries + uno = unaries+ +-- numeric++ppNumOp :: NumOp -> [Doc] -> Doc+ppNumOp op = case op of+ Add -> bi "+"+ Sub -> bi "-"+ Mul -> bi "*"+ Div -> bi "/"+ Neg -> uno "-" + Pow -> bi "^"+ Mod -> bi "%"+ Sin -> fun "sin"+ Cos -> fun "cos"+ Sinh -> fun "sinh" + Cosh -> fun "cosh"+ Tan -> fun "tan"+ Tanh -> fun "tanh" + Sininv -> fun "sininv"+ Cosinv -> fun "cosinv"+ Taninv -> fun "taninv" + Abs -> fun "abs" + Ceil -> fun "ceil" + ExpOp -> fun "exp"+ Floor -> fun "floor" + Frac -> fun "frac"+ IntOp -> fun "int" + Log -> fun "log" + Log10 -> fun "log10" + Logbtwo -> fun "logbtwo" + Round -> fun "round"+ Sqrt -> fun "sqrt" ++ Ampdb -> fun "ampdb" + Ampdbfs -> fun "ampdbfs" + Dbamp -> fun "dbamp"+ Dbfsamp -> fun "dbfsamp" + Cpspch -> fun "cpspch"+ where bi = binaries+ uno = unaries+ fun = funcs++
+ src/Csound/Render/Sco.hs view
@@ -0,0 +1,137 @@+module Csound.Render.Sco(+ score, SigOut(..), effect, + Msg, massign , pgmassign, MidiType(..),++ Event(..), eventEnd, PlainSigOut(..), renderScores,+ runExpReader, nchnls, stringMap, outs'+) where++import Data.List(nub)+import Data.Tuple(swap)+import qualified Data.Map as M+import Control.Monad.Trans.State+import Control.Monad((<=<), zipWithM)+import Data.Fix++import Csound.Exp+import Csound.Exp.Wrapper hiding (int, double)+import Csound.Tfm.TfmTree(TabMap)+import Csound.Exp.Cons(opcs)+import Csound.Exp.Numeric++import Csound.Render.Pretty++type InstrId = Int++type StringMap = M.Map String Int++-------------------------------------------------------+-- scores++type Note = [Prim]++-- | Midi messages.+data Msg = Msg++data Event a = Event + { eventStart :: Double+ , eventDur :: Double+ , eventContent :: a }+ +eventEnd e = eventStart e + eventDur e++instance Functor Event where+ fmap f a = a{ eventContent = f $ eventContent a }++-- | Applies a global effect function to the signal. With this function we can add reverb or panning to the mixed signal.+-- The argument function takes a list of signals. Each cell of the list contains a signal on the given channel.+effect :: ([Sig] -> Out) -> SigOut -> SigOut+effect f a = a{ sigOutEffect = f <=< sigOutEffect a }++-- | The abstract type of musical tracks. +data SigOut = SigOut + { sigOutEffect :: [Sig] -> SE [Sig] + , sigOutContent :: PlainSigOut+ } ++type ExpReader = Int -> (E, [Var])++runExpReader :: SigOut -> Int -> (E, SE [Sig], SE ())+runExpReader a n = (exp, sigOutEffect a $ fmap readVar vars, mapM_ (flip writeVar (0 :: Sig)) vars)+ where (exp, vars) = (orcSigOut $ sigOutContent a) n+++data PlainSigOut + = PlainSigOut + { orcSigOut :: ExpReader+ , scoSigOut :: [Event Note] }+ | Midi + { midiType :: MidiType+ , midiChn :: Channel+ , orcSigOut :: ExpReader }+ +data MidiType = Massign | Pgmassign (Maybe Int)+++outs' :: [Sig] -> SE ()+outs' as = se_ $ opcs (name as) [(Xr, repeat Ar)] as+ where name as+ | length as == 1 = "out"+ | otherwise = "outs"+++score :: (Arg a) => (a -> Out) -> [(Double, Double, a)] -> SigOut+score instr scores = SigOut return $ + PlainSigOut (expReader $ instr toArg) (fmap (\(a, b, c) -> Event a b (toNote argMethods c)) scores)+++expReader :: SE [Sig] -> ExpReader+expReader instr instrId = swap $ runSE $ do + as <- instr+ let vars = instrPorts instrId as + zipWithM writeVar vars as+ return vars+ ++instrPorts :: Int -> [Sig] -> [Var]+instrPorts instrId sigs = fmap (gOutVar instrId) ids+ where ids = fmap fst $ zip [1 ..] sigs++nchnls :: E -> Int+nchnls x = case ratedExpExp $ unFix x of+ Tfm _ as -> length as++massign :: Channel -> (Msg -> Out) -> SigOut +massign = midiAssign Massign++pgmassign :: Maybe Channel -> Int -> (Msg -> Out) -> SigOut +pgmassign chn = midiAssign (Pgmassign chn)++midiAssign :: MidiType -> Channel -> (Msg -> SE [Sig]) -> SigOut+midiAssign ty n = SigOut return . Midi ty n . expReader . ($ Msg)++-----------------------------------------------------------------+-- render++renderScores :: StringMap -> TabMap -> InstrId -> [Event Note] -> Doc+renderScores strs fts instrId as = ppScore $ map (renderNote strs fts instrId) as++renderNote :: StringMap -> TabMap -> InstrId -> Event Note -> Doc+renderNote strs fts instrId e = ppNote instrId (eventStart e) (eventDur e) (map prim $ eventContent e)+ where prim x = case x of+ PrimInt n -> int n+ PrimDouble d -> double d+ PrimTab f -> int $ fts M.! f+ PrimString s -> int $ strs M.! s+ ++stringMap :: [Event Note] -> StringMap+stringMap as = M.fromList $ zip (nub $ allStrings =<< as) [1 .. ]+ where allStrings evt = primStrings =<< eventContent evt+ primStrings x = case x of+ PrimString s -> [s]+ _ -> []++++
+ src/Csound/Tfm/RateGraph.hs view
@@ -0,0 +1,215 @@+module Csound.Tfm.RateGraph(+ grate, KrateSet+) where++import Data.List(sort, sortBy, nub, find)+import qualified Data.Map as M+import qualified Data.IntMap as IM+import qualified Data.Set as S+import Data.Ord(comparing)+import Data.Maybe(fromJust)++import Data.Default++import Data.STRef+import Control.Monad.ST++import Data.Array+import Data.Array.ST+import Data.Array.MArray++import Csound.Exp++import Debug.Trace++echo :: Show a => String -> a -> a+echo msg a = trace (msg ++ ": " ++ show a) a++type AgentId = Int++data Agent = Agent + { agentResponses :: [Response]+ , agentQueries :: [Query]+ , agentRate :: Rate+ , agentConversions :: [Conversion] }++type Conversion = (RatedVar, Exp RatedVar)++type KrateSet = S.Set Name++instance Default Agent where+ def = Agent [] [] Xr []++data Addr = Addr+ { addrLine :: Int+ , addrArg :: Int + } deriving (Show)++data Query = Query+ { queryAddr :: Addr+ , queryRate :: Rate + } deriving (Show)++data Response = Response+ { responseAddr :: Addr + , responseRatedVar :: RatedVar + } deriving (Show)+ ++newtype MsgBox s = MsgBox { unMsgBox :: STArray s Int Agent }++modifyArray :: Ix i => STArray s i a -> i -> (a -> a) -> ST s ()+modifyArray arr i f = writeArray arr i . f =<< readArray arr i++msgBox :: Int -> ST s (MsgBox s)+msgBox size = fmap MsgBox $ newArray (0, size - 1) def++sendQuery :: AgentId -> Query -> MsgBox s -> ST s ()+sendQuery pid q box = modifyArray (unMsgBox box) pid $ + \x -> x{ agentQueries = q : agentQueries x }++sendResponse :: AgentId -> Response -> MsgBox s -> ST s ()+sendResponse pid r box = modifyArray (unMsgBox box) pid $ + \x -> x{ agentResponses = r : agentResponses x }++loadAgent :: AgentId -> MsgBox s -> ST s Agent+loadAgent pid box = readArray (unMsgBox box) pid++saveAgent :: AgentId -> MsgBox s -> Agent -> ST s ()+saveAgent pid box e = writeArray (unMsgBox box) pid e++discussLine :: KrateSet -> MsgBox s -> STRef s Int -> (Int, RatedExp Int) -> ST s ()+discussLine krateSet box freshIds (pid, exp) = do+ ag <- loadAgent pid box+ let desiredRates = nub $ map queryRate $ agentQueries ag+ curRate = deduceRate krateSet desiredRates exp+ notifyChildren pid curRate (ratedExpExp exp) box+ convTab <- conversionTable freshIds pid curRate desiredRates+ notifyParents box convTab (agentQueries ag)+ saveAgent pid box $ ag{ agentRate = curRate, agentConversions = getConversions pid curRate convTab }+ +deduceRate :: KrateSet -> [Rate] -> RatedExp Int -> Rate+deduceRate krateSet desiredRates exp = case ratedExpExp exp of+ ExpPrim p -> case desiredRates of+ [Sr] -> Sr+ _ -> Ir+ + Tfm info as | isProcedure info -> Xr+ Tfm info as -> case infoSignature info of+ MultiRate _ _ -> Xr+ SingleRate tab -> + let r1 = tfmNoRate (infoName info) desiredRates tab+ in case ratedExpRate exp of+ Just r | M.member r tab -> r+ Just r -> r1+ Nothing -> r1+ + ExpNum _ -> case maximum desiredRates of+ Xr -> Ar+ r -> r+ + Select rate _ _ -> rate+ If info a b -> head $ filter (/= Xr) $ sort desiredRates + ReadVar v -> varRate v+ WriteVar _ _ -> Xr + where tfmNoRate name desiredRates tab = case sort desiredRates of+ [Xr] -> let newDesiredRates = if S.member name krateSet then [Kr] else [Ar]+ in tfmNoRate name newDesiredRates tab + Xr:as -> tfmNoRate name as tab+ as -> fromJust $ find (flip M.member tab) (as ++ [minBound .. maxBound]) + ++notifyChildren :: AgentId -> Rate -> Exp Int -> MsgBox s -> ST s ()+notifyChildren pid curRate exp box = mapM_ (\(to, query) -> sendQuery to query box) $ case exp of+ Tfm info xs -> notifyTfm curRate (infoSignature info) xs+ WriteVar v a -> [(a, mkQuery 0 $ varRate v)]+ If info a b -> (a, mkQuery (-2) curRate) : (b, mkQuery (-1) curRate) : encodeIfEnv (max Kr curRate) (inlineEnv info)+ ExpNum (PreInline op xs) -> queryList xs (repeat curRate)+ _ -> []+ where notifyTfm r signature xs = case signature of+ SingleRate table -> queryList xs $ table M.! r+ MultiRate _ rs -> queryList xs rs++ queryList args rates = zipWith3 (\n a r -> (a, mkQuery n r)) [0 .. ] args rates++ mkQuery n r = Query (Addr pid n) r++ encodeIfEnv rate info = map (\(port, arg) -> (arg, mkQuery port rate)) $ IM.toList info ++notifyParents :: MsgBox s -> M.Map Rate RatedVar -> [Query] -> ST s ()+notifyParents box convTab qs = mapM_ (notifyParent box convTab) qs++notifyParent :: MsgBox s -> M.Map Rate RatedVar -> Query -> ST s ()+notifyParent box convTab q = sendResponse (addrLine $ queryAddr q) (Response (queryAddr q) (convTab M.! queryRate q)) box+++conversionTable :: STRef s Int -> Int -> Rate -> [Rate] -> ST s (M.Map Rate RatedVar)+conversionTable freshIds curId curRate desiredRates = fmap M.fromList $ mapM (flip mkRatedVar curRate) desiredRates+ where coherentRates to from = case (to, from) of+ (Xr, a) -> True + (a, b) | a == b -> True+ (Kr, Ir) -> True+ _ -> False++ mkRatedVar to from + | coherentRates to from = return $ (to, RatedVar curRate curId)+ | otherwise = do + n <- newId freshIds + return $ (to, RatedVar to n)++ newId x = do + n <- readSTRef x + modifySTRef x succ+ return n ++getConversions :: AgentId -> Rate -> M.Map Rate RatedVar -> [Conversion]+getConversions pid curRate convTable = uncurry phi =<< M.toList convTable+ where phi rate var@(RatedVar r n)+ | n == pid = []+ | otherwise = [(var, ConvertRate r curRate $ RatedVar curRate pid)] +++processLine :: MsgBox s -> (Int, RatedExp Int) -> ST s [(RatedVar, Exp RatedVar)]+processLine box (pid, exp) = fmap phi $ loadAgent pid box + where phi a = agentConversions a + ++ return (RatedVar (agentRate a) pid, rateExp (agentRate a) (agentResponses a) (ratedExpExp exp)) +++rateExp :: Rate -> [Response] -> Exp Int -> Exp RatedVar +rateExp curRate rs exp = case exp of+ ExpPrim (P n) | curRate == Sr -> ExpPrim (PString n)+ ExpPrim p -> ExpPrim p+ Tfm i _ -> Tfm i vs + Select rate pid a -> Select rate pid (RatedVar Xr a) + If condInfo _ _ -> case vs of+ a:b:rest -> If (decodeIfEnv condInfo rest) a b+ ExpNum (PreInline op _) -> ExpNum (PreInline op vs)+ ReadVar v -> ReadVar v+ WriteVar v _ -> WriteVar v (head vs)+ where vs = map responseRatedVar $ sortBy (comparing $ addrArg . responseAddr) rs+ decodeIfEnv info xs = info{ inlineEnv = IM.fromList $ zip [0..] xs }+++findRate :: [Rate] -> Rate+findRate [x] = x+findRate xs = case sort $ nub xs of+ [a] -> a+ [] -> Xr+ Xr:as -> minimum as+ as -> minimum as+ ++grate :: KrateSet -> [(Int, RatedExp Int)] -> ([(RatedVar, Exp RatedVar)], Int)+grate krateSet as = runST $ do+ freshIds <- newSTRef n+ box <- msgBox n + mapM_ (discussLine krateSet box freshIds) lines+ graph <- fmap (reverse . concat) $ mapM (processLine box) lines+ lastFreshId <- readSTRef freshIds+ return (graph, lastFreshId)+ where n = length as+ lines = reverse as + +++
+ src/Csound/Tfm/TfmTree.hs view
@@ -0,0 +1,35 @@+module Csound.Tfm.TfmTree(+ TabMap, tabMap, substTabs+) where++import Data.List(nub)+import Data.Fix+import qualified Data.Map as M+import Data.Foldable(foldMap)++import Csound.Exp++type TabMap = M.Map Tab Int++-- substitute ftables for ids ++substTabs :: TabMap -> E -> E+substTabs m = cata $ \(RatedExp r d x) -> Fix $ RatedExp r d $ case x of+ ExpPrim (PrimTab t) -> ExpPrim (PrimInt $ m M.! t)+ _ -> x+++tabMap :: [E] -> TabMap+tabMap es = M.fromList $ zip (nub $ getFtables =<< es) [1 ..]++getFtables :: E -> [Tab]+getFtables = cata $ \(RatedExp _ _ x) -> case x of+ ExpPrim (PrimTab t) -> [t]+ ExpPrim _ -> []+ Tfm _ as -> concat as+ ConvertRate _ _ a -> a+ ExpNum a -> foldMap id a+ Select _ _ a -> a+ If info a b -> foldMap id info ++ a ++ b+ ReadVar _ -> []+ WriteVar _ a -> a
− src/CsoundExpr.hs
@@ -1,283 +0,0 @@-{-|- Library csound-expression allows csound code construction - in functional way.-- It has two parts "CsoundExpr.Base" and "CsoundExpr.Opcodes".- First part "Csound.Base" contains essential functionality of the package. - Second part "Csound.Opcodes" contains opcode definitions.-- This module provides overview of the library.- For examples see sources, folder 'examples'--}-module CsoundExpr (- -- * Introduction- {-|- Csound-expression is csound code generator. Program - produces value of 'CsoundFile' type. - 'CsoundFile' is 'Show'. So that is the way to get csound code. - Function 'csd' can be invoked to make value of 'CsoundFile' type. -- >csd :: Flags -> Header -> EventList Dur SignalOut -> CsoundFile-- * 'Flags' is 'String'. It's pasted in place of csounds flags. -- * 'Header' is csound header declaration. - See module "CsoundExpr.Base.Header" for more details.-- * 'EventList' represents csound orchestra and score sections. This- type comes from external library 'temporal-media' [1]. - 'EventList' contains values with time marks. - Value begins at some time and lasts for some time.- Very much like csound notes, but there is one difference- no need for p-field parameters, translator derives them from - note structure encoded in values of type 'SignalOut'.- 'EventList' can be constructed directly with functions of - 'temporal-media' library, but better way is to use some- front-end. Package 'temporal-music-notation' [2]- provides higher level musical functionality for 'EventList' - construction. -- \[1\] <http://hackage.haskell.org/package/temporal-media>-- \[2\] <http://hackage.haskell.org/package/temporal-music-notation>- - -}-- -- * Instruments- {-|- Instruments are functions from some signal representation to signal. - 'Score' (from 'temporal-music-notation' library) or - 'EventList' (from 'temporal-media' library) is a 'Functor', - so to play on instrument means to apply instrument. - to container of its notes. Instrument can be made with opcodes.- Translator derives p-fields from instrument structure. There are only- two explicit p-fields 'itime' and 'idur' (@p2@ and @p3@ in csound).- -}--- -- * Signals / Types-- {-|- Signals are represented with trees. Tree contains information about how - signal was build. - - There are five types for signals ("CsoundExpr.Base.Types").-- 'Arate' is audio rate signal-- 'Krate' is control rate signal-- 'Irate' is init value- - 'SignalOut' is no output at all (it's produced by opcodes - like out, outs, xtratim) -- 'BoolRate' is comparision of two control or init rate signals- ("CsoundExpr.Base.Boolean")-- - There are two classes to allow csound's polymorphism : 'X' and 'K'-- 'X' = 'Arate' | 'Krate' | 'Irate'-- 'K' = 'Krate' | 'Irate'--- Csound's S - signal is represented with 'String'.- Ftable is represented with 'Irate'. If you want to get 'Krate' ftable- you can construct it with function 'ifB'.- - There are two special types 'MultiOut' - (for opcodes that may produce several outputs, - see "CsoundExpr.Base.MultiOut")- and 'SideEffect' - (for opcodes that rely on number of appearances in csound code, - like @unirand@, see "CsoundExpr.Base.SideEffect") - -}-- -- * Opcodes -- {-|- Naming conventions : Opcodes are named after csound's - counterparts usually. Some opcodes in csound can produce - signals of different rates by request (oscil, linseg).- Those opcodes are labelled with suffix. Suffix defines - output rate of signal (oscilA, oscilK). Some opcodes - in csound have unfixed number of inputs due to setup - parameters, almost all of them. Those opcodes have - first argument that is list of setup parameters.-- example-- >oscilA :: (X a, X b) => [Irate] -> a -> b -> Irate -> Arate- >oscilK :: (K a, K b) => [Irate] -> a -> b -> Irate -> Krate - -}-- -- * Imperative style csound code- - {-|- Most of csound opcodes can be used in functional way. - You can plug them in one another, and make expressions, - but some of them behave like procedures and rely on order - of execution in instrument. Module "CsoundExpr.Base.Imperative" - provides functions to write imperative csound code. -- 'outList' - to sequence procedures-- '(/<=/>)' - Assignment-- 'ar', 'kr', 'ir', 'gar', 'gkr', 'gir' - named values, - to produce signal with specified name and rate.- - Functional style :-- >exmpInstr :: Irate -> SignalOut- >exmpInstr pch = out $ oscilA [] (num 1000) (cpspch pch) $ - > gen10 4096 [1]--- Imperative style :-- >exmpImper :: Irate -> SignalOut - >exmpImper pch = outList [ - > ir "amp" <=> num 1000,- > ir "cps" <=> cpspch pch,- > ir "ft" <=> gen10 4096 [1],- > ar "sig" <=> oscilA [] (ir "amp") (ir "cps") (ir "ft"),- > out (ar "sig")]-- -}- - -- * Arithmetic- {-|- You can use polymorphic operations to do some arihmetic - on signals from "CsoundExpr.Base.Arithmetic". And Signal - is 'Num'. 'Eq' is undefined though. - -}-- -- * Preview-- {-|- To see what will come out of an expression you can - print it. 'Arate', 'Krate' and 'Irate' are 'Show'.- -}-- -- * User Defined opcodes-- {-|- You can add your own opcodes to library, - see "CsoundExpr.Base.UserDefined"- -}-- -- * MIDI - - {-|- There are two ways to tell 'csd' to include instrument - in csound file. Instrument can be a part of 'Score' or - it can be midi instrument, then it should be mentioned - in 'massign' or 'pgmassign' function. If you want to - play midi-instr for some time @t@, you can tell it - to 'csd' function by invoking 'csd' with @'none' t@- ('temporal-media') or @(toList $ 'rest' t)@ ('temporal-music-notation')- in place of 'EventList' value.-- Csound statement @f 0 n@ is always present in generated .csd file.- Here @n@ is score's duration. -- - >import Temporal.Music- >- >import CsoundExpr- >import CsoundExpr.Opcodes- >- >flags = "-odac -d -+rtmidi=virtual -M0"- >- >header = [massign [] 1 instrMidi]- >- >instrMidi :: SignalOut- >instrMidi = out $ oscilA [] (num 5000) cpsmidi $ gen10 4096 [1]- >- >res = csd flags header (rest 3600)- >- >-- play: requires tmp folder in current directory- >main = do- > playDac "tmp" "new" res- -}-- -- * Limits- -- ** What can not be expressed - - -- *** ids- {-| - The major benefit and major problem of csound-expression is - abscense of ids for p-fields, ftables, notes and instruments.- - - no ids for ... means ... no -- p-fields/notes - opcodes that rely on p-fields or invoke instruments-- ftables - k-rate ftables-- instruments - convenient way to specify order of instruments- -}-- -- *** imperative program flow control- - -- | There is no program flow control opcodes (like if, then, goto).- -- But you can use functional if/then from module - -- "CsoundExpr.Base.Boolean"-- -- *** Srate-- -- | I've decided to represent csound's S-rate with 'String'.- -- Signal is represented with tree and it means i can't include- -- opcodes that produce Srate-- -- ** Hack-way around (what somehow can be expressed)-- -- *** instrument order- {-|- Orchestra section is generated from 'EventList'. Different instruments- have different tree structure and one instrument's tree can't be - transformed into another one by replacing leaf-values only. -- You can point to instrument by its structure. There is opcode in - "CsoundExpr.Base.Header" that specifies order of instruments by- list of notes. 'instrOrder' takes in list of notes, if instrument's- tree is equivalent to note it is placed in relation to list of notes.-- There are ways to make mistake. Sometimes it's unpredictable. - - - In example below -- @q1 =/= q2@-- @sco@ contains two instruments (one with @x@, and another - one with @cpspch x@)-- >- >osc x = oscilA [] (num 1000) x $ gen10 4096 [1]- >env = lineK 1 idur 0- >- >q1 x = osc x <*> env- >q2 x = env <*> osc x- >- >sco1 = note 1 440- >sco2 = note 1 $ cpspch 8.00- >- >sco = fmap q1 $ sco1 +:+ sco2-- I think maybe it's worthwhile to introduce some way of instrument id- assignment.- -}----- module CsoundExpr.Base-)-where--import CsoundExpr.Base
− src/CsoundExpr/Base.hs
@@ -1,31 +0,0 @@---- | basic combinators and types------ Imports all 'Base' modules, but "CsoundExpr.Base.UserDefined" --- and "CsoundExpr.Base.Pitch".-module CsoundExpr.Base (- module CsoundExpr.Base.Types,- module CsoundExpr.Base.Boolean,- module CsoundExpr.Base.Imperative,- module CsoundExpr.Base.MultiOut,- module CsoundExpr.Base.Arithmetic,- module CsoundExpr.Base.SideEffect,- module CsoundExpr.Base.Header,--- module CsoundExpr.Base.Score,- module CsoundExpr.Base.Gens, - module CsoundExpr.Base.Pretty -)-where--import CsoundExpr.Base.Types-import CsoundExpr.Base.Boolean-import CsoundExpr.Base.Imperative-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.Arithmetic-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.Header--- import CsoundExpr.Base.Score-import CsoundExpr.Base.Gens -import CsoundExpr.Base.Pretty --
− src/CsoundExpr/Base/Arithmetic.hs
@@ -1,159 +0,0 @@-{-# LANGUAGE - MultiParamTypeClasses, - TypeSynonymInstances, - FlexibleContexts #-}---- | Arithmetic operators--module CsoundExpr.Base.Arithmetic - (Opr2, (<+>), neg, (<->), (<*>), (</>), (<^>), (<%>), (^*), (^+))-where--import Prelude hiding (div)--import Control.Applicative(liftA2, (<$>))-import Data.Function(on)--import CsoundExpr.Translator.Types -import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Base.UserDefined--import CsoundExpr.Base.Types (Irate(..), Krate(..), Arate(..))--import CsoundExpr.Base.Boolean--infixr 9 ^* -infixr 8 ^+, <^>-infixr 7 <*>, </>-infixr 6 <+>, <->, <%>---subst :: (IM d a, IM d b, IM d c) => (d -> d -> c) -> (a -> b -> c)-subst f x y = f (to x) (to y)--opr1 :: IM CsTree a => Name -> (Double -> Double) -> CsTree -> a-opr1 name fun a = maybe (unaryInfixOperation name a) - from (optim1 fun a)--opr1p :: IM CsTree a => Name -> (Double -> Double) -> CsTree -> a-opr1p name fun a = maybe (prefixOperation name $ return a)- from (optim1 fun a) --opr2 :: IM CsTree a => Name -> (Double -> Double -> Double) -> CsTree -> CsTree -> a-opr2 name fun a b = maybe (infixOperation name [a, b])- from (optim2 fun a b)--optim1 :: (Double -> Double) -> CsTree -> Maybe CsTree-optim1 fun a- | isVal a' = fmap (double . fun) $ toDouble $ value a'- | otherwise = Nothing- where a' = exprOp $ exprTreeTag a--optim2 :: (Double -> Double -> Double) -> CsTree -> CsTree -> Maybe CsTree-optim2 fun a b - | isVal a' && isVal b' = fmap double $- (liftA2 fun `on` toDouble . value) a' b' - | otherwise = Nothing- where a' = exprOp $ exprTreeTag a - b' = exprOp $ exprTreeTag b ---------------------------------------------------------------- Type inference--(<+>), (<->), (<*>), (</>) :: (X a, X b, X (Opr2 a b)) => a -> b -> Opr2 a b--(<+>) = subst $ opr2 "+" (+)-(<->) = subst $ opr2 "-" (-)-(<*>) = subst $ opr2 "*" (*)-(</>) = subst $ opr2 "/" (/)---- | \"power of\" operator-(<^>) :: (X a, X b, X (Opr2 a b)) => a -> b -> Opr2 a b-(<^>) = subst $ opr2 "^" (**)---- | modulus operator-(<%>) :: (X a, X b, X (Opr2 a b)) => a -> b -> Opr2 a b-(<%>) = subst $ opr2 "%" modDouble---- | negation-neg :: (X a) => a -> a-neg = opr1 "-" negate . to---- | scaling-(^*) :: X a => Irate -> a -> a-(^*) = subst $ opr2 "*" (*)---- | shifting-(^+) :: X a => Irate -> a -> a-(^+) = subst $ opr2 "+" (+)--modDouble :: Double -> Double -> Double-modDouble a b = signum a * until ( < b') (+ (-b')) a'- where a' = abs a- b' = abs b--------------------------------------------------------------- Num instances-----instance Eq Arate where- (==) = error "(==) is undefined"- (/=) = error "(/=) is undefined"--instance Eq Krate where- (==) = error "(==) is undefined"- (/=) = error "(/=) is undefined"--instance Eq Irate where- (==) = error "(==) is undefined"- (/=) = error "(/=) is undefined"----instance Num Arate where- (+) = (<+>)- (*) = (<*>)- abs = opr1p "abs" abs . to- signum x = ifB (krate x >* num 0) 1 $ ifB (krate x <* num 0) (-1) 0- (-) = (<->)- fromInteger = double . fromInteger---instance Fractional Arate where- (/) = (</>)- fromRational = double . fromRational---instance Num Krate where- (+) = (<+>)- (*) = (<*>)- abs = opr1p "abs" abs . to- signum x = ifB (x >* num 0) 1 $ ifB (x <* num 0) (-1) 0 - (-) = (<->)- fromInteger = double . fromInteger---instance Fractional Krate where- (/) = (</>)- fromRational = double . fromRational---instance Num Irate where- (+) = (<+>)- (*) = (<*>)- abs = opr1p "abs" abs . to- signum x = ifB (x >* num 0) 1 $ ifB (x <* num 0) (-1) 0 - (-) = (<->)- fromInteger = double . fromInteger--num :: Irate -> Irate-num = id--instance Fractional Irate where- (/) = (</>)- fromRational = double . fromRational-------------------------------------------------------
− src/CsoundExpr/Base/Boolean.hs
@@ -1,85 +0,0 @@--- | replica of "Data.Boolean" module. Booleans for csound signals-module CsoundExpr.Base.Boolean (- BoolRate,- true, false, notB, (&&*), (||*),- (==*), (/=*), (<*), (>*), (<=*), (>=*),- ifB, minB, maxB, cond, crop- )- where--import CsoundExpr.Translator.Types-import CsoundExpr.Translator.Cs.IM--import qualified CsoundExpr.Translator.Cs.CsTree as La-import CsoundExpr.Translator.Cs.CsBoolean--import qualified Data.Boolean as B-import Data.Monoid-import Control.Applicative hiding ((<*))-------------------------------------------------- Boolean instances--toCs :: X a => a -> La.CsTree-toCs = to---------------------------------------------- BoolRate--infixr 3 &&*-infixr 2 ||*--true = BoolRate B.true-false = BoolRate B.false-notB (BoolRate a) = BoolRate $ B.notB a-BoolRate a &&* BoolRate b = BoolRate $ a B.&&* b-BoolRate a ||* BoolRate b = BoolRate $ a B.||* b---- IfB--ifB :: X a => BoolRate -> a -> a -> a-ifB (BoolRate c) a b = from $ B.ifB c (toCs a) (toCs b)---- EqB--infix 4 ==*, /=*--biOp :: (K a, K b) => - (La.CsTree -> La.CsTree -> CsBool) - -> a -> b -> BoolRate-biOp op a b = BoolRate $ toCs a `op` toCs b---(==*), (/=*) :: (K a, K b) => a -> b -> BoolRate--(==*) = biOp (B.==*)-(/=*) = biOp (B./=*)---- OrdB--infix 4 <*, <=*, >=*, >*--(<*), (>*), (>=*), (<=*) :: (K a, K b) => a -> b -> BoolRate--(<*) = biOp (B.<*)-(>*) = biOp (B.>*)--(>=*) = biOp (B.>=*)-(<=*) = biOp (B.<=*)---- aux--cond :: (Applicative f, K a) => f BoolRate -> f a -> f a -> f a-cond f a b = fmap from $ B.cond (fmap (\(BoolRate a) -> a) f) (fmap toCs a) (fmap toCs b)--crop :: (Applicative f, Monoid (f a), K a) => f BoolRate -> f a -> f a-crop f a = cond f a mempty---minB, maxB :: K a => a -> a -> a--minB a b = ifB (a <=* b) a b-maxB a b = ifB (a >=* b) a b--
− src/CsoundExpr/Base/Gens.hs
@@ -1,561 +0,0 @@-{-# LANGUAGE - MultiParamTypeClasses, - FlexibleContexts #-}---- | Gen routines. First argument is ftable's size, load time is set to zero.------ <http://www.csounds.com/manual/html/ScoreGenRef.html>----module CsoundExpr.Base.Gens - (- skipNorm, - --- * Specific gens---- | Converts values created with genXXs to some specific GEN form.------ >q = toFtgentmp $ gen10 4096 [1]- toFtgen, toFtgentmp, toFtgenonce,--- * Empty table (csound f0)- ftempty,--- * Sine/Cosine generators- gen09, gen10, gen11, gen19, gen30, gen33, gen34,--- * Line/Exponential Segment Generators:- gen05, gen06, gen07, gen08, gen16, gen25, gen27, --- * File Access GEN Routines:- gen01, gen23, gen28,--- * Numeric Value Access GEN Routines- gen02, gen17,--- * Window Function GEN Routines- gen20,--- * Random Function GEN Routines- gen21, gen40, gen41, gen42, gen43, --- * Waveshaping GEN Routines- gen03, gen13, gen14, gen15,--- * Amplitude Scaling GEN Routines- gen04, gen12, gen24,--- * Mixing GEN Routines- gen18, gen31, gen32,---- * genXX'2- - -- | Gens size is power of two- --- -- >genXX'2 = genXX . (2^) --- gen09'2, gen10'2, gen11'2, gen19'2, - gen30'2, gen33'2, gen34'2, -- gen05'2, gen06'2, gen07'2, gen08'2, - gen16'2, gen25'2, gen27'2, - gen01'2, gen23'2, gen28'2,- gen02'2, gen17'2,- gen20'2,- gen21'2, gen40'2, gen41'2, gen42'2, gen43'2, - gen03'2, gen13'2, gen14'2, gen15'2,- gen04'2, gen12'2, gen24'2,- gen18'2, gen31'2, gen32'2,--- * genXX'12- - -- | Gens size is power of two plus one- --- -- >genXX'12 = genXX . (+1) . (2^)- gen09'12, gen10'12, gen11'12, gen19'12, - gen30'12, gen33'12, gen34'12,-- gen05'12, gen06'12, gen07'12, gen08'12, - gen16'12, gen25'12, gen27'12, -- gen01'12, gen23'12, gen28'12,- gen02'12, gen17'12,- gen20'12,- gen21'12, gen40'12, gen41'12, gen42'12, gen43'12, - gen03'12, gen13'12, gen14'12, gen15'12,- gen04'12, gen12'12, gen24'12,- gen18'12, gen31'12, gen32'12 ---) -where---import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined-import CsoundExpr.Base.Arithmetic--import CsoundExpr.Translator.Types-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.Cs.Utils-import CsoundExpr.Translator.Cs.IM---- | ftempty value is rendered to 0 -ftempty :: Irate-ftempty = ftable EmptyFtable--gen :: IM CsTree a => Id -> Size -> [CsTree] -> a -gen id n = ftable . Ftable n . GEN id--genD :: IM CsTree a => Id -> Size -> [Double] -> a-genD id n = gen id n . map double--genXD :: IM CsTree b => Id -> (a -> CsTree) -> Size -> a -> [Double] -> b-genXD id fun n v vs = gen id n $ fun v : map double vs--ftval :: Irate -> CsTree-ftval = ftable . getFtable . to---- | skip normalization. It can be applied to values created --- with genXX functions or genXX-like values (i.e. things--- converted from genXX to specific gens, or things created--- with genXX'NN)-skipNorm :: Irate -> Irate-skipNorm x - | isFtable' h = from $ mapFtable skipFt $ to x- | isOpc h = from $ skipOpc h t - | otherwise = skipErrorMsg- where (h, t) = decompCsTree $ to x---isFtable' :: CsExpr -> Bool-isFtable' x - | isVal x = isFtable $ value x- | otherwise = False---skipErrorMsg = error "skipNorm argument should be genXX or gen-like value"--skipFt :: Ftable -> Ftable-skipFt x = case x of- (Ftable n (GEN id xs)) -> Ftable n $ GEN (-(abs id)) xs- _ -> x--skipOpc :: CsExpr -> [CsTree] -> CsTree-skipOpc h args- | isGenLike h = pure h $ skipGenId args- | otherwise = skipErrorMsg---isGenLike :: CsExpr -> Bool-isGenLike = (`elem` ["ftgen", "ftgentmp", "ftgenonce"]) . opcName--skipGenId :: [CsTree] -> [CsTree]-skipGenId xs = take 3 xs ++ (skipElem $ xs !! 3) : drop 4 xs- where skipElem = int . negate . abs . - (\(ValueInt x) -> x) . value . getCsExpr----- | converts values created with genXX --- to 'ftgen' csound opcode representation.--- Two first arguments assigned to zero.-toFtgen :: Irate -> Irate-toFtgen = fromGen "ftgen"---- | converts values created with genXX --- to 'ftgentmp' csound opcode representation.--- Two first arguments assigned to zero.-toFtgentmp :: Irate -> Irate-toFtgentmp = fromGen "ftgentmp"---- | converts values created with genXX --- to 'ftgenonce' csound opcode representation.--- Two first arguments assigned to zero.-toFtgenonce :: Irate -> Irate-toFtgenonce = fromGen "ftgenonce" --fromGen :: String -> Irate -> Irate-fromGen name x = opcode name args- where args = int 0 : int 0 : int n : int id : xs- (Ftable n (GEN id xs)) = errorIfEmpty $ getFtable $ to x--errorIfEmpty :: Ftable -> Ftable-errorIfEmpty x = - case x of- EmptyFtable -> error msg- _ -> x- where msg = "conversion is possible for non-empty ftables only"- ------ Sine/Cosine generators--- gen09, gen10, gen11, gen19, gen30, gen33, gen34,---- GEN09 -- Generate composite waveforms made up of weighted --- sums of simple sinusoids--- f # time size 9 pna stra phsa pnb strb phsb--- pnX - partial no (relative to fundamental)--- strX - strength--- phsX - phase---- | GEN09 - Composite waveforms made up of weighted sums of simple sinusoids.------ url : <http://www.csounds.com/manual/html/GEN09.html>-gen09 :: Int -> [Double] -> Irate-gen09 = genD 9---- | GEN10 - Composite waveforms made up of weighted sums of simple sinusoids.------ url : <http://www.csounds.com/manual/html/GEN10.html>-gen10 :: Int -> [Double] -> Irate-gen10 = genD 10---- | GEN11 - Additive set of cosine partials.------ url : <http://www.csounds.com/manual/html/GEN11.html>-gen11 :: Int -> Int -> [Double] -> Irate-gen11 = genXD 11 int---- | GEN19 - Composite waveforms made up of weighted sums of simple sinusoids.------ url : <http://www.csounds.com/manual/html/GEN19.html>-gen19 :: Int -> [Double] -> Irate-gen19 = genD 19----- | GEN30 - Generates harmonic partials by analyzing an existing table.------ url : <http://www.csounds.com/manual/html/GEN30.html>-gen30 :: Int -> Irate -> [Double] -> Irate-gen30 = genXD 30 ftval---- | GEN33 - Generate composite waveforms by mixing simple sinusoids.------ url : <http://www.csounds.com/manual/html/GEN33.html>-gen33 :: Int -> Irate -> [Double] -> Irate-gen33 = genXD 33 ftval----- | GEN34 - Generate composite waveforms by mixing simple sinusoids.------ url : <http://www.csounds.com/manual/html/GEN34.html>-gen34 :: Int -> Irate -> [Double] -> Irate-gen34 = genXD 34 ftval---- Line/Exponential Segment Generators:--- gen05, gen06, gen07, gen08, gen16, gen25, gen27, ---- GEN05 -- Constructs functions from segments of exponential curves.--- f # time size 5 a n1 b n2 c ...--- a, b, c, etc. -- ordinate values, in odd-numbered pfields p5, p7, p9, . . . --- These must be nonzero and must be alike in sign.--- n1, n2,... -- length of segment---- | GEN05 - Constructs functions from segments of exponential curves.------ url : <http://www.csounds.com/manual/html/GEN05.html>-gen05 :: Int -> [Double] -> Irate-gen05 = genD 5---- | GEN06 - Generates a function comprised of segments of cubic polynomials.------ url : <http://www.csounds.com/manual/html/GEN06.html>-gen06 :: Int -> [Double] -> Irate-gen06 = genD 6---- | GEN07 - Constructs functions from segments of straight lines.------ url : <http://www.csounds.com/manual/html/GEN07.html>-gen07 :: Int -> [Double] -> Irate-gen07 = genD 7---- | GEN08 - Generate a piecewise cubic spline curve.------ url : <http://www.csounds.com/manual/html/GEN08.html>-gen08 :: Int -> [Double] -> Irate-gen08 = genD 8---- | GEN16 - Creates a table from a starting value to an ending value.------ url : <http://www.csounds.com/manual/html/GEN16.html>-gen16 :: Int -> [Double] -> Irate-gen16 = genD 16---- | GEN25 - Construct functions from segments of exponential curves in breakpoint fashion.------ url : <http://www.csounds.com/manual/html/GEN25.html>-gen25 :: Int -> [Double] -> Irate-gen25 = genD 25---- | GEN27 - Construct functions from segments of straight lines in breakpoint fashion.------ url : <http://www.csounds.com/manual/html/GEN27.html>-gen27 :: Int -> [Double] -> Irate-gen27 = genD 27----- File Access GEN Routines:--- gen01, gen23, gen28,---- | GEN01 - Transfers data from a soundfile into a function table.------ url : <http://www.csounds.com/manual/html/GEN01.html>-gen01 :: Int -> String -> [Double] -> Irate-gen01 = genXD 1 string ---- | GEN23 - Reads numeric values from a text file.------ url : <http://www.csounds.com/manual/html/GEN23.html>-gen23 :: Int -> String -> Irate-gen23 n file = gen 23 n [string file]---- | GEN28 - Reads a text file which contains a time-tagged trajectory.------ url : <http://www.csounds.com/manual/html/GEN28.html>-gen28 :: Int -> String -> Irate-gen28 n file = gen 28 n [string file]----- Numeric Value Access GEN Routines--- gen02, gen17,---- | GEN02 - Transfers data from immediate pfields into a function table.------ url : <http://www.csounds.com/manual/html/GEN02.html>-gen02 :: Int -> [Double] -> Irate-gen02 = genD 2 ---- | GEN17 - Creates a step function from given x-y pairs.------ url : <http://www.csounds.com/manual/html/GEN17.html>-gen17 :: Int -> [Double] -> Irate-gen17 = genD 17---- Window Function GEN Routines--- gen20,---- | GEN20 - Generates functions of different windows.------ url : <http://www.csounds.com/manual/html/GEN20.html>-gen20 :: Int -> [Double] -> Irate-gen20 = genD 20----- Random Function GEN Routines--- gen21, gen40, gen41, gen42, gen43, ---- | GEN21 - Generates tables of different random distributions.------ url : <http://www.csounds.com/manual/html/GEN21.html>-gen21 :: Int -> [Double] -> SideEffect Irate-gen21 = genD 21 ---- | GEN41 - Generates a random list of numerical pairs.------ url : <http://www.csounds.com/manual/html/GEN41.html>-gen41 :: Int -> [Double] -> SideEffect Irate-gen41 = genD 41 ---- | GEN42 - Generates a random distribution of discrete ranges of values.------ url : <http://www.csounds.com/manual/html/GEN42.html>-gen42 :: Int -> [Double] -> SideEffect Irate-gen42 = genD 42 ---- | GEN40 - Generates a random distribution using a distribution histogram.------ url : <http://www.csounds.com/manual/html/GEN40.html>-gen40 :: Int -> Irate -> SideEffect Irate-gen40 n ft = gen 40 n [ftval ft]---- | GEN43 - Loads a PVOCEX file containing a PV analysis.------ url : <http://www.csounds.com/manual/html/GEN43.html>-gen43 :: Int -> String -> [Double] -> Irate-gen43 = genXD 43 string----- Waveshaping GEN Routines--- gen03, gen13, gen14, gen15,----- | GEN03 - Generates a stored function table by evaluating a polynomial.------ url : <http://www.csounds.com/manual/html/GEN03.html>-gen03 :: Int -> [Double] -> Irate-gen03 = genD 3---- | GEN13 - Stores a polynomial whose coefficients derive from the Chebyshev polynomials of the first kind.------ url : <http://www.csounds.com/manual/html/GEN13.html>-gen13 :: Int -> [Double] -> Irate-gen13 = genD 13---- | GEN14 - Stores a polynomial whose coefficients derive from Chebyshevs of the second kind.------ url : <http://www.csounds.com/manual/html/GEN14.html>-gen14 :: Int -> [Double] -> Irate-gen14 = genD 14---- | GEN15 - Creates two tables of stored polynomial functions.------ url : <http://www.csounds.com/manual/html/GEN15.html>-gen15 :: Int -> [Double] -> Irate-gen15 = genD 15---- Amplitude Scaling GEN Routines--- gen04, gen12, gen24,---- | GEN12 - Generates the log of a modified Bessel function of the second kind.------ url : <http://www.csounds.com/manual/html/GEN12.html>-gen12 :: Int -> [Double] -> Irate-gen12 = genD 12 ---- | GEN04 - Generates a normalizing function.------ url : <http://www.csounds.com/manual/html/GEN04.html>-gen04 :: Int -> Irate -> [Double] -> Irate-gen04 = genXD 4 ftval---- | GEN24 - Reads numeric values from another allocated function-table and rescales them.------ url : <http://www.csounds.com/manual/html/GEN24.html>-gen24 :: Int -> Irate -> [Double] -> Irate-gen24 = genXD 24 ftval----- Mixing GEN Routines--- gen18, gen31, gen32---- | GEN18 - Writes composite waveforms made up of pre-existing waveforms.------ url : <http://www.csounds.com/manual/html/GEN18.html>-gen18 :: Int -> [(Irate, Double, Int, Int)] -> Irate-gen18 n xs = gen 18 n (f =<< xs)- where f (x1, x2, x3, x4) = [ftval x1, double x2, int x3, int x4]---- | GEN31 - Mixes any waveform specified in an existing table.------ url : <http://www.csounds.com/manual/html/GEN31.html>-gen31 :: Int -> Irate -> [Double] -> Irate-gen31 = genXD 31 ftval---- | GEN32 - Mixes any waveform, resampled with either FFT or linear interpolation.------ url : <http://www.csounds.com/manual/html/GEN32.html>-gen32 :: Int -> [(Irate, Int, Double, Double)] -> Irate-gen32 n xs = gen 32 n (f =<< xs)- where f (x1, x2, x3, x4) = [ftval x1, int x2, double x3, double x4]----------------------------------------------------------------------- genXX'(12|2) generation program--{--import Text.PrettyPrint--ids = [9, 10, 11, 19, 30, 33, 34] ++- [5 .. 8] ++ [16, 25, 27] ++- [1, 23, 28] ++ - [2, 17] ++- [20] ++ - [21] ++ [40 .. 43] ++- [3] ++ [13 .. 15] ++- [4, 12, 24] ++ - [18, 31, 32]- --toStr x- | length s == 1 = "0" ++ s- | otherwise = s- where s = show x---- genXX'2 = genXX . (^2)-toGen'2 x = show $ name <> text "'2" <+> equals <+> name <+> text ". (^2)"- where name = text "gen" <> text (toStr x)----- genXX'12 = genXX . (+1) . (^2)-toGen'12 x = show $ name <> text "'12" <+> equals <+> name <+> text ". (+1) . (^2)"- where name = text "gen" <> text (toStr x)----main = do- mapM_ (putStrLn . toGen'12) ids---}------------------------------------------------------------------- genXX'2-----gen09'2 = gen09 . (2^)-gen10'2 = gen10 . (2^)-gen11'2 = gen11 . (2^)-gen19'2 = gen19 . (2^)-gen30'2 = gen30 . (2^)-gen33'2 = gen33 . (2^)-gen34'2 = gen34 . (2^)-gen05'2 = gen05 . (2^)-gen06'2 = gen06 . (2^)-gen07'2 = gen07 . (2^)-gen08'2 = gen08 . (2^)-gen16'2 = gen16 . (2^)-gen25'2 = gen25 . (2^)-gen27'2 = gen27 . (2^)-gen01'2 = gen01 . (2^)-gen23'2 = gen23 . (2^)-gen28'2 = gen28 . (2^)-gen02'2 = gen02 . (2^)-gen17'2 = gen17 . (2^)-gen20'2 = gen20 . (2^)-gen21'2 = gen21 . (2^)-gen40'2 = gen40 . (2^)-gen41'2 = gen41 . (2^)-gen42'2 = gen42 . (2^)-gen43'2 = gen43 . (2^)-gen03'2 = gen03 . (2^)-gen13'2 = gen13 . (2^)-gen14'2 = gen14 . (2^)-gen15'2 = gen15 . (2^)-gen04'2 = gen04 . (2^)-gen12'2 = gen12 . (2^)-gen24'2 = gen24 . (2^)-gen18'2 = gen18 . (2^)-gen31'2 = gen31 . (2^)-gen32'2 = gen32 . (2^)------------------------------------------------------------------- genXX'12-----gen09'12 = gen09 . (+1) . (2^)-gen10'12 = gen10 . (+1) . (2^)-gen11'12 = gen11 . (+1) . (2^)-gen19'12 = gen19 . (+1) . (2^)-gen30'12 = gen30 . (+1) . (2^)-gen33'12 = gen33 . (+1) . (2^)-gen34'12 = gen34 . (+1) . (2^)-gen05'12 = gen05 . (+1) . (2^)-gen06'12 = gen06 . (+1) . (2^)-gen07'12 = gen07 . (+1) . (2^)-gen08'12 = gen08 . (+1) . (2^)-gen16'12 = gen16 . (+1) . (2^)-gen25'12 = gen25 . (+1) . (2^)-gen27'12 = gen27 . (+1) . (2^)-gen01'12 = gen01 . (+1) . (2^)-gen23'12 = gen23 . (+1) . (2^)-gen28'12 = gen28 . (+1) . (2^)-gen02'12 = gen02 . (+1) . (2^)-gen17'12 = gen17 . (+1) . (2^)-gen20'12 = gen20 . (+1) . (2^)-gen21'12 = gen21 . (+1) . (2^)-gen40'12 = gen40 . (+1) . (2^)-gen41'12 = gen41 . (+1) . (2^)-gen42'12 = gen42 . (+1) . (2^)-gen43'12 = gen43 . (+1) . (2^)-gen03'12 = gen03 . (+1) . (2^)-gen13'12 = gen13 . (+1) . (2^)-gen14'12 = gen14 . (+1) . (2^)-gen15'12 = gen15 . (+1) . (2^)-gen04'12 = gen04 . (+1) . (2^)-gen12'12 = gen12 . (+1) . (2^)-gen24'12 = gen24 . (+1) . (2^)-gen18'12 = gen18 . (+1) . (2^)-gen31'12 = gen31 . (+1) . (2^)-gen32'12 = gen32 . (+1) . (2^)-
− src/CsoundExpr/Base/Header.hs
@@ -1,161 +0,0 @@--- | Header section--module CsoundExpr.Base.Header - (- -- * Types- Header, SignalInit,- -- * Setup variables- gSr, gKr, gKsmps, gNchnls, g0dbfs,- -- * midi instruments- massign, pgmassign, - -- * Setting instrument order- instrOrder,- -- * Header opcodes - instr0,- initA, initK, initI,- seed, ctrlinit, - -- * Constants-- -- | (gSr = 44100, gKr = 4410, gKsmps = 10)- headerMono, headerStereo- )-where--import CsoundExpr.Translator.Cs.CsTree (int, double, argIn, Rate(..))-import CsoundExpr.Translator.Types-import CsoundExpr.Base.UserDefined-import CsoundExpr.Base.Imperative((<=>))--import CsoundExpr.Base.Arithmetic --gSr, gKr, gKsmps, gNchnls, g0dbfs :: Irate--gSr = argIn SetupRate "sr"-gKr = argIn SetupRate "kr"-gKsmps = argIn SetupRate "ksmps"-gNchnls = argIn SetupRate "nchnls"-g0dbfs = argIn SetupRate "0dbfs"--massign :: [Int] -- ^ ireset - -> Int -- ^ ichnl- -> SignalOut -- ^ midi instrument- -> SignalInit -massign = Massign--pgmassign :: [Int] -- ^ ichn - -> Int -- ^ ipgm- -> SignalOut -- ^ midi instrument- -> SignalInit -pgmassign = Pgmassign----- | 'instrOrder' defines relative order of instruments in orchestra--- --- Instrument is a mapping from note-interface to 'SignalOut'. If two SignalOut's --- have equal expression-tree structure they are rendered to the same instrument. --- Value in list refers to expresion-tree structure of instrument.--- --- Example :--- --- > header = [--- > instr0 [ --- > gSr <=> 44100,--- > gKr <=> 4410, --- > gKsmps <=> 10,--- > gNchnls <=> 1],--- > instrOrder [instr1 (0, 0), instr2 ""]--- > ]--- --- > instr1 :: (Irate, Irate) -> SignalOut--- > instr1 (amp, cps) = out $ oscilA [] amp cps ------ > instr2 :: String -> SignalOut--- > instr2 file = out $ moA1 $ diskin2 [] file (num 1) --- --instrOrder :: [SignalOut] -> SignalInit -instrOrder = InstrOrder----- | header's initialization statements, like global variables initialization, seed, ctrlinit, fltk, etc.--- --- Example :--- --- > instr0 [--- > gar "sig0" <=> initA 0,--- > gar "sig1" <=> initA 0,--- > gir "fn" <=> ftgen 0 16384 10 [1],--- > seed 0--- > ] --instr0 :: [SignalOut] -> SignalInit-instr0 = Instr0 . outList ----init' :: X a => Irate -> a-init' x = opcode "init" [to x]---- | Puts the value of the i-time expression into a a-rate variable. --initA :: Irate -> Arate-initA = init'---- | Puts the value of the i-time expression into a k-rate variable. --initK :: Irate -> Krate-initK = init'---- | Puts the value of the i-time expression into a i-rate variable. --initI :: Irate -> Irate-initI = init'---- | Sets the global seed value for all x-class noise generators, as well as other opcodes that use a random call, such as grain. --- --- > seed ival--seed :: Irate -> SignalOut-seed = outOpcode "seed" . return . to---- | Sets the initial values for a set of MIDI controllers. --- --- > ctrlinit ichnl, ictlno1, ival1 [, ictlno2] [, ival2] [, ictlno3] \--- > [, ival3] [,...ival32]--ctrlinit :: Irate -> [Irate] -> SignalOut-ctrlinit ichnl ivals = outOpcode "ctrlinit" args- where args = to ichnl : map to ivals---- | Generate a score function table from within the orchestra.--- --- > gir ftgen ifn, itime, isize, igen, iarga [, iargb ] [...] --- --- @ifn@ - is set to zero--- --- > ftgen itime isize igen [iargs]-{--ftgen :: Irate -> Irate -> Irate -> [Irate] -> Irate-ftgen itime isize igen inits = opcode "ftgen" args- where args = [int 0, to itime, to isize, to igen] ++ map to inits--}---headerMono :: Header-headerMono = - return $ instr0 [- gSr <=> 44100,- gKr <=> 4410,- gKsmps <=> 10,- gNchnls <=> 1]---headerStereo :: Header-headerStereo = - return $ instr0 [- gSr <=> 44100,- gKr <=> 4410,- gKsmps <=> 10,- gNchnls <=> 2]--
− src/CsoundExpr/Base/Imperative.hs
@@ -1,147 +0,0 @@-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses,- TypeSynonymInstances, FlexibleContexts #-} - --- | Functions to write imperative style csound code - -module CsoundExpr.Base.Imperative (- outList,- ar,- kr,- ir,- gar,- gkr,- gir,- Assign(..))-where - -import CsoundExpr.Translator.Types-import CsoundExpr.Translator.Cs.IM-import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.ExprTree.ExprTree - - -ar :: Name -> Arate-ar = argIn A - - -kr :: Name -> Krate-kr = argIn K - - -ir :: Name -> Irate-ir = argIn I - - -gar :: Name -> Arate-gar = argIn GA - - -gkr :: Name -> Krate-gkr = argIn GK - - -gir :: Name -> Irate-gir = argIn GI - ---fromArgIn :: (IM CsTree a) => a -> (Rate, Name)-fromArgIn a- | isArg e = (argRate e, argName e)- | otherwise =- error "left hand side of <=> should be named expression"- where e = exprOp $ exprTreeTag t- t = to a :: CsTree - --- Assign Class - - -infixr 0 <=> - - -class Assign a where-- - (<=>) :: a -> a -> SignalOut - - -instance Assign Arate where- sig <=> expr- = let (rate, name) = fromArgIn sig in- SignalOut $ return $ argOut rate name expr - - -instance Assign Krate where- sig <=> expr- = let (rate, name) = fromArgIn sig in- SignalOut $ return $ argOut rate name expr - - -instance Assign Irate where- sig <=> expr- = let (rate, name) = fromArgIn sig in- SignalOut $ return $ argOut rate name expr - - -instance (Assign a) => Assign [a] where- sigs <=> exprs = outList $ zipWith (<=>) sigs exprs - - -instance (Assign a0, Assign a1) => Assign (a0, a1) where- (sig0, sig1) <=> (exprs0, exprs1)- = outList [sig0 <=> exprs0, sig1 <=> exprs1] - - -instance (Assign a0, Assign a1, Assign a2) => Assign (a0, a1, a2)- where- (sig0, sig1, sig2) <=> (exprs0, exprs1, exprs2)- = outList [sig0 <=> exprs0, sig1 <=> exprs1, sig2 <=> exprs2] - - -instance (Assign a0, Assign a1, Assign a2, Assign a3) => Assign- (a0, a1, a2, a3) where- (sig0, sig1, sig2, sig3) <=> (exprs0, exprs1, exprs2, exprs3)- = outList- [sig0 <=> exprs0, sig1 <=> exprs1, sig2 <=> exprs2,- sig3 <=> exprs3] - - -instance (Assign a0, Assign a1, Assign a2, Assign a3, Assign a4) =>- Assign (a0, a1, a2, a3, a4) where- (sig0, sig1, sig2, sig3, sig4) <=>- (exprs0, exprs1, exprs2, exprs3, exprs4)- = outList- [sig0 <=> exprs0, sig1 <=> exprs1, sig2 <=> exprs2,- sig3 <=> exprs3, sig4 <=> exprs4] - - -instance (Assign a0, Assign a1, Assign a2, Assign a3, Assign a4,- Assign a5) =>- Assign (a0, a1, a2, a3, a4, a5) where- (sig0, sig1, sig2, sig3, sig4, sig5) <=>- (exprs0, exprs1, exprs2, exprs3, exprs4, exprs5)- = outList- [sig0 <=> exprs0, sig1 <=> exprs1, sig2 <=> exprs2,- sig3 <=> exprs3, sig4 <=> exprs4, sig5 <=> exprs5] - - -instance (Assign a0, Assign a1, Assign a2, Assign a3, Assign a4,- Assign a5, Assign a6) =>- Assign (a0, a1, a2, a3, a4, a5, a6) where- (sig0, sig1, sig2, sig3, sig4, sig5, sig6) <=>- (exprs0, exprs1, exprs2, exprs3, exprs4, exprs5, exprs6)- = outList- [sig0 <=> exprs0, sig1 <=> exprs1, sig2 <=> exprs2,- sig3 <=> exprs3, sig4 <=> exprs4, sig5 <=> exprs5, sig6 <=> exprs6] - - -instance (Assign a0, Assign a1, Assign a2, Assign a3, Assign a4,- Assign a5, Assign a6, Assign a7) =>- Assign (a0, a1, a2, a3, a4, a5, a6, a7) where- (sig0, sig1, sig2, sig3, sig4, sig5, sig6, sig7) <=>- (exprs0, exprs1, exprs2, exprs3, exprs4, exprs5, exprs6, exprs7)- = outList- [sig0 <=> exprs0, sig1 <=> exprs1, sig2 <=> exprs2,- sig3 <=> exprs3, sig4 <=> exprs4, sig5 <=> exprs5, sig6 <=> exprs6,- sig7 <=> exprs7] -
− src/CsoundExpr/Base/MultiOut.hs
@@ -1,247 +0,0 @@-{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses,- TypeSynonymInstances, FlexibleContexts #-} - --- | Multiple Out - -module CsoundExpr.Base.MultiOut(- MultiOut,- mo,- moA,- moK,- moI,- mo1,- mo2,- mo3,- mo4,- mo5,- mo6,- mo7,- mo8,- moA1,- moA2,- moA3,- moA4,- moA6,- moA8,- moK1,- moK2,- moK3,- moK4,- moK6,- moK8,- moI1,- moI2,- moI3,- moI4,- moI6,- moI8)-where - -import CsoundExpr.Translator.Types-import CsoundExpr.Base.Types-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.Cs.IM - -data MultiOut = MultiOut CsTree - - -instance IM CsTree MultiOut where- from = MultiOut- to (MultiOut a) = a - - -labelMO :: (IM CsTree a) => Int -> MultiOut -> a-labelMO id x = from $ outPort id $ (to x :: CsTree) - - -rateOf :: (X a) => a -> Rate-rateOf a = head $ exprType $ exprTreeTag t1- where t1 = to $ from t0 `asTypeOf` a :: CsTree- t0 = pure (opc "") [] :: CsTree - --- | extracts list of values- -mo :: (X a) => Int -> MultiOut -> [a]-mo n x = map (flip labelMO x) [0 .. n - 1] - - -moA :: Int -> MultiOut -> [Arate]-moA = mo - - -moK :: Int -> MultiOut -> [Krate]-moK = mo - - -moI :: Int -> MultiOut -> [Irate]-moI = mo - - -moA1 :: MultiOut -> (Arate)-moA1 = mo1 - - -moA2 :: MultiOut -> (Arate, Arate)-moA2 = mo2 - - -moA3 :: MultiOut -> (Arate, Arate, Arate)-moA3 = mo3 - - -moA4 :: MultiOut -> (Arate, Arate, Arate, Arate)-moA4 = mo4 - - -moA6 :: MultiOut -> (Arate, Arate, Arate, Arate, Arate, Arate)-moA6 = mo6 - - -moA8 ::- MultiOut ->- (Arate, Arate, Arate, Arate, Arate, Arate, Arate, Arate)-moA8 = mo8 - - -moK1 :: MultiOut -> (Krate)-moK1 = mo1 - - -moK2 :: MultiOut -> (Krate, Krate)-moK2 = mo2 - - -moK3 :: MultiOut -> (Krate, Krate, Krate)-moK3 = mo3 - - -moK4 :: MultiOut -> (Krate, Krate, Krate, Krate)-moK4 = mo4 - - -moK6 :: MultiOut -> (Krate, Krate, Krate, Krate, Krate, Krate)-moK6 = mo6 - - -moK8 ::- MultiOut ->- (Krate, Krate, Krate, Krate, Krate, Krate, Krate, Krate)-moK8 = mo8 - - - -moI1 :: MultiOut -> (Irate)-moI1 = mo1 - - -moI2 :: MultiOut -> (Irate, Irate)-moI2 = mo2 - - -moI3 :: MultiOut -> (Irate, Irate, Irate)-moI3 = mo3 - - -moI4 :: MultiOut -> (Irate, Irate, Irate, Irate)-moI4 = mo4 - - -moI6 :: MultiOut -> (Irate, Irate, Irate, Irate, Irate, Irate)-moI6 = mo6 - - -moI8 ::- MultiOut ->- (Irate, Irate, Irate, Irate, Irate, Irate, Irate, Irate)-moI8 = mo8 - - - -mo1 :: (X a0) => MultiOut -> (a0)-mo1 x = (y0)- where y0 = rateMO rs $ labelMO 0 x- rs = [rateOf y0] - - -mo2 :: (X a0, X a1) => MultiOut -> (a0, a1)-mo2 x = (y0, y1)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- rs = [rateOf y0, rateOf y1] - - -mo3 :: (X a0, X a1, X a2) => MultiOut -> (a0, a1, a2)-mo3 x = (y0, y1, y2)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- y2 = rateMO rs $ labelMO 2 x- rs = [rateOf y0, rateOf y1, rateOf y2] - - -mo4 :: (X a0, X a1, X a2, X a3) => MultiOut -> (a0, a1, a2, a3)-mo4 x = (y0, y1, y2, y3)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- y2 = rateMO rs $ labelMO 2 x- y3 = rateMO rs $ labelMO 3 x- rs = [rateOf y0, rateOf y1, rateOf y2, rateOf y3] - - -mo5 ::- (X a0, X a1, X a2, X a3, X a4) => MultiOut -> (a0, a1, a2, a3, a4)-mo5 x = (y0, y1, y2, y3, y4)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- y2 = rateMO rs $ labelMO 2 x- y3 = rateMO rs $ labelMO 3 x- y4 = rateMO rs $ labelMO 4 x- rs = [rateOf y0, rateOf y1, rateOf y2, rateOf y3, rateOf y4] - - -mo6 ::- (X a0, X a1, X a2, X a3, X a4, X a5) =>- MultiOut -> (a0, a1, a2, a3, a4, a5)-mo6 x = (y0, y1, y2, y3, y4, y5)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- y2 = rateMO rs $ labelMO 2 x- y3 = rateMO rs $ labelMO 3 x- y4 = rateMO rs $ labelMO 4 x- y5 = rateMO rs $ labelMO 5 x- rs- = [rateOf y0, rateOf y1, rateOf y2, rateOf y3, rateOf y4,- rateOf y5] - - -mo7 ::- (X a0, X a1, X a2, X a3, X a4, X a5, X a6) =>- MultiOut -> (a0, a1, a2, a3, a4, a5, a6)-mo7 x = (y0, y1, y2, y3, y4, y5, y6)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- y2 = rateMO rs $ labelMO 2 x- y3 = rateMO rs $ labelMO 3 x- y4 = rateMO rs $ labelMO 4 x- y5 = rateMO rs $ labelMO 5 x- y6 = rateMO rs $ labelMO 6 x- rs- = [rateOf y0, rateOf y1, rateOf y2, rateOf y3, rateOf y4,- rateOf y5, rateOf y6] - - -mo8 ::- (X a0, X a1, X a2, X a3, X a4, X a5, X a6, X a7) =>- MultiOut -> (a0, a1, a2, a3, a4, a5, a6, a7)-mo8 x = (y0, y1, y2, y3, y4, y5, y6, y7)- where y0 = rateMO rs $ labelMO 0 x- y1 = rateMO rs $ labelMO 1 x- y2 = rateMO rs $ labelMO 2 x- y3 = rateMO rs $ labelMO 3 x- y4 = rateMO rs $ labelMO 4 x- y5 = rateMO rs $ labelMO 5 x- y6 = rateMO rs $ labelMO 6 x- y7 = rateMO rs $ labelMO 7 x- rs- = [rateOf y0, rateOf y1, rateOf y2, rateOf y3, rateOf y4,- rateOf y5, rateOf y6, rateOf y7]
− src/CsoundExpr/Base/Pitch.hs
@@ -1,71 +0,0 @@---- | Csound pitch constants for fast sketching. --- It's better to use functions from module "Temporal.Music".--module CsoundExpr.Base.Pitch - ( - Pitch, Octave,- low, high, lower, higher,-- -- * Pitch constants- --- -- | 'c' is 8.00, 'cs' is 8.01 etc.- c, cs, d, ds, e, es, f, fs, g, gs, a, as, b, bs,- cb, db, eb, fb, gb, ab, bb- )-where--import CsoundExpr.Base-import Temporal.Music(temp, Score)--type Pitch = Irate-type Octave = Int---- | 'high' shifts pitch one octave higher-high :: Score Pitch -> Score Pitch-high = higher 1---- | 'low' shifts pitch one octave lower-low :: Score Pitch -> Score Pitch-low = lower 1---- | 'higher' shifts pitch by @n@ octaves higher-higher :: Octave -> Score Pitch -> Score Pitch-higher n = fmap ( + (double $ fromIntegral n))---- | 'lower' shifts pitch by @n@ octaves lower-lower :: Octave -> Score Pitch -> Score Pitch-lower n = higher (-n)----- natural, sharps--c, cs, d, ds, e, es, f, fs, g, gs, a, as, b, bs,- cb, db, eb, fb, gb, ab, bb :: Score Pitch--c = temp 8.00 -cs = temp 8.01-d = temp 8.02-ds = temp 8.03-e = temp 8.04-f = temp 8.05-fs = temp 8.06-g = temp 8.07-gs = temp 8.08-a = temp 8.09-as = temp 8.10-b = temp 8.11--es = f-bs = high c---- flats--cb = low b -db = cs-eb = ds-fb = e-gb = fs-ab = gs-bb = as-
− src/CsoundExpr/Base/Pretty.hs
@@ -1,97 +0,0 @@-module CsoundExpr.Base.Pretty(- Cs.CsoundFile, Cs.Flags,- Player, FileName,- csd, play, playDac)-where---import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs-import CsoundExpr.Translator.Csd-import CsoundExpr.Base.Header-import CsoundExpr.Translator.Types(Dur, SignalOut)--import System.Cmd(system)-import System.Exit(ExitCode)-import System.Directory-import qualified System.FilePath as FP --import Temporal.Music(Score)------------------------------------------------------------------------------------------------------------ translator---- | Generate csound code--- --- Csound code consists of flags, header section, instruments, --- ftables and score. Flags are represeted by @String@. See --- "CsoundExpr.Base.Header" for more details on header --- section. Instruments, ftables and score are generated from --- 'EventList' 'Dur' 'SignalOut'. From list of 'SignalOut' notes list --- of instruments is derived. Expression-tree structures of --- instruments are different from one another. An instrument --- can't be transformed into another one only with substitution --- of values in lists of expression-tree. ------ Example (d minor) :------ >import Temporal.Music.Notation.Score--- >--- >import CsoundExpr--- >import CsoundExpr.Opcodes--- >import CsoundExpr.Base.Pitch--- > --- >flags = "-o dm.wav"--- >--- >setup = instr0 [--- > gSr <=> 44100,--- > gKr <=> 4410,--- > gKsmps <=> 10,--- > gNchnls <=> 1]--- >--- >header = [setup]--- >--- >sinWave = gen10 4096 [1]--- >--- >instr :: Irate -> SignalOut--- >instr x = out $ oscilA [] (num 1000) (cpspch x) sinWave--- >--- >sco = fmap instr $ line [d, f, a, high d]--- >--- >main = print $ csd flags header sco-csd :: Cs.Flags -- ^ flags - -> Header -- ^ header section- -> Score SignalOut -- ^ score section- -> Cs.CsoundFile -- ^ csd file-csd = toCsd----type Player = String-type FileName = String---- | 'play' writes 'CsoundFile' to file in temporal direcory, --- executes csound on it, saves to .wav file, and invokes player------ >play "totem" "./temp" "song" $ csd flags header $ toList scores-play :: Player -> FP.FilePath -> FileName -> Cs.CsoundFile -> IO ExitCode-play playerCode tmpdir tmpfile csoundCode = do- writeFile fileCsd (show csoundCode)- system $ csound fileCsd- system $ player fileWav- where fileCsd = (tmpdir FP.</> tmpfile ++ ".csd") - fileWav = (tmpdir FP.</> tmpfile ++ ".wav") - csound = (("csound -o " ++ fileWav ++ " ") ++ )- player = ((playerCode ++ " ") ++ )---- | 'playDac' writes 'CsoundFile' to in temporal direcory, --- executes csound on it, and plays online------ >playDac "./temp" "song" $ csd flags header $ toList scores-playDac :: FP.FilePath -> FileName -> Cs.CsoundFile -> IO ExitCode-playDac tmpdir tmpfile csoundCode = do- writeFile fileCsd (show csoundCode)- system $ csound fileCsd- where fileCsd = (tmpdir FP.</> tmpfile ++ ".csd") - csound = ("csound -odac " ++ )-
− src/CsoundExpr/Base/SideEffect.hs
@@ -1,99 +0,0 @@-{-# LANGUAGE - MultiParamTypeClasses, - TypeSynonymInstances, - FlexibleInstances,- FlexibleContexts #-}---- | Side Effects------ 'SideEffect' @a@ means output value @a@ of opcode is not determined --- completely by arguments and opcode itself. @a@ relies on number of--- appearences in body of instrument. Way out from 'SideEffect' is--- provided by selectors. Selector gives value and updated 'SideEffect'------ Example a :------ > q = let (a1, a2) = fst $ se2 $ unirandA (1 :: Irate)--- > in outs a1 a2--- --- generates :------ > a1 unirand 1--- > a2 unirand 1--- > outs a1, a2--------- Example b :------ > q = let a1 = fst $ se1 $ unirandA (1 :: Irate)--- > a2 = fst $ se1 $ unirandA (1 :: Irate)--- > in outs a1 a2--- --- generates :------ > a1 unirand 1--- > outs a1, a1------ Example c :------ > q = let v0 = unirandA (1 :: Irate)--- > (a1, v1) = se1 v0--- > (a2, _) = se1 v1--- > in outs a1 a2--- --- generates :------ > a1 unirand 1--- > a2 unirand 1--- > outs a1, a2------- -module CsoundExpr.Base.SideEffect - (SideEffect, se,- se1, se2, se3, se4)-where--import CsoundExpr.Base.Types-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.Cs.IM---data SideEffect a = SideEffect Int a--instance IM CsTree a => IM CsTree (SideEffect a) where- from = SideEffect 0 . from . (mapPurity (const $ Unpure Nothing))- to (SideEffect _ a) = to a---labelSE :: IM CsTree a => SideEffect a -> (a, SideEffect a)-labelSE (SideEffect id a) = (from $ f id $ to a, SideEffect (id+1) a)- where f :: Label -> CsTree -> CsTree- f = labelUnpure---se :: IM CsTree a => Int -> SideEffect a -> ([a], SideEffect a)-se n x = foldl f ([], x) [0 .. n]- where f (vs, x0) _ = let (v, x1) = se1 x0- in (vs ++ [v], x1)---se1 :: IM CsTree a => SideEffect a -> (a, SideEffect a)-se1 = labelSE--se2 :: IM CsTree a => SideEffect a -> ((a, a), SideEffect a)-se2 x0 = ((y0, y1), x2)- where (y0, x1) = se1 x0- (y1, x2) = se1 x1--se3 :: IM CsTree a => SideEffect a -> ((a, a, a), SideEffect a)-se3 x0 = ((y0, y1, y2), x2)- where ((y0, y1), x1) = se2 x0- ( y2 , x2) = se1 x1--se4 :: IM CsTree a => SideEffect a -> ((a, a, a, a), SideEffect a)-se4 x0 = ((y0, y1, y2, y3), x2)- where ((y0, y1, y2), x1) = se3 x0- ( y3 , x2) = se1 x1-
− src/CsoundExpr/Base/Types.hs
@@ -1,62 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}- -module CsoundExpr.Base.Types - (X(..), K,- Arate, Krate, Irate, SignalOut, - itime, idur, num, double, string- )-where--import Text.PrettyPrint(Doc, vcat, text, space)--import qualified CsoundExpr.Translator.Cs.CsTree as La--import CsoundExpr.Translator.Cs.IM-import CsoundExpr.Translator.Types--import CsoundExpr.Base.Imperative -import CsoundExpr.Base.UserDefined(opcode, prefixOperation)-import CsoundExpr.Translator.Csd------------------------------------------------ constructors---- | @p2@ p-field-itime :: Irate-itime = La.param 2---- | @p3@ p-field-idur :: Irate-idur = La.param 3---- | auxiliary function, to write (num n) instead of (n :: Irate)-num :: Irate -> Irate-num = id---- | Lift 'Double' to 'Irate'-double :: Double -> Irate-double = La.double---- | Lift 'String' to 'Irate'-string :: String -> Irate-string = La.string-------------------------------------------------- show instances--instance Show Arate where- show x = show $ vcat [title , ppCsTrees $ fromSignalOut (ar "Out" <=> x)]- where title = text "; Arate expression :"--instance Show Krate where- show x = show $ vcat [title , ppCsTrees $ fromSignalOut (kr "Out" <=> x)]- where title = text "; Krate expression :"--instance Show Irate where- show x = show $ vcat [title , ppCsTrees $ fromSignalOut (ir "Out" <=> x)]- where title = text "; Irate expression :"--instance Show SignalOut where- show x = show $ vcat [title , ppCsTrees $ fromSignalOut x]- where title = text "; SignalOut expression :"-
− src/CsoundExpr/Base/UserDefined.hs
@@ -1,135 +0,0 @@-{-# LANGUAGE - TypeFamilies,- MultiParamTypeClasses, - TypeSynonymInstances, - FlexibleContexts #-}---- | Functions to add your own opcodes or operations------ Constructor takes in 'String' and list of CsTree's. 'String' represnts --- name of opcode\/operation for rendering to csd file. 'CsTree' is an inner --- type of csound expression. Any type @a@ that belongs to 'IM' 'CsTree' @a@ --- can be converted to 'CsTree' with 'to' method. --module CsoundExpr.Base.UserDefined- (IM(..), Opr2(..), - opcode, outOpcode, operation,- infixOperation, prefixOperation, unaryInfixOperation)-where--import CsoundExpr.Translator.Cs.IM-import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Types----- | Opcode constructor------ Example :--- --- > ares oscil xamp, xcps, ift, [iphs]--- > kres oscil kamp, kcps, ift, [iphs]------ > oscilA :: (X a0, X a1) => [Irate] -> a0 -> a1 -> Irate -> Arate--- > oscilA inits xamp xcps ift = opcode "oscil" args --- > where args = [to xamp, to xcps, to ift] ++ map to inits------ > oscilK :: (K a0, K a1) => [Irate] -> a0 -> a1 -> Irate -> Krate--- > oscilK inits kamp kcps ift = opcode "oscil" args --- > where args = [to kamp, to kcps, to ift] ++ map to inits--------- > ares noise xamp, kbeta------ > noise :: (X a, K b) => a -> b -> SideEffect Ares--- > noise xamp kbeta = opcode "noise" args--- > where args = [to xamp, to kbeta]----opcode :: IM CsTree a => String -> [CsTree] -> a -opcode name = from . pure (opc name)---- | Constructor for opcode that doesn't produce any value ------ Example :------ > outs asig1, asig2--- --- > outs :: Arate -> Arate -> SignalOut--- > outs asig1 asig2 = outOpcode "outs" args--- > where args = [to asig1, to asig2]----outOpcode :: String -> [CsTree] -> SignalOut-outOpcode name = SignalOut . return . opcode name---- | operation constructor------ names can be anywhere between arguments------ > operation names args ------ in csound code becomes------ > names !! 0 ++ show (args !! 0) ++ names !! 1 ++ show (args !! 1) ++ ... -operation :: IM CsTree a => [String] -> [CsTree] -> a-operation names = from . pure (opr names) ----- | Infix operation constructor------ Example : ------ > xres = xsig1 + xsig2--- --- > add :: (X a, X b, X (Opr2 a b)) => a -> b -> Opr2 a b--- > add a b = infixOperation "+" [to a, to b]-----infixOperation :: IM CsTree a => String -> [CsTree] -> a-infixOperation name = from . pure (opr ["(", name, ")"])- --- | Prefix operation constructor------ Example :------ > xres = sin(xsig)------ > csSin :: X a => a -> a--- > csSin a = prefixOperation "sin" [to a]----prefixOperation :: IM CsTree a => String -> [CsTree] -> a-prefixOperation name = from . pure (opr [name ++ "(", ")"])---unaryInfixOperation :: IM CsTree a => String -> CsTree -> a-unaryInfixOperation name = from . pure (opr ["(" ++ name, ")"]) . return---- | 'Opr2' @a@ @b@ - defines output type of binary arithmetic operator------ > type instance Opr2 Irate Irate = Irate--- > type instance Opr2 Irate Krate = Krate--- > type instance Opr2 Irate Arate = Arate------ > type instance Opr2 Krate Irate = Krate--- > type instance Opr2 Krate Krate = Krate--- > type instance Opr2 Krate Arate = Arate------ > type instance Opr2 Arate Irate = Arate--- > type instance Opr2 Arate Krate = Arate--- > type instance Opr2 Arate Arate = Arate--type family Opr2 a b --- Is-type instance Opr2 Irate Irate = Irate-type instance Opr2 Irate Krate = Krate-type instance Opr2 Irate Arate = Arate- --- Ks-type instance Opr2 Krate Irate = Krate-type instance Opr2 Krate Krate = Krate-type instance Opr2 Krate Arate = Arate- --- As-type instance Opr2 Arate Irate = Arate-type instance Opr2 Arate Krate = Arate-type instance Opr2 Arate Arate = Arate-
− src/CsoundExpr/Opcodes.hs
@@ -1,43 +0,0 @@--- | Csound opcodes-module CsoundExpr.Opcodes- (- module CsoundExpr.Opcodes.Other, - - module CsoundExpr.Opcodes.Siggen,- module CsoundExpr.Opcodes.Sigio,- module CsoundExpr.Opcodes.Sigmod,- module CsoundExpr.Opcodes.Control,- module CsoundExpr.Opcodes.Table,- module CsoundExpr.Opcodes.Math,- module CsoundExpr.Opcodes.Pitch,- module CsoundExpr.Opcodes.Midi,- module CsoundExpr.Opcodes.Spectral,- module CsoundExpr.Opcodes.Vectorial,- module CsoundExpr.Opcodes.Zak,- module CsoundExpr.Opcodes.Plugin,- module CsoundExpr.Opcodes.OSCNetwork,- module CsoundExpr.Opcodes.MixerOpcodes,- module CsoundExpr.Opcodes.SignalFlowGraphOpcodes,- module CsoundExpr.Opcodes.Imageopcodes,- module CsoundExpr.Opcodes.Miscopcodes)-where--import CsoundExpr.Opcodes.Other--import CsoundExpr.Opcodes.Siggen-import CsoundExpr.Opcodes.Sigio-import CsoundExpr.Opcodes.Sigmod-import CsoundExpr.Opcodes.Control-import CsoundExpr.Opcodes.Table-import CsoundExpr.Opcodes.Math-import CsoundExpr.Opcodes.Pitch-import CsoundExpr.Opcodes.Midi-import CsoundExpr.Opcodes.Spectral-import CsoundExpr.Opcodes.Vectorial-import CsoundExpr.Opcodes.Zak-import CsoundExpr.Opcodes.Plugin-import CsoundExpr.Opcodes.OSCNetwork-import CsoundExpr.Opcodes.MixerOpcodes-import CsoundExpr.Opcodes.SignalFlowGraphOpcodes-import CsoundExpr.Opcodes.Imageopcodes-import CsoundExpr.Opcodes.Miscopcodes
− src/CsoundExpr/Opcodes/Control.hs
@@ -1,36 +0,0 @@--- | Instrument Control-module CsoundExpr.Opcodes.Control- (module CsoundExpr.Opcodes.Control.Clockctl,- module CsoundExpr.Opcodes.Control.Durctl,- module CsoundExpr.Opcodes.Control.FltkIntro,- module CsoundExpr.Opcodes.Control.FltkValuators,- module CsoundExpr.Opcodes.Control.FltkOther,- module CsoundExpr.Opcodes.Control.FltkAppearance,- module CsoundExpr.Opcodes.Control.FltkGeneral,- module CsoundExpr.Opcodes.Control.Invocat,- module CsoundExpr.Opcodes.Control.Pgmctl,- module CsoundExpr.Opcodes.Control.Realtime,- module CsoundExpr.Opcodes.Control.Reinitn,- module CsoundExpr.Opcodes.Control.Sensing,- module CsoundExpr.Opcodes.Control.Stacks,- module CsoundExpr.Opcodes.Control.Subinstrument,- module CsoundExpr.Opcodes.Control.Timeread)-where----import CsoundExpr.Opcodes.Control.Clockctl-import CsoundExpr.Opcodes.Control.Durctl-import CsoundExpr.Opcodes.Control.FltkIntro-import CsoundExpr.Opcodes.Control.FltkValuators-import CsoundExpr.Opcodes.Control.FltkOther-import CsoundExpr.Opcodes.Control.FltkAppearance-import CsoundExpr.Opcodes.Control.FltkGeneral-import CsoundExpr.Opcodes.Control.Invocat-import CsoundExpr.Opcodes.Control.Pgmctl-import CsoundExpr.Opcodes.Control.Realtime-import CsoundExpr.Opcodes.Control.Reinitn-import CsoundExpr.Opcodes.Control.Sensing-import CsoundExpr.Opcodes.Control.Stacks-import CsoundExpr.Opcodes.Control.Subinstrument-import CsoundExpr.Opcodes.Control.Timeread
− src/CsoundExpr/Opcodes/Control/Clockctl.hs
@@ -1,53 +0,0 @@--- | Clock Control-module CsoundExpr.Opcodes.Control.Clockctl- (clockoff,- clockon)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : clockoff--- --- --- * syntax : --- --- > clockoff inum--- --- --- * description : --- --- Stops one of a number of internal clocks.--- --- --- * url : <http://www.csounds.com/manual/html/clockoff.html>- -clockoff :: Irate -> SignalOut-clockoff i0num = outOpcode "clockoff" args- where args = [to i0num]----- | * opcode : clockon--- --- --- * syntax : --- --- > clockon inum--- --- --- * description : --- --- Starts one of a number of internal clocks.--- --- --- * url : <http://www.csounds.com/manual/html/clockon.html>- -clockon :: Irate -> SignalOut-clockon i0num = outOpcode "clockon" args- where args = [to i0num]
− src/CsoundExpr/Opcodes/Control/Durctl.hs
@@ -1,95 +0,0 @@--- | Duration Control Statements-module CsoundExpr.Opcodes.Control.Durctl- (ihold,- turnoff,- turnoff2,- turnon)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : ihold--- --- --- * syntax : --- --- > ihold--- --- --- * description : --- --- Causes a finite-duration note to become a held note--- --- --- * url : <http://www.csounds.com/manual/html/ihold.html>- -ihold :: SignalOut-ihold = outOpcode "ihold" args- where args = []----- | * opcode : turnoff--- --- --- * syntax : --- --- > turnoff--- --- --- * description : --- --- Enables an instrument to turn itself off.--- --- --- * url : <http://www.csounds.com/manual/html/turnoff.html>- -turnoff :: SignalOut-turnoff = outOpcode "turnoff" args- where args = []----- | * opcode : turnoff2--- --- --- * syntax : --- --- > turnoff2 kinsno, kmode, krelease--- --- --- * description : --- --- Turn off instance(s) of other instruments at performance time.--- --- --- * url : <http://www.csounds.com/manual/html/turnoff2.html>- -turnoff2 :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SignalOut-turnoff2 k0insno k1mode k2release = outOpcode "turnoff2" args- where args = [to k0insno, to k1mode, to k2release]----- | * opcode : turnon--- --- --- * syntax : --- --- > turnon insnum [, itime]--- --- --- * description : --- --- Activate an instrument for an indefinite time.--- --- --- * url : <http://www.csounds.com/manual/html/turnon.html>- -turnon :: [Irate] -> Irate -> SignalOut-turnon i0init i1nsnum = outOpcode "turnon" args- where args = [to i1nsnum] ++ map to i0init
− src/CsoundExpr/Opcodes/Control/FltkAppearance.hs
@@ -1,411 +0,0 @@--- | Modifying FLTK Widget Appearance-module CsoundExpr.Opcodes.Control.FltkAppearance- (flColor,- flColor2,- flHide,- flLabel,- flSetAlign,- flSetBox,- flSetColor,- flSetColor2,- flSetFont,- flSetPosition,- flSetSize,- flSetText,- flSetTextColor,- flSetTextSize,- flSetTextType,- flSetVal_i,- flSetVal,- flShow)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : FLcolor--- --- --- * syntax : --- --- > FLcolor ired, igreen, iblue [, ired2, igreen2, iblue2]--- --- --- * description : --- --- Sets the primary colors to RGB values given by the user.--- --- --- * url : <http://www.csounds.com/manual/html/FLcolor.html>- -flColor :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-flColor i0init i1red i2green i3blue = outOpcode "FLcolor" args- where args = [to i1red, to i2green, to i3blue] ++ map to i0init----- | * opcode : FLcolor2--- --- --- * syntax : --- --- > FLcolor2 ired, igreen, iblue--- --- --- * description : --- --- FLcolor2 is the same of FLcolor except it affects the secondary--- (selection) color.--- --- --- * url : <http://www.csounds.com/manual/html/FLcolor2.html>- -flColor2 :: Irate -> Irate -> Irate -> SignalOut-flColor2 i0red i1green i2blue = outOpcode "FLcolor2" args- where args = [to i0red, to i1green, to i2blue]----- | * opcode : FLhide--- --- --- * syntax : --- --- > FLhide ihandle--- --- --- * description : --- --- Hides the target FLTK widget, making it invisible.--- --- --- * url : <http://www.csounds.com/manual/html/FLhide.html>- -flHide :: Irate -> SignalOut-flHide i0handle = outOpcode "FLhide" args- where args = [to i0handle]----- | * opcode : FLlabel--- --- --- * syntax : --- --- > FLlabel isize, ifont, ialign, ired, igreen, iblue--- --- --- * description : --- --- Modifies a set of parameters related to the text label--- appearence of a widget (i.e. size, font, alignment and color of--- corresponding text).--- --- --- * url : <http://www.csounds.com/manual/html/FLlabel.html>- -flLabel ::- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-flLabel i0size i1font i2align i3red i4green i5blue- = outOpcode "FLlabel" args- where args- = [to i0size, to i1font, to i2align, to i3red, to i4green,- to i5blue]----- | * opcode : FLsetAlign--- --- --- * syntax : --- --- > FLsetAlign ialign, ihandle--- --- --- * description : --- --- FLsetAlign sets the text alignment of the label of the target--- widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetAlign.html>- -flSetAlign :: Irate -> Irate -> SignalOut-flSetAlign i0align i1handle = outOpcode "FLsetAlign" args- where args = [to i0align, to i1handle]----- | * opcode : FLsetBox--- --- --- * syntax : --- --- > FLsetBox itype, ihandle--- --- --- * description : --- --- FLsetBox sets the appearance of a box surrounding the target--- widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetBox.html>- -flSetBox :: Irate -> Irate -> SignalOut-flSetBox i0type i1handle = outOpcode "FLsetBox" args- where args = [to i0type, to i1handle]----- | * opcode : FLsetColor--- --- --- * syntax : --- --- > FLsetColor ired, igreen, iblue, ihandle--- --- --- * description : --- --- FLsetColor sets the primary color of the target widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetColor.html>- -flSetColor :: Irate -> Irate -> Irate -> Irate -> SignalOut-flSetColor i0red i1green i2blue i3handle- = outOpcode "FLsetColor" args- where args = [to i0red, to i1green, to i2blue, to i3handle]----- | * opcode : FLsetColor2--- --- --- * syntax : --- --- > FLsetColor2 ired, igreen, iblue, ihandle--- --- --- * description : --- --- FLsetColor2 sets the secondary (or selection) color of the--- target widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetColor2.html>- -flSetColor2 :: Irate -> Irate -> Irate -> Irate -> SignalOut-flSetColor2 i0red i1green i2blue i3handle- = outOpcode "FLsetColor2" args- where args = [to i0red, to i1green, to i2blue, to i3handle]----- | * opcode : FLsetFont--- --- --- * syntax : --- --- > FLsetFont ifont, ihandle--- --- --- * description : --- --- FLsetFont sets the font type of the target widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetFont.html>- -flSetFont :: Irate -> Irate -> SignalOut-flSetFont i0font i1handle = outOpcode "FLsetFont" args- where args = [to i0font, to i1handle]----- | * opcode : FLsetPosition--- --- --- * syntax : --- --- > FLsetPosition ix, iy, ihandle--- --- --- * description : --- --- FLsetPosition sets the position of the target widget according--- to the ix and iy arguments.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetPosition.html>- -flSetPosition :: Irate -> Irate -> Irate -> SignalOut-flSetPosition i0x i1y i2handle = outOpcode "FLsetPosition" args- where args = [to i0x, to i1y, to i2handle]----- | * opcode : FLsetSize--- --- --- * syntax : --- --- > FLsetSize iwidth, iheight, ihandle--- --- --- * description : --- --- FLsetSize resizes the target widget (not the size of its text)--- according to the iwidth and iheight arguments.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetSize.html>- -flSetSize :: Irate -> Irate -> Irate -> SignalOut-flSetSize i0width i1height i2handle = outOpcode "FLsetSize" args- where args = [to i0width, to i1height, to i2handle]----- | * opcode : FLsetText--- --- --- * syntax : --- --- > FLsetText "itext", ihandle--- --- --- * description : --- --- FLsetText sets the label of the target widget to the--- double-quoted text string provided with the itext argument.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetText.html>- -flSetText :: String -> Irate -> SignalOut-flSetText s0itext i1handle = outOpcode "FLsetText" args- where args = [to s0itext, to i1handle]----- | * opcode : FLsetTextColor--- --- --- * syntax : --- --- > FLsetTextColor ired, iblue, igreen, ihandle--- --- --- * description : --- --- FLsetTextColor sets the color of the text label of the target--- widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetTextColor.html>- -flSetTextColor :: Irate -> Irate -> Irate -> Irate -> SignalOut-flSetTextColor i0red i1blue i2green i3handle- = outOpcode "FLsetTextColor" args- where args = [to i0red, to i1blue, to i2green, to i3handle]----- | * opcode : FLsetTextSize--- --- --- * syntax : --- --- > FLsetTextSize isize, ihandle--- --- --- * description : --- --- FLsetTextSize sets the size of the text label of the target--- widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetTextSize.html>- -flSetTextSize :: Irate -> Irate -> SignalOut-flSetTextSize i0size i1handle = outOpcode "FLsetTextSize" args- where args = [to i0size, to i1handle]----- | * opcode : FLsetTextType--- --- --- * syntax : --- --- > FLsetTextType itype, ihandle--- --- --- * description : --- --- FLsetTextType sets some attributes related to the fonts of the--- text label of the target widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetTextType.html>- -flSetTextType :: Irate -> Irate -> SignalOut-flSetTextType i0type i1handle = outOpcode "FLsetTextType" args- where args = [to i0type, to i1handle]----- | * opcode : FLsetVal_i--- --- --- * syntax : --- --- > FLsetVal_i ivalue, ihandle--- --- --- * description : --- --- FLsetVal_i forces the value of a valuator to a number provided--- by the user.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetVal_i.html>- -flSetVal_i :: Irate -> Irate -> SignalOut-flSetVal_i i0value i1handle = outOpcode "FLsetVal_i" args- where args = [to i0value, to i1handle]----- | * opcode : FLsetVal--- --- --- * syntax : --- --- > FLsetVal ktrig, kvalue, ihandle--- --- --- * description : --- --- FLsetVal is almost identical to FLsetVal_i. Except it operates--- at k-rate and it affects the target valuator only when ktrig is--- set to a non-zero value.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetVal.html>- -flSetVal :: (K k0, K k1) => k0 -> k1 -> Irate -> SignalOut-flSetVal k0trig k1value i2handle = outOpcode "FLsetVal" args- where args = [to k0trig, to k1value, to i2handle]----- | * opcode : FLshow--- --- --- * syntax : --- --- > FLshow ihandle--- --- --- * description : --- --- FLshow restores the visibility of a previously hidden widget.--- --- --- * url : <http://www.csounds.com/manual/html/FLshow.html>- -flShow :: Irate -> SignalOut-flShow i0handle = outOpcode "FLshow" args- where args = [to i0handle]
− src/CsoundExpr/Opcodes/Control/FltkGeneral.hs
@@ -1,32 +0,0 @@--- | General FLTK Widget-related Opcodes-module CsoundExpr.Opcodes.Control.FltkGeneral- (flUpdate)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : FLupdate--- --- --- * syntax : --- --- > FLupdate--- --- --- * description : --- --- Same as the FLrun opcode.--- --- --- * url : <http://www.csounds.com/manual/html/FLupdate.html>- -flUpdate :: SignalOut-flUpdate = outOpcode "FLupdate" args- where args = []
− src/CsoundExpr/Opcodes/Control/FltkIntro.hs
@@ -1,366 +0,0 @@--- | FLTK Widgets and GUI controllers-module CsoundExpr.Opcodes.Control.FltkIntro- (flRun,- flGetsnap,- flLoadsnap,- flSavesnap,- flSetsnap,- flSetSnapGroup,- flGroup,- flGroupEnd,- flPack,- flPackEnd,- flPanel,- flPanelEnd,- flScroll,- flScrollEnd,- flTabs,- flTabsEnd)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : FLrun--- --- --- * syntax : --- --- > FLrun--- --- --- * description : --- --- Starts the FLTK widget thread.--- --- --- * url : <http://www.csounds.com/manual/html/FLrun.html>- -flRun :: SignalOut-flRun = outOpcode "FLrun" args- where args = []----- | * opcode : FLgetsnap--- --- --- * syntax : --- --- > inumsnap FLgetsnap index [, igroup]--- --- --- * description : --- --- Retrieves a previously stored snapshot (in memory), i.e. sets--- all valuator to the corresponding values stored in that snaphot.--- --- --- * url : <http://www.csounds.com/manual/html/FLgetsnap.html>- -flGetsnap :: [Irate] -> Irate -> Irate-flGetsnap i0init i1ndex = opcode "FLgetsnap" args- where args = [to i1ndex] ++ map to i0init----- | * opcode : FLloadsnap--- --- --- * syntax : --- --- > FLloadsnap "filename" [, igroup]--- --- --- * description : --- --- FLloadsnap loads all the snapshots contained in a file into the--- memory bank of the current orchestra.--- --- --- * url : <http://www.csounds.com/manual/html/FLloadsnap.html>- -flLoadsnap :: [Irate] -> String -> SignalOut-flLoadsnap i0init s1filename = outOpcode "FLloadsnap" args- where args = [to s1filename] ++ map to i0init----- | * opcode : FLsavesnap--- --- --- * syntax : --- --- > FLsavesnap "filename" [, igroup]--- --- --- * description : --- --- FLsavesnap saves all snapshots currently created (i.e. the--- entire memory bank) into a file.--- --- --- * url : <http://www.csounds.com/manual/html/FLsavesnap.html>- -flSavesnap :: [Irate] -> String -> SignalOut-flSavesnap i0init s1filename = outOpcode "FLsavesnap" args- where args = [to s1filename] ++ map to i0init----- | * opcode : FLsetsnap--- --- --- * syntax : --- --- > inumsnap, inumval FLsetsnap index [, ifn, igroup]--- --- --- * description : --- --- FLsetsnap stores the current status of all valuators present in--- the orchestra into a snapshot location (in memory).--- --- --- * url : <http://www.csounds.com/manual/html/FLsetsnap.html>- -flSetsnap :: [Irate] -> Irate -> MultiOut-flSetsnap i0init i1ndex = opcode "FLsetsnap" args- where args = [to i1ndex] ++ map to i0init----- | * opcode : FLsetSnapGroup--- --- --- * syntax : --- --- > FLsetSnapGroup igroup--- --- --- * description : --- --- FLsetSnapGroup determines the snapshot group of valuators--- declared after it.--- --- --- * url : <http://www.csounds.com/manual/html/FLsetSnapGroup.html>- -flSetSnapGroup :: Irate -> SignalOut-flSetSnapGroup i0group = outOpcode "FLsetSnapGroup" args- where args = [to i0group]----- | * opcode : FLgroup--- --- --- * syntax : --- --- > FLgroup "label", iwidth, iheight, ix, iy [, iborder] [, image]--- --- --- * description : --- --- A FLTK container opcode that groups child widgets.--- --- --- * url : <http://www.csounds.com/manual/html/FLgroup.html>- -flGroup ::- [Irate] -> String -> Irate -> Irate -> Irate -> Irate -> SignalOut-flGroup i0init s1label i2width i3height i4x i5y- = outOpcode "FLgroup" args- where args- = [to s1label, to i2width, to i3height, to i4x, to i5y] ++- map to i0init----- | * opcode : FLgroupEnd--- --- --- * syntax : --- --- > FLgroupEnd--- --- --- * description : --- --- Marks the end of a group of FLTK child widgets.--- --- --- * url : <http://www.csounds.com/manual/html/FLgroupEnd.html>- -flGroupEnd :: SignalOut-flGroupEnd = outOpcode "FLgroupEnd" args- where args = []----- | * opcode : FLpack--- --- --- * syntax : --- --- > FLpack iwidth, iheight, ix, iy, itype, ispace, iborder--- --- --- * description : --- --- FLpack provides the functionality of compressing and aligning--- widgets.--- --- --- * url : <http://www.csounds.com/manual/html/FLpack.html>- -flPack ::- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-flPack i0width i1height i2x i3y i4type i5space i6border- = outOpcode "FLpack" args- where args- = [to i0width, to i1height, to i2x, to i3y, to i4type, to i5space,- to i6border]----- | * opcode : FLpackEnd--- --- --- * syntax : --- --- > FLpackEnd--- --- --- * description : --- --- Marks the end of a group of compressed or aligned FLTK widgets.--- --- --- * url : <http://www.csounds.com/manual/html/FLpackEnd.html>- -flPackEnd :: SignalOut-flPackEnd = outOpcode "FLpackEnd" args- where args = []----- | * opcode : FLpanel--- --- --- * syntax : --- --- > FLpanel "label", iwidth, iheight [, ix] [, iy] [, iborder] [, ikbdcapture] [, iclose]--- --- --- * description : --- --- Creates a window that contains FLTK widgets.--- --- --- * url : <http://www.csounds.com/manual/html/FLpanel.html>- -flPanel :: [Irate] -> String -> Irate -> Irate -> SignalOut-flPanel i0init s1label i2width i3height = outOpcode "FLpanel" args- where args = [to s1label, to i2width, to i3height] ++ map to i0init----- | * opcode : FLpanelEnd--- --- --- * syntax : --- --- > FLpanelEnd--- --- --- * description : --- --- Marks the end of a group of FLTK widgets contained inside of a--- window (panel).--- --- --- * url : <http://www.csounds.com/manual/html/FLpanelEnd.html>- -flPanelEnd :: SignalOut-flPanelEnd = outOpcode "FLpanelEnd" args- where args = []----- | * opcode : FLscroll--- --- --- * syntax : --- --- > FLscroll iwidth, iheight [, ix] [, iy]--- --- --- * description : --- --- FLscroll adds scroll bars to an area.--- --- --- * url : <http://www.csounds.com/manual/html/FLscroll.html>- -flScroll :: [Irate] -> Irate -> Irate -> SignalOut-flScroll i0init i1width i2height = outOpcode "FLscroll" args- where args = [to i1width, to i2height] ++ map to i0init----- | * opcode : FLscrollEnd--- --- --- * syntax : --- --- > FLscrollEnd--- --- --- * description : --- --- A FLTK opcode that marks the end of an area with scrollbars.--- --- --- * url : <http://www.csounds.com/manual/html/FLscrollEnd.html>- -flScrollEnd :: SignalOut-flScrollEnd = outOpcode "FLscrollEnd" args- where args = []----- | * opcode : FLtabs--- --- --- * syntax : --- --- > FLtabs iwidth, iheight, ix, iy--- --- --- * description : --- --- FLtabs is a file card tabs interface that is useful to display--- several areas containing widgets in the same windows,--- alternatively. It must be used together with FLgroup, another--- container that groups child widgets.--- --- --- * url : <http://www.csounds.com/manual/html/FLtabs.html>- -flTabs :: Irate -> Irate -> Irate -> Irate -> SignalOut-flTabs i0width i1height i2x i3y = outOpcode "FLtabs" args- where args = [to i0width, to i1height, to i2x, to i3y]----- | * opcode : FLtabsEnd--- --- --- * syntax : --- --- > FLtabsEnd--- --- --- * description : --- --- Marks the end of a tabbed FLTK interface.--- --- --- * url : <http://www.csounds.com/manual/html/FLtabsEnd.html>- -flTabsEnd :: SignalOut-flTabsEnd = outOpcode "FLtabsEnd" args- where args = []
− src/CsoundExpr/Opcodes/Control/FltkOther.hs
@@ -1,456 +0,0 @@--- | Other FLTK Widgets-module CsoundExpr.Opcodes.Control.FltkOther- (flBox,- flButBank,- flButton,- flKeyIn,- flHvsBox,- flMouse,- flPrintk,- flPrintk2,- flSlidBnk,- flSlidBnk2,- flSlidBnkGetHandle,- flSlidBnkSet,- flSlidBnk2Set,- flSlidBnk2Setk,- flValue,- flVslidBnk,- flVslidBnk2,- flXyin)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : FLbox--- --- --- * syntax : --- --- > ihandle FLbox "label", itype, ifont, isize, iwidth, iheight, ix, iy [, image]--- --- --- * description : --- --- A FLTK widget that displays text inside of a box.--- --- --- * url : <http://www.csounds.com/manual/html/FLbox.html>- -flBox ::- [Irate] ->- String ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate-flBox i0init s1label i2type i3font i4size i5width i6height i7x i8y- = opcode "FLbox" args- where args- = [to s1label, to i2type, to i3font, to i4size, to i5width,- to i6height, to i7x, to i8y]- ++ map to i0init----- | * opcode : FLbutBank--- --- --- * syntax : --- --- > kout, ihandle FLbutBank itype, inumx, inumy, iwidth, iheight, ix, iy, --- > iopcode [, kp1] [, kp2] [, kp3] [, kp4] [, kp5] [....] [, kpN]--- --- --- * description : --- --- A FLTK widget opcode that creates a bank of buttons.--- --- --- * url : <http://www.csounds.com/manual/html/FLbutBank.html>- -flButBank ::- (K k0) =>- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> [k0] -> (Krate, Irate)-flButBank i0type i1numx i2numy i3width i4height i5x i6y i7opcode- k8vals = mo2 $ opcode "FLbutBank" args- where args- = [to i0type, to i1numx, to i2numy, to i3width, to i4height,- to i5x, to i6y, to i7opcode]- ++ map to k8vals----- | * opcode : FLbutton--- --- --- * syntax : --- --- > kout, ihandle FLbutton "label", ion, ioff, itype, iwidth, iheight, ix, --- > iy, iopcode [, kp1] [, kp2] [, kp3] [, kp4] [, kp5] [....] [, kpN]--- --- --- * description : --- --- A FLTK widget opcode that creates a button.--- --- --- * url : <http://www.csounds.com/manual/html/FLbutton.html>- -flButton ::- (K k0) =>- String ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> [k0] -> (Krate, Irate)-flButton s0label i1on i2off i3type i4width i5height i6x i7y- i8opcode k9vals = mo2 $ opcode "FLbutton" args- where args- = [to s0label, to i1on, to i2off, to i3type, to i4width,- to i5height, to i6x, to i7y, to i8opcode]- ++ map to k9vals----- | * opcode : FLkeyIn--- --- --- * syntax : --- --- > kascii FLkeyIn [ifn]--- --- --- * description : --- --- FLkeyIn informs about the status of a key pressed by the user on--- the alphanumeric keyboard when an FLTK panel has got the focus.--- --- --- * url : <http://www.csounds.com/manual/html/FLkeyIn.html>- -flKeyIn :: [Irate] -> Krate-flKeyIn i0init = opcode "FLkeyIn" args- where args = map to i0init----- | * opcode : FLhvsBox--- --- --- * syntax : --- --- > ihandle FLhvsBox inumlinesX, inumlinesY, iwidth, iheight, ix, iy [, image]--- --- --- * description : --- --- FLhvsBox displays a box with a grid useful for visualizing--- two-dimensional Hyper Vectorial Synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/FLhvsBox.html>- -flHvsBox ::- [Irate] ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate-flHvsBox i0init i1numlinesX i2numlinesY i3width i4height i5x i6y- = opcode "FLhvsBox" args- where args- = [to i1numlinesX, to i2numlinesY, to i3width, to i4height, to i5x,- to i6y]- ++ map to i0init----- | * opcode : FLmouse--- --- --- * syntax : --- --- > kx, ky, kb1, kb2, kb3 FLmouse [imode]--- --- --- * description : --- --- FLmouse returns the coordinates of the mouse position within an--- FLTK panel and the state of the three mouse buttons.--- --- --- * url : <http://www.csounds.com/manual/html/FLmouse.html>- -flMouse :: [Irate] -> MultiOut-flMouse i0init = opcode "FLmouse" args- where args = map to i0init----- | * opcode : FLprintk--- --- --- * syntax : --- --- > FLprintk itime, kval, idisp--- --- --- * description : --- --- FLprintk is similar to printk but shows values of a k-rate--- signal in a text field instead of on the console.--- --- --- * url : <http://www.csounds.com/manual/html/FLprintk.html>- -flPrintk :: (K k0) => Irate -> k0 -> Irate -> SignalOut-flPrintk i0time k1val i2disp = outOpcode "FLprintk" args- where args = [to i0time, to k1val, to i2disp]----- | * opcode : FLprintk2--- --- --- * syntax : --- --- > FLprintk2 kval, idisp--- --- --- * description : --- --- FLprintk2 is similar to FLprintk but shows a k-rate variable's--- value only when it changes.--- --- --- * url : <http://www.csounds.com/manual/html/FLprintk2.html>- -flPrintk2 :: (K k0) => k0 -> Irate -> SignalOut-flPrintk2 k0val i1disp = outOpcode "FLprintk2" args- where args = [to k0val, to i1disp]----- | * opcode : FLslidBnk--- --- --- * syntax : --- --- > FLslidBnk "names", inumsliders [, ioutable] [, iwidth] [, iheight] [, ix] --- > [, iy] [, itypetable] [, iexptable] [, istart_index] [, iminmaxtable]--- --- --- * description : --- --- FLslidBnk is a widget containing a bank of horizontal sliders.--- --- --- * url : <http://www.csounds.com/manual/html/FLslidBnk.html>- -flSlidBnk :: [Irate] -> String -> Irate -> SignalOut-flSlidBnk i0init s1names i2numsliders = outOpcode "FLslidBnk" args- where args = [to s1names, to i2numsliders] ++ map to i0init----- | * opcode : FLslidBnk2--- --- --- * syntax : --- --- > FLslidBnk2 "names", inumsliders, ioutable, iconfigtable [,iwidth, iheight, ix, iy, istart_index]--- --- --- * description : --- --- FLslidBnk2 is a widget containing a bank of horizontal sliders.--- --- --- * url : <http://www.csounds.com/manual/html/FLslidBnk2.html>- -flSlidBnk2 ::- [Irate] -> String -> Irate -> Irate -> Irate -> SignalOut-flSlidBnk2 i0init s1names i2numsliders i3outable i4configtable- = outOpcode "FLslidBnk2" args- where args- = [to s1names, to i2numsliders, to i3outable, to i4configtable] ++- map to i0init----- | * opcode : FLslidBnkGetHandle--- --- --- * syntax : --- --- > ihandle FLslidBnkGetHandle--- --- --- * description : --- --- FLslidBnkGetHandle gets the handle of last slider bank created.--- --- --- * url : <http://www.csounds.com/manual/html/FLslidBnkGetHandle.html>- -flSlidBnkGetHandle :: Irate-flSlidBnkGetHandle = opcode "FLslidBnkGetHandle" args- where args = []----- | * opcode : FLslidBnkSet--- --- --- * syntax : --- --- > FLslidBnkSet ihandle, ifn [, istartIndex, istartSlid, inumSlid]--- --- --- * description : --- --- FLslidBnkSet modifies the values of a slider bank according to--- an array of values stored in a table.--- --- --- * url : <http://www.csounds.com/manual/html/FLslidBnkSet.html>- -flSlidBnkSet :: [Irate] -> Irate -> Irate -> SignalOut-flSlidBnkSet i0init i1handle i2fn = outOpcode "FLslidBnkSet" args- where args = [to i1handle, to i2fn] ++ map to i0init----- | * opcode : FLslidBnk2Set--- --- --- * syntax : --- --- > FLslidBnk2Set ihandle, ifn [, istartIndex, istartSlid, inumSlid]--- --- --- * description : --- --- FLslidBnk2Set modifies the values of a slider bank according to--- an array of values stored in a table.--- --- --- * url : <http://www.csounds.com/manual/html/FLslidBnk2Set.html>- -flSlidBnk2Set :: [Irate] -> Irate -> Irate -> SignalOut-flSlidBnk2Set i0init i1handle i2fn = outOpcode "FLslidBnk2Set" args- where args = [to i1handle, to i2fn] ++ map to i0init----- | * opcode : FLslidBnk2Setk--- --- --- * syntax : --- --- > FLslidBnk2Setk ktrig, ihandle, ifn [, istartIndex, istartSlid, inumSlid]--- --- --- * description : --- --- FLslidBnk2Setk modifies the values of a slider bank according to--- an array of values stored in a table.--- --- --- * url : <http://www.csounds.com/manual/html/FLslidBnk2Setk.html>- -flSlidBnk2Setk ::- (K k0) => [Irate] -> k0 -> Irate -> Irate -> SignalOut-flSlidBnk2Setk i0init k1trig i2handle i3fn- = outOpcode "FLslidBnk2Setk" args- where args = [to k1trig, to i2handle, to i3fn] ++ map to i0init----- | * opcode : FLvalue--- --- --- * syntax : --- --- > ihandle FLvalue "label", iwidth, iheight, ix, iy--- --- --- * description : --- --- FLvalue shows current the value of a valuator in a text field.--- --- --- * url : <http://www.csounds.com/manual/html/FLvalue.html>- -flValue :: String -> Irate -> Irate -> Irate -> Irate -> Irate-flValue s0label i1width i2height i3x i4y = opcode "FLvalue" args- where args = [to s0label, to i1width, to i2height, to i3x, to i4y]----- | * opcode : FLvslidBnk--- --- --- * syntax : --- --- > FLvslidBnk "names", inumsliders [, ioutable] [, iwidth] [, iheight] [, ix] --- > [, iy] [, itypetable] [, iexptable] [, istart_index] [, iminmaxtable]--- --- --- * description : --- --- FLvslidBnk is a widget containing a bank of vertical sliders.--- --- --- * url : <http://www.csounds.com/manual/html/FLvslidBnk.html>- -flVslidBnk :: [Irate] -> String -> Irate -> SignalOut-flVslidBnk i0init s1names i2numsliders- = outOpcode "FLvslidBnk" args- where args = [to s1names, to i2numsliders] ++ map to i0init----- | * opcode : FLvslidBnk2--- --- --- * syntax : --- --- > FLvslidBnk2 "names", inumsliders, ioutable, iconfigtable [,iwidth, iheight, ix, iy, istart_index]--- --- --- * description : --- --- FLvslidBnk2 is a widget containing a bank of vertical sliders.--- --- --- * url : <http://www.csounds.com/manual/html/FLvslidBnk2.html>- -flVslidBnk2 ::- [Irate] -> String -> Irate -> Irate -> Irate -> SignalOut-flVslidBnk2 i0init s1names i2numsliders i3outable i4configtable- = outOpcode "FLvslidBnk2" args- where args- = [to s1names, to i2numsliders, to i3outable, to i4configtable] ++- map to i0init----- | * opcode : FLxyin--- --- --- * syntax : --- --- > koutx, kouty, kinside FLxyin ioutx_min, ioutx_max, iouty_min, iouty_max, --- > iwindx_min, iwindx_max, iwindy_min, iwindy_max [, iexpx, iexpy, ioutx, iouty]--- --- --- * description : --- --- Similar to xyin, sense the mouse cursor position in a--- user-defined area inside an FLpanel.--- --- --- * url : <http://www.csounds.com/manual/html/FLxyin.html>- -flXyin ::- [Irate] ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-flXyin i0init i1outx_min i2outx_max i3outy_min i4outy_max- i5windx_min i6windx_max i7windy_min i8windy_max- = opcode "FLxyin" args- where args- = [to i1outx_min, to i2outx_max, to i3outy_min, to i4outy_max,- to i5windx_min, to i6windx_max, to i7windy_min, to i8windy_max]- ++ map to i0init
− src/CsoundExpr/Opcodes/Control/FltkValuators.hs
@@ -1,207 +0,0 @@--- | FLTK Valuators-module CsoundExpr.Opcodes.Control.FltkValuators- (flCount,- flJoy,- flKnob,- flRoller,- flSlider,- flText)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : FLcount--- --- --- * syntax : --- --- > kout, ihandle FLcount "label", imin, imax, istep1, istep2, itype, --- > iwidth, iheight, ix, iy, iopcode [, kp1] [, kp2] [, kp3] [...] [, kpN]--- --- --- * description : --- --- Allows the user to increase/decrease a value with mouse clicks--- on a corresponding arrow button.--- --- --- * url : <http://www.csounds.com/manual/html/FLcount.html>- -flCount ::- (K k0) =>- String ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> [k0] -> (Krate, Irate)-flCount s0label i1min i2max i3step1 i4step2 i5type i6width i7height- i8opcode k9vals = mo2 $ opcode "FLcount" args- where args- = [to s0label, to i1min, to i2max, to i3step1, to i4step2,- to i5type, to i6width, to i7height, to i8opcode]- ++ map to k9vals----- | * opcode : FLjoy--- --- --- * syntax : --- --- > koutx, kouty, ihandlex, ihandley FLjoy "label", iminx, imaxx, iminy, --- > imaxy, iexpx, iexpy, idispx, idispy, iwidth, iheight, ix, iy--- --- --- * description : --- --- FLjoy is a squared area that allows the user to modify two--- output values at the same time. It acts like a joystick.--- --- --- * url : <http://www.csounds.com/manual/html/FLjoy.html>- -flJoy ::- String ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> (Krate, Krate, Irate, Irate)-flJoy s0label i1minx i2maxx i3miny i4maxy i5expx i6expy i7dispx- i8dispy i9width i10height i11x i12y = mo4 $ opcode "FLjoy" args- where args- = [to s0label, to i1minx, to i2maxx, to i3miny, to i4maxy,- to i5expx, to i6expy, to i7dispx, to i8dispy, to i9width,- to i10height, to i11x, to i12y]----- | * opcode : FLknob--- --- --- * syntax : --- --- > kout, ihandle FLknob "label", imin, imax, iexp, itype, idisp, iwidth, --- > ix, iy [, icursorsize]--- --- --- * description : --- --- A FLTK widget opcode that creates a knob.--- --- --- * url : <http://www.csounds.com/manual/html/FLknob.html>- -flKnob ::- [Irate] ->- String ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> (Krate, Irate)-flKnob i0init s1label i2min i3max i4exp i5type i6disp i7width i8x- i9y = mo2 $ opcode "FLknob" args- where args- = [to s1label, to i2min, to i3max, to i4exp, to i5type, to i6disp,- to i7width, to i8x, to i9y]- ++ map to i0init----- | * opcode : FLroller--- --- --- * syntax : --- --- > kout, ihandle FLroller "label", imin, imax, istep, iexp, itype, idisp, --- > iwidth, iheight, ix, iy--- --- --- * description : --- --- FLroller is a sort of knob, but put transversally.--- --- --- * url : <http://www.csounds.com/manual/html/FLroller.html>- -flRoller ::- String ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> (Krate, Irate)-flRoller s0label i1min i2max i3step i4exp i5type i6disp i7width- i8height i9x i10y = mo2 $ opcode "FLroller" args- where args- = [to s0label, to i1min, to i2max, to i3step, to i4exp, to i5type,- to i6disp, to i7width, to i8height, to i9x, to i10y]----- | * opcode : FLslider--- --- --- * syntax : --- --- > kout, ihandle FLslider "label", imin, imax, iexp, itype, idisp, iwidth, --- > iheight, ix, iy--- --- --- * description : --- --- FLslider puts a slider into the corresponding container.--- --- --- * url : <http://www.csounds.com/manual/html/FLslider.html>- -flSlider ::- String ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> (Krate, Irate)-flSlider s0label i1min i2max i3exp i4type i5disp i6width i7height- i8x i9y = mo2 $ opcode "FLslider" args- where args- = [to s0label, to i1min, to i2max, to i3exp, to i4type, to i5disp,- to i6width, to i7height, to i8x, to i9y]----- | * opcode : FLtext--- --- --- * syntax : --- --- > kout, ihandle FLtext "label", imin, imax, istep, itype, iwidth, --- > iheight, ix, iy--- --- --- * description : --- --- FLtext allows the user to modify a parameter value by directly--- typing it into a text field.--- --- --- * url : <http://www.csounds.com/manual/html/FLtext.html>- -flText ::- String ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> (Krate, Irate)-flText s0label i1min i2max i3step i4type i5width i6height i7x i8y- = mo2 $ opcode "FLtext" args- where args- = [to s0label, to i1min, to i2max, to i3step, to i4type,- to i5width, to i6height, to i7x, to i8y]
− src/CsoundExpr/Opcodes/Control/Invocat.hs
@@ -1,58 +0,0 @@--- | Instrument Invocation-module CsoundExpr.Opcodes.Control.Invocat- (scoreline_i,- scoreline)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : scoreline_i--- --- --- * syntax : --- --- > scoreline_i Sin--- --- --- * description : --- --- scoreline_i will issue score events at i-time. It can handle--- strings in the same conditions as the standard score. Multi-line--- strings are accepted, using {{ }} to enclose the string.--- --- --- * url : <http://www.csounds.com/manual/html/scoreline_i.html>- -scoreline_i :: String -> SignalOut-scoreline_i s0in = outOpcode "scoreline_i" args- where args = [to s0in]----- | * opcode : scoreline--- --- --- * syntax : --- --- > scoreline Sin, ktrig--- --- --- * description : --- --- Scoreline will issue one or more score events, if ktrig is 1--- every k-period. It can handle strings in the same conditions as--- the standard score. Multi-line strings are accepted, using {{ }}--- to enclose the string.--- --- --- * url : <http://www.csounds.com/manual/html/scoreline.html>- -scoreline :: (K k0) => String -> k0 -> SignalOut-scoreline s0in k1trig = outOpcode "scoreline" args- where args = [to s0in, to k1trig]
− src/CsoundExpr/Opcodes/Control/Pgmctl.hs
@@ -1,54 +0,0 @@--- | Program Flow Control-module CsoundExpr.Opcodes.Control.Pgmctl- (else',- endif)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : else--- --- --- * syntax : --- --- > else--- --- --- * description : --- --- Executes a block of code when an "if...then" condition is false.--- --- --- * url : <http://www.csounds.com/manual/html/else.html>- -else' :: SignalOut-else' = outOpcode "else" args- where args = []----- | * opcode : endif--- --- --- * syntax : --- --- > endif--- --- --- * description : --- --- Closes a block of code that begins with an "if...then"--- statement.--- --- --- * url : <http://www.csounds.com/manual/html/endif.html>- -endif :: SignalOut-endif = outOpcode "endif" args- where args = []
− src/CsoundExpr/Opcodes/Control/Realtime.hs
@@ -1,164 +0,0 @@--- | Real-time Performance Control-module CsoundExpr.Opcodes.Control.Realtime- (activeI,- activeK,- cpuprc,- maxalloc,- preallocI,- preallocS,- jacktransport)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : active--- --- --- * syntax : --- --- > ir active insnum--- > kres active kinsnum--- --- --- * description : --- --- Returns the number of active instances of an instrument.--- --- --- * url : <http://www.csounds.com/manual/html/active.html>- -activeI :: Irate -> Irate-activeI i0nsnum = opcode "active" args- where args = [to i0nsnum]----- | * opcode : active--- --- --- * syntax : --- --- > ir active insnum--- > kres active kinsnum--- --- --- * description : --- --- Returns the number of active instances of an instrument.--- --- --- * url : <http://www.csounds.com/manual/html/active.html>- -activeK :: (K k0) => k0 -> Krate-activeK k0insnum = opcode "active" args- where args = [to k0insnum]----- | * opcode : cpuprc--- --- --- * syntax : --- --- > cpuprc insnum, ipercent--- --- --- * description : --- --- Control allocation of cpu resources on a per-instrument basis,--- to optimize realtime output.--- --- --- * url : <http://www.csounds.com/manual/html/cpuprc.html>- -cpuprc :: Irate -> Irate -> SignalOut-cpuprc i0nsnum i1percent = outOpcode "cpuprc" args- where args = [to i0nsnum, to i1percent]----- | * opcode : maxalloc--- --- --- * syntax : --- --- > maxalloc insnum, icount--- --- --- * description : --- --- Limits the number of allocations of an instrument.--- --- --- * url : <http://www.csounds.com/manual/html/maxalloc.html>- -maxalloc :: Irate -> Irate -> SignalOut-maxalloc i0nsnum i1count = outOpcode "maxalloc" args- where args = [to i0nsnum, to i1count]----- | * opcode : prealloc--- --- --- * syntax : --- --- > prealloc insnum, icount--- > prealloc "insname", icount--- --- --- * description : --- --- Creates space for instruments but does not run them.--- --- --- * url : <http://www.csounds.com/manual/html/prealloc.html>- -preallocI :: Irate -> Irate -> SignalOut-preallocI i0nsnum i1count = outOpcode "prealloc" args- where args = [to i0nsnum, to i1count]----- | * opcode : prealloc--- --- --- * syntax : --- --- > prealloc insnum, icount--- > prealloc "insname", icount--- --- --- * description : --- --- Creates space for instruments but does not run them.--- --- --- * url : <http://www.csounds.com/manual/html/prealloc.html>- -preallocS :: String -> Irate -> SignalOut-preallocS s0insname i1count = outOpcode "prealloc" args- where args = [to s0insname, to i1count]----- | * opcode : jacktransport--- --- --- * syntax : --- --- > jacktransport icommand [, ilocation]--- --- --- * description : --- --- Start/stop jack_transport and can optionally relocate the--- playback head.--- --- --- * url : <http://www.csounds.com/manual/html/jacktransport.html>- -jacktransport :: [Irate] -> Irate -> SignalOut-jacktransport i0init i1command = outOpcode "jacktransport" args- where args = [to i1command] ++ map to i0init
− src/CsoundExpr/Opcodes/Control/Reinitn.hs
@@ -1,98 +0,0 @@--- | Initialization and Reinitialization-module CsoundExpr.Opcodes.Control.Reinitn- (tival,- passign,- pset,- rireturn)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : tival--- --- --- * syntax : --- --- > ir tival--- --- --- * description : --- --- Puts the value of the instrument's internal tie-in flag into the--- named i-rate variable.--- --- --- * url : <http://www.csounds.com/manual/html/tival.html>- -tival :: Irate-tival = opcode "tival" args- where args = []----- | * opcode : passign--- --- --- * syntax : --- --- > ivar1,... passign [istart]--- --- --- * description : --- --- Assigns a range of p-fields to ivariables.--- --- --- * url : <http://www.csounds.com/manual/html/passign.html>- -passign :: [Irate] -> Irate-passign i0init = opcode "passign" args- where args = map to i0init----- | * opcode : pset--- --- --- * syntax : --- --- > pset icon1 [, icon2] [...]--- --- --- * description : --- --- Defines and initializes numeric arrays at orchestra load time.--- --- --- * url : <http://www.csounds.com/manual/html/pset.html>- -pset :: Irate -> SignalOut-pset i0vals = outOpcode "pset" args- where args = [to i0vals]----- | * opcode : rireturn--- --- --- * syntax : --- --- > rireturn--- --- --- * description : --- --- Terminates a reinit pass (i.e., no-op at standard i-time). This--- statement, or an endin, will cause normal performance to be--- resumed.--- --- --- * url : <http://www.csounds.com/manual/html/rireturn.html>- -rireturn :: SignalOut-rireturn = outOpcode "rireturn" args- where args = []
− src/CsoundExpr/Opcodes/Control/Sensing.hs
@@ -1,604 +0,0 @@--- | Sensing and Control-module CsoundExpr.Opcodes.Control.Sensing- (button,- checkbox,- control,- setctrl,- sensekey,- xyin,- follow,- follow2,- peakA,- peakK,- rms,- ptrack,- pitch,- pitchamdf,- tempest,- tempo,- miditempo,- tempoval,- seqtime,- seqtime2,- trigger,- timedseq,- changed,- getcfg,- rewindscore)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : button--- --- --- * syntax : --- --- > kres button knum--- --- --- * description : --- --- Sense on-screen controls. Requires Winsound or TCL/TK.--- --- --- * url : <http://www.csounds.com/manual/html/button.html>- -button :: (K k0) => k0 -> Krate-button k0num = opcode "button" args- where args = [to k0num]----- | * opcode : checkbox--- --- --- * syntax : --- --- > kres checkbox knum--- --- --- * description : --- --- Sense on-screen controls. Requires Winsound or TCL/TK.--- --- --- * url : <http://www.csounds.com/manual/html/checkbox.html>- -checkbox :: (K k0) => k0 -> Krate-checkbox k0num = opcode "checkbox" args- where args = [to k0num]----- | * opcode : control--- --- --- * syntax : --- --- > kres control knum--- --- --- * description : --- --- Configurable slider controls for realtime user input. Requires--- Winsound or TCL/TK. control reads a slider's value.--- --- --- * url : <http://www.csounds.com/manual/html/control.html>- -control :: (K k0) => k0 -> Krate-control k0num = opcode "control" args- where args = [to k0num]----- | * opcode : setctrl--- --- --- * syntax : --- --- > setctrl inum, ival, itype--- --- --- * description : --- --- Configurable slider controls for realtime user input. Requires--- Winsound or TCL/TK. setctrl sets a slider to a specific value, or--- sets a minimum or maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/setctrl.html>- -setctrl :: Irate -> Irate -> Irate -> SignalOut-setctrl i0num i1val i2type = outOpcode "setctrl" args- where args = [to i0num, to i1val, to i2type]----- | * opcode : sensekey--- --- --- * syntax : --- --- > kres[, kkeydown] sensekey--- --- --- * description : --- --- Returns the ASCII code of a key that has been pressed, or -1 if--- no key has been pressed.--- --- --- * url : <http://www.csounds.com/manual/html/sensekey.html>- -sensekey :: MultiOut-sensekey = opcode "sensekey" args- where args = []----- | * opcode : xyin--- --- --- * syntax : --- --- > kx, ky xyin iprd, ixmin, ixmax, iymin, iymax [, ixinit] [, iyinit]--- --- --- * description : --- --- Sense the cursor position in an output window. When xyin is--- called the position of the mouse within the output window is used--- to reply to the request. This simple mechanism does mean that--- only one xyin can be used accurately at once. The position of the--- mouse is reported in the output window.--- --- --- * url : <http://www.csounds.com/manual/html/xyin.html>- -xyin ::- [Irate] -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-xyin i0init i1prd i2xmin i3xmax i4ymin i5ymax = opcode "xyin" args- where args- = [to i1prd, to i2xmin, to i3xmax, to i4ymin, to i5ymax] ++- map to i0init----- | * opcode : follow--- --- --- * syntax : --- --- > ares follow asig, idt--- --- --- * description : --- --- Envelope follower unit generator.--- --- --- * url : <http://www.csounds.com/manual/html/follow.html>- -follow :: Arate -> Irate -> Arate-follow a0sig i1dt = opcode "follow" args- where args = [to a0sig, to i1dt]----- | * opcode : follow2--- --- --- * syntax : --- --- > ares follow2 asig, katt, krel--- --- --- * description : --- --- A controllable envelope extractor using the algorithm attributed--- to Jean-Marc Jot.--- --- --- * url : <http://www.csounds.com/manual/html/follow2.html>- -follow2 :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate-follow2 a0sig k1att k2rel = opcode "follow2" args- where args = [to a0sig, to k1att, to k2rel]----- | * opcode : peak--- --- --- * syntax : --- --- > kres peak asig--- > kres peak ksig--- --- --- * description : --- --- These opcodes maintain the output k-rate variable as the peak--- absolute level so far received.--- --- --- * url : <http://www.csounds.com/manual/html/peak.html>- -peakA :: Arate -> Krate-peakA a0sig = opcode "peak" args- where args = [to a0sig]----- | * opcode : peak--- --- --- * syntax : --- --- > kres peak asig--- > kres peak ksig--- --- --- * description : --- --- These opcodes maintain the output k-rate variable as the peak--- absolute level so far received.--- --- --- * url : <http://www.csounds.com/manual/html/peak.html>- -peakK :: (K k0) => k0 -> Krate-peakK k0sig = opcode "peak" args- where args = [to k0sig]----- | * opcode : rms--- --- --- * syntax : --- --- > kres rms asig [, ihp] [, iskip]--- --- --- * description : --- --- Determines the root-mean-square amplitude of an audio signal. It--- low-pass filters the actual value, to average in the manner of a--- VU meter.--- --- --- * url : <http://www.csounds.com/manual/html/rms.html>- -rms :: [Irate] -> Arate -> Krate-rms i0init a1sig = opcode "rms" args- where args = [to a1sig] ++ map to i0init----- | * opcode : ptrack--- --- --- * syntax : --- --- > kcps, kamp ptrack asig, ihopsize[,ipeaks]--- --- --- * description : --- --- ptrack takes an input signal, splits it into ihopsize blocks and--- using a STFT method, extracts an estimated pitch for its--- fundamental frequency as well as estimating the total amplitude--- of the signal in dB, relative to full-scale (0dB). The method--- implies an analysis window size of 2*ihopsize samples (overlaping--- by 1/2 window), which has to be a power-of-two, between 128 and--- 8192 (hopsizes between 64 and 4096). Smaller windows will give--- better time precision, but worse frequency accuracy (esp. in low--- fundamentals).This opcode is based on an original algorithm by M.--- Puckette.--- --- --- * url : <http://www.csounds.com/manual/html/ptrack.html>- -ptrack :: [Irate] -> Arate -> Irate -> MultiOut-ptrack i0init a1sig i2hopsize = opcode "ptrack" args- where args = [to a1sig, to i2hopsize] ++ map to i0init----- | * opcode : pitch--- --- --- * syntax : --- --- > koct, kamp pitch asig, iupdte, ilo, ihi, idbthresh [, ifrqs] [, iconf] --- > [, istrt] [, iocts] [, iq] [, inptls] [, irolloff] [, iskip]--- --- --- * description : --- --- Using the same techniques as spectrum and specptrk, pitch tracks--- the pitch of the signal in octave point decimal form, and--- amplitude in dB.--- --- --- * url : <http://www.csounds.com/manual/html/pitch.html>- -pitch ::- [Irate] -> Arate -> Irate -> Irate -> Irate -> Irate -> MultiOut-pitch i0init a1sig i2updte i3lo i4hi i5dbthresh- = opcode "pitch" args- where args- = [to a1sig, to i2updte, to i3lo, to i4hi, to i5dbthresh] ++- map to i0init----- | * opcode : pitchamdf--- --- --- * syntax : --- --- > kcps, krms pitchamdf asig, imincps, imaxcps [, icps] [, imedi] --- > [, idowns] [, iexcps] [, irmsmedi]--- --- --- * description : --- --- Follows the pitch of a signal based on the AMDF method (Average--- Magnitude Difference Function). Outputs pitch and amplitude--- tracking signals. The method is quite fast and should run in--- realtime. This technique usually works best for monophonic--- signals.--- --- --- * url : <http://www.csounds.com/manual/html/pitchamdf.html>- -pitchamdf :: [Irate] -> Arate -> Irate -> Irate -> MultiOut-pitchamdf i0init a1sig i2mincps i3maxcps = opcode "pitchamdf" args- where args = [to a1sig, to i2mincps, to i3maxcps] ++ map to i0init----- | * opcode : tempest--- --- --- * syntax : --- --- > ktemp tempest kin, iprd, imindur, imemdur, ihp, ithresh, ihtim, ixfdbak, --- > istartempo, ifn [, idisprd] [, itweek]--- --- --- * description : --- --- Estimate the tempo of beat patterns in a control signal.--- --- --- * url : <http://www.csounds.com/manual/html/tempest.html>- -tempest ::- (K k0) =>- [Irate] ->- k0 ->- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Krate-tempest i0init k1in i2prd i3mindur i4memdur i5hp i6thresh i7htim- i8xfdbak i9startempo i10fn = opcode "tempest" args- where args- = [to k1in, to i2prd, to i3mindur, to i4memdur, to i5hp,- to i6thresh, to i7htim, to i8xfdbak, to i9startempo, to i10fn]- ++ map to i0init----- | * opcode : tempo--- --- --- * syntax : --- --- > tempo ktempo, istartempo--- --- --- * description : --- --- Apply tempo control to an uninterpreted score.--- --- --- * url : <http://www.csounds.com/manual/html/tempo.html>- -tempo :: (K k0) => k0 -> Irate -> SignalOut-tempo k0tempo i1startempo = outOpcode "tempo" args- where args = [to k0tempo, to i1startempo]----- | * opcode : miditempo--- --- --- * syntax : --- --- > ksig miditempo--- --- --- * description : --- --- Returns the current tempo at k-rate, of either the MIDI file (if--- available) or the score--- --- --- * url : <http://www.csounds.com/manual/html/miditempo.html>- -miditempo :: Krate-miditempo = opcode "miditempo" args- where args = []----- | * opcode : tempoval--- --- --- * syntax : --- --- > kres tempoval--- --- --- * description : --- --- Reads the current value of the tempo.--- --- --- * url : <http://www.csounds.com/manual/html/tempoval.html>- -tempoval :: Krate-tempoval = opcode "tempoval" args- where args = []----- | * opcode : seqtime--- --- --- * syntax : --- --- > ktrig_out seqtime ktime_unit, kstart, kloop, kinitndx, kfn_times--- --- --- * description : --- --- Generates a trigger signal according to the values stored in a--- table.--- --- --- * url : <http://www.csounds.com/manual/html/seqtime.html>- -seqtime ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> k4 -> Krate-seqtime k0time_unit k1start k2loop k3initndx k4fn_times- = opcode "seqtime" args- where args- = [to k0time_unit, to k1start, to k2loop, to k3initndx,- to k4fn_times]----- | * opcode : seqtime2--- --- --- * syntax : --- --- > ktrig_out seqtime2 ktrig_in, ktime_unit, kstart, kloop, kinitndx, kfn_times--- --- --- * description : --- --- Generates a trigger signal according to the values stored in a--- table.--- --- --- * url : <http://www.csounds.com/manual/html/seqtime2.html>- -seqtime2 ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Krate-seqtime2 k0trig_in k1time_unit k2start k3loop k4initndx k5fn_times- = opcode "seqtime2" args- where args- = [to k0trig_in, to k1time_unit, to k2start, to k3loop,- to k4initndx, to k5fn_times]----- | * opcode : trigger--- --- --- * syntax : --- --- > kout trigger ksig, kthreshold, kmode--- --- --- * description : --- --- Informs when a krate signal crosses a threshold.--- --- --- * url : <http://www.csounds.com/manual/html/trigger.html>- -trigger :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-trigger k0sig k1threshold k2mode = opcode "trigger" args- where args = [to k0sig, to k1threshold, to k2mode]----- | * opcode : timedseq--- --- --- * syntax : --- --- > ktrig timedseq ktimpnt, ifn, kp1 [,kp2, kp3,...,kpN]--- --- --- * description : --- --- An event-sequencer in which time can be controlled by a--- time-pointer. Sequence data are stored into a table.--- --- --- * url : <http://www.csounds.com/manual/html/timedseq.html>- -timedseq :: (K k0, K k1) => k0 -> Irate -> [k1] -> Krate-timedseq k0timpnt i1fn k2pN = opcode "timedseq" args- where args = [to k0timpnt, to i1fn] ++ map to k2pN----- | * opcode : changed--- --- --- * syntax : --- --- > ktrig changed kvar1 [, kvar2,..., kvarN]--- --- --- * description : --- --- This opcode outputs a trigger signal that informs when any one--- of its k-rate arguments has changed. Useful with valuator widgets--- or MIDI controllers.--- --- --- * url : <http://www.csounds.com/manual/html/changed.html>- -changed :: (K k0) => [k0] -> Krate-changed k0varN = opcode "changed" args- where args = map to k0varN----- | * opcode : getcfg--- --- --- * syntax : --- --- > Svalue getcfg iopt--- --- --- * description : --- --- Return various configuration settings in Svalue as a string at--- init time.--- --- --- * url : <http://www.csounds.com/manual/html/getcfg.html>- -getcfg :: Irate -> String-getcfg i0opt = opcode "getcfg" args- where args = [to i0opt]----- | * opcode : rewindscore--- --- --- * syntax : --- --- > rewindscore--- --- --- * description : --- --- Rewinds the playback position of the current score performance..--- --- --- * url : <http://www.csounds.com/manual/html/rewindscore.html>- -rewindscore :: SignalOut-rewindscore = outOpcode "rewindscore" args- where args = []
− src/CsoundExpr/Opcodes/Control/Stacks.hs
@@ -1,76 +0,0 @@--- | Stacks-module CsoundExpr.Opcodes.Control.Stacks- (stack,- pop,- push)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : stack--- --- --- * syntax : --- --- > stack iStackSize--- --- --- * description : --- --- Initializes and sets the size of the global stack.--- --- --- * url : <http://www.csounds.com/manual/html/stack.html>- -stack :: Irate -> SignalOut-stack i0StackSize = outOpcode "stack" args- where args = [to i0StackSize]----- | * opcode : pop--- --- --- * syntax : --- --- > xval1, [xval2,..., xval31] pop--- > ival1, [ival2,..., ival31] pop--- --- --- * description : --- --- Pops values from the global stack.--- --- --- * url : <http://www.csounds.com/manual/html/pop.html>- -pop :: MultiOut-pop = opcode "pop" args- where args = []----- | * opcode : push--- --- --- * syntax : --- --- > push xval1, [xval2,..., xval31]--- > push ival1, [ival2,..., ival31]--- --- --- * description : --- --- Pushes a value into the global stack.--- --- --- * url : <http://www.csounds.com/manual/html/push.html>- -push :: (X x0) => [x0] -> SignalOut-push x0valN = outOpcode "push" args- where args = map to x0valN
− src/CsoundExpr/Opcodes/Control/Subinstrument.hs
@@ -1,13 +0,0 @@--- | Sub-instrument Control-module CsoundExpr.Opcodes.Control.Subinstrument- ()-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined--
− src/CsoundExpr/Opcodes/Control/Timeread.hs
@@ -1,256 +0,0 @@--- | Time Reading-module CsoundExpr.Opcodes.Control.Timeread- (readclock,- rtclockI,- rtclockK,- timeinstk,- timeinsts,- timesI,- timesK,- timekI,- timekK,- date,- dates)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : readclock--- --- --- * syntax : --- --- > ir readclock inum--- --- --- * description : --- --- Reads the value of an internal clock.--- --- --- * url : <http://www.csounds.com/manual/html/readclock.html>- -readclock :: Irate -> Irate-readclock i0num = opcode "readclock" args- where args = [to i0num]----- | * opcode : rtclock--- --- --- * syntax : --- --- > ires rtclock--- > kres rtclock--- --- --- * description : --- --- Read the real-time clock from the operating system.--- --- --- * url : <http://www.csounds.com/manual/html/rtclock.html>- -rtclockI :: Irate-rtclockI = opcode "rtclock" args- where args = []----- | * opcode : rtclock--- --- --- * syntax : --- --- > ires rtclock--- > kres rtclock--- --- --- * description : --- --- Read the real-time clock from the operating system.--- --- --- * url : <http://www.csounds.com/manual/html/rtclock.html>- -rtclockK :: Krate-rtclockK = opcode "rtclock" args- where args = []----- | * opcode : timeinstk--- --- --- * syntax : --- --- > kres timeinstk--- --- --- * description : --- --- Read absolute time, in k-rate cycles, since the start of an--- instance of an instrument. Called at both i-time as well as--- k-time.--- --- --- * url : <http://www.csounds.com/manual/html/timeinstk.html>- -timeinstk :: Krate-timeinstk = opcode "timeinstk" args- where args = []----- | * opcode : timeinsts--- --- --- * syntax : --- --- > kres timeinsts--- --- --- * description : --- --- Read absolute time, in seconds, since the start of an instance--- of an instrument.--- --- --- * url : <http://www.csounds.com/manual/html/timeinsts.html>- -timeinsts :: Krate-timeinsts = opcode "timeinsts" args- where args = []----- | * opcode : times--- --- --- * syntax : --- --- > ires times--- > kres times--- --- --- * description : --- --- Read absolute time, in seconds, since the start of the--- performance.--- --- --- * url : <http://www.csounds.com/manual/html/times.html>- -timesI :: Irate-timesI = opcode "times" args- where args = []----- | * opcode : times--- --- --- * syntax : --- --- > ires times--- > kres times--- --- --- * description : --- --- Read absolute time, in seconds, since the start of the--- performance.--- --- --- * url : <http://www.csounds.com/manual/html/times.html>- -timesK :: Krate-timesK = opcode "times" args- where args = []----- | * opcode : timek--- --- --- * syntax : --- --- > ires timek--- > kres timek--- --- --- * description : --- --- Read absolute time, in k-rate cycles, since the start of the--- performance.--- --- --- * url : <http://www.csounds.com/manual/html/timek.html>- -timekI :: Irate-timekI = opcode "timek" args- where args = []----- | * opcode : timek--- --- --- * syntax : --- --- > ires timek--- > kres timek--- --- --- * description : --- --- Read absolute time, in k-rate cycles, since the start of the--- performance.--- --- --- * url : <http://www.csounds.com/manual/html/timek.html>- -timekK :: Krate-timekK = opcode "timek" args- where args = []----- | * opcode : date--- --- --- * syntax : --- --- > ir date--- --- --- * description : --- --- Returns the number seconds since 1 January 1970, using the--- operating system's clock.--- --- --- * url : <http://www.csounds.com/manual/html/date.html>- -date :: Irate-date = opcode "date" args- where args = []----- | * opcode : dates--- --- --- * syntax : --- --- > Sir dates [ itime]--- --- --- * description : --- --- Returns as a string the date and time specified.--- --- --- * url : <http://www.csounds.com/manual/html/dates.html>- -dates :: [Irate] -> String-dates i0init = opcode "dates" args- where args = map to i0init
− src/CsoundExpr/Opcodes/Imageopcodes.hs
@@ -1,8 +0,0 @@--- | Image processing opcodes-module CsoundExpr.Opcodes.Imageopcodes- (module CsoundExpr.Opcodes.Imageopcodes.Top)-where----import CsoundExpr.Opcodes.Imageopcodes.Top
− src/CsoundExpr/Opcodes/Imageopcodes/Top.hs
@@ -1,125 +0,0 @@--- | Image processing opcodes-module CsoundExpr.Opcodes.Imageopcodes.Top- (imagecreate,- imagesize,- imagegetpixelA,- imagegetpixelK,- imagefree)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : imagecreate--- --- --- * syntax : --- --- > iimagenum imagecreate iwidth, iheight--- --- --- * description : --- --- Create an empty image of a given size. Individual pixel values--- can then be set with. imagegetpixel.--- --- --- * url : <http://www.csounds.com/manual/html/imagecreate.html>- -imagecreate :: Irate -> Irate -> Irate-imagecreate i0width i1height = opcode "imagecreate" args- where args = [to i0width, to i1height]----- | * opcode : imagesize--- --- --- * syntax : --- --- > iwidth iheight imagesize iimagenum--- --- --- * description : --- --- Return the width and height of a previously opened or created--- image. An image can be loaded with imageload. An empty image can--- be created with imagecreate.--- --- --- * url : <http://www.csounds.com/manual/html/imagesize.html>- -imagesize :: Irate -> MultiOut-imagesize i0imagenum = opcode "imagesize" args- where args = [to i0imagenum]----- | * opcode : imagegetpixel--- --- --- * syntax : --- --- > ared agreen ablue imagegetpixel iimagenum, ax, ay--- > kred kgreen kblue imagegetpixel iimagenum, kx, ky--- --- --- * description : --- --- Return the RGB pixel values of a previously opened or created--- image. An image can be loaded with imageload. An empty image can--- be created with imagecreate.--- --- --- * url : <http://www.csounds.com/manual/html/imagegetpixel.html>- -imagegetpixelA :: Irate -> Arate -> Arate -> MultiOut-imagegetpixelA i0imagenum a1x a2y = opcode "imagegetpixel" args- where args = [to i0imagenum, to a1x, to a2y]----- | * opcode : imagegetpixel--- --- --- * syntax : --- --- > ared agreen ablue imagegetpixel iimagenum, ax, ay--- > kred kgreen kblue imagegetpixel iimagenum, kx, ky--- --- --- * description : --- --- Return the RGB pixel values of a previously opened or created--- image. An image can be loaded with imageload. An empty image can--- be created with imagecreate.--- --- --- * url : <http://www.csounds.com/manual/html/imagegetpixel.html>- -imagegetpixelK :: (K k0, K k1) => Irate -> k0 -> k1 -> MultiOut-imagegetpixelK i0imagenum k1x k2y = opcode "imagegetpixel" args- where args = [to i0imagenum, to k1x, to k2y]----- | * opcode : imagefree--- --- --- * syntax : --- --- > imagefree iimagenum--- --- --- * description : --- --- Frees memory allocated for a previously loaded or created image.--- --- --- * url : <http://www.csounds.com/manual/html/imagefree.html>- -imagefree :: Irate -> SignalOut-imagefree i0imagenum = outOpcode "imagefree" args- where args = [to i0imagenum]
− src/CsoundExpr/Opcodes/Math.hs
@@ -1,18 +0,0 @@--- | Mathematical Operations-module CsoundExpr.Opcodes.Math- (module CsoundExpr.Opcodes.Math.Amp,- module CsoundExpr.Opcodes.Math.SigmodCompaccum,- module CsoundExpr.Opcodes.Math.Matfunc,- module CsoundExpr.Opcodes.Math.Opeqfunc,- module CsoundExpr.Opcodes.Math.Rndfunc,- module CsoundExpr.Opcodes.Math.Trig)-where----import CsoundExpr.Opcodes.Math.Amp-import CsoundExpr.Opcodes.Math.SigmodCompaccum-import CsoundExpr.Opcodes.Math.Matfunc-import CsoundExpr.Opcodes.Math.Opeqfunc-import CsoundExpr.Opcodes.Math.Rndfunc-import CsoundExpr.Opcodes.Math.Trig
− src/CsoundExpr/Opcodes/Math/Amp.hs
@@ -1,122 +0,0 @@--- | Amplitude Converters-module CsoundExpr.Opcodes.Math.Amp- (ampdb,- ampdbfs,- db,- dbamp,- dbfsamp)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : ampdb--- --- --- * syntax : --- --- > ampdb(x) (no rate restriction)--- --- --- * description : --- --- Returns the amplitude equivalent of the decibel value x. Thus:--- --- --- * url : <http://www.csounds.com/manual/html/ampdb.html>- -ampdb :: (X x0) => x0 -> x0-ampdb x0sig = prefixOperation "ampdb" args- where args = [to x0sig]----- | * opcode : ampdbfs--- --- --- * syntax : --- --- > ampdbfs(x) (no rate restriction)--- --- --- * description : --- --- Returns the amplitude equivalent of the full scale decibel (dB--- FS) value x. The logarithmic full scale decibel values will be--- converted to linear 16-bit signed integer values from 32,768 to--- +32,767.--- --- --- * url : <http://www.csounds.com/manual/html/ampdbfs.html>- -ampdbfs :: (X x0) => x0 -> x0-ampdbfs x0sig = prefixOperation "ampdbfs" args- where args = [to x0sig]----- | * opcode : db--- --- --- * syntax : --- --- > db(x)--- --- --- * description : --- --- Returns the amplitude equivalent for a given decibel amount.--- This opcode is the same as ampdb.--- --- --- * url : <http://www.csounds.com/manual/html/db.html>- -db :: (X x0) => x0 -> x0-db x0sig = prefixOperation "db" args- where args = [to x0sig]----- | * opcode : dbamp--- --- --- * syntax : --- --- > dbamp(x) (init-rate or control-rate args only)--- --- --- * description : --- --- Returns the decibel equivalent of the raw amplitude x.--- --- --- * url : <http://www.csounds.com/manual/html/dbamp.html>- -dbamp :: (K k0) => k0 -> k0-dbamp k0sig = prefixOperation "dbamp" args- where args = [to k0sig]----- | * opcode : dbfsamp--- --- --- * syntax : --- --- > dbfsamp(x) (init-rate or control-rate args only)--- --- --- * description : --- --- Returns the decibel equivalent of the raw amplitude x, relative--- to full scale amplitude. Full scale is assumed to be 16 bit. New--- is Csound version 4.10.--- --- --- * url : <http://www.csounds.com/manual/html/dbfsamp.html>- -dbfsamp :: (K k0) => k0 -> k0-dbfsamp k0sig = prefixOperation "dbfsamp" args- where args = [to k0sig]
− src/CsoundExpr/Opcodes/Math/Matfunc.hs
@@ -1,336 +0,0 @@--- | Mathematical Functions-module CsoundExpr.Opcodes.Math.Matfunc- (abs',- ceil,- exp',- floor',- frac,- int,- log',- log10,- logbtwo,- powA,- powI,- powK,- powoftwo,- round',- sqrt')-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : abs--- --- --- * syntax : --- --- > abs(x) (no rate restriction)--- --- --- * description : --- --- Returns the absolute value of x.--- --- --- * url : <http://www.csounds.com/manual/html/abs.html>- -abs' :: (X x0) => x0 -> x0-abs' x0sig = prefixOperation "abs" args- where args = [to x0sig]----- | * opcode : ceil--- --- --- * syntax : --- --- > ceil(x) (init-, control-, or audio-rate arg allowed)--- --- --- * description : --- --- Returns the smallest integer not less than x--- --- --- * url : <http://www.csounds.com/manual/html/ceil.html>- -ceil :: (X x0) => x0 -> x0-ceil x0sig = prefixOperation "ceil" args- where args = [to x0sig]----- | * opcode : exp--- --- --- * syntax : --- --- > exp(x) (no rate restriction)--- --- --- * description : --- --- Returns e raised to the xth power.--- --- --- * url : <http://www.csounds.com/manual/html/exp.html>- -exp' :: (X x0) => x0 -> x0-exp' x0sig = prefixOperation "exp" args- where args = [to x0sig]----- | * opcode : floor--- --- --- * syntax : --- --- > floor(x) (init-, control-, or audio-rate arg allowed)--- --- --- * description : --- --- Returns the largest integer not greater than x--- --- --- * url : <http://www.csounds.com/manual/html/floor.html>- -floor' :: (X x0) => x0 -> x0-floor' x0sig = prefixOperation "floor" args- where args = [to x0sig]----- | * opcode : frac--- --- --- * syntax : --- --- > frac(x) (init-rate or control-rate args; also works at audio rate in Csound5)--- --- --- * description : --- --- Returns the fractional part of x.--- --- --- * url : <http://www.csounds.com/manual/html/frac.html>- -frac :: (K k0) => k0 -> k0-frac k0sig = prefixOperation "frac" args- where args = [to k0sig]----- | * opcode : int--- --- --- * syntax : --- --- > int(x) (init-rate or control-rate; also works at audio rate in Csound5)--- --- --- * description : --- --- Returns the integer part of x.--- --- --- * url : <http://www.csounds.com/manual/html/int.html>- -int :: (K k0) => k0 -> k0-int k0sig = prefixOperation "int" args- where args = [to k0sig]----- | * opcode : log--- --- --- * syntax : --- --- > log(x) (no rate restriction)--- --- --- * description : --- --- Returns the natural log of x (x positive only).--- --- --- * url : <http://www.csounds.com/manual/html/log.html>- -log' :: (X x0) => x0 -> x0-log' x0sig = prefixOperation "log" args- where args = [to x0sig]----- | * opcode : log10--- --- --- * syntax : --- --- > log10(x) (no rate restriction)--- --- --- * description : --- --- Returns the base 10 log of x (x positive only).--- --- --- * url : <http://www.csounds.com/manual/html/log10.html>- -log10 :: (X x0) => x0 -> x0-log10 x0sig = prefixOperation "log10" args- where args = [to x0sig]----- | * opcode : logbtwo--- --- --- * syntax : --- --- > logbtwo(x) (init-rate or control-rate args only)--- --- --- * description : --- --- Performs a logarithmic base two calculation.--- --- --- * url : <http://www.csounds.com/manual/html/logbtwo.html>- -logbtwo :: (K k0) => k0 -> k0-logbtwo k0sig = prefixOperation "logbtwo" args- where args = [to k0sig]----- | * opcode : pow--- --- --- * syntax : --- --- > ares pow aarg, kpow [, inorm]--- > ires pow iarg, ipow [, inorm]--- > kres pow karg, kpow [, inorm]--- --- --- * description : --- --- Computes xarg to the power of kpow (or ipow) and scales the--- result by inorm.--- --- --- * url : <http://www.csounds.com/manual/html/pow.html>- -powA :: (K k0) => [Irate] -> Arate -> k0 -> Arate-powA i0init a1arg k2pow = opcode "pow" args- where args = [to a1arg, to k2pow] ++ map to i0init----- | * opcode : pow--- --- --- * syntax : --- --- > ares pow aarg, kpow [, inorm]--- > ires pow iarg, ipow [, inorm]--- > kres pow karg, kpow [, inorm]--- --- --- * description : --- --- Computes xarg to the power of kpow (or ipow) and scales the--- result by inorm.--- --- --- * url : <http://www.csounds.com/manual/html/pow.html>- -powI :: [Irate] -> Irate -> Irate -> Irate-powI i0init i1arg i2pow = opcode "pow" args- where args = [to i1arg, to i2pow] ++ map to i0init----- | * opcode : pow--- --- --- * syntax : --- --- > ares pow aarg, kpow [, inorm]--- > ires pow iarg, ipow [, inorm]--- > kres pow karg, kpow [, inorm]--- --- --- * description : --- --- Computes xarg to the power of kpow (or ipow) and scales the--- result by inorm.--- --- --- * url : <http://www.csounds.com/manual/html/pow.html>- -powK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-powK i0init k1arg k2pow = opcode "pow" args- where args = [to k1arg, to k2pow] ++ map to i0init----- | * opcode : powoftwo--- --- --- * syntax : --- --- > powoftwo(x) (init-rate or control-rate args only)--- --- --- * description : --- --- Performs a power-of-two calculation.--- --- --- * url : <http://www.csounds.com/manual/html/powoftwo.html>- -powoftwo :: (K k0) => k0 -> k0-powoftwo k0sig = prefixOperation "powoftwo" args- where args = [to k0sig]----- | * opcode : round--- --- --- * syntax : --- --- > round(x) (init-, control-, or audio-rate arg allowed)--- --- --- * description : --- --- The integer value nearest to x ; if the fractional part of x is--- exactly 0.5, the direction of rounding is undefined.--- --- --- * url : <http://www.csounds.com/manual/html/round.html>- -round' :: (X x0) => x0 -> x0-round' x0sig = prefixOperation "round" args- where args = [to x0sig]----- | * opcode : sqrt--- --- --- * syntax : --- --- > sqrt(x) (no rate restriction)--- --- --- * description : --- --- Returns the square root of x (x non-negative).--- --- --- * url : <http://www.csounds.com/manual/html/sqrt.html>- -sqrt' :: (X x0) => x0 -> x0-sqrt' x0sig = prefixOperation "sqrt" args- where args = [to x0sig]
− src/CsoundExpr/Opcodes/Math/Opeqfunc.hs
@@ -1,191 +0,0 @@--- | Opcode Equivalents of Functions-module CsoundExpr.Opcodes.Math.Opeqfunc- (divzA,- divzI,- divzK,- product',- sum',- taninv2A,- taninv2I,- taninv2K)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : divz--- --- --- * syntax : --- --- > ares divz xa, xb, ksubst--- > ires divz ia, ib, isubst--- > kres divz ka, kb, ksubst--- --- --- * description : --- --- Safely divides two numbers.--- --- --- * url : <http://www.csounds.com/manual/html/divz.html>- -divzA :: (X x0, X x1, K k0) => x0 -> x1 -> k0 -> Arate-divzA x0a x1b k2subst = opcode "divz" args- where args = [to x0a, to x1b, to k2subst]----- | * opcode : divz--- --- --- * syntax : --- --- > ares divz xa, xb, ksubst--- > ires divz ia, ib, isubst--- > kres divz ka, kb, ksubst--- --- --- * description : --- --- Safely divides two numbers.--- --- --- * url : <http://www.csounds.com/manual/html/divz.html>- -divzI :: Irate -> Irate -> Irate -> Irate-divzI i0a i1b i2subst = opcode "divz" args- where args = [to i0a, to i1b, to i2subst]----- | * opcode : divz--- --- --- * syntax : --- --- > ares divz xa, xb, ksubst--- > ires divz ia, ib, isubst--- > kres divz ka, kb, ksubst--- --- --- * description : --- --- Safely divides two numbers.--- --- --- * url : <http://www.csounds.com/manual/html/divz.html>- -divzK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-divzK k0a k1b k2subst = opcode "divz" args- where args = [to k0a, to k1b, to k2subst]----- | * opcode : product--- --- --- * syntax : --- --- > ares product asig1, asig2 [, asig3] [...]--- --- --- * description : --- --- Multiplies any number of a-rate signals.--- --- --- * url : <http://www.csounds.com/manual/html/product.html>- -product' :: [Arate] -> Arate-product' a0sig = opcode "product" args- where args = map to a0sig----- | * opcode : sum--- --- --- * syntax : --- --- > ares sum asig1 [, asig2] [, asig3] [...]--- --- --- * description : --- --- Sums any number of a-rate signals.--- --- --- * url : <http://www.csounds.com/manual/html/sum.html>- -sum' :: [Arate] -> Arate-sum' a0sig = opcode "sum" args- where args = map to a0sig----- | * opcode : taninv2--- --- --- * syntax : --- --- > ares taninv2 ay, ax--- > ires taninv2 iy, ix--- > kres taninv2 ky, kx--- --- --- * description : --- --- Returns the arctangent of iy/ix, ky/kx, or ay/ax.--- --- --- * url : <http://www.csounds.com/manual/html/taninv2.html>- -taninv2A :: Arate -> Arate -> Arate-taninv2A a0y a1x = opcode "taninv2" args- where args = [to a0y, to a1x]----- | * opcode : taninv2--- --- --- * syntax : --- --- > ares taninv2 ay, ax--- > ires taninv2 iy, ix--- > kres taninv2 ky, kx--- --- --- * description : --- --- Returns the arctangent of iy/ix, ky/kx, or ay/ax.--- --- --- * url : <http://www.csounds.com/manual/html/taninv2.html>- -taninv2I :: Irate -> Irate -> Irate-taninv2I i0y i1x = opcode "taninv2" args- where args = [to i0y, to i1x]----- | * opcode : taninv2--- --- --- * syntax : --- --- > ares taninv2 ay, ax--- > ires taninv2 iy, ix--- > kres taninv2 ky, kx--- --- --- * description : --- --- Returns the arctangent of iy/ix, ky/kx, or ay/ax.--- --- --- * url : <http://www.csounds.com/manual/html/taninv2.html>- -taninv2K :: (K k0, K k1) => k0 -> k1 -> Krate-taninv2K k0y k1x = opcode "taninv2" args- where args = [to k0y, to k1x]
− src/CsoundExpr/Opcodes/Math/Rndfunc.hs
@@ -1,54 +0,0 @@--- | Random Functions-module CsoundExpr.Opcodes.Math.Rndfunc- (birnd,- rnd)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : birnd--- --- --- * syntax : --- --- > birnd(x) (init- or control-rate only)--- --- --- * description : --- --- Returns a random number in a bi-polar range.--- --- --- * url : <http://www.csounds.com/manual/html/birnd.html>- -birnd :: (K k0) => k0 -> k0-birnd k0sig = prefixOperation "birnd" args- where args = [to k0sig]----- | * opcode : rnd--- --- --- * syntax : --- --- > rnd(x) (init- or control-rate only)--- --- --- * description : --- --- Returns a random number in a unipolar range at the rate given by--- the input argument.--- --- --- * url : <http://www.csounds.com/manual/html/rnd.html>- -rnd :: (K k0) => k0 -> k0-rnd k0sig = prefixOperation "rnd" args- where args = [to k0sig]
− src/CsoundExpr/Opcodes/Math/SigmodCompaccum.hs
@@ -1,350 +0,0 @@--- | Comparators and Accumulators-module CsoundExpr.Opcodes.Math.SigmodCompaccum- (maxA,- maxK,- max_k,- maxabsA,- maxabsK,- maxabsaccum,- maxaccum,- minA,- minK,- minabsA,- minabsK,- minabsaccum,- minaccum)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : max--- --- --- * syntax : --- --- > amax max ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmax max kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The max opcode takes any number of a-rate or k-rate signals as--- input (all of the same rate), and outputs a signal at the same--- rate that is the maximum of all of the inputs. For a-rate--- signals, the inputs are compared one sample at a time (i.e. max--- does not scan an entire ksmps period of a signal for its local--- maximum as the max_k opcode does).--- --- --- * url : <http://www.csounds.com/manual/html/max.html>- -maxA :: [Arate] -> Arate-maxA a0inN = opcode "max" args- where args = map to a0inN----- | * opcode : max--- --- --- * syntax : --- --- > amax max ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmax max kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The max opcode takes any number of a-rate or k-rate signals as--- input (all of the same rate), and outputs a signal at the same--- rate that is the maximum of all of the inputs. For a-rate--- signals, the inputs are compared one sample at a time (i.e. max--- does not scan an entire ksmps period of a signal for its local--- maximum as the max_k opcode does).--- --- --- * url : <http://www.csounds.com/manual/html/max.html>- -maxK :: (K k0) => [k0] -> Krate-maxK k0inN = opcode "max" args- where args = map to k0inN----- | * opcode : max_k--- --- --- * syntax : --- --- > knumkout max_k asig, ktrig, itype--- --- --- * description : --- --- max_k outputs the local maximum (or minimum) value of the--- incoming asig signal, checked in the time interval between ktrig--- has become true twice.--- --- --- * url : <http://www.csounds.com/manual/html/max_k.html>- -max_k :: (K k0) => Arate -> k0 -> Irate -> Krate-max_k a0sig k1trig i2type = opcode "max_k" args- where args = [to a0sig, to k1trig, to i2type]----- | * opcode : maxabs--- --- --- * syntax : --- --- > amax maxabs ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmax maxabs kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The maxabs opcode takes any number of a-rate or k-rate signals--- as input (all of the same rate), and outputs a signal at the same--- rate that is the maximum of all of the inputs. It is identical to--- the max opcode except that it takes the absolute value of each--- input before comparing them. Therefore, the output is always--- non-negative. For a-rate signals, the inputs are compared one--- sample at a time (i.e. maxabs does not scan an entire ksmps--- period of a signal for its local maximum as the max_k opcode--- does).--- --- --- * url : <http://www.csounds.com/manual/html/maxabs.html>- -maxabsA :: [Arate] -> Arate-maxabsA a0inN = opcode "maxabs" args- where args = map to a0inN----- | * opcode : maxabs--- --- --- * syntax : --- --- > amax maxabs ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmax maxabs kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The maxabs opcode takes any number of a-rate or k-rate signals--- as input (all of the same rate), and outputs a signal at the same--- rate that is the maximum of all of the inputs. It is identical to--- the max opcode except that it takes the absolute value of each--- input before comparing them. Therefore, the output is always--- non-negative. For a-rate signals, the inputs are compared one--- sample at a time (i.e. maxabs does not scan an entire ksmps--- period of a signal for its local maximum as the max_k opcode--- does).--- --- --- * url : <http://www.csounds.com/manual/html/maxabs.html>- -maxabsK :: (K k0) => [k0] -> Krate-maxabsK k0inN = opcode "maxabs" args- where args = map to k0inN----- | * opcode : maxabsaccum--- --- --- * syntax : --- --- > maxabsaccum aAccumulator, aInput--- --- --- * description : --- --- maxabsaccum compares two audio-rate variables and stores the--- maximum of their absolute values into the first.--- --- --- * url : <http://www.csounds.com/manual/html/maxabsaccum.html>- -maxabsaccum :: Arate -> Arate -> SignalOut-maxabsaccum a0Accumulator a1Input = outOpcode "maxabsaccum" args- where args = [to a0Accumulator, to a1Input]----- | * opcode : maxaccum--- --- --- * syntax : --- --- > maxaccum aAccumulator, aInput--- --- --- * description : --- --- maxaccum compares two audio-rate variables and stores the--- maximum value between them into the first.--- --- --- * url : <http://www.csounds.com/manual/html/maxaccum.html>- -maxaccum :: Arate -> Arate -> SignalOut-maxaccum a0Accumulator a1Input = outOpcode "maxaccum" args- where args = [to a0Accumulator, to a1Input]----- | * opcode : min--- --- --- * syntax : --- --- > amin min ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmin min kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The min opcode takes any number of a-rate or k-rate signals as--- input (all of the same rate), and outputs a signal at the same--- rate that is the minimum of all of the inputs. For a-rate--- signals, the inputs are compared one sample at a time (i.e. min--- does not scan an entire ksmps period of a signal for its local--- minimum as the max_k opcode does).--- --- --- * url : <http://www.csounds.com/manual/html/min.html>- -minA :: [Arate] -> Arate-minA a0inN = opcode "min" args- where args = map to a0inN----- | * opcode : min--- --- --- * syntax : --- --- > amin min ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmin min kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The min opcode takes any number of a-rate or k-rate signals as--- input (all of the same rate), and outputs a signal at the same--- rate that is the minimum of all of the inputs. For a-rate--- signals, the inputs are compared one sample at a time (i.e. min--- does not scan an entire ksmps period of a signal for its local--- minimum as the max_k opcode does).--- --- --- * url : <http://www.csounds.com/manual/html/min.html>- -minK :: (K k0) => [k0] -> Krate-minK k0inN = opcode "min" args- where args = map to k0inN----- | * opcode : minabs--- --- --- * syntax : --- --- > amin minabs ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmin minabs kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The minabs opcode takes any number of a-rate or k-rate signals--- as input (all of the same rate), and outputs a signal at the same--- rate that is the minimum of all of the inputs. It is identical to--- the min opcode except that it takes the absolute value of each--- input before comparing them. Therefore, the output is always--- non-negative. For a-rate signals, the inputs are compared one--- sample at a time (i.e. minabs does not scan an entire ksmps--- period of a signal for its local minimum as the max_k opcode--- does).--- --- --- * url : <http://www.csounds.com/manual/html/minabs.html>- -minabsA :: [Arate] -> Arate-minabsA a0inN = opcode "minabs" args- where args = map to a0inN----- | * opcode : minabs--- --- --- * syntax : --- --- > amin minabs ain1 [, ain2] [, ain3] [, ain4] [...]--- > kmin minabs kin1 [, kin2] [, kin3] [, kin4] [...]--- --- --- * description : --- --- The minabs opcode takes any number of a-rate or k-rate signals--- as input (all of the same rate), and outputs a signal at the same--- rate that is the minimum of all of the inputs. It is identical to--- the min opcode except that it takes the absolute value of each--- input before comparing them. Therefore, the output is always--- non-negative. For a-rate signals, the inputs are compared one--- sample at a time (i.e. minabs does not scan an entire ksmps--- period of a signal for its local minimum as the max_k opcode--- does).--- --- --- * url : <http://www.csounds.com/manual/html/minabs.html>- -minabsK :: (K k0) => [k0] -> Krate-minabsK k0inN = opcode "minabs" args- where args = map to k0inN----- | * opcode : minabsaccum--- --- --- * syntax : --- --- > minabsaccum aAccumulator, aInput--- --- --- * description : --- --- minabsaccum compares two audio-rate variables and stores the--- minimum of their absolute values into the first.--- --- --- * url : <http://www.csounds.com/manual/html/minabsaccum.html>- -minabsaccum :: Arate -> Arate -> SignalOut-minabsaccum a0Accumulator a1Input = outOpcode "minabsaccum" args- where args = [to a0Accumulator, to a1Input]----- | * opcode : minaccum--- --- --- * syntax : --- --- > minaccum aAccumulator, aInput--- --- --- * description : --- --- minaccum compares two audio-rate variables and stores the--- minimum value between them into the first.--- --- --- * url : <http://www.csounds.com/manual/html/minaccum.html>- -minaccum :: Arate -> Arate -> SignalOut-minaccum a0Accumulator a1Input = outOpcode "minaccum" args- where args = [to a0Accumulator, to a1Input]
− src/CsoundExpr/Opcodes/Math/Trig.hs
@@ -1,200 +0,0 @@--- | Trigonometric Functions-module CsoundExpr.Opcodes.Math.Trig- (cos',- cosh',- cosinv,- sin',- sinh',- sininv,- tan',- tanh',- taninv)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : cos--- --- --- * syntax : --- --- > cos(x) (no rate restriction)--- --- --- * description : --- --- Returns the cosine of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/cos.html>- -cos' :: (X x0) => x0 -> x0-cos' x0sig = prefixOperation "cos" args- where args = [to x0sig]----- | * opcode : cosh--- --- --- * syntax : --- --- > cosh(x) (no rate restriction)--- --- --- * description : --- --- Returns the hyperbolic cosine of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/cosh.html>- -cosh' :: (X x0) => x0 -> x0-cosh' x0sig = prefixOperation "cosh" args- where args = [to x0sig]----- | * opcode : cosinv--- --- --- * syntax : --- --- > cosinv(x) (no rate restriction)--- --- --- * description : --- --- Returns the arccosine of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/cosinv.html>- -cosinv :: (X x0) => x0 -> x0-cosinv x0sig = prefixOperation "cosinv" args- where args = [to x0sig]----- | * opcode : sin--- --- --- * syntax : --- --- > sin(x) (no rate restriction)--- --- --- * description : --- --- Returns the sine of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/sin.html>- -sin' :: (X x0) => x0 -> x0-sin' x0sig = prefixOperation "sin" args- where args = [to x0sig]----- | * opcode : sinh--- --- --- * syntax : --- --- > sinh(x) (no rate restriction)--- --- --- * description : --- --- Returns the hyperbolic sine of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/sinh.html>- -sinh' :: (X x0) => x0 -> x0-sinh' x0sig = prefixOperation "sinh" args- where args = [to x0sig]----- | * opcode : sininv--- --- --- * syntax : --- --- > sininv(x) (no rate restriction)--- --- --- * description : --- --- Returns the arcsine of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/sininv.html>- -sininv :: (X x0) => x0 -> x0-sininv x0sig = prefixOperation "sininv" args- where args = [to x0sig]----- | * opcode : tan--- --- --- * syntax : --- --- > tan(x) (no rate restriction)--- --- --- * description : --- --- Returns the tangent of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/tan.html>- -tan' :: (X x0) => x0 -> x0-tan' x0sig = prefixOperation "tan" args- where args = [to x0sig]----- | * opcode : tanh--- --- --- * syntax : --- --- > tanh(x) (no rate restriction)--- --- --- * description : --- --- Returns the hyperbolic tangent of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/tanh.html>- -tanh' :: (X x0) => x0 -> x0-tanh' x0sig = prefixOperation "tanh" args- where args = [to x0sig]----- | * opcode : taninv--- --- --- * syntax : --- --- > taninv(x) (no rate restriction)--- --- --- * description : --- --- Returns the arctangent of x (x in radians).--- --- --- * url : <http://www.csounds.com/manual/html/taninv.html>- -taninv :: (X x0) => x0 -> x0-taninv x0sig = prefixOperation "taninv" args- where args = [to x0sig]
− src/CsoundExpr/Opcodes/Midi.hs
@@ -1,24 +0,0 @@--- | Real-time MIDI Support-module CsoundExpr.Opcodes.Midi- (module CsoundExpr.Opcodes.Midi.Input,- module CsoundExpr.Opcodes.Midi.Output,- module CsoundExpr.Opcodes.Midi.Generic,- module CsoundExpr.Opcodes.Midi.Convert,- module CsoundExpr.Opcodes.Midi.Extender,- module CsoundExpr.Opcodes.Midi.Onoff,- module CsoundExpr.Opcodes.Midi.Interop,- module CsoundExpr.Opcodes.Midi.Realtime,- module CsoundExpr.Opcodes.Midi.Slidrbk)-where----import CsoundExpr.Opcodes.Midi.Input-import CsoundExpr.Opcodes.Midi.Output-import CsoundExpr.Opcodes.Midi.Generic-import CsoundExpr.Opcodes.Midi.Convert-import CsoundExpr.Opcodes.Midi.Extender-import CsoundExpr.Opcodes.Midi.Onoff-import CsoundExpr.Opcodes.Midi.Interop-import CsoundExpr.Opcodes.Midi.Realtime-import CsoundExpr.Opcodes.Midi.Slidrbk
− src/CsoundExpr/Opcodes/Midi/Convert.hs
@@ -1,258 +0,0 @@--- | Converters-module CsoundExpr.Opcodes.Midi.Convert- (cpsmidi,- cpsmidibI,- cpsmidibK,- cpstmid,- octmidi,- octmidibI,- octmidibK,- pchmidi,- pchmidibI,- pchmidibK,- ampmidi)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : cpsmidi--- --- --- * syntax : --- --- > icps cpsmidi--- --- --- * description : --- --- Get the note number of the current MIDI event, expressed in--- cycles-per-second.--- --- --- * url : <http://www.csounds.com/manual/html/cpsmidi.html>- -cpsmidi :: Irate-cpsmidi = opcode "cpsmidi" args- where args = []----- | * opcode : cpsmidib--- --- --- * syntax : --- --- > icps cpsmidib [irange]--- > kcps cpsmidib [irange]--- --- --- * description : --- --- Get the note number of the current MIDI event and modify it by--- the current pitch-bend value, express it in cycles-per-second.--- --- --- * url : <http://www.csounds.com/manual/html/cpsmidib.html>- -cpsmidibI :: [Irate] -> Irate-cpsmidibI i0init = opcode "cpsmidib" args- where args = map to i0init----- | * opcode : cpsmidib--- --- --- * syntax : --- --- > icps cpsmidib [irange]--- > kcps cpsmidib [irange]--- --- --- * description : --- --- Get the note number of the current MIDI event and modify it by--- the current pitch-bend value, express it in cycles-per-second.--- --- --- * url : <http://www.csounds.com/manual/html/cpsmidib.html>- -cpsmidibK :: [Irate] -> Krate-cpsmidibK i0init = opcode "cpsmidib" args- where args = map to i0init----- | * opcode : cpstmid--- --- --- * syntax : --- --- > icps cpstmid ifn--- --- --- * description : --- --- This unit is similar to cpsmidi, but allows fully customized--- micro-tuning scales.--- --- --- * url : <http://www.csounds.com/manual/html/cpstmid.html>- -cpstmid :: Irate -> Irate-cpstmid i0fn = opcode "cpstmid" args- where args = [to i0fn]----- | * opcode : octmidi--- --- --- * syntax : --- --- > ioct octmidi--- --- --- * description : --- --- Get the note number, in octave-point-decimal units, of the--- current MIDI event.--- --- --- * url : <http://www.csounds.com/manual/html/octmidi.html>- -octmidi :: Irate-octmidi = opcode "octmidi" args- where args = []----- | * opcode : octmidib--- --- --- * syntax : --- --- > ioct octmidib [irange]--- > koct octmidib [irange]--- --- --- * description : --- --- Get the note number of the current MIDI event and modify it by--- the current pitch-bend value, express it in octave-point-decimal.--- --- --- * url : <http://www.csounds.com/manual/html/octmidib.html>- -octmidibI :: [Irate] -> Irate-octmidibI i0init = opcode "octmidib" args- where args = map to i0init----- | * opcode : octmidib--- --- --- * syntax : --- --- > ioct octmidib [irange]--- > koct octmidib [irange]--- --- --- * description : --- --- Get the note number of the current MIDI event and modify it by--- the current pitch-bend value, express it in octave-point-decimal.--- --- --- * url : <http://www.csounds.com/manual/html/octmidib.html>- -octmidibK :: [Irate] -> Krate-octmidibK i0init = opcode "octmidib" args- where args = map to i0init----- | * opcode : pchmidi--- --- --- * syntax : --- --- > ipch pchmidi--- --- --- * description : --- --- Get the note number of the current MIDI event, expressed in--- pitch-class units.--- --- --- * url : <http://www.csounds.com/manual/html/pchmidi.html>- -pchmidi :: Irate-pchmidi = opcode "pchmidi" args- where args = []----- | * opcode : pchmidib--- --- --- * syntax : --- --- > ipch pchmidib [irange]--- > kpch pchmidib [irange]--- --- --- * description : --- --- Get the note number of the current MIDI event and modify it by--- the current pitch-bend value, express it in pitch-class units.--- --- --- * url : <http://www.csounds.com/manual/html/pchmidib.html>- -pchmidibI :: [Irate] -> Irate-pchmidibI i0init = opcode "pchmidib" args- where args = map to i0init----- | * opcode : pchmidib--- --- --- * syntax : --- --- > ipch pchmidib [irange]--- > kpch pchmidib [irange]--- --- --- * description : --- --- Get the note number of the current MIDI event and modify it by--- the current pitch-bend value, express it in pitch-class units.--- --- --- * url : <http://www.csounds.com/manual/html/pchmidib.html>- -pchmidibK :: [Irate] -> Krate-pchmidibK i0init = opcode "pchmidib" args- where args = map to i0init----- | * opcode : ampmidi--- --- --- * syntax : --- --- > iamp ampmidi iscal [, ifn]--- --- --- * description : --- --- Get the velocity of the current MIDI event.--- --- --- * url : <http://www.csounds.com/manual/html/ampmidi.html>- -ampmidi :: [Irate] -> Irate -> Irate-ampmidi i0init i1scal = opcode "ampmidi" args- where args = [to i1scal] ++ map to i0init
− src/CsoundExpr/Opcodes/Midi/Extender.hs
@@ -1,58 +0,0 @@--- | Event Extenders-module CsoundExpr.Opcodes.Midi.Extender- (release,- xtratim)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : release--- --- --- * syntax : --- --- > kflag release--- --- --- * description : --- --- Provides a way of knowing when a note off message for the--- current note is received. Only a noteoff message with the same--- MIDI note number as the one which triggered the note will be--- reported by release.--- --- --- * url : <http://www.csounds.com/manual/html/release.html>- -release :: Krate-release = opcode "release" args- where args = []----- | * opcode : xtratim--- --- --- * syntax : --- --- > xtratim iextradur--- --- --- * description : --- --- Extend the duration of real-time generated events and handle--- their extra life (Usually for usage along with release instead of--- linenr, linsegr, etc).--- --- --- * url : <http://www.csounds.com/manual/html/xtratim.html>- -xtratim :: Irate -> SignalOut-xtratim i0extradur = outOpcode "xtratim" args- where args = [to i0extradur]
− src/CsoundExpr/Opcodes/Midi/Generic.hs
@@ -1,54 +0,0 @@--- | Generic Input and Output-module CsoundExpr.Opcodes.Midi.Generic- (midiin,- midiout)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : midiin--- --- --- * syntax : --- --- > kstatus, kchan, kdata1, kdata2 midiin--- --- --- * description : --- --- Returns a generic MIDI message received by the MIDI IN port--- --- --- * url : <http://www.csounds.com/manual/html/midiin.html>- -midiin :: MultiOut-midiin = opcode "midiin" args- where args = []----- | * opcode : midiout--- --- --- * syntax : --- --- > midiout kstatus, kchan, kdata1, kdata2--- --- --- * description : --- --- Sends a generic MIDI message to the MIDI OUT port.--- --- --- * url : <http://www.csounds.com/manual/html/midiout.html>- -midiout ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut-midiout k0status k1chan k2data1 k3data2 = outOpcode "midiout" args- where args = [to k0status, to k1chan, to k2data1, to k3data2]
− src/CsoundExpr/Opcodes/Midi/Input.hs
@@ -1,661 +0,0 @@--- | MIDI input-module CsoundExpr.Opcodes.Midi.Input- (aftouch,- chanctrlI,- chanctrlK,- polyaftI,- polyaftK,- pchbendI,- pchbendK,- veloc,- midictrlI,- midictrlK,- notnum,- ctrl7A,- ctrl7I,- ctrl7K,- ctrl14I,- ctrl14K,- ctrl21I,- ctrl21K,- midic7I,- midic7K,- midic14I,- midic14K,- midic21I,- midic21K,- initc7,- initc14,- initc21)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : aftouch--- --- --- * syntax : --- --- > kaft aftouch [imin] [, imax]--- --- --- * description : --- --- Get the current after-touch value for this channel.--- --- --- * url : <http://www.csounds.com/manual/html/aftouch.html>- -aftouch :: [Irate] -> Krate-aftouch i0init = opcode "aftouch" args- where args = map to i0init----- | * opcode : chanctrl--- --- --- * syntax : --- --- > ival chanctrl ichnl, ictlno [, ilow] [, ihigh]--- > kval chanctrl ichnl, ictlno [, ilow] [, ihigh]--- --- --- * description : --- --- Get the current value of a controller and optionally map it onto--- specified range.--- --- --- * url : <http://www.csounds.com/manual/html/chanctrl.html>- -chanctrlI :: [Irate] -> Irate -> Irate -> Irate-chanctrlI i0init i1chnl i2ctlno = opcode "chanctrl" args- where args = [to i1chnl, to i2ctlno] ++ map to i0init----- | * opcode : chanctrl--- --- --- * syntax : --- --- > ival chanctrl ichnl, ictlno [, ilow] [, ihigh]--- > kval chanctrl ichnl, ictlno [, ilow] [, ihigh]--- --- --- * description : --- --- Get the current value of a controller and optionally map it onto--- specified range.--- --- --- * url : <http://www.csounds.com/manual/html/chanctrl.html>- -chanctrlK :: [Irate] -> Irate -> Irate -> Krate-chanctrlK i0init i1chnl i2ctlno = opcode "chanctrl" args- where args = [to i1chnl, to i2ctlno] ++ map to i0init----- | * opcode : polyaft--- --- --- * syntax : --- --- > ires polyaft inote [, ilow] [, ihigh]--- > kres polyaft inote [, ilow] [, ihigh]--- --- --- * description : --- --- polyaft returns the polyphonic pressure of the selected note--- number, optionally mapped to an user-specified range.--- --- --- * url : <http://www.csounds.com/manual/html/polyaft.html>- -polyaftI :: [Irate] -> Irate -> Irate-polyaftI i0init i1note = opcode "polyaft" args- where args = [to i1note] ++ map to i0init----- | * opcode : polyaft--- --- --- * syntax : --- --- > ires polyaft inote [, ilow] [, ihigh]--- > kres polyaft inote [, ilow] [, ihigh]--- --- --- * description : --- --- polyaft returns the polyphonic pressure of the selected note--- number, optionally mapped to an user-specified range.--- --- --- * url : <http://www.csounds.com/manual/html/polyaft.html>- -polyaftK :: [Irate] -> Irate -> Krate-polyaftK i0init i1note = opcode "polyaft" args- where args = [to i1note] ++ map to i0init----- | * opcode : pchbend--- --- --- * syntax : --- --- > ibend pchbend [imin] [, imax]--- > kbend pchbend [imin] [, imax]--- --- --- * description : --- --- Get the current pitch-bend value for this channel.--- --- --- * url : <http://www.csounds.com/manual/html/pchbend.html>- -pchbendI :: [Irate] -> Irate-pchbendI i0init = opcode "pchbend" args- where args = map to i0init----- | * opcode : pchbend--- --- --- * syntax : --- --- > ibend pchbend [imin] [, imax]--- > kbend pchbend [imin] [, imax]--- --- --- * description : --- --- Get the current pitch-bend value for this channel.--- --- --- * url : <http://www.csounds.com/manual/html/pchbend.html>- -pchbendK :: [Irate] -> Krate-pchbendK i0init = opcode "pchbend" args- where args = map to i0init----- | * opcode : veloc--- --- --- * syntax : --- --- > ival veloc [ilow] [, ihigh]--- --- --- * description : --- --- Get the velocity from a MIDI event.--- --- --- * url : <http://www.csounds.com/manual/html/veloc.html>- -veloc :: [Irate] -> Irate-veloc i0init = opcode "veloc" args- where args = map to i0init----- | * opcode : midictrl--- --- --- * syntax : --- --- > ival midictrl inum [, imin] [, imax]--- > kval midictrl inum [, imin] [, imax]--- --- --- * description : --- --- Get the current value (0-127) of a specified MIDI controller.--- --- --- * url : <http://www.csounds.com/manual/html/midictrl.html>- -midictrlI :: [Irate] -> Irate -> Irate-midictrlI i0init i1num = opcode "midictrl" args- where args = [to i1num] ++ map to i0init----- | * opcode : midictrl--- --- --- * syntax : --- --- > ival midictrl inum [, imin] [, imax]--- > kval midictrl inum [, imin] [, imax]--- --- --- * description : --- --- Get the current value (0-127) of a specified MIDI controller.--- --- --- * url : <http://www.csounds.com/manual/html/midictrl.html>- -midictrlK :: [Irate] -> Irate -> Krate-midictrlK i0init i1num = opcode "midictrl" args- where args = [to i1num] ++ map to i0init----- | * opcode : notnum--- --- --- * syntax : --- --- > ival notnum--- --- --- * description : --- --- Get a note number from a MIDI event.--- --- --- * url : <http://www.csounds.com/manual/html/notnum.html>- -notnum :: Irate-notnum = opcode "notnum" args- where args = []----- | * opcode : ctrl7--- --- --- * syntax : --- --- > idest ctrl7 ichan, ictlno, imin, imax [, ifn]--- > kdest ctrl7 ichan, ictlno, kmin, kmax [, ifn]--- > adest ctrl7 ichan, ictlno, kmin, kmax [, ifn] [, icutoff]--- --- --- * description : --- --- Allows a floating-point 7-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl7.html>- -ctrl7A ::- (K k0, K k1) => [Irate] -> Irate -> Irate -> k0 -> k1 -> Arate-ctrl7A i0init i1chan i2ctlno k3min k4max = opcode "ctrl7" args- where args- = [to i1chan, to i2ctlno, to k3min, to k4max] ++ map to i0init----- | * opcode : ctrl7--- --- --- * syntax : --- --- > idest ctrl7 ichan, ictlno, imin, imax [, ifn]--- > kdest ctrl7 ichan, ictlno, kmin, kmax [, ifn]--- > adest ctrl7 ichan, ictlno, kmin, kmax [, ifn] [, icutoff]--- --- --- * description : --- --- Allows a floating-point 7-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl7.html>- -ctrl7I :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Irate-ctrl7I i0init i1chan i2ctlno i3min i4max = opcode "ctrl7" args- where args- = [to i1chan, to i2ctlno, to i3min, to i4max] ++ map to i0init----- | * opcode : ctrl7--- --- --- * syntax : --- --- > idest ctrl7 ichan, ictlno, imin, imax [, ifn]--- > kdest ctrl7 ichan, ictlno, kmin, kmax [, ifn]--- > adest ctrl7 ichan, ictlno, kmin, kmax [, ifn] [, icutoff]--- --- --- * description : --- --- Allows a floating-point 7-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl7.html>- -ctrl7K ::- (K k0, K k1) => [Irate] -> Irate -> Irate -> k0 -> k1 -> Krate-ctrl7K i0init i1chan i2ctlno k3min k4max = opcode "ctrl7" args- where args- = [to i1chan, to i2ctlno, to k3min, to k4max] ++ map to i0init----- | * opcode : ctrl14--- --- --- * syntax : --- --- > idest ctrl14 ichan, ictlno1, ictlno2, imin, imax [, ifn]--- > kdest ctrl14 ichan, ictlno1, ictlno2, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 14-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl14.html>- -ctrl14I ::- [Irate] -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate-ctrl14I i0init i1chan i2ctlno1 i3ctlno2 i4min i5max- = opcode "ctrl14" args- where args- = [to i1chan, to i2ctlno1, to i3ctlno2, to i4min, to i5max] ++- map to i0init----- | * opcode : ctrl14--- --- --- * syntax : --- --- > idest ctrl14 ichan, ictlno1, ictlno2, imin, imax [, ifn]--- > kdest ctrl14 ichan, ictlno1, ictlno2, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 14-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl14.html>- -ctrl14K ::- (K k0, K k1) =>- [Irate] -> Irate -> Irate -> Irate -> k0 -> k1 -> Krate-ctrl14K i0init i1chan i2ctlno1 i3ctlno2 k4min k5max- = opcode "ctrl14" args- where args- = [to i1chan, to i2ctlno1, to i3ctlno2, to k4min, to k5max] ++- map to i0init----- | * opcode : ctrl21--- --- --- * syntax : --- --- > idest ctrl21 ichan, ictlno1, ictlno2, ictlno3, imin, imax [, ifn]--- > kdest ctrl21 ichan, ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 21-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl21.html>- -ctrl21I ::- [Irate] ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate-ctrl21I i0init i1chan i2ctlno1 i3ctlno2 i4ctlno3 i5min i6max- = opcode "ctrl21" args- where args- = [to i1chan, to i2ctlno1, to i3ctlno2, to i4ctlno3, to i5min,- to i6max]- ++ map to i0init----- | * opcode : ctrl21--- --- --- * syntax : --- --- > idest ctrl21 ichan, ictlno1, ictlno2, ictlno3, imin, imax [, ifn]--- > kdest ctrl21 ichan, ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 21-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/ctrl21.html>- -ctrl21K ::- (K k0, K k1) =>- [Irate] -> Irate -> Irate -> Irate -> Irate -> k0 -> k1 -> Krate-ctrl21K i0init i1chan i2ctlno1 i3ctlno2 i4ctlno3 k5min k6max- = opcode "ctrl21" args- where args- = [to i1chan, to i2ctlno1, to i3ctlno2, to i4ctlno3, to k5min,- to k6max]- ++ map to i0init----- | * opcode : midic7--- --- --- * syntax : --- --- > idest midic7 ictlno, imin, imax [, ifn]--- > kdest midic7 ictlno, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 7-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/midic7.html>- -midic7I :: [Irate] -> Irate -> Irate -> Irate -> Irate-midic7I i0init i1ctlno i2min i3max = opcode "midic7" args- where args = [to i1ctlno, to i2min, to i3max] ++ map to i0init----- | * opcode : midic7--- --- --- * syntax : --- --- > idest midic7 ictlno, imin, imax [, ifn]--- > kdest midic7 ictlno, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 7-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/midic7.html>- -midic7K :: (K k0, K k1) => [Irate] -> Irate -> k0 -> k1 -> Krate-midic7K i0init i1ctlno k2min k3max = opcode "midic7" args- where args = [to i1ctlno, to k2min, to k3max] ++ map to i0init----- | * opcode : midic14--- --- --- * syntax : --- --- > idest midic14 ictlno1, ictlno2, imin, imax [, ifn]--- > kdest midic14 ictlno1, ictlno2, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 14-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/midic14.html>- -midic14I :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Irate-midic14I i0init i1ctlno1 i2ctlno2 i3min i4max- = opcode "midic14" args- where args- = [to i1ctlno1, to i2ctlno2, to i3min, to i4max] ++ map to i0init----- | * opcode : midic14--- --- --- * syntax : --- --- > idest midic14 ictlno1, ictlno2, imin, imax [, ifn]--- > kdest midic14 ictlno1, ictlno2, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 14-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/midic14.html>- -midic14K ::- (K k0, K k1) => [Irate] -> Irate -> Irate -> k0 -> k1 -> Krate-midic14K i0init i1ctlno1 i2ctlno2 k3min k4max- = opcode "midic14" args- where args- = [to i1ctlno1, to i2ctlno2, to k3min, to k4max] ++ map to i0init----- | * opcode : midic21--- --- --- * syntax : --- --- > idest midic21 ictlno1, ictlno2, ictlno3, imin, imax [, ifn]--- > kdest midic21 ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 21-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/midic21.html>- -midic21I ::- [Irate] -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate-midic21I i0init i1ctlno1 i2ctlno2 i3ctlno3 i4min i5max- = opcode "midic21" args- where args- = [to i1ctlno1, to i2ctlno2, to i3ctlno3, to i4min, to i5max] ++- map to i0init----- | * opcode : midic21--- --- --- * syntax : --- --- > idest midic21 ictlno1, ictlno2, ictlno3, imin, imax [, ifn]--- > kdest midic21 ictlno1, ictlno2, ictlno3, kmin, kmax [, ifn]--- --- --- * description : --- --- Allows a floating-point 21-bit MIDI signal scaled with a minimum--- and a maximum range.--- --- --- * url : <http://www.csounds.com/manual/html/midic21.html>- -midic21K ::- (K k0, K k1) =>- [Irate] -> Irate -> Irate -> Irate -> k0 -> k1 -> Krate-midic21K i0init i1ctlno1 i2ctlno2 i3ctlno3 k4min k5max- = opcode "midic21" args- where args- = [to i1ctlno1, to i2ctlno2, to i3ctlno3, to k4min, to k5max] ++- map to i0init----- | * opcode : initc7--- --- --- * syntax : --- --- > initc7 ichan, ictlno, ivalue--- --- --- * description : --- --- Initializes MIDI controller ictlno with ivalue--- --- --- * url : <http://www.csounds.com/manual/html/initc7.html>- -initc7 :: Irate -> Irate -> Irate -> SignalOut-initc7 i0chan i1ctlno i2value = outOpcode "initc7" args- where args = [to i0chan, to i1ctlno, to i2value]----- | * opcode : initc14--- --- --- * syntax : --- --- > initc14 ichan, ictlno1, ictlno2, ivalue--- --- --- * description : --- --- Initializes the controllers used to create a 14-bit MIDI value.--- --- --- * url : <http://www.csounds.com/manual/html/initc14.html>- -initc14 :: Irate -> Irate -> Irate -> Irate -> SignalOut-initc14 i0chan i1ctlno1 i2ctlno2 i3value = outOpcode "initc14" args- where args = [to i0chan, to i1ctlno1, to i2ctlno2, to i3value]----- | * opcode : initc21--- --- --- * syntax : --- --- > initc21 ichan, ictlno1, ictlno2, ictlno3, ivalue--- --- --- * description : --- --- Initializes the controllers used to create a 21-bit MIDI value.--- --- --- * url : <http://www.csounds.com/manual/html/initc21.html>- -initc21 :: Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-initc21 i0chan i1ctlno1 i2ctlno2 i3ctlno3 i4value- = outOpcode "initc21" args- where args- = [to i0chan, to i1ctlno1, to i2ctlno2, to i3ctlno3, to i4value]
− src/CsoundExpr/Opcodes/Midi/Interop.hs
@@ -1,304 +0,0 @@--- | MIDI/Score Interoperability opcodes-module CsoundExpr.Opcodes.Midi.Interop- (midichannelaftertouch,- midichn,- midicontrolchange,- mididefault,- midinoteoff,- midinoteoncps,- midinoteonkey,- midinoteonoct,- midinoteonpch,- midipitchbend,- midipolyaftertouch,- midiprogramchange)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : midichannelaftertouch--- --- --- * syntax : --- --- > midichannelaftertouch xchannelaftertouch [, ilow] [, ihigh]--- --- --- * description : --- --- midichannelaftertouch is designed to simplify writing--- instruments that can be used interchangeably for either score or--- MIDI input, and to make it easier to adapt instruments originally--- written for score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midichannelaftertouch.html>- -midichannelaftertouch :: (X x0) => [Irate] -> x0 -> SignalOut-midichannelaftertouch i0init x1channelaftertouch- = outOpcode "midichannelaftertouch" args- where args = [to x1channelaftertouch] ++ map to i0init----- | * opcode : midichn--- --- --- * syntax : --- --- > ichn midichn--- --- --- * description : --- --- midichn returns the MIDI channel number (1 - 16) from which the--- note was activated. In the case of score notes, it returns 0.--- --- --- * url : <http://www.csounds.com/manual/html/midichn.html>- -midichn :: Irate-midichn = opcode "midichn" args- where args = []----- | * opcode : midicontrolchange--- --- --- * syntax : --- --- > midicontrolchange xcontroller, xcontrollervalue [, ilow] [, ihigh]--- --- --- * description : --- --- midicontrolchange is designed to simplify writing instruments--- that can be used interchangeably for either score or MIDI input,--- and to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midicontrolchange.html>- -midicontrolchange ::- (X x0, X x1) => [Irate] -> x0 -> x1 -> SignalOut-midicontrolchange i0init x1controller x2controllervalue- = outOpcode "midicontrolchange" args- where args- = [to x1controller, to x2controllervalue] ++ map to i0init----- | * opcode : mididefault--- --- --- * syntax : --- --- > mididefault xdefault, xvalue--- --- --- * description : --- --- mididefault is designed to simplify writing instruments that can--- be used interchangeably for either score or MIDI input, and to--- make it easier to adapt instruments originally written for score--- input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/mididefault.html>- -mididefault :: (X x0, X x1) => x0 -> x1 -> SignalOut-mididefault x0default x1value = outOpcode "mididefault" args- where args = [to x0default, to x1value]----- | * opcode : midinoteoff--- --- --- * syntax : --- --- > midinoteoff xkey, xvelocity--- --- --- * description : --- --- midinoteoff is designed to simplify writing instruments that can--- be used interchangeably for either score or MIDI input, and to--- make it easier to adapt instruments originally written for score--- input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midinoteoff.html>- -midinoteoff :: (X x0, X x1) => x0 -> x1 -> SignalOut-midinoteoff x0key x1velocity = outOpcode "midinoteoff" args- where args = [to x0key, to x1velocity]----- | * opcode : midinoteoncps--- --- --- * syntax : --- --- > midinoteoncps xcps, xvelocity--- --- --- * description : --- --- midinoteoncps is designed to simplify writing instruments that--- can be used interchangeably for either score or MIDI input, and--- to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midinoteoncps.html>- -midinoteoncps :: (X x0, X x1) => x0 -> x1 -> SignalOut-midinoteoncps x0cps x1velocity = outOpcode "midinoteoncps" args- where args = [to x0cps, to x1velocity]----- | * opcode : midinoteonkey--- --- --- * syntax : --- --- > midinoteonkey xkey, xvelocity--- --- --- * description : --- --- midinoteonkey is designed to simplify writing instruments that--- can be used interchangeably for either score or MIDI input, and--- to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midinoteonkey.html>- -midinoteonkey :: (X x0, X x1) => x0 -> x1 -> SignalOut-midinoteonkey x0key x1velocity = outOpcode "midinoteonkey" args- where args = [to x0key, to x1velocity]----- | * opcode : midinoteonoct--- --- --- * syntax : --- --- > midinoteonoct xoct, xvelocity--- --- --- * description : --- --- midinoteonoct is designed to simplify writing instruments that--- can be used interchangeably for either score or MIDI input, and--- to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midinoteonoct.html>- -midinoteonoct :: (X x0, X x1) => x0 -> x1 -> SignalOut-midinoteonoct x0oct x1velocity = outOpcode "midinoteonoct" args- where args = [to x0oct, to x1velocity]----- | * opcode : midinoteonpch--- --- --- * syntax : --- --- > midinoteonpch xpch, xvelocity--- --- --- * description : --- --- midinoteonpch is designed to simplify writing instruments that--- can be used interchangeably for either score or MIDI input, and--- to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midinoteonpch.html>- -midinoteonpch :: (X x0, X x1) => x0 -> x1 -> SignalOut-midinoteonpch x0pch x1velocity = outOpcode "midinoteonpch" args- where args = [to x0pch, to x1velocity]----- | * opcode : midipitchbend--- --- --- * syntax : --- --- > midipitchbend xpitchbend [, ilow] [, ihigh]--- --- --- * description : --- --- midipitchbend is designed to simplify writing instruments that--- can be used interchangeably for either score or MIDI input, and--- to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midipitchbend.html>- -midipitchbend :: (X x0) => [Irate] -> x0 -> SignalOut-midipitchbend i0init x1pitchbend = outOpcode "midipitchbend" args- where args = [to x1pitchbend] ++ map to i0init----- | * opcode : midipolyaftertouch--- --- --- * syntax : --- --- > midipolyaftertouch xpolyaftertouch, xcontrollervalue [, ilow] [, ihigh]--- --- --- * description : --- --- midipolyaftertouch is designed to simplify writing instruments--- that can be used interchangeably for either score or MIDI input,--- and to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midipolyaftertouch.html>- -midipolyaftertouch ::- (X x0, X x1) => [Irate] -> x0 -> x1 -> SignalOut-midipolyaftertouch i0init x1polyaftertouch x2controllervalue- = outOpcode "midipolyaftertouch" args- where args- = [to x1polyaftertouch, to x2controllervalue] ++ map to i0init----- | * opcode : midiprogramchange--- --- --- * syntax : --- --- > midiprogramchange xprogram--- --- --- * description : --- --- midiprogramchange is designed to simplify writing instruments--- that can be used interchangeably for either score or MIDI input,--- and to make it easier to adapt instruments originally written for--- score input to work with MIDI input.--- --- --- * url : <http://www.csounds.com/manual/html/midiprogramchange.html>- -midiprogramchange :: (X x0) => x0 -> SignalOut-midiprogramchange x0program = outOpcode "midiprogramchange" args- where args = [to x0program]
− src/CsoundExpr/Opcodes/Midi/Onoff.hs
@@ -1,164 +0,0 @@--- | Note-on/Note-off Output-module CsoundExpr.Opcodes.Midi.Onoff- (midion,- midion2,- moscil,- noteoff,- noteon,- noteondur,- noteondur2)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : midion--- --- --- * syntax : --- --- > midion kchn, knum, kvel--- --- --- * description : --- --- Generates MIDI note messages at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/midion.html>- -midion :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SignalOut-midion k0chn k1num k2vel = outOpcode "midion" args- where args = [to k0chn, to k1num, to k2vel]----- | * opcode : midion2--- --- --- * syntax : --- --- > midion2 kchn, knum, kvel, ktrig--- --- --- * description : --- --- Sends noteon and noteoff messages to the MIDI OUT port when--- triggered by a value different than zero.--- --- --- * url : <http://www.csounds.com/manual/html/midion2.html>- -midion2 ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut-midion2 k0chn k1num k2vel k3trig = outOpcode "midion2" args- where args = [to k0chn, to k1num, to k2vel, to k3trig]----- | * opcode : moscil--- --- --- * syntax : --- --- > moscil kchn, knum, kvel, kdur, kpause--- --- --- * description : --- --- Sends a stream of the MIDI notes.--- --- --- * url : <http://www.csounds.com/manual/html/moscil.html>- -moscil ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut-moscil k0chn k1num k2vel k3dur k4pause = outOpcode "moscil" args- where args = [to k0chn, to k1num, to k2vel, to k3dur, to k4pause]----- | * opcode : noteoff--- --- --- * syntax : --- --- > noteoff ichn, inum, ivel--- --- --- * description : --- --- Send a noteoff message to the MIDI OUT port.--- --- --- * url : <http://www.csounds.com/manual/html/noteoff.html>- -noteoff :: Irate -> Irate -> Irate -> SignalOut-noteoff i0chn i1num i2vel = outOpcode "noteoff" args- where args = [to i0chn, to i1num, to i2vel]----- | * opcode : noteon--- --- --- * syntax : --- --- > noteon ichn, inum, ivel--- --- --- * description : --- --- Send a noteon message to the MIDI OUT port.--- --- --- * url : <http://www.csounds.com/manual/html/noteon.html>- -noteon :: Irate -> Irate -> Irate -> SignalOut-noteon i0chn i1num i2vel = outOpcode "noteon" args- where args = [to i0chn, to i1num, to i2vel]----- | * opcode : noteondur--- --- --- * syntax : --- --- > noteondur ichn, inum, ivel, idur--- --- --- * description : --- --- Sends a noteon and a noteoff MIDI message both with the same--- channel, number and velocity.--- --- --- * url : <http://www.csounds.com/manual/html/noteondur.html>- -noteondur :: Irate -> Irate -> Irate -> Irate -> SignalOut-noteondur i0chn i1num i2vel i3dur = outOpcode "noteondur" args- where args = [to i0chn, to i1num, to i2vel, to i3dur]----- | * opcode : noteondur2--- --- --- * syntax : --- --- > noteondur2 ichn, inum, ivel, idur--- --- --- * description : --- --- Sends a noteon and a noteoff MIDI message both with the same--- channel, number and velocity.--- --- --- * url : <http://www.csounds.com/manual/html/noteondur2.html>- -noteondur2 :: Irate -> Irate -> Irate -> Irate -> SignalOut-noteondur2 i0chn i1num i2vel i3dur = outOpcode "noteondur2" args- where args = [to i0chn, to i1num, to i2vel, to i3dur]
− src/CsoundExpr/Opcodes/Midi/Output.hs
@@ -1,326 +0,0 @@--- | MIDI Message Output-module CsoundExpr.Opcodes.Midi.Output- (mdelay,- nrpn,- outiat,- outic,- outic14,- outipat,- outipb,- outipc,- outkat,- outkc,- outkc14,- outkpat,- outkpb,- outkpc)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : mdelay--- --- --- * syntax : --- --- > mdelay kstatus, kchan, kd1, kd2, kdelay--- --- --- * description : --- --- A MIDI delay opcode.--- --- --- * url : <http://www.csounds.com/manual/html/mdelay.html>- -mdelay ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut-mdelay k0status k1chan k2d1 k3d2 k4delay = outOpcode "mdelay" args- where args = [to k0status, to k1chan, to k2d1, to k3d2, to k4delay]----- | * opcode : nrpn--- --- --- * syntax : --- --- > nrpn kchan, kparmnum, kparmvalue--- --- --- * description : --- --- Sends a NPRN (Non-Registered Parameter Number) message to the--- MIDI OUT port each time one of the input arguments changes.--- --- --- * url : <http://www.csounds.com/manual/html/nrpn.html>- -nrpn :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SignalOut-nrpn k0chan k1parmnum k2parmvalue = outOpcode "nrpn" args- where args = [to k0chan, to k1parmnum, to k2parmvalue]----- | * opcode : outiat--- --- --- * syntax : --- --- > outiat ichn, ivalue, imin, imax--- --- --- * description : --- --- Sends MIDI aftertouch messages at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outiat.html>- -outiat :: Irate -> Irate -> Irate -> Irate -> SignalOut-outiat i0chn i1value i2min i3max = outOpcode "outiat" args- where args = [to i0chn, to i1value, to i2min, to i3max]----- | * opcode : outic--- --- --- * syntax : --- --- > outic ichn, inum, ivalue, imin, imax--- --- --- * description : --- --- Sends MIDI controller output at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outic.html>- -outic :: Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-outic i0chn i1num i2value i3min i4max = outOpcode "outic" args- where args = [to i0chn, to i1num, to i2value, to i3min, to i4max]----- | * opcode : outic14--- --- --- * syntax : --- --- > outic14 ichn, imsb, ilsb, ivalue, imin, imax--- --- --- * description : --- --- Sends 14-bit MIDI controller output at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outic14.html>- -outic14 ::- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-outic14 i0chn i1msb i2lsb i3value i4min i5max- = outOpcode "outic14" args- where args- = [to i0chn, to i1msb, to i2lsb, to i3value, to i4min, to i5max]----- | * opcode : outipat--- --- --- * syntax : --- --- > outipat ichn, inotenum, ivalue, imin, imax--- --- --- * description : --- --- Sends polyphonic MIDI aftertouch messages at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outipat.html>- -outipat :: Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-outipat i0chn i1notenum i2value i3min i4max- = outOpcode "outipat" args- where args- = [to i0chn, to i1notenum, to i2value, to i3min, to i4max]----- | * opcode : outipb--- --- --- * syntax : --- --- > outipb ichn, ivalue, imin, imax--- --- --- * description : --- --- Sends MIDI pitch-bend messages at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outipb.html>- -outipb :: Irate -> Irate -> Irate -> Irate -> SignalOut-outipb i0chn i1value i2min i3max = outOpcode "outipb" args- where args = [to i0chn, to i1value, to i2min, to i3max]----- | * opcode : outipc--- --- --- * syntax : --- --- > outipc ichn, iprog, imin, imax--- --- --- * description : --- --- Sends MIDI program change messages at i-rate--- --- --- * url : <http://www.csounds.com/manual/html/outipc.html>- -outipc :: Irate -> Irate -> Irate -> Irate -> SignalOut-outipc i0chn i1prog i2min i3max = outOpcode "outipc" args- where args = [to i0chn, to i1prog, to i2min, to i3max]----- | * opcode : outkat--- --- --- * syntax : --- --- > outkat kchn, kvalue, kmin, kmax--- --- --- * description : --- --- Sends MIDI aftertouch messages at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outkat.html>- -outkat ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut-outkat k0chn k1value k2min k3max = outOpcode "outkat" args- where args = [to k0chn, to k1value, to k2min, to k3max]----- | * opcode : outkc--- --- --- * syntax : --- --- > outkc kchn, knum, kvalue, kmin, kmax--- --- --- * description : --- --- Sends MIDI controller messages at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outkc.html>- -outkc ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut-outkc k0chn k1num k2value k3min k4max = outOpcode "outkc" args- where args = [to k0chn, to k1num, to k2value, to k3min, to k4max]----- | * opcode : outkc14--- --- --- * syntax : --- --- > outkc14 kchn, kmsb, klsb, kvalue, kmin, kmax--- --- --- * description : --- --- Sends 14-bit MIDI controller output at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outkc14.html>- -outkc14 ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> SignalOut-outkc14 k0chn k1msb k2lsb k3value k4min k5max- = outOpcode "outkc14" args- where args- = [to k0chn, to k1msb, to k2lsb, to k3value, to k4min, to k5max]----- | * opcode : outkpat--- --- --- * syntax : --- --- > outkpat kchn, knotenum, kvalue, kmin, kmax--- --- --- * description : --- --- Sends polyphonic MIDI aftertouch messages at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outkpat.html>- -outkpat ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> k4 -> SignalOut-outkpat k0chn k1notenum k2value k3min k4max- = outOpcode "outkpat" args- where args- = [to k0chn, to k1notenum, to k2value, to k3min, to k4max]----- | * opcode : outkpb--- --- --- * syntax : --- --- > outkpb kchn, kvalue, kmin, kmax--- --- --- * description : --- --- Sends MIDI pitch-bend messages at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outkpb.html>- -outkpb ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut-outkpb k0chn k1value k2min k3max = outOpcode "outkpb" args- where args = [to k0chn, to k1value, to k2min, to k3max]----- | * opcode : outkpc--- --- --- * syntax : --- --- > outkpc kchn, kprog, kmin, kmax--- --- --- * description : --- --- Sends MIDI program change messages at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/outkpc.html>- -outkpc ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> SignalOut-outkpc k0chn k1prog k2min k3max = outOpcode "outkpc" args- where args = [to k0chn, to k1prog, to k2min, to k3max]
− src/CsoundExpr/Opcodes/Midi/Realtime.hs
@@ -1,53 +0,0 @@--- | System Realtime Messages-module CsoundExpr.Opcodes.Midi.Realtime- (mclock,- mrtmsg)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : mclock--- --- --- * syntax : --- --- > mclock ifreq--- --- --- * description : --- --- Sends a MIDI CLOCK message.--- --- --- * url : <http://www.csounds.com/manual/html/mclock.html>- -mclock :: Irate -> SignalOut-mclock i0freq = outOpcode "mclock" args- where args = [to i0freq]----- | * opcode : mrtmsg--- --- --- * syntax : --- --- > mrtmsg imsgtype--- --- --- * description : --- --- Send system real-time messages to the MIDI OUT port.--- --- --- * url : <http://www.csounds.com/manual/html/mrtmsg.html>- -mrtmsg :: Irate -> SignalOut-mrtmsg i0msgtype = outOpcode "mrtmsg" args- where args = [to i0msgtype]
− src/CsoundExpr/Opcodes/Midi/Slidrbk.hs
@@ -1,421 +0,0 @@--- | Slider Banks-module CsoundExpr.Opcodes.Midi.Slidrbk- (slider16,- slider16f,- slider32,- slider32f,- slider64,- slider64f,- s16b14,- s32b14,- sliderKawai,- slider8table,- slider8tablef,- slider16table,- slider16tablef,- slider32table,- slider32tablef,- slider64table,- slider64tablef)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : slider16--- --- --- * syntax : --- --- > i1,...,i16 slider16 ichan, ictlnum1, imin1, imax1, init1, ifn1,..., --- > ictlnum16, imin16, imax16, init16, ifn16--- > k1,...,k16 slider16 ichan, ictlnum1, imin1, imax1, init1, ifn1,..., --- > ictlnum16, imin16, imax16, init16, ifn16--- --- --- * description : --- --- Creates a bank of 16 different MIDI control message numbers.--- --- --- * url : <http://www.csounds.com/manual/html/slider16.html>- -slider16 :: Irate -> [Irate] -> MultiOut-slider16 i0chan i1vals = opcode "slider16" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : slider16f--- --- --- * syntax : --- --- > k1,...,k16 slider16f ichan, ictlnum1, imin1, imax1, init1, ifn1, --- > icutoff1,..., ictlnum16, imin16, imax16, init16, ifn16, icutoff16--- --- --- * description : --- --- Creates a bank of 16 different MIDI control message numbers,--- filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider16f.html>- -slider16f :: Irate -> [Irate] -> MultiOut-slider16f i0chan i1vals = opcode "slider16f" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : slider32--- --- --- * syntax : --- --- > i1,...,i32 slider32 ichan, ictlnum1, imin1, imax1, init1, ifn1,..., --- > ictlnum32, imin32, imax32, init32, ifn32--- > k1,...,k32 slider32 ichan, ictlnum1, imin1, imax1, init1, ifn1,..., --- > ictlnum32, imin32, imax32, init32, ifn32--- --- --- * description : --- --- Creates a bank of 32 different MIDI control message numbers.--- --- --- * url : <http://www.csounds.com/manual/html/slider32.html>- -slider32 :: Irate -> [Irate] -> MultiOut-slider32 i0chan i1vals = opcode "slider32" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : slider32f--- --- --- * syntax : --- --- > k1,...,k32 slider32f ichan, ictlnum1, imin1, imax1, init1, ifn1, icutoff1, --- > ..., ictlnum32, imin32, imax32, init32, ifn32, icutoff32--- --- --- * description : --- --- Creates a bank of 32 different MIDI control message numbers,--- filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider32f.html>- -slider32f :: Irate -> [Irate] -> MultiOut-slider32f i0chan i1vals = opcode "slider32f" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : slider64--- --- --- * syntax : --- --- > i1,...,i64 slider64 ichan, ictlnum1, imin1, imax1, init1, ifn1,..., --- > ictlnum64, imin64, imax64, init64, ifn64--- > k1,...,k64 slider64 ichan, ictlnum1, imin1, imax1, init1, ifn1,..., --- > ictlnum64, imin64, imax64, init64, ifn64--- --- --- * description : --- --- Creates a bank of 64 different MIDI control message numbers.--- --- --- * url : <http://www.csounds.com/manual/html/slider64.html>- -slider64 :: Irate -> [Irate] -> MultiOut-slider64 i0chan i1vals = opcode "slider64" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : slider64f--- --- --- * syntax : --- --- > k1,...,k64 slider64f ichan, ictlnum1, imin1, imax1, init1, ifn1, --- > icutoff1,..., ictlnum64, imin64, imax64, init64, ifn64, icutoff64--- --- --- * description : --- --- Creates a bank of 64 different MIDI control message numbers,--- filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider64f.html>- -slider64f :: Irate -> [Irate] -> MultiOut-slider64f i0chan i1vals = opcode "slider64f" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : s16b14--- --- --- * syntax : --- --- > i1,...,i16 s16b14 ichan, ictlno_msb1, ictlno_lsb1, imin1, imax1, --- > initvalue1, ifn1,..., ictlno_msb16, ictlno_lsb16, imin16, imax16, initvalue16, ifn16--- > k1,...,k16 s16b14 ichan, ictlno_msb1, ictlno_lsb1, imin1, imax1, --- > initvalue1, ifn1,..., ictlno_msb16, ictlno_lsb16, imin16, imax16, initvalue16, ifn16--- --- --- * description : --- --- Creates a bank of 16 different 14-bit MIDI control message--- numbers.--- --- --- * url : <http://www.csounds.com/manual/html/s16b14.html>- -s16b14 :: Irate -> [Irate] -> MultiOut-s16b14 i0chan i1vals = opcode "s16b14" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : s32b14--- --- --- * syntax : --- --- > i1,...,i32 s32b14 ichan, ictlno_msb1, ictlno_lsb1, imin1, imax1, --- > initvalue1, ifn1,..., ictlno_msb32, ictlno_lsb32, imin32, imax32, initvalue32, ifn32--- > k1,...,k32 s32b14 ichan, ictlno_msb1, ictlno_lsb1, imin1, imax1, --- > initvalue1, ifn1,..., ictlno_msb32, ictlno_lsb32, imin32, imax32, initvalue32, ifn32--- --- --- * description : --- --- Creates a bank of 32 different 14-bit MIDI control message--- numbers.--- --- --- * url : <http://www.csounds.com/manual/html/s32b14.html>- -s32b14 :: Irate -> [Irate] -> MultiOut-s32b14 i0chan i1vals = opcode "s32b14" args- where args = [to i0chan] ++ map to i1vals----- | * opcode : sliderKawai--- --- --- * syntax : --- --- > k1, k2,...., k16 sliderKawai imin1, imax1, init1, ifn1, --- > imin2, imax2, init2, ifn2,..., imin16, imax16, init16, ifn16--- --- --- * description : --- --- Creates a bank of 16 different MIDI control message numbers from--- a KAWAI MM-16 midi mixer.--- --- --- * url : <http://www.csounds.com/manual/html/sliderKawai.html>- -sliderKawai :: [Irate] -> MultiOut-sliderKawai i0vals = opcode "sliderKawai" args- where args = map to i0vals----- | * opcode : slider8table--- --- --- * syntax : --- --- > kflag slider8table ichan, ioutTable, ioffset, ictlnum1, imin1, imax1, --- > init1, ifn1,..., ictlnum8, imin8, imax8, init8, ifn8--- --- --- * description : --- --- Stores a bank of 8 different MIDI control messages to a table.--- --- --- * url : <http://www.csounds.com/manual/html/slider8table.html>- -slider8table :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider8table i0chan i1outTable i2offset i3vals- = opcode "slider8table" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider8tablef--- --- --- * syntax : --- --- > kflag slider8tablef ichan, ioutTable, ioffset, ictlnum1, imin1, imax1, --- > init1, ifn1, icutoff1,...., ictlnum8, imin8, imax8, init8, ifn8, icutoff8--- --- --- * description : --- --- Stores a bank of 8 different MIDI control messages to a table,--- filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider8tablef.html>- -slider8tablef :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider8tablef i0chan i1outTable i2offset i3vals- = opcode "slider8tablef" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider16table--- --- --- * syntax : --- --- > kflag slider16table ichan, ioutTable, ioffset, ictlnum1, imin1, imax1, --- > init1, ifn1,...., ictlnum16, imin16, imax16, init16, ifn16--- --- --- * description : --- --- Stores a bank of 16 different MIDI control messages to a table.--- --- --- * url : <http://www.csounds.com/manual/html/slider16table.html>- -slider16table :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider16table i0chan i1outTable i2offset i3vals- = opcode "slider16table" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider16tablef--- --- --- * syntax : --- --- > kflag slider16tablef ichan, ioutTable, ioffset, ictlnum1, imin1, imax1, --- > init1, ifn1, icutoff1,...., ictlnum16, imin16, imax16, init16, ifn16, icutoff16--- --- --- * description : --- --- Stores a bank of 16 different MIDI control messages to a table,--- filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider16tablef.html>- -slider16tablef :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider16tablef i0chan i1outTable i2offset i3vals- = opcode "slider16tablef" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider32table--- --- --- * syntax : --- --- > kflag slider32table ichan, ioutTable, ioffset, ictlnum1, imin1, --- > imax1, init1, ifn1,...., ictlnum32, imin32, imax32, init32, ifn32--- --- --- * description : --- --- Creates a bank of 32 different MIDI control messages to a table.--- --- --- * url : <http://www.csounds.com/manual/html/slider32table.html>- -slider32table :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider32table i0chan i1outTable i2offset i3vals- = opcode "slider32table" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider32tablef--- --- --- * syntax : --- --- > kflag slider32tablef ichan, ioutTable, ioffset, ictlnum1, imin1, imax1, --- > init1, ifn1, icutoff1,...., ictlnum32, imin32, imax32, init32, ifn32, icutoff32--- --- --- * description : --- --- Creates a bank of 32 different MIDI control message numbers,--- filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider32tablef.html>- -slider32tablef :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider32tablef i0chan i1outTable i2offset i3vals- = opcode "slider32tablef" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider64table--- --- --- * syntax : --- --- > kflag slider64table ichan, ioutTable, ioffset, ictlnum1, imin1, --- > imax1, init1, ifn1,...., ictlnum64, imin64, imax64, init64, ifn64--- --- --- * description : --- --- Creates a bank of 64 different MIDI control messages to a table.--- --- --- * url : <http://www.csounds.com/manual/html/slider64table.html>- -slider64table :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider64table i0chan i1outTable i2offset i3vals- = opcode "slider64table" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals----- | * opcode : slider64tablef--- --- --- * syntax : --- --- > kflag slider64tablef ichan, ioutTable, ioffset, ictlnum1, imin1, imax1, --- > init1, ifn1, icutoff1,...., ictlnum64, imin64, imax64, init64, ifn64, icutoff64--- --- --- * description : --- --- Stores a bank of 64 different MIDI MIDI control messages to a--- table, filtered before output.--- --- --- * url : <http://www.csounds.com/manual/html/slider64tablef.html>- -slider64tablef :: Irate -> Irate -> Irate -> [Irate] -> Krate-slider64tablef i0chan i1outTable i2offset i3vals- = opcode "slider64tablef" args- where args- = [to i0chan, to i1outTable, to i2offset] ++ map to i3vals
− src/CsoundExpr/Opcodes/Miscopcodes.hs
@@ -1,8 +0,0 @@--- | Miscellaneous opcodes-module CsoundExpr.Opcodes.Miscopcodes- (module CsoundExpr.Opcodes.Miscopcodes.Top)-where----import CsoundExpr.Opcodes.Miscopcodes.Top
− src/CsoundExpr/Opcodes/Miscopcodes/Top.hs
@@ -1,69 +0,0 @@--- | Miscellaneous opcodes-module CsoundExpr.Opcodes.Miscopcodes.Top- (system,- modmatrix)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : system--- --- --- * syntax : --- --- > ires system_i itrig, Scmd, [inowait]--- > kres system ktrig, Scmd, [knowait]--- --- --- * description : --- --- system and system_i call any external command understood by the--- operating system, similarly to the C function system(). system_i--- runs at i-time only, while system runs both at initialization and--- performance time.--- --- --- * url : <http://www.csounds.com/manual/html/system.html>- -system :: (K k0, K k1) => [k0] -> k1 -> String -> Krate-system k0init k1trig s2cmd = opcode "system" args- where args = [to k1trig, to s2cmd] ++ map to k0init----- | * opcode : modmatrix--- --- --- * syntax : --- --- > modmatrix iresfn, isrcmodfn, isrcparmfn, imodscale, inum_mod, --- > inum_parm, kupdate--- --- --- * description : --- --- The opcode can be used to let a large number of k-rate modulator--- variables modulate a large number of k-rate parameter variables,--- with arbitrary scaling of each modulator-to-parameter connection.--- Csound ftables are used to hold both the input (parameter)--- variables, the modulator variables, and the scaling coefficients.--- Output variables are written to another Csound ftable.--- --- --- * url : <http://www.csounds.com/manual/html/modmatrix.html>- -modmatrix ::- (K k0) =>- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> k0 -> SignalOut-modmatrix i0resfn i1srcmodfn i2srcparmfn i3modscale i4num_mod- i5num_parm k6update = outOpcode "modmatrix" args- where args- = [to i0resfn, to i1srcmodfn, to i2srcparmfn, to i3modscale,- to i4num_mod, to i5num_parm, to k6update]
− src/CsoundExpr/Opcodes/MixerOpcodes.hs
@@ -1,8 +0,0 @@--- | Mixer Opcodes-module CsoundExpr.Opcodes.MixerOpcodes- (module CsoundExpr.Opcodes.MixerOpcodes.MixerOpcodes)-where----import CsoundExpr.Opcodes.MixerOpcodes.MixerOpcodes
− src/CsoundExpr/Opcodes/MixerOpcodes/MixerOpcodes.hs
@@ -1,147 +0,0 @@--- | Mixer Opcodes-module CsoundExpr.Opcodes.MixerOpcodes.MixerOpcodes- (mixerSend,- mixerReceive,- mixerSetLevel,- mixerSetLevel_i,- mixerGetLevel,- mixerClear)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : MixerSend--- --- --- * syntax : --- --- > MixerSend asignal, isend, ibuss, ichannel--- --- --- * description : --- --- Mixes an arate signal into a channel of a buss.--- --- --- * url : <http://www.csounds.com/manual/html/MixerSend.html>- -mixerSend :: Arate -> Irate -> Irate -> Irate -> SignalOut-mixerSend a0signal i1send i2buss i3channel- = outOpcode "MixerSend" args- where args = [to a0signal, to i1send, to i2buss, to i3channel]----- | * opcode : MixerReceive--- --- --- * syntax : --- --- > asignal MixerReceive ibuss, ichannel--- --- --- * description : --- --- Receives an arate signal that has been mixed onto a channel of a--- buss.--- --- --- * url : <http://www.csounds.com/manual/html/MixerReceive.html>- -mixerReceive :: Irate -> Irate -> Arate-mixerReceive i0buss i1channel = opcode "MixerReceive" args- where args = [to i0buss, to i1channel]----- | * opcode : MixerSetLevel--- --- --- * syntax : --- --- > MixerSetLevel isend, ibuss, kgain--- --- --- * description : --- --- Sets the level at which signals from the send are added to the--- buss. The actual sending of the signal to the buss is performed--- by the MixerSend opcode.--- --- --- * url : <http://www.csounds.com/manual/html/MixerSetLevel.html>- -mixerSetLevel :: (K k0) => Irate -> Irate -> k0 -> SignalOut-mixerSetLevel i0send i1buss k2gain = outOpcode "MixerSetLevel" args- where args = [to i0send, to i1buss, to k2gain]----- | * opcode : MixerSetLevel_i--- --- --- * syntax : --- --- > MixerSetLevel_i isend, ibuss, igain--- --- --- * description : --- --- Sets the level at which signals from the send are added to the--- buss. This opcode, because all parameters are irate, may be used--- in the orchestra header. The actual sending of the signal to the--- buss is performed by the MixerSend opcode.--- --- --- * url : <http://www.csounds.com/manual/html/MixerSetLevel_i.html>- -mixerSetLevel_i :: Irate -> Irate -> Irate -> SignalOut-mixerSetLevel_i i0send i1buss i2gain- = outOpcode "MixerSetLevel_i" args- where args = [to i0send, to i1buss, to i2gain]----- | * opcode : MixerGetLevel--- --- --- * syntax : --- --- > kgain MixerGetLevel isend, ibuss--- --- --- * description : --- --- Gets the level at which signals from the send are being added to--- the buss. The actual sending of the signal to the buss is--- performed by the MixerSend opcode.--- --- --- * url : <http://www.csounds.com/manual/html/MixerGetLevel.html>- -mixerGetLevel :: Irate -> Irate -> Krate-mixerGetLevel i0send i1buss = opcode "MixerGetLevel" args- where args = [to i0send, to i1buss]----- | * opcode : MixerClear--- --- --- * syntax : --- --- > MixerClear--- --- --- * description : --- --- Resets all channels of a buss to 0.--- --- --- * url : <http://www.csounds.com/manual/html/MixerClear.html>- -mixerClear :: SignalOut-mixerClear = outOpcode "MixerClear" args- where args = []
− src/CsoundExpr/Opcodes/OSCNetwork.hs
@@ -1,12 +0,0 @@--- | OSC and Network-module CsoundExpr.Opcodes.OSCNetwork- (module CsoundExpr.Opcodes.OSCNetwork.OSC,- module CsoundExpr.Opcodes.OSCNetwork.Network,- module CsoundExpr.Opcodes.OSCNetwork.Remote)-where----import CsoundExpr.Opcodes.OSCNetwork.OSC-import CsoundExpr.Opcodes.OSCNetwork.Network-import CsoundExpr.Opcodes.OSCNetwork.Remote
− src/CsoundExpr/Opcodes/OSCNetwork/Network.hs
@@ -1,63 +0,0 @@--- | Network-module CsoundExpr.Opcodes.OSCNetwork.Network- (sockrecv,- socksend)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : sockrecv--- --- --- * syntax : --- --- > asig sockrecv iport, ilength--- > asigl, asigr sockrecvs iport, ilength--- > asig strecv Sipaddr, iport--- --- --- * description : --- --- Receives directly using the UDP (sockrecv and sockrecvs) or TCP--- (strecv) protocol onto a network. The data is not subject to any--- encoding or special routing. The sockrecvs opcode receives a--- stereo signal interleaved.--- --- --- * url : <http://www.csounds.com/manual/html/sockrecv.html>- -sockrecv :: Irate -> Irate -> Arate-sockrecv i0port i1length = opcode "sockrecv" args- where args = [to i0port, to i1length]----- | * opcode : socksend--- --- --- * syntax : --- --- > socksend asig, Sipaddr, iport, ilength--- > socksends asigl, asigr, Sipaddr, iport, ilength--- > stsend asig, Sipaddr, iport--- --- --- * description : --- --- Transmits data directly using the UDP (socksend and socksends)--- or TCP (stsend) protocol onto a network. The data is not subject--- to any encoding or special routing. The socksends opcode send a--- stereo signal interleaved.--- --- --- * url : <http://www.csounds.com/manual/html/socksend.html>- -socksend :: Arate -> String -> Irate -> Irate -> SignalOut-socksend a0sig s1ipaddr i2port i3length = outOpcode "socksend" args- where args = [to a0sig, to s1ipaddr, to i2port, to i3length]
− src/CsoundExpr/Opcodes/OSCNetwork/OSC.hs
@@ -1,81 +0,0 @@--- | OSC-module CsoundExpr.Opcodes.OSCNetwork.OSC- (oscInit,- oscListen,- oscSend)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : OSCinit--- --- --- * syntax : --- --- > ihandle OSCinit iport--- --- --- * description : --- --- Starts a listening process, which can be used by OSClisten.--- --- --- * url : <http://www.csounds.com/manual/html/OSCinit.html>- -oscInit :: Irate -> Irate-oscInit i0port = opcode "OSCinit" args- where args = [to i0port]----- | * opcode : OSClisten--- --- --- * syntax : --- --- > kans OSClisten ihandle, idest, itype [, xdata1, xdata2,...]--- --- --- * description : --- --- On each k-cycle looks to see if an OSC message has been send to--- a given path of a given type.--- --- --- * url : <http://www.csounds.com/manual/html/OSClisten.html>- -oscListen :: (X x0) => Irate -> Irate -> Irate -> [x0] -> Krate-oscListen i0handle i1dest i2type x3dataN = opcode "OSClisten" args- where args = [to i0handle, to i1dest, to i2type] ++ map to x3dataN----- | * opcode : OSCsend--- --- --- * syntax : --- --- > OSCsend kwhen, ihost, iport, idestination, itype [, kdata1, kdata2,...]--- --- --- * description : --- --- Uses the OSC protocol to send message to other OSC listening--- processes.--- --- --- * url : <http://www.csounds.com/manual/html/OSCsend.html>- -oscSend ::- (K k0, K k1) =>- k0 -> Irate -> Irate -> Irate -> Irate -> [k1] -> SignalOut-oscSend k0when i1host i2port i3destination i4type k5dataN- = outOpcode "OSCsend" args- where args- = [to k0when, to i1host, to i2port, to i3destination, to i4type] ++- map to k5dataN
− src/CsoundExpr/Opcodes/OSCNetwork/Remote.hs
@@ -1,33 +0,0 @@--- | Remote Opcodes-module CsoundExpr.Opcodes.OSCNetwork.Remote- (remoteport)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : remoteport--- --- --- * syntax : --- --- > remoteport iportnum--- --- --- * description : --- --- Defines the port for use with the insremot, midremot, insglobal--- and midglobal opcodes.--- --- --- * url : <http://www.csounds.com/manual/html/remoteport.html>- -remoteport :: Irate -> SignalOut-remoteport i0portnum = outOpcode "remoteport" args- where args = [to i0portnum]
− src/CsoundExpr/Opcodes/Other.hs
@@ -1,26 +0,0 @@-module CsoundExpr.Opcodes.Other(- filebit) -where--import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined----- | * opcode : filebit--- --- --- * syntax : ------ >ir filebit ifilcod [, iallowraw]------ * description :------ Returns the number of bits in each sample in a sound file.--------- * url : <http://www.csounds.com/manual/html/filebit.html>-filebit :: [Irate] -> String -> Irate-filebit inits file = opcode "filebit" args- where args = [to file] ++ map to inits
− src/CsoundExpr/Opcodes/Pitch.hs
@@ -1,10 +0,0 @@--- | Pitch Converters-module CsoundExpr.Opcodes.Pitch- (module CsoundExpr.Opcodes.Pitch.Funcs,- module CsoundExpr.Opcodes.Pitch.Tuning)-where----import CsoundExpr.Opcodes.Pitch.Funcs-import CsoundExpr.Opcodes.Pitch.Tuning
− src/CsoundExpr/Opcodes/Pitch/Funcs.hs
@@ -1,246 +0,0 @@--- | Functions-module CsoundExpr.Opcodes.Pitch.Funcs- (cent,- cpsmidinn,- cpsoct,- cpspch,- octave,- octcps,- octmidinn,- octpch,- pchmidinn,- pchoct,- semitone)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : cent--- --- --- * syntax : --- --- > cent(x)--- --- --- * description : --- --- Calculates a factor to raise/lower a frequency by a given amount--- of cents.--- --- --- * url : <http://www.csounds.com/manual/html/cent.html>- -cent :: (X x0) => x0 -> x0-cent x0sig = prefixOperation "cent" args- where args = [to x0sig]----- | * opcode : cpsmidinn--- --- --- * syntax : --- --- > cpsmidinn (MidiNoteNumber) (init- or control-rate args only)--- --- --- * description : --- --- Converts a Midi note number value to cycles-per-second.--- --- --- * url : <http://www.csounds.com/manual/html/cpsmidinn.html>- -cpsmidinn :: (K k0) => k0 -> k0-cpsmidinn k0sig = prefixOperation "cpsmidinn" args- where args = [to k0sig]----- | * opcode : cpsoct--- --- --- * syntax : --- --- > cpsoct (oct) (no rate restriction)--- --- --- * description : --- --- Converts an octave-point-decimal value to cycles-per-second.--- --- --- * url : <http://www.csounds.com/manual/html/cpsoct.html>- -cpsoct :: (X x0) => x0 -> x0-cpsoct x0sig = prefixOperation "cpsoct" args- where args = [to x0sig]----- | * opcode : cpspch--- --- --- * syntax : --- --- > cpspch (pch) (init- or control-rate args only)--- --- --- * description : --- --- Converts a pitch-class value to cycles-per-second.--- --- --- * url : <http://www.csounds.com/manual/html/cpspch.html>- -cpspch :: (K k0) => k0 -> k0-cpspch k0sig = prefixOperation "cpspch" args- where args = [to k0sig]----- | * opcode : octave--- --- --- * syntax : --- --- > octave(x)--- --- --- * description : --- --- Calculates a factor to raise/lower a frequency by a given amount--- of octaves.--- --- --- * url : <http://www.csounds.com/manual/html/octave.html>- -octave :: (X x0) => x0 -> x0-octave x0sig = prefixOperation "octave" args- where args = [to x0sig]----- | * opcode : octcps--- --- --- * syntax : --- --- > octcps (cps) (init- or control-rate args only)--- --- --- * description : --- --- Converts a cycles-per-second value to octave-point-decimal.--- --- --- * url : <http://www.csounds.com/manual/html/octcps.html>- -octcps :: (K k0) => k0 -> k0-octcps k0sig = prefixOperation "octcps" args- where args = [to k0sig]----- | * opcode : octmidinn--- --- --- * syntax : --- --- > octmidinn (MidiNoteNumber) (init- or control-rate args only)--- --- --- * description : --- --- Converts a Midi note number value to octave-point-decimal.--- --- --- * url : <http://www.csounds.com/manual/html/octmidinn.html>- -octmidinn :: (K k0) => k0 -> k0-octmidinn k0sig = prefixOperation "octmidinn" args- where args = [to k0sig]----- | * opcode : octpch--- --- --- * syntax : --- --- > octpch (pch) (init- or control-rate args only)--- --- --- * description : --- --- Converts a pitch-class value to octave-point-decimal.--- --- --- * url : <http://www.csounds.com/manual/html/octpch.html>- -octpch :: (K k0) => k0 -> k0-octpch k0sig = prefixOperation "octpch" args- where args = [to k0sig]----- | * opcode : pchmidinn--- --- --- * syntax : --- --- > pchmidinn (MidiNoteNumber) (init- or control-rate args only)--- --- --- * description : --- --- Converts a Midi note number value to octave point pitch-class--- units.--- --- --- * url : <http://www.csounds.com/manual/html/pchmidinn.html>- -pchmidinn :: (K k0) => k0 -> k0-pchmidinn k0sig = prefixOperation "pchmidinn" args- where args = [to k0sig]----- | * opcode : pchoct--- --- --- * syntax : --- --- > pchoct (oct) (init- or control-rate args only)--- --- --- * description : --- --- Converts an octave-point-decimal value to pitch-class.--- --- --- * url : <http://www.csounds.com/manual/html/pchoct.html>- -pchoct :: (K k0) => k0 -> k0-pchoct k0sig = prefixOperation "pchoct" args- where args = [to k0sig]----- | * opcode : semitone--- --- --- * syntax : --- --- > semitone(x)--- --- --- * description : --- --- Calculates a factor to raise/lower a frequency by a given amount--- of semitones.--- --- --- * url : <http://www.csounds.com/manual/html/semitone.html>- -semitone :: (X x0) => x0 -> x0-semitone x0sig = prefixOperation "semitone" args- where args = [to x0sig]
− src/CsoundExpr/Opcodes/Pitch/Tuning.hs
@@ -1,98 +0,0 @@--- | Tuning Opcodes-module CsoundExpr.Opcodes.Pitch.Tuning- (cps2pch,- cpsxpch,- cpstun,- cpstuni)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : cps2pch--- --- --- * syntax : --- --- > icps cps2pch ipch, iequal--- --- --- * description : --- --- Converts a pitch-class value into cycles-per-second (Hz) for--- equal divisions of the octave.--- --- --- * url : <http://www.csounds.com/manual/html/cps2pch.html>- -cps2pch :: Irate -> Irate -> Irate-cps2pch i0pch i1equal = opcode "cps2pch" args- where args = [to i0pch, to i1equal]----- | * opcode : cpsxpch--- --- --- * syntax : --- --- > icps cpsxpch ipch, iequal, irepeat, ibase--- --- --- * description : --- --- Converts a pitch-class value into cycles-per-second (Hz) for--- equal divisions of any interval. There is a restriction of no--- more than 100 equal divisions.--- --- --- * url : <http://www.csounds.com/manual/html/cpsxpch.html>- -cpsxpch :: Irate -> Irate -> Irate -> Irate -> Irate-cpsxpch i0pch i1equal i2repeat i3base = opcode "cpsxpch" args- where args = [to i0pch, to i1equal, to i2repeat, to i3base]----- | * opcode : cpstun--- --- --- * syntax : --- --- > kcps cpstun ktrig, kindex, kfn--- --- --- * description : --- --- Returns micro-tuning values at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/cpstun.html>- -cpstun :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-cpstun k0trig k1index k2fn = opcode "cpstun" args- where args = [to k0trig, to k1index, to k2fn]----- | * opcode : cpstuni--- --- --- * syntax : --- --- > icps cpstuni index, ifn--- --- --- * description : --- --- Returns micro-tuning values at init-rate.--- --- --- * url : <http://www.csounds.com/manual/html/cpstuni.html>- -cpstuni :: Irate -> Irate -> Irate-cpstuni i0ndex i1fn = opcode "cpstuni" args- where args = [to i0ndex, to i1fn]
− src/CsoundExpr/Opcodes/Plugin.hs
@@ -1,10 +0,0 @@--- | Plugin Hosting-module CsoundExpr.Opcodes.Plugin- (module CsoundExpr.Opcodes.Plugin.Dssi4cs,- module CsoundExpr.Opcodes.Plugin.Vst4cs)-where----import CsoundExpr.Opcodes.Plugin.Dssi4cs-import CsoundExpr.Opcodes.Plugin.Vst4cs
− src/CsoundExpr/Opcodes/Plugin/Dssi4cs.hs
@@ -1,123 +0,0 @@--- | DSSI and LADSPA for Csound-module CsoundExpr.Opcodes.Plugin.Dssi4cs- (dssiinit,- dssiactivate,- dssilist,- dssiaudio,- dssictls)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : dssiinit--- --- --- * syntax : --- --- > ihandle dssiinit ilibraryname, iplugindex [, iverbose]--- --- --- * description : --- --- dssiinit is used to load a DSSI or LADSPA plugin into memory for--- use with the other dssi4cs opcodes. Both LADSPA effects and DSSI--- instruments can be used.--- --- --- * url : <http://www.csounds.com/manual/html/dssiinit.html>- -dssiinit :: [Irate] -> Irate -> Irate -> Irate-dssiinit i0init i1libraryname i2plugindex = opcode "dssiinit" args- where args = [to i1libraryname, to i2plugindex] ++ map to i0init----- | * opcode : dssiactivate--- --- --- * syntax : --- --- > dssiactivate ihandle, ktoggle--- --- --- * description : --- --- dssiactivate is used to activate or deactivate a DSSI or LADSPA--- plugin. It calles the plugin's activate() and deactivate()--- functions if they are provided.--- --- --- * url : <http://www.csounds.com/manual/html/dssiactivate.html>- -dssiactivate :: (K k0) => Irate -> k0 -> SignalOut-dssiactivate i0handle k1toggle = outOpcode "dssiactivate" args- where args = [to i0handle, to k1toggle]----- | * opcode : dssilist--- --- --- * syntax : --- --- > dssilist--- --- --- * description : --- --- dssilist checks the variables DSSI_PATH and LADSPA_PATH and--- lists all plugins available in all plugin libraries there.--- --- --- * url : <http://www.csounds.com/manual/html/dssilist.html>- -dssilist :: SignalOut-dssilist = outOpcode "dssilist" args- where args = []----- | * opcode : dssiaudio--- --- --- * syntax : --- --- > aout1 [, aout2, aout3, aout4] dssiaudio ihandle, ain1 [,ain2, ain3, ain4]--- --- --- * description : --- --- dssiaudio generates audio by processing an input signal through--- a LADSPA plugin.--- --- --- * url : <http://www.csounds.com/manual/html/dssiaudio.html>- -dssiaudio :: [Arate] -> Irate -> Arate -> MultiOut-dssiaudio a0init i1handle a2in1 = opcode "dssiaudio" args- where args = [to i1handle, to a2in1] ++ map to a0init----- | * opcode : dssictls--- --- --- * syntax : --- --- > dssictls ihandle, iport, kvalue, ktrigger--- --- --- * description : --- --- dssictls sends control values to a plugin's control port--- --- --- * url : <http://www.csounds.com/manual/html/dssictls.html>- -dssictls :: (K k0, K k1) => Irate -> Irate -> k0 -> k1 -> SignalOut-dssictls i0handle i1port k2value k3trigger- = outOpcode "dssictls" args- where args = [to i0handle, to i1port, to k2value, to k3trigger]
− src/CsoundExpr/Opcodes/Plugin/Vst4cs.hs
@@ -1,174 +0,0 @@--- | VST for Csound-module CsoundExpr.Opcodes.Plugin.Vst4cs- (vstinit,- vstmidiout,- vstnote,- vstinfo,- vstbankload,- vstprogset,- vstedit)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vstinit--- --- --- * syntax : --- --- > instance vstinit ilibrarypath [,iverbose]--- --- --- * description : --- --- vstinit is used to load a VST plugin into memory for use with--- the other vst4cs opcodes. Both VST effects and instruments--- (synthesizers) can be used.--- --- --- * url : <http://www.csounds.com/manual/html/vstinit.html>- -vstinit :: [Irate] -> Irate -> Irate-vstinit i0init i1librarypath = opcode "vstinit" args- where args = [to i1librarypath] ++ map to i0init----- | * opcode : vstmidiout--- --- --- * syntax : --- --- > vstmidiout instance, kstatus, kchan, kdata1, kdata2--- --- --- * description : --- --- vstmidiout is used for sending MIDI information to a VST plugin.--- --- --- * url : <http://www.csounds.com/manual/html/vstmidiout.html>- -vstmidiout ::- (K k0, K k1, K k2, K k3) =>- Irate -> k0 -> k1 -> k2 -> k3 -> SignalOut-vstmidiout i0nstance k1status k2chan k3data1 k4data2- = outOpcode "vstmidiout" args- where args- = [to i0nstance, to k1status, to k2chan, to k3data1, to k4data2]----- | * opcode : vstnote--- --- --- * syntax : --- --- > vstnote instance, kchan, knote, kveloc, kdur--- --- --- * description : --- --- vstnote sends a MIDI note with definite duration to a VST--- plugin.--- --- --- * url : <http://www.csounds.com/manual/html/vstnote.html>- -vstnote ::- (K k0, K k1, K k2, K k3) =>- Irate -> k0 -> k1 -> k2 -> k3 -> SignalOut-vstnote i0nstance k1chan k2note k3veloc k4dur- = outOpcode "vstnote" args- where args- = [to i0nstance, to k1chan, to k2note, to k3veloc, to k4dur]----- | * opcode : vstinfo--- --- --- * syntax : --- --- > vstinfo instance--- --- --- * description : --- --- vstinfo displays the parameters and the programs of a VST--- plugin.--- --- --- * url : <http://www.csounds.com/manual/html/vstinfo.html>- -vstinfo :: Irate -> SignalOut-vstinfo i0nstance = outOpcode "vstinfo" args- where args = [to i0nstance]----- | * opcode : vstbankload--- --- --- * syntax : --- --- > vstbankload instance, ipath--- --- --- * description : --- --- vstbankload is used for loading parameter banks to a VST plugin.--- --- --- * url : <http://www.csounds.com/manual/html/vstbankload.html>- -vstbankload :: Irate -> Irate -> SignalOut-vstbankload i0nstance i1path = outOpcode "vstbankload" args- where args = [to i0nstance, to i1path]----- | * opcode : vstprogset--- --- --- * syntax : --- --- > vstprogset instance, kprogram--- --- --- * description : --- --- vstprogset sets one of the programs in an .fxb bank.--- --- --- * url : <http://www.csounds.com/manual/html/vstprogset.html>- -vstprogset :: (K k0) => Irate -> k0 -> SignalOut-vstprogset i0nstance k1program = outOpcode "vstprogset" args- where args = [to i0nstance, to k1program]----- | * opcode : vstedit--- --- --- * syntax : --- --- > vstedit instance--- --- --- * description : --- --- vstedit opens the custom GUI editor widow for a VST plugin. Note--- that not all VST plugins have custom GUI editors. It may be--- necessary to use the --displays command-line option to ensure--- that Csound handles events from the editor window and displays it--- properly.--- --- --- * url : <http://www.csounds.com/manual/html/vstedit.html>- -vstedit :: Irate -> SignalOut-vstedit i0nstance = outOpcode "vstedit" args- where args = [to i0nstance]
− src/CsoundExpr/Opcodes/Siggen.hs
@@ -1,38 +0,0 @@--- | Signal Generators-module CsoundExpr.Opcodes.Siggen- (module CsoundExpr.Opcodes.Siggen.Additive,- module CsoundExpr.Opcodes.Siggen.Basic,- module CsoundExpr.Opcodes.Siggen.Dynamic,- module CsoundExpr.Opcodes.Siggen.Fmsynth,- module CsoundExpr.Opcodes.Siggen.Granular,- module CsoundExpr.Opcodes.Siggen.Hvs,- module CsoundExpr.Opcodes.Siggen.Lineexp,- module CsoundExpr.Opcodes.Siggen.Envelope,- module CsoundExpr.Opcodes.Siggen.Models,- module CsoundExpr.Opcodes.Siggen.Phasors,- module CsoundExpr.Opcodes.Siggen.Noise,- module CsoundExpr.Opcodes.Siggen.Sample,- module CsoundExpr.Opcodes.Siggen.ScanTop,- module CsoundExpr.Opcodes.Siggen.Tableacc,- module CsoundExpr.Opcodes.Siggen.Waveterr,- module CsoundExpr.Opcodes.Siggen.Wavguide)-where----import CsoundExpr.Opcodes.Siggen.Additive-import CsoundExpr.Opcodes.Siggen.Basic-import CsoundExpr.Opcodes.Siggen.Dynamic-import CsoundExpr.Opcodes.Siggen.Fmsynth-import CsoundExpr.Opcodes.Siggen.Granular-import CsoundExpr.Opcodes.Siggen.Hvs-import CsoundExpr.Opcodes.Siggen.Lineexp-import CsoundExpr.Opcodes.Siggen.Envelope-import CsoundExpr.Opcodes.Siggen.Models-import CsoundExpr.Opcodes.Siggen.Phasors-import CsoundExpr.Opcodes.Siggen.Noise-import CsoundExpr.Opcodes.Siggen.Sample-import CsoundExpr.Opcodes.Siggen.ScanTop-import CsoundExpr.Opcodes.Siggen.Tableacc-import CsoundExpr.Opcodes.Siggen.Waveterr-import CsoundExpr.Opcodes.Siggen.Wavguide
− src/CsoundExpr/Opcodes/Siggen/Additive.hs
@@ -1,117 +0,0 @@--- | Additive Synthesis/Resynthesis-module CsoundExpr.Opcodes.Siggen.Additive- (adsyn,- adsynt,- adsynt2,- hsboscil)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : adsyn--- --- --- * syntax : --- --- > ares adsyn kamod, kfmod, ksmod, ifilcod--- --- --- * description : --- --- Output is an additive set of individually controlled sinusoids,--- using an oscillator bank.--- --- --- * url : <http://www.csounds.com/manual/html/adsyn.html>- -adsyn :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> String -> Arate-adsyn k0amod k1fmod k2smod s3file = opcode "adsyn" args- where args = [to k0amod, to k1fmod, to k2smod, to s3file]----- | * opcode : adsynt--- --- --- * syntax : --- --- > ares adsynt kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]--- --- --- * description : --- --- Performs additive synthesis with an arbitrary number of--- partials, not necessarily harmonic.--- --- --- * url : <http://www.csounds.com/manual/html/adsynt.html>- -adsynt ::- (K k0, K k1) =>- [Irate] -> k0 -> k1 -> Irate -> Irate -> Irate -> Irate -> Arate-adsynt i0init k1amp k2cps i3wfn i4freqfn i5ampfn i6cnt- = opcode "adsynt" args- where args- = [to k1amp, to k2cps, to i3wfn, to i4freqfn, to i5ampfn, to i6cnt]- ++ map to i0init----- | * opcode : adsynt2--- --- --- * syntax : --- --- > ar adsynt2 kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]--- --- --- * description : --- --- Performs additive synthesis with an arbitrary number of--- partials, not necessarily harmonic. (see adsynt for detailed--- manual)--- --- --- * url : <http://www.csounds.com/manual/html/adsynt2.html>- -adsynt2 ::- (K k0, K k1) =>- [Irate] -> k0 -> k1 -> Irate -> Irate -> Irate -> Irate -> Arate-adsynt2 i0init k1amp k2cps i3wfn i4freqfn i5ampfn i6cnt- = opcode "adsynt2" args- where args- = [to k1amp, to k2cps, to i3wfn, to i4freqfn, to i5ampfn, to i6cnt]- ++ map to i0init----- | * opcode : hsboscil--- --- --- * syntax : --- --- > ares hsboscil kamp, ktone, kbrite, ibasfreq, iwfn, ioctfn --- > [, ioctcnt] [, iphs]--- --- --- * description : --- --- An oscillator which takes tonality and brightness as arguments,--- relative to a base frequency.--- --- --- * url : <http://www.csounds.com/manual/html/hsboscil.html>- -hsboscil ::- (K k0, K k1, K k2) =>- [Irate] -> k0 -> k1 -> k2 -> Irate -> Irate -> Irate -> Arate-hsboscil i0init k1amp k2tone k3brite i4basfreq i5wfn i6octfn- = opcode "hsboscil" args- where args- = [to k1amp, to k2tone, to k3brite, to i4basfreq, to i5wfn,- to i6octfn]- ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Basic.hs
@@ -1,661 +0,0 @@--- | Basic Oscillators-module CsoundExpr.Opcodes.Siggen.Basic- (oscbnk,- oscilA,- oscilK,- oscil3A,- oscil3K,- osciliA,- osciliK,- oscils,- poscilAAA,- poscilAAK,- poscilAKA,- poscilAKK,- poscilI,- poscilK,- poscil3A,- poscil3K,- osciliktA,- osciliktK,- osciliktp,- oscilikts,- osciln,- lfoA,- lfoK,- vibr,- vibrato)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : oscbnk--- --- --- * syntax : --- --- > ares oscbnk kcps, kamd, kfmd, kpmd, iovrlap, iseed, kl1minf, kl1maxf, --- > kl2minf, kl2maxf, ilfomode, keqminf, keqmaxf, keqminl, keqmaxl, --- > keqminq, keqmaxq, ieqmode, kfn [, il1fn] [, il2fn] [, ieqffn] --- > [, ieqlfn] [, ieqqfn] [, itabl] [, ioutfn]--- --- --- * description : --- --- This unit generator mixes the output of any number of--- oscillators. The frequency, phase, and amplitude of each--- oscillator can be modulated by two LFOs (all oscillators have a--- separate set of LFOs, with different phase and frequency);--- additionally, the output of each oscillator can be filtered--- through an optional parametric equalizer (also controlled by the--- LFOs). This opcode is most useful for rendering ensemble--- (strings, choir, etc.) instruments.--- --- --- * url : <http://www.csounds.com/manual/html/oscbnk.html>- -oscbnk ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7, K k8, K k9, K k10,- K k11, K k12, K k13, K k14) =>- [Irate] ->- k0 ->- k1 ->- k2 ->- k3 ->- Irate ->- Irate ->- k4 ->- k5 ->- k6 ->- k7 ->- Irate ->- k8 -> k9 -> k10 -> k11 -> k12 -> k13 -> Irate -> k14 -> Arate-oscbnk i0init k1cps k2amd k3fmd k4pmd i5ovrlap i6seed k7l1minf- k8l1maxf k9l2minf k10l2maxf i11lfomode k12eqminf k13eqmaxf- k14eqminl k15eqmaxl k16eqminq k17eqmaxq i18eqmode k19fn- = opcode "oscbnk" args- where args- = [to k1cps, to k2amd, to k3fmd, to k4pmd, to i5ovrlap, to i6seed,- to k7l1minf, to k8l1maxf, to k9l2minf, to k10l2maxf, to i11lfomode,- to k12eqminf, to k13eqmaxf, to k14eqminl, to k15eqmaxl,- to k16eqminq, to k17eqmaxq, to i18eqmode, to k19fn]- ++ map to i0init----- | * opcode : oscil--- --- --- * syntax : --- --- > ares oscil xamp, xcps, ifn [, iphs]--- > kres oscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- oscil reads table ifn sequentially and repeatedly at a frequency--- xcps. The amplitude is scaled by xamp.--- --- --- * url : <http://www.csounds.com/manual/html/oscil.html>- -oscilA :: (X x0, X x1) => [Irate] -> x0 -> x1 -> Irate -> Arate-oscilA i0init x1amp x2cps i3fn = opcode "oscil" args- where args = [to x1amp, to x2cps, to i3fn] ++ map to i0init----- | * opcode : oscil--- --- --- * syntax : --- --- > ares oscil xamp, xcps, ifn [, iphs]--- > kres oscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- oscil reads table ifn sequentially and repeatedly at a frequency--- xcps. The amplitude is scaled by xamp.--- --- --- * url : <http://www.csounds.com/manual/html/oscil.html>- -oscilK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Krate-oscilK i0init k1amp k2cps i3fn = opcode "oscil" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : oscil3--- --- --- * syntax : --- --- > ares oscil3 xamp, xcps, ifn [, iphs]--- > kres oscil3 kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- oscil3 reads table ifn sequentially and repeatedly at a--- frequency xcps. The amplitude is scaled by xamp. Cubic--- interpolation is applied for table look up from internal phase--- values.--- --- --- * url : <http://www.csounds.com/manual/html/oscil3.html>- -oscil3A :: (X x0, X x1) => [Irate] -> x0 -> x1 -> Irate -> Arate-oscil3A i0init x1amp x2cps i3fn = opcode "oscil3" args- where args = [to x1amp, to x2cps, to i3fn] ++ map to i0init----- | * opcode : oscil3--- --- --- * syntax : --- --- > ares oscil3 xamp, xcps, ifn [, iphs]--- > kres oscil3 kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- oscil3 reads table ifn sequentially and repeatedly at a--- frequency xcps. The amplitude is scaled by xamp. Cubic--- interpolation is applied for table look up from internal phase--- values.--- --- --- * url : <http://www.csounds.com/manual/html/oscil3.html>- -oscil3K :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Krate-oscil3K i0init k1amp k2cps i3fn = opcode "oscil3" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : oscili--- --- --- * syntax : --- --- > ares oscili xamp, xcps, ifn [, iphs]--- > kres oscili kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- oscili reads table ifn sequentially and repeatedly at a--- frequency xcps. The amplitude is scaled by xamp. Linear--- interpolation is applied for table look up from internal phase--- values.--- --- --- * url : <http://www.csounds.com/manual/html/oscili.html>- -osciliA :: (X x0, X x1) => [Irate] -> x0 -> x1 -> Irate -> Arate-osciliA i0init x1amp x2cps i3fn = opcode "oscili" args- where args = [to x1amp, to x2cps, to i3fn] ++ map to i0init----- | * opcode : oscili--- --- --- * syntax : --- --- > ares oscili xamp, xcps, ifn [, iphs]--- > kres oscili kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- oscili reads table ifn sequentially and repeatedly at a--- frequency xcps. The amplitude is scaled by xamp. Linear--- interpolation is applied for table look up from internal phase--- values.--- --- --- * url : <http://www.csounds.com/manual/html/oscili.html>- -osciliK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Krate-osciliK i0init k1amp k2cps i3fn = opcode "oscili" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : oscils--- --- --- * syntax : --- --- > ares oscils iamp, icps, iphs [, iflg]--- --- --- * description : --- --- Simple, fast sine oscillator, that uses only one multiply, and--- two add operations to generate one sample of output, and does not--- require a function table.--- --- --- * url : <http://www.csounds.com/manual/html/oscils.html>- -oscils :: [Irate] -> Irate -> Irate -> Irate -> Arate-oscils i0init i1amp i2cps i3phs = opcode "oscils" args- where args = [to i1amp, to i2cps, to i3phs] ++ map to i0init----- | * opcode : poscil--- --- --- * syntax : --- --- > ares poscil aamp, acps, ifn [, iphs]--- > ares poscil aamp, kcps, ifn [, iphs]--- > ares poscil kamp, acps, ifn [, iphs]--- > ares poscil kamp, kcps, ifn [, iphs]--- > ires poscil kamp, kcps, ifn [, iphs]--- > kres poscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/poscil.html>- -poscilAAA :: [Irate] -> Arate -> Arate -> Irate -> Arate-poscilAAA i0init a1amp a2cps i3fn = opcode "poscil" args- where args = [to a1amp, to a2cps, to i3fn] ++ map to i0init----- | * opcode : poscil--- --- --- * syntax : --- --- > ares poscil aamp, acps, ifn [, iphs]--- > ares poscil aamp, kcps, ifn [, iphs]--- > ares poscil kamp, acps, ifn [, iphs]--- > ares poscil kamp, kcps, ifn [, iphs]--- > ires poscil kamp, kcps, ifn [, iphs]--- > kres poscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/poscil.html>- -poscilAAK :: (K k0) => [Irate] -> Arate -> k0 -> Irate -> Arate-poscilAAK i0init a1amp k2cps i3fn = opcode "poscil" args- where args = [to a1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : poscil--- --- --- * syntax : --- --- > ares poscil aamp, acps, ifn [, iphs]--- > ares poscil aamp, kcps, ifn [, iphs]--- > ares poscil kamp, acps, ifn [, iphs]--- > ares poscil kamp, kcps, ifn [, iphs]--- > ires poscil kamp, kcps, ifn [, iphs]--- > kres poscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/poscil.html>- -poscilAKA :: (K k0) => [Irate] -> k0 -> Arate -> Irate -> Arate-poscilAKA i0init k1amp a2cps i3fn = opcode "poscil" args- where args = [to k1amp, to a2cps, to i3fn] ++ map to i0init----- | * opcode : poscil--- --- --- * syntax : --- --- > ares poscil aamp, acps, ifn [, iphs]--- > ares poscil aamp, kcps, ifn [, iphs]--- > ares poscil kamp, acps, ifn [, iphs]--- > ares poscil kamp, kcps, ifn [, iphs]--- > ires poscil kamp, kcps, ifn [, iphs]--- > kres poscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/poscil.html>- -poscilAKK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Arate-poscilAKK i0init k1amp k2cps i3fn = opcode "poscil" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : poscil--- --- --- * syntax : --- --- > ares poscil aamp, acps, ifn [, iphs]--- > ares poscil aamp, kcps, ifn [, iphs]--- > ares poscil kamp, acps, ifn [, iphs]--- > ares poscil kamp, kcps, ifn [, iphs]--- > ires poscil kamp, kcps, ifn [, iphs]--- > kres poscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/poscil.html>- -poscilI :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Irate-poscilI i0init k1amp k2cps i3fn = opcode "poscil" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : poscil--- --- --- * syntax : --- --- > ares poscil aamp, acps, ifn [, iphs]--- > ares poscil aamp, kcps, ifn [, iphs]--- > ares poscil kamp, acps, ifn [, iphs]--- > ares poscil kamp, kcps, ifn [, iphs]--- > ires poscil kamp, kcps, ifn [, iphs]--- > kres poscil kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/poscil.html>- -poscilK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Krate-poscilK i0init k1amp k2cps i3fn = opcode "poscil" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : poscil3--- --- --- * syntax : --- --- > ares poscil3 kamp, kcps, ifn [, iphs]--- > kres poscil3 kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator with cubic interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/poscil3.html>- -poscil3A :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Arate-poscil3A i0init k1amp k2cps i3fn = opcode "poscil3" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : poscil3--- --- --- * syntax : --- --- > ares poscil3 kamp, kcps, ifn [, iphs]--- > kres poscil3 kamp, kcps, ifn [, iphs]--- --- --- * description : --- --- High precision oscillator with cubic interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/poscil3.html>- -poscil3K :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Krate-poscil3K i0init k1amp k2cps i3fn = opcode "poscil3" args- where args = [to k1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : oscilikt--- --- --- * syntax : --- --- > ares oscilikt xamp, xcps, kfn [, iphs] [, istor]--- > kres oscilikt kamp, kcps, kfn [, iphs] [, istor]--- --- --- * description : --- --- oscilikt is very similar to oscili, but allows changing the--- table number at k-rate. It is slightly slower than oscili--- (especially with high control rate), although also more accurate--- as it uses a 31-bit phase accumulator, as opposed to the 24-bit--- one used by oscili.--- --- --- * url : <http://www.csounds.com/manual/html/oscilikt.html>- -osciliktA ::- (X x0, X x1, K k0) => [Irate] -> x0 -> x1 -> k0 -> Arate-osciliktA i0init x1amp x2cps k3fn = opcode "oscilikt" args- where args = [to x1amp, to x2cps, to k3fn] ++ map to i0init----- | * opcode : oscilikt--- --- --- * syntax : --- --- > ares oscilikt xamp, xcps, kfn [, iphs] [, istor]--- > kres oscilikt kamp, kcps, kfn [, iphs] [, istor]--- --- --- * description : --- --- oscilikt is very similar to oscili, but allows changing the--- table number at k-rate. It is slightly slower than oscili--- (especially with high control rate), although also more accurate--- as it uses a 31-bit phase accumulator, as opposed to the 24-bit--- one used by oscili.--- --- --- * url : <http://www.csounds.com/manual/html/oscilikt.html>- -osciliktK ::- (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> Krate-osciliktK i0init k1amp k2cps k3fn = opcode "oscilikt" args- where args = [to k1amp, to k2cps, to k3fn] ++ map to i0init----- | * opcode : osciliktp--- --- --- * syntax : --- --- > ares osciliktp kcps, kfn, kphs [, istor]--- --- --- * description : --- --- osciliktp allows phase modulation (which is actually implemented--- as k-rate frequency modulation, by differentiating phase input).--- The disadvantage is that there is no amplitude control, and--- frequency can be varied only at the control-rate. This opcode can--- be faster or slower than oscilikt, depending on the control-rate.--- --- --- * url : <http://www.csounds.com/manual/html/osciliktp.html>- -osciliktp ::- (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> Arate-osciliktp i0init k1cps k2fn k3phs = opcode "osciliktp" args- where args = [to k1cps, to k2fn, to k3phs] ++ map to i0init----- | * opcode : oscilikts--- --- --- * syntax : --- --- > ares oscilikts xamp, xcps, kfn, async, kphs [, istor]--- --- --- * description : --- --- oscilikts is the same as oscilikt. Except it has a sync input--- that can be used to re-initialize the oscillator to a k-rate--- phase value. It is slower than oscilikt and osciliktp.--- --- --- * url : <http://www.csounds.com/manual/html/oscilikts.html>- -oscilikts ::- (X x0, X x1, K k0, K k1) =>- [Irate] -> x0 -> x1 -> k0 -> Arate -> k1 -> Arate-oscilikts i0init x1amp x2cps k3fn a4sync k5phs- = opcode "oscilikts" args- where args- = [to x1amp, to x2cps, to k3fn, to a4sync, to k5phs] ++- map to i0init----- | * opcode : osciln--- --- --- * syntax : --- --- > ares osciln kamp, ifrq, ifn, itimes--- --- --- * description : --- --- Accesses table values at a user-defined frequency. This opcode--- can also be written as oscilx.--- --- --- * url : <http://www.csounds.com/manual/html/osciln.html>- -osciln :: (K k0) => k0 -> Irate -> Irate -> Irate -> Arate-osciln k0amp i1frq i2fn i3times = opcode "osciln" args- where args = [to k0amp, to i1frq, to i2fn, to i3times]----- | * opcode : lfo--- --- --- * syntax : --- --- > kres lfo kamp, kcps [, itype]--- > ares lfo kamp, kcps [, itype]--- --- --- * description : --- --- A low frequency oscillator of various shapes.--- --- --- * url : <http://www.csounds.com/manual/html/lfo.html>- -lfoA :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Arate-lfoA i0init k1amp k2cps = opcode "lfo" args- where args = [to k1amp, to k2cps] ++ map to i0init----- | * opcode : lfo--- --- --- * syntax : --- --- > kres lfo kamp, kcps [, itype]--- > ares lfo kamp, kcps [, itype]--- --- --- * description : --- --- A low frequency oscillator of various shapes.--- --- --- * url : <http://www.csounds.com/manual/html/lfo.html>- -lfoK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-lfoK i0init k1amp k2cps = opcode "lfo" args- where args = [to k1amp, to k2cps] ++ map to i0init----- | * opcode : vibr--- --- --- * syntax : --- --- > kout vibr kAverageAmp, kAverageFreq, ifn--- --- --- * description : --- --- Easier-to-use user-controllable vibrato.--- --- --- * url : <http://www.csounds.com/manual/html/vibr.html>- -vibr :: (K k0, K k1) => k0 -> k1 -> Irate -> Krate-vibr k0AverageAmp k1AverageFreq i2fn = opcode "vibr" args- where args = [to k0AverageAmp, to k1AverageFreq, to i2fn]----- | * opcode : vibrato--- --- --- * syntax : --- --- > kout vibrato kAverageAmp, kAverageFreq, kRandAmountAmp, --- > kRandAmountFreq, kAmpMinRate, kAmpMaxRate, kcpsMinRate, --- > kcpsMaxRate, ifn [, iphs]--- --- --- * description : --- --- Generates a natural-sounding user-controllable vibrato.--- --- --- * url : <http://www.csounds.com/manual/html/vibrato.html>- -vibrato ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7) =>- [Irate] ->- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> k6 -> k7 -> Irate -> Krate-vibrato i0init k1AverageAmp k2AverageFreq k3RandAmountAmp- k4RandAmountFreq k5AmpMinRate k6AmpMaxRate k7cpsMinRate- k8cpsMaxRate i9fn = opcode "vibrato" args- where args- = [to k1AverageAmp, to k2AverageFreq, to k3RandAmountAmp,- to k4RandAmountFreq, to k5AmpMinRate, to k6AmpMaxRate,- to k7cpsMinRate, to k8cpsMaxRate, to i9fn]- ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Dynamic.hs
@@ -1,213 +0,0 @@--- | Dynamic Spectrum Oscillators-module CsoundExpr.Opcodes.Siggen.Dynamic- (buzz,- gbuzz,- mpulse,- vco,- vco2,- vco2init,- vco2ft,- vco2ift)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : buzz--- --- --- * syntax : --- --- > ares buzz xamp, xcps, knh, ifn [, iphs]--- --- --- * description : --- --- Output is a set of harmonically related sine partials.--- --- --- * url : <http://www.csounds.com/manual/html/buzz.html>- -buzz ::- (X x0, X x1, K k0) => [Irate] -> x0 -> x1 -> k0 -> Irate -> Arate-buzz i0init x1amp x2cps k3nh i4fn = opcode "buzz" args- where args- = [to x1amp, to x2cps, to k3nh, to i4fn] ++ map to i0init----- | * opcode : gbuzz--- --- --- * syntax : --- --- > ares gbuzz xamp, xcps, knh, klh, kmul, ifn [, iphs]--- --- --- * description : --- --- Output is a set of harmonically related cosine partials.--- --- --- * url : <http://www.csounds.com/manual/html/gbuzz.html>- -gbuzz ::- (X x0, X x1, K k0, K k1, K k2) =>- [Irate] -> x0 -> x1 -> k0 -> k1 -> k2 -> Irate -> Arate-gbuzz i0init x1amp x2cps k3nh k4lh k5mul i6fn = opcode "gbuzz" args- where args- = [to x1amp, to x2cps, to k3nh, to k4lh, to k5mul, to i6fn] ++- map to i0init----- | * opcode : mpulse--- --- --- * syntax : --- --- > ares mpulse kamp, kintvl [, ioffset]--- --- --- * description : --- --- Generates a set of impulses of amplitude kamp separated by--- kintvl seconds (or samples if kintvl is negative). The first--- impulse is generated after a delay of ioffset seconds.--- --- --- * url : <http://www.csounds.com/manual/html/mpulse.html>- -mpulse :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Arate-mpulse i0init k1amp k2intvl = opcode "mpulse" args- where args = [to k1amp, to k2intvl] ++ map to i0init----- | * opcode : vco--- --- --- * syntax : --- --- > ares vco xamp, xcps, iwave, kpw [, ifn] [, imaxd] [, ileak] [, inyx] --- > [, iphs] [, iskip]--- --- --- * description : --- --- Implementation of a band limited, analog modeled oscillator,--- based on integration of band limited impulses. vco can be used to--- simulate a variety of analog wave forms.--- --- --- * url : <http://www.csounds.com/manual/html/vco.html>- -vco ::- (X x0, X x1, K k0) => [Irate] -> x0 -> x1 -> Irate -> k0 -> Arate-vco i0init x1amp x2cps i3wave k4pw = opcode "vco" args- where args- = [to x1amp, to x2cps, to i3wave, to k4pw] ++ map to i0init----- | * opcode : vco2--- --- --- * syntax : --- --- > ares vco2 kamp, kcps [, imode] [, kpw] [, kphs] [, inyx]--- --- --- * description : --- --- vco2 is similar to vco. But the implementation uses--- pre-calculated tables of band-limited waveforms (see also GEN30)--- rather than integrating impulses. This opcode can be faster than--- vco (especially if a low control-rate is used) and also allows--- better sound quality. Additionally, there are more waveforms and--- oscillator phase can be modulated at k-rate. The disadvantage is--- increased memory usage. For more details about vco2 tables, see--- also vco2init and vco2ft.--- --- --- * url : <http://www.csounds.com/manual/html/vco2.html>- -vco2 ::- (K k0, K k1, K k2) =>- [Irate] -> [k0] -> [Irate] -> k1 -> k2 -> Arate-vco2 i0init k1init i2init k3amp k4cps = opcode "vco2" args- where args- = [to k3amp, to k4cps] ++ map to i0init ++ map to k1init ++- map to i2init----- | * opcode : vco2init--- --- --- * syntax : --- --- > ifn vco2init iwave [, ibasfn] [, ipmul] [, iminsiz] [, imaxsiz] [, isrcft]--- --- --- * description : --- --- vco2init calculates tables for use by vco2 opcode. Optionally,--- it is also possible to access these tables as standard Csound--- function tables. In this case, vco2ft can be used to find the--- correct table number for a given oscillator frequency.--- --- --- * url : <http://www.csounds.com/manual/html/vco2init.html>- -vco2init :: [Irate] -> Irate -> Irate-vco2init i0init i1wave = opcode "vco2init" args- where args = [to i1wave] ++ map to i0init----- | * opcode : vco2ft--- --- --- * syntax : --- --- > kfn vco2ft kcps, iwave [, inyx]--- --- --- * description : --- --- vco2ft returns the function table number to be used for--- generating the specified waveform at a given frequency. This--- function table number can be used by any Csound opcode that--- generates a signal by reading function tables (like oscilikt).--- The tables must be calculated by vco2init before vco2ft is called--- and shared as Csound ftables (ibasfn).--- --- --- * url : <http://www.csounds.com/manual/html/vco2ft.html>- -vco2ft :: (K k0) => [Irate] -> k0 -> Irate -> Krate-vco2ft i0init k1cps i2wave = opcode "vco2ft" args- where args = [to k1cps, to i2wave] ++ map to i0init----- | * opcode : vco2ift--- --- --- * syntax : --- --- > ifn vco2ift icps, iwave [, inyx]--- --- --- * description : --- --- vco2ift is the same as vco2ft, but works at i-time. It is--- suitable for use with opcodes that expect an i-rate table number--- (for example, oscili).--- --- --- * url : <http://www.csounds.com/manual/html/vco2ift.html>- -vco2ift :: [Irate] -> Irate -> Irate -> Irate-vco2ift i0init i1cps i2wave = opcode "vco2ift" args- where args = [to i1cps, to i2wave] ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Envelope.hs
@@ -1,409 +0,0 @@--- | Envelope Generators-module CsoundExpr.Opcodes.Siggen.Envelope- (adsrA,- adsrK,- madsrA,- madsrK,- mxadsrA,- mxadsrK,- xadsrA,- xadsrK,- linenA,- linenK,- linenrA,- linenrK,- envlpxA,- envlpxK,- envlpxrA,- envlpxrK)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : adsr--- --- --- * syntax : --- --- > ares adsr iatt, idec, islev, irel [, idel]--- > kres adsr iatt, idec, islev, irel [, idel]--- --- --- * description : --- --- Calculates the classical ADSR envelope using linear segments.--- --- --- * url : <http://www.csounds.com/manual/html/adsr.html>- -adsrA :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Arate-adsrA i0init i1att i2dec i3slev i4rel = opcode "adsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : adsr--- --- --- * syntax : --- --- > ares adsr iatt, idec, islev, irel [, idel]--- > kres adsr iatt, idec, islev, irel [, idel]--- --- --- * description : --- --- Calculates the classical ADSR envelope using linear segments.--- --- --- * url : <http://www.csounds.com/manual/html/adsr.html>- -adsrK :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Krate-adsrK i0init i1att i2dec i3slev i4rel = opcode "adsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : madsr--- --- --- * syntax : --- --- > ares madsr iatt, idec, islev, irel [, idel] [, ireltim]--- > kres madsr iatt, idec, islev, irel [, idel] [, ireltim]--- --- --- * description : --- --- Calculates the classical ADSR envelope using the linsegr--- mechanism.--- --- --- * url : <http://www.csounds.com/manual/html/madsr.html>- -madsrA :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Arate-madsrA i0init i1att i2dec i3slev i4rel = opcode "madsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : madsr--- --- --- * syntax : --- --- > ares madsr iatt, idec, islev, irel [, idel] [, ireltim]--- > kres madsr iatt, idec, islev, irel [, idel] [, ireltim]--- --- --- * description : --- --- Calculates the classical ADSR envelope using the linsegr--- mechanism.--- --- --- * url : <http://www.csounds.com/manual/html/madsr.html>- -madsrK :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Krate-madsrK i0init i1att i2dec i3slev i4rel = opcode "madsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : mxadsr--- --- --- * syntax : --- --- > ares mxadsr iatt, idec, islev, irel [, idel] [, ireltim]--- > kres mxadsr iatt, idec, islev, irel [, idel] [, ireltim]--- --- --- * description : --- --- Calculates the classical ADSR envelope using the expsegr--- mechanism.--- --- --- * url : <http://www.csounds.com/manual/html/mxadsr.html>- -mxadsrA :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Arate-mxadsrA i0init i1att i2dec i3slev i4rel = opcode "mxadsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : mxadsr--- --- --- * syntax : --- --- > ares mxadsr iatt, idec, islev, irel [, idel] [, ireltim]--- > kres mxadsr iatt, idec, islev, irel [, idel] [, ireltim]--- --- --- * description : --- --- Calculates the classical ADSR envelope using the expsegr--- mechanism.--- --- --- * url : <http://www.csounds.com/manual/html/mxadsr.html>- -mxadsrK :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Krate-mxadsrK i0init i1att i2dec i3slev i4rel = opcode "mxadsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : xadsr--- --- --- * syntax : --- --- > ares xadsr iatt, idec, islev, irel [, idel]--- > kres xadsr iatt, idec, islev, irel [, idel]--- --- --- * description : --- --- Calculates the classical ADSR envelope--- --- --- * url : <http://www.csounds.com/manual/html/xadsr.html>- -xadsrA :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Arate-xadsrA i0init i1att i2dec i3slev i4rel = opcode "xadsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : xadsr--- --- --- * syntax : --- --- > ares xadsr iatt, idec, islev, irel [, idel]--- > kres xadsr iatt, idec, islev, irel [, idel]--- --- --- * description : --- --- Calculates the classical ADSR envelope--- --- --- * url : <http://www.csounds.com/manual/html/xadsr.html>- -xadsrK :: [Irate] -> Irate -> Irate -> Irate -> Irate -> Krate-xadsrK i0init i1att i2dec i3slev i4rel = opcode "xadsr" args- where args- = [to i1att, to i2dec, to i3slev, to i4rel] ++ map to i0init----- | * opcode : linen--- --- --- * syntax : --- --- > ares linen xamp, irise, idur, idec--- > kres linen kamp, irise, idur, idec--- --- --- * description : --- --- linen -- apply a straight line rise and decay pattern to an--- input amp signal.--- --- --- * url : <http://www.csounds.com/manual/html/linen.html>- -linenA :: (X x0) => x0 -> Irate -> Irate -> Irate -> Arate-linenA x0amp i1rise i2dur i3dec = opcode "linen" args- where args = [to x0amp, to i1rise, to i2dur, to i3dec]----- | * opcode : linen--- --- --- * syntax : --- --- > ares linen xamp, irise, idur, idec--- > kres linen kamp, irise, idur, idec--- --- --- * description : --- --- linen -- apply a straight line rise and decay pattern to an--- input amp signal.--- --- --- * url : <http://www.csounds.com/manual/html/linen.html>- -linenK :: (K k0) => k0 -> Irate -> Irate -> Irate -> Krate-linenK k0amp i1rise i2dur i3dec = opcode "linen" args- where args = [to k0amp, to i1rise, to i2dur, to i3dec]----- | * opcode : linenr--- --- --- * syntax : --- --- > ares linenr xamp, irise, idec, iatdec--- > kres linenr kamp, irise, idec, iatdec--- --- --- * description : --- --- linenr -- same as linen except that the final segment is entered--- only on sensing a MIDI note release. The note is then extended by--- the decay time.--- --- --- * url : <http://www.csounds.com/manual/html/linenr.html>- -linenrA :: (X x0) => x0 -> Irate -> Irate -> Irate -> Arate-linenrA x0amp i1rise i2dec i3atdec = opcode "linenr" args- where args = [to x0amp, to i1rise, to i2dec, to i3atdec]----- | * opcode : linenr--- --- --- * syntax : --- --- > ares linenr xamp, irise, idec, iatdec--- > kres linenr kamp, irise, idec, iatdec--- --- --- * description : --- --- linenr -- same as linen except that the final segment is entered--- only on sensing a MIDI note release. The note is then extended by--- the decay time.--- --- --- * url : <http://www.csounds.com/manual/html/linenr.html>- -linenrK :: (K k0) => k0 -> Irate -> Irate -> Irate -> Krate-linenrK k0amp i1rise i2dec i3atdec = opcode "linenr" args- where args = [to k0amp, to i1rise, to i2dec, to i3atdec]----- | * opcode : envlpx--- --- --- * syntax : --- --- > ares envlpx xamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]--- > kres envlpx kamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]--- --- --- * description : --- --- envlpx -- apply an envelope consisting of 3 segments:--- --- --- * url : <http://www.csounds.com/manual/html/envlpx.html>- -envlpxA ::- (X x0) =>- [Irate] ->- x0 -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-envlpxA i0init x1amp i2rise i3dur i4dec i5fn i6atss i7atdec- = opcode "envlpx" args- where args- = [to x1amp, to i2rise, to i3dur, to i4dec, to i5fn, to i6atss,- to i7atdec]- ++ map to i0init----- | * opcode : envlpx--- --- --- * syntax : --- --- > ares envlpx xamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]--- > kres envlpx kamp, irise, idur, idec, ifn, iatss, iatdec [, ixmod]--- --- --- * description : --- --- envlpx -- apply an envelope consisting of 3 segments:--- --- --- * url : <http://www.csounds.com/manual/html/envlpx.html>- -envlpxK ::- (K k0) =>- [Irate] ->- k0 -> Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Krate-envlpxK i0init k1amp i2rise i3dur i4dec i5fn i6atss i7atdec- = opcode "envlpx" args- where args- = [to k1amp, to i2rise, to i3dur, to i4dec, to i5fn, to i6atss,- to i7atdec]- ++ map to i0init----- | * opcode : envlpxr--- --- --- * syntax : --- --- > ares envlpxr xamp, irise, idec, ifn, iatss, iatdec [, ixmod] [,irind]--- > kres envlpxr kamp, irise, idec, ifn, iatss, iatdec [, ixmod] [,irind]--- --- --- * description : --- --- envlpxr is the same as envlpx except that the final segment is--- entered only on sensing a MIDI note release. The note is then--- extended by the decay time.--- --- --- * url : <http://www.csounds.com/manual/html/envlpxr.html>- -envlpxrA ::- (X x0) =>- [Irate] -> x0 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-envlpxrA i0init x1amp i2rise i3dec i4fn i5atss i6atdec- = opcode "envlpxr" args- where args- = [to x1amp, to i2rise, to i3dec, to i4fn, to i5atss, to i6atdec]- ++ map to i0init----- | * opcode : envlpxr--- --- --- * syntax : --- --- > ares envlpxr xamp, irise, idec, ifn, iatss, iatdec [, ixmod] [,irind]--- > kres envlpxr kamp, irise, idec, ifn, iatss, iatdec [, ixmod] [,irind]--- --- --- * description : --- --- envlpxr is the same as envlpx except that the final segment is--- entered only on sensing a MIDI note release. The note is then--- extended by the decay time.--- --- --- * url : <http://www.csounds.com/manual/html/envlpxr.html>- -envlpxrK ::- (K k0) =>- [Irate] -> k0 -> Irate -> Irate -> Irate -> Irate -> Irate -> Krate-envlpxrK i0init k1amp i2rise i3dec i4fn i5atss i6atdec- = opcode "envlpxr" args- where args- = [to k1amp, to i2rise, to i3dec, to i4fn, to i5atss, to i6atdec]- ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Fmsynth.hs
@@ -1,491 +0,0 @@--- | FM Synthesis-module CsoundExpr.Opcodes.Siggen.Fmsynth- (foscil,- foscili,- crossfm,- crossfmi,- crosspm,- crosspmi,- crossfmpm,- crossfmpmi,- fmb3,- fmbell,- fmmetal,- fmpercfl,- fmrhode,- fmvoice,- fmwurlie)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : foscil--- --- --- * syntax : --- --- > ares foscil xamp, kcps, xcar, xmod, kndx, ifn [, iphs]--- --- --- * description : --- --- A basic frequency modulated oscillator.--- --- --- * url : <http://www.csounds.com/manual/html/foscil.html>- -foscil ::- (X x0, K k0, X x1, X x2, K k1) =>- [Irate] -> x0 -> k0 -> x1 -> x2 -> k1 -> Irate -> Arate-foscil i0init x1amp k2cps x3car x4mod k5ndx i6fn- = opcode "foscil" args- where args- = [to x1amp, to k2cps, to x3car, to x4mod, to k5ndx, to i6fn] ++- map to i0init----- | * opcode : foscili--- --- --- * syntax : --- --- > ares foscili xamp, kcps, xcar, xmod, kndx, ifn [, iphs]--- --- --- * description : --- --- Basic frequency modulated oscillator with linear interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/foscili.html>- -foscili ::- (X x0, K k0, X x1, X x2, K k1) =>- [Irate] -> x0 -> k0 -> x1 -> x2 -> k1 -> Irate -> Arate-foscili i0init x1amp k2cps x3car x4mod k5ndx i6fn- = opcode "foscili" args- where args- = [to x1amp, to k2cps, to x3car, to x4mod, to k5ndx, to i6fn] ++- map to i0init----- | * opcode : crossfm--- --- --- * syntax : --- --- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- --- --- * description : --- --- Two oscillators, mutually frequency and/or phase modulated by--- each other.--- --- --- * url : <http://www.csounds.com/manual/html/crossfm.html>- -crossfm ::- (X x0, X x1, X x2, X x3, K k0) =>- [Irate] -> x0 -> x1 -> x2 -> x3 -> k0 -> Irate -> Irate -> MultiOut-crossfm i0init x1frq1 x2frq2 x3ndx1 x4ndx2 k5cps i6fn1 i7fn2- = opcode "crossfm" args- where args- = [to x1frq1, to x2frq2, to x3ndx1, to x4ndx2, to k5cps, to i6fn1,- to i7fn2]- ++ map to i0init----- | * opcode : crossfmi--- --- --- * syntax : --- --- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- --- --- * description : --- --- Two oscillators, mutually frequency and/or phase modulated by--- each other.--- --- --- * url : <http://www.csounds.com/manual/html/crossfm.html>- -crossfmi ::- (X x0, X x1, X x2, X x3, K k0) =>- [Irate] -> x0 -> x1 -> x2 -> x3 -> k0 -> Irate -> Irate -> MultiOut-crossfmi i0init x1frq1 x2frq2 x3ndx1 x4ndx2 k5cps i6fn1 i7fn2- = opcode "crossfmi" args- where args- = [to x1frq1, to x2frq2, to x3ndx1, to x4ndx2, to k5cps, to i6fn1,- to i7fn2]- ++ map to i0init----- | * opcode : crosspm--- --- --- * syntax : --- --- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- --- --- * description : --- --- Two oscillators, mutually frequency and/or phase modulated by--- each other.--- --- --- * url : <http://www.csounds.com/manual/html/crossfm.html>- -crosspm ::- (X x0, X x1, X x2, X x3, K k0) =>- [Irate] -> x0 -> x1 -> x2 -> x3 -> k0 -> Irate -> Irate -> MultiOut-crosspm i0init x1frq1 x2frq2 x3ndx1 x4ndx2 k5cps i6fn1 i7fn2- = opcode "crosspm" args- where args- = [to x1frq1, to x2frq2, to x3ndx1, to x4ndx2, to k5cps, to i6fn1,- to i7fn2]- ++ map to i0init----- | * opcode : crosspmi--- --- --- * syntax : --- --- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- --- --- * description : --- --- Two oscillators, mutually frequency and/or phase modulated by--- each other.--- --- --- * url : <http://www.csounds.com/manual/html/crossfm.html>- -crosspmi ::- (X x0, X x1, X x2, X x3, K k0) =>- [Irate] -> x0 -> x1 -> x2 -> x3 -> k0 -> Irate -> Irate -> MultiOut-crosspmi i0init x1frq1 x2frq2 x3ndx1 x4ndx2 k5cps i6fn1 i7fn2- = opcode "crosspmi" args- where args- = [to x1frq1, to x2frq2, to x3ndx1, to x4ndx2, to k5cps, to i6fn1,- to i7fn2]- ++ map to i0init----- | * opcode : crossfmpm--- --- --- * syntax : --- --- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- --- --- * description : --- --- Two oscillators, mutually frequency and/or phase modulated by--- each other.--- --- --- * url : <http://www.csounds.com/manual/html/crossfm.html>- -crossfmpm ::- (X x0, X x1, X x2, X x3, K k0) =>- [Irate] -> x0 -> x1 -> x2 -> x3 -> k0 -> Irate -> Irate -> MultiOut-crossfmpm i0init x1frq1 x2frq2 x3ndx1 x4ndx2 k5cps i6fn1 i7fn2- = opcode "crossfmpm" args- where args- = [to x1frq1, to x2frq2, to x3ndx1, to x4ndx2, to k5cps, to i6fn1,- to i7fn2]- ++ map to i0init----- | * opcode : crossfmpmi--- --- --- * syntax : --- --- > a1, a2 crossfm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crosspmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpm xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- > a1, a2 crossfmpmi xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]--- --- --- * description : --- --- Two oscillators, mutually frequency and/or phase modulated by--- each other.--- --- --- * url : <http://www.csounds.com/manual/html/crossfm.html>- -crossfmpmi ::- (X x0, X x1, X x2, X x3, K k0) =>- [Irate] -> x0 -> x1 -> x2 -> x3 -> k0 -> Irate -> Irate -> MultiOut-crossfmpmi i0init x1frq1 x2frq2 x3ndx1 x4ndx2 k5cps i6fn1 i7fn2- = opcode "crossfmpmi" args- where args- = [to x1frq1, to x2frq2, to x3ndx1, to x4ndx2, to k5cps, to i6fn1,- to i7fn2]- ++ map to i0init----- | * opcode : fmb3--- --- --- * syntax : --- --- > ares fmb3 kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, --- > ifn4, ivfn--- --- --- * description : --- --- Uses FM synthesis to create a Hammond B3 organ sound. It comes--- from a family of FM sounds, all using 4 basic oscillators and--- various architectures, as used in the TX81Z synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/fmb3.html>- -fmb3 ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmb3 k0amp k1freq k2c1 k3c2 k4vdepth k5vrate i6fn1 i7fn2 i8fn3- i9fn4 i10vfn = opcode "fmb3" args- where args- = [to k0amp, to k1freq, to k2c1, to k3c2, to k4vdepth, to k5vrate,- to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vfn]----- | * opcode : fmbell--- --- --- * syntax : --- --- > ares fmbell kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, --- > ifn4, ivfn--- --- --- * description : --- --- Uses FM synthesis to create a tublar bell sound. It comes from a--- family of FM sounds, all using 4 basic oscillators and various--- architectures, as used in the TX81Z synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/fmbell.html>- -fmbell ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmbell k0amp k1freq k2c1 k3c2 k4vdepth k5vrate i6fn1 i7fn2 i8fn3- i9fn4 i10vfn = opcode "fmbell" args- where args- = [to k0amp, to k1freq, to k2c1, to k3c2, to k4vdepth, to k5vrate,- to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vfn]----- | * opcode : fmmetal--- --- --- * syntax : --- --- > ares fmmetal kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, --- > ifn4, ivfn--- --- --- * description : --- --- Uses FM synthesis to create a Heavy Metal sound. It comes from a--- family of FM sounds, all using 4 basic oscillators and various--- architectures, as used in the TX81Z synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/fmmetal.html>- -fmmetal ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmmetal k0amp k1freq k2c1 k3c2 k4vdepth k5vrate i6fn1 i7fn2 i8fn3- i9fn4 i10vfn = opcode "fmmetal" args- where args- = [to k0amp, to k1freq, to k2c1, to k3c2, to k4vdepth, to k5vrate,- to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vfn]----- | * opcode : fmpercfl--- --- --- * syntax : --- --- > ares fmpercfl kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, --- > ifn3, ifn4, ivfn--- --- --- * description : --- --- Uses FM synthesis to create a percussive flute sound. It comes--- from a family of FM sounds, all using 4 basic oscillators and--- various architectures, as used in the TX81Z synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/fmpercfl.html>- -fmpercfl ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmpercfl k0amp k1freq k2c1 k3c2 k4vdepth k5vrate i6fn1 i7fn2 i8fn3- i9fn4 i10vfn = opcode "fmpercfl" args- where args- = [to k0amp, to k1freq, to k2c1, to k3c2, to k4vdepth, to k5vrate,- to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vfn]----- | * opcode : fmrhode--- --- --- * syntax : --- --- > ares fmrhode kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, --- > ifn3, ifn4, ivfn--- --- --- * description : --- --- Uses FM synthesis to create a Fender Rhodes electric piano--- sound. It comes from a family of FM sounds, all using 4 basic--- oscillators and various architectures, as used in the TX81Z--- synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/fmrhode.html>- -fmrhode ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmrhode k0amp k1freq k2c1 k3c2 k4vdepth k5vrate i6fn1 i7fn2 i8fn3- i9fn4 i10vfn = opcode "fmrhode" args- where args- = [to k0amp, to k1freq, to k2c1, to k3c2, to k4vdepth, to k5vrate,- to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vfn]----- | * opcode : fmvoice--- --- --- * syntax : --- --- > ares fmvoice kamp, kfreq, kvowel, ktilt, kvibamt, kvibrate, ifn1, --- > ifn2, ifn3, ifn4, ivibfn--- --- --- * description : --- --- FM Singing Voice Synthesis--- --- --- * url : <http://www.csounds.com/manual/html/fmvoice.html>- -fmvoice ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmvoice k0amp k1freq k2vowel k3tilt k4vibamt k5vibrate i6fn1 i7fn2- i8fn3 i9fn4 i10vibfn = opcode "fmvoice" args- where args- = [to k0amp, to k1freq, to k2vowel, to k3tilt, to k4vibamt,- to k5vibrate, to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vibfn]----- | * opcode : fmwurlie--- --- --- * syntax : --- --- > ares fmwurlie kamp, kfreq, kc1, kc2, kvdepth, kvrate, ifn1, ifn2, ifn3, --- > ifn4, ivfn--- --- --- * description : --- --- Uses FM synthesis to create a Wurlitzer electric piano sound. It--- comes from a family of FM sounds, all using 4 basic oscillators--- and various architectures, as used in the TX81Z synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/fmwurlie.html>- -fmwurlie ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-fmwurlie k0amp k1freq k2c1 k3c2 k4vdepth k5vrate i6fn1 i7fn2 i8fn3- i9fn4 i10vfn = opcode "fmwurlie" args- where args- = [to k0amp, to k1freq, to k2c1, to k3c2, to k4vdepth, to k5vrate,- to i6fn1, to i7fn2, to i8fn3, to i9fn4, to i10vfn]
− src/CsoundExpr/Opcodes/Siggen/Granular.hs
@@ -1,588 +0,0 @@--- | Granular Synthesis-module CsoundExpr.Opcodes.Siggen.Granular- (diskgrain,- fof,- fof2,- fog,- grain,- grain2,- grain3,- granule,- partikkel,- partikkelsync,- sndwarp,- sndwarpst,- syncgrain,- syncloop,- vosim)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : diskgrain--- --- --- * syntax : --- --- > asig diskgrain Sfname, kamp, kfreq, kpitch, kgrsize, kprate, --- > ifun, iolaps [,imaxgrsize, ioffset]--- --- --- * description : --- --- diskgrain implements synchronous granular synthesis. The source--- sound for the grains is obtained by reading a soundfile--- containing the samples of the source waveform.--- --- --- * url : <http://www.csounds.com/manual/html/diskgrain.html>- -diskgrain ::- (K k0, K k1, K k2, K k3, K k4) =>- [Irate] ->- String -> k0 -> k1 -> k2 -> k3 -> k4 -> Irate -> Irate -> Arate-diskgrain i0init s1fname k2amp k3freq k4pitch k5grsize k6prate- i7fun i8olaps = opcode "diskgrain" args- where args- = [to s1fname, to k2amp, to k3freq, to k4pitch, to k5grsize,- to k6prate, to i7fun, to i8olaps]- ++ map to i0init----- | * opcode : fof--- --- --- * syntax : --- --- > ares fof xamp, xfund, xform, koct, kband, kris, kdur, kdec, iolaps, --- > ifna, ifnb, itotdur [, iphs] [, ifmode] [, iskip]--- --- --- * description : --- --- Audio output is a succession of sinusoid bursts initiated at--- frequency xfund with a spectral peak at xform. For xfund above 25--- Hz these bursts produce a speech-like formant with spectral--- characteristics determined by the k-input parameters. For lower--- fundamentals this generator provides a special form of granular--- synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/fof.html>- -fof ::- (X x0, X x1, X x2, K k0, K k1, K k2, K k3, K k4) =>- [Irate] ->- x0 ->- x1 ->- x2 ->- k0 ->- k1 -> k2 -> k3 -> k4 -> Irate -> Irate -> Irate -> Irate -> Arate-fof i0init x1amp x2fund x3form k4oct k5band k6ris k7dur k8dec- i9olaps i10fna i11fnb i12totdur = opcode "fof" args- where args- = [to x1amp, to x2fund, to x3form, to k4oct, to k5band, to k6ris,- to k7dur, to k8dec, to i9olaps, to i10fna, to i11fnb, to i12totdur]- ++ map to i0init----- | * opcode : fof2--- --- --- * syntax : --- --- > ares fof2 xamp, xfund, xform, koct, kband, kris, kdur, kdec, iolaps, --- > ifna, ifnb, itotdur, kphs, kgliss [, iskip]--- --- --- * description : --- --- Audio output is a succession of sinusoid bursts initiated at--- frequency xfund with a spectral peak at xform. For xfund above 25--- Hz these bursts produce a speech-like formant with spectral--- characteristics determined by the k-input parameters. For lower--- fundamentals this generator provides a special form of granular--- synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/fof2.html>- -fof2 ::- (X x0, X x1, X x2, K k0, K k1, K k2, K k3, K k4, K k5, K k6) =>- [Irate] ->- x0 ->- x1 ->- x2 ->- k0 ->- k1 ->- k2 ->- k3 -> k4 -> Irate -> Irate -> Irate -> Irate -> k5 -> k6 -> Arate-fof2 i0init x1amp x2fund x3form k4oct k5band k6ris k7dur k8dec- i9olaps i10fna i11fnb i12totdur k13phs k14gliss- = opcode "fof2" args- where args- = [to x1amp, to x2fund, to x3form, to k4oct, to k5band, to k6ris,- to k7dur, to k8dec, to i9olaps, to i10fna, to i11fnb, to i12totdur,- to k13phs, to k14gliss]- ++ map to i0init----- | * opcode : fog--- --- --- * syntax : --- --- > ares fog xamp, xdens, xtrans, aspd, koct, kband, kris, kdur, kdec, --- > iolaps, ifna, ifnb, itotdur [, iphs] [, itmode] [, iskip]--- --- --- * description : --- --- Audio output is a succession of grains derived from data in a--- stored function table ifna. The local envelope of these grains--- and their timing is based on the model of fof synthesis and--- permits detailed control of the granular synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/fog.html>- -fog ::- (X x0, X x1, X x2, K k0, K k1, K k2, K k3, K k4) =>- [Irate] ->- x0 ->- x1 ->- x2 ->- Arate ->- k0 ->- k1 -> k2 -> k3 -> k4 -> Irate -> Irate -> Irate -> Irate -> Arate-fog i0init x1amp x2dens x3trans a4spd k5oct k6band k7ris k8dur- k9dec i10olaps i11fna i12fnb i13totdur = opcode "fog" args- where args- = [to x1amp, to x2dens, to x3trans, to a4spd, to k5oct, to k6band,- to k7ris, to k8dur, to k9dec, to i10olaps, to i11fna, to i12fnb,- to i13totdur]- ++ map to i0init----- | * opcode : grain--- --- --- * syntax : --- --- > ares grain xamp, xpitch, xdens, kampoff, kpitchoff, kgdur, igfn, --- > iwfn, imgdur [, igrnd]--- --- --- * description : --- --- Generates granular synthesis textures.--- --- --- * url : <http://www.csounds.com/manual/html/grain.html>- -grain ::- (X x0, X x1, X x2, K k0, K k1, K k2) =>- [Irate] ->- x0 ->- x1 -> x2 -> k0 -> k1 -> k2 -> Irate -> Irate -> Irate -> Arate-grain i0init x1amp x2pitch x3dens k4ampoff k5pitchoff k6gdur i7gfn- i8wfn i9mgdur = opcode "grain" args- where args- = [to x1amp, to x2pitch, to x3dens, to k4ampoff, to k5pitchoff,- to k6gdur, to i7gfn, to i8wfn, to i9mgdur]- ++ map to i0init----- | * opcode : grain2--- --- --- * syntax : --- --- > ares grain2 kcps, kfmd, kgdur, iovrlp, kfn, iwfn [, irpow] --- > [, iseed] [, imode]--- --- --- * description : --- --- Generate granular synthesis textures. grain2 is simpler to use,--- but grain3 offers more control.--- --- --- * url : <http://www.csounds.com/manual/html/grain2.html>- -grain2 ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> k2 -> Irate -> k3 -> Irate -> Arate-grain2 i0init k1cps k2fmd k3gdur i4ovrlp k5fn i6wfn- = opcode "grain2" args- where args- = [to k1cps, to k2fmd, to k3gdur, to i4ovrlp, to k5fn, to i6wfn] ++- map to i0init----- | * opcode : grain3--- --- --- * syntax : --- --- > ares grain3 kcps, kphs, kfmd, kpmd, kgdur, kdens, imaxovr, kfn, iwfn, --- > kfrpow, kprpow [, iseed] [, imode]--- --- --- * description : --- --- Generate granular synthesis textures. grain2 is simpler to use--- but grain3 offers more control.--- --- --- * url : <http://www.csounds.com/manual/html/grain3.html>- -grain3 ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7, K k8) =>- [Irate] ->- k0 ->- k1 ->- k2 -> k3 -> k4 -> k5 -> Irate -> k6 -> Irate -> k7 -> k8 -> Arate-grain3 i0init k1cps k2phs k3fmd k4pmd k5gdur k6dens i7maxovr k8fn- i9wfn k10frpow k11prpow = opcode "grain3" args- where args- = [to k1cps, to k2phs, to k3fmd, to k4pmd, to k5gdur, to k6dens,- to i7maxovr, to k8fn, to i9wfn, to k10frpow, to k11prpow]- ++ map to i0init----- | * opcode : granule--- --- --- * syntax : --- --- > ares granule xamp, ivoice, iratio, imode, ithd, ifn, ipshift, igskip, --- > igskip_os, ilength, kgap, igap_os, kgsize, igsize_os, iatt, idec --- > [, iseed] [, ipitch1] [, ipitch2] [, ipitch3] [, ipitch4] [, ifnenv]--- --- --- * description : --- --- The granule unit generator is more complex than grain, but does--- add new possibilities.--- --- --- * url : <http://www.csounds.com/manual/html/granule.html>- -granule ::- (X x0, K k0, K k1) =>- [Irate] ->- x0 ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate -> k0 -> Irate -> k1 -> Irate -> Irate -> Irate -> Arate-granule i0init x1amp i2voice i3ratio i4mode i5thd i6fn i7pshift- i8gskip i9gskip_os i10length k11gap i12gap_os k13gsize i14gsize_os- i15att i16dec = opcode "granule" args- where args- = [to x1amp, to i2voice, to i3ratio, to i4mode, to i5thd, to i6fn,- to i7pshift, to i8gskip, to i9gskip_os, to i10length, to k11gap,- to i12gap_os, to k13gsize, to i14gsize_os, to i15att, to i16dec]- ++ map to i0init----- | * opcode : partikkel--- --- --- * syntax : --- --- > a1 [, a2, a3, a4, a5, a6, a7, a8] partikkel agrainfreq, --- > kdistribution, idisttab, async, kenv2amt, ienv2tab, ienv_attack, --- > ienv_decay, ksustain_amount, ka_d_ratio, kduration, kamp, igainmasks, --- > kwavfreq, ksweepshape, iwavfreqstarttab, iwavfreqendtab, awavfm, --- > ifmamptab, kfmenv, icosine, ktraincps, knumpartials, kchroma, --- > ichannelmasks, krandommask, kwaveform1, kwaveform2, kwaveform3, --- > kwaveform4, iwaveamptab, asamplepos1, asamplepos2, asamplepos3, --- > asamplepos4, kwavekey1, kwavekey2, kwavekey3, kwavekey4, imax_grains --- > [, iopcode_id]--- --- --- * description : --- --- partikkel was conceived after reading Curtis Roads' book--- "Microsound", and the goal was to create an opcode that was--- capable of all time-domain varieties of granular synthesis--- described in this book. The idea being that most of the--- techniques only differ in parameter values, and by having a--- single opcode that can do all varieties of granular synthesis--- makes it possible to interpolate between techniques. Granular--- synthesis is sometimes dubbed particle synthesis, and it was--- thought apt to name the opcode partikkel to distinguish it from--- other granular opcodes.--- --- --- * url : <http://www.csounds.com/manual/html/partikkel.html>- -partikkel ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7, K k8, K k9, K k10,- K k11, K k12, K k13, K k14, K k15, K k16, K k17, K k18, K k19,- K k20) =>- [Irate] ->- Arate ->- k0 ->- Irate ->- Arate ->- k1 ->- Irate ->- Irate ->- Irate ->- k2 ->- k3 ->- k4 ->- k5 ->- Irate ->- k6 ->- k7 ->- Irate ->- Irate ->- Arate ->- Irate ->- k8 ->- Irate ->- k9 ->- k10 ->- k11 ->- Irate ->- k12 ->- k13 ->- k14 ->- k15 ->- k16 ->- Irate ->- Arate ->- Arate ->- Arate ->- Arate ->- k17 ->- k18 ->- k19 ->- k20 ->- Irate ->- MultiOut-partikkel i0init a1grainfreq k2distribution i3disttab a4sync- k5env2amt i6env2tab i7env_attack i8env_decay k9sustain_amount- k10a_d_ratio k11duration k12amp i13gainmasks k14wavfreq- k15sweepshape i16wavfreqstarttab i17wavfreqendtab a18wavfm- i19fmamptab k20fmenv i21cosine k22traincps k23numpartials k24chroma- i25channelmasks k26randommask k27waveform1 k28waveform2- k29waveform3 k30waveform4 i31waveamptab a32samplepos1 a33samplepos2- a34samplepos3 a35samplepos4 k36wavekey1 k37wavekey2 k38wavekey3- k39wavekey4 i40max_grains = opcode "partikkel" args- where args- = [to a1grainfreq, to k2distribution, to i3disttab, to a4sync,- to k5env2amt, to i6env2tab, to i7env_attack, to i8env_decay,- to k9sustain_amount, to k10a_d_ratio, to k11duration, to k12amp,- to i13gainmasks, to k14wavfreq, to k15sweepshape,- to i16wavfreqstarttab, to i17wavfreqendtab, to a18wavfm,- to i19fmamptab, to k20fmenv, to i21cosine, to k22traincps,- to k23numpartials, to k24chroma, to i25channelmasks,- to k26randommask, to k27waveform1, to k28waveform2,- to k29waveform3, to k30waveform4, to i31waveamptab,- to a32samplepos1, to a33samplepos2, to a34samplepos3,- to a35samplepos4, to k36wavekey1, to k37wavekey2, to k38wavekey3,- to k39wavekey4, to i40max_grains]- ++ map to i0init----- | * opcode : partikkelsync--- --- --- * syntax : --- --- > async [,aphase] partikkelsync iopcode_id--- --- --- * description : --- --- partikkelsync is an opcode for outputting partikkel's grain--- scheduler clock pulse and phase. partikkelsync's output can be--- used to synchronize other instances of the partikkel opcode to--- the same clock.--- --- --- * url : <http://www.csounds.com/manual/html/partikkelsync.html>- -partikkelsync :: Irate -> MultiOut-partikkelsync i0opcode_id = opcode "partikkelsync" args- where args = [to i0opcode_id]----- | * opcode : sndwarp--- --- --- * syntax : --- --- > ares [, ac] sndwarp xamp, xtimewarp, xresample, ifn1, ibeg, iwsize, --- > irandw, ioverlap, ifn2, itimemode--- --- --- * description : --- --- sndwarp reads sound samples from a table and applies--- time-stretching and/or pitch modification. Time and frequency--- modification are independent from one another. For example, a--- sound can be stretched in time while raising the pitch!--- --- --- * url : <http://www.csounds.com/manual/html/sndwarp.html>- -sndwarp ::- (X x0, X x1, X x2) =>- x0 ->- x1 ->- x2 ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-sndwarp x0amp x1timewarp x2resample i3fn1 i4beg i5wsize i6randw- i7overlap i8fn2 i9timemode = opcode "sndwarp" args- where args- = [to x0amp, to x1timewarp, to x2resample, to i3fn1, to i4beg,- to i5wsize, to i6randw, to i7overlap, to i8fn2, to i9timemode]----- | * opcode : sndwarpst--- --- --- * syntax : --- --- > ar1, ar2 [,ac1] [, ac2] sndwarpst xamp, xtimewarp, xresample, ifn1, --- > ibeg, iwsize, irandw, ioverlap, ifn2, itimemode--- --- --- * description : --- --- sndwarpst reads stereo sound samples from a table and applies--- time-stretching and/or pitch modification. Time and frequency--- modification are independent from one another. For example, a--- sound can be stretched in time while raising the pitch!--- --- --- * url : <http://www.csounds.com/manual/html/sndwarpst.html>- -sndwarpst ::- (X x0, X x1, X x2) =>- x0 ->- x1 ->- x2 ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-sndwarpst x0amp x1timewarp x2resample i3fn1 i4beg i5wsize i6randw- i7overlap i8fn2 i9timemode = opcode "sndwarpst" args- where args- = [to x0amp, to x1timewarp, to x2resample, to i3fn1, to i4beg,- to i5wsize, to i6randw, to i7overlap, to i8fn2, to i9timemode]----- | * opcode : syncgrain--- --- --- * syntax : --- --- > asig syncgrain kamp, kfreq, kpitch, kgrsize, kprate, ifun1, --- > ifun2, iolaps--- --- --- * description : --- --- syncgrain implements synchronous granular synthesis. The source--- sound for the grains is obtained by reading a function table--- containing the samples of the source waveform. For sampled-sound--- sources, GEN01 is used. syncgrain will accept deferred allocation--- tables.--- --- --- * url : <http://www.csounds.com/manual/html/syncgrain.html>- -syncgrain ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> k4 -> Irate -> Irate -> Irate -> Arate-syncgrain k0amp k1freq k2pitch k3grsize k4prate i5fun1 i6fun2- i7olaps = opcode "syncgrain" args- where args- = [to k0amp, to k1freq, to k2pitch, to k3grsize, to k4prate,- to i5fun1, to i6fun2, to i7olaps]----- | * opcode : syncloop--- --- --- * syntax : --- --- > asig syncloop kamp, kfreq, kpitch, kgrsize, kprate, klstart, --- > klend, ifun1, ifun2, iolaps[,istart, iskip]--- --- --- * description : --- --- syncloop is a variation on syncgrain, which implements--- synchronous granular synthesis. syncloop adds loop start and end--- points and an optional start position. Loop start and end control--- grain start positions, so the actual grains can go beyond the--- loop points (if the loop points are not at the extremes of the--- table), enabling seamless crossfading. For more information on--- the granular synthesis process, check the syncgrain manual page.--- --- --- * url : <http://www.csounds.com/manual/html/syncloop.html>- -syncloop ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6) =>- [Irate] ->- k0 ->- k1 ->- k2 -> k3 -> k4 -> k5 -> k6 -> Irate -> Irate -> Irate -> Arate-syncloop i0init k1amp k2freq k3pitch k4grsize k5prate k6lstart- k7lend i8fun1 i9fun2 i10olaps = opcode "syncloop" args- where args- = [to k1amp, to k2freq, to k3pitch, to k4grsize, to k5prate,- to k6lstart, to k7lend, to i8fun1, to i9fun2, to i10olaps]- ++ map to i0init----- | * opcode : vosim--- --- --- * syntax : --- --- > ar vosim kamp, kFund, kForm, kDecay, kPulseCount, kPulseFactor, ifn [, iskip]--- --- --- * description : --- --- This opcode produces a simple vocal simulation based on glottal--- pulses with formant characteristics. Output is a series of sound--- events, where each event is composed of a burst of squared sine--- pulses followed by silence. The VOSIM (VOcal SIMulation)--- synthesis method was developed by Kaegi and Tempelaars in the--- 1970's.--- --- --- * url : <http://www.csounds.com/manual/html/vosim.html>- -vosim ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Arate-vosim i0init k1amp k2Fund k3Form k4Decay k5PulseCount k6PulseFactor- i7fn = opcode "vosim" args- where args- = [to k1amp, to k2Fund, to k3Form, to k4Decay, to k5PulseCount,- to k6PulseFactor, to i7fn]- ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Hvs.hs
@@ -1,124 +0,0 @@--- | Hyper Vectorial Synthesis-module CsoundExpr.Opcodes.Siggen.Hvs- (vphaseseg,- hvs1,- hvs2,- hvs3)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vphaseseg--- --- --- * syntax : --- --- > vphaseseg kphase, ioutab, ielems, itab1,idist1,itab2 --- > [,idist2,itab3,...,idistN-1,itabN]--- --- --- * description : --- --- vphaseseg allows one-dimensional HVS (Hyper-Vectorial--- Synthesis).--- --- --- * url : <http://www.csounds.com/manual/html/vphaseseg.html>- -vphaseseg :: (K k0) => k0 -> Irate -> Irate -> [Irate] -> SignalOut-vphaseseg k0phase i1outab i2elems i3tabDist- = outOpcode "vphaseseg" args- where args- = [to k0phase, to i1outab, to i2elems] ++ map to i3tabDist----- | * opcode : hvs1--- --- --- * syntax : --- --- > hvs1 kx, inumParms, inumPointsX, iOutTab, iPositionsTab, iSnapTab [, iConfigTab]--- --- --- * description : --- --- hvs1 allows one-dimensional Hyper Vectorial Synthesis (HVS)--- controlled by externally-updated k-variables.--- --- --- * url : <http://www.csounds.com/manual/html/hvs1.html>- -hvs1 ::- (K k0) =>- [Irate] ->- k0 -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-hvs1 i0init k1x i2numParms i3numPointsX i4OutTab i5PositionsTab- i6SnapTab = outOpcode "hvs1" args- where args- = [to k1x, to i2numParms, to i3numPointsX, to i4OutTab,- to i5PositionsTab, to i6SnapTab]- ++ map to i0init----- | * opcode : hvs2--- --- --- * syntax : --- --- > hvs2 kx, ky, inumParms, inumPointsX, iOutTab, iPositionsTab, iSnapTab [, iConfigTab]--- --- --- * description : --- --- hvs2 allows two-dimensional Hyper Vectorial Synthesis (HVS)--- controlled by externally-updated k-variables.--- --- --- * url : <http://www.csounds.com/manual/html/hvs2.html>- -hvs2 ::- (K k0, K k1) =>- [Irate] ->- k0 -> k1 -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-hvs2 i0init k1x k2y i3numParms i4numPointsX i5OutTab i6PositionsTab- i7SnapTab = outOpcode "hvs2" args- where args- = [to k1x, to k2y, to i3numParms, to i4numPointsX, to i5OutTab,- to i6PositionsTab, to i7SnapTab]- ++ map to i0init----- | * opcode : hvs3--- --- --- * syntax : --- --- > hvs3 kx, ky, kz, inumParms, inumPointsX, iOutTab, iPositionsTab, iSnapTab [, iConfigTab]--- --- --- * description : --- --- hvs3 allows three-dimensional Hyper Vectorial Synthesis (HVS)--- controlled by externally-updated k-variables.--- --- --- * url : <http://www.csounds.com/manual/html/hvs3.html>- -hvs3 ::- (K k0, K k1, K k2) =>- [Irate] ->- k0 ->- k1 -> k2 -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-hvs3 i0init k1x k2y k3z i4numParms i5numPointsX i6OutTab- i7PositionsTab i8SnapTab = outOpcode "hvs3" args- where args- = [to k1x, to k2y, to k3z, to i4numParms, to i5numPointsX,- to i6OutTab, to i7PositionsTab, to i8SnapTab]- ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Lineexp.hs
@@ -1,631 +0,0 @@--- | Linear and Exponential Generators-module CsoundExpr.Opcodes.Siggen.Lineexp- (exponA,- exponK,- expcurve,- expsegA,- expsegK,- expsega,- expsegrA,- expsegrK,- gainslider,- jsplineA,- jsplineK,- lineA,- lineK,- linsegA,- linsegK,- linsegrA,- linsegrK,- logcurve,- loopseg,- loopsegp,- lpshold,- lpsholdp,- rsplineA,- rsplineK,- scale,- transegA,- transegK)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : expon--- --- --- * syntax : --- --- > ares expon ia, idur, ib--- > kres expon ia, idur, ib--- --- --- * description : --- --- Trace an exponential curve between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/expon.html>- -exponA :: Irate -> Irate -> Irate -> Arate-exponA i0a i1dur i2b = opcode "expon" args- where args = [to i0a, to i1dur, to i2b]----- | * opcode : expon--- --- --- * syntax : --- --- > ares expon ia, idur, ib--- > kres expon ia, idur, ib--- --- --- * description : --- --- Trace an exponential curve between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/expon.html>- -exponK :: Irate -> Irate -> Irate -> Krate-exponK i0a i1dur i2b = opcode "expon" args- where args = [to i0a, to i1dur, to i2b]----- | * opcode : expcurve--- --- --- * syntax : --- --- > kout expcurve kindex, ksteepness--- --- --- * description : --- --- Generates an exponential curve in range 0 to 1 of arbitrary--- steepness. Steepness index equal to or lower than 1.0 will result--- in Not-a-Number errors and cause unstable behavior.--- --- --- * url : <http://www.csounds.com/manual/html/expcurve.html>- -expcurve :: (K k0, K k1) => k0 -> k1 -> Krate-expcurve k0index k1steepness = opcode "expcurve" args- where args = [to k0index, to k1steepness]----- | * opcode : expseg--- --- --- * syntax : --- --- > ares expseg ia, idur1, ib [, idur2] [, ic] [...]--- > kres expseg ia, idur1, ib [, idur2] [, ic] [...]--- --- --- * description : --- --- Trace a series of exponential segments between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/expseg.html>- -expsegA :: [Irate] -> Arate-expsegA i0vals = opcode "expseg" args- where args = map to i0vals----- | * opcode : expseg--- --- --- * syntax : --- --- > ares expseg ia, idur1, ib [, idur2] [, ic] [...]--- > kres expseg ia, idur1, ib [, idur2] [, ic] [...]--- --- --- * description : --- --- Trace a series of exponential segments between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/expseg.html>- -expsegK :: [Irate] -> Krate-expsegK i0vals = opcode "expseg" args- where args = map to i0vals----- | * opcode : expsega--- --- --- * syntax : --- --- > ares expsega ia, idur1, ib [, idur2] [, ic] [...]--- --- --- * description : --- --- An exponential segment generator operating at a-rate. This unit--- is almost identical to expseg, but more precise when defining--- segments with very short durations (i.e., in a percussive attack--- phase) at audio rate.--- --- --- * url : <http://www.csounds.com/manual/html/expsega.html>- -expsega :: [Irate] -> Arate-expsega i0vals = opcode "expsega" args- where args = map to i0vals----- | * opcode : expsegr--- --- --- * syntax : --- --- > ares expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- > kres expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- --- --- * description : --- --- Trace a series of exponential segments between specified points--- including a release segment.--- --- --- * url : <http://www.csounds.com/manual/html/expsegr.html>- -expsegrA :: [Irate] -> Irate -> Irate -> Arate-expsegrA i0vals i1rel i2z = opcode "expsegr" args- where args = map to i0vals ++ [to i1rel, to i2z]----- | * opcode : expsegr--- --- --- * syntax : --- --- > ares expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- > kres expsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- --- --- * description : --- --- Trace a series of exponential segments between specified points--- including a release segment.--- --- --- * url : <http://www.csounds.com/manual/html/expsegr.html>- -expsegrK :: [Irate] -> Irate -> Irate -> Krate-expsegrK i0vals i1rel i2z = opcode "expsegr" args- where args = map to i0vals ++ [to i1rel, to i2z]----- | * opcode : gainslider--- --- --- * syntax : --- --- > kout gainslider kindex--- --- --- * description : --- --- This opcode is intended for use to multiply by an audio signal--- to give a console mixer like feel. There is no bounds in the--- source code so you can for example give higher than 127 values--- for extra amplitude but possibly clipped audio.--- --- --- * url : <http://www.csounds.com/manual/html/gainslider.html>- -gainslider :: (K k0) => k0 -> Krate-gainslider k0index = opcode "gainslider" args- where args = [to k0index]----- | * opcode : jspline--- --- --- * syntax : --- --- > ares jspline xamp, kcpsMin, kcpsMax--- > kres jspline kamp, kcpsMin, kcpsMax--- --- --- * description : --- --- A jitter-spline generator.--- --- --- * url : <http://www.csounds.com/manual/html/jspline.html>- -jsplineA :: (X x0, K k0, K k1) => x0 -> k0 -> k1 -> Arate-jsplineA x0amp k1cpsMin k2cpsMax = opcode "jspline" args- where args = [to x0amp, to k1cpsMin, to k2cpsMax]----- | * opcode : jspline--- --- --- * syntax : --- --- > ares jspline xamp, kcpsMin, kcpsMax--- > kres jspline kamp, kcpsMin, kcpsMax--- --- --- * description : --- --- A jitter-spline generator.--- --- --- * url : <http://www.csounds.com/manual/html/jspline.html>- -jsplineK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-jsplineK k0amp k1cpsMin k2cpsMax = opcode "jspline" args- where args = [to k0amp, to k1cpsMin, to k2cpsMax]----- | * opcode : line--- --- --- * syntax : --- --- > ares line ia, idur, ib--- > kres line ia, idur, ib--- --- --- * description : --- --- Trace a straight line between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/line.html>- -lineA :: Irate -> Irate -> Irate -> Arate-lineA i0a i1dur i2b = opcode "line" args- where args = [to i0a, to i1dur, to i2b]----- | * opcode : line--- --- --- * syntax : --- --- > ares line ia, idur, ib--- > kres line ia, idur, ib--- --- --- * description : --- --- Trace a straight line between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/line.html>- -lineK :: Irate -> Irate -> Irate -> Krate-lineK i0a i1dur i2b = opcode "line" args- where args = [to i0a, to i1dur, to i2b]----- | * opcode : linseg--- --- --- * syntax : --- --- > ares linseg ia, idur1, ib [, idur2] [, ic] [...]--- > kres linseg ia, idur1, ib [, idur2] [, ic] [...]--- --- --- * description : --- --- Trace a series of line segments between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/linseg.html>- -linsegA :: [Irate] -> Arate-linsegA i0vals = opcode "linseg" args- where args = map to i0vals----- | * opcode : linseg--- --- --- * syntax : --- --- > ares linseg ia, idur1, ib [, idur2] [, ic] [...]--- > kres linseg ia, idur1, ib [, idur2] [, ic] [...]--- --- --- * description : --- --- Trace a series of line segments between specified points.--- --- --- * url : <http://www.csounds.com/manual/html/linseg.html>- -linsegK :: [Irate] -> Krate-linsegK i0vals = opcode "linseg" args- where args = map to i0vals----- | * opcode : linsegr--- --- --- * syntax : --- --- > ares linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- > kres linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- --- --- * description : --- --- Trace a series of line segments between specified points--- including a release segment.--- --- --- * url : <http://www.csounds.com/manual/html/linsegr.html>- -linsegrA :: [Irate] -> Irate -> Irate -> Arate-linsegrA i0vals i1rel i2z = opcode "linsegr" args- where args = map to i0vals ++ [to i1rel, to i2z]----- | * opcode : linsegr--- --- --- * syntax : --- --- > ares linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- > kres linsegr ia, idur1, ib [, idur2] [, ic] [...], irel, iz--- --- --- * description : --- --- Trace a series of line segments between specified points--- including a release segment.--- --- --- * url : <http://www.csounds.com/manual/html/linsegr.html>- -linsegrK :: [Irate] -> Irate -> Irate -> Krate-linsegrK i0vals i1rel i2z = opcode "linsegr" args- where args = map to i0vals ++ [to i1rel, to i2z]----- | * opcode : logcurve--- --- --- * syntax : --- --- > kout logcurve kindex, ksteepness--- --- --- * description : --- --- Generates a logarithmic curve in range 0 to 1 of arbitrary--- steepness. Steepness index equal to or lower than 1.0 will result--- in Not-a-Number errors and cause unstable behavior.--- --- --- * url : <http://www.csounds.com/manual/html/logcurve.html>- -logcurve :: (K k0, K k1) => k0 -> k1 -> Krate-logcurve k0index k1steepness = opcode "logcurve" args- where args = [to k0index, to k1steepness]----- | * opcode : loopseg--- --- --- * syntax : --- --- > ksig loopseg kfreq, ktrig, ktime0, kvalue0 [, ktime1] [, kvalue1] --- > [, ktime2] [, kvalue2] [...]--- --- --- * description : --- --- Generate control signal consisting of linear segments delimited--- by two or more specified points. The entire envelope is looped at--- kfreq rate. Each parameter can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/loopseg.html>- -loopseg :: (K k0, K k1, K k2) => k0 -> k1 -> [k2] -> Krate-loopseg k0freq k1trig k2vals = opcode "loopseg" args- where args = [to k0freq, to k1trig] ++ map to k2vals----- | * opcode : loopsegp--- --- --- * syntax : --- --- > ksig loopsegp kphase, kvalue0, kdur0, kvalue1 --- > [, kdur1,..., kdurN-1, kvalueN]--- --- --- * description : --- --- Generate control signal consisiting of linear segments delimited--- by two or more specified points. The entire envelope can be--- looped at time-variant rate. Each segment coordinate can also be--- varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/loopsegp.html>- -loopsegp :: (K k0, K k1) => k0 -> [k1] -> Krate-loopsegp k0phase k1vals = opcode "loopsegp" args- where args = [to k0phase] ++ map to k1vals----- | * opcode : lpshold--- --- --- * syntax : --- --- > ksig lpshold kfreq, ktrig, ktime0, kvalue0 [, ktime1] [, kvalue1] --- > [, ktime2] [, kvalue2] [...]--- --- --- * description : --- --- Generate control signal consisting of held segments delimited by--- two or more specified points. The entire envelope is looped at--- kfreq rate. Each parameter can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/lpshold.html>- -lpshold :: (K k0, K k1, K k2) => k0 -> k1 -> [k2] -> Krate-lpshold k0freq k1trig k2vals = opcode "lpshold" args- where args = [to k0freq, to k1trig] ++ map to k2vals----- | * opcode : lpsholdp--- --- --- * syntax : --- --- > ksig lpsholdp kphase, ktrig, ktime0, kvalue0 [, ktime1] [, kvalue1] --- > [, ktime2] [, kvalue2] [...]--- --- --- * description : --- --- Generate control signal consisiting of held segments delimited--- by two or more specified points. The entire envelope can be--- looped at time-variant rate. Each segment coordinate can also be--- varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/lpsholdp.html>- -lpsholdp :: (K k0, K k1) => k0 -> [k1] -> Krate-lpsholdp k0phase k1vals = opcode "lpsholdp" args- where args = [to k0phase] ++ map to k1vals----- | * opcode : rspline--- --- --- * syntax : --- --- > ares rspline xrangeMin, xrangeMax, kcpsMin, kcpsMax--- > kres rspline krangeMin, krangeMax, kcpsMin, kcpsMax--- --- --- * description : --- --- Generate random spline curves.--- --- --- * url : <http://www.csounds.com/manual/html/rspline.html>- -rsplineA ::- (X x0, X x1, K k0, K k1) => x0 -> x1 -> k0 -> k1 -> Arate-rsplineA x0rangeMin x1rangeMax k2cpsMin k3cpsMax- = opcode "rspline" args- where args- = [to x0rangeMin, to x1rangeMax, to k2cpsMin, to k3cpsMax]----- | * opcode : rspline--- --- --- * syntax : --- --- > ares rspline xrangeMin, xrangeMax, kcpsMin, kcpsMax--- > kres rspline krangeMin, krangeMax, kcpsMin, kcpsMax--- --- --- * description : --- --- Generate random spline curves.--- --- --- * url : <http://www.csounds.com/manual/html/rspline.html>- -rsplineK ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> Krate-rsplineK k0rangeMin k1rangeMax k2cpsMin k3cpsMax- = opcode "rspline" args- where args- = [to k0rangeMin, to k1rangeMax, to k2cpsMin, to k3cpsMax]----- | * opcode : scale--- --- --- * syntax : --- --- > kscl scale kinput, kmax, kmin--- --- --- * description : --- --- Scales incoming value to user-definable range. Similar to scale--- object found in popular dataflow languages.--- --- --- * url : <http://www.csounds.com/manual/html/scale.html>- -scale :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-scale k0input k1max k2min = opcode "scale" args- where args = [to k0input, to k1max, to k2min]----- | * opcode : transeg--- --- --- * syntax : --- --- > ares transeg ia, idur, itype, ib [, idur2] [, itype] [, ic]...--- > kres transeg ia, idur, itype, ib [, idur2] [, itype] [, ic]...--- --- --- * description : --- --- Constructs a user-definable envelope.--- --- --- * url : <http://www.csounds.com/manual/html/transeg.html>- -transegA :: [Irate] -> Arate-transegA i0vals = opcode "transeg" args- where args = map to i0vals----- | * opcode : transeg--- --- --- * syntax : --- --- > ares transeg ia, idur, itype, ib [, idur2] [, itype] [, ic]...--- > kres transeg ia, idur, itype, ib [, idur2] [, itype] [, ic]...--- --- --- * description : --- --- Constructs a user-definable envelope.--- --- --- * url : <http://www.csounds.com/manual/html/transeg.html>- -transegK :: [Irate] -> Krate-transegK i0vals = opcode "transeg" args- where args = map to i0vals
− src/CsoundExpr/Opcodes/Siggen/Models.hs
@@ -1,715 +0,0 @@--- | Models and Emulations-module CsoundExpr.Opcodes.Siggen.Models- (bamboo,- barmodel,- cabasa,- crunch,- dripwater,- gogobel,- guiro,- mandol,- marimba,- moog,- sandpaper,- sekere,- shaker,- sleighbells,- stix,- tambourine,- vibes,- voice,- lorenz,- planet,- prepiano,- prepianoA,- mandel,- chuap)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : bamboo--- --- --- * syntax : --- --- > ares bamboo kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] --- > [, ifreq1] [, ifreq2]--- --- --- * description : --- --- bamboo is a semi-physical model of a bamboo sound. It is one of--- the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/bamboo.html>- -bamboo :: (K k0) => [Irate] -> k0 -> Irate -> Arate-bamboo i0init k1amp i2dettack = opcode "bamboo" args- where args = [to k1amp, to i2dettack] ++ map to i0init----- | * opcode : barmodel--- --- --- * syntax : --- --- > ares barmodel kbcL, kbcR, iK, ib, kscan, iT30, ipos, ivel, iwid--- --- --- * description : --- --- Audio output is a tone similar to a struck metal bar, using a--- physical model developed from solving the partial differential--- equation. There are controls over the boundary conditions as well--- as the bar characteristics.--- --- --- * url : <http://www.csounds.com/manual/html/barmodel.html>- -barmodel ::- (K k0, K k1, K k2) =>- k0 ->- k1 ->- Irate -> Irate -> k2 -> Irate -> Irate -> Irate -> Irate -> Arate-barmodel k0bcL k1bcR i2K i3b k4scan i5T30 i6pos i7vel i8wid- = opcode "barmodel" args- where args- = [to k0bcL, to k1bcR, to i2K, to i3b, to k4scan, to i5T30,- to i6pos, to i7vel, to i8wid]----- | * opcode : cabasa--- --- --- * syntax : --- --- > ares cabasa iamp, idettack [, inum] [, idamp] [, imaxshake]--- --- --- * description : --- --- cabasa is a semi-physical model of a cabasa sound. It is one of--- the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/cabasa.html>- -cabasa :: [Irate] -> Irate -> Irate -> Arate-cabasa i0init i1amp i2dettack = opcode "cabasa" args- where args = [to i1amp, to i2dettack] ++ map to i0init----- | * opcode : crunch--- --- --- * syntax : --- --- > ares crunch iamp, idettack [, inum] [, idamp] [, imaxshake]--- --- --- * description : --- --- crunch is a semi-physical model of a crunch sound. It is one of--- the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/crunch.html>- -crunch :: [Irate] -> Irate -> Irate -> Arate-crunch i0init i1amp i2dettack = opcode "crunch" args- where args = [to i1amp, to i2dettack] ++ map to i0init----- | * opcode : dripwater--- --- --- * syntax : --- --- > ares dripwater kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] --- > [, ifreq1] [, ifreq2]--- --- --- * description : --- --- dripwater is a semi-physical model of a water drop. It is one of--- the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/dripwater.html>- -dripwater :: (K k0) => [Irate] -> k0 -> Irate -> Arate-dripwater i0init k1amp i2dettack = opcode "dripwater" args- where args = [to k1amp, to i2dettack] ++ map to i0init----- | * opcode : gogobel--- --- --- * syntax : --- --- > ares gogobel kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivfn--- --- --- * description : --- --- Audio output is a tone related to the striking of a cow bell or--- similar. The method is a physical model developed from Perry--- Cook, but re-coded for Csound.--- --- --- * url : <http://www.csounds.com/manual/html/gogobel.html>- -gogobel ::- (K k0, K k1, K k2, K k3) =>- k0 -> k1 -> Irate -> Irate -> Irate -> k2 -> k3 -> Irate -> Arate-gogobel k0amp k1freq i2hrd i3pos i4mp k5vibf k6vamp i7vfn- = opcode "gogobel" args- where args- = [to k0amp, to k1freq, to i2hrd, to i3pos, to i4mp, to k5vibf,- to k6vamp, to i7vfn]----- | * opcode : guiro--- --- --- * syntax : --- --- > ares guiro kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] [, ifreq1]--- --- --- * description : --- --- guiro is a semi-physical model of a guiro sound. It is one of--- the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/guiro.html>- -guiro :: (K k0) => [Irate] -> k0 -> Irate -> Arate-guiro i0init k1amp i2dettack = opcode "guiro" args- where args = [to k1amp, to i2dettack] ++ map to i0init----- | * opcode : mandol--- --- --- * syntax : --- --- > ares mandol kamp, kfreq, kpluck, kdetune, kgain, ksize, ifn [, iminfreq]--- --- --- * description : --- --- An emulation of a mandolin.--- --- --- * url : <http://www.csounds.com/manual/html/mandol.html>- -mandol ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Arate-mandol i0init k1amp k2freq k3pluck k4detune k5gain k6size i7fn- = opcode "mandol" args- where args- = [to k1amp, to k2freq, to k3pluck, to k4detune, to k5gain,- to k6size, to i7fn]- ++ map to i0init----- | * opcode : marimba--- --- --- * syntax : --- --- > ares marimba kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec --- > [, idoubles] [, itriples]--- --- --- * description : --- --- Audio output is a tone related to the striking of a wooden block--- as found in a marimba. The method is a physical model developed--- from Perry Cook but re-coded for Csound.--- --- --- * url : <http://www.csounds.com/manual/html/marimba.html>- -marimba ::- (K k0, K k1, K k2, K k3) =>- [Irate] ->- k0 ->- k1 ->- Irate -> Irate -> Irate -> k2 -> k3 -> Irate -> Irate -> Arate-marimba i0init k1amp k2freq i3hrd i4pos i5mp k6vibf k7vamp i8vibfn- i9dec = opcode "marimba" args- where args- = [to k1amp, to k2freq, to i3hrd, to i4pos, to i5mp, to k6vibf,- to k7vamp, to i8vibfn, to i9dec]- ++ map to i0init----- | * opcode : moog--- --- --- * syntax : --- --- > ares moog kamp, kfreq, kfiltq, kfiltrate, kvibf, kvamp, iafn, iwfn, ivfn--- --- --- * description : --- --- An emulation of a mini-Moog synthesizer.--- --- --- * url : <http://www.csounds.com/manual/html/moog.html>- -moog ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 ->- k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Irate -> Irate -> Arate-moog k0amp k1freq k2filtq k3filtrate k4vibf k5vamp i6afn i7wfn- i8vfn = opcode "moog" args- where args- = [to k0amp, to k1freq, to k2filtq, to k3filtrate, to k4vibf,- to k5vamp, to i6afn, to i7wfn, to i8vfn]----- | * opcode : sandpaper--- --- --- * syntax : --- --- > ares sandpaper iamp, idettack [, inum] [, idamp] [, imaxshake]--- --- --- * description : --- --- sandpaper is a semi-physical model of a sandpaper sound. It is--- one of the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/sandpaper.html>- -sandpaper :: [Irate] -> Irate -> Irate -> Arate-sandpaper i0init i1amp i2dettack = opcode "sandpaper" args- where args = [to i1amp, to i2dettack] ++ map to i0init----- | * opcode : sekere--- --- --- * syntax : --- --- > ares sekere iamp, idettack [, inum] [, idamp] [, imaxshake]--- --- --- * description : --- --- sekere is a semi-physical model of a sekere sound. It is one of--- the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/sekere.html>- -sekere :: [Irate] -> Irate -> Irate -> Arate-sekere i0init i1amp i2dettack = opcode "sekere" args- where args = [to i1amp, to i2dettack] ++ map to i0init----- | * opcode : shaker--- --- --- * syntax : --- --- > ares shaker kamp, kfreq, kbeans, kdamp, ktimes [, idecay]--- --- --- * description : --- --- Audio output is a tone related to the shaking of a maraca or--- similar gourd instrument. The method is a physically inspired--- model developed from Perry Cook, but re-coded for Csound.--- --- --- * url : <http://www.csounds.com/manual/html/shaker.html>- -shaker ::- (K k0, K k1, K k2, K k3, K k4) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> k4 -> Arate-shaker i0init k1amp k2freq k3beans k4damp k5times- = opcode "shaker" args- where args- = [to k1amp, to k2freq, to k3beans, to k4damp, to k5times] ++- map to i0init----- | * opcode : sleighbells--- --- --- * syntax : --- --- > ares sleighbells kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] --- > [, ifreq1] [, ifreq2]--- --- --- * description : --- --- sleighbells is a semi-physical model of a sleighbell sound. It--- is one of the PhISEM percussion opcodes. PhISEM (Physically--- Informed Stochastic Event Modeling) is an algorithmic approach--- for simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/sleighbells.html>- -sleighbells :: (K k0) => [Irate] -> k0 -> Irate -> Arate-sleighbells i0init k1amp i2dettack = opcode "sleighbells" args- where args = [to k1amp, to i2dettack] ++ map to i0init----- | * opcode : stix--- --- --- * syntax : --- --- > ares stix iamp, idettack [, inum] [, idamp] [, imaxshake]--- --- --- * description : --- --- stix is a semi-physical model of a stick sound. It is one of the--- PhISEM percussion opcodes. PhISEM (Physically Informed Stochastic--- Event Modeling) is an algorithmic approach for simulating--- collisions of multiple independent sound producing objects.--- --- --- * url : <http://www.csounds.com/manual/html/stix.html>- -stix :: [Irate] -> Irate -> Irate -> Arate-stix i0init i1amp i2dettack = opcode "stix" args- where args = [to i1amp, to i2dettack] ++ map to i0init----- | * opcode : tambourine--- --- --- * syntax : --- --- > ares tambourine kamp, idettack [, inum] [, idamp] [, imaxshake] [, ifreq] --- > [, ifreq1] [, ifreq2]--- --- --- * description : --- --- tambourine is a semi-physical model of a tambourine sound. It is--- one of the PhISEM percussion opcodes. PhISEM (Physically Informed--- Stochastic Event Modeling) is an algorithmic approach for--- simulating collisions of multiple independent sound producing--- objects.--- --- --- * url : <http://www.csounds.com/manual/html/tambourine.html>- -tambourine :: (K k0) => [Irate] -> k0 -> Irate -> Arate-tambourine i0init k1amp i2dettack = opcode "tambourine" args- where args = [to k1amp, to i2dettack] ++ map to i0init----- | * opcode : vibes--- --- --- * syntax : --- --- > ares vibes kamp, kfreq, ihrd, ipos, imp, kvibf, kvamp, ivibfn, idec--- --- --- * description : --- --- Audio output is a tone related to the striking of a metal block--- as found in a vibraphone. The method is a physical model--- developed from Perry Cook, but re-coded for Csound.--- --- --- * url : <http://www.csounds.com/manual/html/vibes.html>- -vibes ::- (K k0, K k1, K k2, K k3) =>- k0 ->- k1 ->- Irate -> Irate -> Irate -> k2 -> k3 -> Irate -> Irate -> Arate-vibes k0amp k1freq i2hrd i3pos i4mp k5vibf k6vamp i7vibfn i8dec- = opcode "vibes" args- where args- = [to k0amp, to k1freq, to i2hrd, to i3pos, to i4mp, to k5vibf,- to k6vamp, to i7vibfn, to i8dec]----- | * opcode : voice--- --- --- * syntax : --- --- > ares voice kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn--- --- --- * description : --- --- An emulation of a human voice.--- --- --- * url : <http://www.csounds.com/manual/html/voice.html>- -voice ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Irate -> Arate-voice k0amp k1freq k2phoneme k3form k4vibf k5vamp i6fn i7vfn- = opcode "voice" args- where args- = [to k0amp, to k1freq, to k2phoneme, to k3form, to k4vibf,- to k5vamp, to i6fn, to i7vfn]----- | * opcode : lorenz--- --- --- * syntax : --- --- > ax, ay, az lorenz ksv, krv, kbv, kh, ix, iy, iz, iskip [, iskipinit]--- --- --- * description : --- --- Implements the Lorenz system of equations. The Lorenz system is--- a chaotic-dynamic system which was originally used to simulate--- the motion of a particle in convection currents and simplified--- weather systems. Small differences in initial conditions rapidly--- lead to diverging values. This is sometimes expressed as the--- butterfly effect. If a butterfly flaps its wings in Australia, it--- will have an effect on the weather in Alaska. This system is one--- of the milestones in the development of chaos theory. It is--- useful as a chaotic audio source or as a low frequency modulation--- source.--- --- --- * url : <http://www.csounds.com/manual/html/lorenz.html>- -lorenz ::- (K k0, K k1, K k2, K k3) =>- [Irate] ->- k0 ->- k1 -> k2 -> k3 -> Irate -> Irate -> Irate -> Irate -> MultiOut-lorenz i0init k1sv k2rv k3bv k4h i5x i6y i7z i8skip- = opcode "lorenz" args- where args- = [to k1sv, to k2rv, to k3bv, to k4h, to i5x, to i6y, to i7z,- to i8skip]- ++ map to i0init----- | * opcode : planet--- --- --- * syntax : --- --- > ax, ay, az planet kmass1, kmass2, ksep, ix, iy, iz, ivx, ivy, ivz, idelta --- > [, ifriction] [, iskip]--- --- --- * description : --- --- planet simulates a planet orbiting in a binary star system. The--- outputs are the x, y and z coordinates of the orbiting planet. It--- is possible for the planet to achieve escape velocity by a close--- encounter with a star. This makes this system somewhat unstable.--- --- --- * url : <http://www.csounds.com/manual/html/planet.html>- -planet ::- (K k0, K k1, K k2) =>- [Irate] ->- k0 ->- k1 ->- k2 ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-planet i0init k1mass1 k2mass2 k3sep i4x i5y i6z i7vx i8vy i9vz- i10delta = opcode "planet" args- where args- = [to k1mass1, to k2mass2, to k3sep, to i4x, to i5y, to i6z,- to i7vx, to i8vy, to i9vz, to i10delta]- ++ map to i0init----- | * opcode : prepiano--- --- --- * syntax : --- --- > ares prepiano ifreq, iNS, iD, iK, --- > iT30,iB, kbcl, kbcr, imass, ifreq, iinit, ipos, ivel, isfreq, --- > isspread[, irattles, irubbers]--- > al,ar prepiano ifreq, iNS, iD, iK, --- > iT30,iB, kbcl, kbcr, imass, ifreq, iinit, ipos, ivel, isfreq, --- > isspread[, irattles, irubbers]--- --- --- * description : --- --- Audio output is a tone similar to a piano string, prepared with--- a number of rubbers and rattles. The method uses a physical model--- developed from solving the partial differential equation.--- --- --- * url : <http://www.csounds.com/manual/html/prepiano.html>- -prepiano ::- (K k0, K k1) =>- [Irate] ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- k0 ->- k1 ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-prepiano i0init i1freq i2NS i3D i4K i5T30 i6B k7bcl k8bcr i9mass- i10freq i11init i12pos i13vel i14sfreq i15sspread- = opcode "prepiano" args- where args- = [to i1freq, to i2NS, to i3D, to i4K, to i5T30, to i6B, to k7bcl,- to k8bcr, to i9mass, to i10freq, to i11init, to i12pos, to i13vel,- to i14sfreq, to i15sspread]- ++ map to i0init----- | * opcode : prepiano--- --- --- * syntax : --- --- > ares prepiano ifreq, iNS, iD, iK, --- > iT30,iB, kbcl, kbcr, imass, ifreq, iinit, ipos, ivel, isfreq, --- > isspread[, irattles, irubbers]--- > al,ar prepiano ifreq, iNS, iD, iK, --- > iT30,iB, kbcl, kbcr, imass, ifreq, iinit, ipos, ivel, isfreq, --- > isspread[, irattles, irubbers]--- --- --- * description : --- --- Audio output is a tone similar to a piano string, prepared with--- a number of rubbers and rattles. The method uses a physical model--- developed from solving the partial differential equation.--- --- --- * url : <http://www.csounds.com/manual/html/prepiano.html>- -prepianoA ::- (K k0, K k1) =>- [Irate] ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- k0 ->- k1 ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-prepianoA i0init i1freq i2NS i3D i4K i5T30 i6B k7bcl k8bcr i9mass- i10freq i11init i12pos i13vel i14sfreq i15sspread- = opcode "prepiano" args- where args- = [to i1freq, to i2NS, to i3D, to i4K, to i5T30, to i6B, to k7bcl,- to k8bcr, to i9mass, to i10freq, to i11init, to i12pos, to i13vel,- to i14sfreq, to i15sspread]- ++ map to i0init----- | * opcode : mandel--- --- --- * syntax : --- --- > kiter, koutrig mandel ktrig, kx, ky, kmaxIter--- --- --- * description : --- --- Returns the number of iterations corresponding to a given point--- of complex plane by applying the Mandelbrot set formula.--- --- --- * url : <http://www.csounds.com/manual/html/mandel.html>- -mandel ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> k3 -> MultiOut-mandel k0trig k1x k2y k3maxIter = opcode "mandel" args- where args = [to k0trig, to k1x, to k2y, to k3maxIter]----- | * opcode : chuap--- --- --- * syntax : --- --- > aI3, aV2, aV1 chuap kL, kR0, kC1, kG, kGa, kGb, kE, kC2, iI3, iV2, iV1, ktime_step--- --- --- * description : --- --- Simulates Chua's oscillator, an LRC oscillator with an active--- resistor, proved capable of bifurcation and chaotic attractors,--- with k-rate control of circuit elements.--- --- --- * url : <http://www.csounds.com/manual/html/chuap.html>- -chuap ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7, K k8) =>- k0 ->- k1 ->- k2 ->- k3 ->- k4 -> k5 -> k6 -> k7 -> Irate -> Irate -> Irate -> k8 -> MultiOut-chuap k0L k1R0 k2C1 k3G k4Ga k5Gb k6E k7C2 i8I3 i9V2 i10V1- k11time_step = opcode "chuap" args- where args- = [to k0L, to k1R0, to k2C1, to k3G, to k4Ga, to k5Gb, to k6E,- to k7C2, to i8I3, to i9V2, to i10V1, to k11time_step]
− src/CsoundExpr/Opcodes/Siggen/Noise.hs
@@ -1,2725 +0,0 @@--- | Random (Noise) Generators-module CsoundExpr.Opcodes.Siggen.Noise- (bexprndA',- bexprndA,- bexprndI',- bexprndI,- bexprndK',- bexprndK,- cauchyA',- cauchyA,- cauchyI',- cauchyI,- cauchyK',- cauchyK,- cuserrndA',- cuserrndA,- cuserrndI',- cuserrndI,- cuserrndK',- cuserrndK,- duserrndA',- duserrndA,- duserrndI',- duserrndI,- duserrndK',- duserrndK,- exprandA',- exprandA,- exprandI',- exprandI,- exprandK',- exprandK,- gaussA',- gaussA,- gaussI',- gaussI,- gaussK',- gaussK,- linrandA',- linrandA,- linrandI',- linrandI,- linrandK',- linrandK,- noise',- noise,- pcauchyA',- pcauchyA,- pcauchyI',- pcauchyI,- pcauchyK',- pcauchyK,- pinkish',- pinkish,- poissonA',- poissonA,- poissonI',- poissonI,- poissonK',- poissonK,- randA,- randK,- randhA,- randhK,- randiA,- randiK,- rnd31A',- rnd31A,- rnd31I',- rnd31I,- rnd31K',- rnd31K,- randomA',- randomA,- randomI',- randomI,- randomK',- randomK,- randomhA',- randomhA,- randomhK',- randomhK,- randomiA',- randomiA,- randomiK',- randomiK,- trirandA',- trirandA,- trirandI',- trirandI,- trirandK',- trirandK,- unirandA',- unirandA,- unirandI',- unirandI,- unirandK',- unirandK,- urdA',- urdA,- urdI',- urdI,- urdK',- urdK,- weibullA',- weibullA,- weibullI',- weibullI,- weibullK',- weibullK,- jitter',- jitter,- jitter2',- jitter2,- trandom',- trandom)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : bexprnd--- --- --- * syntax : --- --- > ares bexprnd krange--- > ires bexprnd krange--- > kres bexprnd krange--- --- --- * description : --- --- Exponential distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/bexprnd.html>- -bexprndA' :: (K k0) => k0 -> Arate-bexprndA' k0range = opcode "bexprnd" args- where args = [to k0range]----- | * opcode : bexprnd--- --- --- * syntax : --- --- > ares bexprnd krange--- > ires bexprnd krange--- > kres bexprnd krange--- --- --- * description : --- --- Exponential distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/bexprnd.html>- -bexprndA :: (K k0) => k0 -> SideEffect Arate-bexprndA k0range = opcode "bexprnd" args- where args = [to k0range]----- | * opcode : bexprnd--- --- --- * syntax : --- --- > ares bexprnd krange--- > ires bexprnd krange--- > kres bexprnd krange--- --- --- * description : --- --- Exponential distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/bexprnd.html>- -bexprndI' :: (K k0) => k0 -> Irate-bexprndI' k0range = opcode "bexprnd" args- where args = [to k0range]----- | * opcode : bexprnd--- --- --- * syntax : --- --- > ares bexprnd krange--- > ires bexprnd krange--- > kres bexprnd krange--- --- --- * description : --- --- Exponential distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/bexprnd.html>- -bexprndI :: (K k0) => k0 -> SideEffect Irate-bexprndI k0range = opcode "bexprnd" args- where args = [to k0range]----- | * opcode : bexprnd--- --- --- * syntax : --- --- > ares bexprnd krange--- > ires bexprnd krange--- > kres bexprnd krange--- --- --- * description : --- --- Exponential distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/bexprnd.html>- -bexprndK' :: (K k0) => k0 -> Krate-bexprndK' k0range = opcode "bexprnd" args- where args = [to k0range]----- | * opcode : bexprnd--- --- --- * syntax : --- --- > ares bexprnd krange--- > ires bexprnd krange--- > kres bexprnd krange--- --- --- * description : --- --- Exponential distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/bexprnd.html>- -bexprndK :: (K k0) => k0 -> SideEffect Krate-bexprndK k0range = opcode "bexprnd" args- where args = [to k0range]----- | * opcode : cauchy--- --- --- * syntax : --- --- > ares cauchy kalpha--- > ires cauchy kalpha--- > kres cauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator. This is an x-class--- noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/cauchy.html>- -cauchyA' :: (K k0) => k0 -> Arate-cauchyA' k0alpha = opcode "cauchy" args- where args = [to k0alpha]----- | * opcode : cauchy--- --- --- * syntax : --- --- > ares cauchy kalpha--- > ires cauchy kalpha--- > kres cauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator. This is an x-class--- noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/cauchy.html>- -cauchyA :: (K k0) => k0 -> SideEffect Arate-cauchyA k0alpha = opcode "cauchy" args- where args = [to k0alpha]----- | * opcode : cauchy--- --- --- * syntax : --- --- > ares cauchy kalpha--- > ires cauchy kalpha--- > kres cauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator. This is an x-class--- noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/cauchy.html>- -cauchyI' :: (K k0) => k0 -> Irate-cauchyI' k0alpha = opcode "cauchy" args- where args = [to k0alpha]----- | * opcode : cauchy--- --- --- * syntax : --- --- > ares cauchy kalpha--- > ires cauchy kalpha--- > kres cauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator. This is an x-class--- noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/cauchy.html>- -cauchyI :: (K k0) => k0 -> SideEffect Irate-cauchyI k0alpha = opcode "cauchy" args- where args = [to k0alpha]----- | * opcode : cauchy--- --- --- * syntax : --- --- > ares cauchy kalpha--- > ires cauchy kalpha--- > kres cauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator. This is an x-class--- noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/cauchy.html>- -cauchyK' :: (K k0) => k0 -> Krate-cauchyK' k0alpha = opcode "cauchy" args- where args = [to k0alpha]----- | * opcode : cauchy--- --- --- * syntax : --- --- > ares cauchy kalpha--- > ires cauchy kalpha--- > kres cauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator. This is an x-class--- noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/cauchy.html>- -cauchyK :: (K k0) => k0 -> SideEffect Krate-cauchyK k0alpha = opcode "cauchy" args- where args = [to k0alpha]----- | * opcode : cuserrnd--- --- --- * syntax : --- --- > aout cuserrnd kmin, kmax, ktableNum--- > iout cuserrnd imin, imax, itableNum--- > kout cuserrnd kmin, kmax, ktableNum--- --- --- * description : --- --- Continuous USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/cuserrnd.html>- -cuserrndA' :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Arate-cuserrndA' k0min k1max k2tableNum = opcode "cuserrnd" args- where args = [to k0min, to k1max, to k2tableNum]----- | * opcode : cuserrnd--- --- --- * syntax : --- --- > aout cuserrnd kmin, kmax, ktableNum--- > iout cuserrnd imin, imax, itableNum--- > kout cuserrnd kmin, kmax, ktableNum--- --- --- * description : --- --- Continuous USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/cuserrnd.html>- -cuserrndA ::- (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SideEffect Arate-cuserrndA k0min k1max k2tableNum = opcode "cuserrnd" args- where args = [to k0min, to k1max, to k2tableNum]----- | * opcode : cuserrnd--- --- --- * syntax : --- --- > aout cuserrnd kmin, kmax, ktableNum--- > iout cuserrnd imin, imax, itableNum--- > kout cuserrnd kmin, kmax, ktableNum--- --- --- * description : --- --- Continuous USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/cuserrnd.html>- -cuserrndI' :: Irate -> Irate -> Irate -> Irate-cuserrndI' i0min i1max i2tableNum = opcode "cuserrnd" args- where args = [to i0min, to i1max, to i2tableNum]----- | * opcode : cuserrnd--- --- --- * syntax : --- --- > aout cuserrnd kmin, kmax, ktableNum--- > iout cuserrnd imin, imax, itableNum--- > kout cuserrnd kmin, kmax, ktableNum--- --- --- * description : --- --- Continuous USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/cuserrnd.html>- -cuserrndI :: Irate -> Irate -> Irate -> SideEffect Irate-cuserrndI i0min i1max i2tableNum = opcode "cuserrnd" args- where args = [to i0min, to i1max, to i2tableNum]----- | * opcode : cuserrnd--- --- --- * syntax : --- --- > aout cuserrnd kmin, kmax, ktableNum--- > iout cuserrnd imin, imax, itableNum--- > kout cuserrnd kmin, kmax, ktableNum--- --- --- * description : --- --- Continuous USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/cuserrnd.html>- -cuserrndK' :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-cuserrndK' k0min k1max k2tableNum = opcode "cuserrnd" args- where args = [to k0min, to k1max, to k2tableNum]----- | * opcode : cuserrnd--- --- --- * syntax : --- --- > aout cuserrnd kmin, kmax, ktableNum--- > iout cuserrnd imin, imax, itableNum--- > kout cuserrnd kmin, kmax, ktableNum--- --- --- * description : --- --- Continuous USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/cuserrnd.html>- -cuserrndK ::- (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SideEffect Krate-cuserrndK k0min k1max k2tableNum = opcode "cuserrnd" args- where args = [to k0min, to k1max, to k2tableNum]----- | * opcode : duserrnd--- --- --- * syntax : --- --- > aout duserrnd ktableNum--- > iout duserrnd itableNum--- > kout duserrnd ktableNum--- --- --- * description : --- --- Discrete USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/duserrnd.html>- -duserrndA' :: (K k0) => k0 -> Arate-duserrndA' k0tableNum = opcode "duserrnd" args- where args = [to k0tableNum]----- | * opcode : duserrnd--- --- --- * syntax : --- --- > aout duserrnd ktableNum--- > iout duserrnd itableNum--- > kout duserrnd ktableNum--- --- --- * description : --- --- Discrete USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/duserrnd.html>- -duserrndA :: (K k0) => k0 -> SideEffect Arate-duserrndA k0tableNum = opcode "duserrnd" args- where args = [to k0tableNum]----- | * opcode : duserrnd--- --- --- * syntax : --- --- > aout duserrnd ktableNum--- > iout duserrnd itableNum--- > kout duserrnd ktableNum--- --- --- * description : --- --- Discrete USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/duserrnd.html>- -duserrndI' :: Irate -> Irate-duserrndI' i0tableNum = opcode "duserrnd" args- where args = [to i0tableNum]----- | * opcode : duserrnd--- --- --- * syntax : --- --- > aout duserrnd ktableNum--- > iout duserrnd itableNum--- > kout duserrnd ktableNum--- --- --- * description : --- --- Discrete USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/duserrnd.html>- -duserrndI :: Irate -> SideEffect Irate-duserrndI i0tableNum = opcode "duserrnd" args- where args = [to i0tableNum]----- | * opcode : duserrnd--- --- --- * syntax : --- --- > aout duserrnd ktableNum--- > iout duserrnd itableNum--- > kout duserrnd ktableNum--- --- --- * description : --- --- Discrete USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/duserrnd.html>- -duserrndK' :: (K k0) => k0 -> Krate-duserrndK' k0tableNum = opcode "duserrnd" args- where args = [to k0tableNum]----- | * opcode : duserrnd--- --- --- * syntax : --- --- > aout duserrnd ktableNum--- > iout duserrnd itableNum--- > kout duserrnd ktableNum--- --- --- * description : --- --- Discrete USER-defined-distribution RaNDom generator.--- --- --- * url : <http://www.csounds.com/manual/html/duserrnd.html>- -duserrndK :: (K k0) => k0 -> SideEffect Krate-duserrndK k0tableNum = opcode "duserrnd" args- where args = [to k0tableNum]----- | * opcode : exprand--- --- --- * syntax : --- --- > ares exprand klambda--- > ires exprand klambda--- > kres exprand klambda--- --- --- * description : --- --- Exponential distribution random number generator (positive--- values only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/exprand.html>- -exprandA' :: (K k0) => k0 -> Arate-exprandA' k0lambda = opcode "exprand" args- where args = [to k0lambda]----- | * opcode : exprand--- --- --- * syntax : --- --- > ares exprand klambda--- > ires exprand klambda--- > kres exprand klambda--- --- --- * description : --- --- Exponential distribution random number generator (positive--- values only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/exprand.html>- -exprandA :: (K k0) => k0 -> SideEffect Arate-exprandA k0lambda = opcode "exprand" args- where args = [to k0lambda]----- | * opcode : exprand--- --- --- * syntax : --- --- > ares exprand klambda--- > ires exprand klambda--- > kres exprand klambda--- --- --- * description : --- --- Exponential distribution random number generator (positive--- values only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/exprand.html>- -exprandI' :: (K k0) => k0 -> Irate-exprandI' k0lambda = opcode "exprand" args- where args = [to k0lambda]----- | * opcode : exprand--- --- --- * syntax : --- --- > ares exprand klambda--- > ires exprand klambda--- > kres exprand klambda--- --- --- * description : --- --- Exponential distribution random number generator (positive--- values only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/exprand.html>- -exprandI :: (K k0) => k0 -> SideEffect Irate-exprandI k0lambda = opcode "exprand" args- where args = [to k0lambda]----- | * opcode : exprand--- --- --- * syntax : --- --- > ares exprand klambda--- > ires exprand klambda--- > kres exprand klambda--- --- --- * description : --- --- Exponential distribution random number generator (positive--- values only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/exprand.html>- -exprandK' :: (K k0) => k0 -> Krate-exprandK' k0lambda = opcode "exprand" args- where args = [to k0lambda]----- | * opcode : exprand--- --- --- * syntax : --- --- > ares exprand klambda--- > ires exprand klambda--- > kres exprand klambda--- --- --- * description : --- --- Exponential distribution random number generator (positive--- values only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/exprand.html>- -exprandK :: (K k0) => k0 -> SideEffect Krate-exprandK k0lambda = opcode "exprand" args- where args = [to k0lambda]----- | * opcode : gauss--- --- --- * syntax : --- --- > ares gauss krange--- > ires gauss krange--- > kres gauss krange--- --- --- * description : --- --- Gaussian distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/gauss.html>- -gaussA' :: (K k0) => k0 -> Arate-gaussA' k0range = opcode "gauss" args- where args = [to k0range]----- | * opcode : gauss--- --- --- * syntax : --- --- > ares gauss krange--- > ires gauss krange--- > kres gauss krange--- --- --- * description : --- --- Gaussian distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/gauss.html>- -gaussA :: (K k0) => k0 -> SideEffect Arate-gaussA k0range = opcode "gauss" args- where args = [to k0range]----- | * opcode : gauss--- --- --- * syntax : --- --- > ares gauss krange--- > ires gauss krange--- > kres gauss krange--- --- --- * description : --- --- Gaussian distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/gauss.html>- -gaussI' :: (K k0) => k0 -> Irate-gaussI' k0range = opcode "gauss" args- where args = [to k0range]----- | * opcode : gauss--- --- --- * syntax : --- --- > ares gauss krange--- > ires gauss krange--- > kres gauss krange--- --- --- * description : --- --- Gaussian distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/gauss.html>- -gaussI :: (K k0) => k0 -> SideEffect Irate-gaussI k0range = opcode "gauss" args- where args = [to k0range]----- | * opcode : gauss--- --- --- * syntax : --- --- > ares gauss krange--- > ires gauss krange--- > kres gauss krange--- --- --- * description : --- --- Gaussian distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/gauss.html>- -gaussK' :: (K k0) => k0 -> Krate-gaussK' k0range = opcode "gauss" args- where args = [to k0range]----- | * opcode : gauss--- --- --- * syntax : --- --- > ares gauss krange--- > ires gauss krange--- > kres gauss krange--- --- --- * description : --- --- Gaussian distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/gauss.html>- -gaussK :: (K k0) => k0 -> SideEffect Krate-gaussK k0range = opcode "gauss" args- where args = [to k0range]----- | * opcode : linrand--- --- --- * syntax : --- --- > ares linrand krange--- > ires linrand krange--- > kres linrand krange--- --- --- * description : --- --- Linear distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/linrand.html>- -linrandA' :: (K k0) => k0 -> Arate-linrandA' k0range = opcode "linrand" args- where args = [to k0range]----- | * opcode : linrand--- --- --- * syntax : --- --- > ares linrand krange--- > ires linrand krange--- > kres linrand krange--- --- --- * description : --- --- Linear distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/linrand.html>- -linrandA :: (K k0) => k0 -> SideEffect Arate-linrandA k0range = opcode "linrand" args- where args = [to k0range]----- | * opcode : linrand--- --- --- * syntax : --- --- > ares linrand krange--- > ires linrand krange--- > kres linrand krange--- --- --- * description : --- --- Linear distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/linrand.html>- -linrandI' :: (K k0) => k0 -> Irate-linrandI' k0range = opcode "linrand" args- where args = [to k0range]----- | * opcode : linrand--- --- --- * syntax : --- --- > ares linrand krange--- > ires linrand krange--- > kres linrand krange--- --- --- * description : --- --- Linear distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/linrand.html>- -linrandI :: (K k0) => k0 -> SideEffect Irate-linrandI k0range = opcode "linrand" args- where args = [to k0range]----- | * opcode : linrand--- --- --- * syntax : --- --- > ares linrand krange--- > ires linrand krange--- > kres linrand krange--- --- --- * description : --- --- Linear distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/linrand.html>- -linrandK' :: (K k0) => k0 -> Krate-linrandK' k0range = opcode "linrand" args- where args = [to k0range]----- | * opcode : linrand--- --- --- * syntax : --- --- > ares linrand krange--- > ires linrand krange--- > kres linrand krange--- --- --- * description : --- --- Linear distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/linrand.html>- -linrandK :: (K k0) => k0 -> SideEffect Krate-linrandK k0range = opcode "linrand" args- where args = [to k0range]----- | * opcode : noise--- --- --- * syntax : --- --- > ares noise xamp, kbeta--- --- --- * description : --- --- A white noise generator with an IIR lowpass filter.--- --- --- * url : <http://www.csounds.com/manual/html/noise.html>- -noise' :: (X x0, K k0) => x0 -> k0 -> Arate-noise' x0amp k1beta = opcode "noise" args- where args = [to x0amp, to k1beta]----- | * opcode : noise--- --- --- * syntax : --- --- > ares noise xamp, kbeta--- --- --- * description : --- --- A white noise generator with an IIR lowpass filter.--- --- --- * url : <http://www.csounds.com/manual/html/noise.html>- -noise :: (X x0, K k0) => x0 -> k0 -> SideEffect Arate-noise x0amp k1beta = opcode "noise" args- where args = [to x0amp, to k1beta]----- | * opcode : pcauchy--- --- --- * syntax : --- --- > ares pcauchy kalpha--- > ires pcauchy kalpha--- > kres pcauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/pcauchy.html>- -pcauchyA' :: (K k0) => k0 -> Arate-pcauchyA' k0alpha = opcode "pcauchy" args- where args = [to k0alpha]----- | * opcode : pcauchy--- --- --- * syntax : --- --- > ares pcauchy kalpha--- > ires pcauchy kalpha--- > kres pcauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/pcauchy.html>- -pcauchyA :: (K k0) => k0 -> SideEffect Arate-pcauchyA k0alpha = opcode "pcauchy" args- where args = [to k0alpha]----- | * opcode : pcauchy--- --- --- * syntax : --- --- > ares pcauchy kalpha--- > ires pcauchy kalpha--- > kres pcauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/pcauchy.html>- -pcauchyI' :: (K k0) => k0 -> Irate-pcauchyI' k0alpha = opcode "pcauchy" args- where args = [to k0alpha]----- | * opcode : pcauchy--- --- --- * syntax : --- --- > ares pcauchy kalpha--- > ires pcauchy kalpha--- > kres pcauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/pcauchy.html>- -pcauchyI :: (K k0) => k0 -> SideEffect Irate-pcauchyI k0alpha = opcode "pcauchy" args- where args = [to k0alpha]----- | * opcode : pcauchy--- --- --- * syntax : --- --- > ares pcauchy kalpha--- > ires pcauchy kalpha--- > kres pcauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/pcauchy.html>- -pcauchyK' :: (K k0) => k0 -> Krate-pcauchyK' k0alpha = opcode "pcauchy" args- where args = [to k0alpha]----- | * opcode : pcauchy--- --- --- * syntax : --- --- > ares pcauchy kalpha--- > ires pcauchy kalpha--- > kres pcauchy kalpha--- --- --- * description : --- --- Cauchy distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/pcauchy.html>- -pcauchyK :: (K k0) => k0 -> SideEffect Krate-pcauchyK k0alpha = opcode "pcauchy" args- where args = [to k0alpha]----- | * opcode : pinkish--- --- --- * syntax : --- --- > ares pinkish xin [, imethod] [, inumbands] [, iseed] [, iskip]--- --- --- * description : --- --- Generates approximate pink noise (-3dB/oct response) by one of--- two different methods:--- --- --- * url : <http://www.csounds.com/manual/html/pinkish.html>- -pinkish' :: (X x0) => [Irate] -> x0 -> Arate-pinkish' i0init x1in = opcode "pinkish" args- where args = [to x1in] ++ map to i0init----- | * opcode : pinkish--- --- --- * syntax : --- --- > ares pinkish xin [, imethod] [, inumbands] [, iseed] [, iskip]--- --- --- * description : --- --- Generates approximate pink noise (-3dB/oct response) by one of--- two different methods:--- --- --- * url : <http://www.csounds.com/manual/html/pinkish.html>- -pinkish :: (X x0) => [Irate] -> x0 -> SideEffect Arate-pinkish i0init x1in = opcode "pinkish" args- where args = [to x1in] ++ map to i0init----- | * opcode : poisson--- --- --- * syntax : --- --- > ares poisson klambda--- > ires poisson klambda--- > kres poisson klambda--- --- --- * description : --- --- Poisson distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/poisson.html>- -poissonA' :: (K k0) => k0 -> Arate-poissonA' k0lambda = opcode "poisson" args- where args = [to k0lambda]----- | * opcode : poisson--- --- --- * syntax : --- --- > ares poisson klambda--- > ires poisson klambda--- > kres poisson klambda--- --- --- * description : --- --- Poisson distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/poisson.html>- -poissonA :: (K k0) => k0 -> SideEffect Arate-poissonA k0lambda = opcode "poisson" args- where args = [to k0lambda]----- | * opcode : poisson--- --- --- * syntax : --- --- > ares poisson klambda--- > ires poisson klambda--- > kres poisson klambda--- --- --- * description : --- --- Poisson distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/poisson.html>- -poissonI' :: (K k0) => k0 -> Irate-poissonI' k0lambda = opcode "poisson" args- where args = [to k0lambda]----- | * opcode : poisson--- --- --- * syntax : --- --- > ares poisson klambda--- > ires poisson klambda--- > kres poisson klambda--- --- --- * description : --- --- Poisson distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/poisson.html>- -poissonI :: (K k0) => k0 -> SideEffect Irate-poissonI k0lambda = opcode "poisson" args- where args = [to k0lambda]----- | * opcode : poisson--- --- --- * syntax : --- --- > ares poisson klambda--- > ires poisson klambda--- > kres poisson klambda--- --- --- * description : --- --- Poisson distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/poisson.html>- -poissonK' :: (K k0) => k0 -> Krate-poissonK' k0lambda = opcode "poisson" args- where args = [to k0lambda]----- | * opcode : poisson--- --- --- * syntax : --- --- > ares poisson klambda--- > ires poisson klambda--- > kres poisson klambda--- --- --- * description : --- --- Poisson distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/poisson.html>- -poissonK :: (K k0) => k0 -> SideEffect Krate-poissonK k0lambda = opcode "poisson" args- where args = [to k0lambda]----- | * opcode : rand--- --- --- * syntax : --- --- > ares rand xamp [, iseed] [, isel] [, ioffset]--- > kres rand xamp [, iseed] [, isel] [, ioffset]--- --- --- * description : --- --- Output is a controlled random number series between -amp and--- +amp--- --- --- * url : <http://www.csounds.com/manual/html/rand.html>- -randA :: (X x0) => [Irate] -> x0 -> Arate-randA i0init x1amp = opcode "rand" args- where args = [to x1amp] ++ map to i0init----- | * opcode : rand--- --- --- * syntax : --- --- > ares rand xamp [, iseed] [, isel] [, ioffset]--- > kres rand xamp [, iseed] [, isel] [, ioffset]--- --- --- * description : --- --- Output is a controlled random number series between -amp and--- +amp--- --- --- * url : <http://www.csounds.com/manual/html/rand.html>- -randK :: (X x0) => [Irate] -> x0 -> Krate-randK i0init x1amp = opcode "rand" args- where args = [to x1amp] ++ map to i0init----- | * opcode : randh--- --- --- * syntax : --- --- > ares randh xamp, xcps [, iseed] [, isize] [, ioffset]--- > kres randh kamp, kcps [, iseed] [, isize] [, ioffset]--- --- --- * description : --- --- Generates random numbers and holds them for a period of time.--- --- --- * url : <http://www.csounds.com/manual/html/randh.html>- -randhA :: (X x0, X x1) => [Irate] -> x0 -> x1 -> Arate-randhA i0init x1amp x2cps = opcode "randh" args- where args = [to x1amp, to x2cps] ++ map to i0init----- | * opcode : randh--- --- --- * syntax : --- --- > ares randh xamp, xcps [, iseed] [, isize] [, ioffset]--- > kres randh kamp, kcps [, iseed] [, isize] [, ioffset]--- --- --- * description : --- --- Generates random numbers and holds them for a period of time.--- --- --- * url : <http://www.csounds.com/manual/html/randh.html>- -randhK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-randhK i0init k1amp k2cps = opcode "randh" args- where args = [to k1amp, to k2cps] ++ map to i0init----- | * opcode : randi--- --- --- * syntax : --- --- > ares randi xamp, xcps [, iseed] [, isize] [, ioffset]--- > kres randi kamp, kcps [, iseed] [, isize] [, ioffset]--- --- --- * description : --- --- Generates a controlled random number series with interpolation--- between each new number.--- --- --- * url : <http://www.csounds.com/manual/html/randi.html>- -randiA :: (X x0, X x1) => [Irate] -> x0 -> x1 -> Arate-randiA i0init x1amp x2cps = opcode "randi" args- where args = [to x1amp, to x2cps] ++ map to i0init----- | * opcode : randi--- --- --- * syntax : --- --- > ares randi xamp, xcps [, iseed] [, isize] [, ioffset]--- > kres randi kamp, kcps [, iseed] [, isize] [, ioffset]--- --- --- * description : --- --- Generates a controlled random number series with interpolation--- between each new number.--- --- --- * url : <http://www.csounds.com/manual/html/randi.html>- -randiK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-randiK i0init k1amp k2cps = opcode "randi" args- where args = [to k1amp, to k2cps] ++ map to i0init----- | * opcode : rnd31--- --- --- * syntax : --- --- > ax rnd31 kscl, krpow [, iseed]--- > ix rnd31 iscl, irpow [, iseed]--- > kx rnd31 kscl, krpow [, iseed]--- --- --- * description : --- --- 31-bit bipolar random opcodes with controllable distribution.--- These units are portable, i.e. using the same seed value will--- generate the same random sequence on all systems. The--- distribution of generated random numbers can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/rnd31.html>- -rnd31A' :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Arate-rnd31A' i0init k1scl k2rpow = opcode "rnd31" args- where args = [to k1scl, to k2rpow] ++ map to i0init----- | * opcode : rnd31--- --- --- * syntax : --- --- > ax rnd31 kscl, krpow [, iseed]--- > ix rnd31 iscl, irpow [, iseed]--- > kx rnd31 kscl, krpow [, iseed]--- --- --- * description : --- --- 31-bit bipolar random opcodes with controllable distribution.--- These units are portable, i.e. using the same seed value will--- generate the same random sequence on all systems. The--- distribution of generated random numbers can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/rnd31.html>- -rnd31A :: (K k0, K k1) => [Irate] -> k0 -> k1 -> SideEffect Arate-rnd31A i0init k1scl k2rpow = opcode "rnd31" args- where args = [to k1scl, to k2rpow] ++ map to i0init----- | * opcode : rnd31--- --- --- * syntax : --- --- > ax rnd31 kscl, krpow [, iseed]--- > ix rnd31 iscl, irpow [, iseed]--- > kx rnd31 kscl, krpow [, iseed]--- --- --- * description : --- --- 31-bit bipolar random opcodes with controllable distribution.--- These units are portable, i.e. using the same seed value will--- generate the same random sequence on all systems. The--- distribution of generated random numbers can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/rnd31.html>- -rnd31I' :: [Irate] -> Irate -> Irate -> Irate-rnd31I' i0init i1scl i2rpow = opcode "rnd31" args- where args = [to i1scl, to i2rpow] ++ map to i0init----- | * opcode : rnd31--- --- --- * syntax : --- --- > ax rnd31 kscl, krpow [, iseed]--- > ix rnd31 iscl, irpow [, iseed]--- > kx rnd31 kscl, krpow [, iseed]--- --- --- * description : --- --- 31-bit bipolar random opcodes with controllable distribution.--- These units are portable, i.e. using the same seed value will--- generate the same random sequence on all systems. The--- distribution of generated random numbers can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/rnd31.html>- -rnd31I :: [Irate] -> Irate -> Irate -> SideEffect Irate-rnd31I i0init i1scl i2rpow = opcode "rnd31" args- where args = [to i1scl, to i2rpow] ++ map to i0init----- | * opcode : rnd31--- --- --- * syntax : --- --- > ax rnd31 kscl, krpow [, iseed]--- > ix rnd31 iscl, irpow [, iseed]--- > kx rnd31 kscl, krpow [, iseed]--- --- --- * description : --- --- 31-bit bipolar random opcodes with controllable distribution.--- These units are portable, i.e. using the same seed value will--- generate the same random sequence on all systems. The--- distribution of generated random numbers can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/rnd31.html>- -rnd31K' :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-rnd31K' i0init k1scl k2rpow = opcode "rnd31" args- where args = [to k1scl, to k2rpow] ++ map to i0init----- | * opcode : rnd31--- --- --- * syntax : --- --- > ax rnd31 kscl, krpow [, iseed]--- > ix rnd31 iscl, irpow [, iseed]--- > kx rnd31 kscl, krpow [, iseed]--- --- --- * description : --- --- 31-bit bipolar random opcodes with controllable distribution.--- These units are portable, i.e. using the same seed value will--- generate the same random sequence on all systems. The--- distribution of generated random numbers can be varied at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/rnd31.html>- -rnd31K :: (K k0, K k1) => [Irate] -> k0 -> k1 -> SideEffect Krate-rnd31K i0init k1scl k2rpow = opcode "rnd31" args- where args = [to k1scl, to k2rpow] ++ map to i0init----- | * opcode : random--- --- --- * syntax : --- --- > ares random kmin, kmax--- > ires random imin, imax--- > kres random kmin, kmax--- --- --- * description : --- --- Generates is a controlled pseudo-random number series between--- min and max values.--- --- --- * url : <http://www.csounds.com/manual/html/random.html>- -randomA' :: (K k0, K k1) => k0 -> k1 -> Arate-randomA' k0min k1max = opcode "random" args- where args = [to k0min, to k1max]----- | * opcode : random--- --- --- * syntax : --- --- > ares random kmin, kmax--- > ires random imin, imax--- > kres random kmin, kmax--- --- --- * description : --- --- Generates is a controlled pseudo-random number series between--- min and max values.--- --- --- * url : <http://www.csounds.com/manual/html/random.html>- -randomA :: (K k0, K k1) => k0 -> k1 -> SideEffect Arate-randomA k0min k1max = opcode "random" args- where args = [to k0min, to k1max]----- | * opcode : random--- --- --- * syntax : --- --- > ares random kmin, kmax--- > ires random imin, imax--- > kres random kmin, kmax--- --- --- * description : --- --- Generates is a controlled pseudo-random number series between--- min and max values.--- --- --- * url : <http://www.csounds.com/manual/html/random.html>- -randomI' :: Irate -> Irate -> Irate-randomI' i0min i1max = opcode "random" args- where args = [to i0min, to i1max]----- | * opcode : random--- --- --- * syntax : --- --- > ares random kmin, kmax--- > ires random imin, imax--- > kres random kmin, kmax--- --- --- * description : --- --- Generates is a controlled pseudo-random number series between--- min and max values.--- --- --- * url : <http://www.csounds.com/manual/html/random.html>- -randomI :: Irate -> Irate -> SideEffect Irate-randomI i0min i1max = opcode "random" args- where args = [to i0min, to i1max]----- | * opcode : random--- --- --- * syntax : --- --- > ares random kmin, kmax--- > ires random imin, imax--- > kres random kmin, kmax--- --- --- * description : --- --- Generates is a controlled pseudo-random number series between--- min and max values.--- --- --- * url : <http://www.csounds.com/manual/html/random.html>- -randomK' :: (K k0, K k1) => k0 -> k1 -> Krate-randomK' k0min k1max = opcode "random" args- where args = [to k0min, to k1max]----- | * opcode : random--- --- --- * syntax : --- --- > ares random kmin, kmax--- > ires random imin, imax--- > kres random kmin, kmax--- --- --- * description : --- --- Generates is a controlled pseudo-random number series between--- min and max values.--- --- --- * url : <http://www.csounds.com/manual/html/random.html>- -randomK :: (K k0, K k1) => k0 -> k1 -> SideEffect Krate-randomK k0min k1max = opcode "random" args- where args = [to k0min, to k1max]----- | * opcode : randomh--- --- --- * syntax : --- --- > ares randomh kmin, kmax, acps--- > kres randomh kmin, kmax, kcps--- --- --- * description : --- --- Generates random numbers with a user-defined limit and holds--- them for a period of time.--- --- --- * url : <http://www.csounds.com/manual/html/randomh.html>- -randomhA' :: (K k0, K k1) => k0 -> k1 -> Arate -> Arate-randomhA' k0min k1max a2cps = opcode "randomh" args- where args = [to k0min, to k1max, to a2cps]----- | * opcode : randomh--- --- --- * syntax : --- --- > ares randomh kmin, kmax, acps--- > kres randomh kmin, kmax, kcps--- --- --- * description : --- --- Generates random numbers with a user-defined limit and holds--- them for a period of time.--- --- --- * url : <http://www.csounds.com/manual/html/randomh.html>- -randomhA :: (K k0, K k1) => k0 -> k1 -> Arate -> SideEffect Arate-randomhA k0min k1max a2cps = opcode "randomh" args- where args = [to k0min, to k1max, to a2cps]----- | * opcode : randomh--- --- --- * syntax : --- --- > ares randomh kmin, kmax, acps--- > kres randomh kmin, kmax, kcps--- --- --- * description : --- --- Generates random numbers with a user-defined limit and holds--- them for a period of time.--- --- --- * url : <http://www.csounds.com/manual/html/randomh.html>- -randomhK' :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-randomhK' k0min k1max k2cps = opcode "randomh" args- where args = [to k0min, to k1max, to k2cps]----- | * opcode : randomh--- --- --- * syntax : --- --- > ares randomh kmin, kmax, acps--- > kres randomh kmin, kmax, kcps--- --- --- * description : --- --- Generates random numbers with a user-defined limit and holds--- them for a period of time.--- --- --- * url : <http://www.csounds.com/manual/html/randomh.html>- -randomhK ::- (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SideEffect Krate-randomhK k0min k1max k2cps = opcode "randomh" args- where args = [to k0min, to k1max, to k2cps]----- | * opcode : randomi--- --- --- * syntax : --- --- > ares randomi kmin, kmax, acps--- > kres randomi kmin, kmax, kcps--- --- --- * description : --- --- Generates a user-controlled random number series with--- interpolation between each new number.--- --- --- * url : <http://www.csounds.com/manual/html/randomi.html>- -randomiA' :: (K k0, K k1) => k0 -> k1 -> Arate -> Arate-randomiA' k0min k1max a2cps = opcode "randomi" args- where args = [to k0min, to k1max, to a2cps]----- | * opcode : randomi--- --- --- * syntax : --- --- > ares randomi kmin, kmax, acps--- > kres randomi kmin, kmax, kcps--- --- --- * description : --- --- Generates a user-controlled random number series with--- interpolation between each new number.--- --- --- * url : <http://www.csounds.com/manual/html/randomi.html>- -randomiA :: (K k0, K k1) => k0 -> k1 -> Arate -> SideEffect Arate-randomiA k0min k1max a2cps = opcode "randomi" args- where args = [to k0min, to k1max, to a2cps]----- | * opcode : randomi--- --- --- * syntax : --- --- > ares randomi kmin, kmax, acps--- > kres randomi kmin, kmax, kcps--- --- --- * description : --- --- Generates a user-controlled random number series with--- interpolation between each new number.--- --- --- * url : <http://www.csounds.com/manual/html/randomi.html>- -randomiK' :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-randomiK' k0min k1max k2cps = opcode "randomi" args- where args = [to k0min, to k1max, to k2cps]----- | * opcode : randomi--- --- --- * syntax : --- --- > ares randomi kmin, kmax, acps--- > kres randomi kmin, kmax, kcps--- --- --- * description : --- --- Generates a user-controlled random number series with--- interpolation between each new number.--- --- --- * url : <http://www.csounds.com/manual/html/randomi.html>- -randomiK ::- (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SideEffect Krate-randomiK k0min k1max k2cps = opcode "randomi" args- where args = [to k0min, to k1max, to k2cps]----- | * opcode : trirand--- --- --- * syntax : --- --- > ares trirand krange--- > ires trirand krange--- > kres trirand krange--- --- --- * description : --- --- Triangular distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/trirand.html>- -trirandA' :: (K k0) => k0 -> Arate-trirandA' k0range = opcode "trirand" args- where args = [to k0range]----- | * opcode : trirand--- --- --- * syntax : --- --- > ares trirand krange--- > ires trirand krange--- > kres trirand krange--- --- --- * description : --- --- Triangular distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/trirand.html>- -trirandA :: (K k0) => k0 -> SideEffect Arate-trirandA k0range = opcode "trirand" args- where args = [to k0range]----- | * opcode : trirand--- --- --- * syntax : --- --- > ares trirand krange--- > ires trirand krange--- > kres trirand krange--- --- --- * description : --- --- Triangular distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/trirand.html>- -trirandI' :: (K k0) => k0 -> Irate-trirandI' k0range = opcode "trirand" args- where args = [to k0range]----- | * opcode : trirand--- --- --- * syntax : --- --- > ares trirand krange--- > ires trirand krange--- > kres trirand krange--- --- --- * description : --- --- Triangular distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/trirand.html>- -trirandI :: (K k0) => k0 -> SideEffect Irate-trirandI k0range = opcode "trirand" args- where args = [to k0range]----- | * opcode : trirand--- --- --- * syntax : --- --- > ares trirand krange--- > ires trirand krange--- > kres trirand krange--- --- --- * description : --- --- Triangular distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/trirand.html>- -trirandK' :: (K k0) => k0 -> Krate-trirandK' k0range = opcode "trirand" args- where args = [to k0range]----- | * opcode : trirand--- --- --- * syntax : --- --- > ares trirand krange--- > ires trirand krange--- > kres trirand krange--- --- --- * description : --- --- Triangular distribution random number generator. This is an--- x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/trirand.html>- -trirandK :: (K k0) => k0 -> SideEffect Krate-trirandK k0range = opcode "trirand" args- where args = [to k0range]----- | * opcode : unirand--- --- --- * syntax : --- --- > ares unirand krange--- > ires unirand krange--- > kres unirand krange--- --- --- * description : --- --- Uniform distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/unirand.html>- -unirandA' :: (K k0) => k0 -> Arate-unirandA' k0range = opcode "unirand" args- where args = [to k0range]----- | * opcode : unirand--- --- --- * syntax : --- --- > ares unirand krange--- > ires unirand krange--- > kres unirand krange--- --- --- * description : --- --- Uniform distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/unirand.html>- -unirandA :: (K k0) => k0 -> SideEffect Arate-unirandA k0range = opcode "unirand" args- where args = [to k0range]----- | * opcode : unirand--- --- --- * syntax : --- --- > ares unirand krange--- > ires unirand krange--- > kres unirand krange--- --- --- * description : --- --- Uniform distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/unirand.html>- -unirandI' :: (K k0) => k0 -> Irate-unirandI' k0range = opcode "unirand" args- where args = [to k0range]----- | * opcode : unirand--- --- --- * syntax : --- --- > ares unirand krange--- > ires unirand krange--- > kres unirand krange--- --- --- * description : --- --- Uniform distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/unirand.html>- -unirandI :: (K k0) => k0 -> SideEffect Irate-unirandI k0range = opcode "unirand" args- where args = [to k0range]----- | * opcode : unirand--- --- --- * syntax : --- --- > ares unirand krange--- > ires unirand krange--- > kres unirand krange--- --- --- * description : --- --- Uniform distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/unirand.html>- -unirandK' :: (K k0) => k0 -> Krate-unirandK' k0range = opcode "unirand" args- where args = [to k0range]----- | * opcode : unirand--- --- --- * syntax : --- --- > ares unirand krange--- > ires unirand krange--- > kres unirand krange--- --- --- * description : --- --- Uniform distribution random number generator (positive values--- only). This is an x-class noise generator.--- --- --- * url : <http://www.csounds.com/manual/html/unirand.html>- -unirandK :: (K k0) => k0 -> SideEffect Krate-unirandK k0range = opcode "unirand" args- where args = [to k0range]----- | * opcode : urd--- --- --- * syntax : --- --- > aout = urd(ktableNum)--- > iout = urd(itableNum)--- > kout = urd(ktableNum)--- --- --- * description : --- --- A discrete user-defined-distribution random generator that can--- be used as a function.--- --- --- * url : <http://www.csounds.com/manual/html/urd.html>- -urdA' :: (X x0) => x0 -> x0-urdA' x0sig = prefixOperation "urd" args- where args = [to x0sig]----- | * opcode : urd--- --- --- * syntax : --- --- > aout = urd(ktableNum)--- > iout = urd(itableNum)--- > kout = urd(ktableNum)--- --- --- * description : --- --- A discrete user-defined-distribution random generator that can--- be used as a function.--- --- --- * url : <http://www.csounds.com/manual/html/urd.html>- -urdA :: (X x0) => x0 -> x0-urdA x0sig = prefixOperation "urd" args- where args = [to x0sig]----- | * opcode : urd--- --- --- * syntax : --- --- > aout = urd(ktableNum)--- > iout = urd(itableNum)--- > kout = urd(ktableNum)--- --- --- * description : --- --- A discrete user-defined-distribution random generator that can--- be used as a function.--- --- --- * url : <http://www.csounds.com/manual/html/urd.html>- -urdI' :: (X x0) => x0 -> x0-urdI' x0sig = prefixOperation "urd" args- where args = [to x0sig]----- | * opcode : urd--- --- --- * syntax : --- --- > aout = urd(ktableNum)--- > iout = urd(itableNum)--- > kout = urd(ktableNum)--- --- --- * description : --- --- A discrete user-defined-distribution random generator that can--- be used as a function.--- --- --- * url : <http://www.csounds.com/manual/html/urd.html>- -urdI :: (X x0) => x0 -> x0-urdI x0sig = prefixOperation "urd" args- where args = [to x0sig]----- | * opcode : urd--- --- --- * syntax : --- --- > aout = urd(ktableNum)--- > iout = urd(itableNum)--- > kout = urd(ktableNum)--- --- --- * description : --- --- A discrete user-defined-distribution random generator that can--- be used as a function.--- --- --- * url : <http://www.csounds.com/manual/html/urd.html>- -urdK' :: (X x0) => x0 -> x0-urdK' x0sig = prefixOperation "urd" args- where args = [to x0sig]----- | * opcode : urd--- --- --- * syntax : --- --- > aout = urd(ktableNum)--- > iout = urd(itableNum)--- > kout = urd(ktableNum)--- --- --- * description : --- --- A discrete user-defined-distribution random generator that can--- be used as a function.--- --- --- * url : <http://www.csounds.com/manual/html/urd.html>- -urdK :: (X x0) => x0 -> x0-urdK x0sig = prefixOperation "urd" args- where args = [to x0sig]----- | * opcode : weibull--- --- --- * syntax : --- --- > ares weibull ksigma, ktau--- > ires weibull ksigma, ktau--- > kres weibull ksigma, ktau--- --- --- * description : --- --- Weibull distribution random number generator (positive values--- only). This is an x-class noise generator--- --- --- * url : <http://www.csounds.com/manual/html/weibull.html>- -weibullA' :: (K k0, K k1) => k0 -> k1 -> Arate-weibullA' k0sigma k1tau = opcode "weibull" args- where args = [to k0sigma, to k1tau]----- | * opcode : weibull--- --- --- * syntax : --- --- > ares weibull ksigma, ktau--- > ires weibull ksigma, ktau--- > kres weibull ksigma, ktau--- --- --- * description : --- --- Weibull distribution random number generator (positive values--- only). This is an x-class noise generator--- --- --- * url : <http://www.csounds.com/manual/html/weibull.html>- -weibullA :: (K k0, K k1) => k0 -> k1 -> SideEffect Arate-weibullA k0sigma k1tau = opcode "weibull" args- where args = [to k0sigma, to k1tau]----- | * opcode : weibull--- --- --- * syntax : --- --- > ares weibull ksigma, ktau--- > ires weibull ksigma, ktau--- > kres weibull ksigma, ktau--- --- --- * description : --- --- Weibull distribution random number generator (positive values--- only). This is an x-class noise generator--- --- --- * url : <http://www.csounds.com/manual/html/weibull.html>- -weibullI' :: (K k0, K k1) => k0 -> k1 -> Irate-weibullI' k0sigma k1tau = opcode "weibull" args- where args = [to k0sigma, to k1tau]----- | * opcode : weibull--- --- --- * syntax : --- --- > ares weibull ksigma, ktau--- > ires weibull ksigma, ktau--- > kres weibull ksigma, ktau--- --- --- * description : --- --- Weibull distribution random number generator (positive values--- only). This is an x-class noise generator--- --- --- * url : <http://www.csounds.com/manual/html/weibull.html>- -weibullI :: (K k0, K k1) => k0 -> k1 -> SideEffect Irate-weibullI k0sigma k1tau = opcode "weibull" args- where args = [to k0sigma, to k1tau]----- | * opcode : weibull--- --- --- * syntax : --- --- > ares weibull ksigma, ktau--- > ires weibull ksigma, ktau--- > kres weibull ksigma, ktau--- --- --- * description : --- --- Weibull distribution random number generator (positive values--- only). This is an x-class noise generator--- --- --- * url : <http://www.csounds.com/manual/html/weibull.html>- -weibullK' :: (K k0, K k1) => k0 -> k1 -> Krate-weibullK' k0sigma k1tau = opcode "weibull" args- where args = [to k0sigma, to k1tau]----- | * opcode : weibull--- --- --- * syntax : --- --- > ares weibull ksigma, ktau--- > ires weibull ksigma, ktau--- > kres weibull ksigma, ktau--- --- --- * description : --- --- Weibull distribution random number generator (positive values--- only). This is an x-class noise generator--- --- --- * url : <http://www.csounds.com/manual/html/weibull.html>- -weibullK :: (K k0, K k1) => k0 -> k1 -> SideEffect Krate-weibullK k0sigma k1tau = opcode "weibull" args- where args = [to k0sigma, to k1tau]----- | * opcode : jitter--- --- --- * syntax : --- --- > kout jitter kamp, kcpsMin, kcpsMax--- --- --- * description : --- --- Generates a segmented line whose segments are randomly--- generated.--- --- --- * url : <http://www.csounds.com/manual/html/jitter.html>- -jitter' :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-jitter' k0amp k1cpsMin k2cpsMax = opcode "jitter" args- where args = [to k0amp, to k1cpsMin, to k2cpsMax]----- | * opcode : jitter--- --- --- * syntax : --- --- > kout jitter kamp, kcpsMin, kcpsMax--- --- --- * description : --- --- Generates a segmented line whose segments are randomly--- generated.--- --- --- * url : <http://www.csounds.com/manual/html/jitter.html>- -jitter :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SideEffect Krate-jitter k0amp k1cpsMin k2cpsMax = opcode "jitter" args- where args = [to k0amp, to k1cpsMin, to k2cpsMax]----- | * opcode : jitter2--- --- --- * syntax : --- --- > kout jitter2 ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3--- --- --- * description : --- --- Generates a segmented line with user-controllable random--- segments.--- --- --- * url : <http://www.csounds.com/manual/html/jitter2.html>- -jitter2' ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> k6 -> Krate-jitter2' k0totamp k1amp1 k2cps1 k3amp2 k4cps2 k5amp3 k6cps3- = opcode "jitter2" args- where args- = [to k0totamp, to k1amp1, to k2cps1, to k3amp2, to k4cps2,- to k5amp3, to k6cps3]----- | * opcode : jitter2--- --- --- * syntax : --- --- > kout jitter2 ktotamp, kamp1, kcps1, kamp2, kcps2, kamp3, kcps3--- --- --- * description : --- --- Generates a segmented line with user-controllable random--- segments.--- --- --- * url : <http://www.csounds.com/manual/html/jitter2.html>- -jitter2 ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> k6 -> SideEffect Krate-jitter2 k0totamp k1amp1 k2cps1 k3amp2 k4cps2 k5amp3 k6cps3- = opcode "jitter2" args- where args- = [to k0totamp, to k1amp1, to k2cps1, to k3amp2, to k4cps2,- to k5amp3, to k6cps3]----- | * opcode : trandom--- --- --- * syntax : --- --- > kout trandom ktrig, kmin, kmax--- --- --- * description : --- --- Generates a controlled pseudo-random number series between min--- and max values at k-rate whenever the trigger parameter is--- different to 0.--- --- --- * url : <http://www.csounds.com/manual/html/trandom.html>- -trandom' :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-trandom' k0trig k1min k2max = opcode "trandom" args- where args = [to k0trig, to k1min, to k2max]----- | * opcode : trandom--- --- --- * syntax : --- --- > kout trandom ktrig, kmin, kmax--- --- --- * description : --- --- Generates a controlled pseudo-random number series between min--- and max values at k-rate whenever the trigger parameter is--- different to 0.--- --- --- * url : <http://www.csounds.com/manual/html/trandom.html>- -trandom :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> SideEffect Krate-trandom k0trig k1min k2max = opcode "trandom" args- where args = [to k0trig, to k1min, to k2max]
− src/CsoundExpr/Opcodes/Siggen/Phasors.hs
@@ -1,125 +0,0 @@--- | Phasors-module CsoundExpr.Opcodes.Siggen.Phasors- (phasorA,- phasorK,- phasorbnkA,- phasorbnkK,- syncphasor)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : phasor--- --- --- * syntax : --- --- > ares phasor xcps [, iphs]--- > kres phasor kcps [, iphs]--- --- --- * description : --- --- Produce a normalized moving phase value.--- --- --- * url : <http://www.csounds.com/manual/html/phasor.html>- -phasorA :: (X x0) => [Irate] -> x0 -> Arate-phasorA i0init x1cps = opcode "phasor" args- where args = [to x1cps] ++ map to i0init----- | * opcode : phasor--- --- --- * syntax : --- --- > ares phasor xcps [, iphs]--- > kres phasor kcps [, iphs]--- --- --- * description : --- --- Produce a normalized moving phase value.--- --- --- * url : <http://www.csounds.com/manual/html/phasor.html>- -phasorK :: (K k0) => [Irate] -> k0 -> Krate-phasorK i0init k1cps = opcode "phasor" args- where args = [to k1cps] ++ map to i0init----- | * opcode : phasorbnk--- --- --- * syntax : --- --- > ares phasorbnk xcps, kndx, icnt [, iphs]--- > kres phasorbnk kcps, kndx, icnt [, iphs]--- --- --- * description : --- --- Produce an arbitrary number of normalized moving phase values,--- accessable by an index.--- --- --- * url : <http://www.csounds.com/manual/html/phasorbnk.html>- -phasorbnkA :: (X x0, K k0) => [Irate] -> x0 -> k0 -> Irate -> Arate-phasorbnkA i0init x1cps k2ndx i3cnt = opcode "phasorbnk" args- where args = [to x1cps, to k2ndx, to i3cnt] ++ map to i0init----- | * opcode : phasorbnk--- --- --- * syntax : --- --- > ares phasorbnk xcps, kndx, icnt [, iphs]--- > kres phasorbnk kcps, kndx, icnt [, iphs]--- --- --- * description : --- --- Produce an arbitrary number of normalized moving phase values,--- accessable by an index.--- --- --- * url : <http://www.csounds.com/manual/html/phasorbnk.html>- -phasorbnkK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Krate-phasorbnkK i0init k1cps k2ndx i3cnt = opcode "phasorbnk" args- where args = [to k1cps, to k2ndx, to i3cnt] ++ map to i0init----- | * opcode : syncphasor--- --- --- * syntax : --- --- > aphase, asyncout syncphasor xcps, asyncin, [, iphs]--- --- --- * description : --- --- Produces a moving phase value between zero and one and an extra--- impulse output ("sync out") whenever its phase value crosses or--- is reset to zero. The phase can be reset at any time by an--- impulse on the "sync in" parameter.--- --- --- * url : <http://www.csounds.com/manual/html/syncphasor.html>- -syncphasor :: (X x0) => [Irate] -> x0 -> Arate -> MultiOut-syncphasor i0init x1cps a2syncin = opcode "syncphasor" args- where args = [to x1cps, to a2syncin] ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Sample.hs
@@ -1,1076 +0,0 @@--- | Sample Playback-module CsoundExpr.Opcodes.Siggen.Sample- (bbcutm,- bbcuts,- flooper,- flooper2,- loscil,- loscil3,- loscilx,- lphasor,- lposcil,- lposcil3,- lposcila,- lposcilsa,- lposcilsa2,- sndloop,- waveset,- fluidAllOut,- fluidCCi,- fluidCCk,- fluidControl,- fluidEngine,- fluidLoad,- fluidNote,- fluidOut,- fluidProgramSelect,- fluidSetInterpMethod,- sfilist,- sfinstr,- sfinstr3,- sfinstr3m,- sfinstrm,- sfload,- sfpassign,- sfplay,- sfplay3,- sfplay3m,- sfplaym,- sflooper,- sfplist,- sfpreset)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : bbcutm--- --- --- * syntax : --- --- > a1 bbcutm asource, ibps, isubdiv, ibarlength, iphrasebars, inumrepeats --- > [, istutterspeed] [, istutterchance] [, ienvchoice ]--- --- --- * description : --- --- The BreakBeat Cutter automatically generates cut-ups of a source--- audio stream in the style of drum and bass/jungle breakbeat--- manipulations. There are two versions, for mono (bbcutm) or--- stereo (bbcuts) sources. Whilst originally based on breakbeat--- cutting, the opcode can be applied to any type of source audio.--- --- --- * url : <http://www.csounds.com/manual/html/bbcutm.html>- -bbcutm ::- [Irate] ->- Arate -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-bbcutm i0init a1source i2bps i3subdiv i4barlength i5phrasebars- i6numrepeats = opcode "bbcutm" args- where args- = [to a1source, to i2bps, to i3subdiv, to i4barlength,- to i5phrasebars, to i6numrepeats]- ++ map to i0init----- | * opcode : bbcuts--- --- --- * syntax : --- --- > a1,a2 bbcuts asource1, asource2, ibps, isubdiv, ibarlength, iphrasebars, --- > inumrepeats [, istutterspeed] [, istutterchance] [, ienvchoice]--- --- --- * description : --- --- The BreakBeat Cutter automatically generates cut-ups of a source--- audio stream in the style of drum and bass/jungle breakbeat--- manipulations. There are two versions, for mono (bbcutm) or--- stereo (bbcuts) sources. Whilst originally based on breakbeat--- cutting, the opcode can be applied to any type of source audio.--- --- --- * url : <http://www.csounds.com/manual/html/bbcuts.html>- -bbcuts ::- [Irate] ->- Arate ->- Arate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-bbcuts i0init a1source1 a2source2 i3bps i4subdiv i5barlength- i6phrasebars i7numrepeats = opcode "bbcuts" args- where args- = [to a1source1, to a2source2, to i3bps, to i4subdiv,- to i5barlength, to i6phrasebars, to i7numrepeats]- ++ map to i0init----- | * opcode : flooper--- --- --- * syntax : --- --- > asig flooper kamp, kpitch, istart, idur, ifad, ifn--- --- --- * description : --- --- This opcode reads audio from a function table and plays it back--- in a loop with user-defined start time, duration and crossfade--- time. It also allows the pitch of the loop to be controlled,--- including reversed playback. It accepts non-power-of-two tables,--- such as deferred-allocation GEN01 tables.--- --- --- * url : <http://www.csounds.com/manual/html/flooper.html>- -flooper ::- (K k0, K k1) =>- k0 -> k1 -> Irate -> Irate -> Irate -> Irate -> Arate-flooper k0amp k1pitch i2start i3dur i4fad i5fn- = opcode "flooper" args- where args- = [to k0amp, to k1pitch, to i2start, to i3dur, to i4fad, to i5fn]----- | * opcode : flooper2--- --- --- * syntax : --- --- > asig flooper2 kamp, kpitch, kloopstart, kloopend, kcrossfade, ifn --- > [, istart, imode, ifenv, iskip]--- --- --- * description : --- --- This opcode implements a crossfading looper with variable loop--- parameters and three looping modes, optionally using a table for--- its crossfade shape. It accepts non-power-of-two tables for its--- source sounds, such as deferred-allocation GEN01 tables.--- --- --- * url : <http://www.csounds.com/manual/html/flooper2.html>- -flooper2 ::- (K k0, K k1, K k2, K k3, K k4) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> k4 -> Irate -> Arate-flooper2 i0init k1amp k2pitch k3loopstart k4loopend k5crossfade- i6fn = opcode "flooper2" args- where args- = [to k1amp, to k2pitch, to k3loopstart, to k4loopend,- to k5crossfade, to i6fn]- ++ map to i0init----- | * opcode : loscil--- --- --- * syntax : --- --- > ar1 [,ar2] loscil xamp, kcps, ifn [, ibas] [, imod1] [, ibeg1] [, iend1] --- > [, imod2] [, ibeg2] [, iend2]--- --- --- * description : --- --- Read sampled sound (mono or stereo) from a table, with optional--- sustain and release looping.--- --- --- * url : <http://www.csounds.com/manual/html/loscil.html>- -loscil :: (X x0, K k0) => [Irate] -> x0 -> k0 -> Irate -> MultiOut-loscil i0init x1amp k2cps i3fn = opcode "loscil" args- where args = [to x1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : loscil3--- --- --- * syntax : --- --- > ar1 [,ar2] loscil3 xamp, kcps, ifn [, ibas] [, imod1] [, ibeg1] [, iend1] --- > [, imod2] [, ibeg2] [, iend2]--- --- --- * description : --- --- Read sampled sound (mono or stereo) from a table, with optional--- sustain and release looping, using cubic interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/loscil3.html>- -loscil3 :: (X x0, K k0) => [Irate] -> x0 -> k0 -> Irate -> MultiOut-loscil3 i0init x1amp k2cps i3fn = opcode "loscil3" args- where args = [to x1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : loscilx--- --- --- * syntax : --- --- > ar1 [, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, ar13, ar14, --- > ar15, ar16] loscilx xamp, kcps, ifn --- > [, iwsize, ibas, istrt, imod1, ibeg1, iend1]--- --- --- * description : --- --- This file is currently a stub, but the syntax should be correct.--- --- --- * url : <http://www.csounds.com/manual/html/loscilx.html>- -loscilx :: (X x0, K k0) => [Irate] -> x0 -> k0 -> Irate -> MultiOut-loscilx i0init x1amp k2cps i3fn = opcode "loscilx" args- where args = [to x1amp, to k2cps, to i3fn] ++ map to i0init----- | * opcode : lphasor--- --- --- * syntax : --- --- > ares lphasor xtrns [, ilps] [, ilpe] [, imode] [, istrt] [, istor]--- --- --- * description : --- --- This opcode can be used to generate table index for sample--- playback (e.g. tablexkt).--- --- --- * url : <http://www.csounds.com/manual/html/lphasor.html>- -lphasor :: (X x0) => [Irate] -> x0 -> Arate-lphasor i0init x1trns = opcode "lphasor" args- where args = [to x1trns] ++ map to i0init----- | * opcode : lposcil--- --- --- * syntax : --- --- > ares lposcil kamp, kfreqratio, kloop, kend, ifn [, iphs]--- --- --- * description : --- --- Read sampled sound (mono or stereo) from a table, with optional--- sustain and release looping, and high precision.--- --- --- * url : <http://www.csounds.com/manual/html/lposcil.html>- -lposcil ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> Irate -> Arate-lposcil i0init k1amp k2freqratio k3loop k4end i5fn- = opcode "lposcil" args- where args- = [to k1amp, to k2freqratio, to k3loop, to k4end, to i5fn] ++- map to i0init----- | * opcode : lposcil3--- --- --- * syntax : --- --- > ares lposcil3 kamp, kfreqratio, kloop, kend, ifn [, iphs]--- --- --- * description : --- --- Read sampled sound (mono or stereo) from a table, with optional--- sustain and release looping, and high precision. lposcil3 uses--- cubic interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/lposcil3.html>- -lposcil3 ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> Irate -> Arate-lposcil3 i0init k1amp k2freqratio k3loop k4end i5fn- = opcode "lposcil3" args- where args- = [to k1amp, to k2freqratio, to k3loop, to k4end, to i5fn] ++- map to i0init----- | * opcode : lposcila--- --- --- * syntax : --- --- > ar lposcila aamp, kfreqratio, kloop, kend, ift [,iphs]--- --- --- * description : --- --- lposcila reads sampled sound from a table with optional looping--- and high precision.--- --- --- * url : <http://www.csounds.com/manual/html/lposcila.html>- -lposcila ::- (K k0, K k1, K k2) =>- [Irate] -> Arate -> k0 -> k1 -> k2 -> Irate -> Arate-lposcila i0init a1amp k2freqratio k3loop k4end i5ft- = opcode "lposcila" args- where args- = [to a1amp, to k2freqratio, to k3loop, to k4end, to i5ft] ++- map to i0init----- | * opcode : lposcilsa--- --- --- * syntax : --- --- > ar1, ar2 lposcilsa aamp, kfreqratio, kloop, kend, ift [,iphs]--- --- --- * description : --- --- lposcilsa reads stereo sampled sound from a table with optional--- looping and high precision.--- --- --- * url : <http://www.csounds.com/manual/html/lposcilsa.html>- -lposcilsa ::- (K k0, K k1, K k2) =>- [Irate] -> Arate -> k0 -> k1 -> k2 -> Irate -> MultiOut-lposcilsa i0init a1amp k2freqratio k3loop k4end i5ft- = opcode "lposcilsa" args- where args- = [to a1amp, to k2freqratio, to k3loop, to k4end, to i5ft] ++- map to i0init----- | * opcode : lposcilsa2--- --- --- * syntax : --- --- > ar1, ar2 lposcilsa2 aamp, kfreqratio, kloop, kend, ift [,iphs]--- --- --- * description : --- --- lposcilsa2 reads stereo sampled sound from a table with optional--- looping and high precision.--- --- --- * url : <http://www.csounds.com/manual/html/lposcilsa2.html>- -lposcilsa2 ::- (K k0, K k1, K k2) =>- [Irate] -> Arate -> k0 -> k1 -> k2 -> Irate -> MultiOut-lposcilsa2 i0init a1amp k2freqratio k3loop k4end i5ft- = opcode "lposcilsa2" args- where args- = [to a1amp, to k2freqratio, to k3loop, to k4end, to i5ft] ++- map to i0init----- | * opcode : sndloop--- --- --- * syntax : --- --- > asig, krec sndloop ain, kpitch, ktrig, idur, ifad--- --- --- * description : --- --- This opcode records input audio and plays it back in a loop with--- user-defined duration and crossfade time. It also allows the--- pitch of the loop to be controlled, including reversed playback.--- --- --- * url : <http://www.csounds.com/manual/html/sndloop.html>- -sndloop ::- (K k0, K k1) =>- Arate -> k0 -> k1 -> Irate -> Irate -> (Arate, Krate)-sndloop a0in k1pitch k2trig i3dur i4fad- = mo2 $ opcode "sndloop" args- where args = [to a0in, to k1pitch, to k2trig, to i3dur, to i4fad]----- | * opcode : waveset--- --- --- * syntax : --- --- > ares waveset ain, krep [, ilen]--- --- --- * description : --- --- A simple time stretch by repeating cycles.--- --- --- * url : <http://www.csounds.com/manual/html/waveset.html>- -waveset :: (K k0) => [Irate] -> Arate -> k0 -> Arate-waveset i0init a1in k2rep = opcode "waveset" args- where args = [to a1in, to k2rep] ++ map to i0init----- | * opcode : fluidAllOut--- --- --- * syntax : --- --- > aleft, aright fluidAllOut--- --- --- * description : --- --- Collects all audio from all Fluidsynth engines in a performance--- --- --- * url : <http://www.csounds.com/manual/html/fluidAllOut.html>- -fluidAllOut :: MultiOut-fluidAllOut = opcode "fluidAllOut" args- where args = []----- | * opcode : fluidCCi--- --- --- * syntax : --- --- > fluidCCi iEngineNumber, iChannelNumber, iControllerNumber, iValue--- --- --- * description : --- --- Sends a MIDI controller data (MIDI controller number and value--- to use) message to a fluid engine by number on the user specified--- MIDI channel number.--- --- --- * url : <http://www.csounds.com/manual/html/fluidCCi.html>- -fluidCCi :: Irate -> Irate -> Irate -> Irate -> SignalOut-fluidCCi i0EngineNumber i1ChannelNumber i2ControllerNumber i3Value- = outOpcode "fluidCCi" args- where args- = [to i0EngineNumber, to i1ChannelNumber, to i2ControllerNumber,- to i3Value]----- | * opcode : fluidCCk--- --- --- * syntax : --- --- > fluidCCk iEngineNumber, iChannelNumber, iControllerNumber, kValue--- --- --- * description : --- --- Sends a MIDI controller data (MIDI controller number and value--- to use) message to a fluid engine by number on the user specified--- MIDI channel number.--- --- --- * url : <http://www.csounds.com/manual/html/fluidCCk.html>- -fluidCCk :: (K k0) => Irate -> Irate -> Irate -> k0 -> SignalOut-fluidCCk i0EngineNumber i1ChannelNumber i2ControllerNumber k3Value- = outOpcode "fluidCCk" args- where args- = [to i0EngineNumber, to i1ChannelNumber, to i2ControllerNumber,- to k3Value]----- | * opcode : fluidControl--- --- --- * syntax : --- --- > fluidControl ienginenum, kstatus, kchannel, kdata1, kdata2--- --- --- * description : --- --- The fluid opcodes provide a simple Csound opcode wrapper around--- Peter Hanappe's Fluidsynth SoundFont2 synthesizer. This--- implementation accepts any MIDI note on, note off, controller,--- pitch bend, or program change message at k-rate. Maximum--- polyphony is 4096 simultaneously sounding voices. Any number of--- SoundFonts may be loaded and played simultaneously.--- --- --- * url : <http://www.csounds.com/manual/html/fluidControl.html>- -fluidControl ::- (K k0, K k1, K k2, K k3) =>- Irate -> k0 -> k1 -> k2 -> k3 -> SignalOut-fluidControl i0enginenum k1status k2channel k3data1 k4data2- = outOpcode "fluidControl" args- where args- = [to i0enginenum, to k1status, to k2channel, to k3data1,- to k4data2]----- | * opcode : fluidEngine--- --- --- * syntax : --- --- > ienginenum fluidEngine [iReverbEnabled] [, iChorusEnabled] [,iNumChannels] [, iPolyphony]--- --- --- * description : --- --- Instantiates a fluidsynth engine, and returns ienginenum to--- identify the engine. ienginenum is passed to other other opcodes--- for loading and playing SoundFonts and gathering the generated--- sound.--- --- --- * url : <http://www.csounds.com/manual/html/fluidEngine.html>- -fluidEngine :: [Irate] -> Irate-fluidEngine i0init = opcode "fluidEngine" args- where args = map to i0init----- | * opcode : fluidLoad--- --- --- * syntax : --- --- > isfnum fluidLoad soundfont, ienginenum[, ilistpresets]--- --- --- * description : --- --- Loads a SoundFont into an instance of a fluidEngine, optionally--- listing banks and presets for SoundFont.--- --- --- * url : <http://www.csounds.com/manual/html/fluidLoad.html>- -fluidLoad :: [Irate] -> String -> Irate -> Irate-fluidLoad i0init s1soundfont i2enginenum = opcode "fluidLoad" args- where args = [to s1soundfont, to i2enginenum] ++ map to i0init----- | * opcode : fluidNote--- --- --- * syntax : --- --- > fluidNote ienginenum, ichannelnum, imidikey, imidivel--- --- --- * description : --- --- Plays a note at imidikey pitch and imidivel velocity on--- ichannelnum channel of number ienginenum fluidEngine.--- --- --- * url : <http://www.csounds.com/manual/html/fluidNote.html>- -fluidNote :: Irate -> Irate -> Irate -> Irate -> SignalOut-fluidNote i0enginenum i1channelnum i2midikey i3midivel- = outOpcode "fluidNote" args- where args- = [to i0enginenum, to i1channelnum, to i2midikey, to i3midivel]----- | * opcode : fluidOut--- --- --- * syntax : --- --- > aleft, aright fluidOut ienginenum--- --- --- * description : --- --- Outputs the sound from a fluidEngine.--- --- --- * url : <http://www.csounds.com/manual/html/fluidOut.html>- -fluidOut :: Irate -> MultiOut-fluidOut i0enginenum = opcode "fluidOut" args- where args = [to i0enginenum]----- | * opcode : fluidProgramSelect--- --- --- * syntax : --- --- > fluidProgramSelect ienginenum, ichannelnum, isfnum, ibanknum, ipresetnum--- --- --- * description : --- --- Assigns a preset from a SoundFont to a channel on a fluidEngine.--- --- --- * url : <http://www.csounds.com/manual/html/fluidProgramSelect.html>- -fluidProgramSelect ::- Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-fluidProgramSelect i0enginenum i1channelnum i2sfnum i3banknum- i4presetnum = outOpcode "fluidProgramSelect" args- where args- = [to i0enginenum, to i1channelnum, to i2sfnum, to i3banknum,- to i4presetnum]----- | * opcode : fluidSetInterpMethod--- --- --- * syntax : --- --- > fluidSetInterpMethod ienginenum, ichannelnum, iInterpMethod--- --- --- * description : --- --- Set interpolation method for channel in Fluid Engine. Lower--- order interpolation methods will render faster at lower fidelity--- while higher order interpolation methods will render slower at--- higher fidelity. Default interpolation for a channel is 4th order--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/fluidSetInterpMethod.html>- -fluidSetInterpMethod :: Irate -> Irate -> Irate -> SignalOut-fluidSetInterpMethod i0enginenum i1channelnum i2InterpMethod- = outOpcode "fluidSetInterpMethod" args- where args = [to i0enginenum, to i1channelnum, to i2InterpMethod]----- | * opcode : sfilist--- --- --- * syntax : --- --- > sfilist ifilhandle--- --- --- * description : --- --- Prints a list of all instruments of a previously loaded--- SoundFont2 (SF2) sample file. These opcodes allow management the--- sample-structure of SF2 files. In order to understand the usage--- of these opcodes, the user must have some knowledge of the SF2--- format, so a brief description of this format can be found in the--- SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfilist.html>- -sfilist :: Irate -> SignalOut-sfilist i0filhandle = outOpcode "sfilist" args- where args = [to i0filhandle]----- | * opcode : sfinstr--- --- --- * syntax : --- --- > ar1, ar2 sfinstr ivel, inotenum, xamp, xfreq, instrnum, ifilhandle --- > [, iflag] [, ioffset]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample instrument, generating a stereo--- sound. These opcodes allow management the sample-structure of SF2--- files. In order to understand the usage of these opcodes, the--- user must have some knowledge of the SF2 format, so a brief--- description of this format can be found in the SoundFont2 File--- Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfinstr.html>- -sfinstr ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> Irate -> MultiOut-sfinstr i0init i1vel i2notenum x3amp x4freq i5nstrnum i6filhandle- = opcode "sfinstr" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5nstrnum,- to i6filhandle]- ++ map to i0init----- | * opcode : sfinstr3--- --- --- * syntax : --- --- > ar1, ar2 sfinstr3 ivel, inotenum, xamp, xfreq, instrnum, ifilhandle --- > [, iflag] [, ioffset]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample instrument, generating a stereo--- sound with cubic interpolation. These opcodes allow management--- the sample-structure of SF2 files. In order to understand the--- usage of these opcodes, the user must have some knowledge of the--- SF2 format, so a brief description of this format can be found in--- the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfinstr3.html>- -sfinstr3 ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> Irate -> MultiOut-sfinstr3 i0init i1vel i2notenum x3amp x4freq i5nstrnum i6filhandle- = opcode "sfinstr3" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5nstrnum,- to i6filhandle]- ++ map to i0init----- | * opcode : sfinstr3m--- --- --- * syntax : --- --- > ares sfinstr3m ivel, inotenum, xamp, xfreq, instrnum, ifilhandle --- > [, iflag] [, ioffset]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample instrument, generating a mono--- sound with cubic interpolation. These opcodes allow management--- the sample-structure of SF2 files. In order to understand the--- usage of these opcodes, the user must have some knowledge of the--- SF2 format, so a brief description of this format can be found in--- the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfinstr3m.html>- -sfinstr3m ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> Irate -> Arate-sfinstr3m i0init i1vel i2notenum x3amp x4freq i5nstrnum i6filhandle- = opcode "sfinstr3m" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5nstrnum,- to i6filhandle]- ++ map to i0init----- | * opcode : sfinstrm--- --- --- * syntax : --- --- > ares sfinstrm ivel, inotenum, xamp, xfreq, instrnum, ifilhandle --- > [, iflag] [, ioffset]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample instrument, generating a mono--- sound. These opcodes allow management the sample-structure of SF2--- files. In order to understand the usage of these opcodes, the--- user must have some knowledge of the SF2 format, so a brief--- description of this format can be found in the SoundFont2 File--- Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfinstrm.html>- -sfinstrm ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> Irate -> Arate-sfinstrm i0init i1vel i2notenum x3amp x4freq i5nstrnum i6filhandle- = opcode "sfinstrm" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5nstrnum,- to i6filhandle]- ++ map to i0init----- | * opcode : sfload--- --- --- * syntax : --- --- > ir sfload "filename"--- --- --- * description : --- --- Loads an entire SoundFont2 (SF2) sample file into memory. These--- opcodes allow management the sample-structure of SF2 files. In--- order to understand the usage of these opcodes, the user must--- have some knowledge of the SF2 format, so a brief description of--- this format can be found in the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfload.html>- -sfload :: String -> Irate-sfload s0filename = opcode "sfload" args- where args = [to s0filename]----- | * opcode : sfpassign--- --- --- * syntax : --- --- > sfpassign istartindex, ifilhandle[, imsgs]--- --- --- * description : --- --- Assigns all presets of a previously loaded SoundFont2 (SF2)--- sample file to a sequence of progressive index numbers. These--- opcodes allow management the sample-structure of SF2 files. In--- order to understand the usage of these opcodes, the user must--- have some knowledge of the SF2 format, so a brief description of--- this format can be found in the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfpassign.html>- -sfpassign :: [Irate] -> Irate -> Irate -> SignalOut-sfpassign i0init i1startindex i2filhandle- = outOpcode "sfpassign" args- where args = [to i1startindex, to i2filhandle] ++ map to i0init----- | * opcode : sfplay--- --- --- * syntax : --- --- > ar1, ar2 sfplay ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample preset, generating a stereo--- sound. These opcodes allow management the sample-structure of SF2--- files. In order to understand the usage of these opcodes, the--- user must have some knowledge of the SF2 format, so a brief--- description of this format can be found in the SoundFont2 File--- Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfplay.html>- -sfplay ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> MultiOut-sfplay i0init i1vel i2notenum x3amp x4freq i5preindex- = opcode "sfplay" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5preindex] ++- map to i0init----- | * opcode : sfplay3--- --- --- * syntax : --- --- > ar1, ar2 sfplay3 ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample preset, generating a stereo--- sound with cubic interpolation. These opcodes allow management--- the sample-structure of SF2 files. In order to understand the--- usage of these opcodes, the user must have some knowledge of the--- SF2 format, so a brief description of this format can be found in--- the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfplay3.html>- -sfplay3 ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> MultiOut-sfplay3 i0init i1vel i2notenum x3amp x4freq i5preindex- = opcode "sfplay3" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5preindex] ++- map to i0init----- | * opcode : sfplay3m--- --- --- * syntax : --- --- > ares sfplay3m ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample preset, generating a mono sound--- with cubic interpolation. These opcodes allow management the--- sample-structure of SF2 files. In order to understand the usage--- of these opcodes, the user must have some knowledge of the SF2--- format, so a brief description of this format can be found in the--- SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfplay3m.html>- -sfplay3m ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> Arate-sfplay3m i0init i1vel i2notenum x3amp x4freq i5preindex- = opcode "sfplay3m" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5preindex] ++- map to i0init----- | * opcode : sfplaym--- --- --- * syntax : --- --- > ares sfplaym ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample preset, generating a mono sound.--- These opcodes allow management the sample-structure of SF2 files.--- In order to understand the usage of these opcodes, the user must--- have some knowledge of the SF2 format, so a brief description of--- this format can be found in the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfplaym.html>- -sfplaym ::- (X x0, X x1) =>- [Irate] -> Irate -> Irate -> x0 -> x1 -> Irate -> Arate-sfplaym i0init i1vel i2notenum x3amp x4freq i5preindex- = opcode "sfplaym" args- where args- = [to i1vel, to i2notenum, to x3amp, to x4freq, to i5preindex] ++- map to i0init----- | * opcode : sflooper--- --- --- * syntax : --- --- > ar1, ar2 sflooper ivel, inotenum, kamp, kpitch, ipreindex, kloopstart, kloopend, kcrossfade, ifn --- > [, istart, imode, ifenv, iskip]--- --- --- * description : --- --- Plays a SoundFont2 (SF2) sample preset, generating a stereo--- sound, similarly to sfplay. Unlike that opcode, though, it--- ignores the looping points set in the SF2 file and substitutes--- them for a user-defined crossfade loop. It is a cross between--- sfplay and flooper2.--- --- --- * url : <http://www.csounds.com/manual/html/sflooper.html>- -sflooper ::- (K k0, K k1, K k2, K k3, K k4) =>- [Irate] ->- Irate ->- Irate -> k0 -> k1 -> Irate -> k2 -> k3 -> k4 -> Irate -> MultiOut-sflooper i0init i1vel i2notenum k3amp k4pitch i5preindex- k6loopstart k7loopend k8crossfade i9fn = opcode "sflooper" args- where args- = [to i1vel, to i2notenum, to k3amp, to k4pitch, to i5preindex,- to k6loopstart, to k7loopend, to k8crossfade, to i9fn]- ++ map to i0init----- | * opcode : sfplist--- --- --- * syntax : --- --- > sfplist ifilhandle--- --- --- * description : --- --- Prints a list of all presets of a previously loaded SoundFont2--- (SF2) sample file. These opcodes allow management the--- sample-structure of SF2 files. In order to understand the usage--- of these opcodes, the user must have some knowledge of the SF2--- format, so a brief description of this format can be found in the--- SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfplist.html>- -sfplist :: Irate -> SignalOut-sfplist i0filhandle = outOpcode "sfplist" args- where args = [to i0filhandle]----- | * opcode : sfpreset--- --- --- * syntax : --- --- > ir sfpreset iprog, ibank, ifilhandle, ipreindex--- --- --- * description : --- --- Assigns an existing preset of a previously loaded SoundFont2--- (SF2) sample file to an index number. These opcodes allow--- management the sample-structure of SF2 files. In order to--- understand the usage of these opcodes, the user must have some--- knowledge of the SF2 format, so a brief description of this--- format can be found in the SoundFont2 File Format Appendix.--- --- --- * url : <http://www.csounds.com/manual/html/sfpreset.html>- -sfpreset :: Irate -> Irate -> Irate -> Irate -> Irate-sfpreset i0prog i1bank i2filhandle i3preindex- = opcode "sfpreset" args- where args = [to i0prog, to i1bank, to i2filhandle, to i3preindex]
− src/CsoundExpr/Opcodes/Siggen/ScanTop.hs
@@ -1,250 +0,0 @@--- | Scanned Synthesis-module CsoundExpr.Opcodes.Siggen.ScanTop- (scanhammer,- scans,- scantable,- scanu,- xscanmap,- xscans,- xscansmap,- xscanu)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : scanhammer--- --- --- * syntax : --- --- > scanhammer isrc, idst, ipos, imult--- --- --- * description : --- --- This is is a variant of tablecopy, copying from one table to--- another, starting at ipos, and with a gain control. The number of--- points copied is determined by the length of the source. Other--- points are not changed. This opcode can be used to hit a string--- in the scanned synthesis code.--- --- --- * url : <http://www.csounds.com/manual/html/scanhammer.html>- -scanhammer :: Irate -> Irate -> Irate -> Irate -> SignalOut-scanhammer i0src i1dst i2pos i3mult = outOpcode "scanhammer" args- where args = [to i0src, to i1dst, to i2pos, to i3mult]----- | * opcode : scans--- --- --- * syntax : --- --- > ares scans kamp, kfreq, ifn, id [, iorder]--- --- --- * description : --- --- Generate audio output using scanned synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/scans.html>- -scans ::- (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Irate -> Arate-scans i0init k1amp k2freq i3fn i4d = opcode "scans" args- where args- = [to k1amp, to k2freq, to i3fn, to i4d] ++ map to i0init----- | * opcode : scantable--- --- --- * syntax : --- --- > aout scantable kamp, kpch, ipos, imass, istiff, idamp, ivel--- --- --- * description : --- --- A simpler scanned synthesis implementation. This is an--- implementation of a circular string scanned using external--- tables. This opcode will allow direct modification and reading of--- values with the table opcodes.--- --- --- * url : <http://www.csounds.com/manual/html/scantable.html>- -scantable ::- (K k0, K k1) =>- k0 -> k1 -> Irate -> Irate -> Irate -> Irate -> Irate -> Arate-scantable k0amp k1pch i2pos i3mass i4stiff i5damp i6vel- = opcode "scantable" args- where args- = [to k0amp, to k1pch, to i2pos, to i3mass, to i4stiff, to i5damp,- to i6vel]----- | * opcode : scanu--- --- --- * syntax : --- --- > scanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, --- > kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id--- --- --- * description : --- --- Compute the waveform and the wavetable for use in scanned--- synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/scanu.html>- -scanu ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- k0 ->- k1 ->- k2 ->- k3 ->- Irate -> Irate -> k4 -> k5 -> Arate -> Irate -> Irate -> SignalOut-scanu i0nit i1rate i2fnvel i3fnmass i4fnstif i5fncentr i6fndamp- k7mass k8stif k9centr k10damp i11left i12right k13pos k14strngth- a15in i16disp i17d = outOpcode "scanu" args- where args- = [to i0nit, to i1rate, to i2fnvel, to i3fnmass, to i4fnstif,- to i5fncentr, to i6fndamp, to k7mass, to k8stif, to k9centr,- to k10damp, to i11left, to i12right, to k13pos, to k14strngth,- to a15in, to i16disp, to i17d]----- | * opcode : xscanmap--- --- --- * syntax : --- --- > kpos, kvel xscanmap iscan, kamp, kvamp [, iwhich]--- --- --- * description : --- --- Allows the position and velocity of a node in a scanned process--- to be read.--- --- --- * url : <http://www.csounds.com/manual/html/xscanmap.html>- -xscanmap ::- (K k0, K k1) => [Irate] -> Irate -> k0 -> k1 -> MultiOut-xscanmap i0init i1scan k2amp k3vamp = opcode "xscanmap" args- where args = [to i1scan, to k2amp, to k3vamp] ++ map to i0init----- | * opcode : xscans--- --- --- * syntax : --- --- > ares xscans kamp, kfreq, ifntraj, id [, iorder]--- --- --- * description : --- --- Experimental version of scans. Allows much larger matrices and--- is faster and smaller but removes some (unused?) flexibility. If--- liked, it will replace the older opcode as it is syntax--- compatible but extended.--- --- --- * url : <http://www.csounds.com/manual/html/xscans.html>- -xscans ::- (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Irate -> Arate-xscans i0init k1amp k2freq i3fntraj i4d = opcode "xscans" args- where args- = [to k1amp, to k2freq, to i3fntraj, to i4d] ++ map to i0init----- | * opcode : xscansmap--- --- --- * syntax : --- --- > xscansmap kpos, kvel, iscan, kamp, kvamp [, iwhich]--- --- --- * description : --- --- Allows the position and velocity of a node in a scanned process--- to be read.--- --- --- * url : <http://www.csounds.com/manual/html/xscansmap.html>- -xscansmap ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> Irate -> k2 -> k3 -> SignalOut-xscansmap i0init k1pos k2vel i3scan k4amp k5vamp- = outOpcode "xscansmap" args- where args- = [to k1pos, to k2vel, to i3scan, to k4amp, to k5vamp] ++- map to i0init----- | * opcode : xscanu--- --- --- * syntax : --- --- > xscanu init, irate, ifnvel, ifnmass, ifnstif, ifncentr, ifndamp, kmass, --- > kstif, kcentr, kdamp, ileft, iright, kpos, kstrngth, ain, idisp, id--- --- --- * description : --- --- Experimental version of scanu. Allows much larger matrices and--- is faster and smaller but removes some (unused?) flexibility. If--- liked, it will replace the older opcode as it is syntax--- compatible but extended.--- --- --- * url : <http://www.csounds.com/manual/html/xscanu.html>- -xscanu ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- Irate ->- k0 ->- k1 ->- k2 ->- k3 ->- Irate -> Irate -> k4 -> k5 -> Arate -> Irate -> Irate -> SignalOut-xscanu i0nit i1rate i2fnvel i3fnmass i4fnstif i5fncentr i6fndamp- k7mass k8stif k9centr k10damp i11left i12right k13pos k14strngth- a15in i16disp i17d = outOpcode "xscanu" args- where args- = [to i0nit, to i1rate, to i2fnvel, to i3fnmass, to i4fnstif,- to i5fncentr, to i6fndamp, to k7mass, to k8stif, to k9centr,- to k10damp, to i11left, to i12right, to k13pos, to k14strngth,- to a15in, to i16disp, to i17d]
− src/CsoundExpr/Opcodes/Siggen/Tableacc.hs
@@ -1,447 +0,0 @@--- | Table Access-module CsoundExpr.Opcodes.Siggen.Tableacc- (oscil1,- oscil1i,- tableA,- tableI,- tableK,- table3A,- table3I,- table3K,- tableiA,- tableiI,- tableiK,- tabA,- tabK,- tab_i,- tabwA,- tabwK,- tabw_i)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : oscil1--- --- --- * syntax : --- --- > kres oscil1 idel, kamp, idur, ifn--- --- --- * description : --- --- Accesses table values by incremental sampling.--- --- --- * url : <http://www.csounds.com/manual/html/oscil1.html>- -oscil1 :: (K k0) => Irate -> k0 -> Irate -> Irate -> Krate-oscil1 i0del k1amp i2dur i3fn = opcode "oscil1" args- where args = [to i0del, to k1amp, to i2dur, to i3fn]----- | * opcode : oscil1i--- --- --- * syntax : --- --- > kres oscil1i idel, kamp, idur, ifn--- --- --- * description : --- --- Accesses table values by incremental sampling with linear--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/oscil1i.html>- -oscil1i :: (K k0) => Irate -> k0 -> Irate -> Irate -> Krate-oscil1i i0del k1amp i2dur i3fn = opcode "oscil1i" args- where args = [to i0del, to k1amp, to i2dur, to i3fn]----- | * opcode : table--- --- --- * syntax : --- --- > ares table andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires table indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres table kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing.--- --- --- * url : <http://www.csounds.com/manual/html/table.html>- -tableA :: [Irate] -> Arate -> Irate -> Arate-tableA i0init a1ndx i2fn = opcode "table" args- where args = [to a1ndx, to i2fn] ++ map to i0init----- | * opcode : table--- --- --- * syntax : --- --- > ares table andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires table indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres table kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing.--- --- --- * url : <http://www.csounds.com/manual/html/table.html>- -tableI :: [Irate] -> Irate -> Irate -> Irate-tableI i0init i1ndx i2fn = opcode "table" args- where args = [to i1ndx, to i2fn] ++ map to i0init----- | * opcode : table--- --- --- * syntax : --- --- > ares table andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires table indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres table kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing.--- --- --- * url : <http://www.csounds.com/manual/html/table.html>- -tableK :: (K k0) => [Irate] -> k0 -> Irate -> Krate-tableK i0init k1ndx i2fn = opcode "table" args- where args = [to k1ndx, to i2fn] ++ map to i0init----- | * opcode : table3--- --- --- * syntax : --- --- > ares table3 andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires table3 indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres table3 kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing with cubic--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/table3.html>- -table3A :: [Irate] -> Arate -> Irate -> Arate-table3A i0init a1ndx i2fn = opcode "table3" args- where args = [to a1ndx, to i2fn] ++ map to i0init----- | * opcode : table3--- --- --- * syntax : --- --- > ares table3 andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires table3 indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres table3 kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing with cubic--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/table3.html>- -table3I :: [Irate] -> Irate -> Irate -> Irate-table3I i0init i1ndx i2fn = opcode "table3" args- where args = [to i1ndx, to i2fn] ++ map to i0init----- | * opcode : table3--- --- --- * syntax : --- --- > ares table3 andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires table3 indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres table3 kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing with cubic--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/table3.html>- -table3K :: (K k0) => [Irate] -> k0 -> Irate -> Krate-table3K i0init k1ndx i2fn = opcode "table3" args- where args = [to k1ndx, to i2fn] ++ map to i0init----- | * opcode : tablei--- --- --- * syntax : --- --- > ares tablei andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires tablei indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres tablei kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing with linear--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/tablei.html>- -tableiA :: [Irate] -> Arate -> Irate -> Arate-tableiA i0init a1ndx i2fn = opcode "tablei" args- where args = [to a1ndx, to i2fn] ++ map to i0init----- | * opcode : tablei--- --- --- * syntax : --- --- > ares tablei andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires tablei indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres tablei kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing with linear--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/tablei.html>- -tableiI :: [Irate] -> Irate -> Irate -> Irate-tableiI i0init i1ndx i2fn = opcode "tablei" args- where args = [to i1ndx, to i2fn] ++ map to i0init----- | * opcode : tablei--- --- --- * syntax : --- --- > ares tablei andx, ifn [, ixmode] [, ixoff] [, iwrap]--- > ires tablei indx, ifn [, ixmode] [, ixoff] [, iwrap]--- > kres tablei kndx, ifn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Accesses table values by direct indexing with linear--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/tablei.html>- -tableiK :: (K k0) => [Irate] -> k0 -> Irate -> Krate-tableiK i0init k1ndx i2fn = opcode "tablei" args- where args = [to k1ndx, to i2fn] ++ map to i0init----- | * opcode : tab--- --- --- * syntax : --- --- > ir tab_i indx, ifn[, ixmode]--- > kr tab kndx, ifn[, ixmode]--- > ar tab xndx, ifn[, ixmode]--- > tabw_i isig, indx, ifn [,ixmode]--- > tabw ksig, kndx, ifn [,ixmode]--- > tabw asig, andx, ifn [,ixmode]--- --- --- * description : --- --- Fast table opcodes. Faster than table and tablew because don't--- allow wrap-around and limit and don't check index validity. Have--- been implemented in order to provide fast access to arrays.--- Support non-power of two tables (can be generated by any GEN--- function by giving a negative length value).--- --- --- * url : <http://www.csounds.com/manual/html/tab.html>- -tabA :: (X x0) => [Irate] -> x0 -> Irate -> Arate-tabA i0init x1ndx i2fn = opcode "tab" args- where args = [to x1ndx, to i2fn] ++ map to i0init----- | * opcode : tab--- --- --- * syntax : --- --- > ir tab_i indx, ifn[, ixmode]--- > kr tab kndx, ifn[, ixmode]--- > ar tab xndx, ifn[, ixmode]--- > tabw_i isig, indx, ifn [,ixmode]--- > tabw ksig, kndx, ifn [,ixmode]--- > tabw asig, andx, ifn [,ixmode]--- --- --- * description : --- --- Fast table opcodes. Faster than table and tablew because don't--- allow wrap-around and limit and don't check index validity. Have--- been implemented in order to provide fast access to arrays.--- Support non-power of two tables (can be generated by any GEN--- function by giving a negative length value).--- --- --- * url : <http://www.csounds.com/manual/html/tab.html>- -tabK :: (K k0) => [Irate] -> k0 -> Irate -> Krate-tabK i0init k1ndx i2fn = opcode "tab" args- where args = [to k1ndx, to i2fn] ++ map to i0init----- | * opcode : tab_i--- --- --- * syntax : --- --- > ir tab_i indx, ifn[, ixmode]--- > kr tab kndx, ifn[, ixmode]--- > ar tab xndx, ifn[, ixmode]--- > tabw_i isig, indx, ifn [,ixmode]--- > tabw ksig, kndx, ifn [,ixmode]--- > tabw asig, andx, ifn [,ixmode]--- --- --- * description : --- --- Fast table opcodes. Faster than table and tablew because don't--- allow wrap-around and limit and don't check index validity. Have--- been implemented in order to provide fast access to arrays.--- Support non-power of two tables (can be generated by any GEN--- function by giving a negative length value).--- --- --- * url : <http://www.csounds.com/manual/html/tab.html>- -tab_i :: [Irate] -> Irate -> Irate -> Irate-tab_i i0init i1ndx i2fn = opcode "tab_i" args- where args = [to i1ndx, to i2fn] ++ map to i0init----- | * opcode : tabw--- --- --- * syntax : --- --- > ir tab_i indx, ifn[, ixmode]--- > kr tab kndx, ifn[, ixmode]--- > ar tab xndx, ifn[, ixmode]--- > tabw_i isig, indx, ifn [,ixmode]--- > tabw ksig, kndx, ifn [,ixmode]--- > tabw asig, andx, ifn [,ixmode]--- --- --- * description : --- --- Fast table opcodes. Faster than table and tablew because don't--- allow wrap-around and limit and don't check index validity. Have--- been implemented in order to provide fast access to arrays.--- Support non-power of two tables (can be generated by any GEN--- function by giving a negative length value).--- --- --- * url : <http://www.csounds.com/manual/html/tab.html>- -tabwA :: [Irate] -> Arate -> Arate -> Irate -> SignalOut-tabwA i0init a1sig a2ndx i3fn = outOpcode "tabw" args- where args = [to a1sig, to a2ndx, to i3fn] ++ map to i0init----- | * opcode : tabw--- --- --- * syntax : --- --- > ir tab_i indx, ifn[, ixmode]--- > kr tab kndx, ifn[, ixmode]--- > ar tab xndx, ifn[, ixmode]--- > tabw_i isig, indx, ifn [,ixmode]--- > tabw ksig, kndx, ifn [,ixmode]--- > tabw asig, andx, ifn [,ixmode]--- --- --- * description : --- --- Fast table opcodes. Faster than table and tablew because don't--- allow wrap-around and limit and don't check index validity. Have--- been implemented in order to provide fast access to arrays.--- Support non-power of two tables (can be generated by any GEN--- function by giving a negative length value).--- --- --- * url : <http://www.csounds.com/manual/html/tab.html>- -tabwK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> SignalOut-tabwK i0init k1sig k2ndx i3fn = outOpcode "tabw" args- where args = [to k1sig, to k2ndx, to i3fn] ++ map to i0init----- | * opcode : tabw_i--- --- --- * syntax : --- --- > ir tab_i indx, ifn[, ixmode]--- > kr tab kndx, ifn[, ixmode]--- > ar tab xndx, ifn[, ixmode]--- > tabw_i isig, indx, ifn [,ixmode]--- > tabw ksig, kndx, ifn [,ixmode]--- > tabw asig, andx, ifn [,ixmode]--- --- --- * description : --- --- Fast table opcodes. Faster than table and tablew because don't--- allow wrap-around and limit and don't check index validity. Have--- been implemented in order to provide fast access to arrays.--- Support non-power of two tables (can be generated by any GEN--- function by giving a negative length value).--- --- --- * url : <http://www.csounds.com/manual/html/tab.html>- -tabw_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-tabw_i i0init i1sig i2ndx i3fn = outOpcode "tabw_i" args- where args = [to i1sig, to i2ndx, to i3fn] ++ map to i0init
− src/CsoundExpr/Opcodes/Siggen/Waveterr.hs
@@ -1,38 +0,0 @@--- | Wave Terrain Synthesis-module CsoundExpr.Opcodes.Siggen.Waveterr- (wterrain)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : wterrain--- --- --- * syntax : --- --- > aout wterrain kamp, kpch, k_xcenter, k_ycenter, k_xradius, k_yradius, --- > itabx, itaby--- --- --- * description : --- --- A simple wave-terrain synthesis opcode.--- --- --- * url : <http://www.csounds.com/manual/html/wterrain.html>- -wterrain ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Irate -> Arate-wterrain k0amp k1pch k2_xcenter k3_ycenter k4_xradius k5_yradius- i6tabx i7taby = opcode "wterrain" args- where args- = [to k0amp, to k1pch, to k2_xcenter, to k3_ycenter, to k4_xradius,- to k5_yradius, to i6tabx, to i7taby]
− src/CsoundExpr/Opcodes/Siggen/Wavguide.hs
@@ -1,315 +0,0 @@--- | Waveguide Physical Modeling-module CsoundExpr.Opcodes.Siggen.Wavguide- (pluck,- repluck,- wgbow,- wgbowedbar,- wgbrass,- wgclar,- wgflute,- wgpluck,- wgpluck2,- wguide1,- wguide2)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : pluck--- --- --- * syntax : --- --- > ares pluck kamp, kcps, icps, ifn, imeth [, iparm1] [, iparm2]--- --- --- * description : --- --- Audio output is a naturally decaying plucked string or drum--- sound based on the Karplus-Strong algorithms.--- --- --- * url : <http://www.csounds.com/manual/html/pluck.html>- -pluck ::- (K k0, K k1) =>- [Irate] -> k0 -> k1 -> Irate -> Irate -> Irate -> Arate-pluck i0init k1amp k2cps i3cps i4fn i5meth = opcode "pluck" args- where args- = [to k1amp, to k2cps, to i3cps, to i4fn, to i5meth] ++- map to i0init----- | * opcode : repluck--- --- --- * syntax : --- --- > ares repluck iplk, kamp, icps, kpick, krefl, axcite--- --- --- * description : --- --- repluck is an implementation of the physical model of the--- plucked string. A user can control the pluck point, the pickup--- point, the filter, and an additional audio signal, axcite. axcite--- is used to excite the 'string'. Based on the Karplus-Strong--- algorithm.--- --- --- * url : <http://www.csounds.com/manual/html/repluck.html>- -repluck ::- (K k0, K k1, K k2) =>- Irate -> k0 -> Irate -> k1 -> k2 -> Arate -> Arate-repluck i0plk k1amp i2cps k3pick k4refl a5xcite- = opcode "repluck" args- where args- = [to i0plk, to k1amp, to i2cps, to k3pick, to k4refl, to a5xcite]----- | * opcode : wgbow--- --- --- * syntax : --- --- > ares wgbow kamp, kfreq, kpres, krat, kvibf, kvamp, ifn [, iminfreq]--- --- --- * description : --- --- Audio output is a tone similar to a bowed string, using a--- physical model developed from Perry Cook, but re-coded for--- Csound.--- --- --- * url : <http://www.csounds.com/manual/html/wgbow.html>- -wgbow ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Arate-wgbow i0init k1amp k2freq k3pres k4rat k5vibf k6vamp i7fn- = opcode "wgbow" args- where args- = [to k1amp, to k2freq, to k3pres, to k4rat, to k5vibf, to k6vamp,- to i7fn]- ++ map to i0init----- | * opcode : wgbowedbar--- --- --- * syntax : --- --- > ares wgbowedbar kamp, kfreq, kpos, kbowpres, kgain [, iconst] [, itvel] --- > [, ibowpos] [, ilow]--- --- --- * description : --- --- A physical model of a bowed bar, belonging to the Perry Cook--- family of waveguide instruments.--- --- --- * url : <http://www.csounds.com/manual/html/wgbowedbar.html>- -wgbowedbar ::- (K k0, K k1, K k2, K k3, K k4) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> k4 -> Arate-wgbowedbar i0init k1amp k2freq k3pos k4bowpres k5gain- = opcode "wgbowedbar" args- where args- = [to k1amp, to k2freq, to k3pos, to k4bowpres, to k5gain] ++- map to i0init----- | * opcode : wgbrass--- --- --- * syntax : --- --- > ares wgbrass kamp, kfreq, ktens, iatt, kvibf, kvamp, ifn [, iminfreq]--- --- --- * description : --- --- Audio output is a tone related to a brass instrument, using a--- physical model developed from Perry Cook, but re-coded for--- Csound.--- --- --- * url : <http://www.csounds.com/manual/html/wgbrass.html>- -wgbrass ::- (K k0, K k1, K k2, K k3, K k4) =>- [Irate] -> k0 -> k1 -> k2 -> Irate -> k3 -> k4 -> Irate -> Arate-wgbrass i0init k1amp k2freq k3tens i4att k5vibf k6vamp i7fn- = opcode "wgbrass" args- where args- = [to k1amp, to k2freq, to k3tens, to i4att, to k5vibf, to k6vamp,- to i7fn]- ++ map to i0init----- | * opcode : wgclar--- --- --- * syntax : --- --- > ares wgclar kamp, kfreq, kstiff, iatt, idetk, kngain, kvibf, kvamp, ifn --- > [, iminfreq]--- --- --- * description : --- --- Audio output is a tone similar to a clarinet, using a physical--- model developed from Perry Cook, but re-coded for Csound.--- --- --- * url : <http://www.csounds.com/manual/html/wgclar.html>- -wgclar ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- [Irate] ->- k0 ->- k1 -> k2 -> Irate -> Irate -> k3 -> k4 -> k5 -> Irate -> Arate-wgclar i0init k1amp k2freq k3stiff i4att i5detk k6ngain k7vibf- k8vamp i9fn = opcode "wgclar" args- where args- = [to k1amp, to k2freq, to k3stiff, to i4att, to i5detk,- to k6ngain, to k7vibf, to k8vamp, to i9fn]- ++ map to i0init----- | * opcode : wgflute--- --- --- * syntax : --- --- > ares wgflute kamp, kfreq, kjet, iatt, idetk, kngain, kvibf, kvamp, ifn --- > [, iminfreq] [, ijetrf] [, iendrf]--- --- --- * description : --- --- Audio output is a tone similar to a flute, using a physical--- model developed from Perry Cook, but re-coded for Csound.--- --- --- * url : <http://www.csounds.com/manual/html/wgflute.html>- -wgflute ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- [Irate] ->- k0 ->- k1 -> k2 -> Irate -> Irate -> k3 -> k4 -> k5 -> Irate -> Arate-wgflute i0init k1amp k2freq k3jet i4att i5detk k6ngain k7vibf- k8vamp i9fn = opcode "wgflute" args- where args- = [to k1amp, to k2freq, to k3jet, to i4att, to i5detk, to k6ngain,- to k7vibf, to k8vamp, to i9fn]- ++ map to i0init----- | * opcode : wgpluck--- --- --- * syntax : --- --- > ares wgpluck icps, iamp, kpick, iplk, idamp, ifilt, axcite--- --- --- * description : --- --- A high fidelity simulation of a plucked string, using--- interpolating delay-lines.--- --- --- * url : <http://www.csounds.com/manual/html/wgpluck.html>- -wgpluck ::- (K k0) =>- Irate -> Irate -> k0 -> Irate -> Irate -> Irate -> Arate -> Arate-wgpluck i0cps i1amp k2pick i3plk i4damp i5filt a6xcite- = opcode "wgpluck" args- where args- = [to i0cps, to i1amp, to k2pick, to i3plk, to i4damp, to i5filt,- to a6xcite]----- | * opcode : wgpluck2--- --- --- * syntax : --- --- > ares wgpluck2 iplk, kamp, icps, kpick, krefl--- --- --- * description : --- --- wgpluck2 is an implementation of the physical model of the--- plucked string, with control over the pluck point, the pickup--- point and the filter. Based on the Karplus-Strong algorithm.--- --- --- * url : <http://www.csounds.com/manual/html/wgpluck2.html>- -wgpluck2 ::- (K k0, K k1, K k2) => Irate -> k0 -> Irate -> k1 -> k2 -> Arate-wgpluck2 i0plk k1amp i2cps k3pick k4refl = opcode "wgpluck2" args- where args = [to i0plk, to k1amp, to i2cps, to k3pick, to k4refl]----- | * opcode : wguide1--- --- --- * syntax : --- --- > ares wguide1 asig, xfreq, kcutoff, kfeedback--- --- --- * description : --- --- A simple waveguide model consisting of one delay-line and one--- first-order lowpass filter.--- --- --- * url : <http://www.csounds.com/manual/html/wguide1.html>- -wguide1 :: (X x0, K k0, K k1) => Arate -> x0 -> k0 -> k1 -> Arate-wguide1 a0sig x1freq k2cutoff k3feedback = opcode "wguide1" args- where args = [to a0sig, to x1freq, to k2cutoff, to k3feedback]----- | * opcode : wguide2--- --- --- * syntax : --- --- > ares wguide2 asig, xfreq1, xfreq2, kcutoff1, kcutoff2, --- > kfeedback1, kfeedback2--- --- --- * description : --- --- A model of beaten plate consisting of two parallel delay-lines--- and two first-order lowpass filters.--- --- --- * url : <http://www.csounds.com/manual/html/wguide2.html>- -wguide2 ::- (X x0, X x1, K k0, K k1, K k2, K k3) =>- Arate -> x0 -> x1 -> k0 -> k1 -> k2 -> k3 -> Arate-wguide2 a0sig x1freq1 x2freq2 k3cutoff1 k4cutoff2 k5feedback1- k6feedback2 = opcode "wguide2" args- where args- = [to a0sig, to x1freq1, to x2freq2, to k3cutoff1, to k4cutoff2,- to k5feedback1, to k6feedback2]
− src/CsoundExpr/Opcodes/Sigio.hs
@@ -1,18 +0,0 @@--- | Signal Input and Output-module CsoundExpr.Opcodes.Sigio- (module CsoundExpr.Opcodes.Sigio.FileIO,- module CsoundExpr.Opcodes.Sigio.Input,- module CsoundExpr.Opcodes.Sigio.Output,- module CsoundExpr.Opcodes.Sigio.SoftwareBus,- module CsoundExpr.Opcodes.Sigio.Pdisplay,- module CsoundExpr.Opcodes.Sigio.Queries)-where----import CsoundExpr.Opcodes.Sigio.FileIO-import CsoundExpr.Opcodes.Sigio.Input-import CsoundExpr.Opcodes.Sigio.Output-import CsoundExpr.Opcodes.Sigio.SoftwareBus-import CsoundExpr.Opcodes.Sigio.Pdisplay-import CsoundExpr.Opcodes.Sigio.Queries
− src/CsoundExpr/Opcodes/Sigio/FileIO.hs
@@ -1,506 +0,0 @@--- | File Input and Output-module CsoundExpr.Opcodes.Sigio.FileIO- (fiopen,- ficloseI,- ficloseS,- dumpk,- dumpk2,- dumpk3,- dumpk4,- fout,- fouti,- foutir,- foutk,- readk,- readk2,- readk3,- readk4,- fin,- fini,- fink,- clear,- vincr,- fprints,- fprintks)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : fiopen--- --- --- * syntax : --- --- > ihandle fiopen ifilename, imode--- --- --- * description : --- --- fiopen can be used to open a file in one of the specified modes.--- --- --- * url : <http://www.csounds.com/manual/html/fiopen.html>- -fiopen :: Irate -> Irate -> Irate-fiopen i0filename i1mode = opcode "fiopen" args- where args = [to i0filename, to i1mode]----- | * opcode : ficlose--- --- --- * syntax : --- --- > ficlose ihandle--- > ficlose Sfilename--- --- --- * description : --- --- ficlose can be used to close a file which was opened with--- fiopen.--- --- --- * url : <http://www.csounds.com/manual/html/ficlose.html>- -ficloseI :: Irate -> SignalOut-ficloseI i0handle = outOpcode "ficlose" args- where args = [to i0handle]----- | * opcode : ficlose--- --- --- * syntax : --- --- > ficlose ihandle--- > ficlose Sfilename--- --- --- * description : --- --- ficlose can be used to close a file which was opened with--- fiopen.--- --- --- * url : <http://www.csounds.com/manual/html/ficlose.html>- -ficloseS :: String -> SignalOut-ficloseS s0filename = outOpcode "ficlose" args- where args = [to s0filename]----- | * opcode : dumpk--- --- --- * syntax : --- --- > dumpk ksig, ifilname, iformat, iprd--- --- --- * description : --- --- Periodically writes an orchestra control-signal value to a named--- external file in a specific format.--- --- --- * url : <http://www.csounds.com/manual/html/dumpk.html>- -dumpk :: (K k0) => k0 -> Irate -> Irate -> Irate -> SignalOut-dumpk k0sig i1filname i2format i3prd = outOpcode "dumpk" args- where args = [to k0sig, to i1filname, to i2format, to i3prd]----- | * opcode : dumpk2--- --- --- * syntax : --- --- > dumpk2 ksig1, ksig2, ifilname, iformat, iprd--- --- --- * description : --- --- Periodically writes two orchestra control-signal values to a--- named external file in a specific format.--- --- --- * url : <http://www.csounds.com/manual/html/dumpk2.html>- -dumpk2 ::- (K k0, K k1) => k0 -> k1 -> Irate -> Irate -> Irate -> SignalOut-dumpk2 k0sig1 k1sig2 i2filname i3format i4prd- = outOpcode "dumpk2" args- where args- = [to k0sig1, to k1sig2, to i2filname, to i3format, to i4prd]----- | * opcode : dumpk3--- --- --- * syntax : --- --- > dumpk3 ksig1, ksig2, ksig3, ifilname, iformat, iprd--- --- --- * description : --- --- Periodically writes three orchestra control-signal values to a--- named external file in a specific format.--- --- --- * url : <http://www.csounds.com/manual/html/dumpk3.html>- -dumpk3 ::- (K k0, K k1, K k2) =>- k0 -> k1 -> k2 -> Irate -> Irate -> Irate -> SignalOut-dumpk3 k0sig1 k1sig2 k2sig3 i3filname i4format i5prd- = outOpcode "dumpk3" args- where args- = [to k0sig1, to k1sig2, to k2sig3, to i3filname, to i4format,- to i5prd]----- | * opcode : dumpk4--- --- --- * syntax : --- --- > dumpk4 ksig1, ksig2, ksig3, ksig4, ifilname, iformat, iprd--- --- --- * description : --- --- Periodically writes four orchestra control-signal values to a--- named external file in a specific format.--- --- --- * url : <http://www.csounds.com/manual/html/dumpk4.html>- -dumpk4 ::- (K k0, K k1, K k2, K k3) =>- k0 -> k1 -> k2 -> k3 -> Irate -> Irate -> Irate -> SignalOut-dumpk4 k0sig1 k1sig2 k2sig3 k3sig4 i4filname i5format i6prd- = outOpcode "dumpk4" args- where args- = [to k0sig1, to k1sig2, to k2sig3, to k3sig4, to i4filname,- to i5format, to i6prd]----- | * opcode : fout--- --- --- * syntax : --- --- > fout ifilename, iformat, aout1 [, aout2, aout3,...,aoutN]--- --- --- * description : --- --- fout outputs N a-rate signals to a specified file of N channels.--- --- --- * url : <http://www.csounds.com/manual/html/fout.html>- -fout :: String -> Irate -> [Arate] -> SignalOut-fout s0filename i1format a2outN = outOpcode "fout" args- where args = [to s0filename, to i1format] ++ map to a2outN----- | * opcode : fouti--- --- --- * syntax : --- --- > fouti ihandle, iformat, iflag, iout1 [, iout2, iout3,....,ioutN]--- --- --- * description : --- --- fouti output N i-rate signals to a specified file of N channels.--- --- --- * url : <http://www.csounds.com/manual/html/fouti.html>- -fouti :: Irate -> Irate -> Irate -> [Irate] -> SignalOut-fouti i0handle i1format i2flag i3outN = outOpcode "fouti" args- where args = [to i0handle, to i1format, to i2flag] ++ map to i3outN----- | * opcode : foutir--- --- --- * syntax : --- --- > foutir ihandle, iformat, iflag, iout1 [, iout2, iout3,....,ioutN]--- --- --- * description : --- --- foutir output N i-rate signals to a specified file of N--- channels.--- --- --- * url : <http://www.csounds.com/manual/html/foutir.html>- -foutir :: Irate -> Irate -> Irate -> [Irate] -> SignalOut-foutir i0handle i1format i2flag i3outN = outOpcode "foutir" args- where args = [to i0handle, to i1format, to i2flag] ++ map to i3outN----- | * opcode : foutk--- --- --- * syntax : --- --- > foutk ifilename, iformat, kout1 [, kout2, kout3,....,koutN]--- --- --- * description : --- --- foutk outputs N k-rate signals to a specified file of N--- channels.--- --- --- * url : <http://www.csounds.com/manual/html/foutk.html>- -foutk :: (K k0) => String -> Irate -> [k0] -> SignalOut-foutk s0filename i1format k2outN = outOpcode "foutk" args- where args = [to s0filename, to i1format] ++ map to k2outN----- | * opcode : readk--- --- --- * syntax : --- --- > kres readk ifilname, iformat, iprd--- --- --- * description : --- --- Periodically reads an orchestra control-signal value from a--- named external file in a specific format.--- --- --- * url : <http://www.csounds.com/manual/html/readk.html>- -readk :: Irate -> Irate -> Irate -> Krate-readk i0filname i1format i2prd = opcode "readk" args- where args = [to i0filname, to i1format, to i2prd]----- | * opcode : readk2--- --- --- * syntax : --- --- > kr1, kr2 readk2 ifilname, iformat, iprd--- --- --- * description : --- --- Periodically reads two orchestra control-signal values from an--- external file.--- --- --- * url : <http://www.csounds.com/manual/html/readk2.html>- -readk2 :: Irate -> Irate -> Irate -> MultiOut-readk2 i0filname i1format i2prd = opcode "readk2" args- where args = [to i0filname, to i1format, to i2prd]----- | * opcode : readk3--- --- --- * syntax : --- --- > kr1, kr2, kr3 readk3 ifilname, iformat, iprd--- --- --- * description : --- --- Periodically reads three orchestra control-signal values from an--- external file.--- --- --- * url : <http://www.csounds.com/manual/html/readk3.html>- -readk3 :: Irate -> Irate -> Irate -> MultiOut-readk3 i0filname i1format i2prd = opcode "readk3" args- where args = [to i0filname, to i1format, to i2prd]----- | * opcode : readk4--- --- --- * syntax : --- --- > kr1, kr2, kr3, kr4 readk4 ifilname, iformat, iprd--- --- --- * description : --- --- Periodically reads four orchestra control-signal values from an--- external file.--- --- --- * url : <http://www.csounds.com/manual/html/readk4.html>- -readk4 :: Irate -> Irate -> Irate -> MultiOut-readk4 i0filname i1format i2prd = opcode "readk4" args- where args = [to i0filname, to i1format, to i2prd]----- | * opcode : fin--- --- --- * syntax : --- --- > fin ifilename, iskipframes, iformat, ain1 [, ain2] [, ain3] [,...]--- --- --- * description : --- --- Read signals from a file at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/fin.html>- -fin :: String -> Irate -> Irate -> [Arate] -> SignalOut-fin s0filename i1skipframes i2format a3outN = outOpcode "fin" args- where args- = [to s0filename, to i1skipframes, to i2format] ++ map to a3outN----- | * opcode : fini--- --- --- * syntax : --- --- > fini ifilename, iskipframes, iformat, in1 [, in2] [, in3] [,...]--- --- --- * description : --- --- Read signals from a file at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/fini.html>- -fini :: String -> Irate -> Irate -> [Irate] -> SignalOut-fini s0filename i1skipframes i2format i3outN- = outOpcode "fini" args- where args- = [to s0filename, to i1skipframes, to i2format] ++ map to i3outN----- | * opcode : fink--- --- --- * syntax : --- --- > fink ifilename, iskipframes, iformat, kin1 [, kin2] [, kin3] [,...]--- --- --- * description : --- --- Read signals from a file at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/fink.html>- -fink :: (K k0) => String -> Irate -> Irate -> [k0] -> SignalOut-fink s0filename i1skipframes i2format k3outN- = outOpcode "fink" args- where args- = [to s0filename, to i1skipframes, to i2format] ++ map to k3outN----- | * opcode : clear--- --- --- * syntax : --- --- > clear avar1 [, avar2] [, avar3] [...]--- --- --- * description : --- --- clear zeroes a list of audio signals.--- --- --- * url : <http://www.csounds.com/manual/html/clear.html>- -clear :: [Arate] -> SignalOut-clear a0var = outOpcode "clear" args- where args = map to a0var----- | * opcode : vincr--- --- --- * syntax : --- --- > vincr accum, aincr--- --- --- * description : --- --- vincr increments one audio variable with another signal, i.e. it--- accumulates output.--- --- --- * url : <http://www.csounds.com/manual/html/vincr.html>- -vincr :: Arate -> Arate -> SignalOut-vincr a0ccum a1incr = outOpcode "vincr" args- where args = [to a0ccum, to a1incr]----- | * opcode : fprints--- --- --- * syntax : --- --- > fprints "filename", "string" [, ival1] [, ival2] [...]--- --- --- * description : --- --- Similar to prints but prints to a file.--- --- --- * url : <http://www.csounds.com/manual/html/fprints.html>- -fprints :: String -> String -> [Irate] -> SignalOut-fprints s0filename s1string i2valN = outOpcode "fprints" args- where args = [to s0filename, to s1string] ++ map to i2valN----- | * opcode : fprintks--- --- --- * syntax : --- --- > fprintks "filename", "string", [, kval1] [, kval2] [...]--- --- --- * description : --- --- Similar to printks but prints to a file.--- --- --- * url : <http://www.csounds.com/manual/html/fprintks.html>- -fprintks :: (K k0) => String -> String -> [k0] -> SignalOut-fprintks s0filename s1string k2valN = outOpcode "fprintks" args- where args = [to s0filename, to s1string] ++ map to k2valN
− src/CsoundExpr/Opcodes/Sigio/Input.hs
@@ -1,348 +0,0 @@--- | Signal Input-module CsoundExpr.Opcodes.Sigio.Input- (in',- in32,- inch,- inh,- ino,- inq,- inrg,- ins,- inx,- diskin,- diskin2,- soundin,- invalueK,- invalueS,- inz)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : in--- --- --- * syntax : --- --- > ar1 in--- --- --- * description : --- --- Reads mono audio data from an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/in.html>- -in' :: Arate-in' = opcode "in" args- where args = []----- | * opcode : in32--- --- --- * syntax : --- --- > ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, ar13, ar14, --- > ar15, ar16, ar17, ar18, ar19, ar20, ar21, ar22, ar23, ar24, ar25, ar26, --- > ar27, ar28, ar29, ar30, ar31, ar32 in32--- --- --- * description : --- --- Reads a 32-channel audio signal from an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/in32.html>- -in32 :: MultiOut-in32 = opcode "in32" args- where args = []----- | * opcode : inch--- --- --- * syntax : --- --- > ain inch kchan--- --- --- * description : --- --- Reads from a numbered channel in an external audio signal or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/inch.html>- -inch :: (K k0) => k0 -> Arate-inch k0chan = opcode "inch" args- where args = [to k0chan]----- | * opcode : inh--- --- --- * syntax : --- --- > ar1, ar2, ar3, ar4, ar5, ar6 inh--- --- --- * description : --- --- Reads six-channel audio data from an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/inh.html>- -inh :: MultiOut-inh = opcode "inh" args- where args = []----- | * opcode : ino--- --- --- * syntax : --- --- > ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8 ino--- --- --- * description : --- --- Reads eight-channel audio data from an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/ino.html>- -ino :: MultiOut-ino = opcode "ino" args- where args = []----- | * opcode : inq--- --- --- * syntax : --- --- > ar1, ar2, ar3, a4 inq--- --- --- * description : --- --- Reads quad audio data from an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/inq.html>- -inq :: MultiOut-inq = opcode "inq" args- where args = []----- | * opcode : inrg--- --- --- * syntax : --- --- > inrg kstart, ain1 [,ain2, ain3,..., ainN]--- --- --- * description : --- --- inrg reads audio from a range of adjacent audio channels from--- the audio input device.--- --- --- * url : <http://www.csounds.com/manual/html/inrg.html>- -inrg :: (K k0) => k0 -> [Arate] -> SignalOut-inrg k0start a1ins = outOpcode "inrg" args- where args = [to k0start] ++ map to a1ins----- | * opcode : ins--- --- --- * syntax : --- --- > ar1, ar2 ins--- --- --- * description : --- --- Reads stereo audio data from an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/ins.html>- -ins :: MultiOut-ins = opcode "ins" args- where args = []----- | * opcode : inx--- --- --- * syntax : --- --- > ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, ar9, ar10, ar11, ar12, --- > ar13, ar14, ar15, ar16 inx--- --- --- * description : --- --- Reads a 16-channel audio signal from an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/inx.html>- -inx :: MultiOut-inx = opcode "inx" args- where args = []----- | * opcode : diskin--- --- --- * syntax : --- --- > ar1 [, ar2 [, ar3 [,... ar24]]] diskin ifilcod, kpitch [, iskiptim] --- > [, iwraparound] [, iformat] [, iskipinit]--- --- --- * description : --- --- Deprecated. Reads audio data from an external device or stream--- and can alter its pitch.--- --- --- * url : <http://www.csounds.com/manual/html/diskin.html>- -diskin :: (K k0) => [Irate] -> String -> k0 -> MultiOut-diskin i0init s1file k2pitch = opcode "diskin" args- where args = [to s1file, to k2pitch] ++ map to i0init----- | * opcode : diskin2--- --- --- * syntax : --- --- > a1[, a2[,... a24]] diskin2 ifilcod, kpitch[, iskiptim --- > [, iwrap[, iformat [, iwsize[, ibufsize[, iskipinit]]]]]]--- --- --- * description : --- --- Reads audio data from a file, and can alter its pitch using one--- of several available interpolation types, as well as convert the--- sample rate to match the orchestra sr setting. diskin2 can also--- read multichannel files with any number of channels in the range--- 1 to 24. diskin2 allows more control and higher sound quality--- than diskin, but there is also the disadvantage of higher CPU--- usage.--- --- --- * url : <http://www.csounds.com/manual/html/diskin2.html>- -diskin2 :: (K k0) => [Irate] -> String -> k0 -> MultiOut-diskin2 i0init s1file k2pitch = opcode "diskin2" args- where args = [to s1file, to k2pitch] ++ map to i0init----- | * opcode : soundin--- --- --- * syntax : --- --- > ar1[, ar2[, ar3[,... a24]]] soundin ifilcod [, iskptim] [, iformat] --- > [, iskipinit] [, ibufsize]--- --- --- * description : --- --- Reads audio data from an external device or stream. Up to 24--- channels may be read.--- --- --- * url : <http://www.csounds.com/manual/html/soundin.html>- -soundin :: [Irate] -> String -> MultiOut-soundin i0init s1file = opcode "soundin" args- where args = [to s1file] ++ map to i0init----- | * opcode : invalue--- --- --- * syntax : --- --- > kvalue invalue "channel name"--- > Sname invalue "channel name"--- --- --- * description : --- --- Reads a k-rate signal or string from a user-defined channel.--- --- --- * url : <http://www.csounds.com/manual/html/invalue.html>- -invalueK :: String -> Krate-invalueK s0channelname = opcode "invalue" args- where args = [to s0channelname]----- | * opcode : invalue--- --- --- * syntax : --- --- > kvalue invalue "channel name"--- > Sname invalue "channel name"--- --- --- * description : --- --- Reads a k-rate signal or string from a user-defined channel.--- --- --- * url : <http://www.csounds.com/manual/html/invalue.html>- -invalueS :: String -> String-invalueS s0channelname = opcode "invalue" args- where args = [to s0channelname]----- | * opcode : inz--- --- --- * syntax : --- --- > inz ksig1--- --- --- * description : --- --- Reads multi-channel audio samples into a ZAK array from an--- external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/inz.html>- -inz :: (K k0) => k0 -> SignalOut-inz k0sig1 = outOpcode "inz" args- where args = [to k0sig1]
− src/CsoundExpr/Opcodes/Sigio/Output.hs
@@ -1,535 +0,0 @@--- | Signal Output-module CsoundExpr.Opcodes.Sigio.Output- (out,- out32,- outc,- outch,- outh,- outo,- outrg,- outq,- outq1,- outq2,- outq3,- outq4,- outs,- outs1,- outs2,- outx,- soundout,- soundouts,- outvalueK,- outvalueS,- outz)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : out--- --- --- * syntax : --- --- > out asig--- --- --- * description : --- --- Writes mono audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/out.html>- -out :: Arate -> SignalOut-out a0sig = outOpcode "out" args- where args = [to a0sig]----- | * opcode : out32--- --- --- * syntax : --- --- > out32 asig1, asig2, asig3, asig4, asig5, asig6, asig7, asig8, asig10, --- > asig11, asig12, asig13, asig14, asig15, asig16, asig17, asig18, --- > asig19, asig20, asig21, asig22, asig23, asig24, asig25, asig26, --- > asig27, asig28, asig29, asig30, asig31, asig32--- --- --- * description : --- --- Writes 32-channel audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/out32.html>- -out32 ::- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate -> Arate -> Arate -> SignalOut-out32 a0sig1 a1sig2 a2sig3 a3sig4 a4sig5 a5sig6 a6sig7 a7sig8- a8sig10 a9sig11 a10sig12 a11sig13 a12sig14 a13sig15 a14sig16- a15sig17 a16sig18 a17sig19 a18sig20 a19sig21 a20sig22 a21sig23- a22sig24 a23sig25 a24sig26 a25sig27 a26sig28 a27sig29 a28sig30- a29sig31 a30sig32 = outOpcode "out32" args- where args- = [to a0sig1, to a1sig2, to a2sig3, to a3sig4, to a4sig5,- to a5sig6, to a6sig7, to a7sig8, to a8sig10, to a9sig11,- to a10sig12, to a11sig13, to a12sig14, to a13sig15, to a14sig16,- to a15sig17, to a16sig18, to a17sig19, to a18sig20, to a19sig21,- to a20sig22, to a21sig23, to a22sig24, to a23sig25, to a24sig26,- to a25sig27, to a26sig28, to a27sig29, to a28sig30, to a29sig31,- to a30sig32]----- | * opcode : outc--- --- --- * syntax : --- --- > outc asig1 [, asig2] [...]--- --- --- * description : --- --- Writes audio data with an arbitrary number of channels to an--- external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outc.html>- -outc :: (K k0) => k0 -> [Arate] -> SignalOut-outc k0chan a1sigN = outOpcode "outc" args- where args = [to k0chan] ++ map to a1sigN----- | * opcode : outch--- --- --- * syntax : --- --- > outch kchan1, asig1 [, kchan2] [, asig2] [...]--- --- --- * description : --- --- Writes multi-channel audio data, with user-controllable--- channels, to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outch.html>- -outch :: (K k0) => k0 -> [Arate] -> SignalOut-outch k0chan a1sigN = outOpcode "outch" args- where args = [to k0chan] ++ map to a1sigN----- | * opcode : outh--- --- --- * syntax : --- --- > outh asig1, asig2, asig3, asig4, asig5, asig6--- --- --- * description : --- --- Writes 6-channel audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outh.html>- -outh ::- Arate -> Arate -> Arate -> Arate -> Arate -> Arate -> SignalOut-outh a0sig1 a1sig2 a2sig3 a3sig4 a4sig5 a5sig6- = outOpcode "outh" args- where args- = [to a0sig1, to a1sig2, to a2sig3, to a3sig4, to a4sig5,- to a5sig6]----- | * opcode : outo--- --- --- * syntax : --- --- > outo asig1, asig2, asig3, asig4, asig5, asig6, asig7, asig8--- --- --- * description : --- --- Writes 8-channel audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outo.html>- -outo ::- Arate ->- Arate ->- Arate -> Arate -> Arate -> Arate -> Arate -> Arate -> SignalOut-outo a0sig1 a1sig2 a2sig3 a3sig4 a4sig5 a5sig6 a6sig7 a7sig8- = outOpcode "outo" args- where args- = [to a0sig1, to a1sig2, to a2sig3, to a3sig4, to a4sig5,- to a5sig6, to a6sig7, to a7sig8]----- | * opcode : outrg--- --- --- * syntax : --- --- > outrg kstart, aout1 [,aout2, aout3,..., aoutN]--- --- --- * description : --- --- outrg outputs audio to a range of adjacent audio channels on the--- audio output device.--- --- --- * url : <http://www.csounds.com/manual/html/outrg.html>- -outrg :: (K k0) => k0 -> [Arate] -> SignalOut-outrg k0start a1outN = outOpcode "outrg" args- where args = [to k0start] ++ map to a1outN----- | * opcode : outq--- --- --- * syntax : --- --- > outq asig1, asig2, asig3, asig4--- --- --- * description : --- --- Writes 4-channel audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outq.html>- -outq :: Arate -> Arate -> Arate -> Arate -> SignalOut-outq a0sig1 a1sig2 a2sig3 a3sig4 = outOpcode "outq" args- where args = [to a0sig1, to a1sig2, to a2sig3, to a3sig4]----- | * opcode : outq1--- --- --- * syntax : --- --- > outq1 asig--- --- --- * description : --- --- Writes samples to quad channel 1 of an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/outq1.html>- -outq1 :: Arate -> SignalOut-outq1 a0sig = outOpcode "outq1" args- where args = [to a0sig]----- | * opcode : outq2--- --- --- * syntax : --- --- > outq2 asig--- --- --- * description : --- --- Writes samples to quad channel 2 of an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/outq2.html>- -outq2 :: Arate -> SignalOut-outq2 a0sig = outOpcode "outq2" args- where args = [to a0sig]----- | * opcode : outq3--- --- --- * syntax : --- --- > outq3 asig--- --- --- * description : --- --- Writes samples to quad channel 3 of an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/outq3.html>- -outq3 :: Arate -> SignalOut-outq3 a0sig = outOpcode "outq3" args- where args = [to a0sig]----- | * opcode : outq4--- --- --- * syntax : --- --- > outq4 asig--- --- --- * description : --- --- Writes samples to quad channel 4 of an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/outq4.html>- -outq4 :: Arate -> SignalOut-outq4 a0sig = outOpcode "outq4" args- where args = [to a0sig]----- | * opcode : outs--- --- --- * syntax : --- --- > outs asig1, asig2--- --- --- * description : --- --- Writes stereo audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outs.html>- -outs :: Arate -> Arate -> SignalOut-outs a0sig1 a1sig2 = outOpcode "outs" args- where args = [to a0sig1, to a1sig2]----- | * opcode : outs1--- --- --- * syntax : --- --- > outs1 asig--- --- --- * description : --- --- Writes samples to stereo channel 1 of an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/outs1.html>- -outs1 :: Arate -> SignalOut-outs1 a0sig = outOpcode "outs1" args- where args = [to a0sig]----- | * opcode : outs2--- --- --- * syntax : --- --- > outs2 asig--- --- --- * description : --- --- Writes samples to stereo channel 2 of an external device or--- stream.--- --- --- * url : <http://www.csounds.com/manual/html/outs2.html>- -outs2 :: Arate -> SignalOut-outs2 a0sig = outOpcode "outs2" args- where args = [to a0sig]----- | * opcode : outx--- --- --- * syntax : --- --- > outx asig1, asig2, asig3, asig4, asig5, asig6, asig7, asig8, --- > asig9, asig10, asig11, asig12, asig13, asig14, asig15, asig16--- --- --- * description : --- --- Writes 16-channel audio data to an external device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outx.html>- -outx ::- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate ->- Arate -> Arate -> Arate -> Arate -> Arate -> Arate -> SignalOut-outx a0sig1 a1sig2 a2sig3 a3sig4 a4sig5 a5sig6 a6sig7 a7sig8 a8sig9- a9sig10 a10sig11 a11sig12 a12sig13 a13sig14 a14sig15 a15sig16- = outOpcode "outx" args- where args- = [to a0sig1, to a1sig2, to a2sig3, to a3sig4, to a4sig5,- to a5sig6, to a6sig7, to a7sig8, to a8sig9, to a9sig10,- to a10sig11, to a11sig12, to a12sig13, to a13sig14, to a14sig15,- to a15sig16]----- | * opcode : soundout--- --- --- * syntax : --- --- > soundout asig1, ifilcod [, iformat]--- --- --- * description : --- --- The usage of soundout is discouraged. Please use fout instead.--- --- --- * url : <http://www.csounds.com/manual/html/soundout.html>- -soundout :: [Irate] -> Arate -> String -> SignalOut-soundout i0init a1sig1 s2file = outOpcode "soundout" args- where args = [to a1sig1, to s2file] ++ map to i0init----- | * opcode : soundouts--- --- --- * syntax : --- --- > soundouts asigl, asigr, ifilcod [, iformat]--- --- --- * description : --- --- The usage of soundouts is discouraged. Please use fout instead.--- --- --- * url : <http://www.csounds.com/manual/html/soundouts.html>- -soundouts :: [Irate] -> Arate -> Arate -> String -> SignalOut-soundouts i0init a1sigl a2sigr s3file = outOpcode "soundouts" args- where args = [to a1sigl, to a2sigr, to s3file] ++ map to i0init----- | * opcode : outvalue--- --- --- * syntax : --- --- > outvalue "channel name", kvalue--- > outvalue "channel name", "string"--- --- --- * description : --- --- Sends a k-rate signal or string to a user-defined channel.--- --- --- * url : <http://www.csounds.com/manual/html/outvalue.html>- -outvalueK :: (K k0) => String -> k0 -> SignalOut-outvalueK s0channelname k1value = outOpcode "outvalue" args- where args = [to s0channelname, to k1value]----- | * opcode : outvalue--- --- --- * syntax : --- --- > outvalue "channel name", kvalue--- > outvalue "channel name", "string"--- --- --- * description : --- --- Sends a k-rate signal or string to a user-defined channel.--- --- --- * url : <http://www.csounds.com/manual/html/outvalue.html>- -outvalueS :: String -> String -> SignalOut-outvalueS s0channelname s1string = outOpcode "outvalue" args- where args = [to s0channelname, to s1string]----- | * opcode : outz--- --- --- * syntax : --- --- > outz ksig1--- --- --- * description : --- --- Writes multi-channel audio data from a ZAK array to an external--- device or stream.--- --- --- * url : <http://www.csounds.com/manual/html/outz.html>- -outz :: (K k0) => k0 -> SignalOut-outz k0sig1 = outOpcode "outz" args- where args = [to k0sig1]
− src/CsoundExpr/Opcodes/Sigio/Pdisplay.hs
@@ -1,234 +0,0 @@--- | Printing and Display-module CsoundExpr.Opcodes.Sigio.Pdisplay- (dispfft,- display,- flashtxt,- print',- printf,- printf_i,- printk,- printk2,- printks,- prints)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : dispfft--- --- --- * syntax : --- --- > dispfft xsig, iprd, iwsiz [, iwtyp] [, idbout] [, iwtflg]--- --- --- * description : --- --- These units will print orchestra init-values, or produce graphic--- display of orchestra control signals and audio signals. Uses X11--- windows if enabled, else (or if -g flag is set) displays are--- approximated in ASCII characters.--- --- --- * url : <http://www.csounds.com/manual/html/dispfft.html>- -dispfft :: (X x0) => [Irate] -> x0 -> Irate -> Irate -> SignalOut-dispfft i0init x1sig i2prd i3wsiz = outOpcode "dispfft" args- where args = [to x1sig, to i2prd, to i3wsiz] ++ map to i0init----- | * opcode : display--- --- --- * syntax : --- --- > display xsig, iprd [, inprds] [, iwtflg]--- --- --- * description : --- --- These units will print orchestra init-values, or produce graphic--- display of orchestra control signals and audio signals. Uses X11--- windows if enabled, else (or if -g flag is set) displays are--- approximated in ASCII characters.--- --- --- * url : <http://www.csounds.com/manual/html/display.html>- -display :: (X x0) => [Irate] -> x0 -> Irate -> SignalOut-display i0init x1sig i2prd = outOpcode "display" args- where args = [to x1sig, to i2prd] ++ map to i0init----- | * opcode : flashtxt--- --- --- * syntax : --- --- > flashtxt iwhich, String--- --- --- * description : --- --- Allows text to be displayed from instruments like sliders etc.--- (only on Unix and Windows at present)--- --- --- * url : <http://www.csounds.com/manual/html/flashtxt.html>- -flashtxt :: Irate -> String -> SignalOut-flashtxt i0which s1tring = outOpcode "flashtxt" args- where args = [to i0which, to s1tring]----- | * opcode : print--- --- --- * syntax : --- --- > print iarg [, iarg1] [, iarg2] [...]--- --- --- * description : --- --- These units will print orchestra init-values.--- --- --- * url : <http://www.csounds.com/manual/html/print.html>- -print' :: [Irate] -> SignalOut-print' i0argN = outOpcode "print" args- where args = map to i0argN----- | * opcode : printf--- --- --- * syntax : --- --- > printf_i Sfmt, itrig, [iarg1[, iarg2[,... ]]]--- > printf Sfmt, ktrig, [xarg1[, xarg2[,... ]]]--- --- --- * description : --- --- printf and printf_i write formatted output, similarly to the C--- function printf(). printf_i runs at i-time only, while printf--- runs both at initialization and performance time.--- --- --- * url : <http://www.csounds.com/manual/html/printf.html>- -printf :: (K k0, X x0) => String -> k0 -> [x0] -> SignalOut-printf s0fmt k1trig x2argN = outOpcode "printf" args- where args = [to s0fmt, to k1trig] ++ map to x2argN----- | * opcode : printf_i--- --- --- * syntax : --- --- > printf_i Sfmt, itrig, [iarg1[, iarg2[,... ]]]--- > printf Sfmt, ktrig, [xarg1[, xarg2[,... ]]]--- --- --- * description : --- --- printf and printf_i write formatted output, similarly to the C--- function printf(). printf_i runs at i-time only, while printf--- runs both at initialization and performance time.--- --- --- * url : <http://www.csounds.com/manual/html/printf.html>- -printf_i :: String -> Irate -> [Irate] -> SignalOut-printf_i s0fmt i1trig i2argN = outOpcode "printf_i" args- where args = [to s0fmt, to i1trig] ++ map to i2argN----- | * opcode : printk--- --- --- * syntax : --- --- > printk itime, kval [, ispace]--- --- --- * description : --- --- Prints one k-rate value at specified intervals.--- --- --- * url : <http://www.csounds.com/manual/html/printk.html>- -printk :: (K k0) => [Irate] -> Irate -> k0 -> SignalOut-printk i0init i1time k2val = outOpcode "printk" args- where args = [to i1time, to k2val] ++ map to i0init----- | * opcode : printk2--- --- --- * syntax : --- --- > printk2 kvar [, inumspaces]--- --- --- * description : --- --- Prints a new value every time a control variable changes.--- --- --- * url : <http://www.csounds.com/manual/html/printk2.html>- -printk2 :: (K k0) => [Irate] -> k0 -> SignalOut-printk2 i0init k1var = outOpcode "printk2" args- where args = [to k1var] ++ map to i0init----- | * opcode : printks--- --- --- * syntax : --- --- > printks "string", itime [, kval1] [, kval2] [...]--- --- --- * description : --- --- Prints at k-rate using a printf() style syntax.--- --- --- * url : <http://www.csounds.com/manual/html/printks.html>- -printks :: (K k0) => String -> Irate -> [k0] -> SignalOut-printks s0string i1time k2argN = outOpcode "printks" args- where args = [to s0string, to i1time] ++ map to k2argN----- | * opcode : prints--- --- --- * syntax : --- --- > prints "string" [, kval1] [, kval2] [...]--- --- --- * description : --- --- Prints at init-time using a printf() style syntax.--- --- --- * url : <http://www.csounds.com/manual/html/prints.html>- -prints :: (K k0) => String -> [k0] -> SignalOut-prints s0string k1argN = outOpcode "prints" args- where args = [to s0string] ++ map to k1argN
− src/CsoundExpr/Opcodes/Sigio/Queries.hs
@@ -1,95 +0,0 @@--- | Sound File Queries-module CsoundExpr.Opcodes.Sigio.Queries- (filelen,- filenchnls,- filepeak,- filesr)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : filelen--- --- --- * syntax : --- --- > ir filelen ifilcod, [iallowraw]--- --- --- * description : --- --- Returns the length of a sound file.--- --- --- * url : <http://www.csounds.com/manual/html/filelen.html>- -filelen :: [Irate] -> String -> Irate-filelen i0init s1file = opcode "filelen" args- where args = [to s1file] ++ map to i0init----- | * opcode : filenchnls--- --- --- * syntax : --- --- > ir filenchnls ifilcod [, iallowraw]--- --- --- * description : --- --- Returns the number of channels in a sound file.--- --- --- * url : <http://www.csounds.com/manual/html/filenchnls.html>- -filenchnls :: [Irate] -> String -> Irate-filenchnls i0init s1file = opcode "filenchnls" args- where args = [to s1file] ++ map to i0init----- | * opcode : filepeak--- --- --- * syntax : --- --- > ir filepeak ifilcod [, ichnl]--- --- --- * description : --- --- Returns the peak absolute value of a sound file.--- --- --- * url : <http://www.csounds.com/manual/html/filepeak.html>- -filepeak :: [Irate] -> String -> Irate-filepeak i0init s1file = opcode "filepeak" args- where args = [to s1file] ++ map to i0init----- | * opcode : filesr--- --- --- * syntax : --- --- > ir filesr ifilcod [, iallowraw]--- --- --- * description : --- --- Returns the sample rate of a sound file.--- --- --- * url : <http://www.csounds.com/manual/html/filesr.html>- -filesr :: [Irate] -> String -> Irate-filesr i0init s1file = opcode "filesr" args- where args = [to s1file] ++ map to i0init
− src/CsoundExpr/Opcodes/Sigio/SoftwareBus.hs
@@ -1,575 +0,0 @@--- | Software Bus-module CsoundExpr.Opcodes.Sigio.SoftwareBus- (chn_k,- chn_a,- chn_S,- chngetA,- chngetI,- chngetK,- chngetS,- chnsetA,- chnsetI,- chnsetK,- chnsetS,- chnsendA,- chnsendI,- chnsendK,- chnsendS,- chnrecvA,- chnrecvI,- chnrecvK,- chnrecvS,- chnclear,- chnmix,- chnparams)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : chn_k--- --- --- * syntax : --- --- > chn_k Sname, imode[, itype, idflt, imin, imax]--- > chn_a Sname, imode--- > chn_S Sname, imode--- --- --- * description : --- --- Declare a channel of the named software bus, with setting--- optional parameters in the case of a control channel. If the--- channel does not exist yet, it is created, with an inital value--- of zero or empty string. Otherwise, the type (control, audio, or--- string) of the existing channel must match the declaration, or an--- init error occurs. The input/output mode of an existing channel--- is updated so that it becomes the bitwise OR of the previous and--- the newly specified value.--- --- --- * url : <http://www.csounds.com/manual/html/chn.html>- -chn_k :: [Irate] -> String -> Irate -> SignalOut-chn_k i0init s1name i2mode = outOpcode "chn_k" args- where args = [to s1name, to i2mode] ++ map to i0init----- | * opcode : chn_a--- --- --- * syntax : --- --- > chn_k Sname, imode[, itype, idflt, imin, imax]--- > chn_a Sname, imode--- > chn_S Sname, imode--- --- --- * description : --- --- Declare a channel of the named software bus, with setting--- optional parameters in the case of a control channel. If the--- channel does not exist yet, it is created, with an inital value--- of zero or empty string. Otherwise, the type (control, audio, or--- string) of the existing channel must match the declaration, or an--- init error occurs. The input/output mode of an existing channel--- is updated so that it becomes the bitwise OR of the previous and--- the newly specified value.--- --- --- * url : <http://www.csounds.com/manual/html/chn.html>- -chn_a :: String -> Irate -> SignalOut-chn_a s0name i1mode = outOpcode "chn_a" args- where args = [to s0name, to i1mode]----- | * opcode : chn_S--- --- --- * syntax : --- --- > chn_k Sname, imode[, itype, idflt, imin, imax]--- > chn_a Sname, imode--- > chn_S Sname, imode--- --- --- * description : --- --- Declare a channel of the named software bus, with setting--- optional parameters in the case of a control channel. If the--- channel does not exist yet, it is created, with an inital value--- of zero or empty string. Otherwise, the type (control, audio, or--- string) of the existing channel must match the declaration, or an--- init error occurs. The input/output mode of an existing channel--- is updated so that it becomes the bitwise OR of the previous and--- the newly specified value.--- --- --- * url : <http://www.csounds.com/manual/html/chn.html>- -chn_S :: String -> Irate -> SignalOut-chn_S s0name i1mode = outOpcode "chn_S" args- where args = [to s0name, to i1mode]----- | * opcode : chnget--- --- --- * syntax : --- --- > ival chnget Sname--- > kval chnget Sname--- > aval chnget Sname--- > Sval chnget Sname--- --- --- * description : --- --- Reads data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnget.html>- -chngetA :: String -> Arate-chngetA s0name = opcode "chnget" args- where args = [to s0name]----- | * opcode : chnget--- --- --- * syntax : --- --- > ival chnget Sname--- > kval chnget Sname--- > aval chnget Sname--- > Sval chnget Sname--- --- --- * description : --- --- Reads data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnget.html>- -chngetI :: String -> Irate-chngetI s0name = opcode "chnget" args- where args = [to s0name]----- | * opcode : chnget--- --- --- * syntax : --- --- > ival chnget Sname--- > kval chnget Sname--- > aval chnget Sname--- > Sval chnget Sname--- --- --- * description : --- --- Reads data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnget.html>- -chngetK :: String -> Krate-chngetK s0name = opcode "chnget" args- where args = [to s0name]----- | * opcode : chnget--- --- --- * syntax : --- --- > ival chnget Sname--- > kval chnget Sname--- > aval chnget Sname--- > Sval chnget Sname--- --- --- * description : --- --- Reads data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnget.html>- -chngetS :: String -> String-chngetS s0name = opcode "chnget" args- where args = [to s0name]----- | * opcode : chnset--- --- --- * syntax : --- --- > chnset ival, Sname--- > chnset kval, Sname--- > chnset aval, Sname--- > chnset Sval, Sname--- --- --- * description : --- --- Write to a channel of the named software bus. Implies declaring--- the channel with imod=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnset.html>- -chnsetA :: Arate -> String -> SignalOut-chnsetA a0val s1name = outOpcode "chnset" args- where args = [to a0val, to s1name]----- | * opcode : chnset--- --- --- * syntax : --- --- > chnset ival, Sname--- > chnset kval, Sname--- > chnset aval, Sname--- > chnset Sval, Sname--- --- --- * description : --- --- Write to a channel of the named software bus. Implies declaring--- the channel with imod=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnset.html>- -chnsetI :: Irate -> String -> SignalOut-chnsetI i0val s1name = outOpcode "chnset" args- where args = [to i0val, to s1name]----- | * opcode : chnset--- --- --- * syntax : --- --- > chnset ival, Sname--- > chnset kval, Sname--- > chnset aval, Sname--- > chnset Sval, Sname--- --- --- * description : --- --- Write to a channel of the named software bus. Implies declaring--- the channel with imod=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnset.html>- -chnsetK :: (K k0) => k0 -> String -> SignalOut-chnsetK k0val s1name = outOpcode "chnset" args- where args = [to k0val, to s1name]----- | * opcode : chnset--- --- --- * syntax : --- --- > chnset ival, Sname--- > chnset kval, Sname--- > chnset aval, Sname--- > chnset Sval, Sname--- --- --- * description : --- --- Write to a channel of the named software bus. Implies declaring--- the channel with imod=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnset.html>- -chnsetS :: String -> String -> SignalOut-chnsetS s0val s1name = outOpcode "chnset" args- where args = [to s0val, to s1name]----- | * opcode : chnsend--- --- --- * syntax : --- --- > chnsend ival, Sname--- > chnsend kval, Sname--- > chnsend aval, Sname--- > chnsend Sval, Sname--- --- --- * description : --- --- Send to a channel of the named software bus. Implies declaring--- the channel with imode=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnsend.html>- -chnsendA :: Arate -> String -> SignalOut-chnsendA a0val s1name = outOpcode "chnsend" args- where args = [to a0val, to s1name]----- | * opcode : chnsend--- --- --- * syntax : --- --- > chnsend ival, Sname--- > chnsend kval, Sname--- > chnsend aval, Sname--- > chnsend Sval, Sname--- --- --- * description : --- --- Send to a channel of the named software bus. Implies declaring--- the channel with imode=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnsend.html>- -chnsendI :: Irate -> String -> SignalOut-chnsendI i0val s1name = outOpcode "chnsend" args- where args = [to i0val, to s1name]----- | * opcode : chnsend--- --- --- * syntax : --- --- > chnsend ival, Sname--- > chnsend kval, Sname--- > chnsend aval, Sname--- > chnsend Sval, Sname--- --- --- * description : --- --- Send to a channel of the named software bus. Implies declaring--- the channel with imode=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnsend.html>- -chnsendK :: (K k0) => k0 -> String -> SignalOut-chnsendK k0val s1name = outOpcode "chnsend" args- where args = [to k0val, to s1name]----- | * opcode : chnsend--- --- --- * syntax : --- --- > chnsend ival, Sname--- > chnsend kval, Sname--- > chnsend aval, Sname--- > chnsend Sval, Sname--- --- --- * description : --- --- Send to a channel of the named software bus. Implies declaring--- the channel with imode=2 (see also chn_k, chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnsend.html>- -chnsendS :: String -> String -> SignalOut-chnsendS s0val s1name = outOpcode "chnsend" args- where args = [to s0val, to s1name]----- | * opcode : chnrecv--- --- --- * syntax : --- --- > ival chnrecv Sname--- > kval chnrecv Sname--- > aval chnrecv Sname--- > Sval chnrecv Sname--- --- --- * description : --- --- Receives data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnrecv.html>- -chnrecvA :: String -> Arate-chnrecvA s0name = opcode "chnrecv" args- where args = [to s0name]----- | * opcode : chnrecv--- --- --- * syntax : --- --- > ival chnrecv Sname--- > kval chnrecv Sname--- > aval chnrecv Sname--- > Sval chnrecv Sname--- --- --- * description : --- --- Receives data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnrecv.html>- -chnrecvI :: String -> Irate-chnrecvI s0name = opcode "chnrecv" args- where args = [to s0name]----- | * opcode : chnrecv--- --- --- * syntax : --- --- > ival chnrecv Sname--- > kval chnrecv Sname--- > aval chnrecv Sname--- > Sval chnrecv Sname--- --- --- * description : --- --- Receives data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnrecv.html>- -chnrecvK :: String -> Krate-chnrecvK s0name = opcode "chnrecv" args- where args = [to s0name]----- | * opcode : chnrecv--- --- --- * syntax : --- --- > ival chnrecv Sname--- > kval chnrecv Sname--- > aval chnrecv Sname--- > Sval chnrecv Sname--- --- --- * description : --- --- Receives data from a channel of the inward named software bus.--- Implies declaring the channel with imode=1 (see also chn_k,--- chn_a, and chn_S).--- --- --- * url : <http://www.csounds.com/manual/html/chnrecv.html>- -chnrecvS :: String -> String-chnrecvS s0name = opcode "chnrecv" args- where args = [to s0name]----- | * opcode : chnclear--- --- --- * syntax : --- --- > chnclear Sname--- --- --- * description : --- --- Clears an audio channel of the named software bus to zero.--- Implies declaring the channel with imode=2 (see also chn_a).--- --- --- * url : <http://www.csounds.com/manual/html/chnclear.html>- -chnclear :: String -> SignalOut-chnclear s0name = outOpcode "chnclear" args- where args = [to s0name]----- | * opcode : chnmix--- --- --- * syntax : --- --- > chnmix aval, Sname--- --- --- * description : --- --- Adds an audio signal to a channel of the named software bus.--- Implies declaring the channel with imode=2 (see also chn_a).--- --- --- * url : <http://www.csounds.com/manual/html/chnmix.html>- -chnmix :: Arate -> String -> SignalOut-chnmix a0val s1name = outOpcode "chnmix" args- where args = [to a0val, to s1name]----- | * opcode : chnparams--- --- --- * syntax : --- --- > itype, imode, ictltype, idflt, imin, imax chnparams--- --- --- * description : --- --- Query parameters of a channel (if it does not exist, all--- returned values are zero).--- --- --- * url : <http://www.csounds.com/manual/html/chnparams.html>- -chnparams :: MultiOut-chnparams = opcode "chnparams" args- where args = []
− src/CsoundExpr/Opcodes/Sigmod.hs
@@ -1,30 +0,0 @@--- | Signal Modifiers-module CsoundExpr.Opcodes.Sigmod- (module CsoundExpr.Opcodes.Sigmod.SigProcAmpMod,- module CsoundExpr.Opcodes.Sigmod.SigProcConmorph,- module CsoundExpr.Opcodes.Sigmod.Delay,- module CsoundExpr.Opcodes.Sigmod.Panspatl,- module CsoundExpr.Opcodes.Sigmod.Reverbtn,- module CsoundExpr.Opcodes.Sigmod.Sample,- module CsoundExpr.Opcodes.Sigmod.Siglimit,- module CsoundExpr.Opcodes.Sigmod.Speciale,- module CsoundExpr.Opcodes.Sigmod.Standard,- module CsoundExpr.Opcodes.Sigmod.Speciali,- module CsoundExpr.Opcodes.Sigmod.Wavguide,- module CsoundExpr.Opcodes.Sigmod.Wavshape)-where----import CsoundExpr.Opcodes.Sigmod.SigProcAmpMod-import CsoundExpr.Opcodes.Sigmod.SigProcConmorph-import CsoundExpr.Opcodes.Sigmod.Delay-import CsoundExpr.Opcodes.Sigmod.Panspatl-import CsoundExpr.Opcodes.Sigmod.Reverbtn-import CsoundExpr.Opcodes.Sigmod.Sample-import CsoundExpr.Opcodes.Sigmod.Siglimit-import CsoundExpr.Opcodes.Sigmod.Speciale-import CsoundExpr.Opcodes.Sigmod.Standard-import CsoundExpr.Opcodes.Sigmod.Speciali-import CsoundExpr.Opcodes.Sigmod.Wavguide-import CsoundExpr.Opcodes.Sigmod.Wavshape
− src/CsoundExpr/Opcodes/Sigmod/Delay.hs
@@ -1,464 +0,0 @@--- | Delay-module CsoundExpr.Opcodes.Sigmod.Delay- (delay,- delay1,- delayk,- delayr,- delayw,- deltap,- deltap3,- deltapi,- deltapn,- deltapx,- deltapxw,- vdelay,- vdelay3,- vdelayx,- vdelayxs,- vdelayxq,- vdelayxw,- vdelayxwq,- vdelayxws,- multitap)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : delay--- --- --- * syntax : --- --- > ares delay asig, idlt [, iskip]--- --- --- * description : --- --- A signal can be read from or written into a delay path, or it--- can be automatically delayed by some time interval.--- --- --- * url : <http://www.csounds.com/manual/html/delay.html>- -delay :: [Irate] -> Arate -> Irate -> Arate-delay i0init a1sig i2dlt = opcode "delay" args- where args = [to a1sig, to i2dlt] ++ map to i0init----- | * opcode : delay1--- --- --- * syntax : --- --- > ares delay1 asig [, iskip]--- --- --- * description : --- --- Delays an input signal by one sample.--- --- --- * url : <http://www.csounds.com/manual/html/delay1.html>- -delay1 :: [Irate] -> Arate -> Arate-delay1 i0init a1sig = opcode "delay1" args- where args = [to a1sig] ++ map to i0init----- | * opcode : delayk--- --- --- * syntax : --- --- > kr delayk ksig, idel[, imode]--- > kr vdel_k ksig, kdel, imdel[, imode]--- --- --- * description : --- --- k-rate delay opcodes--- --- --- * url : <http://www.csounds.com/manual/html/delayk.html>- -delayk :: (K k0) => [Irate] -> k0 -> Irate -> Krate-delayk i0init k1sig i2del = opcode "delayk" args- where args = [to k1sig, to i2del] ++ map to i0init----- | * opcode : delayr--- --- --- * syntax : --- --- > ares delayr idlt [, iskip]--- --- --- * description : --- --- Reads from an automatically established digital delay line.--- --- --- * url : <http://www.csounds.com/manual/html/delayr.html>- -delayr :: [Irate] -> Irate -> Arate-delayr i0init i1dlt = opcode "delayr" args- where args = [to i1dlt] ++ map to i0init----- | * opcode : delayw--- --- --- * syntax : --- --- > delayw asig--- --- --- * description : --- --- Writes the audio signal to a digital delay line.--- --- --- * url : <http://www.csounds.com/manual/html/delayw.html>- -delayw :: Arate -> SignalOut-delayw a0sig = outOpcode "delayw" args- where args = [to a0sig]----- | * opcode : deltap--- --- --- * syntax : --- --- > ares deltap kdlt--- --- --- * description : --- --- Tap a delay line at variable offset times.--- --- --- * url : <http://www.csounds.com/manual/html/deltap.html>- -deltap :: (K k0) => k0 -> Arate-deltap k0dlt = opcode "deltap" args- where args = [to k0dlt]----- | * opcode : deltap3--- --- --- * syntax : --- --- > ares deltap3 xdlt--- --- --- * description : --- --- Taps a delay line at variable offset times, uses cubic--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/deltap3.html>- -deltap3 :: (X x0) => x0 -> Arate-deltap3 x0dlt = opcode "deltap3" args- where args = [to x0dlt]----- | * opcode : deltapi--- --- --- * syntax : --- --- > ares deltapi xdlt--- --- --- * description : --- --- Taps a delay line at variable offset times, uses interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/deltapi.html>- -deltapi :: (X x0) => x0 -> Arate-deltapi x0dlt = opcode "deltapi" args- where args = [to x0dlt]----- | * opcode : deltapn--- --- --- * syntax : --- --- > ares deltapn xnumsamps--- --- --- * description : --- --- Tap a delay line at variable offset times.--- --- --- * url : <http://www.csounds.com/manual/html/deltapn.html>- -deltapn :: (X x0) => x0 -> Arate-deltapn x0numsamps = opcode "deltapn" args- where args = [to x0numsamps]----- | * opcode : deltapx--- --- --- * syntax : --- --- > aout deltapx adel, iwsize--- --- --- * description : --- --- deltapx is similar to deltapi or deltap3. However, it allows--- higher quality interpolation. This opcode can read from and write--- to a delayr/delayw delay line with interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/deltapx.html>- -deltapx :: Arate -> Irate -> Arate-deltapx a0del i1wsize = opcode "deltapx" args- where args = [to a0del, to i1wsize]----- | * opcode : deltapxw--- --- --- * syntax : --- --- > deltapxw ain, adel, iwsize--- --- --- * description : --- --- deltapxw mixes the input signal to a delay line. This opcode can--- be mixed with reading units (deltap, deltapn, deltapi, deltap3,--- and deltapx) in any order; the actual delay time is the--- difference of the read and write time. This opcode can read from--- and write to a delayr/delayw delay line with interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/deltapxw.html>- -deltapxw :: Arate -> Arate -> Irate -> SignalOut-deltapxw a0in a1del i2wsize = outOpcode "deltapxw" args- where args = [to a0in, to a1del, to i2wsize]----- | * opcode : vdelay--- --- --- * syntax : --- --- > ares vdelay asig, adel, imaxdel [, iskip]--- --- --- * description : --- --- This is an interpolating variable time delay, it is not very--- different from the existing implementation (deltapi), it is only--- easier to use.--- --- --- * url : <http://www.csounds.com/manual/html/vdelay.html>- -vdelay :: [Irate] -> Arate -> Arate -> Irate -> Arate-vdelay i0init a1sig a2del i3maxdel = opcode "vdelay" args- where args = [to a1sig, to a2del, to i3maxdel] ++ map to i0init----- | * opcode : vdelay3--- --- --- * syntax : --- --- > ares vdelay3 asig, adel, imaxdel [, iskip]--- --- --- * description : --- --- vdelay3 is experimental. It is the same as vdelay except that it--- uses cubic interpolation. (New in Version 3.50.)--- --- --- * url : <http://www.csounds.com/manual/html/vdelay3.html>- -vdelay3 :: [Irate] -> Arate -> Arate -> Irate -> Arate-vdelay3 i0init a1sig a2del i3maxdel = opcode "vdelay3" args- where args = [to a1sig, to a2del, to i3maxdel] ++ map to i0init----- | * opcode : vdelayx--- --- --- * syntax : --- --- > aout vdelayx ain, adl, imd, iws [, ist]--- --- --- * description : --- --- A variable delay opcode with high quality interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/vdelayx.html>- -vdelayx :: [Irate] -> Arate -> Arate -> Irate -> Irate -> Arate-vdelayx i0init a1in a2dl i3md i4ws = opcode "vdelayx" args- where args = [to a1in, to a2dl, to i3md, to i4ws] ++ map to i0init----- | * opcode : vdelayxs--- --- --- * syntax : --- --- > aout1, aout2 vdelayxs ain1, ain2, adl, imd, iws [, ist]--- --- --- * description : --- --- A stereo variable delay opcode with high quality interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/vdelayxs.html>- -vdelayxs ::- [Irate] -> Arate -> Arate -> Arate -> Irate -> Irate -> MultiOut-vdelayxs i0init a1in1 a2in2 a3dl i4md i5ws = opcode "vdelayxs" args- where args- = [to a1in1, to a2in2, to a3dl, to i4md, to i5ws] ++ map to i0init----- | * opcode : vdelayxq--- --- --- * syntax : --- --- > aout1, aout2, aout3, aout4 vdelayxq ain1, ain2, ain3, ain4, adl, imd, iws [, ist]--- --- --- * description : --- --- A 4-channel variable delay opcode with high quality--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/vdelayxq.html>- -vdelayxq ::- [Irate] ->- Arate ->- Arate -> Arate -> Arate -> Arate -> Irate -> Irate -> MultiOut-vdelayxq i0init a1in1 a2in2 a3in3 a4in4 a5dl i6md i7ws- = opcode "vdelayxq" args- where args- = [to a1in1, to a2in2, to a3in3, to a4in4, to a5dl, to i6md,- to i7ws]- ++ map to i0init----- | * opcode : vdelayxw--- --- --- * syntax : --- --- > aout vdelayxw ain, adl, imd, iws [, ist]--- --- --- * description : --- --- Variable delay opcodes with high quality interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/vdelayxw.html>- -vdelayxw :: [Irate] -> Arate -> Arate -> Irate -> Irate -> Arate-vdelayxw i0init a1in a2dl i3md i4ws = opcode "vdelayxw" args- where args = [to a1in, to a2dl, to i3md, to i4ws] ++ map to i0init----- | * opcode : vdelayxwq--- --- --- * syntax : --- --- > aout1, aout2, aout3, aout4 vdelayxwq ain1, ain2, ain3, ain4, adl, --- > imd, iws [, ist]--- --- --- * description : --- --- Variable delay opcodes with high quality interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/vdelayxwq.html>- -vdelayxwq ::- [Irate] ->- Arate ->- Arate -> Arate -> Arate -> Arate -> Irate -> Irate -> MultiOut-vdelayxwq i0init a1in1 a2in2 a3in3 a4in4 a5dl i6md i7ws- = opcode "vdelayxwq" args- where args- = [to a1in1, to a2in2, to a3in3, to a4in4, to a5dl, to i6md,- to i7ws]- ++ map to i0init----- | * opcode : vdelayxws--- --- --- * syntax : --- --- > aout1, aout2 vdelayxws ain1, ain2, adl, imd, iws [, ist]--- --- --- * description : --- --- Variable delay opcodes with high quality interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/vdelayxws.html>- -vdelayxws ::- [Irate] -> Arate -> Arate -> Arate -> Irate -> Irate -> MultiOut-vdelayxws i0init a1in1 a2in2 a3dl i4md i5ws- = opcode "vdelayxws" args- where args- = [to a1in1, to a2in2, to a3dl, to i4md, to i5ws] ++ map to i0init----- | * opcode : multitap--- --- --- * syntax : --- --- > ares multitap asig [, itime1] [, igain1] [, itime2] [, igain2] [...]--- --- --- * description : --- --- Multitap delay line implementation.--- --- --- * url : <http://www.csounds.com/manual/html/multitap.html>- -multitap :: Arate -> [Irate] -> Arate-multitap a0sig i1vals = opcode "multitap" args- where args = [to a0sig] ++ map to i1vals
− src/CsoundExpr/Opcodes/Sigmod/Panspatl.hs
@@ -1,711 +0,0 @@--- | Panning and Spatialization-module CsoundExpr.Opcodes.Sigmod.Panspatl- (locsend,- locsig,- pan,- pan2,- space,- spdist,- spsend,- spat3d,- spat3di,- spat3dt,- vbap16,- vbap16move,- vbap4,- vbap4move,- vbap8,- vbap8move,- vbaplsinit,- vbapz,- vbapzmove,- hrtfer,- hrtfmove,- hrtfmove2,- hrtfstat,- bformdec,- bformenc,- bformencK)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : locsend--- --- --- * syntax : --- --- > a1, a2 locsend--- > a1, a2, a3, a4 locsend--- --- --- * description : --- --- locsend depends upon the existence of a previously defined--- locsig. The number of output signals must match the number in the--- previous locsig. The output signals from locsend are derived from--- the values given for distance and reverb in the locsig and are--- ready to be sent to local or global reverb units (see example--- below). The reverb amount and the balance between the 2 or 4--- channels are calculated in the same way as described in the Dodge--- book (an essential text!).--- --- --- * url : <http://www.csounds.com/manual/html/locsend.html>- -locsend :: MultiOut-locsend = opcode "locsend" args- where args = []----- | * opcode : locsig--- --- --- * syntax : --- --- > a1, a2 locsig asig, kdegree, kdistance, kreverbsend--- > a1, a2, a3, a4 locsig asig, kdegree, kdistance, kreverbsend--- --- --- * description : --- --- locsig takes an input signal and distributes it among 2 or 4--- channels using values in degrees to calculate the balance between--- adjacent channels. It also takes arguments for distance (used to--- attenuate signals that are to sound as if they are some distance--- further than the loudspeaker itself), and for the amount the--- signal that will be sent to reverberators. This unit is based--- upon the example in the Charles Dodge/Thomas Jerse book, Computer--- Music, page 320.--- --- --- * url : <http://www.csounds.com/manual/html/locsig.html>- -locsig :: (K k0, K k1, K k2) => Arate -> k0 -> k1 -> k2 -> MultiOut-locsig a0sig k1degree k2distance k3reverbsend- = opcode "locsig" args- where args- = [to a0sig, to k1degree, to k2distance, to k3reverbsend]----- | * opcode : pan--- --- --- * syntax : --- --- > a1, a2, a3, a4 pan asig, kx, ky, ifn [, imode] [, ioffset]--- --- --- * description : --- --- Distribute an audio signal amongst four channels with--- localization control.--- --- --- * url : <http://www.csounds.com/manual/html/pan.html>- -pan ::- (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Irate -> MultiOut-pan i0init a1sig k2x k3y i4fn = opcode "pan" args- where args = [to a1sig, to k2x, to k3y, to i4fn] ++ map to i0init----- | * opcode : pan2--- --- --- * syntax : --- --- > a1, a2 pan2 asig, xp [, imode]--- --- --- * description : --- --- Distribute an audio signal across two channels with a choice of--- methods.--- --- --- * url : <http://www.csounds.com/manual/html/pan2.html>- -pan2 :: (X x0) => [Irate] -> Arate -> x0 -> MultiOut-pan2 i0init a1sig x2p = opcode "pan2" args- where args = [to a1sig, to x2p] ++ map to i0init----- | * opcode : space--- --- --- * syntax : --- --- > a1, a2, a3, a4 space asig, ifn, ktime, kreverbsend, kx, ky--- --- --- * description : --- --- space takes an input signal and distributes it among 4 channels--- using Cartesian xy coordinates to calculate the balance of the--- outputs. The xy coordinates can be defined in a separate text--- file and accessed through a Function statement in the score using--- Gen28, or they can be specified using the optional kx, ky--- arguments. The advantages to the former are:--- --- --- * url : <http://www.csounds.com/manual/html/space.html>- -space ::- (K k0, K k1, K k2, K k3) =>- Arate -> Irate -> k0 -> k1 -> k2 -> k3 -> MultiOut-space a0sig i1fn k2time k3reverbsend k4x k5y = opcode "space" args- where args- = [to a0sig, to i1fn, to k2time, to k3reverbsend, to k4x, to k5y]----- | * opcode : spdist--- --- --- * syntax : --- --- > k1 spdist ifn, ktime, kx, ky--- --- --- * description : --- --- spdist uses the same xy data as space, also either from a text--- file using Gen28 or from x and y arguments given to the unit--- directly. The purpose of this unit is to make available the--- values for distance that are calculated from the xy coordinates.--- --- --- * url : <http://www.csounds.com/manual/html/spdist.html>- -spdist :: (K k0, K k1, K k2) => Irate -> k0 -> k1 -> k2 -> Krate-spdist i0fn k1time k2x k3y = opcode "spdist" args- where args = [to i0fn, to k1time, to k2x, to k3y]----- | * opcode : spsend--- --- --- * syntax : --- --- > a1, a2, a3, a4 spsend--- --- --- * description : --- --- spsend depends upon the existence of a previously defined space.--- The output signals from spsend are derived from the values given--- for xy and reverb in the space and are ready to be sent to local--- or global reverb units (see example below).--- --- --- * url : <http://www.csounds.com/manual/html/spsend.html>- -spsend :: MultiOut-spsend = opcode "spsend" args- where args = []----- | * opcode : spat3d--- --- --- * syntax : --- --- > aW, aX, aY, aZ spat3d ain, kX, kY, kZ, idist, ift, imode, imdel, iovr [, istor]--- --- --- * description : --- --- This opcode positions the input sound in a 3D space, with--- optional simulation of room acoustics, in various output formats.--- spat3d allows moving the sound at k-rate (this movement is--- interpolated internally to eliminate "zipper noise" if sr not--- equal to kr).--- --- --- * url : <http://www.csounds.com/manual/html/spat3d.html>- -spat3d ::- (K k0, K k1, K k2) =>- [Irate] ->- Arate ->- k0 ->- k1 -> k2 -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-spat3d i0init a1in k2X k3Y k4Z i5dist i6ft i7mode i8mdel i9ovr- = opcode "spat3d" args- where args- = [to a1in, to k2X, to k3Y, to k4Z, to i5dist, to i6ft, to i7mode,- to i8mdel, to i9ovr]- ++ map to i0init----- | * opcode : spat3di--- --- --- * syntax : --- --- > aW, aX, aY, aZ spat3di ain, iX, iY, iZ, idist, ift, imode [, istor]--- --- --- * description : --- --- This opcode positions the input sound in a 3D space, with--- optional simulation of room acoustics, in various output formats.--- With spat3di, sound source position is set at i-time.--- --- --- * url : <http://www.csounds.com/manual/html/spat3di.html>- -spat3di ::- [Irate] ->- Arate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> MultiOut-spat3di i0init a1in i2X i3Y i4Z i5dist i6ft i7mode- = opcode "spat3di" args- where args- = [to a1in, to i2X, to i3Y, to i4Z, to i5dist, to i6ft, to i7mode]- ++ map to i0init----- | * opcode : spat3dt--- --- --- * syntax : --- --- > spat3dt ioutft, iX, iY, iZ, idist, ift, imode, irlen [, iftnocl]--- --- --- * description : --- --- This opcode positions the input sound in a 3D space, with--- optional simulation of room acoustics, in various output formats.--- spat3dt can be used to render the impulse response at i-time,--- storing output in a function table, suitable for convolution.--- --- --- * url : <http://www.csounds.com/manual/html/spat3dt.html>- -spat3dt ::- [Irate] ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-spat3dt i0init i1outft i2X i3Y i4Z i5dist i6ft i7mode i8rlen- = outOpcode "spat3dt" args- where args- = [to i1outft, to i2X, to i3Y, to i4Z, to i5dist, to i6ft,- to i7mode, to i8rlen]- ++ map to i0init----- | * opcode : vbap16--- --- --- * syntax : --- --- > ar1,..., ar16 vbap16 asig, kazim [, kelev] [, kspread]--- --- --- * description : --- --- Distributes an audio signal among 16 channels.--- --- --- * url : <http://www.csounds.com/manual/html/vbap16.html>- -vbap16 :: (K k0, K k1) => [k0] -> Arate -> k1 -> MultiOut-vbap16 k0init a1sig k2azim = opcode "vbap16" args- where args = [to a1sig, to k2azim] ++ map to k0init----- | * opcode : vbap16move--- --- --- * syntax : --- --- > ar1,..., ar16 vbap16move asig, idur, ispread, ifldnum, ifld1 --- > [, ifld2] [...]--- --- --- * description : --- --- Distribute an audio signal among 16 channels with moving virtual--- sources.--- --- --- * url : <http://www.csounds.com/manual/html/vbap16move.html>- -vbap16move ::- Arate -> Irate -> Irate -> Irate -> [Irate] -> MultiOut-vbap16move a0sig i1dur i2spread i3fldnum i4fldN- = opcode "vbap16move" args- where args- = [to a0sig, to i1dur, to i2spread, to i3fldnum] ++ map to i4fldN----- | * opcode : vbap4--- --- --- * syntax : --- --- > ar1, ar2, ar3, ar4 vbap4 asig, kazim [, kelev] [, kspread]--- --- --- * description : --- --- Distributes an audio signal among 4 channels.--- --- --- * url : <http://www.csounds.com/manual/html/vbap4.html>- -vbap4 :: (K k0, K k1) => [k0] -> Arate -> k1 -> MultiOut-vbap4 k0init a1sig k2azim = opcode "vbap4" args- where args = [to a1sig, to k2azim] ++ map to k0init----- | * opcode : vbap4move--- --- --- * syntax : --- --- > ar1, ar2, ar3, ar4 vbap4move asig, idur, ispread, ifldnum, ifld1 --- > [, ifld2] [...]--- --- --- * description : --- --- Distributes an audio signal among 4 channels with moving virtual--- sources.--- --- --- * url : <http://www.csounds.com/manual/html/vbap4move.html>- -vbap4move ::- Arate -> Irate -> Irate -> Irate -> [Irate] -> MultiOut-vbap4move a0sig i1dur i2spread i3fldnum i4fldN- = opcode "vbap4move" args- where args- = [to a0sig, to i1dur, to i2spread, to i3fldnum] ++ map to i4fldN----- | * opcode : vbap8--- --- --- * syntax : --- --- > ar1,..., ar8 vbap8 asig, kazim [, kelev] [, kspread]--- --- --- * description : --- --- Distributes an audio signal among 8 channels.--- --- --- * url : <http://www.csounds.com/manual/html/vbap8.html>- -vbap8 :: (K k0, K k1) => [k0] -> Arate -> k1 -> MultiOut-vbap8 k0init a1sig k2azim = opcode "vbap8" args- where args = [to a1sig, to k2azim] ++ map to k0init----- | * opcode : vbap8move--- --- --- * syntax : --- --- > ar1,..., ar8 vbap8move asig, idur, ispread, ifldnum, ifld1 --- > [, ifld2] [...]--- --- --- * description : --- --- Distributes an audio signal among 8 channels with moving virtual--- sources.--- --- --- * url : <http://www.csounds.com/manual/html/vbap8move.html>- -vbap8move ::- Arate -> Irate -> Irate -> Irate -> [Irate] -> MultiOut-vbap8move a0sig i1dur i2spread i3fldnum i4fldN- = opcode "vbap8move" args- where args- = [to a0sig, to i1dur, to i2spread, to i3fldnum] ++ map to i4fldN----- | * opcode : vbaplsinit--- --- --- * syntax : --- --- > vbaplsinit idim, ilsnum [, idir1] [, idir2] [...] [, idir32]--- --- --- * description : --- --- Configures VBAP output according to loudspeaker parameters.--- --- --- * url : <http://www.csounds.com/manual/html/vbaplsinit.html>- -vbaplsinit :: Irate -> Irate -> [Irate] -> SignalOut-vbaplsinit i0dim i1lsnum i2dirN = outOpcode "vbaplsinit" args- where args = [to i0dim, to i1lsnum] ++ map to i2dirN----- | * opcode : vbapz--- --- --- * syntax : --- --- > vbapz inumchnls, istartndx, asig, kazim [, kelev] [, kspread]--- --- --- * description : --- --- Writes a multi-channel audio signal to a ZAK array.--- --- --- * url : <http://www.csounds.com/manual/html/vbapz.html>- -vbapz ::- (K k0, K k1) => [k0] -> Irate -> Irate -> Arate -> k1 -> SignalOut-vbapz k0init i1numchnls i2startndx a3sig k4azim- = outOpcode "vbapz" args- where args- = [to i1numchnls, to i2startndx, to a3sig, to k4azim] ++- map to k0init----- | * opcode : vbapzmove--- --- --- * syntax : --- --- > vbapzmove inumchnls, istartndx, asig, idur, ispread, ifldnum, ifld1, --- > ifld2, [...]--- --- --- * description : --- --- Writes a multi-channel audio signal to a ZAK array with moving--- virtual sources.--- --- --- * url : <http://www.csounds.com/manual/html/vbapzmove.html>- -vbapzmove ::- Irate ->- Irate -> Arate -> Irate -> Irate -> Irate -> [Irate] -> SignalOut-vbapzmove i0numchnls i1startndx a2sig i3dur i4spread i5fldnum- i6fldN = outOpcode "vbapzmove" args- where args- = [to i0numchnls, to i1startndx, to a2sig, to i3dur, to i4spread,- to i5fldnum]- ++ map to i6fldN----- | * opcode : hrtfer--- --- --- * syntax : --- --- > aleft, aright hrtfer asig, kaz, kelev, âHRTFcompactâ--- --- --- * description : --- --- Output is binaural (headphone) 3D audio.--- --- --- * url : <http://www.csounds.com/manual/html/hrtfer.html>- -hrtfer :: (K k0, K k1) => Arate -> k0 -> k1 -> MultiOut-hrtfer a0sig k1az k2elev = opcode "hrtfer" args- where args = [to a0sig, to k1az, to k2elev]----- | * opcode : hrtfmove--- --- --- * syntax : --- --- > aleft, aright hrtfmove asrc, kAz, kElev, ifilel, ifiler [, imode, ifade, isr]--- --- --- * description : --- --- This opcode takes a source signal and spatialises it in the 3--- dimensional space around a listener by convolving the source with--- stored head related transfer function (HRTF) based filters.--- --- --- * url : <http://www.csounds.com/manual/html/hrtfmove.html>- -hrtfmove ::- (K k0, K k1) =>- [Irate] -> Arate -> k0 -> k1 -> Irate -> Irate -> MultiOut-hrtfmove i0init a1src k2Az k3Elev i4filel i5filer- = opcode "hrtfmove" args- where args- = [to a1src, to k2Az, to k3Elev, to i4filel, to i5filer] ++- map to i0init----- | * opcode : hrtfmove2--- --- --- * syntax : --- --- > aleft, aright hrtfmove2 asrc, kAz, kElev, ifilel, ifiler [,ioverlap, iradius, isr]--- --- --- * description : --- --- This opcode takes a source signal and spatialises it in the 3--- dimensional space around a listener using head related transfer--- function (HRTF) based filters.--- --- --- * url : <http://www.csounds.com/manual/html/hrtfmove2.html>- -hrtfmove2 ::- (K k0, K k1) =>- [Irate] -> Arate -> k0 -> k1 -> Irate -> Irate -> MultiOut-hrtfmove2 i0init a1src k2Az k3Elev i4filel i5filer- = opcode "hrtfmove2" args- where args- = [to a1src, to k2Az, to k3Elev, to i4filel, to i5filer] ++- map to i0init----- | * opcode : hrtfstat--- --- --- * syntax : --- --- > aleft, aright hrtfstat asrc, iAz, iElev, ifilel, ifiler [,iradius, isr]--- --- --- * description : --- --- This opcode takes a source signal and spatialises it in the 3--- dimensional space around a listener using head related transfer--- function (HRTF) based filters. It produces a static output--- (azimuth and elevation parameters are i-rate), because a static--- source allows much more efficient processing than hrtfmove and--- hrtfmove2,.--- --- --- * url : <http://www.csounds.com/manual/html/hrtfstat.html>- -hrtfstat ::- [Irate] -> Arate -> Irate -> Irate -> Irate -> Irate -> MultiOut-hrtfstat i0init a1src i2Az i3Elev i4filel i5filer- = opcode "hrtfstat" args- where args- = [to a1src, to i2Az, to i3Elev, to i4filel, to i5filer] ++- map to i0init----- | * opcode : bformdec--- --- --- * syntax : --- --- > ao1, ao2 bformdec isetup, aw, ax, ay, az [, ar, as, at, au, av --- > [, abk, al, am, an, ao, ap, aq]]--- > ao1, ao2, ao3, ao4 bformdec isetup, aw, ax, ay, az [, ar, as, at, --- > au, av [, abk, al, am, an, ao, ap, aq]]--- > ao1, ao2, ao3, ao4, ao5 bformdec isetup, aw, ax, ay, az [, ar, as, --- > at, au, av [, abk, al, am, an, ao, ap, aq]]--- > ao1, ao2, ao3, ao4, ao5, ao6, ao7, ao8 bformdec isetup, aw, ax, ay, az --- > [, ar, as, at, au, av [, abk, al, am, an, ao, ap, aq]]]--- --- --- * description : --- --- Decodes an ambisonic B format signal into loudspeaker specific--- signals. Note that this opcode is deprecated as it is inaccurate,--- and is replaced by the much better opcode bformdec1 which--- replicates all the important features.--- --- --- * url : <http://www.csounds.com/manual/html/bformdec.html>- -bformdec ::- [Arate] -> Irate -> Arate -> Arate -> Arate -> Arate -> MultiOut-bformdec a0init i1setup a2w a3x a4y a5z = opcode "bformdec" args- where args- = [to i1setup, to a2w, to a3x, to a4y, to a5z] ++ map to a0init----- | * opcode : bformenc--- --- --- * syntax : --- --- > aw, ax, ay, az bformenc asig, kalpha, kbeta, kord0, kord1--- > aw, ax, ay, az, ar, as, at, au, av bformenc asig, kalpha, kbeta, --- > kord0, kord1, kord2--- > aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq bformenc --- > asig, kalpha, kbeta, kord0, kord1, kord2, kord3--- --- --- * description : --- --- Codes a signal into the ambisonic B format. Note that this--- opcode is deprecated as it is inaccurate, and is replaced by the--- much better opcode bformenc1 which replicates all the important--- features; also note that the gain arguments are not available in--- bformenc1.--- --- --- * url : <http://www.csounds.com/manual/html/bformenc.html>- -bformenc ::- (K k0, K k1, K k2, K k3) =>- Arate -> k0 -> k1 -> k2 -> k3 -> MultiOut-bformenc a0sig k1alpha k2beta k3ord0 k4ord1- = opcode "bformenc" args- where args- = [to a0sig, to k1alpha, to k2beta, to k3ord0, to k4ord1]----- | * opcode : bformenc--- --- --- * syntax : --- --- > aw, ax, ay, az bformenc asig, kalpha, kbeta, kord0, kord1--- > aw, ax, ay, az, ar, as, at, au, av bformenc asig, kalpha, kbeta, --- > kord0, kord1, kord2--- > aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq bformenc --- > asig, kalpha, kbeta, kord0, kord1, kord2, kord3--- --- --- * description : --- --- Codes a signal into the ambisonic B format. Note that this--- opcode is deprecated as it is inaccurate, and is replaced by the--- much better opcode bformenc1 which replicates all the important--- features; also note that the gain arguments are not available in--- bformenc1.--- --- --- * url : <http://www.csounds.com/manual/html/bformenc.html>- -bformencK ::- (K k0, K k1, K k2, K k3, K k4) =>- Arate -> k0 -> k1 -> k2 -> k3 -> k4 -> MultiOut-bformencK a0sig k1alpha k2beta k3ord0 k4ord1 k5ord2- = opcode "bformenc" args- where args- = [to a0sig, to k1alpha, to k2beta, to k3ord0, to k4ord1,- to k5ord2]
− src/CsoundExpr/Opcodes/Sigmod/Reverbtn.hs
@@ -1,282 +0,0 @@--- | Reverberation-module CsoundExpr.Opcodes.Sigmod.Reverbtn- (alpass,- babo,- comb,- freeverb,- nestedap,- nreverb,- reverb2,- reverb,- reverbsc,- valpass,- vcomb)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : alpass--- --- --- * syntax : --- --- > ares alpass asig, krvt, ilpt [, iskip] [, insmps]--- --- --- * description : --- --- Reverberates an input signal with a flat frequency response.--- --- --- * url : <http://www.csounds.com/manual/html/alpass.html>- -alpass :: (K k0) => [Irate] -> Arate -> k0 -> Irate -> Arate-alpass i0init a1sig k2rvt i3lpt = opcode "alpass" args- where args = [to a1sig, to k2rvt, to i3lpt] ++ map to i0init----- | * opcode : babo--- --- --- * syntax : --- --- > a1, a2 babo asig, ksrcx, ksrcy, ksrcz, irx, iry, irz [, idiff] [, ifno]--- --- --- * description : --- --- babo stands for ball-within-the-box. It is a physical model--- reverberator based on the paper by Davide Rocchesso "The Ball--- within the Box: a sound-processing metaphor", Computer Music--- Journal, Vol 19, N.4, pp.45-47, Winter 1995.--- --- --- * url : <http://www.csounds.com/manual/html/babo.html>- -babo ::- (K k0, K k1, K k2) =>- [Irate] ->- Arate -> k0 -> k1 -> k2 -> Irate -> Irate -> Irate -> MultiOut-babo i0init a1sig k2srcx k3srcy k4srcz i5rx i6ry i7rz- = opcode "babo" args- where args- = [to a1sig, to k2srcx, to k3srcy, to k4srcz, to i5rx, to i6ry,- to i7rz]- ++ map to i0init----- | * opcode : comb--- --- --- * syntax : --- --- > ares comb asig, krvt, ilpt [, iskip] [, insmps]--- --- --- * description : --- --- Reverberates an input signal with a colored frequency response.--- --- --- * url : <http://www.csounds.com/manual/html/comb.html>- -comb :: (K k0) => [Irate] -> Arate -> k0 -> Irate -> Arate-comb i0init a1sig k2rvt i3lpt = opcode "comb" args- where args = [to a1sig, to k2rvt, to i3lpt] ++ map to i0init----- | * opcode : freeverb--- --- --- * syntax : --- --- > aoutL, aoutR freeverb ainL, ainR, kRoomSize, kHFDamp[, iSRate[, iSkip]]--- --- --- * description : --- --- freeverb is a stereo reverb unit based on Jezar's public domain--- C++ sources, composed of eight parallel comb filters on both--- channels, followed by four allpass units in series. The filters--- on the right channel are slightly detuned compared to the left--- channel in order to create a stereo effect.--- --- --- * url : <http://www.csounds.com/manual/html/freeverb.html>- -freeverb ::- (K k0, K k1) => [Irate] -> Arate -> Arate -> k0 -> k1 -> MultiOut-freeverb i0init a1inL a2inR k3RoomSize k4HFDamp- = opcode "freeverb" args- where args- = [to a1inL, to a2inR, to k3RoomSize, to k4HFDamp] ++ map to i0init----- | * opcode : nestedap--- --- --- * syntax : --- --- > ares nestedap asig, imode, imaxdel, idel1, igain1 [, idel2] [, igain2] --- > [, idel3] [, igain3] [, istor]--- --- --- * description : --- --- Three different nested all-pass filters, useful for implementing--- reverbs.--- --- --- * url : <http://www.csounds.com/manual/html/nestedap.html>- -nestedap ::- [Irate] -> Arate -> Irate -> Irate -> Irate -> Irate -> Arate-nestedap i0init a1sig i2mode i3maxdel i4del1 i5gain1- = opcode "nestedap" args- where args- = [to a1sig, to i2mode, to i3maxdel, to i4del1, to i5gain1] ++- map to i0init----- | * opcode : nreverb--- --- --- * syntax : --- --- > ares nreverb asig, ktime, khdif [, iskip] [,inumCombs] [, ifnCombs] --- > [, inumAlpas] [, ifnAlpas]--- --- --- * description : --- --- This is a reverberator consisting of 6 parallel comb-lowpass--- filters being fed into a series of 5 allpass filters. nreverb--- replaces reverb2 (version 3.48) and so both opcodes are--- identical.--- --- --- * url : <http://www.csounds.com/manual/html/nreverb.html>- -nreverb :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-nreverb i0init a1sig k2time k3hdif = opcode "nreverb" args- where args = [to a1sig, to k2time, to k3hdif] ++ map to i0init----- | * opcode : reverb2--- --- --- * syntax : --- --- > ares reverb2 asig, ktime, khdif [, iskip] [,inumCombs] --- > [, ifnCombs] [, inumAlpas] [, ifnAlpas]--- --- --- * description : --- --- Same as the nreverb opcode.--- --- --- * url : <http://www.csounds.com/manual/html/reverb2.html>- -reverb2 :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-reverb2 i0init a1sig k2time k3hdif = opcode "reverb2" args- where args = [to a1sig, to k2time, to k3hdif] ++ map to i0init----- | * opcode : reverb--- --- --- * syntax : --- --- > ares reverb asig, krvt [, iskip]--- --- --- * description : --- --- Reverberates an input signal with a natural room frequency--- response.--- --- --- * url : <http://www.csounds.com/manual/html/reverb.html>- -reverb :: (K k0) => [Irate] -> Arate -> k0 -> Arate-reverb i0init a1sig k2rvt = opcode "reverb" args- where args = [to a1sig, to k2rvt] ++ map to i0init----- | * opcode : reverbsc--- --- --- * syntax : --- --- > aoutL, aoutR reverbsc ainL, ainR, kfblvl, kfco[, israte[, ipitchm[, iskip]]]--- --- --- * description : --- --- 8 delay line stereo FDN reverb, with feedback matrix based upon--- physical modeling scattering junction of 8 lossless waveguides of--- equal characteristic impedance. Based on Csound orchestra version--- by Sean Costello.--- --- --- * url : <http://www.csounds.com/manual/html/reverbsc.html>- -reverbsc ::- (K k0, K k1) => [Irate] -> Arate -> Arate -> k0 -> k1 -> MultiOut-reverbsc i0init a1inL a2inR k3fblvl k4fco = opcode "reverbsc" args- where args- = [to a1inL, to a2inR, to k3fblvl, to k4fco] ++ map to i0init----- | * opcode : valpass--- --- --- * syntax : --- --- > ares valpass asig, krvt, xlpt, imaxlpt [, iskip] [, insmps]--- --- --- * description : --- --- Variably reverberates an input signal with a flat frequency--- response.--- --- --- * url : <http://www.csounds.com/manual/html/valpass.html>- -valpass ::- (K k0, X x0) => [Irate] -> Arate -> k0 -> x0 -> Irate -> Arate-valpass i0init a1sig k2rvt x3lpt i4maxlpt = opcode "valpass" args- where args- = [to a1sig, to k2rvt, to x3lpt, to i4maxlpt] ++ map to i0init----- | * opcode : vcomb--- --- --- * syntax : --- --- > ares vcomb asig, krvt, xlpt, imaxlpt [, iskip] [, insmps]--- --- --- * description : --- --- Variably reverberates an input signal with a colored frequency--- response.--- --- --- * url : <http://www.csounds.com/manual/html/vcomb.html>- -vcomb ::- (K k0, X x0) => [Irate] -> Arate -> k0 -> x0 -> Irate -> Arate-vcomb i0init a1sig k2rvt x3lpt i4maxlpt = opcode "vcomb" args- where args- = [to a1sig, to k2rvt, to x3lpt, to i4maxlpt] ++ map to i0init
− src/CsoundExpr/Opcodes/Sigmod/Sample.hs
@@ -1,370 +0,0 @@--- | Sample Level Operators-module CsoundExpr.Opcodes.Sigmod.Sample- (denorm,- diffA,- diffK,- downsamp,- fold,- integA,- integK,- interp,- ntrpolA,- ntrpolI,- ntrpolK,- sampholdA,- sampholdK,- upsamp,- vaget,- vaset)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : denorm--- --- --- * syntax : --- --- > denorm a1[, a2[, a3[,... ]]]--- --- --- * description : --- --- Mixes low level (~1e-20 for floats, and ~1e-56 for doubles)--- noise to a list of a-rate signals. Can be used before IIR filters--- and reverbs to avoid denormalized numbers which may otherwise--- result in significantly increased CPU usage.--- --- --- * url : <http://www.csounds.com/manual/html/denorm.html>- -denorm :: [Arate] -> SignalOut-denorm a0N = outOpcode "denorm" args- where args = map to a0N----- | * opcode : diff--- --- --- * syntax : --- --- > ares diff asig [, iskip]--- > kres diff ksig [, iskip]--- --- --- * description : --- --- Modify a signal by differentiation.--- --- --- * url : <http://www.csounds.com/manual/html/diff.html>- -diffA :: [Irate] -> Arate -> Arate-diffA i0init a1sig = opcode "diff" args- where args = [to a1sig] ++ map to i0init----- | * opcode : diff--- --- --- * syntax : --- --- > ares diff asig [, iskip]--- > kres diff ksig [, iskip]--- --- --- * description : --- --- Modify a signal by differentiation.--- --- --- * url : <http://www.csounds.com/manual/html/diff.html>- -diffK :: (K k0) => [Irate] -> k0 -> Krate-diffK i0init k1sig = opcode "diff" args- where args = [to k1sig] ++ map to i0init----- | * opcode : downsamp--- --- --- * syntax : --- --- > kres downsamp asig [, iwlen]--- --- --- * description : --- --- Modify a signal by down-sampling.--- --- --- * url : <http://www.csounds.com/manual/html/downsamp.html>- -downsamp :: [Irate] -> Arate -> Krate-downsamp i0init a1sig = opcode "downsamp" args- where args = [to a1sig] ++ map to i0init----- | * opcode : fold--- --- --- * syntax : --- --- > ares fold asig, kincr--- --- --- * description : --- --- Adds artificial foldover to an audio signal.--- --- --- * url : <http://www.csounds.com/manual/html/fold.html>- -fold :: (K k0) => Arate -> k0 -> Arate-fold a0sig k1incr = opcode "fold" args- where args = [to a0sig, to k1incr]----- | * opcode : integ--- --- --- * syntax : --- --- > ares integ asig [, iskip]--- > kres integ ksig [, iskip]--- --- --- * description : --- --- Modify a signal by integration.--- --- --- * url : <http://www.csounds.com/manual/html/integ.html>- -integA :: [Irate] -> Arate -> Arate-integA i0init a1sig = opcode "integ" args- where args = [to a1sig] ++ map to i0init----- | * opcode : integ--- --- --- * syntax : --- --- > ares integ asig [, iskip]--- > kres integ ksig [, iskip]--- --- --- * description : --- --- Modify a signal by integration.--- --- --- * url : <http://www.csounds.com/manual/html/integ.html>- -integK :: (K k0) => [Irate] -> k0 -> Krate-integK i0init k1sig = opcode "integ" args- where args = [to k1sig] ++ map to i0init----- | * opcode : interp--- --- --- * syntax : --- --- > ares interp ksig [, iskip] [, imode]--- --- --- * description : --- --- Converts a control signal to an audio signal using linear--- interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/interp.html>- -interp :: (K k0) => [Irate] -> k0 -> Arate-interp i0init k1sig = opcode "interp" args- where args = [to k1sig] ++ map to i0init----- | * opcode : ntrpol--- --- --- * syntax : --- --- > ares ntrpol asig1, asig2, kpoint [, imin] [, imax]--- > ires ntrpol isig1, isig2, ipoint [, imin] [, imax]--- > kres ntrpol ksig1, ksig2, kpoint [, imin] [, imax]--- --- --- * description : --- --- Calculates the weighted mean value (i.e. linear interpolation)--- of two input signals--- --- --- * url : <http://www.csounds.com/manual/html/ntrpol.html>- -ntrpolA :: (K k0) => [Irate] -> Arate -> Arate -> k0 -> Arate-ntrpolA i0init a1sig1 a2sig2 k3point = opcode "ntrpol" args- where args = [to a1sig1, to a2sig2, to k3point] ++ map to i0init----- | * opcode : ntrpol--- --- --- * syntax : --- --- > ares ntrpol asig1, asig2, kpoint [, imin] [, imax]--- > ires ntrpol isig1, isig2, ipoint [, imin] [, imax]--- > kres ntrpol ksig1, ksig2, kpoint [, imin] [, imax]--- --- --- * description : --- --- Calculates the weighted mean value (i.e. linear interpolation)--- of two input signals--- --- --- * url : <http://www.csounds.com/manual/html/ntrpol.html>- -ntrpolI :: [Irate] -> Irate -> Irate -> Irate -> Irate-ntrpolI i0init i1sig1 i2sig2 i3point = opcode "ntrpol" args- where args = [to i1sig1, to i2sig2, to i3point] ++ map to i0init----- | * opcode : ntrpol--- --- --- * syntax : --- --- > ares ntrpol asig1, asig2, kpoint [, imin] [, imax]--- > ires ntrpol isig1, isig2, ipoint [, imin] [, imax]--- > kres ntrpol ksig1, ksig2, kpoint [, imin] [, imax]--- --- --- * description : --- --- Calculates the weighted mean value (i.e. linear interpolation)--- of two input signals--- --- --- * url : <http://www.csounds.com/manual/html/ntrpol.html>- -ntrpolK :: (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> Krate-ntrpolK i0init k1sig1 k2sig2 k3point = opcode "ntrpol" args- where args = [to k1sig1, to k2sig2, to k3point] ++ map to i0init----- | * opcode : samphold--- --- --- * syntax : --- --- > ares samphold asig, agate [, ival] [, ivstor]--- > kres samphold ksig, kgate [, ival] [, ivstor]--- --- --- * description : --- --- Performs a sample-and-hold operation on its input.--- --- --- * url : <http://www.csounds.com/manual/html/samphold.html>- -sampholdA :: [Irate] -> Arate -> Arate -> Arate-sampholdA i0init a1sig a2gate = opcode "samphold" args- where args = [to a1sig, to a2gate] ++ map to i0init----- | * opcode : samphold--- --- --- * syntax : --- --- > ares samphold asig, agate [, ival] [, ivstor]--- > kres samphold ksig, kgate [, ival] [, ivstor]--- --- --- * description : --- --- Performs a sample-and-hold operation on its input.--- --- --- * url : <http://www.csounds.com/manual/html/samphold.html>- -sampholdK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-sampholdK i0init k1sig k2gate = opcode "samphold" args- where args = [to k1sig, to k2gate] ++ map to i0init----- | * opcode : upsamp--- --- --- * syntax : --- --- > ares upsamp ksig--- --- --- * description : --- --- Modify a signal by up-sampling.--- --- --- * url : <http://www.csounds.com/manual/html/upsamp.html>- -upsamp :: (K k0) => k0 -> Arate-upsamp k0sig = opcode "upsamp" args- where args = [to k0sig]----- | * opcode : vaget--- --- --- * syntax : --- --- > kval vaget kndx, avar--- --- --- * description : --- --- Access values of the current buffer of an a-rate variable by--- indexing. Useful for doing sample-by-sample manipulation at--- k-rate without using setksmps 1.--- --- --- * url : <http://www.csounds.com/manual/html/vaget.html>- -vaget :: (K k0) => k0 -> Arate -> Krate-vaget k0ndx a1var = opcode "vaget" args- where args = [to k0ndx, to a1var]----- | * opcode : vaset--- --- --- * syntax : --- --- > vaset kval, kndx, avar--- --- --- * description : --- --- Write values into the current buffer of an a-rate variable at--- the given index. Useful for doing sample-by-sample manipulation--- at k-rate without using setksmps 1.--- --- --- * url : <http://www.csounds.com/manual/html/vaset.html>- -vaset :: (K k0, K k1) => k0 -> k1 -> Arate -> SignalOut-vaset k0val k1ndx a2var = outOpcode "vaset" args- where args = [to k0val, to k1ndx, to a2var]
− src/CsoundExpr/Opcodes/Sigmod/SigProcAmpMod.hs
@@ -1,138 +0,0 @@--- | Amplitude Modifiers and Dynamic processing-module CsoundExpr.Opcodes.Sigmod.SigProcAmpMod- (balance,- compress,- clip,- dam,- gain)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : balance--- --- --- * syntax : --- --- > ares balance asig, acomp [, ihp] [, iskip]--- --- --- * description : --- --- The rms power of asig can be interrogated, set, or adjusted to--- match that of a comparator signal.--- --- --- * url : <http://www.csounds.com/manual/html/balance.html>- -balance :: [Irate] -> Arate -> Arate -> Arate-balance i0init a1sig a2comp = opcode "balance" args- where args = [to a1sig, to a2comp] ++ map to i0init----- | * opcode : compress--- --- --- * syntax : --- --- > ar compress aasig, acsig, kthresh, kloknee, khiknee, kratio, katt, krel, ilook--- --- --- * description : --- --- This unit functions as an audio compressor, limiter, expander,--- or noise gate, using either soft-knee or hard-knee mapping, and--- with dynamically variable performance characteristics. It takes--- two audio input signals, aasig and acsig, the first of which is--- modified by a running analysis of the second. Both signals can be--- the same, or the first can be modified by a different controlling--- signal.--- --- --- * url : <http://www.csounds.com/manual/html/compress.html>- -compress ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- Arate ->- Arate -> k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Irate -> Arate-compress a0asig a1csig k2thresh k3loknee k4hiknee k5ratio k6att- k7rel i8look = opcode "compress" args- where args- = [to a0asig, to a1csig, to k2thresh, to k3loknee, to k4hiknee,- to k5ratio, to k6att, to k7rel, to i8look]----- | * opcode : clip--- --- --- * syntax : --- --- > ares clip asig, imeth, ilimit [, iarg]--- --- --- * description : --- --- Clips an a-rate signal to a predefined limit, in a soft manner,--- using one of three methods.--- --- --- * url : <http://www.csounds.com/manual/html/clip.html>- -clip :: [Irate] -> Arate -> Irate -> Irate -> Arate-clip i0init a1sig i2meth i3limit = opcode "clip" args- where args = [to a1sig, to i2meth, to i3limit] ++ map to i0init----- | * opcode : dam--- --- --- * syntax : --- --- > ares dam asig, kthreshold, icomp1, icomp2, irtime, iftime--- --- --- * description : --- --- This opcode dynamically modifies a gain value applied to the--- input sound ain by comparing its power level to a given threshold--- level. The signal will be compressed/expanded with different--- factors regarding that it is over or under the threshold.--- --- --- * url : <http://www.csounds.com/manual/html/dam.html>- -dam ::- (K k0) => Arate -> k0 -> Irate -> Irate -> Irate -> Irate -> Arate-dam a0sig k1threshold i2comp1 i3comp2 i4rtime i5ftime- = opcode "dam" args- where args- = [to a0sig, to k1threshold, to i2comp1, to i3comp2, to i4rtime,- to i5ftime]----- | * opcode : gain--- --- --- * syntax : --- --- > ares gain asig, krms [, ihp] [, iskip]--- --- --- * description : --- --- Adjusts the amplitude audio signal according to a--- root-mean-square value.--- --- --- * url : <http://www.csounds.com/manual/html/gain.html>- -gain :: (K k0) => [Irate] -> Arate -> k0 -> Arate-gain i0init a1sig k2rms = opcode "gain" args- where args = [to a1sig, to k2rms] ++ map to i0init
− src/CsoundExpr/Opcodes/Sigmod/SigProcConmorph.hs
@@ -1,157 +0,0 @@--- | Convolution and Morphing-module CsoundExpr.Opcodes.Sigmod.SigProcConmorph- (convolve,- cross2,- dconv,- ftconv,- ftmorf,- pconvolve)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : convolve--- --- --- * syntax : --- --- > ar1 [, ar2] [, ar3] [, ar4] convolve ain, ifilcod [, ichannel]--- --- --- * description : --- --- Output is the convolution of signal ain and the impulse response--- contained in ifilcod. If more than one output signal is supplied,--- each will be convolved with the same impulse response. Note that--- it is considerably more efficient to use one instance of the--- operator when processing a mono input to create stereo, or quad,--- outputs.--- --- --- * url : <http://www.csounds.com/manual/html/convolve.html>- -convolve :: [Irate] -> Arate -> String -> MultiOut-convolve i0init a1in s2file = opcode "convolve" args- where args = [to a1in, to s2file] ++ map to i0init----- | * opcode : cross2--- --- --- * syntax : --- --- > ares cross2 ain1, ain2, isize, ioverlap, iwin, kbias--- --- --- * description : --- --- This is an implementation of cross synthesis using FFT's.--- --- --- * url : <http://www.csounds.com/manual/html/cross2.html>- -cross2 ::- (K k0) => Arate -> Arate -> Irate -> Irate -> Irate -> k0 -> Arate-cross2 a0in1 a1in2 i2size i3overlap i4win k5bias- = opcode "cross2" args- where args- = [to a0in1, to a1in2, to i2size, to i3overlap, to i4win,- to k5bias]----- | * opcode : dconv--- --- --- * syntax : --- --- > ares dconv asig, isize, ifn--- --- --- * description : --- --- A direct convolution opcode.--- --- --- * url : <http://www.csounds.com/manual/html/dconv.html>- -dconv :: Arate -> Irate -> Irate -> Arate-dconv a0sig i1size i2fn = opcode "dconv" args- where args = [to a0sig, to i1size, to i2fn]----- | * opcode : ftconv--- --- --- * syntax : --- --- > a1[, a2[, a3[,... a8]]] ftconv ain, ift, iplen[, iskipsamples --- > [, iirlen[, iskipinit]]]--- --- --- * description : --- --- Low latency multichannel convolution, using a function table as--- impulse response source. The algorithm is to split the impulse--- response to partitions of length determined by the iplen--- parameter, and delay and mix partitions so that the original,--- full length impulse response is reconstructed without gaps. The--- output delay (latency) is iplen samples, and does not depend on--- the control rate, unlike in the case of other convolve opcodes.--- --- --- * url : <http://www.csounds.com/manual/html/ftconv.html>- -ftconv :: [Irate] -> Arate -> Irate -> Irate -> MultiOut-ftconv i0init a1in i2ft i3plen = opcode "ftconv" args- where args = [to a1in, to i2ft, to i3plen] ++ map to i0init----- | * opcode : ftmorf--- --- --- * syntax : --- --- > ftmorf kftndx, iftfn, iresfn--- --- --- * description : --- --- Uses an index into a table of ftable numbers to morph between--- adjacent tables in the list.This morphed function is written into--- the table referenced by iresfn on every k-cycle.--- --- --- * url : <http://www.csounds.com/manual/html/ftmorf.html>- -ftmorf :: (K k0) => k0 -> Irate -> Irate -> SignalOut-ftmorf k0ftndx i1ftfn i2resfn = outOpcode "ftmorf" args- where args = [to k0ftndx, to i1ftfn, to i2resfn]----- | * opcode : pconvolve--- --- --- * syntax : --- --- > ar1 [, ar2] [, ar3] [, ar4] pconvolve ain, ifilcod [, ipartitionsize, ichannel]--- --- --- * description : --- --- Convolution based on a uniformly partitioned overlap-save--- algorithm. Compared to the convolve opcode, pconvolve has these--- benefits:--- --- --- * url : <http://www.csounds.com/manual/html/pconvolve.html>- -pconvolve :: [Irate] -> Arate -> String -> MultiOut-pconvolve i0init a1in s2file = opcode "pconvolve" args- where args = [to a1in, to s2file] ++ map to i0init
− src/CsoundExpr/Opcodes/Sigmod/Siglimit.hs
@@ -1,221 +0,0 @@--- | Signal Limiters-module CsoundExpr.Opcodes.Sigmod.Siglimit- (limitA,- limitI,- limitK,- mirrorA,- mirrorI,- mirrorK,- wrapA,- wrapI,- wrapK)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : limit--- --- --- * syntax : --- --- > ares limit asig, klow, khigh--- > ires limit isig, ilow, ihigh--- > kres limit ksig, klow, khigh--- --- --- * description : --- --- Sets the lower and upper limits of the value it processes.--- --- --- * url : <http://www.csounds.com/manual/html/limit.html>- -limitA :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate-limitA a0sig k1low k2high = opcode "limit" args- where args = [to a0sig, to k1low, to k2high]----- | * opcode : limit--- --- --- * syntax : --- --- > ares limit asig, klow, khigh--- > ires limit isig, ilow, ihigh--- > kres limit ksig, klow, khigh--- --- --- * description : --- --- Sets the lower and upper limits of the value it processes.--- --- --- * url : <http://www.csounds.com/manual/html/limit.html>- -limitI :: Irate -> Irate -> Irate -> Irate-limitI i0sig i1low i2high = opcode "limit" args- where args = [to i0sig, to i1low, to i2high]----- | * opcode : limit--- --- --- * syntax : --- --- > ares limit asig, klow, khigh--- > ires limit isig, ilow, ihigh--- > kres limit ksig, klow, khigh--- --- --- * description : --- --- Sets the lower and upper limits of the value it processes.--- --- --- * url : <http://www.csounds.com/manual/html/limit.html>- -limitK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-limitK k0sig k1low k2high = opcode "limit" args- where args = [to k0sig, to k1low, to k2high]----- | * opcode : mirror--- --- --- * syntax : --- --- > ares mirror asig, klow, khigh--- > ires mirror isig, ilow, ihigh--- > kres mirror ksig, klow, khigh--- --- --- * description : --- --- Reflects the signal that exceeds the low and high thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/mirror.html>- -mirrorA :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate-mirrorA a0sig k1low k2high = opcode "mirror" args- where args = [to a0sig, to k1low, to k2high]----- | * opcode : mirror--- --- --- * syntax : --- --- > ares mirror asig, klow, khigh--- > ires mirror isig, ilow, ihigh--- > kres mirror ksig, klow, khigh--- --- --- * description : --- --- Reflects the signal that exceeds the low and high thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/mirror.html>- -mirrorI :: Irate -> Irate -> Irate -> Irate-mirrorI i0sig i1low i2high = opcode "mirror" args- where args = [to i0sig, to i1low, to i2high]----- | * opcode : mirror--- --- --- * syntax : --- --- > ares mirror asig, klow, khigh--- > ires mirror isig, ilow, ihigh--- > kres mirror ksig, klow, khigh--- --- --- * description : --- --- Reflects the signal that exceeds the low and high thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/mirror.html>- -mirrorK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-mirrorK k0sig k1low k2high = opcode "mirror" args- where args = [to k0sig, to k1low, to k2high]----- | * opcode : wrap--- --- --- * syntax : --- --- > ares wrap asig, klow, khigh--- > ires wrap isig, ilow, ihigh--- > kres wrap ksig, klow, khigh--- --- --- * description : --- --- Wraps-around the signal that exceeds the low and high--- thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/wrap.html>- -wrapA :: (K k0, K k1) => Arate -> k0 -> k1 -> Arate-wrapA a0sig k1low k2high = opcode "wrap" args- where args = [to a0sig, to k1low, to k2high]----- | * opcode : wrap--- --- --- * syntax : --- --- > ares wrap asig, klow, khigh--- > ires wrap isig, ilow, ihigh--- > kres wrap ksig, klow, khigh--- --- --- * description : --- --- Wraps-around the signal that exceeds the low and high--- thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/wrap.html>- -wrapI :: Irate -> Irate -> Irate -> Irate-wrapI i0sig i1low i2high = opcode "wrap" args- where args = [to i0sig, to i1low, to i2high]----- | * opcode : wrap--- --- --- * syntax : --- --- > ares wrap asig, klow, khigh--- > ires wrap isig, ilow, ihigh--- > kres wrap ksig, klow, khigh--- --- --- * description : --- --- Wraps-around the signal that exceeds the low and high--- thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/wrap.html>- -wrapK :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-wrapK k0sig k1low k2high = opcode "wrap" args- where args = [to k0sig, to k1low, to k2high]
− src/CsoundExpr/Opcodes/Sigmod/Speciale.hs
@@ -1,161 +0,0 @@--- | Special Effects-module CsoundExpr.Opcodes.Sigmod.Speciale- (distort,- distort1,- flanger,- harmon,- phaser1,- phaser2)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : distort--- --- --- * syntax : --- --- > ar distort asig, kdist, ifn[, ihp, istor]--- --- --- * description : --- --- --- --- --- * url : <http://www.csounds.com/manual/html/distort.html>- -distort :: (K k0) => [Irate] -> Arate -> k0 -> Irate -> Arate-distort i0init a1sig k2dist i3fn = opcode "distort" args- where args = [to a1sig, to k2dist, to i3fn] ++ map to i0init----- | * opcode : distort1--- --- --- * syntax : --- --- > ares distort1 asig, kpregain, kpostgain, kshape1, kshape2[, imode]--- --- --- * description : --- --- Implementation of modified hyperbolic tangent distortion.--- distort1 can be used to generate wave shaping distortion based on--- a modification of the tanh function.--- --- --- * url : <http://www.csounds.com/manual/html/distort1.html>- -distort1 ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> Arate -> k0 -> k1 -> k2 -> k3 -> Arate-distort1 i0init a1sig k2pregain k3postgain k4shape1 k5shape2- = opcode "distort1" args- where args- = [to a1sig, to k2pregain, to k3postgain, to k4shape1, to k5shape2]- ++ map to i0init----- | * opcode : flanger--- --- --- * syntax : --- --- > ares flanger asig, adel, kfeedback [, imaxd]--- --- --- * description : --- --- A user controlled flanger.--- --- --- * url : <http://www.csounds.com/manual/html/flanger.html>- -flanger :: (K k0) => [Irate] -> Arate -> Arate -> k0 -> Arate-flanger i0init a1sig a2del k3feedback = opcode "flanger" args- where args = [to a1sig, to a2del, to k3feedback] ++ map to i0init----- | * opcode : harmon--- --- --- * syntax : --- --- > ares harmon asig, kestfrq, kmaxvar, kgenfreq1, kgenfreq2, imode, --- > iminfrq, iprd--- --- --- * description : --- --- Analyze an audio input and generate harmonizing voices in--- synchrony.--- --- --- * url : <http://www.csounds.com/manual/html/harmon.html>- -harmon ::- (K k0, K k1, K k2, K k3) =>- Arate -> k0 -> k1 -> k2 -> k3 -> Irate -> Irate -> Irate -> Arate-harmon a0sig k1estfrq k2maxvar k3genfreq1 k4genfreq2 i5mode- i6minfrq i7prd = opcode "harmon" args- where args- = [to a0sig, to k1estfrq, to k2maxvar, to k3genfreq1,- to k4genfreq2, to i5mode, to i6minfrq, to i7prd]----- | * opcode : phaser1--- --- --- * syntax : --- --- > ares phaser1 asig, kfreq, kord, kfeedback [, iskip]--- --- --- * description : --- --- An implementation of iord number of first-order allpass filters--- in series.--- --- --- * url : <http://www.csounds.com/manual/html/phaser1.html>- -phaser1 ::- (K k0, K k1, K k2) => [Irate] -> Arate -> k0 -> k1 -> k2 -> Arate-phaser1 i0init a1sig k2freq k3ord k4feedback- = opcode "phaser1" args- where args- = [to a1sig, to k2freq, to k3ord, to k4feedback] ++ map to i0init----- | * opcode : phaser2--- --- --- * syntax : --- --- > ares phaser2 asig, kfreq, kq, kord, kmode, ksep, kfeedback--- --- --- * description : --- --- An implementation of iord number of second-order allpass filters--- in series.--- --- --- * url : <http://www.csounds.com/manual/html/phaser2.html>- -phaser2 ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- Arate -> k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Arate-phaser2 a0sig k1freq k2q k3ord k4mode k5sep k6feedback- = opcode "phaser2" args- where args- = [to a0sig, to k1freq, to k2q, to k3ord, to k4mode, to k5sep,- to k6feedback]
− src/CsoundExpr/Opcodes/Sigmod/Speciali.hs
@@ -1,283 +0,0 @@--- | Specialized Filters-module CsoundExpr.Opcodes.Sigmod.Speciali- (dcblock,- dcblock2,- pareq,- rbjeq,- eqfil,- nlfilt,- filter2A,- filter2K,- fofilter,- hilbert,- zfilter2)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : dcblock--- --- --- * syntax : --- --- > ares dcblock ain [, igain]--- --- --- * description : --- --- Implements the DC blocking filter--- --- --- * url : <http://www.csounds.com/manual/html/dcblock.html>- -dcblock :: [Irate] -> Arate -> Arate-dcblock i0init a1in = opcode "dcblock" args- where args = [to a1in] ++ map to i0init----- | * opcode : dcblock2--- --- --- * syntax : --- --- > ares dcblock2 ain [, iorder] [, iskip]--- --- --- * description : --- --- Implements a DC blocking filter with improved DC attenuation.--- --- --- * url : <http://www.csounds.com/manual/html/dcblock2.html>- -dcblock2 :: [Irate] -> Arate -> Arate-dcblock2 i0init a1in = opcode "dcblock2" args- where args = [to a1in] ++ map to i0init----- | * opcode : pareq--- --- --- * syntax : --- --- > ares pareq asig, kc, kv, kq [, imode] [, iskip]--- --- --- * description : --- --- Implementation of Zoelzer's parametric equalizer filters, with--- some modifications by the author.--- --- --- * url : <http://www.csounds.com/manual/html/pareq.html>- -pareq ::- (K k0, K k1, K k2) => [Irate] -> Arate -> k0 -> k1 -> k2 -> Arate-pareq i0init a1sig k2c k3v k4q = opcode "pareq" args- where args = [to a1sig, to k2c, to k3v, to k4q] ++ map to i0init----- | * opcode : rbjeq--- --- --- * syntax : --- --- > ar rbjeq asig, kfco, klvl, kQ, kS[, imode]--- --- --- * description : --- --- Parametric equalizer and filter opcode with 7 filter types,--- based on algorithm by Robert Bristow-Johnson.--- --- --- * url : <http://www.csounds.com/manual/html/rbjeq.html>- -rbjeq ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> Arate -> k0 -> k1 -> k2 -> k3 -> Arate-rbjeq i0init a1sig k2fco k3lvl k4Q k5S = opcode "rbjeq" args- where args- = [to a1sig, to k2fco, to k3lvl, to k4Q, to k5S] ++ map to i0init----- | * opcode : eqfil--- --- --- * syntax : --- --- > asig eqfil ain, kcf, kbw, kgain[, istor]--- --- --- * description : --- --- The opcode eqfil is a 2nd order tunable equalisation filter--- based on Regalia and Mitra design ("Tunable Digital Frequency--- Response Equalization Filters", IEEE Trans. on Ac., Sp. and Sig--- Proc., 35 (1), 1987). It provides a peak/notch filter for--- building parametric/graphic equalisers.--- --- --- * url : <http://www.csounds.com/manual/html/eqfil.html>- -eqfil ::- (K k0, K k1, K k2) => [Irate] -> Arate -> k0 -> k1 -> k2 -> Arate-eqfil i0init a1in k2cf k3bw k4gain = opcode "eqfil" args- where args- = [to a1in, to k2cf, to k3bw, to k4gain] ++ map to i0init----- | * opcode : nlfilt--- --- --- * syntax : --- --- > ares nlfilt ain, ka, kb, kd, kC, kL--- --- --- * description : --- --- Implements the filter:--- --- --- * url : <http://www.csounds.com/manual/html/nlfilt.html>- -nlfilt ::- (K k0, K k1, K k2, K k3, K k4) =>- Arate -> k0 -> k1 -> k2 -> k3 -> k4 -> Arate-nlfilt a0in k1a k2b k3d k4C k5L = opcode "nlfilt" args- where args = [to a0in, to k1a, to k2b, to k3d, to k4C, to k5L]----- | * opcode : filter2--- --- --- * syntax : --- --- > ares filter2 asig, iM, iN, ib0, ib1,..., ibM, ia1, ia2,..., iaN--- > kres filter2 ksig, iM, iN, ib0, ib1,..., ibM, ia1, ia2,..., iaN--- --- --- * description : --- --- General purpose custom filter with time-varying pole control.--- The filter coefficients implement the following difference--- equation:--- --- --- * url : <http://www.csounds.com/manual/html/filter2.html>- -filter2A :: Arate -> Irate -> Irate -> [Irate] -> [Irate] -> Arate-filter2A a0sig i1m i2n i3bs i4as = opcode "filter2" args- where args- = [to a0sig, to i1m, to i2n] ++ map to i3bs ++ map to i4as----- | * opcode : filter2--- --- --- * syntax : --- --- > ares filter2 asig, iM, iN, ib0, ib1,..., ibM, ia1, ia2,..., iaN--- > kres filter2 ksig, iM, iN, ib0, ib1,..., ibM, ia1, ia2,..., iaN--- --- --- * description : --- --- General purpose custom filter with time-varying pole control.--- The filter coefficients implement the following difference--- equation:--- --- --- * url : <http://www.csounds.com/manual/html/filter2.html>- -filter2K ::- (K k0) => k0 -> Irate -> Irate -> [Irate] -> [Irate] -> Krate-filter2K k0sig i1m i2n i3bs i4as = opcode "filter2" args- where args- = [to k0sig, to i1m, to i2n] ++ map to i3bs ++ map to i4as----- | * opcode : fofilter--- --- --- * syntax : --- --- > asig fofilter ain, kcf, kris, kdec[, istor]--- --- --- * description : --- --- Fofilter generates a stream of overlapping sinewave grains, when--- fed with a pulse train. Each grain is the impulse response of a--- combination of two BP filters. The grains are defined by their--- attack time (determining the skirtwidth of the formant region at--- -60dB) and decay time (-6dB bandwidth). Overlapping will occur--- when 1/freq < decay, but, unlike FOF, there is no upper limit on--- the number of overlaps. The original idea for this opcode came--- from J McCartney's formlet class in SuperCollider, but this is--- possibly implemented differently(?).--- --- --- * url : <http://www.csounds.com/manual/html/fofilter.html>- -fofilter ::- (K k0, K k1, K k2) => [Irate] -> Arate -> k0 -> k1 -> k2 -> Arate-fofilter i0init a1in k2cf k3ris k4dec = opcode "fofilter" args- where args- = [to a1in, to k2cf, to k3ris, to k4dec] ++ map to i0init----- | * opcode : hilbert--- --- --- * syntax : --- --- > ar1, ar2 hilbert asig--- --- --- * description : --- --- An IIR implementation of a Hilbert transformer.--- --- --- * url : <http://www.csounds.com/manual/html/hilbert.html>- -hilbert :: Arate -> MultiOut-hilbert a0sig = opcode "hilbert" args- where args = [to a0sig]----- | * opcode : zfilter2--- --- --- * syntax : --- --- > ares zfilter2 asig, kdamp, kfreq, iM, iN, ib0, ib1,..., ibM, --- > ia1,ia2,..., iaN--- --- --- * description : --- --- General purpose custom filter with time-varying pole control.--- The filter coefficients implement the following difference--- equation:--- --- --- * url : <http://www.csounds.com/manual/html/zfilter2.html>- -zfilter2 ::- (K k0, K k1) =>- Arate -> k0 -> k1 -> Irate -> Irate -> [Irate] -> [Irate] -> Arate-zfilter2 a0sig k1damp k2freq i3m i4n i5bs i6as- = opcode "filter2" args- where args- = [to a0sig, to k1damp, to k2freq, to i3m, to i4n] ++ map to i5bs- ++ map to i6as
− src/CsoundExpr/Opcodes/Sigmod/Standard.hs
@@ -1,976 +0,0 @@--- | Standard Filters-module CsoundExpr.Opcodes.Sigmod.Standard- (areson,- lowpass2,- lowres,- lowresx,- lpf18,- moogvcf,- moogladder,- reson,- resonr,- resonx,- resony,- resonz,- rezzy,- statevar,- svfilter,- tbvcf,- vlowres,- bqrez,- atone,- atonex,- tone,- tonex,- biquad,- biquada,- butterbp,- butterbr,- butterhp,- butterlp,- butbp,- butbr,- buthp,- butlp,- clfilt,- aresonk,- atonek,- lineto,- port,- portk,- resonk,- resonxk,- tlineto,- tonek)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : areson--- --- --- * syntax : --- --- > ares areson asig, kcf, kbw [, iscl] [, iskip]--- --- --- * description : --- --- A notch filter whose transfer functions are the complements of--- the reson opcode.--- --- --- * url : <http://www.csounds.com/manual/html/areson.html>- -areson :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-areson i0init a1sig k2cf k3bw = opcode "areson" args- where args = [to a1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : lowpass2--- --- --- * syntax : --- --- > ares lowpass2 asig, kcf, kq [, iskip]--- --- --- * description : --- --- Implementation of a resonant second-order lowpass filter.--- --- --- * url : <http://www.csounds.com/manual/html/lowpass2.html>- -lowpass2 :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-lowpass2 i0init a1sig k2cf k3q = opcode "lowpass2" args- where args = [to a1sig, to k2cf, to k3q] ++ map to i0init----- | * opcode : lowres--- --- --- * syntax : --- --- > ares lowres asig, kcutoff, kresonance [, iskip]--- --- --- * description : --- --- lowres is a resonant lowpass filter.--- --- --- * url : <http://www.csounds.com/manual/html/lowres.html>- -lowres :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-lowres i0init a1sig k2cutoff k3resonance = opcode "lowres" args- where args- = [to a1sig, to k2cutoff, to k3resonance] ++ map to i0init----- | * opcode : lowresx--- --- --- * syntax : --- --- > ares lowresx asig, kcutoff, kresonance [, inumlayer] [, iskip]--- --- --- * description : --- --- lowresx is equivalent to more layers of lowres with the same--- arguments serially connected.--- --- --- * url : <http://www.csounds.com/manual/html/lowresx.html>- -lowresx :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-lowresx i0init a1sig k2cutoff k3resonance = opcode "lowresx" args- where args- = [to a1sig, to k2cutoff, to k3resonance] ++ map to i0init----- | * opcode : lpf18--- --- --- * syntax : --- --- > ares lpf18 asig, kfco, kres, kdist--- --- --- * description : --- --- Implementation of a 3 pole sweepable resonant lowpass filter.--- --- --- * url : <http://www.csounds.com/manual/html/lpf18.html>- -lpf18 :: (K k0, K k1, K k2) => Arate -> k0 -> k1 -> k2 -> Arate-lpf18 a0sig k1fco k2res k3dist = opcode "lpf18" args- where args = [to a0sig, to k1fco, to k2res, to k3dist]----- | * opcode : moogvcf--- --- --- * syntax : --- --- > ares moogvcf asig, xfco, xres [,iscale, iskip]--- --- --- * description : --- --- A digital emulation of the Moog diode ladder filter--- configuration.--- --- --- * url : <http://www.csounds.com/manual/html/moogvcf.html>- -moogvcf :: (X x0, X x1) => [Irate] -> Arate -> x0 -> x1 -> Arate-moogvcf i0init a1sig x2fco x3res = opcode "moogvcf" args- where args = [to a1sig, to x2fco, to x3res] ++ map to i0init----- | * opcode : moogladder--- --- --- * syntax : --- --- > asig moogladder ain, kcf, kres[, istor]--- --- --- * description : --- --- Moogladder is an new digital implementation of the Moog ladder--- filter based on the work of Antti Huovilainen, described in the--- paper "Non-Linear Digital Implementation of the Moog Ladder--- Filter" (Proceedings of DaFX04, Univ of Napoli). This--- implementation is probably a more accurate digital representation--- of the original analogue filter.--- --- --- * url : <http://www.csounds.com/manual/html/moogladder.html>- -moogladder :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-moogladder i0init a1in k2cf k3res = opcode "moogladder" args- where args = [to a1in, to k2cf, to k3res] ++ map to i0init----- | * opcode : reson--- --- --- * syntax : --- --- > ares reson asig, kcf, kbw [, iscl] [, iskip]--- --- --- * description : --- --- A second-order resonant filter.--- --- --- * url : <http://www.csounds.com/manual/html/reson.html>- -reson :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-reson i0init a1sig k2cf k3bw = opcode "reson" args- where args = [to a1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : resonr--- --- --- * syntax : --- --- > ares resonr asig, kcf, kbw [, iscl] [, iskip]--- --- --- * description : --- --- Implementations of a second-order, two-pole two-zero bandpass--- filter with variable frequency response.--- --- --- * url : <http://www.csounds.com/manual/html/resonr.html>- -resonr :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-resonr i0init a1sig k2cf k3bw = opcode "resonr" args- where args = [to a1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : resonx--- --- --- * syntax : --- --- > ares resonx asig, kcf, kbw [, inumlayer] [, iscl] [, iskip]--- --- --- * description : --- --- resonx is equivalent to a filters consisting of more layers of--- reson with the same arguments, serially connected. Using a stack--- of a larger number of filters allows a sharper cutoff. They are--- faster than using a larger number instances in a Csound orchestra--- of the old opcodes, because only one initialization and k- cycle--- are needed at time and the audio loop falls entirely inside the--- cache memory of processor.--- --- --- * url : <http://www.csounds.com/manual/html/resonx.html>- -resonx :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-resonx i0init a1sig k2cf k3bw = opcode "resonx" args- where args = [to a1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : resony--- --- --- * syntax : --- --- > ares resony asig, kbf, kbw, inum, ksep [, isepmode] [, iscl] [, iskip]--- --- --- * description : --- --- A bank of second-order bandpass filters, connected in parallel.--- --- --- * url : <http://www.csounds.com/manual/html/resony.html>- -resony ::- (K k0, K k1, K k2) =>- [Irate] -> Arate -> k0 -> k1 -> Irate -> k2 -> Arate-resony i0init a1sig k2bf k3bw i4num k5sep = opcode "resony" args- where args- = [to a1sig, to k2bf, to k3bw, to i4num, to k5sep] ++ map to i0init----- | * opcode : resonz--- --- --- * syntax : --- --- > ares resonz asig, kcf, kbw [, iscl] [, iskip]--- --- --- * description : --- --- Implementations of a second-order, two-pole two-zero bandpass--- filter with variable frequency response.--- --- --- * url : <http://www.csounds.com/manual/html/resonz.html>- -resonz :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-resonz i0init a1sig k2cf k3bw = opcode "resonz" args- where args = [to a1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : rezzy--- --- --- * syntax : --- --- > ares rezzy asig, xfco, xres [, imode, iskip]--- --- --- * description : --- --- A resonant low-pass filter.--- --- --- * url : <http://www.csounds.com/manual/html/rezzy.html>- -rezzy :: (X x0, X x1) => [Irate] -> Arate -> x0 -> x1 -> Arate-rezzy i0init a1sig x2fco x3res = opcode "rezzy" args- where args = [to a1sig, to x2fco, to x3res] ++ map to i0init----- | * opcode : statevar--- --- --- * syntax : --- --- > ahp,alp,abp,abr statevar ain, kcf, kq [, iosamps, istor]--- --- --- * description : --- --- Statevar is a new digital implementation of the analogue--- state-variable filter. This filter has four simultaneous outputs:--- high-pass, low-pass, band-pass and band-reject. This filter uses--- oversampling for sharper resonance (default: 3 times--- oversampling). It includes a resonance limiter that prevents the--- filter from getting unstable.--- --- --- * url : <http://www.csounds.com/manual/html/statevar.html>- -statevar ::- (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> MultiOut-statevar i0init a1in k2cf k3q = opcode "statevar" args- where args = [to a1in, to k2cf, to k3q] ++ map to i0init----- | * opcode : svfilter--- --- --- * syntax : --- --- > alow, ahigh, aband svfilter asig, kcf, kq [, iscl]--- --- --- * description : --- --- Implementation of a resonant second order filter, with--- simultaneous lowpass, highpass and bandpass outputs.--- --- --- * url : <http://www.csounds.com/manual/html/svfilter.html>- -svfilter ::- (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> MultiOut-svfilter i0init a1sig k2cf k3q = opcode "svfilter" args- where args = [to a1sig, to k2cf, to k3q] ++ map to i0init----- | * opcode : tbvcf--- --- --- * syntax : --- --- > ares tbvcf asig, xfco, xres, kdist, kasym [, iskip]--- --- --- * description : --- --- This opcode attempts to model some of the filter characteristics--- of a Roland TB303 voltage-controlled filter. Euler's method is--- used to approximate the system, rather than traditional filter--- methods. Cutoff frequency, Q, and distortion are all coupled.--- Empirical methods were used to try to unentwine, but frequency is--- only approximate as a result. Future fixes for some problems with--- this opcode may break existing orchestras relying on this version--- of tbvcf.--- --- --- * url : <http://www.csounds.com/manual/html/tbvcf.html>- -tbvcf ::- (X x0, X x1, K k0, K k1) =>- [Irate] -> Arate -> x0 -> x1 -> k0 -> k1 -> Arate-tbvcf i0init a1sig x2fco x3res k4dist k5asym = opcode "tbvcf" args- where args- = [to a1sig, to x2fco, to x3res, to k4dist, to k5asym] ++- map to i0init----- | * opcode : vlowres--- --- --- * syntax : --- --- > ares vlowres asig, kfco, kres, iord, ksep--- --- --- * description : --- --- A bank of filters in which the cutoff frequency can be separated--- under user control--- --- --- * url : <http://www.csounds.com/manual/html/vlowres.html>- -vlowres ::- (K k0, K k1, K k2) => Arate -> k0 -> k1 -> Irate -> k2 -> Arate-vlowres a0sig k1fco k2res i3ord k4sep = opcode "vlowres" args- where args = [to a0sig, to k1fco, to k2res, to i3ord, to k4sep]----- | * opcode : bqrez--- --- --- * syntax : --- --- > ares bqrez asig, xfco, xres [, imode] [, iskip]--- --- --- * description : --- --- A second-order multi-mode filter.--- --- --- * url : <http://www.csounds.com/manual/html/bqrez.html>- -bqrez :: (X x0, X x1) => [Irate] -> Arate -> x0 -> x1 -> Arate-bqrez i0init a1sig x2fco x3res = opcode "bqrez" args- where args = [to a1sig, to x2fco, to x3res] ++ map to i0init----- | * opcode : atone--- --- --- * syntax : --- --- > ares atone asig, khp [, iskip]--- --- --- * description : --- --- A hi-pass filter whose transfer functions are the complements of--- the tone opcode.--- --- --- * url : <http://www.csounds.com/manual/html/atone.html>- -atone :: (K k0) => [Irate] -> Arate -> k0 -> Arate-atone i0init a1sig k2hp = opcode "atone" args- where args = [to a1sig, to k2hp] ++ map to i0init----- | * opcode : atonex--- --- --- * syntax : --- --- > ares atonex asig, khp [, inumlayer] [, iskip]--- --- --- * description : --- --- atonex is equivalent to a filter consisting of more layers of--- atone with the same arguments, serially connected. Using a stack--- of a larger number of filters allows a sharper cutoff. They are--- faster than using a larger number instances in a Csound orchestra--- of the old opcodes, because only one initialization and k- cycle--- are needed at time and the audio loop falls entirely inside the--- cache memory of processor.--- --- --- * url : <http://www.csounds.com/manual/html/atonex.html>- -atonex :: (K k0) => [Irate] -> Arate -> k0 -> Arate-atonex i0init a1sig k2hp = opcode "atonex" args- where args = [to a1sig, to k2hp] ++ map to i0init----- | * opcode : tone--- --- --- * syntax : --- --- > ares tone asig, khp [, iskip]--- --- --- * description : --- --- A first-order recursive low-pass filter with variable frequency--- response.--- --- --- * url : <http://www.csounds.com/manual/html/tone.html>- -tone :: (K k0) => [Irate] -> Arate -> k0 -> Arate-tone i0init a1sig k2hp = opcode "tone" args- where args = [to a1sig, to k2hp] ++ map to i0init----- | * opcode : tonex--- --- --- * syntax : --- --- > ares tonex asig, khp [, inumlayer] [, iskip]--- --- --- * description : --- --- tonex is equivalent to a filter consisting of more layers of--- tone with the same arguments, serially connected. Using a stack--- of a larger number of filters allows a sharper cutoff. They are--- faster than using a larger number instances in a Csound orchestra--- of the old opcodes, because only one initialization and k- cycle--- are needed at time and the audio loop falls entirely inside the--- cache memory of processor.--- --- --- * url : <http://www.csounds.com/manual/html/tonex.html>- -tonex :: (K k0) => [Irate] -> Arate -> k0 -> Arate-tonex i0init a1sig k2hp = opcode "tonex" args- where args = [to a1sig, to k2hp] ++ map to i0init----- | * opcode : biquad--- --- --- * syntax : --- --- > ares biquad asig, kb0, kb1, kb2, ka0, ka1, ka2 [, iskip]--- --- --- * description : --- --- A sweepable general purpose biquadratic digital filter.--- --- --- * url : <http://www.csounds.com/manual/html/biquad.html>- -biquad ::- (K k0, K k1, K k2, K k3, K k4, K k5) =>- [Irate] -> Arate -> k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> Arate-biquad i0init a1sig k2b0 k3b1 k4b2 k5a0 k6a1 k7a2- = opcode "biquad" args- where args- = [to a1sig, to k2b0, to k3b1, to k4b2, to k5a0, to k6a1, to k7a2]- ++ map to i0init----- | * opcode : biquada--- --- --- * syntax : --- --- > ares biquada asig, ab0, ab1, ab2, aa0, aa1, aa2 [, iskip]--- --- --- * description : --- --- A sweepable general purpose biquadratic digital filter.--- --- --- * url : <http://www.csounds.com/manual/html/biquada.html>- -biquada ::- [Irate] ->- Arate ->- Arate -> Arate -> Arate -> Arate -> Arate -> Arate -> Arate-biquada i0init a1sig a2b0 a3b1 a4b2 a5a0 a6a1 a7a2- = opcode "biquada" args- where args- = [to a1sig, to a2b0, to a3b1, to a4b2, to a5a0, to a6a1, to a7a2]- ++ map to i0init----- | * opcode : butterbp--- --- --- * syntax : --- --- > ares butterbp asig, kfreq, kband [, iskip]--- --- --- * description : --- --- Implementation of a second-order band-pass Butterworth filter.--- This opcode can also be written as butbp.--- --- --- * url : <http://www.csounds.com/manual/html/butterbp.html>- -butterbp :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-butterbp i0init a1sig k2freq k3band = opcode "butterbp" args- where args = [to a1sig, to k2freq, to k3band] ++ map to i0init----- | * opcode : butterbr--- --- --- * syntax : --- --- > ares butterbr asig, kfreq, kband [, iskip]--- --- --- * description : --- --- Implementation of a second-order band-reject Butterworth filter.--- This opcode can also be written as butbr.--- --- --- * url : <http://www.csounds.com/manual/html/butterbr.html>- -butterbr :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-butterbr i0init a1sig k2freq k3band = opcode "butterbr" args- where args = [to a1sig, to k2freq, to k3band] ++ map to i0init----- | * opcode : butterhp--- --- --- * syntax : --- --- > ares butterhp asig, kfreq [, iskip]--- --- --- * description : --- --- Implementation of second-order high-pass Butterworth filter.--- This opcode can also be written as buthp.--- --- --- * url : <http://www.csounds.com/manual/html/butterhp.html>- -butterhp :: (K k0) => [Irate] -> Arate -> k0 -> Arate-butterhp i0init a1sig k2freq = opcode "butterhp" args- where args = [to a1sig, to k2freq] ++ map to i0init----- | * opcode : butterlp--- --- --- * syntax : --- --- > ares butterlp asig, kfreq [, iskip]--- --- --- * description : --- --- Implementation of a second-order low-pass Butterworth filter.--- This opcode can also be written as butlp.--- --- --- * url : <http://www.csounds.com/manual/html/butterlp.html>- -butterlp :: (K k0) => [Irate] -> Arate -> k0 -> Arate-butterlp i0init a1sig k2freq = opcode "butterlp" args- where args = [to a1sig, to k2freq] ++ map to i0init----- | * opcode : butbp--- --- --- * syntax : --- --- > ares butbp asig, kfreq, kband [, iskip]--- --- --- * description : --- --- Same as the butterbp opcode.--- --- --- * url : <http://www.csounds.com/manual/html/butbp.html>- -butbp :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-butbp i0init a1sig k2freq k3band = opcode "butbp" args- where args = [to a1sig, to k2freq, to k3band] ++ map to i0init----- | * opcode : butbr--- --- --- * syntax : --- --- > ares butbr asig, kfreq, kband [, iskip]--- --- --- * description : --- --- Same as the butterbr opcode.--- --- --- * url : <http://www.csounds.com/manual/html/butbr.html>- -butbr :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-butbr i0init a1sig k2freq k3band = opcode "butbr" args- where args = [to a1sig, to k2freq, to k3band] ++ map to i0init----- | * opcode : buthp--- --- --- * syntax : --- --- > ares buthp asig, kfreq [, iskip]--- --- --- * description : --- --- Same as the butterhp opcode.--- --- --- * url : <http://www.csounds.com/manual/html/buthp.html>- -buthp :: (K k0) => [Irate] -> Arate -> k0 -> Arate-buthp i0init a1sig k2freq = opcode "buthp" args- where args = [to a1sig, to k2freq] ++ map to i0init----- | * opcode : butlp--- --- --- * syntax : --- --- > ares butlp asig, kfreq [, iskip]--- --- --- * description : --- --- Same as the butterlp opcode.--- --- --- * url : <http://www.csounds.com/manual/html/butlp.html>- -butlp :: (K k0) => [Irate] -> Arate -> k0 -> Arate-butlp i0init a1sig k2freq = opcode "butlp" args- where args = [to a1sig, to k2freq] ++ map to i0init----- | * opcode : clfilt--- --- --- * syntax : --- --- > ares clfilt asig, kfreq, itype, inpol [, ikind] [, ipbr] [, isba] [, iskip]--- --- --- * description : --- --- Implements the classical standard analog filter types: low-pass--- and high-pass. They are implemented with the four classical kinds--- of filters: Butterworth, Chebyshev Type I, Chebyshev Type II, and--- Elliptical. The number of poles may be any even number from 2 to--- 80.--- --- --- * url : <http://www.csounds.com/manual/html/clfilt.html>- -clfilt ::- (K k0) => [Irate] -> Arate -> k0 -> Irate -> Irate -> Arate-clfilt i0init a1sig k2freq i3type i4npol = opcode "clfilt" args- where args- = [to a1sig, to k2freq, to i3type, to i4npol] ++ map to i0init----- | * opcode : aresonk--- --- --- * syntax : --- --- > kres aresonk ksig, kcf, kbw [, iscl] [, iskip]--- --- --- * description : --- --- A notch filter whose transfer functions are the complements of--- the reson opcode.--- --- --- * url : <http://www.csounds.com/manual/html/aresonk.html>- -aresonk :: (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> Krate-aresonk i0init k1sig k2cf k3bw = opcode "aresonk" args- where args = [to k1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : atonek--- --- --- * syntax : --- --- > kres atonek ksig, khp [, iskip]--- --- --- * description : --- --- A hi-pass filter whose transfer functions are the complements of--- the tonek opcode.--- --- --- * url : <http://www.csounds.com/manual/html/atonek.html>- -atonek :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-atonek i0init k1sig k2hp = opcode "atonek" args- where args = [to k1sig, to k2hp] ++ map to i0init----- | * opcode : lineto--- --- --- * syntax : --- --- > kres lineto ksig, ktime--- --- --- * description : --- --- Generate glissandos starting from a control signal.--- --- --- * url : <http://www.csounds.com/manual/html/lineto.html>- -lineto :: (K k0, K k1) => k0 -> k1 -> Krate-lineto k0sig k1time = opcode "lineto" args- where args = [to k0sig, to k1time]----- | * opcode : port--- --- --- * syntax : --- --- > kres port ksig, ihtim [, isig]--- --- --- * description : --- --- Applies portamento to a step-valued control signal.--- --- --- * url : <http://www.csounds.com/manual/html/port.html>- -port :: (K k0) => [Irate] -> k0 -> Irate -> Krate-port i0init k1sig i2htim = opcode "port" args- where args = [to k1sig, to i2htim] ++ map to i0init----- | * opcode : portk--- --- --- * syntax : --- --- > kres portk ksig, khtim [, isig]--- --- --- * description : --- --- Applies portamento to a step-valued control signal.--- --- --- * url : <http://www.csounds.com/manual/html/portk.html>- -portk :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-portk i0init k1sig k2htim = opcode "portk" args- where args = [to k1sig, to k2htim] ++ map to i0init----- | * opcode : resonk--- --- --- * syntax : --- --- > kres resonk ksig, kcf, kbw [, iscl] [, iskip]--- --- --- * description : --- --- A second-order resonant filter.--- --- --- * url : <http://www.csounds.com/manual/html/resonk.html>- -resonk :: (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> Krate-resonk i0init k1sig k2cf k3bw = opcode "resonk" args- where args = [to k1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : resonxk--- --- --- * syntax : --- --- > kres resonxk ksig, kcf, kbw[, inumlayer, iscl, istor]--- --- --- * description : --- --- resonxk is equivalent to a group of resonk filters, with the--- same arguments, serially connected. Using a stack of a larger--- number of filters allows a sharper cutoff.--- --- --- * url : <http://www.csounds.com/manual/html/resonxk.html>- -resonxk :: (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> Krate-resonxk i0init k1sig k2cf k3bw = opcode "resonxk" args- where args = [to k1sig, to k2cf, to k3bw] ++ map to i0init----- | * opcode : tlineto--- --- --- * syntax : --- --- > kres tlineto ksig, ktime, ktrig--- --- --- * description : --- --- Generate glissandos starting from a control signal with a--- trigger.--- --- --- * url : <http://www.csounds.com/manual/html/tlineto.html>- -tlineto :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Krate-tlineto k0sig k1time k2trig = opcode "tlineto" args- where args = [to k0sig, to k1time, to k2trig]----- | * opcode : tonek--- --- --- * syntax : --- --- > kres tonek ksig, khp [, iskip]--- --- --- * description : --- --- A first-order recursive low-pass filter with variable frequency--- response.--- --- --- * url : <http://www.csounds.com/manual/html/tonek.html>- -tonek :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-tonek i0init k1sig k2hp = opcode "tonek" args- where args = [to k1sig, to k2hp] ++ map to i0init
− src/CsoundExpr/Opcodes/Sigmod/Wavguide.hs
@@ -1,33 +0,0 @@--- | Waveguides-module CsoundExpr.Opcodes.Sigmod.Wavguide- (streson)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : streson--- --- --- * syntax : --- --- > ares streson asig, kfr, ifdbgain--- --- --- * description : --- --- An audio signal is modified by a string resonator with variable--- fundamental frequency.--- --- --- * url : <http://www.csounds.com/manual/html/streson.html>- -streson :: (K k0) => Arate -> k0 -> Irate -> Arate-streson a0sig k1fr i2fdbgain = opcode "streson" args- where args = [to a0sig, to k1fr, to i2fdbgain]
− src/CsoundExpr/Opcodes/Sigmod/Wavshape.hs
@@ -1,166 +0,0 @@--- | Waveshaping and Phase Distortion-module CsoundExpr.Opcodes.Sigmod.Wavshape- (chebyshevpoly,- polynomial,- powershape,- pdclip,- pdhalf,- pdhalfy)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : chebyshevpoly--- --- --- * syntax : --- --- > aout chebyshevpoly ain, k0 [, k1 [, k2 [...]]]--- --- --- * description : --- --- The chebyshevpoly opcode calculates the value of a polynomial--- expression with a single a-rate input variable that is made up of--- a linear combination of the first N Chebyshev polynomials of the--- first kind. Each Chebyshev polynomial, Tn(x), is weighted by a--- k-rate coefficient, kn, so that the opcode is calculating a sum--- of any number of terms in the form kn*Tn(x). Thus, the--- chebyshevpoly opcode allows for the waveshaping of an audio--- signal with a dynamic transfer function that gives precise--- control over the harmonic content of the output.--- --- --- * url : <http://www.csounds.com/manual/html/chebyshevpoly.html>- -chebyshevpoly :: (K k0) => Arate -> [k0] -> Arate-chebyshevpoly a0in k1vals = opcode "chebyshevpoly" args- where args = [to a0in] ++ map to k1vals----- | * opcode : polynomial--- --- --- * syntax : --- --- > aout polynomial ain, k0 [, k1 [, k2 [...]]]--- --- --- * description : --- --- The polynomial opcode calculates a polynomial with a single--- a-rate input variable. The polynomial is a sum of any number of--- terms in the form kn*x^n where kn is the nth coefficient of the--- expression. These coefficients are k-rate values.--- --- --- * url : <http://www.csounds.com/manual/html/polynomial.html>- -polynomial :: (K k0) => Arate -> [k0] -> Arate-polynomial a0in k1vals = opcode "polynomial" args- where args = [to a0in] ++ map to k1vals----- | * opcode : powershape--- --- --- * syntax : --- --- > aout powershape ain, kShapeAmount [, ifullscale]--- --- --- * description : --- --- The powershape opcode raises an input signal to a power with--- pre- and post-scaling of the signal so that the output will be in--- a predictable range. It also processes negative inputs in a--- symmetrical way to positive inputs, calculating a dynamic--- transfer function that is useful for waveshaping.--- --- --- * url : <http://www.csounds.com/manual/html/powershape.html>- -powershape :: (K k0) => [Irate] -> Arate -> k0 -> Arate-powershape i0init a1in k2ShapeAmount = opcode "powershape" args- where args = [to a1in, to k2ShapeAmount] ++ map to i0init----- | * opcode : pdclip--- --- --- * syntax : --- --- > aout pdclip ain, kWidth, kCenter [, ibipolar [, ifullscale]]--- --- --- * description : --- --- The pdclip opcode allows a percentage of the input range of a--- signal to be clipped to fullscale. It is similar to simply--- multiplying the signal and limiting the range of the result, but--- pdclip allows you to think about how much of the signal range is--- being distorted instead of the scalar factor and has a offset--- parameter for assymetric clipping of the signal range. pdclip is--- also useful for remapping phasors for phase distortion synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/pdclip.html>- -pdclip :: (K k0, K k1) => [Irate] -> Arate -> k0 -> k1 -> Arate-pdclip i0init a1in k2Width k3Center = opcode "pdclip" args- where args = [to a1in, to k2Width, to k3Center] ++ map to i0init----- | * opcode : pdhalf--- --- --- * syntax : --- --- > aout pdhalf ain, kShapeAmount [, ibipolar [, ifullscale]]--- --- --- * description : --- --- The pdhalf opcode is designed to emulate the "classic" phase--- distortion synthesis method of the Casio CZ-series of--- synthesizers from the mid-1980's. This technique reads the first--- and second halves of a function table at different rates in order--- to warp the waveform. For example, pdhalf can smoothly transform--- a sine wave into something approximating the shape of a saw wave.--- --- --- * url : <http://www.csounds.com/manual/html/pdhalf.html>- -pdhalf :: (K k0) => [Irate] -> Arate -> k0 -> Arate-pdhalf i0init a1in k2ShapeAmount = opcode "pdhalf" args- where args = [to a1in, to k2ShapeAmount] ++ map to i0init----- | * opcode : pdhalfy--- --- --- * syntax : --- --- > aout pdhalfy ain, kShapeAmount [, ibipolar [, ifullscale]]--- --- --- * description : --- --- The pdhalfy opcode is a variation on the phase distortion--- synthesis method of the pdhalf opcode. It is useful for--- distorting a phasor in order to read two unequal portions of a--- table in the same number of samples.--- --- --- * url : <http://www.csounds.com/manual/html/pdhalfy.html>- -pdhalfy :: (K k0) => [Irate] -> Arate -> k0 -> Arate-pdhalfy i0init a1in k2ShapeAmount = opcode "pdhalfy" args- where args = [to a1in, to k2ShapeAmount] ++ map to i0init
− src/CsoundExpr/Opcodes/SignalFlowGraphOpcodes.hs
@@ -1,8 +0,0 @@--- | Signal Flow Graph Opcodes-module CsoundExpr.Opcodes.SignalFlowGraphOpcodes- (module CsoundExpr.Opcodes.SignalFlowGraphOpcodes.SignalFlowGraphOpcodes)-where----import CsoundExpr.Opcodes.SignalFlowGraphOpcodes.SignalFlowGraphOpcodes
− src/CsoundExpr/Opcodes/SignalFlowGraphOpcodes/SignalFlowGraphOpcodes.hs
@@ -1,119 +0,0 @@--- | Signal Flow Graph Opcodes-module CsoundExpr.Opcodes.SignalFlowGraphOpcodes.SignalFlowGraphOpcodes- (outleta,- outletk,- inleta,- inletk,- ftgenonce)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : outleta--- --- --- * syntax : --- --- > outleta Sname, asignal--- --- --- * description : --- --- Sends an arate signal out from an instrument to a named port.--- --- --- * url : <http://www.csounds.com/manual/html/outleta.html>- -outleta :: String -> Arate -> SignalOut-outleta s0name a1signal = outOpcode "outleta" args- where args = [to s0name, to a1signal]----- | * opcode : outletk--- --- --- * syntax : --- --- > outletk Sname, ksignal--- --- --- * description : --- --- Sends a krate signal out from an instrument to a named port.--- --- --- * url : <http://www.csounds.com/manual/html/outletk.html>- -outletk :: (K k0) => String -> k0 -> SignalOut-outletk s0name k1signal = outOpcode "outletk" args- where args = [to s0name, to k1signal]----- | * opcode : inleta--- --- --- * syntax : --- --- > asignal inleta Sname--- --- --- * description : --- --- Receives an arate signal into an instrument through a named--- port.--- --- --- * url : <http://www.csounds.com/manual/html/inleta.html>- -inleta :: String -> Arate-inleta s0name = opcode "inleta" args- where args = [to s0name]----- | * opcode : inletk--- --- --- * syntax : --- --- > ksignal inletk Sname--- --- --- * description : --- --- Receives a krate signal into an instrument from a named port.--- --- --- * url : <http://www.csounds.com/manual/html/inletk.html>- -inletk :: String -> Krate-inletk s0name = opcode "inletk" args- where args = [to s0name]----- | * opcode : ftgenonce--- --- --- * syntax : --- --- > ifno ftgenonce ip1dummy, ip2dummy, isize, igen, iarga, iargb,...--- --- --- * description : --- --- Generate a function table from within an instrument definition,--- without duplication of data.--- --- --- * url : <http://www.csounds.com/manual/html/ftgenonce.html>- -ftgenonce :: Irate -> Irate -> Irate -> Irate -> [Irate] -> Irate-ftgenonce i0p1 i1p2 i2size i3gen i4vals = opcode "ftgenonce" args- where args- = [to i0p1, to i1p2, to i2size, to i3gen] ++ map to i4vals
− src/CsoundExpr/Opcodes/Spectral.hs
@@ -1,18 +0,0 @@--- | Spectral Processing-module CsoundExpr.Opcodes.Spectral- (module CsoundExpr.Opcodes.Spectral.SiggenStft,- module CsoundExpr.Opcodes.Spectral.Lpcresyn,- module CsoundExpr.Opcodes.Spectral.Nonstand,- module CsoundExpr.Opcodes.Spectral.RealTime,- module CsoundExpr.Opcodes.Spectral.ATS,- module CsoundExpr.Opcodes.Spectral.Loris)-where----import CsoundExpr.Opcodes.Spectral.SiggenStft-import CsoundExpr.Opcodes.Spectral.Lpcresyn-import CsoundExpr.Opcodes.Spectral.Nonstand-import CsoundExpr.Opcodes.Spectral.RealTime-import CsoundExpr.Opcodes.Spectral.ATS-import CsoundExpr.Opcodes.Spectral.Loris
− src/CsoundExpr/Opcodes/Spectral/ATS.hs
@@ -1,261 +0,0 @@--- | ATS Spectral Processing-module CsoundExpr.Opcodes.Spectral.ATS- (atsInfo,- atsRead,- atsReadnz,- atsBufread,- atsInterpread,- atsPartialtap,- atsAdd,- atsAddnz,- atsCross,- atsSinnoi)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : ATSinfo--- --- --- * syntax : --- --- > idata ATSinfo iatsfile, ilocation--- --- --- * description : --- --- atsinfo reads data out of the header of an ATS file.--- --- --- * url : <http://www.csounds.com/manual/html/ATSinfo.html>- -atsInfo :: Irate -> Irate -> Irate-atsInfo i0atsfile i1location = opcode "ATSinfo" args- where args = [to i0atsfile, to i1location]----- | * opcode : ATSread--- --- --- * syntax : --- --- > kfreq, kamp ATSread ktimepnt, iatsfile, ipartial--- --- --- * description : --- --- ATSread returns the amplitude (kamp) and frequency (kfreq)--- information of a user specified partial contained in the ATS--- analysis file at the time indicated by the time pointer ktimepnt.--- --- --- * url : <http://www.csounds.com/manual/html/ATSread.html>- -atsRead :: (K k0) => k0 -> Irate -> Irate -> MultiOut-atsRead k0timepnt i1atsfile i2partial = opcode "ATSread" args- where args = [to k0timepnt, to i1atsfile, to i2partial]----- | * opcode : ATSreadnz--- --- --- * syntax : --- --- > kenergy ATSreadnz ktimepnt, iatsfile, iband--- --- --- * description : --- --- ATSreadnz returns the energy (kenergy) of a user specified noise--- band (1-25 bands) at the time indicated by the time pointer--- ktimepnt.--- --- --- * url : <http://www.csounds.com/manual/html/ATSreadnz.html>- -atsReadnz :: (K k0) => k0 -> Irate -> Irate -> Krate-atsReadnz k0timepnt i1atsfile i2band = opcode "ATSreadnz" args- where args = [to k0timepnt, to i1atsfile, to i2band]----- | * opcode : ATSbufread--- --- --- * syntax : --- --- > ATSbufread ktimepnt, kfmod, iatsfile, ipartials[, ipartialoffset, --- > ipartialincr]--- --- --- * description : --- --- ATSbufread reads data from and ATS data file and stores it in an--- internal data table of frequency, amplitude pairs.--- --- --- * url : <http://www.csounds.com/manual/html/ATSbufread.html>- -atsBufread ::- (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Irate -> SignalOut-atsBufread i0init k1timepnt k2fmod i3atsfile i4partials- = outOpcode "ATSbufread" args- where args- = [to k1timepnt, to k2fmod, to i3atsfile, to i4partials] ++- map to i0init----- | * opcode : ATSinterpread--- --- --- * syntax : --- --- > kamp ATSinterpread kfreq--- --- --- * description : --- --- ATSinterpread allows a user to determine the frequency envelope--- of any ATSbufread.--- --- --- * url : <http://www.csounds.com/manual/html/ATSinterpread.html>- -atsInterpread :: (K k0) => k0 -> Krate-atsInterpread k0freq = opcode "ATSinterpread" args- where args = [to k0freq]----- | * opcode : ATSpartialtap--- --- --- * syntax : --- --- > kfrq, kamp ATSpartialtap ipartialnum--- --- --- * description : --- --- ATSpartialtap takes a partial number and returns a frequency,--- amplitude pair. The frequency and amplitude data comes from an--- ATSbufread opcode.--- --- --- * url : <http://www.csounds.com/manual/html/ATSpartialtap.html>- -atsPartialtap :: Irate -> MultiOut-atsPartialtap i0partialnum = opcode "ATSpartialtap" args- where args = [to i0partialnum]----- | * opcode : ATSadd--- --- --- * syntax : --- --- > ar ATSadd ktimepnt, kfmod, iatsfile, ifn, ipartials[, ipartialoffset, --- > ipartialincr, igatefn]--- --- --- * description : --- --- ATSadd reads from an ATS analysis file and uses the data to--- perform additive synthesis using an internal array of--- interpolating oscillators.--- --- --- * url : <http://www.csounds.com/manual/html/ATSadd.html>- -atsAdd ::- (K k0, K k1) =>- [Irate] -> k0 -> k1 -> Irate -> Irate -> Irate -> Arate-atsAdd i0init k1timepnt k2fmod i3atsfile i4fn i5partials- = opcode "ATSadd" args- where args- = [to k1timepnt, to k2fmod, to i3atsfile, to i4fn, to i5partials]- ++ map to i0init----- | * opcode : ATSaddnz--- --- --- * syntax : --- --- > ar ATSaddnz ktimepnt, iatsfile, ibands[, ibandoffset, ibandincr]--- --- --- * description : --- --- ATSaddnz reads from an ATS analysis file and uses the data to--- perform additive synthesis using a modified randi function.--- --- --- * url : <http://www.csounds.com/manual/html/ATSaddnz.html>- -atsAddnz :: (K k0) => [Irate] -> k0 -> Irate -> Irate -> Arate-atsAddnz i0init k1timepnt i2atsfile i3bands- = opcode "ATSaddnz" args- where args- = [to k1timepnt, to i2atsfile, to i3bands] ++ map to i0init----- | * opcode : ATScross--- --- --- * syntax : --- --- > ar ATScross ktimepnt, kfmod, iatsfile, ifn, kmylev, kbuflev, ipartials --- > [, ipartialoffset, ipartialincr]--- --- --- * description : --- --- ATScross uses data from an ATS analysis file and data from an--- ATSbufread to perform cross synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/ATScross.html>- -atsCross ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> Irate -> Irate -> k2 -> k3 -> Irate -> Arate-atsCross i0init k1timepnt k2fmod i3atsfile i4fn k5mylev k6buflev- i7partials = opcode "ATScross" args- where args- = [to k1timepnt, to k2fmod, to i3atsfile, to i4fn, to k5mylev,- to k6buflev, to i7partials]- ++ map to i0init----- | * opcode : ATSsinnoi--- --- --- * syntax : --- --- > ar ATSsinnoi ktimepnt, ksinlev, knzlev, kfmod, iatsfile, ipartials --- > [, ipartialoffset, ipartialincr]--- --- --- * description : --- --- ATSsinnoi reads data from an ATS data file and uses the--- information to synthesize sines and noise together.--- --- --- * url : <http://www.csounds.com/manual/html/ATSsinnoi.html>- -atsSinnoi ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> k2 -> k3 -> Irate -> Irate -> Arate-atsSinnoi i0init k1timepnt k2sinlev k3nzlev k4fmod i5atsfile- i6partials = opcode "ATSsinnoi" args- where args- = [to k1timepnt, to k2sinlev, to k3nzlev, to k4fmod, to i5atsfile,- to i6partials]- ++ map to i0init
− src/CsoundExpr/Opcodes/Spectral/Loris.hs
@@ -1,97 +0,0 @@--- | Loris Opcodes-module CsoundExpr.Opcodes.Spectral.Loris- (lorisread,- lorismorph,- lorisplay)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : lorisread--- --- --- * syntax : --- --- > lorisread ktimpnt, ifilcod, istoreidx, kfreqenv, kampenv, kbwenv[, ifadetime]--- --- --- * description : --- --- lorisread imports a set of bandwidth-enhanced partials from a--- SDIF-format data file, applying control-rate frequency,--- amplitude, and bandwidth scaling envelopes, and stores the--- modified partials in memory.--- --- --- * url : <http://www.csounds.com/manual/html/lorisread.html>- -lorisread ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> String -> Irate -> k1 -> k2 -> k3 -> SignalOut-lorisread i0init k1timpnt s2file i3storeidx k4freqenv k5ampenv- k6bwenv = outOpcode "lorisread" args- where args- = [to k1timpnt, to s2file, to i3storeidx, to k4freqenv,- to k5ampenv, to k6bwenv]- ++ map to i0init----- | * opcode : lorismorph--- --- --- * syntax : --- --- > lorismorph isrcidx, itgtidx, istoreidx, kfreqmorphenv, kampmorphenv, kbwmorphenv--- --- --- * description : --- --- lorismorph morphs two stored sets of bandwidth-enhanced partials--- and stores a new set of partials representing the morphed sound.--- The morph is performed by linearly interpolating the parameter--- envelopes (frequency, amplitude, and bandwidth, or noisiness) of--- the bandwidth-enhanced partials according to control-rate--- frequency, amplitude, and bandwidth morphing functions.--- --- --- * url : <http://www.csounds.com/manual/html/lorismorph.html>- -lorismorph ::- (K k0, K k1, K k2) =>- Irate -> Irate -> Irate -> k0 -> k1 -> k2 -> SignalOut-lorismorph i0srcidx i1tgtidx i2storeidx k3freqmorphenv- k4ampmorphenv k5bwmorphenv = outOpcode "lorismorph" args- where args- = [to i0srcidx, to i1tgtidx, to i2storeidx, to k3freqmorphenv,- to k4ampmorphenv, to k5bwmorphenv]----- | * opcode : lorisplay--- --- --- * syntax : --- --- > ar lorisplay ireadidx, kfreqenv, kampenv, kbwenv--- --- --- * description : --- --- lorisplay renders a stored set of bandwidth-enhanced partials--- using the method of Bandwidth-Enhanced Additive Synthesis--- implemented in the Loris software, applying control-rate--- frequency, amplitude, and bandwidth scaling envelopes.--- --- --- * url : <http://www.csounds.com/manual/html/lorisplay.html>- -lorisplay :: (K k0, K k1, K k2) => Irate -> k0 -> k1 -> k2 -> Arate-lorisplay i0readidx k1freqenv k2ampenv k3bwenv- = opcode "lorisplay" args- where args = [to i0readidx, to k1freqenv, to k2ampenv, to k3bwenv]
− src/CsoundExpr/Opcodes/Spectral/Lpcresyn.hs
@@ -1,119 +0,0 @@--- | Linear Predictive Coding (LPC) Resynthesis-module CsoundExpr.Opcodes.Spectral.Lpcresyn- (lpfreson,- lpinterp,- lpread,- lpreson,- lpslot)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : lpfreson--- --- --- * syntax : --- --- > ares lpfreson asig, kfrqratio--- --- --- * description : --- --- Resynthesises a signal from the data passed internally by a--- previous lpread, applying formant shifting.--- --- --- * url : <http://www.csounds.com/manual/html/lpfreson.html>- -lpfreson :: (K k0) => Arate -> k0 -> Arate-lpfreson a0sig k1frqratio = opcode "lpfreson" args- where args = [to a0sig, to k1frqratio]----- | * opcode : lpinterp--- --- --- * syntax : --- --- > lpinterp islot1, islot2, kmix--- --- --- * description : --- --- Computes a new set of poles from the interpolation between two--- analysis.--- --- --- * url : <http://www.csounds.com/manual/html/lpinterp.html>- -lpinterp :: (K k0) => Irate -> Irate -> k0 -> SignalOut-lpinterp i0slot1 i1slot2 k2mix = outOpcode "lpinterp" args- where args = [to i0slot1, to i1slot2, to k2mix]----- | * opcode : lpread--- --- --- * syntax : --- --- > krmsr, krmso, kerr, kcps lpread ktimpnt, ifilcod [, inpoles] [, ifrmrate]--- --- --- * description : --- --- Reads a control file of time-ordered information frames.--- --- --- * url : <http://www.csounds.com/manual/html/lpread.html>- -lpread :: (K k0) => [Irate] -> k0 -> String -> MultiOut-lpread i0init k1timpnt s2file = opcode "lpread" args- where args = [to k1timpnt, to s2file] ++ map to i0init----- | * opcode : lpreson--- --- --- * syntax : --- --- > ares lpreson asig--- --- --- * description : --- --- Resynthesises a signal from the data passed internally by a--- previous lpread.--- --- --- * url : <http://www.csounds.com/manual/html/lpreson.html>- -lpreson :: Arate -> Arate-lpreson a0sig = opcode "lpreson" args- where args = [to a0sig]----- | * opcode : lpslot--- --- --- * syntax : --- --- > lpslot islot--- --- --- * description : --- --- Selects the slot to be use by further lp opcodes.--- --- --- * url : <http://www.csounds.com/manual/html/lpslot.html>- -lpslot :: Irate -> SignalOut-lpslot i0slot = outOpcode "lpslot" args- where args = [to i0slot]
− src/CsoundExpr/Opcodes/Spectral/Nonstand.hs
@@ -1,13 +0,0 @@--- | Non-standard Spectral Processing-module CsoundExpr.Opcodes.Spectral.Nonstand- ()-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined--
− src/CsoundExpr/Opcodes/Spectral/RealTime.hs
@@ -1,13 +0,0 @@--- | Tools for Real-time Spectral Processing (pvs opcodes)-module CsoundExpr.Opcodes.Spectral.RealTime- ()-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined--
− src/CsoundExpr/Opcodes/Spectral/SiggenStft.hs
@@ -1,268 +0,0 @@--- | Short-time Fourier Transform (STFT) Resynthesis-module CsoundExpr.Opcodes.Spectral.SiggenStft- (tableseg,- pvadd,- pvbufread,- pvcross,- pvinterp,- pvoc,- pvread,- tablexseg,- vpvoc)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : tableseg--- --- --- * syntax : --- --- > tableseg ifn1, idur1, ifn2 [, idur2] [, ifn3] [...]--- --- --- * description : --- --- tableseg is like linseg but interpolate between values in a--- stored function tables. The result is a new function table passed--- internally to any following vpvoc which occurs before a--- subsequent tableseg (much like lpread/lpreson pairs work). The--- uses of these are described below under vpvoc.--- --- --- * url : <http://www.csounds.com/manual/html/tableseg.html>- -tableseg :: [Irate] -> SignalOut-tableseg i0ifns = outOpcode "tableseg" args- where args = map to i0ifns----- | * opcode : pvadd--- --- --- * syntax : --- --- > ares pvadd ktimpnt, kfmod, ifilcod, ifn, ibins [, ibinoffset] --- > [, ibinincr] [, iextractmode] [, ifreqlim] [, igatefn]--- --- --- * description : --- --- pvadd reads from a pvoc file and uses the data to perform--- additive synthesis using an internal array of interpolating--- oscillators. The user supplies the wave table (usually one period--- of a sine wave), and can choose which analysis bins will be used--- in the re-synthesis.--- --- --- * url : <http://www.csounds.com/manual/html/pvadd.html>- -pvadd ::- (K k0, K k1) =>- [Irate] -> k0 -> k1 -> String -> Irate -> Irate -> Arate-pvadd i0init k1timpnt k2fmod s3file i4fn i5bins- = opcode "pvadd" args- where args- = [to k1timpnt, to k2fmod, to s3file, to i4fn, to i5bins] ++- map to i0init----- | * opcode : pvbufread--- --- --- * syntax : --- --- > pvbufread ktimpnt, ifile--- --- --- * description : --- --- pvbufread reads from a pvoc file and makes the retrieved data--- available to any following pvinterp and pvcross units that appear--- in an instrument before a subsequent pvbufread (just as lpread--- and lpreson work together). The data is passed internally and the--- unit has no output of its own.--- --- --- * url : <http://www.csounds.com/manual/html/pvbufread.html>- -pvbufread :: (K k0) => k0 -> Irate -> SignalOut-pvbufread k0timpnt i1file = outOpcode "pvbufread" args- where args = [to k0timpnt, to i1file]----- | * opcode : pvcross--- --- --- * syntax : --- --- > ares pvcross ktimpnt, kfmod, ifile, kampscale1, kampscale2 [, ispecwp]--- --- --- * description : --- --- pvcross applies the amplitudes from one phase vocoder analysis--- file to the data from a second file and then performs the--- resynthesis. The data is passed, as described above, from a--- previously called pvbufread unit. The two k-rate amplitude--- arguments are used to scale the amplitudes of each files--- separately before they are added together and used in the--- resynthesis (see below for further explanation). The frequencies--- of the first file are not used at all in this process. This unit--- simply allows for cross-synthesis through the application of the--- amplitudes of the spectra of one signal to the frequencies of a--- second signal. Unlike pvinterp, pvcross does allow for the use of--- the ispecwp as in pvoc and vpvoc.--- --- --- * url : <http://www.csounds.com/manual/html/pvcross.html>- -pvcross ::- (K k0, K k1, K k2, K k3) =>- [Irate] -> k0 -> k1 -> Irate -> k2 -> k3 -> Arate-pvcross i0init k1timpnt k2fmod i3file k4ampscale1 k5ampscale2- = opcode "pvcross" args- where args- = [to k1timpnt, to k2fmod, to i3file, to k4ampscale1,- to k5ampscale2]- ++ map to i0init----- | * opcode : pvinterp--- --- --- * syntax : --- --- > ares pvinterp ktimpnt, kfmod, ifile, kfreqscale1, kfreqscale2, --- > kampscale1, kampscale2, kfreqinterp, kampinterp--- --- --- * description : --- --- pvinterp interpolates between the amplitudes and frequencies, on--- a bin by bin basis, of two phase vocoder analysis files (one from--- a previously called pvbufread unit and the other from within its--- own argument list), allowing for user defined transitions between--- analyzed sounds. It also allows for general scaling of the--- amplitudes and frequencies of each file separately before the--- interpolated values are calculated and sent to the resynthesis--- routines. The kfmod argument in pvinterp performs its frequency--- scaling on the frequency values after their derivation from the--- separate scaling and subsequent interpolation is performed so--- that this acts as an overall scaling value of the new frequency--- components.--- --- --- * url : <http://www.csounds.com/manual/html/pvinterp.html>- -pvinterp ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7) =>- k0 -> k1 -> Irate -> k2 -> k3 -> k4 -> k5 -> k6 -> k7 -> Arate-pvinterp k0timpnt k1fmod i2file k3freqscale1 k4freqscale2- k5ampscale1 k6ampscale2 k7freqinterp k8ampinterp- = opcode "pvinterp" args- where args- = [to k0timpnt, to k1fmod, to i2file, to k3freqscale1,- to k4freqscale2, to k5ampscale1, to k6ampscale2, to k7freqinterp,- to k8ampinterp]----- | * opcode : pvoc--- --- --- * syntax : --- --- > ares pvoc ktimpnt, kfmod, ifilcod [, ispecwp] [, iextractmode] --- > [, ifreqlim] [, igatefn]--- --- --- * description : --- --- Implements signal reconstruction using an fft-based phase--- vocoder.--- --- --- * url : <http://www.csounds.com/manual/html/pvoc.html>- -pvoc :: (K k0, K k1) => [Irate] -> k0 -> k1 -> String -> Arate-pvoc i0init k1timpnt k2fmod s3file = opcode "pvoc" args- where args = [to k1timpnt, to k2fmod, to s3file] ++ map to i0init----- | * opcode : pvread--- --- --- * syntax : --- --- > kfreq, kamp pvread ktimpnt, ifile, ibin--- --- --- * description : --- --- pvread reads from a pvoc file and returns the frequency and--- amplitude from a single analysis channel or bin. The returned--- values can be used anywhere else in the Csound instrument. For--- example, one can use them as arguments to an oscillator to--- synthesize a single component from an analyzed signal or a bank--- of pvreads can be used to resynthesize the analyzed sound using--- additive synthesis by passing the frequency and magnitude values--- to a bank of oscillators.--- --- --- * url : <http://www.csounds.com/manual/html/pvread.html>- -pvread :: (K k0) => k0 -> Irate -> Irate -> MultiOut-pvread k0timpnt i1file i2bin = opcode "pvread" args- where args = [to k0timpnt, to i1file, to i2bin]----- | * opcode : tablexseg--- --- --- * syntax : --- --- > tablexseg ifn1, idur1, ifn2 [, idur2] [, ifn3] [...]--- --- --- * description : --- --- tablexseg is like expseg but interpolate between values in a--- stored function tables. The result is a new function table passed--- internally to any following vpvoc which occurs before a--- subsequent tablexseg (much like lpread/lpreson pairs work). The--- uses of these are described below under vpvoc.--- --- --- * url : <http://www.csounds.com/manual/html/tablexseg.html>- -tablexseg :: [Irate] -> SignalOut-tablexseg i0ifns = outOpcode "tablexseg" args- where args = map to i0ifns----- | * opcode : vpvoc--- --- --- * syntax : --- --- > ares vpvoc ktimpnt, kfmod, ifile [, ispecwp] [, ifn]--- --- --- * description : --- --- Implements signal reconstruction using an fft-based phase--- vocoder and an extra envelope.--- --- --- * url : <http://www.csounds.com/manual/html/vpvoc.html>- -vpvoc :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> Arate-vpvoc i0init k1timpnt k2fmod i3file = opcode "vpvoc" args- where args = [to k1timpnt, to k2fmod, to i3file] ++ map to i0init
− src/CsoundExpr/Opcodes/Table.hs
@@ -1,12 +0,0 @@--- | Function Table Control-module CsoundExpr.Opcodes.Table- (module CsoundExpr.Opcodes.Table.Queries,- module CsoundExpr.Opcodes.Table.Readwrit,- module CsoundExpr.Opcodes.Table.Select)-where----import CsoundExpr.Opcodes.Table.Queries-import CsoundExpr.Opcodes.Table.Readwrit-import CsoundExpr.Opcodes.Table.Select
− src/CsoundExpr/Opcodes/Table/Queries.hs
@@ -1,162 +0,0 @@--- | Table Queries-module CsoundExpr.Opcodes.Table.Queries- (ftchnls,- ftlen,- ftlptim,- ftsr,- nsamp,- tablengI,- tablengK)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : ftchnls--- --- --- * syntax : --- --- > ftchnls(x) (init-rate args only)--- --- --- * description : --- --- Returns the number of channels in a stored function table.--- --- --- * url : <http://www.csounds.com/manual/html/ftchnls.html>- -ftchnls :: Irate -> Irate-ftchnls i0sig = prefixOperation "ftchnls" args- where args = [to i0sig]----- | * opcode : ftlen--- --- --- * syntax : --- --- > ftlen(x) (init-rate args only)--- --- --- * description : --- --- Returns the size of a stored function table.--- --- --- * url : <http://www.csounds.com/manual/html/ftlen.html>- -ftlen :: Irate -> Irate-ftlen i0sig = prefixOperation "ftlen" args- where args = [to i0sig]----- | * opcode : ftlptim--- --- --- * syntax : --- --- > ftlptim(x) (init-rate args only)--- --- --- * description : --- --- Returns the loop segment start-time of a stored function table--- number.--- --- --- * url : <http://www.csounds.com/manual/html/ftlptim.html>- -ftlptim :: Irate -> Irate-ftlptim i0sig = prefixOperation "ftlptim" args- where args = [to i0sig]----- | * opcode : ftsr--- --- --- * syntax : --- --- > ftsr(x) (init-rate args only)--- --- --- * description : --- --- Returns the sampling-rate of a stored function table.--- --- --- * url : <http://www.csounds.com/manual/html/ftsr.html>- -ftsr :: Irate -> Irate-ftsr i0sig = prefixOperation "ftsr" args- where args = [to i0sig]----- | * opcode : nsamp--- --- --- * syntax : --- --- > nsamp(x) (init-rate args only)--- --- --- * description : --- --- Returns the number of samples loaded into a stored function--- table number.--- --- --- * url : <http://www.csounds.com/manual/html/nsamp.html>- -nsamp :: Irate -> Irate-nsamp i0sig = prefixOperation "nsamp" args- where args = [to i0sig]----- | * opcode : tableng--- --- --- * syntax : --- --- > ires tableng ifn--- > kres tableng kfn--- --- --- * description : --- --- Interrogates a function table for length.--- --- --- * url : <http://www.csounds.com/manual/html/tableng.html>- -tablengI :: Irate -> Irate-tablengI i0fn = opcode "tableng" args- where args = [to i0fn]----- | * opcode : tableng--- --- --- * syntax : --- --- > ires tableng ifn--- > kres tableng kfn--- --- --- * description : --- --- Interrogates a function table for length.--- --- --- * url : <http://www.csounds.com/manual/html/tableng.html>- -tablengK :: (K k0) => k0 -> Krate-tablengK k0fn = opcode "tableng" args- where args = [to k0fn]
− src/CsoundExpr/Opcodes/Table/Readwrit.hs
@@ -1,600 +0,0 @@--- | Read/Write Operations-module CsoundExpr.Opcodes.Table.Readwrit- (ftloadk,- ftload,- ftsavek,- ftsave,- tablecopy,- tablegpw,- tableicopy,- tableigpw,- tableimix,- tableiw,- tablemix,- tablera,- tablewA,- tablewI,- tablewK,- tablewa,- tablewktA,- tablewktK,- tabmorph,- tabmorpha,- tabmorphak,- tabmorphi,- tabrec,- tabplay)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : ftloadk--- --- --- * syntax : --- --- > ftloadk "filename", ktrig, iflag, ifn1 [, ifn2] [...]--- --- --- * description : --- --- Load a set of previously-allocated tables from a file.--- --- --- * url : <http://www.csounds.com/manual/html/ftloadk.html>- -ftloadk :: (K k0) => String -> k0 -> Irate -> [Irate] -> SignalOut-ftloadk s0filename k1trig i2flag i3fns = outOpcode "ftloadk" args- where args = [to s0filename, to k1trig, to i2flag] ++ map to i3fns----- | * opcode : ftload--- --- --- * syntax : --- --- > ftload "filename", iflag, ifn1 [, ifn2] [...]--- --- --- * description : --- --- Load a set of previously-allocated tables from a file.--- --- --- * url : <http://www.csounds.com/manual/html/ftload.html>- -ftload :: String -> Irate -> [Irate] -> SignalOut-ftload s0filename i1flag i2fns = outOpcode "ftload" args- where args = [to s0filename, to i1flag] ++ map to i2fns----- | * opcode : ftsavek--- --- --- * syntax : --- --- > ftsavek "filename", ktrig, iflag, ifn1 [, ifn2] [...]--- --- --- * description : --- --- Save a set of previously-allocated tables to a file.--- --- --- * url : <http://www.csounds.com/manual/html/ftsavek.html>- -ftsavek :: (K k0) => String -> k0 -> Irate -> [Irate] -> SignalOut-ftsavek s0filename k1trig i2flag i3fns = outOpcode "ftsavek" args- where args = [to s0filename, to k1trig, to i2flag] ++ map to i3fns----- | * opcode : ftsave--- --- --- * syntax : --- --- > ftsave "filename", iflag, ifn1 [, ifn2] [...]--- --- --- * description : --- --- Save a set of previously-allocated tables to a file.--- --- --- * url : <http://www.csounds.com/manual/html/ftsave.html>- -ftsave :: String -> Irate -> [Irate] -> SignalOut-ftsave s0filename i1flag i2fns = outOpcode "ftsave" args- where args = [to s0filename, to i1flag] ++ map to i2fns----- | * opcode : tablecopy--- --- --- * syntax : --- --- > tablecopy kdft, ksft--- --- --- * description : --- --- Simple, fast table copy opcode.--- --- --- * url : <http://www.csounds.com/manual/html/tablecopy.html>- -tablecopy :: (K k0, K k1) => k0 -> k1 -> SignalOut-tablecopy k0dft k1sft = outOpcode "tablecopy" args- where args = [to k0dft, to k1sft]----- | * opcode : tablegpw--- --- --- * syntax : --- --- > tablegpw kfn--- --- --- * description : --- --- Writes a table's guard point.--- --- --- * url : <http://www.csounds.com/manual/html/tablegpw.html>- -tablegpw :: (K k0) => k0 -> SignalOut-tablegpw k0fn = outOpcode "tablegpw" args- where args = [to k0fn]----- | * opcode : tableicopy--- --- --- * syntax : --- --- > tableicopy idft, isft--- --- --- * description : --- --- Simple, fast table copy opcode.--- --- --- * url : <http://www.csounds.com/manual/html/tableicopy.html>- -tableicopy :: Irate -> Irate -> SignalOut-tableicopy i0dft i1sft = outOpcode "tableicopy" args- where args = [to i0dft, to i1sft]----- | * opcode : tableigpw--- --- --- * syntax : --- --- > tableigpw ifn--- --- --- * description : --- --- Writes a table's guard point.--- --- --- * url : <http://www.csounds.com/manual/html/tableigpw.html>- -tableigpw :: Irate -> SignalOut-tableigpw i0fn = outOpcode "tableigpw" args- where args = [to i0fn]----- | * opcode : tableimix--- --- --- * syntax : --- --- > tableimix idft, idoff, ilen, is1ft, is1off, is1g, is2ft, is2off, is2g--- --- --- * description : --- --- Mixes two tables.--- --- --- * url : <http://www.csounds.com/manual/html/tableimix.html>- -tableimix ::- Irate ->- Irate ->- Irate ->- Irate -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-tableimix i0dft i1doff i2len i3s1ft i4s1off i5s1g i6s2ft i7s2off- i8s2g = outOpcode "tableimix" args- where args- = [to i0dft, to i1doff, to i2len, to i3s1ft, to i4s1off, to i5s1g,- to i6s2ft, to i7s2off, to i8s2g]----- | * opcode : tableiw--- --- --- * syntax : --- --- > tableiw isig, indx, ifn [, ixmode] [, ixoff] [, iwgmode]--- --- --- * description : --- --- This opcode operates on existing function tables, changing their--- contents. tableiw is used when all inputs are init time variables--- or constants and you only want to run it at the initialization of--- the instrument. The valid combinations of variable types are--- shown by the first letter of the variable names.--- --- --- * url : <http://www.csounds.com/manual/html/tableiw.html>- -tableiw :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-tableiw i0init i1sig i2ndx i3fn = outOpcode "tableiw" args- where args = [to i1sig, to i2ndx, to i3fn] ++ map to i0init----- | * opcode : tablemix--- --- --- * syntax : --- --- > tablemix kdft, kdoff, klen, ks1ft, ks1off, ks1g, ks2ft, ks2off, ks2g--- --- --- * description : --- --- Mixes two tables.--- --- --- * url : <http://www.csounds.com/manual/html/tablemix.html>- -tablemix ::- (K k0, K k1, K k2, K k3, K k4, K k5, K k6, K k7, K k8) =>- k0 -> k1 -> k2 -> k3 -> k4 -> k5 -> k6 -> k7 -> k8 -> SignalOut-tablemix k0dft k1doff k2len k3s1ft k4s1off k5s1g k6s2ft k7s2off- k8s2g = outOpcode "tablemix" args- where args- = [to k0dft, to k1doff, to k2len, to k3s1ft, to k4s1off, to k5s1g,- to k6s2ft, to k7s2off, to k8s2g]----- | * opcode : tablera--- --- --- * syntax : --- --- > ares tablera kfn, kstart, koff--- --- --- * description : --- --- These opcode reads tables in sequential locations to an a-rate--- variable. Some thought is required before using it. It has at--- least two major, and quite different, applications which are--- discussed below.--- --- --- * url : <http://www.csounds.com/manual/html/tablera.html>- -tablera :: (K k0, K k1, K k2) => k0 -> k1 -> k2 -> Arate-tablera k0fn k1start k2off = opcode "tablera" args- where args = [to k0fn, to k1start, to k2off]----- | * opcode : tablew--- --- --- * syntax : --- --- > tablew asig, andx, ifn [, ixmode] [, ixoff] [, iwgmode]--- > tablew isig, indx, ifn [, ixmode] [, ixoff] [, iwgmode]--- > tablew ksig, kndx, ifn [, ixmode] [, ixoff] [, iwgmode]--- --- --- * description : --- --- This opcode operates on existing function tables, changing their--- contents. tablew is for writing at k- or at a-rates, with the--- table number being specified at init time. The valid combinations--- of variable types are shown by the first letter of the variable--- names.--- --- --- * url : <http://www.csounds.com/manual/html/tablew.html>- -tablewA :: [Irate] -> Arate -> Arate -> Irate -> SignalOut-tablewA i0init a1sig a2ndx i3fn = outOpcode "tablew" args- where args = [to a1sig, to a2ndx, to i3fn] ++ map to i0init----- | * opcode : tablew--- --- --- * syntax : --- --- > tablew asig, andx, ifn [, ixmode] [, ixoff] [, iwgmode]--- > tablew isig, indx, ifn [, ixmode] [, ixoff] [, iwgmode]--- > tablew ksig, kndx, ifn [, ixmode] [, ixoff] [, iwgmode]--- --- --- * description : --- --- This opcode operates on existing function tables, changing their--- contents. tablew is for writing at k- or at a-rates, with the--- table number being specified at init time. The valid combinations--- of variable types are shown by the first letter of the variable--- names.--- --- --- * url : <http://www.csounds.com/manual/html/tablew.html>- -tablewI :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-tablewI i0init i1sig i2ndx i3fn = outOpcode "tablew" args- where args = [to i1sig, to i2ndx, to i3fn] ++ map to i0init----- | * opcode : tablew--- --- --- * syntax : --- --- > tablew asig, andx, ifn [, ixmode] [, ixoff] [, iwgmode]--- > tablew isig, indx, ifn [, ixmode] [, ixoff] [, iwgmode]--- > tablew ksig, kndx, ifn [, ixmode] [, ixoff] [, iwgmode]--- --- --- * description : --- --- This opcode operates on existing function tables, changing their--- contents. tablew is for writing at k- or at a-rates, with the--- table number being specified at init time. The valid combinations--- of variable types are shown by the first letter of the variable--- names.--- --- --- * url : <http://www.csounds.com/manual/html/tablew.html>- -tablewK ::- (K k0, K k1) => [Irate] -> k0 -> k1 -> Irate -> SignalOut-tablewK i0init k1sig k2ndx i3fn = outOpcode "tablew" args- where args = [to k1sig, to k2ndx, to i3fn] ++ map to i0init----- | * opcode : tablewa--- --- --- * syntax : --- --- > kstart tablewa kfn, asig, koff--- --- --- * description : --- --- This opcode writes to a table in sequential locations to and--- from an a-rate variable. Some thought is required before using--- it. It has at least two major, and quite different, applications--- which are discussed below.--- --- --- * url : <http://www.csounds.com/manual/html/tablewa.html>- -tablewa :: (K k0, K k1) => k0 -> Arate -> k1 -> Krate-tablewa k0fn a1sig k2off = opcode "tablewa" args- where args = [to k0fn, to a1sig, to k2off]----- | * opcode : tablewkt--- --- --- * syntax : --- --- > tablewkt asig, andx, kfn [, ixmode] [, ixoff] [, iwgmode]--- > tablewkt ksig, kndx, kfn [, ixmode] [, ixoff] [, iwgmode]--- --- --- * description : --- --- This opcode operates on existing function tables, changing their--- contents. tablewkt uses a k-rate variable for selecting the table--- number. The valid combinations of variable types are shown by the--- first letter of the variable names.--- --- --- * url : <http://www.csounds.com/manual/html/tablewkt.html>- -tablewktA :: (K k0) => [Irate] -> Arate -> Arate -> k0 -> SignalOut-tablewktA i0init a1sig a2ndx k3fn = outOpcode "tablewkt" args- where args = [to a1sig, to a2ndx, to k3fn] ++ map to i0init----- | * opcode : tablewkt--- --- --- * syntax : --- --- > tablewkt asig, andx, kfn [, ixmode] [, ixoff] [, iwgmode]--- > tablewkt ksig, kndx, kfn [, ixmode] [, ixoff] [, iwgmode]--- --- --- * description : --- --- This opcode operates on existing function tables, changing their--- contents. tablewkt uses a k-rate variable for selecting the table--- number. The valid combinations of variable types are shown by the--- first letter of the variable names.--- --- --- * url : <http://www.csounds.com/manual/html/tablewkt.html>- -tablewktK ::- (K k0, K k1, K k2) => [Irate] -> k0 -> k1 -> k2 -> SignalOut-tablewktK i0init k1sig k2ndx k3fn = outOpcode "tablewkt" args- where args = [to k1sig, to k2ndx, to k3fn] ++ map to i0init----- | * opcode : tabmorph--- --- --- * syntax : --- --- > kout tabmorph kindex, kweightpoint, ktabnum1, ktabnum2, --- > ifn1, ifn2 [, ifn3, ifn4,... ifnN]--- --- --- * description : --- --- tabmorph allows morphing between a set of tables of the same--- size, by means of a weighted average between two currently--- selected tables.--- --- --- * url : <http://www.csounds.com/manual/html/tabmorph.html>- -tabmorph ::- (K k0, K k1, K k2, K k3) =>- k0 -> k1 -> k2 -> k3 -> [Irate] -> Krate-tabmorph k0index k1weightpoint k2tabnum1 k3tabnum2 i4fn- = opcode "tabmorph" args- where args- = [to k0index, to k1weightpoint, to k2tabnum1, to k3tabnum2] ++- map to i4fn----- | * opcode : tabmorpha--- --- --- * syntax : --- --- > aout tabmorpha aindex, aweightpoint, atabnum1, atabnum2, --- > ifn1, ifn2 [, ifn3, ifn4,... ifnN]--- --- --- * description : --- --- tabmorpha allows morphing between a set of tables of the same--- size, by means of a weighted average between two currently--- selected tables.--- --- --- * url : <http://www.csounds.com/manual/html/tabmorpha.html>- -tabmorpha :: Arate -> Arate -> Arate -> Arate -> [Irate] -> Arate-tabmorpha a0index a1weightpoint a2tabnum1 a3tabnum2 i4fn- = opcode "tabmorpha" args- where args- = [to a0index, to a1weightpoint, to a2tabnum1, to a3tabnum2] ++- map to i4fn----- | * opcode : tabmorphak--- --- --- * syntax : --- --- > aout tabmorphak aindex, kweightpoint, ktabnum1, ktabnum2, --- > ifn1, ifn2 [, ifn3, ifn4,... ifnN]--- --- --- * description : --- --- tabmorphak allows morphing between a set of tables of the same--- size, by means of a weighted average between two currently--- selected tables.--- --- --- * url : <http://www.csounds.com/manual/html/tabmorphak.html>- -tabmorphak ::- (K k0, K k1, K k2) => Arate -> k0 -> k1 -> k2 -> [Irate] -> Arate-tabmorphak a0index k1weightpoint k2tabnum1 k3tabnum2 i4fn- = opcode "tabmorphak" args- where args- = [to a0index, to k1weightpoint, to k2tabnum1, to k3tabnum2] ++- map to i4fn----- | * opcode : tabmorphi--- --- --- * syntax : --- --- > kout tabmorphi kindex, kweightpoint, ktabnum1, ktabnum2, --- > ifn1, ifn2 [, ifn3, ifn4,... ifnN]--- --- --- * description : --- --- tabmorphi allows morphing between a set of tables of the same--- size, by means of a weighted average between two currently--- selected tables.--- --- --- * url : <http://www.csounds.com/manual/html/tabmorphi.html>- -tabmorphi ::- (K k0, K k1, K k2, K k3) =>- k0 -> k1 -> k2 -> k3 -> [Irate] -> Krate-tabmorphi k0index k1weightpoint k2tabnum1 k3tabnum2 i4fn- = opcode "tabmorphi" args- where args- = [to k0index, to k1weightpoint, to k2tabnum1, to k3tabnum2] ++- map to i4fn----- | * opcode : tabrec--- --- --- * syntax : --- --- > tabrec ktrig_start, ktrig_stop, knumtics, kfn, kin1 [,kin2,...,kinN]--- --- --- * description : --- --- Records control-rate signals on trigger-temporization basis.--- --- --- * url : <http://www.csounds.com/manual/html/tabrec.html>- -tabrec ::- (K k0, K k1, K k2, K k3, K k4) =>- k0 -> k1 -> k2 -> k3 -> [k4] -> SignalOut-tabrec k0trig_start k1trig_stop k2numtics k3fn k4inN- = outOpcode "tabrec" args- where args- = [to k0trig_start, to k1trig_stop, to k2numtics, to k3fn] ++- map to k4inN----- | * opcode : tabplay--- --- --- * syntax : --- --- > tabplay ktrig, knumtics, kfn, kout1 [,kout2,..., koutN]--- --- --- * description : --- --- Plays-back control-rate signals on trigger-temporization basis.--- --- --- * url : <http://www.csounds.com/manual/html/tabplay.html>- -tabplay ::- (K k0, K k1, K k2, K k3) => k0 -> k1 -> k2 -> [k3] -> SignalOut-tabplay k0trig k1numtics k2fn k3outN = outOpcode "tabplay" args- where args = [to k0trig, to k1numtics, to k2fn] ++ map to k3outN
− src/CsoundExpr/Opcodes/Table/Select.hs
@@ -1,122 +0,0 @@--- | Table Reading with Dynamic Selection-module CsoundExpr.Opcodes.Table.Select- (tableiktA,- tableiktK,- tablektA,- tablektK,- tablexkt)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : tableikt--- --- --- * syntax : --- --- > ares tableikt xndx, kfn [, ixmode] [, ixoff] [, iwrap]--- > kres tableikt kndx, kfn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- k-rate control over table numbers.--- --- --- * url : <http://www.csounds.com/manual/html/tableikt.html>- -tableiktA :: (X x0, K k0) => [Irate] -> x0 -> k0 -> Arate-tableiktA i0init x1ndx k2fn = opcode "tableikt" args- where args = [to x1ndx, to k2fn] ++ map to i0init----- | * opcode : tableikt--- --- --- * syntax : --- --- > ares tableikt xndx, kfn [, ixmode] [, ixoff] [, iwrap]--- > kres tableikt kndx, kfn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- k-rate control over table numbers.--- --- --- * url : <http://www.csounds.com/manual/html/tableikt.html>- -tableiktK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-tableiktK i0init k1ndx k2fn = opcode "tableikt" args- where args = [to k1ndx, to k2fn] ++ map to i0init----- | * opcode : tablekt--- --- --- * syntax : --- --- > ares tablekt xndx, kfn [, ixmode] [, ixoff] [, iwrap]--- > kres tablekt kndx, kfn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- k-rate control over table numbers.--- --- --- * url : <http://www.csounds.com/manual/html/tablekt.html>- -tablektA :: (X x0, K k0) => [Irate] -> x0 -> k0 -> Arate-tablektA i0init x1ndx k2fn = opcode "tablekt" args- where args = [to x1ndx, to k2fn] ++ map to i0init----- | * opcode : tablekt--- --- --- * syntax : --- --- > ares tablekt xndx, kfn [, ixmode] [, ixoff] [, iwrap]--- > kres tablekt kndx, kfn [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- k-rate control over table numbers.--- --- --- * url : <http://www.csounds.com/manual/html/tablekt.html>- -tablektK :: (K k0, K k1) => [Irate] -> k0 -> k1 -> Krate-tablektK i0init k1ndx k2fn = opcode "tablekt" args- where args = [to k1ndx, to k2fn] ++ map to i0init----- | * opcode : tablexkt--- --- --- * syntax : --- --- > ares tablexkt xndx, kfn, kwarp, iwsize [, ixmode] [, ixoff] [, iwrap]--- --- --- * description : --- --- Reads function tables with linear, cubic, or sinc interpolation.--- --- --- * url : <http://www.csounds.com/manual/html/tablexkt.html>- -tablexkt ::- (X x0, K k0, K k1) => [Irate] -> x0 -> k0 -> k1 -> Irate -> Arate-tablexkt i0init x1ndx k2fn k3warp i4wsize = opcode "tablexkt" args- where args- = [to x1ndx, to k2fn, to k3warp, to i4wsize] ++ map to i0init
− src/CsoundExpr/Opcodes/Vectorial.hs
@@ -1,20 +0,0 @@--- | Vectorial Opcodes-module CsoundExpr.Opcodes.Vectorial- (module CsoundExpr.Opcodes.Vectorial.Vectorialtables,- module CsoundExpr.Opcodes.Vectorial.Vectorialscalar,- module CsoundExpr.Opcodes.Vectorial.Vectorialvectorial,- module CsoundExpr.Opcodes.Vectorial.EnvelopeGenerators,- module CsoundExpr.Opcodes.Vectorial.Vectorialimiting,- module CsoundExpr.Opcodes.Vectorial.Vectorialdelay,- module CsoundExpr.Opcodes.Vectorial.Vectorialrandom)-where----import CsoundExpr.Opcodes.Vectorial.Vectorialtables-import CsoundExpr.Opcodes.Vectorial.Vectorialscalar-import CsoundExpr.Opcodes.Vectorial.Vectorialvectorial-import CsoundExpr.Opcodes.Vectorial.EnvelopeGenerators-import CsoundExpr.Opcodes.Vectorial.Vectorialimiting-import CsoundExpr.Opcodes.Vectorial.Vectorialdelay-import CsoundExpr.Opcodes.Vectorial.Vectorialrandom
− src/CsoundExpr/Opcodes/Vectorial/EnvelopeGenerators.hs
@@ -1,82 +0,0 @@--- | Vectorial Envelope Generators-module CsoundExpr.Opcodes.Vectorial.EnvelopeGenerators- (vlinseg,- vexpseg,- vcella)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vlinseg--- --- --- * syntax : --- --- > vlinseg ifnout, ielements, ifn1, idur1, ifn2 [, idur2, ifn3 [...]]--- --- --- * description : --- --- Generate linear vectorial segments--- --- --- * url : <http://www.csounds.com/manual/html/vlinseg.html>- -vlinseg :: Irate -> Irate -> [Irate] -> SignalOut-vlinseg i0fnout i1elements i2vals = outOpcode "vlinseg" args- where args = [to i0fnout, to i1elements] ++ map to i2vals----- | * opcode : vexpseg--- --- --- * syntax : --- --- > vexpseg ifnout, ielements, ifn1, idur1, ifn2 [, idur2, ifn3 [...]]--- --- --- * description : --- --- Generate exponential vectorial segments--- --- --- * url : <http://www.csounds.com/manual/html/vexpseg.html>- -vexpseg :: Irate -> Irate -> [Irate] -> SignalOut-vexpseg i0fnout i1elements i2vals = outOpcode "vexpseg" args- where args = [to i0fnout, to i1elements] ++ map to i2vals----- | * opcode : vcella--- --- --- * syntax : --- --- > vcella ktrig, kreinit, ioutFunc, initStateFunc, --- > iRuleFunc, ielements, irulelen [, iradius]--- --- --- * description : --- --- Unidimensional Cellular Automata applied to Csound vectors--- --- --- * url : <http://www.csounds.com/manual/html/vcella.html>- -vcella ::- (K k0, K k1) =>- [Irate] ->- k0 -> k1 -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-vcella i0init k1trig k2reinit i3outFunc i4nitStateFunc i5RuleFunc- i6elements i7rulelen = outOpcode "vcella" args- where args- = [to k1trig, to k2reinit, to i3outFunc, to i4nitStateFunc,- to i5RuleFunc, to i6elements, to i7rulelen]- ++ map to i0init
− src/CsoundExpr/Opcodes/Vectorial/Vectorialdelay.hs
@@ -1,78 +0,0 @@--- | Vectorial Control-rate Delay Paths-module CsoundExpr.Opcodes.Vectorial.Vectorialdelay- (vdelayk,- vport,- vecdelay)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vdelayk--- --- --- * syntax : --- --- > kout vdelayk iksig, kdel, imaxdel [, iskip, imode]--- --- --- * description : --- --- Variable delay applied to a k-rate signal--- --- --- * url : <http://www.csounds.com/manual/html/vdelayk.html>- -vdelayk :: (K k0) => [Irate] -> Irate -> k0 -> Irate -> Krate-vdelayk i0init i1ksig k2del i3maxdel = opcode "vdelayk" args- where args = [to i1ksig, to k2del, to i3maxdel] ++ map to i0init----- | * opcode : vport--- --- --- * syntax : --- --- > vport ifn, khtime, ielements [, ifnInit]--- --- --- * description : --- --- Generate a sort of 'vectorial' portamento--- --- --- * url : <http://www.csounds.com/manual/html/vport.html>- -vport :: (K k0) => [Irate] -> Irate -> k0 -> Irate -> SignalOut-vport i0init i1fn k2htime i3elements = outOpcode "vport" args- where args = [to i1fn, to k2htime, to i3elements] ++ map to i0init----- | * opcode : vecdelay--- --- --- * syntax : --- --- > vecdelay ifn, ifnIn, ifnDel, ielements, imaxdel [, iskip]--- --- --- * description : --- --- Generate a sort of 'vectorial' delay--- --- --- * url : <http://www.csounds.com/manual/html/vecdelay.html>- -vecdelay ::- [Irate] -> Irate -> Irate -> Irate -> Irate -> Irate -> SignalOut-vecdelay i0init i1fn i2fnIn i3fnDel i4elements i5maxdel- = outOpcode "vecdelay" args- where args- = [to i1fn, to i2fnIn, to i3fnDel, to i4elements, to i5maxdel] ++- map to i0init
− src/CsoundExpr/Opcodes/Vectorial/Vectorialimiting.hs
@@ -1,74 +0,0 @@--- | Limiting and wrapping of vectorial control signals-module CsoundExpr.Opcodes.Vectorial.Vectorialimiting- (vlimit,- vwrap,- vmirror)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vlimit--- --- --- * syntax : --- --- > vlimit ifn, kmin, kmax, ielements--- --- --- * description : --- --- Limits elements of vectorial control signals.--- --- --- * url : <http://www.csounds.com/manual/html/vlimit.html>- -vlimit :: (K k0, K k1) => Irate -> k0 -> k1 -> Irate -> SignalOut-vlimit i0fn k1min k2max i3elements = outOpcode "vlimit" args- where args = [to i0fn, to k1min, to k2max, to i3elements]----- | * opcode : vwrap--- --- --- * syntax : --- --- > vwrap ifn, kmin, kmax, ielements--- --- --- * description : --- --- Wraps elements of vectorial control signals.--- --- --- * url : <http://www.csounds.com/manual/html/vwrap.html>- -vwrap :: (K k0, K k1) => Irate -> k0 -> k1 -> Irate -> SignalOut-vwrap i0fn k1min k2max i3elements = outOpcode "vwrap" args- where args = [to i0fn, to k1min, to k2max, to i3elements]----- | * opcode : vmirror--- --- --- * syntax : --- --- > vmirror ifn, kmin, kmax, ielements--- --- --- * description : --- --- 'Reflects' elements of vectorial control signals on thresholds.--- --- --- * url : <http://www.csounds.com/manual/html/vmirror.html>- -vmirror :: (K k0, K k1) => Irate -> k0 -> k1 -> Irate -> SignalOut-vmirror i0fn k1min k2max i3elements = outOpcode "vmirror" args- where args = [to i0fn, to k1min, to k2max, to i3elements]
− src/CsoundExpr/Opcodes/Vectorial/Vectorialrandom.hs
@@ -1,61 +0,0 @@--- | Vectorial Random Signal Generators-module CsoundExpr.Opcodes.Vectorial.Vectorialrandom- (vrandh,- vrandi)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vrandh--- --- --- * syntax : --- --- > vrandh ifn, krange, kcps, ielements [, idstoffset] [, iseed] [, isize] [, ioffset]--- --- --- * description : --- --- Generates a vector of random numbers stored into a table,--- holding the values for a period of time. Generates a sort of--- 'vectorial band-limited noise'.--- --- --- * url : <http://www.csounds.com/manual/html/vrandh.html>- -vrandh ::- (K k0, K k1) => [Irate] -> Irate -> k0 -> k1 -> Irate -> SignalOut-vrandh i0init i1fn k2range k3cps i4elements- = outOpcode "vrandh" args- where args- = [to i1fn, to k2range, to k3cps, to i4elements] ++ map to i0init----- | * opcode : vrandi--- --- --- * syntax : --- --- > vrandi ifn, krange, kcps, ielements [, idstoffset] [, iseed] [, isize] [, ioffset]--- --- --- * description : --- --- Generate a sort of 'vectorial band-limited noise'--- --- --- * url : <http://www.csounds.com/manual/html/vrandi.html>- -vrandi ::- (K k0, K k1) => [Irate] -> Irate -> k0 -> k1 -> Irate -> SignalOut-vrandi i0init i1fn k2range k3cps i4elements- = outOpcode "vrandi" args- where args- = [to i1fn, to k2range, to k3cps, to i4elements] ++ map to i0init
− src/CsoundExpr/Opcodes/Vectorial/Vectorialscalar.hs
@@ -1,183 +0,0 @@--- | Operations Between a Vectorial and a Scalar Signal-module CsoundExpr.Opcodes.Vectorial.Vectorialscalar- (vadd,- vmult,- vpow,- vexp,- vadd_i,- vmult_i,- vpow_i,- vexp_i)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vadd--- --- --- * syntax : --- --- > vadd ifn, kval, kelements [, kdstoffset] [, kverbose]--- --- --- * description : --- --- Adds a scalar value to a vector in a table.--- --- --- * url : <http://www.csounds.com/manual/html/vadd.html>- -vadd ::- (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut-vadd k0init i1fn k2val k3elements = outOpcode "vadd" args- where args = [to i1fn, to k2val, to k3elements] ++ map to k0init----- | * opcode : vmult--- --- --- * syntax : --- --- > vmult ifn, kval, kelements [, kdstoffset] [, kverbose]--- --- --- * description : --- --- Multiplies a vector in a table by a scalar value.--- --- --- * url : <http://www.csounds.com/manual/html/vmult.html>- -vmult ::- (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut-vmult k0init i1fn k2val k3elements = outOpcode "vmult" args- where args = [to i1fn, to k2val, to k3elements] ++ map to k0init----- | * opcode : vpow--- --- --- * syntax : --- --- > vpow ifn, kval, kelements [, kdstoffset] [, kverbose]--- --- --- * description : --- --- Raises each element of a vector to a scalar power--- --- --- * url : <http://www.csounds.com/manual/html/vpow.html>- -vpow ::- (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut-vpow k0init i1fn k2val k3elements = outOpcode "vpow" args- where args = [to i1fn, to k2val, to k3elements] ++ map to k0init----- | * opcode : vexp--- --- --- * syntax : --- --- > vexp ifn, kval, kelements [, kdstoffset] [, kverbose]--- --- --- * description : --- --- Performs power-of operations between a vector and a scalar--- --- --- * url : <http://www.csounds.com/manual/html/vexp.html>- -vexp ::- (K k0, K k1, K k2) => [k0] -> Irate -> k1 -> k2 -> SignalOut-vexp k0init i1fn k2val k3elements = outOpcode "vexp" args- where args = [to i1fn, to k2val, to k3elements] ++ map to k0init----- | * opcode : vadd_i--- --- --- * syntax : --- --- > vadd_i ifn, ival, ielements [, idstoffset]--- --- --- * description : --- --- Adds a scalar value to a vector in a table.--- --- --- * url : <http://www.csounds.com/manual/html/vadd_i.html>- -vadd_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vadd_i i0init i1fn i2val i3elements = outOpcode "vadd_i" args- where args = [to i1fn, to i2val, to i3elements] ++ map to i0init----- | * opcode : vmult_i--- --- --- * syntax : --- --- > vmult_i ifn, ival, ielements [, idstoffset]--- --- --- * description : --- --- Multiplies a vector in a table by a scalar value.--- --- --- * url : <http://www.csounds.com/manual/html/vmult_i.html>- -vmult_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vmult_i i0init i1fn i2val i3elements = outOpcode "vmult_i" args- where args = [to i1fn, to i2val, to i3elements] ++ map to i0init----- | * opcode : vpow_i--- --- --- * syntax : --- --- > vpow_i ifn, ival, ielements [, idstoffset]--- --- --- * description : --- --- Raises each element of a vector to a scalar power--- --- --- * url : <http://www.csounds.com/manual/html/vpow_i.html>- -vpow_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vpow_i i0init i1fn i2val i3elements = outOpcode "vpow_i" args- where args = [to i1fn, to i2val, to i3elements] ++ map to i0init----- | * opcode : vexp_i--- --- --- * syntax : --- --- > vexp_i ifn, ival, ielements[, idstoffset]--- --- --- * description : --- --- Performs power-of operations between a vector and a scalar--- --- --- * url : <http://www.csounds.com/manual/html/vexp_i.html>- -vexp_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vexp_i i0init i1fn i2val i3elements = outOpcode "vexp_i" args- where args = [to i1fn, to i2val, to i3elements] ++ map to i0init
− src/CsoundExpr/Opcodes/Vectorial/Vectorialtables.hs
@@ -1,294 +0,0 @@--- | Tables of vectors operators-module CsoundExpr.Opcodes.Vectorial.Vectorialtables- (vtablei,- vtable1k,- vtablek,- vtablea,- vtablewi,- vtablewk,- vtablewa,- vtabi,- vtabk,- vtaba,- vtabwi,- vtabwk,- vtabwa)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vtablei--- --- --- * syntax : --- --- > vtablei indx, ifn, interp, ixmode, iout1 [, iout2, iout3,...., ioutN ]--- --- --- * description : --- --- This opcode reads vectors from tables.--- --- --- * url : <http://www.csounds.com/manual/html/vtablei.html>- -vtablei :: Irate -> Irate -> Irate -> Irate -> [Irate] -> SignalOut-vtablei i0ndx i1fn i2interp i3xmode i4outN- = outOpcode "vtablei" args- where args- = [to i0ndx, to i1fn, to i2interp, to i3xmode] ++ map to i4outN----- | * opcode : vtable1k--- --- --- * syntax : --- --- > vtable1k kfn,kout1 [, kout2, kout3,...., koutN ]--- --- --- * description : --- --- This opcode reads vectors from tables at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtable1k.html>- -vtable1k :: (K k0, K k1) => k0 -> [k1] -> SignalOut-vtable1k k0fn k1outN = outOpcode "vtable1k" args- where args = [to k0fn] ++ map to k1outN----- | * opcode : vtablek--- --- --- * syntax : --- --- > vtablek kndx, kfn, kinterp, ixmode, kout1 [, kout2, kout3,...., koutN ]--- --- --- * description : --- --- This opcode reads vectors from tables at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtablek.html>- -vtablek ::- (K k0, K k1, K k2) =>- k0 -> k1 -> k2 -> Irate -> [Irate] -> SignalOut-vtablek k0ndx k1fn k2interp i3xmode i4outN- = outOpcode "vtablek" args- where args- = [to k0ndx, to k1fn, to k2interp, to i3xmode] ++ map to i4outN----- | * opcode : vtablea--- --- --- * syntax : --- --- > vtablea andx, kfn, kinterp, ixmode, aout1 [, aout2, aout3,...., aoutN ]--- --- --- * description : --- --- This opcode reads vectors from tables at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtablea.html>- -vtablea ::- (K k0, K k1) => Arate -> k0 -> k1 -> Irate -> [Arate] -> SignalOut-vtablea a0ndx k1fn k2interp i3xmode a4outN- = outOpcode "vtablea" args- where args- = [to a0ndx, to k1fn, to k2interp, to i3xmode] ++ map to a4outN----- | * opcode : vtablewi--- --- --- * syntax : --- --- > vtablewi indx, ifn, ixmode, inarg1 [, inarg2, inarg3,...., inargN ]--- --- --- * description : --- --- This opcode writes vectors to tables at init time.--- --- --- * url : <http://www.csounds.com/manual/html/vtablewi.html>- -vtablewi :: Irate -> Irate -> Irate -> [Irate] -> SignalOut-vtablewi i0ndx i1fn i2xmode i3arg = outOpcode "vtablewi" args- where args = [to i0ndx, to i1fn, to i2xmode] ++ map to i3arg----- | * opcode : vtablewk--- --- --- * syntax : --- --- > vtablewk kndx, kfn, ixmode, kinarg1 [, kinarg2, kinarg3,...., kinargN ]--- --- --- * description : --- --- This opcode writes vectors to tables at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtablewk.html>- -vtablewk ::- (K k0, K k1, K k2) => k0 -> k1 -> Irate -> [k2] -> SignalOut-vtablewk k0ndx k1fn i2xmode k3arg = outOpcode "vtablewk" args- where args = [to k0ndx, to k1fn, to i2xmode] ++ map to k3arg----- | * opcode : vtablewa--- --- --- * syntax : --- --- > vtablewa andx, kfn, ixmode, ainarg1 [, ainarg2, ainarg3,...., ainargN ]--- --- --- * description : --- --- This opcode writes vectors to tables at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtablewa.html>- -vtablewa :: Arate -> Arate -> Irate -> [Arate] -> SignalOut-vtablewa a0ndx a1fn i2xmode a3arg = outOpcode "vtablewa" args- where args = [to a0ndx, to a1fn, to i2xmode] ++ map to a3arg----- | * opcode : vtabi--- --- --- * syntax : --- --- > vtabi indx, ifn, iout1 [, iout2, iout3,...., ioutN ]--- --- --- * description : --- --- This opcode reads vectors from tables.--- --- --- * url : <http://www.csounds.com/manual/html/vtabi.html>- -vtabi :: Irate -> Irate -> [Irate] -> SignalOut-vtabi i0ndx i1fn i2outN = outOpcode "vtabi" args- where args = [to i0ndx, to i1fn] ++ map to i2outN----- | * opcode : vtabk--- --- --- * syntax : --- --- > vtabk kndx, ifn, kout1 [, kout2, kout3,...., koutN ]--- --- --- * description : --- --- This opcode reads vectors from tables at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtabk.html>- -vtabk :: (K k0, K k1) => k0 -> Irate -> [k1] -> SignalOut-vtabk k0ndx i1fn k2outN = outOpcode "vtabk" args- where args = [to k0ndx, to i1fn] ++ map to k2outN----- | * opcode : vtaba--- --- --- * syntax : --- --- > vtaba andx, ifn, aout1 [, aout2, aout3,...., aoutN ]--- --- --- * description : --- --- This opcode reads vectors from tables at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtaba.html>- -vtaba :: Arate -> Irate -> [Arate] -> SignalOut-vtaba a0ndx i1fn a2outN = outOpcode "vtaba" args- where args = [to a0ndx, to i1fn] ++ map to a2outN----- | * opcode : vtabwi--- --- --- * syntax : --- --- > vtabwi indx, ifn, inarg1 [, inarg2, inarg3,...., inargN ]--- --- --- * description : --- --- This opcode writes vectors to tables at init time.--- --- --- * url : <http://www.csounds.com/manual/html/vtabwi.html>- -vtabwi :: Irate -> Irate -> [Irate] -> SignalOut-vtabwi i0ndx i1fn i2outN = outOpcode "vtabwi" args- where args = [to i0ndx, to i1fn] ++ map to i2outN----- | * opcode : vtabwk--- --- --- * syntax : --- --- > vtabwk kndx, ifn, kinarg1 [, kinarg2, kinarg3,...., kinargN ]--- --- --- * description : --- --- This opcode writes vectors to tables at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtabwk.html>- -vtabwk :: (K k0, K k1) => k0 -> Irate -> [k1] -> SignalOut-vtabwk k0ndx i1fn k2outN = outOpcode "vtabwk" args- where args = [to k0ndx, to i1fn] ++ map to k2outN----- | * opcode : vtabwa--- --- --- * syntax : --- --- > vtabwa andx, ifn, ainarg1 [, ainarg2, ainarg3,...., ainargN ]--- --- --- * description : --- --- This opcode writes vectors to tables at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/vtabwa.html>- -vtabwa :: Arate -> Irate -> [Arate] -> SignalOut-vtabwa a0ndx i1fn a2outN = outOpcode "vtabwa" args- where args = [to a0ndx, to i1fn] ++ map to a2outN
− src/CsoundExpr/Opcodes/Vectorial/Vectorialvectorial.hs
@@ -1,335 +0,0 @@--- | Operations Between two Vectorial Signals-module CsoundExpr.Opcodes.Vectorial.Vectorialvectorial- (vaddv,- vsubv,- vmultv,- vdivv,- vpowv,- vexpv,- vcopy,- vmap,- vaddv_i,- vsubv_i,- vmultv_i,- vdivv_i,- vpowv_i,- vexpv_i,- vcopy_i)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : vaddv--- --- --- * syntax : --- --- > vaddv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]--- --- --- * description : --- --- Performs addition between two vectorial control signals--- --- --- * url : <http://www.csounds.com/manual/html/vaddv.html>- -vaddv :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vaddv k0init i1fn1 i2fn2 k3elements = outOpcode "vaddv" args- where args = [to i1fn1, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vsubv--- --- --- * syntax : --- --- > vsubv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]--- --- --- * description : --- --- Performs subtraction between two vectorial control signals--- --- --- * url : <http://www.csounds.com/manual/html/vsubv.html>- -vsubv :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vsubv k0init i1fn1 i2fn2 k3elements = outOpcode "vsubv" args- where args = [to i1fn1, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vmultv--- --- --- * syntax : --- --- > vmultv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]--- --- --- * description : --- --- Performs mutiplication between two vectorial control signals--- --- --- * url : <http://www.csounds.com/manual/html/vmultv.html>- -vmultv :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vmultv k0init i1fn1 i2fn2 k3elements = outOpcode "vmultv" args- where args = [to i1fn1, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vdivv--- --- --- * syntax : --- --- > vdivv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]--- --- --- * description : --- --- Performs division between two vectorial control signals--- --- --- * url : <http://www.csounds.com/manual/html/vdivv.html>- -vdivv :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vdivv k0init i1fn1 i2fn2 k3elements = outOpcode "vdivv" args- where args = [to i1fn1, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vpowv--- --- --- * syntax : --- --- > vpowv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]--- --- --- * description : --- --- Performs power-of operations between two vectorial control--- signals--- --- --- * url : <http://www.csounds.com/manual/html/vpowv.html>- -vpowv :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vpowv k0init i1fn1 i2fn2 k3elements = outOpcode "vpowv" args- where args = [to i1fn1, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vexpv--- --- --- * syntax : --- --- > vexpv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose]--- --- --- * description : --- --- Performs exponential operations between two vectorial control--- signals--- --- --- * url : <http://www.csounds.com/manual/html/vexpv.html>- -vexpv :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vexpv k0init i1fn1 i2fn2 k3elements = outOpcode "vexpv" args- where args = [to i1fn1, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vcopy--- --- --- * syntax : --- --- > vcopy ifn, ifn2, kelements [, kdstoffset] [, ksrcoffset] [, kverbose]--- --- --- * description : --- --- Copies between two vectorial control signals--- --- --- * url : <http://www.csounds.com/manual/html/vcopy.html>- -vcopy :: (K k0, K k1) => [k0] -> Irate -> Irate -> k1 -> SignalOut-vcopy k0init i1fn i2fn2 k3elements = outOpcode "vcopy" args- where args = [to i1fn, to i2fn2, to k3elements] ++ map to k0init----- | * opcode : vmap--- --- --- * syntax : --- --- > vmap ifn1, ifn2, ielements [,idstoffset, isrcoffset]--- --- --- * description : --- --- Maps elements from a vector onto another according to the--- indeces of a this vector--- --- --- * url : <http://www.csounds.com/manual/html/vmap.html>- -vmap :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vmap i0init i1fn1 i2fn2 i3elements = outOpcode "vmap" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vaddv_i--- --- --- * syntax : --- --- > vaddv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]--- --- --- * description : --- --- Performs addition between two vectorial control signals at init--- time.--- --- --- * url : <http://www.csounds.com/manual/html/vaddv_i.html>- -vaddv_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vaddv_i i0init i1fn1 i2fn2 i3elements = outOpcode "vaddv_i" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vsubv_i--- --- --- * syntax : --- --- > vsubv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]--- --- --- * description : --- --- Performs subtraction between two vectorial control signals at--- init time.--- --- --- * url : <http://www.csounds.com/manual/html/vsubv_i.html>- -vsubv_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vsubv_i i0init i1fn1 i2fn2 i3elements = outOpcode "vsubv_i" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vmultv_i--- --- --- * syntax : --- --- > vmultv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]--- --- --- * description : --- --- Performs mutiplication between two vectorial control signals at--- init time.--- --- --- * url : <http://www.csounds.com/manual/html/vmultv_i.html>- -vmultv_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vmultv_i i0init i1fn1 i2fn2 i3elements = outOpcode "vmultv_i" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vdivv_i--- --- --- * syntax : --- --- > vdivv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]--- --- --- * description : --- --- Performs division between two vectorial control signals at init--- time.--- --- --- * url : <http://www.csounds.com/manual/html/vdivv_i.html>- -vdivv_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vdivv_i i0init i1fn1 i2fn2 i3elements = outOpcode "vdivv_i" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vpowv_i--- --- --- * syntax : --- --- > vpowv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]--- --- --- * description : --- --- Performs power-of operations between two vectorial control--- signals at init time.--- --- --- * url : <http://www.csounds.com/manual/html/vpowv_i.html>- -vpowv_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vpowv_i i0init i1fn1 i2fn2 i3elements = outOpcode "vpowv_i" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vexpv_i--- --- --- * syntax : --- --- > vexpv_i ifn1, ifn2, ielements [, idstoffset] [, isrcoffset]--- --- --- * description : --- --- Performs exponential operations between two vectorial control--- signals at init time.--- --- --- * url : <http://www.csounds.com/manual/html/vexpv_i.html>- -vexpv_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vexpv_i i0init i1fn1 i2fn2 i3elements = outOpcode "vexpv_i" args- where args = [to i1fn1, to i2fn2, to i3elements] ++ map to i0init----- | * opcode : vcopy_i--- --- --- * syntax : --- --- > vcopy_i ifn, ifn2, ielements [,idstoffset, isrcoffset]--- --- --- * description : --- --- Copies a vector from one table to another.--- --- --- * url : <http://www.csounds.com/manual/html/vcopy_i.html>- -vcopy_i :: [Irate] -> Irate -> Irate -> Irate -> SignalOut-vcopy_i i0init i1fn i2fn2 i3elements = outOpcode "vcopy_i" args- where args = [to i1fn, to i2fn2, to i3elements] ++ map to i0init
− src/CsoundExpr/Opcodes/Zak.hs
@@ -1,8 +0,0 @@--- | Zak Patch System-module CsoundExpr.Opcodes.Zak- (module CsoundExpr.Opcodes.Zak.Top)-where----import CsoundExpr.Opcodes.Zak.Top
− src/CsoundExpr/Opcodes/Zak/Top.hs
@@ -1,326 +0,0 @@--- | Zak Patch System-module CsoundExpr.Opcodes.Zak.Top- (zacl,- zakinit,- zamod,- zar,- zarg,- zaw,- zawm,- zkcl,- zkmod,- zkr,- zkw,- zkwm,- zir,- ziw,- ziwm)-where----import CsoundExpr.Base.Types-import CsoundExpr.Base.MultiOut-import CsoundExpr.Base.SideEffect-import CsoundExpr.Base.UserDefined------ | * opcode : zacl--- --- --- * syntax : --- --- > zacl kfirst, klast--- --- --- * description : --- --- Clears one or more variables in the za space.--- --- --- * url : <http://www.csounds.com/manual/html/zacl.html>- -zacl :: (K k0, K k1) => k0 -> k1 -> SignalOut-zacl k0first k1last = outOpcode "zacl" args- where args = [to k0first, to k1last]----- | * opcode : zakinit--- --- --- * syntax : --- --- > zakinit isizea, isizek--- --- --- * description : --- --- Establishes zak space. Must be called only once.--- --- --- * url : <http://www.csounds.com/manual/html/zakinit.html>- -zakinit :: Irate -> Irate -> SignalOut-zakinit i0sizea i1sizek = outOpcode "zakinit" args- where args = [to i0sizea, to i1sizek]----- | * opcode : zamod--- --- --- * syntax : --- --- > ares zamod asig, kzamod--- --- --- * description : --- --- Modulates one a-rate signal by a second one.--- --- --- * url : <http://www.csounds.com/manual/html/zamod.html>- -zamod :: (K k0) => Arate -> k0 -> Arate-zamod a0sig k1zamod = opcode "zamod" args- where args = [to a0sig, to k1zamod]----- | * opcode : zar--- --- --- * syntax : --- --- > ares zar kndx--- --- --- * description : --- --- Reads from a location in za space at a-rate.--- --- --- * url : <http://www.csounds.com/manual/html/zar.html>- -zar :: (K k0) => k0 -> Arate-zar k0ndx = opcode "zar" args- where args = [to k0ndx]----- | * opcode : zarg--- --- --- * syntax : --- --- > ares zarg kndx, kgain--- --- --- * description : --- --- Reads from a location in za space at a-rate, adds some gain.--- --- --- * url : <http://www.csounds.com/manual/html/zarg.html>- -zarg :: (K k0, K k1) => k0 -> k1 -> Arate-zarg k0ndx k1gain = opcode "zarg" args- where args = [to k0ndx, to k1gain]----- | * opcode : zaw--- --- --- * syntax : --- --- > zaw asig, kndx--- --- --- * description : --- --- Writes to a za variable at a-rate without mixing.--- --- --- * url : <http://www.csounds.com/manual/html/zaw.html>- -zaw :: (K k0) => Arate -> k0 -> SignalOut-zaw a0sig k1ndx = outOpcode "zaw" args- where args = [to a0sig, to k1ndx]----- | * opcode : zawm--- --- --- * syntax : --- --- > zawm asig, kndx [, imix]--- --- --- * description : --- --- Writes to a za variable at a-rate with mixing.--- --- --- * url : <http://www.csounds.com/manual/html/zawm.html>- -zawm :: (K k0) => [Irate] -> Arate -> k0 -> SignalOut-zawm i0init a1sig k2ndx = outOpcode "zawm" args- where args = [to a1sig, to k2ndx] ++ map to i0init----- | * opcode : zkcl--- --- --- * syntax : --- --- > zkcl kfirst, klast--- --- --- * description : --- --- Clears one or more variables in the zk space.--- --- --- * url : <http://www.csounds.com/manual/html/zkcl.html>- -zkcl :: (K k0, K k1) => k0 -> k1 -> SignalOut-zkcl k0first k1last = outOpcode "zkcl" args- where args = [to k0first, to k1last]----- | * opcode : zkmod--- --- --- * syntax : --- --- > kres zkmod ksig, kzkmod--- --- --- * description : --- --- Facilitates the modulation of one signal by another.--- --- --- * url : <http://www.csounds.com/manual/html/zkmod.html>- -zkmod :: (K k0, K k1) => k0 -> k1 -> Krate-zkmod k0sig k1zkmod = opcode "zkmod" args- where args = [to k0sig, to k1zkmod]----- | * opcode : zkr--- --- --- * syntax : --- --- > kres zkr kndx--- --- --- * description : --- --- Reads from a location in zk space at k-rate.--- --- --- * url : <http://www.csounds.com/manual/html/zkr.html>- -zkr :: (K k0) => k0 -> Krate-zkr k0ndx = opcode "zkr" args- where args = [to k0ndx]----- | * opcode : zkw--- --- --- * syntax : --- --- > zkw ksig, kndx--- --- --- * description : --- --- Writes to a zk variable at k-rate without mixing.--- --- --- * url : <http://www.csounds.com/manual/html/zkw.html>- -zkw :: (K k0, K k1) => k0 -> k1 -> SignalOut-zkw k0sig k1ndx = outOpcode "zkw" args- where args = [to k0sig, to k1ndx]----- | * opcode : zkwm--- --- --- * syntax : --- --- > zkwm ksig, kndx [, imix]--- --- --- * description : --- --- Writes to a zk variable at k-rate with mixing.--- --- --- * url : <http://www.csounds.com/manual/html/zkwm.html>- -zkwm :: (K k0, K k1) => [Irate] -> k0 -> k1 -> SignalOut-zkwm i0init k1sig k2ndx = outOpcode "zkwm" args- where args = [to k1sig, to k2ndx] ++ map to i0init----- | * opcode : zir--- --- --- * syntax : --- --- > ir zir indx--- --- --- * description : --- --- Reads from a location in zk space at i-rate.--- --- --- * url : <http://www.csounds.com/manual/html/zir.html>- -zir :: Irate -> Irate-zir i0ndx = opcode "zir" args- where args = [to i0ndx]----- | * opcode : ziw--- --- --- * syntax : --- --- > ziw isig, indx--- --- --- * description : --- --- Writes to a zk variable at i-rate without mixing.--- --- --- * url : <http://www.csounds.com/manual/html/ziw.html>- -ziw :: Irate -> Irate -> SignalOut-ziw i0sig i1ndx = outOpcode "ziw" args- where args = [to i0sig, to i1ndx]----- | * opcode : ziwm--- --- --- * syntax : --- --- > ziwm isig, indx [, imix]--- --- --- * description : --- --- Writes to a zk variable to an i-rate variable with mixing.--- --- --- * url : <http://www.csounds.com/manual/html/ziwm.html>- -ziwm :: [Irate] -> Irate -> Irate -> SignalOut-ziwm i0init i1sig i2ndx = outOpcode "ziwm" args- where args = [to i1sig, to i2ndx] ++ map to i0init
− src/CsoundExpr/Translator/AssignmentElimination.hs
@@ -1,159 +0,0 @@-module CsoundExpr.Translator.AssignmentElimination - (eliminateAssignment,- SubstExpr(..), RateInfo(..), Opcode, - numArgName, strArgName)-where--import Control.Monad.State-import qualified Data.Map as M-import Data.Either--import qualified CsoundExpr.Translator.Cs.CsTree as La-import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs--import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Types--type SubstTable = M.Map Int (RateInfo, Opcode)--type Opcode = (String, [Cs.ArgIn])--data RateInfo = ZeroOut- | SingleOut Cs.Rate- | MultiOut (Purity La.Label) Int [Cs.Rate]- deriving (Show, Eq, Ord)--data SubstExpr = SubstExpr - { lineNum :: Int- , argOut :: Maybe Cs.ArgOut- , rateInfo :: RateInfo- , body :: Opcode- } deriving (Show)---ppSubstExpr x = "(" ++ (show $ lineNum x) ++ "," ++ (show $ argOut x) ++ "," ++ (show $ body x)--rates = exprType . exprTag . layerOp-op = exprOp . exprTag . layerOp----eliminateAssignment :: [ExprLayer Int LaExpr Int] -> [SubstExpr]-eliminateAssignment xs = filter (flip elem ids . lineNum) ys- where (ys, (ids, _)) = runState (mapM stateFun xs) ([], M.empty)- stateFun x = state $ \(ids, m) -> substFun x ids m --substFun :: ExprLayer Int LaExpr Int - -> [Int] -> SubstTable - -> (SubstExpr, ([Int], SubstTable))-substFun x is m- | isArgOut x = (SubstExpr id (aoArgOut x) (aoRateInfo m x) (aoBody m x),- (id : is, m))- | La.isVal $ op x = (SubstExpr id (valArgOut x) (valRateInfo x) (valBody x), - (is, M.insert id (valSubstTableValue x) m))- | La.isParam $ op x = (SubstExpr id (paramArgOut x) (paramRateInfo x) (paramBody x),- (is, M.insert id (paramSubstTableValue x) m))- | La.isArg $ op x = (SubstExpr id (aiArgOut x) (aiRateInfo x) (aiBody x),- (is, M.insert id (aiSubstTableValue x) m))- | La.isOpr $ op x = (SubstExpr id (oprArgOut x) (oprRateInfo x) (oprBody m x), - (is ++ oprIds m x, M.insert id (oprSubstTableValue m x) m))- | La.isOpc $ op x = (SubstExpr id (opcArgOut x) (opcRateInfo x) (opcBody m x),- (is ++ opcIds m x, M.insert id (opcSubstTableValue m x) m))- where id = layerOut x----- val--valArgOut x = Just $ numArgName Cs.I (layerOut x)-valRateInfo x = SingleOut Cs.I-valBody x = ("=", [Cs.ArgInValue $ toValue $ La.value $ op x])--valSubstTableValue x = (valRateInfo x, valBody x)---- param--paramArgOut x = Just $ numArgName Cs.I (layerOut x)-paramRateInfo x = SingleOut Cs.I-paramBody x = ("=", [Cs.ArgInParam $ Cs.Param $ La.paramId $ op x])--paramSubstTableValue x = (paramRateInfo x, paramBody x)---- argOut--aoArgOut x = Just $ strArgName (toCsRate $ La.argRate $ op x) (La.argName $ op x)-aoRateInfo m x = fst $ m M.! aoArgInId x-aoBody m x = snd $ m M.! aoArgInId x --aoArgInId = head . layerIn---- argIn--aiArgOut x = Just $ numArgName (toCsRate $ head $ rates x) (layerOut x)-aiRateInfo x = SingleOut $ toCsRate $ head $ rates x-aiBody x = ("=", [Cs.ArgInName $ strArgName (toCsRate $ La.argRate $ op x) (La.argName $ op x)])--aiSubstTableValue x = (aiRateInfo x, aiBody x)---- opr--oprArgOut x = Just $ numArgName (toCsRate $ head $ rates x) (layerOut x)-oprRateInfo x = SingleOut $ toCsRate $ head $ rates x-oprBody m x = ("=", [Cs.ArgInOpr (La.oprName $ op x) args])- where args = map (substArg m) $ layerIn x--oprSubstTableValue m x = (oprRateInfo x, oprBody m x)--oprIds m x = filter (not . isSubstId m) $ layerIn x---- opc--opcArgOut x = case (rates x) of- [] -> Nothing- (r:[]) -> Just $ numArgName (toCsRate $ r) (layerOut x)- rs -> let i = exprOutPort $ layerOp x- in Just $ numArgName (toCsRate $ rs !! i) (layerOut x)-opcRateInfo x = case (rates x) of- [] -> ZeroOut- (r:[]) -> SingleOut (toCsRate r)- rs -> MultiOut (exprPurity $ layerOp x) - (exprOutPort $ layerOp x) - (map toCsRate rs)-opcBody m x = (La.opcName $ op x, map (substArg m) $ layerIn x)--opcSubstTableValue m x = (opcRateInfo x, opcBody m x)--opcIds m x = case (rates x) of- [] -> outId : inIds- _ -> inIds- where inIds = filter (not . isSubstId m) $ layerIn x- outId = layerOut x---- subst args--substArg :: SubstTable -> Int -> Cs.ArgIn-substArg m id = - case m M.! id of- (SingleOut r, (opc, as)) -> if opc == "="- then head as- else Cs.ArgInName $ numArgName r id- (MultiOut _ i rs, _) -> Cs.ArgInName $ numArgName (rs !! i) id---isSubstId :: SubstTable -> Int -> Bool-isSubstId m id = - case m M.! id of- (SingleOut r, (opc, as)) -> opc == "="- _ -> False------numArgName :: Cs.Rate -> Int -> Cs.ArgName-numArgName rate id = Cs.ArgName rate (show id)---strArgName :: Cs.Rate -> String -> Cs.ArgName-strArgName rate name = case rate of- Cs.SetupRate -> Cs.ArgName rate name- _ -> Cs.ArgName rate ("x" ++ name)- -
− src/CsoundExpr/Translator/Cs/CsBoolean.hs
@@ -1,144 +0,0 @@-{-# LANGUAGE - FlexibleInstances,- TypeFamilies,- TypeSynonymInstances #-}--module CsoundExpr.Translator.Cs.CsBoolean (CsBool) -where--import Data.Boolean-import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.ExprTree.ExprTree--------------------------------------------------- low level operations--mkAnd, mkOr :: CsTree -> CsTree -> CsTree--mkAnd a b = pure (oprInfix "&&") [a, b]-mkOr a b = pure (oprInfix "||") [a, b]--mkComp :: CompOp -> CsTree -> CsTree -> CsTree-mkComp op a b = pure (oprInfix $ show op) [a, b]--mkIf :: CsTree -> CsTree -> CsTree -> CsTree-mkIf cond th el = pure ifOpr [cond, th, el]--oprInfix :: Name -> CsExpr-oprInfix name = opr ["(", name, ")"]--ifOpr :: CsExpr -ifOpr = opr ["(", "?", ":",")"]------------------------------------------------------ Booleans--data CsBool = CsBPrim CsComp- | CsTrue - | CsFalse - | CsNot CsBool - | CsAnd CsBool CsBool - | CsOr CsBool CsBool--data CsComp = CsComp CompOp CsTree CsTree--data CompOp = CsEq | CsNeq | CsLt | CsGt | CsElt | CsEgt--instance Show CompOp where- show x = case x of- CsEq -> "=="- CsNeq -> "!="- CsLt -> "<"- CsGt -> ">"- CsElt -> "<="- CsEgt -> ">="--notCompOp :: CompOp -> CompOp-notCompOp x = case x of- CsEq -> CsNeq- CsNeq -> CsEq- CsLt -> CsEgt- CsGt -> CsElt- CsElt -> CsGt- CsEgt -> CsLt--instance Boolean CsBool where- true = CsTrue- false = CsFalse- notB = CsNot-- a &&* b = case (a, b) of- (CsTrue, _) -> b- (CsFalse, _) -> CsFalse- (_, CsTrue ) -> a- (_, CsFalse) -> CsFalse- _ -> CsAnd a b-- a ||* b = case (a, b) of- (CsTrue, _) -> CsTrue- (CsFalse, _) -> b- (_, CsTrue ) -> CsTrue- (_, CsFalse) -> a- _ -> CsOr a b------------------------------------------------------------ nots elimination--data Ctx = N | P--elimNots :: Ctx -> CsBool -> CsBool-elimNots P x = - case x of- CsNot a -> elimNots N a- CsAnd a b -> CsAnd (elimNots P a) (elimNots P b)- CsOr a b -> CsOr (elimNots P a) (elimNots P b) - _ -> x--elimNots N x =- case x of- CsBPrim (CsComp op a b) -> CsBPrim (CsComp (notCompOp op) a b)- CsTrue -> CsFalse- CsFalse -> CsTrue- CsNot a -> elimNots P a- CsAnd a b -> CsOr (elimNots N a) (elimNots N b)- CsOr a b -> CsAnd (elimNots N a) (elimNots N b)-------------------------------------------------------type instance BooleanOf CsTree = CsBool--instance IfB CsTree where- ifB cond a b = let cond' = elimNots P cond - in case cond' of- CsTrue -> a- CsFalse -> b- CsNot c -> ifB c b a- _ -> mkIf (getCondCsTree cond') a b---getCondCsTree :: CsBool -> CsTree-getCondCsTree x = - case x of- CsBPrim a -> getCompCsTree a- CsAnd a b -> mkAnd (getCondCsTree a) (getCondCsTree b)- CsOr a b -> mkOr (getCondCsTree a) (getCondCsTree b)--getCompCsTree :: CsComp -> CsTree-getCompCsTree (CsComp op a b) = mkComp op a b---bOp :: CompOp -> CsTree -> CsTree -> CsBool-bOp op a b = CsBPrim $ CsComp op a b---instance EqB CsTree where- (==*) = bOp CsEq- (/=*) = bOp CsNeq---instance OrdB CsTree where- (<*) = bOp CsLt- (>*) = bOp CsGt- (<=*) = bOp CsElt- (>=*) = bOp CsEgt
− src/CsoundExpr/Translator/Cs/CsTree.hs
@@ -1,295 +0,0 @@-{-# LANGUAGE - MultiParamTypeClasses, - TypeSynonymInstances,- FlexibleInstances,- FlexibleContexts #-}--module CsoundExpr.Translator.Cs.CsTree (- -- types- CsTree, - Rate(..), CsExpr(..),- Value(..), Ftable(..), GEN(..), Name, Label,- -- constructors- opc, opr, - int, double, string, ftable, param,- argIn, argOut,- -- predicates- isArg, isFtable,- isVal, isOpc, isOpr, isParam, isString,- equalStructure, equalStructureByParams, - -- selectors- toFtable, ftableGENArgs, ftableSize, ftableGENId, getFtable, - getCsExpr, getCsArgs, decompCsTree,- mapFtable, toDouble, opcName, oprName, paramId, value, - argName, argRate- )-where--import Data.Function--import CsoundExpr.Translator.ExprTree.ExprTree -import CsoundExpr.Translator.ExprTree.Tree-import CsoundExpr.Translator.Cs.IM-import CsoundExpr.Translator.Cs.Utils-import CsoundExpr.Translator.ExprTree.Tree---------------------------------------------------- types--type CsTree = ExprTree Label Rate CsExpr---data Rate = A | K | I | S | GA | GK | GI | GS | SetupRate- deriving (Show, Eq, Ord)--data CsExpr = Val Value- | Param Id- | Arg Rate Name- | Opc Name- | Opr [Name] - deriving (Show, Eq, Ord)---data Value = ValueInt Int- | ValueDouble Double- | ValueString String- | ValueFtable Ftable- deriving (Show, Eq, Ord)--data Ftable = EmptyFtable- | Ftable Size GEN- deriving (Show, Eq, Ord)--data GEN = GEN Id [CsTree]- deriving (Show, Eq, Ord)--type Name = String-type Label = Int----------------------------------------------- instances--instance IM CsTree CsTree where- from = id- to = id---------------------- Lists--val :: CsExpr -> CsTree-val x = pure x []--param :: IM CsTree a => Id -> a-param = from . val . Param--int :: IM CsTree a => Int -> a-int = from . val . Val . ValueInt--double :: IM CsTree a => Double -> a-double = from . val . Val . ValueDouble--ftable :: IM CsTree a => Ftable -> a-ftable = from . val . Val . ValueFtable--string :: IM CsTree a => String -> a-string = from . mapType (const [S]) . val . Val . ValueString---argIn :: IM CsTree a => Rate -> Name -> a-argIn rate = from . val . Arg rate--argOut :: IM CsTree a => Rate -> Name -> a -> CsTree-argOut rate name = mapType (const [rate]) . pure' (Arg rate name) . return . to- where pure' :: CsExpr -> [CsTree] -> CsTree- pure' = pure- ----------------------------------opc :: Name -> CsExpr-opc = Opc --opr :: [Name] -> CsExpr-opr = Opr----------------------------------------------- CsTree Selectors--mapFtable :: (Ftable -> Ftable) -> CsTree -> CsTree-mapFtable f = mapTag (mapSnd $ phi f)- where phi f x = case x of- (Val (ValueFtable x)) -> Val (ValueFtable $ f x)- _ -> error "value is not ftable"--getFtable :: CsTree -> Ftable-getFtable = select . getCsExpr- where select x = case x of- (Val (ValueFtable x)) -> x- _ -> error "value is not ftable"--getCsExpr :: CsTree -> CsExpr-getCsExpr = exprOp . exprTreeTag--getCsArgs :: CsTree -> [CsTree]-getCsArgs = treeChilds--decompCsTree :: CsTree -> (CsExpr, [CsTree])-decompCsTree x = (getCsExpr x, getCsArgs x)---------------------------------------------------------------- CsExpr selectors--paramId :: CsExpr -> Id-paramId x = case x of- (Param x) -> x- _ -> error "expr is no Param" ---value :: CsExpr -> Value-value x = case x of- (Val x) -> x- _ -> error "expr is no Val" ---opcName :: CsExpr -> Name-opcName x = case x of- (Opc x) -> x- _ -> error "expr is no Opc" --oprName :: CsExpr -> [Name]-oprName x = case x of- (Opr x) -> x- _ -> error "expr is no Opr" ---argName :: CsExpr -> Name-argName x = case x of- (Arg _ x) -> x- _ -> error "expr is not Arg"- --argRate :: CsExpr -> Rate-argRate x = case x of- (Arg x _) -> x- _ -> error "expr is not Arg"--- -------------------------------------------------------ftableSize :: Ftable -> Size-ftableSize x = case x of- EmptyFtable -> 0- (Ftable x _) -> x--ftableGENId :: Ftable -> Id-ftableGENId x = case x of- EmptyFtable -> 0- (Ftable _ (GEN x _ )) -> x--ftableGENArgs :: Ftable -> [CsTree]-ftableGENArgs x = case x of- EmptyFtable -> []- (Ftable _ (GEN _ ts)) -> ts------------------------------------------------------------------------------------------------------------ predicates---isParam :: CsExpr -> Bool-isParam x = case x of- (Param _) -> True- _ -> False--isVal :: CsExpr -> Bool-isVal x = case x of- (Val _) -> True- _ -> False---isOpc :: CsExpr -> Bool-isOpc x = case x of- (Opc _) -> True- _ -> False--isOpr :: CsExpr -> Bool-isOpr x = case x of- (Opr _) -> True- _ -> False--isArg :: CsExpr -> Bool-isArg x = case x of- (Arg _ _) -> True- _ -> False------------------ value predicates--isFtable :: Value -> Bool-isFtable x = case x of - (ValueFtable _) -> True- _ -> False---toFtable :: Value -> Ftable-toFtable x = case x of- (ValueFtable q) -> q- _ -> error "value is not ftable"---isDouble :: Value -> Bool-isDouble x = case x of- ValueDouble q -> True- _ -> False--toDouble :: Value -> Maybe Double-toDouble x = case x of- ValueDouble q -> Just q- _ -> Nothing --isString :: Value -> Bool-isString x = case x of - (ValueString _) -> True- _ -> False----------------------------- tree predicates---equalStructure :: CsTree -> CsTree -> Bool-equalStructure = equalTreeStructureBy pred- where pred a b- | isVal' a && isVal' b = eqVal a b- | otherwise = a == b- isVal' = isVal . exprOp . exprTag- value' = value . exprOp . exprTag- eqVal = equalValueStructure `on` value' --equalStructureByParams :: CsTree -> CsTree -> Bool-equalStructureByParams = equalTreeStructureBy pred- where pred a b- | isVal' a && isVal' b = eqVal a b - | isParam' a && isVal' b && paramId' a > 3 = True- | isVal' a && isParam' b && paramId' b > 3 = True- | otherwise = a == b- isVal' = isVal . exprOp . exprTag- value' = value . exprOp . exprTag- isParam' = isParam . exprOp . exprTag- paramId' = paramId . exprOp . exprTag- eqVal = equalValueStructure `on` value' ---equalValueStructure :: Value -> Value -> Bool-equalValueStructure a b = - case (a, b) of - ((ValueInt _) , (ValueInt _)) -> True- ((ValueString _), (ValueString _)) -> True- ((ValueDouble _), (ValueDouble _)) -> True- ((ValueFtable _), (ValueFtable _)) -> True- _ -> False
− src/CsoundExpr/Translator/Cs/CsoundFile.hs
@@ -1,320 +0,0 @@-module CsoundExpr.Translator.Cs.CsoundFile (- CsoundFile(..),- Flags, Orchestra(..), Scores(..),- Value(..), Rate(..), ArgName(..), Param(..),- Header(..), Instr(..), OpcodeExpr(..), ArgOut, ArgIn(..), - Ftable(..), FtableInits(..), GEN(..), TotalDuration(..), Note(..), NoteInits(..),- defTempo-)-where--import Data.Char-import Data.List-import qualified Data.Map as Map-import Text.PrettyPrint---------------------------------------------------------------------------------------------------------------------------- types---- | csound code-data CsoundFile = CsoundFile Flags Orchestra Scores---- | csound flags-type Flags = String-data Orchestra = Orchestra Header [Instr]-data Scores = Scores [Ftable] Tempo TotalDuration [Note]---- basic types-type Id = Int--data Value = ValueInt Int- | ValueDouble Double- | ValueString String- deriving (Eq, Ord)--data Rate = SetupRate | A | K | I | S | GA | GK | GI | GS- deriving (Eq, Ord)--type Name = String-data ArgName = ArgName Rate Name- deriving (Eq, Ord)-data Param = Param Id- deriving (Eq, Ord)---- Orchestra subtypes-newtype Header = Instr0 [OpcodeExpr]--data Instr = Instr Id [OpcodeExpr]--data OpcodeExpr = OpcodeExpr [ArgOut] Name [ArgIn]- deriving (Show)-type ArgOut = ArgName-data ArgIn = ArgInName ArgName- | ArgInParam Param- | ArgInValue Value- | ArgInOpr [Name] [ArgIn]- deriving (Eq, Ord)---- Scores subtypes-data Ftable = Ftable Id FtableInits GEN--data FtableInits = FtableInits LoadTime NumOfPoints--type LoadTime = Double-type NumOfPoints = Int--data GEN = GEN Id [Value]--newtype Tempo = Tempo [Double]--newtype TotalDuration = TotalDuration Double--data Note = Note Id NoteInits [Value]--data NoteInits = NoteInits StartTime Duration-type StartTime = Double-type Duration = Double---------------------------------------------------------------------------------------------------------------------------- defaults--defTempo = Tempo []---------------------------------------------------------------------------------------------------------------------------- pretty printing around---nlines n = foldl1 ($$) $ take n $ repeat $ text ""-commentSection s = - (text "; -------------------------------") $$ - (text $ "; " ++ s)----------------------------------------------------------------------------------------------------------------------------- rates--instance Show Rate where- show x = case x of- SetupRate -> ""- A -> "a"- K -> "k"- I -> "i"- S -> "S"- GA -> "ga"- GK -> "gk"- GI -> "gi" - GS -> "gS"---------------------------------------------------------------------------------------------------------------------------- .CSD file--instance Show CsoundFile where- show (CsoundFile flags orc sco) = show $- flagsHeader $$- (text flags) $$- orchestraHeader $$- (text $ show orc) $$ - scoresHeader $$- (text $ show sco) $$ - finHeader- where nlineOffset = 2------------------------------------------------------------- --------------------------------------------------------------- headers for .CSD file---- <CsoundSynthesizer>--- <CsOptions>-flagsHeader = - text "<CsoundSynthesizer>" $$ - text "<CsOptions>"---- </CsOptions>--- <CsInstruments>-orchestraHeader = - text "</CsOptions>" $$- text "<CsInstruments>"---- </CsInstruments>--- <CsScore>-scoresHeader = - text "</CsInstruments>" $$- text "<CsScore>"---- </CsScore>--- </CsoundSynthesizer>-finHeader = - text "</CsScore>" $$- text "</CsoundSynthesizer>"---------------------------------------------------------------------------------------------------------------------------- .ORC file--instance Show Orchestra where - show (Orchestra header instrs) = show $- (commentSection "Header") $$- (text $ show header) $$ - nlines (2*nlineOffset) $$- (commentSection "Instruments") $$- (vcat $ - map ((nlines nlineOffset <>) . text . show) instrs) $$- nlines (2*nlineOffset)- where nlineOffset = 1----------------------------------------------------------------------------------------------------------------------------- .SCO file--instance Show Scores where- show (Scores ftables tempo totalDuration notes) = show $- (commentSection "Ftables") $$- (text $ show totalDuration) $$- (vcat $ map (text . show) ftables) $$- (nlines (2*nlineOffset)) $$- (commentSection "Tempo") $$- (text $ show tempo) $$- (nlines (2*nlineOffset)) $$- (commentSection "Notes") $$- (vcat $ map (text . show) notes) $$- (nlines nlineOffset) $$- (text "e") $$- (nlines (2*nlineOffset)) - where nlineOffset = 1- - ------------------------------------------------------------------------------------------------------------- flags section-------------------------------------------------------------------------------------------------------------- orchestra section (header, intruments)--------------------------------------------------------- header section--instance Show Header where- show (Instr0 []) = ""- show (Instr0 opcodes) = show $ empty $$ align lines $$ empty- where lines = map opcodeExprToLine opcodes --------------------------------------------------------- instrument section--instance Show Instr where- show (Instr id opcodes) = show $ space $$ align lines $$ space- where lines = firstLine ++ body ++ lastLine- firstLine = [("", "instr", show id)]- lastLine = [("", "endin", "")]- body = map opcodeExprToLine opcodes--align :: [(String, String, String)] -> Doc-align lines = foldl1 ($$) $ map (f indent1 indent2) lines- where offset = 3- indent1 = offset + maximum [length x | (x, _, _) <- lines]- indent2 = offset + maximum [length x | (_, x, _) <- lines]- f n1 n2 (x1, x2, x3) = - text x1 $$ - nest (n1) (text x2) $$- nest (n1+n2) (text x3)--opcodeExprToLine :: OpcodeExpr -> (String, String, String)-opcodeExprToLine (OpcodeExpr argsOut opcode argsIn) = - (argsToLine argsOut, opcode, argsToLine argsIn)- where- argsToLine :: Show a => [a] -> String- argsToLine = show . hcat . - punctuate (comma <> space) . map (text . show) --instance Show ArgName where- show (ArgName rate name) = show rate ++ name--instance Show Param where- show (Param id) = "p" ++ show id--instance Show Value where- show (ValueString s) = show s- show (ValueInt x) = show x- show (ValueDouble x) = show x---instance Show ArgIn where- show (ArgInName x) = show x- show (ArgInParam x) = show x- show (ArgInValue x) = show x--- operators- show (ArgInOpr op xs) = printOperator op xs- -printOperator :: [Name] -> [ArgIn] -> String-printOperator op args = show $ hcat $ mergeLists opDoc argsDoc- where argsDoc = map (text . show) args- opDoc = map text op--mergeLists :: [a] -> [a] -> [a]-mergeLists x x' = case (x, x') of- ([], _) -> x'- (_ , []) -> x- (a:as, b:bs) -> a : b : mergeLists as bs--------------------------------------------------------------------------------------------------------------- scores section--------------------------------------------------------- ftable section--instance Show Ftable where- show (Ftable id inits gen) = show $- (text "f") <+> - int id <+>- (text $ show inits) <+>- (text $ show gen)---instance Show FtableInits where- show (FtableInits loadTime numOfPoints) = show $ - (text $ show loadTime) <+>- (text $ show numOfPoints) --instance Show GEN where- show (GEN id vals) = show $ int id <+>- (foldl1 (<+>) $ map (text . show) vals)--------------------------------------------------------- tempo --instance Show Tempo where- show (Tempo []) = ""- show (Tempo vals) = show $ - text "t" <+> - (foldl1 (<+>) $ map double vals)---------------------------------------------------------- total duration--instance Show TotalDuration where- show (TotalDuration t) = show $ text "f 0" <+> double t--------------------------------------------------------- notes--instance Show Note where- show (Note id noteInits vals) = show $ inits <+> aux- where- inits = text "i" <+> int id <+> (text $ show noteInits)- aux = if (length vals == 0)- then text "" - else foldl1 (<+>) $ map (text . show) vals--instance Show NoteInits where- show (NoteInits start duration) = show $ - double start <+> double duration
− src/CsoundExpr/Translator/Cs/IM.hs
@@ -1,8 +0,0 @@-{-# LANGUAGE MultiParamTypeClasses #-}--module CsoundExpr.Translator.Cs.IM (IM(..)) -where--class IM a b where- from :: a -> b- to :: b -> a
− src/CsoundExpr/Translator/Cs/Utils.hs
@@ -1,37 +0,0 @@-module CsoundExpr.Translator.Cs.Utils - (mapFst, mapSnd, thd, - liftPredicateToList, - unionSorted, unionSortedBy)-where--mapFst :: (a -> a') -> (a, b) -> (a', b)-mapFst f (a, b) = (f a, b)--mapSnd :: (b -> b') -> (a, b) -> (a, b')-mapSnd f (a, b) = (a, f b)--thd (_, _, a) = a--liftPredicateToList :: (a -> b -> Bool) -> ([a] -> [b] -> Bool)-liftPredicateToList f xs ys- | length xs == length ys = all (uncurry f) $ zip xs ys- | otherwise = False---unionSorted :: Ord a => [a] -> [a] -> [a]-unionSorted x1 x2 = case (x1, x2) of- ([] , ys) -> ys- (xs , []) -> xs- ((x:xs) ,(y:ys)) -> if x < y- then x : unionSorted xs x2- else y : unionSorted x1 ys---unionSortedBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]-unionSortedBy cmp x1 x2 = - case (x1, x2) of- ([] , ys) -> ys- (xs , []) -> xs- ((x:xs) ,(y:ys)) -> if cmp x y == LT- then x : unionSortedBy cmp xs x2- else y : unionSortedBy cmp x1 ys
− src/CsoundExpr/Translator/Csd.hs
@@ -1,97 +0,0 @@-module CsoundExpr.Translator.Csd- (toCsd, ppCsTrees, toNotes)-where--import Text.PrettyPrint-import Temporal.Music(Score, dur)---import qualified CsoundExpr.Translator.Cs.CsTree as La-import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs--import CsoundExpr.Translator.Types--import CsoundExpr.Translator.Header-import CsoundExpr.Translator.Instr-import CsoundExpr.Translator.Ftable-import CsoundExpr.Translator.Score-import CsoundExpr.Translator.InstrOrder--import qualified Data.Map as Map--import Debug.Trace-debug x = trace (show $ map snd $ Map.toList x) x------------------------------------------------------------------------------------------------------------------------------------ translate to csd file---toCsd :: Cs.Flags -> [SignalInit] -> Score SignalOut -> Cs.CsoundFile-toCsd flags inits scores = Cs.CsoundFile flags orc sco- where orc = Cs.Orchestra header instrs- sco = Cs.Scores fTabs Cs.defTempo tDur notes- header = toHeader iTab inits (setFtablesInInstr ftInfo instr0)- instrs = map toInstr q1- notes = ( >>= toNotes) q2- (q1, q2) = setInstrIds ids ps- ps = substFtables ftInfo qs- ids = instrIds iTab $ map fst qs- iTab = instrOrderInfo order $ map fst qs- fTabs = toCsFtables ftInfo- ftInfo = getFtableInfo qs instr0- qs = foldScores scores' ++ (zip midi $ repeat [])- tDur = Cs.TotalDuration $ dur scores - scores' = fmap fromSignalOut scores- (instr0, midi, order) = parseInits inits------------------------------------------------------------------------------------------------------------------------------------ ftables--getFtableInfo :: [(Instr, [Note])] -> Instr -> FtableInfo-getFtableInfo as instr0 = - ftableInfo $ (getFtablesFromInstr =<< instrs1) ++- ((getFtablesFromNote =<<) =<< notes1) ++- (getFtablesFromInstr instr0)- where (instrs1, notes1) = unzip as---substFtables :: FtableInfo -> [(Instr, [Note])] -> [(Instr, [Note])]-substFtables ftInfo x = zip instrs' notes'- where instrs' = map (setFtablesInInstr ftInfo) instrs- notes' = map (map (setFtablesInNote ftInfo)) notes- (instrs, notes) = unzip x- --substFtablesInInstr :: Instr -> (Instr, [Cs.Ftable])-substFtablesInInstr x = (x', toCsFtables ftInfo)- where x' = setFtablesInInstr ftInfo x- ftInfo = ftableInfo $ getFtablesFromInstr x------------------------------------------------------------------------------------------------------------------------------------- translate notes--toNotes :: (Id, [Note]) -> [Cs.Note]-toNotes (id, xs) = map (toNote id) xs- where toNote id (t, d, vs) = Cs.Note id (Cs.NoteInits t d) $ map (toValue . snd) vs------------------------------------------------------------------------------------------------------------------------------------- prettyPrint trees-- -ppCsTrees :: [La.CsTree] -> Doc-ppCsTrees x = vcat [opcTitle, opcs, space, ftableTitle, ftables, space, space]- where opcs = text $ show $ Cs.Instr0 $ toOpcodeExpr ts- ftables = vcat $ map (text . show) fts - (ts, fts) = substFtablesInInstr x---opcTitle = text "; opcodes" -ftableTitle = text "; ftables"--
− src/CsoundExpr/Translator/ExprTree/ExprTree.hs
@@ -1,87 +0,0 @@-module CsoundExpr.Translator.ExprTree.ExprTree - (- -- types- ExprTree, Expr, OutPort, Purity(..), Id, Size, Tag,- -- constructors- pure, unpure, outPort, singlePort,- -- modifiers- labelUnpure, mapRootLabel, mapTag, mapOp, mapType, mapPurity, mapPort,- -- selectors- exprTreeTag, exprTag, exprPurity, exprOutPort, exprOp, exprType- ) -where--import CsoundExpr.Translator.Cs.Utils-import CsoundExpr.Translator.ExprTree.Tree---type ExprTree a b c = Tree (Expr a b c)--data Expr a b c = Expr OutPort (Purity a) (Tag b c)- deriving (Show, Eq, Ord)--type OutPort = Id--data Purity a = Pure | Unpure (Maybe a)- deriving (Show, Eq, Ord)--type Tag a b = (Types a, Op b)-type Types a = [a]-type Op a = a--type Id = Int-type Size = Int---pure :: Op c -> [ExprTree a b c] -> ExprTree a b c-pure f xs = Node (Expr singlePort Pure ([], f)) xs--unpure :: Op c -> [ExprTree a b c] -> ExprTree a b c-unpure f xs = Node (Expr singlePort (Unpure Nothing) ([], f)) xs---outPort :: Int -> ExprTree a b c -> ExprTree a b c-outPort id = mapPort (const id) --singlePort = 0--labelUnpure :: a -> ExprTree a b c -> ExprTree a b c-labelUnpure lab = mapPurity (const $ Unpure $ Just lab)---mapRootLabel :: (a -> a) -> Tree a -> Tree a-mapRootLabel f (Node v xs) = Node (f v) xs---mapTag :: (Tag b c -> Tag b c) -> ExprTree a b c -> ExprTree a b c-mapTag f = mapRootLabel $ \(Expr o p x) -> (Expr o p (f x))---mapType :: (Types b -> Types b) -> ExprTree a b c -> ExprTree a b c-mapType f = mapTag $ mapFst f--mapOp :: (Op c -> Op c) -> ExprTree a b c -> ExprTree a b c-mapOp f = mapTag $ mapSnd f--mapPurity :: (Purity a -> Purity a) -> ExprTree a b c -> ExprTree a b c-mapPurity f = mapRootLabel $ \(Expr o p x) -> (Expr o (f p) x)---mapPort :: (OutPort -> OutPort) -> ExprTree a b c -> ExprTree a b c-mapPort f = mapRootLabel $ \(Expr o p x) -> (Expr (f o) p x)------------------------------------------------------------ selectors--exprTreeTag :: ExprTree a b c -> Tag b c-exprTreeTag (Node (Expr _ _ t) _) = t--exprTag (Expr _ _ t) = t-exprPurity (Expr _ p _) = p-exprOutPort (Expr x _ _) = x---exprType = fst-exprOp = snd--
− src/CsoundExpr/Translator/ExprTree/Tree.hs
@@ -1,74 +0,0 @@-module CsoundExpr.Translator.ExprTree.Tree - (Tree(..),- treeVal, treeChilds, subTree,- substTreeByFunc, substTreeById,- foldTree, toIdList, - equalTreeStructureBy)-where--import Text.PrettyPrint--data Tree a = Node a [Tree a]- deriving (Eq, Ord)--ppTree :: Show a => Tree a -> Doc-ppTree (Node a xs) = text "Node" <+> (text $ show a) $+$ - nest 4 (vcat $ map ppTree xs)--instance Show a => Show (Tree a) where- show t = show $ ppTree t---treeVal :: Tree a -> a-treeVal (Node x _) = x--treeChilds :: Tree a -> [Tree a]-treeChilds (Node _ xs) = xs---substTreeByFunc :: (Tree a -> Maybe (Tree a)) -> Tree a -> Tree a-substTreeByFunc f t@(Node a ts) = - case f t of- (Just x) -> substTreeByFunc f x- Nothing -> (Node a $ map (substTreeByFunc f) ts)----foldTree :: (a -> b -> a) -> a -> Tree b -> a-foldTree f s (Node a ts) = foldl (foldTree f) (f s a) ts---toIdList :: Tree a -> [([Int], a)]-toIdList = f []- where f ids (Node a as) = ((ids, a) : ) $- concat [f (ids ++ [i]) x | (i, x) <- zip [0..] as]- - -substTreeById :: [Int] -> Tree a -> Tree a -> Tree a-substTreeById id subtree tree = - case id of - [] -> subtree- xs -> substTreeById (init id) newSubtree tree- where newSubtree = - let s = subTree (init id) tree- x = treeChilds s- n = last id- in Node (treeVal s) $ - (take n x) ++ [subtree] ++ (drop (n+1) x)---subTree :: [Int] -> Tree a -> Tree a-subTree id tree = - case id of- [] -> tree- (x:xs) -> subTree xs (treeChilds tree !! x)----equalTreeStructureBy :: (a -> a -> Bool) -> Tree a -> Tree a -> Bool-equalTreeStructureBy pred (Node a as) (Node b bs) - | pred a b = if length as == length bs- then all (uncurry $ equalTreeStructureBy pred) $ zip as bs- else False- | otherwise = False-
− src/CsoundExpr/Translator/ExprTree/TreeSeq.hs
@@ -1,123 +0,0 @@-module CsoundExpr.Translator.ExprTree.TreeSeq - (adjList, reduceAdjList, - adjLists, reduceAdjLists- ) -where--import Control.Monad.State.Strict-import qualified Data.Map as M--import CsoundExpr.Translator.ExprTree.Tree---numOfChildsList :: Tree a -> [(a, Int)]-numOfChildsList (Node a xs) = (a, length xs) : (numOfChildsList =<< xs)--type TreeLayer a b = (a, (b, [Int]))-mkLayer a b c = (a, (b, c))- --adjList :: Int -> [Tree a] -> [TreeLayer Int a]-adjList s = fst . foldl f ([], s)- where f (res, id) t = let xs = fst $ runState (adjList' id t) id- ys = reverse xs- in (res ++ ys, nextId ys)- nextId (x:xs) = 1 + layerOut x---reduceAdjList :: Ord a => [TreeLayer Int a] -> [TreeLayer Int a]-reduceAdjList xs = fst $ runState (foldM reduceAdjList' [] xs) (0, M.empty, M.empty)---adjLists :: Int -> [Tree a] -> [(TreeLayer Int a, [TreeLayer Int a])]-adjLists s = fst . foldl f ([], s)- where f (res, id) t = let (x:xs) = fst $ runState (adjList' id t) id- ys = reverse xs- in (res ++ [(x, ys)], nextId x ys)- nextId x xs = (1 + ) $ layerOut $ - case xs of- [] -> x- _ -> head xs---reduceAdjLists :: Ord a => - [(TreeLayer Int a, [TreeLayer Int a])]- -> [TreeLayer Int a] -reduceAdjLists = fst . foldl f ([], (0, M.empty, M.empty))- where f (res, s) (lastStm, x) = - registerLastStm lastStm $ - runState (foldM reduceAdjList' res $ x) s-----adjList' :: Int -> Tree a -> State Int [TreeLayer Int a]-adjList' root (Node a xs) = - state $ \s -> let s' = nextId s- xs' = zip (ids s) xs- vs = fst $ runState (foldM foldAdjList [] xs') s'- in (mkLayer root a (ids s) : vs, s')- where ids x = [x + 1 .. x + n]- nextId x = x + n + 1- n = length xs - foldAdjList x y = liftM (x ++) $ (uncurry adjList') y--layerOut = fst-layerOp = fst . snd-layerIns = snd . snd---type LayerNode a = (a, [Int])-type TableNode a = M.Map (LayerNode a) Int-type TableId = M.Map Int Int-type RegisterData a = (Int, TableNode a, TableId)---reduceAdjList' :: - Ord a => [TreeLayer Int a]- -> TreeLayer Int a- -> State (RegisterData a) [(TreeLayer Int a)]-reduceAdjList' res x = - state $ \s@(id, mNodes, mIds) -> - let k = (layerOp x, map (mIds M.! ) $ layerIns x)- in case (M.lookup k mNodes) of- Nothing -> registerNewNode (layerOut x) k (res, s)- (Just i) -> registerNewId (layerOut x) i (res, s)---registerNewNode :: Ord a => Int -> LayerNode a - -> ([TreeLayer Int a], RegisterData a) - -> ([TreeLayer Int a], RegisterData a)-registerNewNode i k (res, (id, mNodes, mIds)) = - (res ++ [(id, k)], (id+1, M.insert k id mNodes, M.insert i id mIds))---registerNewId :: Ord a => Int -> Int- -> ([TreeLayer Int a], RegisterData a) - -> ([TreeLayer Int a], RegisterData a)-registerNewId x i (res, (id, mNodes, mIds)) = - (res, (id, mNodes, M.insert x i mIds))----registerLastStm :: Ord a => - TreeLayer Int a- -> ([TreeLayer Int a], RegisterData a) - -> ([TreeLayer Int a], RegisterData a)-registerLastStm lastStm (res, (id, mNodes, mIds)) =- (res ++ [(id, k)],(- id + 1,- dropLastStm lastStm mNodes, - M.insert (layerOut lastStm) id mIds- )- )- where k = (layerOp lastStm, map (mIds M.! ) $ layerIns lastStm)---dropLastStm :: Ord a => TreeLayer Int a - -> TableNode a -> TableNode a-dropLastStm lastStm = - M.filterWithKey (\k _ -> (/= layerOp lastStm) $ fst k)- - -
− src/CsoundExpr/Translator/Ftable.hs
@@ -1,110 +0,0 @@-module CsoundExpr.Translator.Ftable - (toCsFtables, - ftableInfo,- getFtablesFromInstr, getFtablesFromNote,- setFtablesInInstr, setFtablesInNote) -where--import Data.List-import qualified Data.Map as Map--import CsoundExpr.Translator.ExprTree.Tree-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Cs.Utils--import qualified CsoundExpr.Translator.Cs.CsTree as La-import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs--import CsoundExpr.Translator.Types---substFtablesGen :: (a -> [FtableId]) -> (FtableInfo -> a -> a) ->- a -> (a, [Cs.Ftable])-substFtablesGen toFtables fromFtables t = (fromFtables fs t, toCsFtables fs)- where fs = Map.fromList $ zip (addFtempty $ nub $ toFtables t) [0..]- addFtempty = let ft0 = (Pure, La.EmptyFtable)- in (ft0 : ) . delete ft0-------------------------------------------------------------- translate ftables--toCsFtables :: FtableInfo -> [Cs.Ftable]-toCsFtables fs = map f $ filter ((/= 0 ) . snd) $ Map.toList fs- where f ((_, ft), id) = Cs.Ftable id - (Cs.FtableInits 0 (La.ftableSize ft))- (Cs.GEN (La.ftableGENId ft) $ - map toGens $ La.ftableGENArgs ft)- toGens (Node a _)- | isFtable' $ exprOp $ exprTag a = Cs.ValueInt $ fs Map.! (ftableId a)- | otherwise = toValue $ La.value $ exprOp $ exprTag a------------------------------------------------------------- make ftableInfo--ftableInfo :: [FtableId] -> FtableInfo-ftableInfo = Map.fromList . flip zip [0..] . addFtempty . nub- where addFtempty = let ft0 = (Pure, La.EmptyFtable)- in (ft0 : ) . delete ft0-------------------------------------------------------------- extract ftables--getFtablesFromNote :: Note -> [FtableId]-getFtablesFromNote (_, _, x) = (subFtables =<< ) $ map f $ filter (La.isFtable . snd) x- where f = mapSnd La.toFtable---getFtablesFromInstr :: Instr -> [FtableId]-getFtablesFromInstr = (getFtablesFromTree =<<)--getFtablesFromTree :: La.CsTree -> [FtableId]-getFtablesFromTree = (subFtables =<< ) . getFtables'- where getFtables' = map ftableId . filter p . foldTree (flip (:)) []- p = isFtable' . exprOp . exprTag ---------------------------------------------------------------- substitute ftables--setFtablesInNote :: FtableInfo -> Note -> Note-setFtablesInNote fs (t0, t1, vs) = (t0, t1, map f vs)- where f x- | La.isFtable $ snd x = let id = La.ValueInt $ (fs Map.!) $ mapSnd La.toFtable x- in (fst x, id)- | otherwise = x- --setFtablesInInstr :: FtableInfo -> Instr -> Instr-setFtablesInInstr fs = map (setFtablesInTree fs)---setFtablesInTree :: FtableInfo -> La.CsTree -> La.CsTree-setFtablesInTree fs = substTreeByFunc (f fs)- where f fs (Node a _)- | isFtable' $ exprOp $ exprTag a = Just $ toValueInt fs $ ftableId a- | otherwise = Nothing---------------------------------------------------------------- aux funs--subFtables :: FtableId -> [FtableId]-subFtables x = (x: ) $ (getFtablesFromTree =<<) $ La.ftableGENArgs $ snd x---ftableId :: Expr Id La.Rate La.CsExpr -> FtableId-ftableId a = (exprPurity a, La.toFtable $ La.value $ exprOp $ exprTag a)----isFtable' :: La.CsExpr -> Bool-isFtable' x = if La.isVal x- then (La.isFtable $ La.value x)- else False---toValueInt :: FtableInfo -> FtableId -> La.CsTree-toValueInt fs = mapType (const [La.I]) . La.int . (fs Map.! )---
− src/CsoundExpr/Translator/Header.hs
@@ -1,84 +0,0 @@-module CsoundExpr.Translator.Header- (toHeader,- parseInits,- GlobalInits,- MidiInstr,- InstrOrder)-where--import Data.List-import Data.Maybe-import Control.Monad---import qualified Data.Set as Set-import qualified Data.Map as Map--import qualified CsoundExpr.Translator.Cs.CsTree as La-import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs--import CsoundExpr.Translator.Types-import CsoundExpr.Translator.Instr------------------------------------------------------------------------------------------------------------------------------------ translate header--toHeader :: InstrOrderInfo -> [SignalInit] -> Instr -> Cs.Header-toHeader order inits instr0 = Cs.Instr0 $ csInstr0 ++ (map f $ filter isMidiAssign inits)- where f x = - case x of- (Massign xs id instr) -> assigns "massign" order xs id (fromSignalOut instr)- (Pgmassign xs id instr) -> assigns "pgmassign" order xs id (fromSignalOut instr)- g name val = let outs = [Cs.ArgName Cs.SetupRate name]- ins = [Cs.ArgInValue $ Cs.ValueInt val]- in Cs.OpcodeExpr outs "=" ins- assigns name order xs id instr = - let vs = [id, order Map.! instr] ++ xs- ins = map (Cs.ArgInValue . Cs.ValueInt) vs- in Cs.OpcodeExpr [] name ins- csInstr0 = toOpcodeExpr instr0------------------------------------------------------------------------------------------------------------------------------------parseInits :: [SignalInit] -> (Instr, [MidiInstr], InstrOrder)-parseInits inits = (getInstr0 inits, - getMidiInstrs inits,- getInstrOrder inits)---getInstr0 :: [SignalInit] -> Instr-getInstr0 = (fromSignalOut . fromInstr0 =<< ) . filter isInstr0- where fromInstr0 (Instr0 x) = x---getMidiInstrs :: [SignalInit] -> [MidiInstr]-getMidiInstrs = map fromSignalOut . ( >>= f)- where f x = case x of- Massign _ _ x -> [x]- Pgmassign _ _ x -> [x]- _ -> []---getInstrOrder :: [SignalInit] -> InstrOrder-getInstrOrder = map fromSignalOut . getList . find isInstrOrder- where getList x = case x of- (Just (InstrOrder xs)) -> xs- Nothing -> []-----------------------------------------------------------------isInstr0 :: SignalInit -> Bool-isInstr0 x = case x of (Instr0 _) -> True- _ -> False--isInstrOrder :: SignalInit -> Bool-isInstrOrder x = case x of (InstrOrder _) -> True- _ -> False---isMidiAssign :: SignalInit -> Bool-isMidiAssign x = not $ isInstr0 x || isInstrOrder x
− src/CsoundExpr/Translator/Instr.hs
@@ -1,32 +0,0 @@-module CsoundExpr.Translator.Instr - (toInstr, toOpcodeExpr)-where--import qualified Data.Map as Map--import CsoundExpr.Translator.ExprTree.TreeSeq--import qualified CsoundExpr.Translator.Cs.CsTree as La-import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs--import CsoundExpr.Translator.Types-import CsoundExpr.Translator.AssignmentElimination-import CsoundExpr.Translator.MultiOutsFolding------------------------------------------------------------------------------------------------------------------------------------ translate intruments---toInstr :: (Id, Instr) -> Cs.Instr-toInstr (id, x) = Cs.Instr id $ toOpcodeExpr x------------------------------------------------------------------------------------------------------------------------------------- translate opcodes ---toOpcodeExpr :: Instr -> [Cs.OpcodeExpr]-toOpcodeExpr = foldMultiOuts . eliminateAssignment . - reduceAdjLists . adjLists 0
− src/CsoundExpr/Translator/InstrOrder.hs
@@ -1,54 +0,0 @@-module CsoundExpr.Translator.InstrOrder- (instrOrderInfo,- setInstrIds,- instrIds)-where--import Data.List-import Data.Function-import qualified Data.Map as Map--import Control.Monad.State--import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.Cs.Utils-import CsoundExpr.Translator.Types---import Debug.Trace-debug x = trace (show x) x--setInstrIds :: [Id] -> [(Instr, [Note])] ->- ([(Id, Instr)], [(Id, [Note])])-setInstrIds ids qs = unzip [((id, q1), (id, q2)) | (id, (q1, q2)) <- xs]- where xs = sortBy (compare `on` fst) $ zip ids qs ---instrOrderInfo :: InstrOrder -> [Instr] -> InstrOrderInfo-instrOrderInfo xs qs = Map.fromList $ zip (map fst ps') ids- where ids = resolveCollisions $ map snd ps'- ps' = sortBy (compare `on` snd) $ - fst $ runState (mapM (f xs) qs) (startId + length xs)---f :: InstrOrder -> Instr -> State Id (Instr, Id)-f xs q = state $ \s -> case findIndex ((liftPredicateToList equalStructureByParams) q) xs of- (Just i) -> ((q, startId + i), s)- Nothing -> ((q, s), s + 1)----resolveCollisions :: [Int] -> [Int]-resolveCollisions xs = fst $ runState (mapM f xs) (head xs - 1, 0)- where f x = state $ \(prev, shift) -> - if x + shift == prev- then (x + shift + 1, (x + shift + 1, shift + 1))- else (x + shift, (x + shift , shift))- --startId :: Id-startId = 33---instrIds :: InstrOrderInfo -> [Instr] -> [Id]-instrIds f = map (f Map.!)
− src/CsoundExpr/Translator/MultiOutsFolding.hs
@@ -1,110 +0,0 @@-module CsoundExpr.Translator.MultiOutsFolding - (foldMultiOuts)-where--import Data.List-import Data.Function-import Data.Maybe--import qualified Data.Map as M--import Control.Monad-import Control.Monad.State---import CsoundExpr.Translator.AssignmentElimination--import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs-import CsoundExpr.Translator.Cs.Utils----isMO :: SubstExpr -> Bool-isMO x = case rateInfo x of- (MultiOut _ _ _) -> True- _ -> False---foldMultiOuts :: [SubstExpr] -> [Cs.OpcodeExpr]-foldMultiOuts xs = map snd $ - unionSortedBy (compare `on` fst)- (map procS s) - (procMOs (length xs) $ sortMOs $ groupMOs m)- where (m, s) = partition isMO xs---procS :: SubstExpr -> (Int, Cs.OpcodeExpr)-procS x = (lineNum x, uncurry (Cs.OpcodeExpr $ outs x) $ body x)- where outs = fromMaybe [] . (liftM (:[])) . argOut---groupMOs :: [SubstExpr] -> [[SubstExpr]]-groupMOs = groupBy ((==) `on` pred) . sortBy (compare `on` pred)- where pred x = case rateInfo x of- MultiOut purity _ rates -> (purity, rates, body x) ---sortMOs :: [[SubstExpr]] -> [(Int, [(Maybe Cs.ArgOut, Cs.Rate)], Opcode)]-sortMOs = (flattenMOs =<< ) . map foldMOs---data FoldedMO = FoldedMO- { moLineNum :: Int- , moPort :: Int- , moArgOut :: Cs.ArgOut- } deriving (Show)--foldMOs :: [SubstExpr] -> ([FoldedMO], [Cs.Rate], Opcode)-foldMOs xs = (map outs xs, rates xs, opc xs) - where opc = body . head- rates x = case rateInfo $ head x of- MultiOut _ _ rs -> rs- outs x = case rateInfo x of- MultiOut _ port _ -> - FoldedMO (lineNum x) port (fromJust $ argOut x)---flattenMOs :: ([FoldedMO], [Cs.Rate], Opcode) - -> [(Int, [(Maybe Cs.ArgOut, Cs.Rate)], Opcode)]-flattenMOs (xs, rates, opc) = map (\(i, os) -> (i, os, opc)) $ flatten rates xs- -flatten :: [Cs.Rate] -> [FoldedMO] -> [(Int, [(Maybe Cs.ArgOut, Cs.Rate)])]-flatten rs xs = map (\x -> (formId x, formRates x)) ys- where formId = minimum . map (fst . fromJust) . filter isJust - formRates = flip zip rs . map (liftM snd) - ys = transpose $ map (getPortVals m k) [0 .. n - 1]- n = length rs- (m, k) = foldPorts xs---getPortVals :: M.Map Int [(Int, Cs.ArgOut)]- -> Int -> Int - -> [Maybe (Int, Cs.ArgOut)]-getPortVals m n id = map Just q ++ replicate (n - length q) Nothing- where q = case M.lookup id m of- (Just xs) -> xs- Nothing -> []--foldPorts :: [FoldedMO] -> (M.Map Int [(Int, Cs.ArgOut)], Int)-foldPorts = (\x -> (M.fromList x, getMaxLength x)) . map select . - groupBy ((==) `on` moPort) . sortBy (compare `on` moPort) - where getMaxLength = maximum . map (length . snd)- select xs = let key = moPort $ head xs- val = map (\x -> (moLineNum x, moArgOut x)) xs- in (key, val)- ---procMOs :: Int -> [(Int, [(Maybe Cs.ArgOut, Cs.Rate)], Opcode)] - -> [(Int, Cs.OpcodeExpr)]-procMOs n xs = fst $ runState (mapM f xs) n- where f (id, outs, opc) = liftM (\x -> (id, x)) $ mkOpcode outs opc- mkOpcode outs opc = liftM (\x -> uncurry (Cs.OpcodeExpr x) opc) $ - mapM mkOuts outs---mkOuts :: (Maybe Cs.ArgOut, Cs.Rate) -> State Int Cs.ArgOut-mkOuts (arg, rate) = - state $ \n -> case arg of- Nothing -> (numArgName rate n, n + 1)- (Just a) -> (a, n)
− src/CsoundExpr/Translator/Score.hs
@@ -1,146 +0,0 @@-module CsoundExpr.Translator.Score- (foldScores)-where--import Data.List-import Data.Function---import Temporal.Music(Score, Event(..), render)--import qualified Data.Map as Map--import CsoundExpr.Translator.ExprTree.Tree-import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.ExprTree.ExprTree (Purity(..), exprTag)--import CsoundExpr.Translator.Cs.CsTree-import CsoundExpr.Translator.Cs.Utils--import CsoundExpr.Translator.Types----- import Debug.Trace--- debug msg x = trace (msg ++ " : " ++ show x) x---type NodeId = (Int, [Int])-type PfieldId = (Int, IsStringPfield)--type IsStringPfield = Bool----- | all values in given instrument node-type NodeSlice = (NodeId, [ValueId])--foldScores :: Score Instr -> [(Instr, [Note])]-foldScores x = zip instrs vals- where instrs = zipWith substPfields ids rawInstrs- (ids, vals) = unzip $ map (foldVals . formValues) sco- rawInstrs = map (thd . head) sco- sco = scoreList x-----scoreList :: Events Instr -> [[(Time, Time, Instr)]]---scoreList = groupBy ((liftPredicateToList equalStructure) `on` thd) . --- sortBy (compare `on` thd) . toList--scoreList :: Score Instr -> [[(Time, Dur, Instr)]]-scoreList = iterScoreList [] . toList- where iterScoreList res s = - case s of- [] -> res- (x:xs) -> let (x1, x2) = partition (pred x) xs- in iterScoreList (res ++ [x : x1]) x2- pred = liftPredicateToList equalStructure `on` thd- toList x = map (\(Event t d a) -> (t, d, a)) $ render x---foldVals :: [(Time, Time, [(NodeId, ValueId)])] -> ([(NodeId, PfieldId)], [Note])-foldVals xs = (i, subst3 (valList v) xs)- where (i, v) = assignPfieldIds $ filter (isPfield . snd) $ alignValuesByNodes xs - subst3 ys xs = [(a, b, y) | (y, (a, b, _)) <- zip ys xs]- valList [] = repeat []- valList xs = transpose xs---isPfield :: [ValueId] -> Bool-isPfield = p . nub- where p x = case x of- (x0 : x1 : _) -> True- _ -> False---alignValuesByNodes :: [(Time, Time, [(NodeId, ValueId)])] -> [NodeSlice]-alignValuesByNodes = map select . transpose . map thd- where select x = (fst $ head x, map snd x)---substPfields :: [(NodeId, PfieldId)] -> Instr -> Instr-substPfields ids instr = foldl f instr ids -- zip ids [4..]- where f xs ((id0, id), n) =- substListElem id0 (substTreeById id (p n) (xs !! id0)) xs- p (id, isStr) - | isStr = mapType (const [S]) $ param id- | otherwise = mapType (const [I]) $ param id- ---substListElem :: Int -> a -> [a] -> [a]-substListElem id x xs = take id xs ++ [x] ++ drop (id+1) xs--- -formValues :: [(Time, Time, Instr)] -> [(Time, Time, [(NodeId, ValueId)])]-formValues = map f . sortBy p- where f (t, d, expr) = (t, d, toVals expr)- p (a1, b1, _) (a2, b2, _)- | a1 < a2 = LT- | a1 == a2 && a1 < a2 = LT- | a1 == a2 && a1 == a2 = EQ- | otherwise = GT----toVals :: Instr -> [(NodeId, ValueId)]-toVals = (addId0 =<< ) . zip [0..] . map getVals- where getVals = map (mapSnd value') . filter (isVal . exprOp . exprTag . snd) . toIdList- value' x = (exprPurity x, value $ exprOp $ exprTag x)- addId0 (id0, xs) = [((id0, ids), vs) | (ids, vs) <- xs]- --assignPfieldIds :: [NodeSlice] -> ([(NodeId, PfieldId)], [[ValueId]])-assignPfieldIds xs = (zip (map fst xs) (zip ids isStr), orderValsWithIds ids vals)- where ids = map (+4) $ numerate $ map snd xs- isStr = map (isStringValueId . head . snd) xs- vals = map snd xs- ---orderValsWithIds :: [Int] -> [[ValueId]] -> [[ValueId]]-orderValsWithIds ids vals = map snd $ sortOn fst $ nubOn fst $ zip ids vals---sortOn :: Ord b => (a -> b) -> [a] -> [a]-sortOn f = sortBy (compare `on` f)--nubOn :: Eq b => (a -> b) -> [a] -> [a]-nubOn f = nubBy ((==) `on` f)---isStringValueId :: ValueId -> Bool-isStringValueId (_, v) = isString v ----- numerate : --- assigns numbers to unique elements of list--- (it's for (ExprTree -> ExprSeq) optimisation, --- pfields with the same values should have same pfield ids)--numerate :: Ord b => [b] -> [Int]-numerate = fst . foldl f ([], Map.empty) - where f (s, m) b - | Map.member b m = (s ++ [m Map.! b], m)- | otherwise = (s ++ [id], mNew)- where id = Map.size m- mNew = Map.insert b id m
− src/CsoundExpr/Translator/Types.hs
@@ -1,236 +0,0 @@-{-# LANGUAGE - MultiParamTypeClasses, - TypeSynonymInstances, - FlexibleInstances,- FlexibleContexts #-}--module CsoundExpr.Translator.Types (- Time, Dur, - Id, - ExprLayer, LaExpr, - mkLayer, layerOut, layerOp, layerIn,- GlobalInits,- FtableId, FtableInfo,- Instr, MidiInstr, InstrOrder, InstrOrderInfo,- Note, ValueId,- SignalOut(..), outList, fromSignalOut,- Header, SignalInit(..),- Arate(..), Krate(..), Irate(..), X(..), K(..), MO(..),- BoolRate(..), - toValue, toCsRate, gRate, isArgOut -)-where--import qualified Data.Set as Set-import qualified Data.Map as Map--import CsoundExpr.Translator.ExprTree.ExprTree-import CsoundExpr.Translator.Cs.IM-import qualified CsoundExpr.Translator.Cs.CsTree as La-import qualified CsoundExpr.Translator.Cs.CsoundFile as Cs-import CsoundExpr.Translator.Cs.CsBoolean --type Time = Double-type Dur = Time----- exprSeq----type CsExprSeq = ExprSeq La.Rate La.CsExpr---type CsExprLayer = ExprLayer [(La.Rate, Id)] La.CsExpr Int--type LaExpr = Expr La.Label La.Rate La.CsExpr---- type ExprSeq a b = [ExprLayer [(a, Id)] b Id]-type ExprLayer a b c = (a, (b, [c]))--layerOut (a, (b, c)) = a-layerOp (a, (b, c)) = b-layerIn (a, (b, c)) = c--mkLayer a b c = (a, (b, c))---- globals--type GlobalInits = Set.Set (La.Name, La.Rate)---- ftables--type FtableId = (Purity Id, La.Ftable)-type FtableInfo = Map.Map FtableId Id---- instr--type Instr = [La.CsTree]-type MidiInstr = Instr-type InstrOrder = [Instr]--type InstrOrderInfo = Map.Map Instr Id---- scores--type Note = (Time, Time, [ValueId])-type ValueId = (Purity Id, La.Value)---- rates---- | audio signal -data Arate = Arate La.CsTree---- | control signal -data Krate = Krate La.CsTree---- | init variable-data Irate = Irate La.CsTree----- | boolean signal. Type for comparison of control or init rate signals.-data BoolRate = BoolRate CsBool---- rate classes---- IM--instance IM La.CsTree Arate where- from = Arate . mapType (const [La.A])- to (Arate t) = t---instance IM La.CsTree Krate where- from = Krate . mapType (const [La.K])- to (Krate t) = t---instance IM La.CsTree Irate where- from = Irate . mapType (const [La.I])- to (Irate t) = t---instance IM La.CsTree String where- from x = error "from string is undefined"- to = La.string---- MO--class MO a where- rateMO :: [La.Rate] -> a -> a--instance MO Arate where- rateMO rs (Arate x) = Arate $ mapType (const rs) x--instance MO Krate where- rateMO rs (Krate x) = Krate $ mapType (const rs) x--instance MO Irate where- rateMO rs (Irate x) = Irate $ mapType (const rs) x---- X, K---- | 'X' = 'Arate' | 'Krate' | 'Irate'-class (IM La.CsTree a, MO a) => X a where- arate :: a -> Arate- krate :: a -> Krate- irate :: a -> Irate----- | 'K' = 'Krate' | 'Irate'-class X a => K a--instance X Arate where- arate = id- krate = from . pure (La.opc "downsamp") . return . toCsTree- irate = from . pure (La.opr ["i(", ")"]) . return . toCsTree . krate --instance X Krate where- arate = from . pure (La.opc "upsamp") . return . toCsTree- krate = id- irate = from . pure (La.opr ["i(", ")"]) . return . toCsTree- -instance X Irate where- arate = from . pure (La.opc "upsamp") . return . toCsTree- krate = from . pure (La.opr ["k(", ")"]) . return . toCsTree- irate = id--toCsTree :: X a => a -> La.CsTree-toCsTree = to--instance K Krate-instance K Irate---- signal out---- | Output of opcodes that produce no value in csound code (out, outs, xtratim, etc.)-data SignalOut = SignalOut Instr- deriving (Eq, Ord)---- | Join several output opcodes------ Example :--- --- > instr q--- > a1 upsamp 1--- > out a1--- > gaSig = a1--- > endin------ > q = outList [out x, gar "Sig" <=> x]--- > where x = upsamp $ num 1----outList :: [SignalOut] -> SignalOut-outList = SignalOut . (fromSignalOut =<< )---fromSignalOut :: SignalOut -> Instr-fromSignalOut (SignalOut x) = x---- signal init---- | Header section-type Header = [SignalInit]--data SignalInit = Instr0 SignalOut- | Massign [Int] Int SignalOut- | Pgmassign [Int] Int SignalOut- | InstrOrder [SignalOut]- deriving (Eq, Ord)------------------------------------------------------------ predicates--isArgOut :: ExprLayer Int LaExpr Int -> Bool-isArgOut x = (not $ null $ layerIn x) && (La.isArg $ exprOp $ exprTag $ layerOp x) ------------------------------------------------------------ converters---toValue :: La.Value -> Cs.Value-toValue x = case x of- (La.ValueDouble v) -> Cs.ValueDouble v- (La.ValueString v) -> Cs.ValueString v- (La.ValueInt v) -> Cs.ValueInt v---toCsRate :: La.Rate -> Cs.Rate-toCsRate x = - case x of- La.A -> Cs.A- La.K -> Cs.K- La.I -> Cs.I- La.S -> Cs.S- - La.GA -> Cs.GA- La.GK -> Cs.GK- La.GI -> Cs.GI- La.GS -> Cs.GS- - La.SetupRate -> Cs.SetupRate- ---gRate :: Cs.Rate -> Cs.Rate-gRate x = case x of- Cs.A -> Cs.GA- Cs.K -> Cs.GK- Cs.I -> Cs.GI-