Browse Source

Initial revision

master
nebogeo 23 years ago
commit
b28fc01c02
100 changed files with 18608 additions and 0 deletions
  1. +196
    -0
      CHANGES
  2. +339
    -0
      COPYING
  3. +128
    -0
      Examples/BandpassShaper.ssm
  4. +78
    -0
      Examples/Feedback.ssm
  5. +121
    -0
      Examples/FourOsc.ssm
  6. +96
    -0
      Examples/Polyphonic.ssm
  7. +74
    -0
      Examples/Random.ssm
  8. +76
    -0
      Examples/Sequence.ssm
  9. +109
    -0
      Examples/SpiralSynth.ssm
  10. +205
    -0
      Examples/Tutorial1-FirstThing.ssm
  11. +133
    -0
      Examples/Tutorial2-Audio&CVs.ssm
  12. +129
    -0
      Examples/Tutorial3-SubtractiveSynth.ssm
  13. +110
    -0
      Examples/Tutorial4-AdditiveSynth.ssm
  14. +99
    -0
      Examples/Tutorial5-Matrix&Sampler.ssm
  15. +101
    -0
      Examples/Tutorial6-Sequencer.ssm
  16. +125
    -0
      Examples/Tutorial7-LADSPA.ssm
  17. +324
    -0
      Examples/Tutorial8-AdvSequencing.ssm
  18. BIN
      GUI/SSM.xcf
  19. +1961
    -0
      GUI/SSM.xpm
  20. +552
    -0
      GUI/SpiralIcon.xpm
  21. +510
    -0
      GUI/Widgets/Fl_Canvas.C
  22. +104
    -0
      GUI/Widgets/Fl_Canvas.h
  23. +93
    -0
      GUI/Widgets/Fl_CommentGUI.C
  24. +41
    -0
      GUI/Widgets/Fl_CommentGUI.h
  25. +214
    -0
      GUI/Widgets/Fl_DeviceGUI.C
  26. +107
    -0
      GUI/Widgets/Fl_DeviceGUI.h
  27. +23
    -0
      GUI/Widgets/Fl_DragBar.H
  28. +166
    -0
      GUI/Widgets/Fl_DragBar.cxx
  29. +180
    -0
      GUI/Widgets/Fl_DragBar.fld
  30. +40
    -0
      GUI/comment.xpm
  31. +555
    -0
      GUI/edit.xpm
  32. +954
    -0
      GUI/load.xpm
  33. +242
    -0
      GUI/new.xpm
  34. +843
    -0
      GUI/options.xpm
  35. +957
    -0
      GUI/save.xpm
  36. +192
    -0
      GraphSort.C
  37. +55
    -0
      GraphSort.h
  38. +264
    -0
      Makefile.in
  39. +63
    -0
      README
  40. +208
    -0
      SettingsWindow.C
  41. +60
    -0
      SettingsWindow.h
  42. +406
    -0
      SpiralSound/Midi.C
  43. +100
    -0
      SpiralSound/Midi.h
  44. +19
    -0
      SpiralSound/NoteTable.C
  45. +37
    -0
      SpiralSound/NoteTable.h
  46. +135
    -0
      SpiralSound/PluginManager.C
  47. +60
    -0
      SpiralSound/PluginManager.h
  48. +105
    -0
      SpiralSound/Plugins/AmpPlugin/AmpPlugin.C
  49. +57
    -0
      SpiralSound/Plugins/AmpPlugin/AmpPlugin.h
  50. +17
    -0
      SpiralSound/Plugins/AmpPlugin/AmpPlugin.pro
  51. +136
    -0
      SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C
  52. +62
    -0
      SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h
  53. +164
    -0
      SpiralSound/Plugins/AmpPlugin/Makefile.in
  54. +347
    -0
      SpiralSound/Plugins/AmpPlugin/SpiralIcon.xpm
  55. +102
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/Bezier.C
  56. +43
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/Bezier.h
  57. +233
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePlugin.C
  58. +63
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePlugin.h
  59. +19
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePlugin.pro
  60. +369
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.C
  61. +109
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.h
  62. +172
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/Makefile.in
  63. +327
    -0
      SpiralSound/Plugins/ComplexEnvelopePlugin/SpiralIcon.xpm
  64. +236
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C
  65. +53
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h
  66. +17
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.pro
  67. +244
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C
  68. +90
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h
  69. +164
    -0
      SpiralSound/Plugins/ControllerPlugin/Makefile.in
  70. +352
    -0
      SpiralSound/Plugins/ControllerPlugin/SpiralIcon.xpm
  71. +141
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPlugin.C
  72. +63
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPlugin.h
  73. +17
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPlugin.pro
  74. +72
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C
  75. +56
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h
  76. +166
    -0
      SpiralSound/Plugins/DelayPlugin/Makefile.in
  77. +341
    -0
      SpiralSound/Plugins/DelayPlugin/SpiralIcon.xpm
  78. +136
    -0
      SpiralSound/Plugins/DistributorPlugin/DistributorPlugin.C
  79. +57
    -0
      SpiralSound/Plugins/DistributorPlugin/DistributorPlugin.h
  80. +18
    -0
      SpiralSound/Plugins/DistributorPlugin/DistributorPlugin.pro
  81. +42
    -0
      SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.C
  82. +48
    -0
      SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.h
  83. +170
    -0
      SpiralSound/Plugins/DistributorPlugin/Makefile.in
  84. +328
    -0
      SpiralSound/Plugins/DistributorPlugin/SpiralIcon.xpm
  85. +125
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPlugin.C
  86. +61
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPlugin.h
  87. +17
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPlugin.pro
  88. +135
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C
  89. +63
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h
  90. +166
    -0
      SpiralSound/Plugins/EchoPlugin/Makefile.in
  91. +341
    -0
      SpiralSound/Plugins/EchoPlugin/SpiralIcon.xpm
  92. +10
    -0
      SpiralSound/Plugins/Edit.sh
  93. +98
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C
  94. +51
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h
  95. +17
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.pro
  96. +73
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C
  97. +54
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h
  98. +168
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in
  99. +321
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/SpiralIcon.xpm
  100. +188
    -0
      SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C

+ 196
- 0
CHANGES View File

@@ -0,0 +1,196 @@
Release 0.1.1

Main app changes:

Back to one window GUI with seperate movable areas
Fixed Plugin window events/drawing bug
Echo/Delay crash bug fix
Less C code in SpiralSynthModular.C (Andy Preston)
Ability to load ssm files from command line (Dan Bethell)
gcc3.1 fixes + dynamic linking bugfix (Takashi Iwai)
configure + make fixes (Takashi Iwai)
configure option --with-plugindir=xxx added (Takashi Iwai)

Plugin changes:

LFOPlugin (Andy Preston)
MeterPlugin (Andy Preston)
StereoMixerPlugin fix (Andy Preston)
Scaling fix and name sorting for the LADSPAPlugin (Mike Rawes)
Sequencer bugfix for dragging note events
Matrix now 64X24 + tweaked GUI
Matrix can be controlled by an external clock pulse
Matrix copy/paste and transpose functionality (Andy Preston)
JackPlugin fixed for recent versions of jack (Takashi Iwai)

Release 0.1.0

Main app changes:

New GUI code, main app window has now become the editor window, with a new
window for plugin dialogues. (build fltk with ./configure --enable-shared)
New default theme.
New load/save system for external files like samples. (external files stored
in a directory)
configure fixes (Takashi Iwai)
ppc fix (Takashi Iwai)
gcc 3 fixes (Takashi Iwai)
wav loading fixes
Graph sorted node execution order to remove internal latency.

Plugin changes:
Scope plugin bugfix
DistributorPlugin (Fade)
JoystickPlugin (Bill Bland)

Release 0.0.9 Thursday Febuary 14 2002

Main app changes:

Right click plugin menu
More error boxes, all asserts out of SSM app, better recovery from bad files
Audio engine can now be run in callback mode for plugins like the JackPlugin
Options save (Bill Bland)

Plugin changes:

PoshSampler, with loop points, editing and dirty timestretching
ComplexEnvelope, describe envelopes with arbitary lines or Bezier curves
MidiPlugin updated to support all controller channels, with multiple ports
Rewritten the midi parser
Controller plugin save problem fixed
Matrix stream out leaner
SpiralLoopPlugin Close file dialog crash fixed
StreamPlugin crash on mono wavs fixed

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Release 0.0.8 Thursday Febuary 14 2002

Main app changes:

All plugin communication now in 32bit floating point.
New configure/make system (Erik de Castro Lopo)
Warning and error dialogs
FLTK 1.1.0 supported (Takashi Iwai)
gcc-3 fixes (Takashi Iwai)
Proper tooltips implemented
Options GUI
Crash bug fix

Plugin changes:

OSS output now does input, and with duplex - simultaneous i/o.
StreamPlugin
XFadePlugin
SpiralLoopPlugin

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Release 0.0.7 Tuesday November 21 2001.

Main app changes:

Wavfile fix for PPC machines. (Yves Usson)
PNG fix for images with an alpha channel. (Yves Usson)
All windows are now double buffered by default.
Misc gui tweaks

Plugin changes:

RiffWav loader attempts to decode non standard wavs
Ladspa plugin should compile whether ladspa is installed or not.
SampleHoldPlugin (Yves Usson)
NoteSnapPlugin
WaveShaperPlugin GUI updated. (Yves Usson)
AmpPlugin GUI updated. (Yves Usson)
Sampler plugin streams paths with spaces properly.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Release 0.0.6 Wednesday October 31 2001.

Main app changes:

Put a version number in the .SpiralSynthModular, so there's no need
to break the file format again.
Basic theme support - png loading needs libpng
Clear first buffer to stop noise on startup.
Different samplerates should be handled properly now.
RiffWav rewritten - automatically mixes stereo wavs into mono.
Deals with header much better, stores samplerate etc.

Plugin changes:

Output : Buffer size now handled correctly (Fragment settings in .rc file).
SeqSelector : Should always loop now.
SamplerPlugin : Individual sample outputs added.
SamplerPlugin : Pitch takes samplerate into account.
SequencerPlugin : Speed takes samplerate into account.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Release 0.0.5 Thursday October 20 2001.

Main app changes:

Plugin Tooltips
Layout text comments
Toolbox GUI sorted
Low level optimisation begun, to stop processing silent sample buffers.
Removed asserts from low level sample code (only for releases).
Removed tons of old SpiralSynth legacy code and dependancies.
File confirmation added.

Plugin changes:

WaveShaper Plugin added (thx to Yves Usson)
SeqSelector GUI finished
Oscillator & Wavetable octave fix (Yves Usson)
Oscillator, Echo and envelope GUI additions (Yves Usson)
Envelope plugin bug fixed (warning volume will need to be increased on saved layouts)
Controller plugin now much more versatile.
LADSPA plugin
Moog filter optimised
SVF filter optimised
Splitter plugin now has 4 outputs

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Release 0.0.4 Thursday September 13 2001.

Main app changes:

Crash bugs related to deleting of devices located and fixed.
Big endian PPC support back in.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Release 0.0.3 Monday September 10 2001.

Main app changes:

Fixed an include problem that some people were getting.
Added functionality for plugind to change their device
properties while running.

Plugin changes:

Sequencer Plugin finished, records note CV input, and can hold up to 16
different patterns.
Added the SeqSelecta, which can be used to step through patterns on the
sequencer or matrix plugins.
WaveTableOsc plugin - Sine, Square, Saw, InvSaw, Triangle, 2 Pulse and InvSine
waveshapes generated. Should be much faster than the old oscillator, but with
less modulation options.
Oscillator optimisations.
Improved the delay plugin (now linearly interpolated)
Sampler plugin now pitches samples offset from their input frequency,
for tuning of samples used in melodies.
Output no longer exits if it can't open the soundcard,
wav recording is still enabled.
Midi device wasn't opening the file in .SpiralSynthModular - fixed.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

First release 0.0.2 Monday July 2 2001.

+ 339
- 0
COPYING View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

Appendix: How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

+ 128
- 0
Examples/BandpassShaper.ssm View File

@@ -0,0 +1,128 @@
SpiralSynthModular File Ver 3
253 149 724 420 253 501 724 420
SectionList
23

Device 0 Plugin 0
873 153 0 76 47


Device 1 Plugin 13
523 78 0 76 47
1 1 0.36389

Device 2 Plugin 13
522 150 0 76 47
1 1 0.38383

Device 3 Plugin 13
525 223 0 76 47
1 1 0.36274

Device 7 Plugin 6
420 102 0 0 0


Device 8 Plugin 6
455 189 0 0 0


Device 12 Plugin 7
611 156 0 76 47
1 1 1 1 1

Device 13 Plugin 8
783 153 0 76 47
1 1 0.5 1 0.5 1 0.5 1 0.5

Device 16 Plugin 1
697 153 1 445 67


Device 17 Plugin 23
276 198 1 186 73
1 0 -3 0.0258332 1

Device 18 Plugin 23
340 262 1 180 205
1 0 -3 0.00586802 1

Device 19 Plugin 23
410 331 1 432 205
1 0 -3 0.0843751 1

Device 20 Plugin 3
184 100 1 103 83
3 1 -0.42 1
1
4
Name -1 1 0.71


Device 21 Plugin 23
267 98 0 76 47
1 0 -2 0.187005 1

Device 22 Plugin 23
337 100 0 76 47
1 2 -3 0.325557 1

Device 23 Plugin -1
272 16 0 0 0
1 53 This layout generates a signal with lots of harmonics


Device 24 Plugin -1
278 30 0 0 0
1 55 and filters the signal with three bandpass moog filters


Device 25 Plugin -1
196 78 0 0 0
1 26 Change this to alter pitch


Device 26 Plugin -1
665 98 0 0 0
1 43 Have a look at the waveform generated in an


Device 27 Plugin -1
667 111 0 0 0
1 47 audio editor such as audacity, that can display


Device 28 Plugin -1
625 125 0 0 0
1 27 the frequencies as colours.


Device 29 Plugin -1
248 330 0 0 0
1 39 These oscillators change the modulation


Device 30 Plugin -1
202 345 0 0 0
1 21 of the three filters.


17
7 4 1 8 5 0
8 5 0 2 2 0
8 5 1 3 3 0
7 4 0 1 1 0
1 1 1 12 6 0
2 2 1 12 6 1
3 3 1 12 6 2
13 7 0 0 0 0
13 7 1 0 0 1
12 6 0 16 8 0
16 8 0 13 7 0
17 9 0 1 1 1
18 10 0 2 2 1
19 11 0 3 3 1
22 14 0 7 4 0
21 13 0 22 14 0
20 12 0 21 13 0


+ 78
- 0
Examples/Feedback.ssm View File

@@ -0,0 +1,78 @@
SpiralSynthModular File Ver 3
314 503 724 461 238 186 724 420
SectionList
14

Device 0 Plugin 0
612 241 0 100 100


Device 2 Plugin 4
348 109 1 95 160
1 2 2 0.0149791 0.53 0 0.019 0.299

Device 4 Plugin 6
240 254 0 0 0


Device 5 Plugin 1
419 246 1 349 157


Device 7 Plugin 9
276 109 1 447 33
1 0.1132 0.0377

Device 8 Plugin 9
420 109 1 448 291
1 1.1698 0.566

Device 12 Plugin 8
520 239 0 100 100
1 0.27 0.5 0.8 0.5 1 0.5 1 0.5

Device 13 Plugin -1
226 36 0 0 0
1 40 This uses SSM's ability to feedback data


Device 14 Plugin -1
198 49 0 0 0
1 27 from one plugin to another.


Device 15 Plugin -1
208 200 0 0 0
1 37 This is where the signal is fed back.


Device 16 Plugin -1
232 63 0 0 0
1 41 Feedback generates quite a chaotic sound,


Device 17 Plugin -1
221 76 0 0 0
1 36 try changing some of the parameters.


Device 18 Plugin 23
200 109 1 95 47
1 0 -3 0.158165 1

Device 19 Plugin 23
491 108 1 92 274
1 0 -1 0.202252 1

10
7 4 0 2 1 0
2 1 0 8 5 0
4 2 0 5 3 0
12 6 0 0 0 0
12 6 1 0 0 1
5 3 0 12 6 0
18 12 0 7 4 0
8 5 0 19 13 0
19 13 0 4 2 0
4 2 1 18 12 0


+ 121
- 0
Examples/FourOsc.ssm View File

@@ -0,0 +1,121 @@
SpiralSynthModular File Ver 3
134 396 750 484 601 192 724 420
SectionList
21

Device 0 Plugin 4
443 77 1 84 7
1 2 0 1.47687 0 0 0 1

Device 1 Plugin 4
445 11 1 84 119
1 2 -1 0.960617 0 0 1.17928e-38 1

Device 2 Plugin 4
442 144 1 84 232
1 2 0 0.733381 0.23 0 2.2772e-38 1

Device 3 Plugin 4
442 212 1 84 345
1 2 0 0.983196 0.87 0 0 1

Device 4 Plugin 8
729 107 0 100 100
1 1 0.5 1 0.5 1 0.5 1 0.5

Device 5 Plugin 7
593 106 0 100 100
1 1 1 1 1

Device 6 Plugin 13
662 107 1 539 157
1 0.0943 0.07142

Device 8 Plugin 0
799 105 0 100 100


Device 9 Plugin 2
157 127 0 100 100
2 0 0 0


Device 10 Plugin 6
282 118 0 0 0


Device 13 Plugin 6
202 241 0 0 0


Device 14 Plugin 5
442 281 1 529 22
1 0.3844 0.1156 0.91 2.1609 0.5 0.01

Device 15 Plugin 6
282 186 0 0 0


Device 18 Plugin 5
513 214 1 331 345
1 0.8281 3.2761 0 0 0.5 0.01

Device 19 Plugin 5
513 145 1 331 234
1 0.6241 0.3249 0 0 0.5 0.01

Device 20 Plugin 5
512 79 1 330 122
1 0.7225 1.8496 0 1 0.5 0.01

Device 21 Plugin 5
514 11 1 332 9
1 0.0529 2.6896 0 0 0.5 0.01

Device 22 Plugin 7
512 284 1 417 208
1 1.47 0.07 1 1

Device 24 Plugin -1
216 36 0 0 0
1 42 A fairly complicated synth, 4 oscillators,


Device 25 Plugin -1
248 48 0 0 0
1 53 with an extra envelope and LFO modulating the filter.


Device 26 Plugin 23
446 347 1 486 344
1 0 0 0.457092 1

27
5 5 0 6 6 0
4 4 0 8 7 0
4 4 1 8 7 1
9 8 0 10 9 0
9 8 1 13 10 0
6 6 0 4 4 0
1 1 0 21 16 1
0 0 0 20 15 1
2 2 0 19 14 1
3 3 0 18 13 1
13 10 0 15 12 0
21 16 1 5 5 0
20 15 1 5 5 1
19 14 1 5 5 2
18 13 1 5 5 3
14 11 0 22 17 0
13 10 1 14 11 0
22 17 0 6 6 1
15 12 0 21 16 0
15 12 1 20 15 0
15 12 2 19 14 0
15 12 3 18 13 0
10 9 0 1 1 0
10 9 1 0 0 0
10 9 2 2 2 0
10 9 3 3 3 0
26 20 0 22 17 1


+ 96
- 0
Examples/Polyphonic.ssm View File

@@ -0,0 +1,96 @@
SpiralSynthModular File Ver 3
283 72 724 482 284 586 724 420
SectionList
16

Device 0 Plugin 86
279 121 0 0 0


Device 1 Plugin 2
205 117 0 36 100
2 0 0 0


Device 2 Plugin 23
372 242 1 97 350
1 0 0 1 1

Device 3 Plugin 23
373 51 1 98 15
1 0 0 1 1

Device 4 Plugin 23
372 114 1 97 127
1 0 0 1 1

Device 5 Plugin 23
373 179 1 97 238
1 0 0 1 1

Device 6 Plugin 5
439 245 1 344 349
1 0 0.5 1 1 0.5 0.01

Device 7 Plugin 5
439 181 1 344 237
1 0 0.5 1 1 0.5 0.01

Device 8 Plugin 5
439 115 1 344 126
1 0 0.5 1 1 0.5 0.01

Device 9 Plugin 5
441 52 1 344 15
1 0 0.5 1 1 0.5 0.01

Device 10 Plugin 8
515 125 1 491 147
1 1 0.5 1 0.5 1 0.5 1 0.5

Device 11 Plugin 0
580 139 0 36 100


Device 12 Plugin -1
227 29 0 0 0
1 48 This patch uses the distributor plugin to create


Device 13 Plugin -1
215 44 0 0 0
1 24 a polyphonic synthesizer


Device 15 Plugin -1
225 301 0 0 0
1 46 The distributor sends each note recieved to a


Device 18 Plugin -1
237 317 0 0 0
1 51 different identical wavetable/envelope synth voice.


20
1 1 0 0 0 0
1 1 1 0 0 1
10 10 0 11 11 0
10 10 1 11 11 1
0 0 0 3 3 0
0 0 2 4 4 0
0 0 4 5 5 0
0 0 6 2 2 0
3 3 0 9 9 1
4 4 0 8 8 1
5 5 0 7 7 1
2 2 0 6 6 1
0 0 1 9 9 0
0 0 3 8 8 0
0 0 5 7 7 0
0 0 7 6 6 0
6 6 1 10 10 3
9 9 1 10 10 0
8 8 1 10 10 1
7 7 1 10 10 2


+ 74
- 0
Examples/Random.ssm View File

@@ -0,0 +1,74 @@
SpiralSynthModular File Ver 3
259 103 724 420 362 504 906 420
SectionList
13

Device 3 Plugin 0
772 162 0 100 100


Device 5 Plugin 5
560 161 1 530 87
1 0.0289 0.3249 0 0 0.51 0

Device 7 Plugin 8
702 162 0 100 100
1 1 0.5 1 0.5 1 0.5 1 0.5

Device 9 Plugin 14
631 162 1 376 21
1 0.396 0.62

Device 12 Plugin 13
491 162 1 380 141
1 1 0.43934

Device 20 Plugin 4
217 68 1 100 100
1 3 -3 0.119661 0.5 0 2.98023e-09 1

Device 25 Plugin -1
485 102 0 0 0
1 37 A design that generates random events


Device 26 Plugin 51
327 104 0 0 0


Device 27 Plugin 23
152 160 1 99 16
1 0 1 0.0326008 1

Device 28 Plugin 6
231 160 0 0 0


Device 29 Plugin 23
419 161 1 99 138
1 1 -3 0.933262 1

Device 30 Plugin 4
217 251 1 100 100
1 3 0 1 0.5 0 1.70555e-38 1

Device 31 Plugin 51
328 218 0 0 0


14
7 2 0 3 0 0
7 2 1 3 0 1
9 3 0 7 2 0
12 4 0 5 1 1
5 1 1 9 3 0
27 8 0 28 9 0
20 5 0 26 7 0
29 10 0 12 4 0
28 9 2 31 12 1
30 11 0 31 12 0
31 12 0 12 4 1
28 9 0 5 1 0
28 9 1 26 7 1
26 7 0 29 10 0


+ 76
- 0
Examples/Sequence.ssm View File

@@ -0,0 +1,76 @@
SpiralSynthModular File Ver 3
314 503 724 461 238 186 724 420
SectionList
10

Device 0 Plugin 18
159 82 1 111 149
2 0 0.0459186 21 1 0
32 6.6 3
1 1 7 1 13 1 15 1 19 1 23 1 25 1 29 1 30 3 0 4 2 4 6 4 10 4 12 4 14 4 18 4 20 4 24 4 28 4 31 6 4 11 8 11 16 11 22 11 26 11 -1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1

Device 1 Plugin 4
252 59 1 119 34
1 2 1 1 0.21 0 nan 1

Device 2 Plugin 0
629 79 0 100 100


Device 3 Plugin 8
557 79 0 100 100
1 0.39 0 0.36 1 1 0.5 1 0.5

Device 4 Plugin 14
472 51 0 100 100
1 0.321 0.31

Device 5 Plugin 13
330 83 1 382 35
1 0 0.37002

Device 7 Plugin 5
252 128 1 512 36
1 0.0121 0.16 0 0 0.92 0

Device 8 Plugin 6
403 83 0 0 0


Device 9 Plugin 14
473 119 0 100 100
1 0.34 0.31

Device 11 Plugin -1
396 224 0 0 0
1 51 Using the Matrix plugin to create a robotic melody.


11
0 0 0 1 1 0
3 3 0 2 2 0
3 3 1 2 2 1
1 1 0 5 5 0
0 0 1 7 6 0
7 6 0 5 5 1
5 5 0 8 7 0
8 7 0 4 4 0
8 7 1 9 8 0
9 8 0 3 3 1
4 4 0 3 3 0


+ 109
- 0
Examples/SpiralSynth.ssm View File

@@ -0,0 +1,109 @@
SpiralSynthModular File Ver 3
129 183 990 413 500 456 724 420
SectionList
19

Device 0 Plugin 2
144 177 0 103 22
2 0 0 0


Device 1 Plugin 4
377 215 0 101 247
1 2 -1 1 0 0 0 1

Device 2 Plugin 4
375 147 0 103 134
1 2 0 0.992771 0 0 0 1

Device 3 Plugin 4
375 79 0 103 20
1 2 1 1 0.5 0 0 1

Device 4 Plugin 6
306 81 0 0 0


Device 6 Plugin 7
519 149 0 500 124
1 0.77 0.67 0.31 1

Device 7 Plugin 13
591 148 0 495 11
1 0.6981 0.34483

Device 8 Plugin 5
446 215 0 350 248
1 0 0.9216 0.45 1 0.42 0.01

Device 9 Plugin 5
447 147 0 350 134
1 0 0.3844 0.08 1 0.5 0.01

Device 10 Plugin 5
447 80 0 351 19
1 0 0.9216 1 1.4161 0.28 0.01

Device 11 Plugin 6
249 178 0 0 0


Device 13 Plugin 5
517 213 0 604 130
1 0.9216 0.2601 0 3.0625 0.6 0.01

Device 15 Plugin 14
662 149 0 618 11
1 0.377 0.39

Device 17 Plugin 8
804 151 0 103 22
1 1 0.5 1 0.5 1 0.5 1 0.5

Device 18 Plugin 0
876 149 0 751 11


Device 19 Plugin 4
305 12 0 720 256
1 2 -3 0.0167674 0.5 0 0 1

Device 20 Plugin 1
733 150 0 496 252


Device 21 Plugin 20
234 83 0 103 22
1 0.114 0.151

Device 22 Plugin -1
367 282 0 0 0
1 63 SpiralSynth, with a moog filter. (and stuck in monophonic mode)


24
4 4 0 3 3 0
0 0 1 11 10 0
3 3 0 10 9 1
2 2 0 9 8 1
1 1 0 8 7 1
8 7 1 6 5 2
9 8 1 6 5 1
10 9 1 6 5 0
6 5 0 7 6 0
13 11 0 7 6 1
7 6 0 15 12 0
17 13 0 18 14 0
17 13 1 18 14 1
19 15 0 3 3 1
15 12 0 20 16 0
20 16 0 17 13 0
21 17 0 4 4 0
0 0 0 21 17 0
4 4 1 2 2 0
4 4 2 1 1 0
11 10 0 10 9 0
11 10 1 9 8 0
11 10 2 8 7 0
11 10 3 13 11 0


+ 205
- 0
Examples/Tutorial1-FirstThing.ssm View File

@@ -0,0 +1,205 @@
SpiralSynthModular File Ver 3
288 90 724 420 291 544 724 420
SectionList
40

Device 0 Plugin -1
371 24 0 0 0
1 36 Tutorial 1 - First principles of SSM


Device 1 Plugin -1
371 40 0 0 0
1 90 This is a comment, click somewhere in the middle of me to move me, right click to edit me.


Device 2 Plugin 0
541 115 1 493 101


Device 3 Plugin 23
216 115 1 178 106
1 0 0 1 1

Device 4 Plugin -1
230 81 0 0 0
1 31 The simplest noisemaking layout


Device 5 Plugin -1
230 81 0 0 0
1 31 The simplest noisemaking layout


Device 6 Plugin -1
254 93 0 0 0
1 41 A sinewave generating wavetable plugin...


Device 7 Plugin -1
537 93 0 0 0
1 18 ... and an output.


Device 15 Plugin -1
222 184 0 0 0
1 36 Change the frequency and wave shape.


Device 16 Plugin -1
540 176 0 0 0
1 40 This outputs the sound to the soundcard.


Device 17 Plugin -1
534 189 0 0 0
1 55 You can change the volume, or record the sound to disk.


Device 18 Plugin -1
374 133 0 0 0
1 41 This connects the output of the wavetable


Device 21 Plugin -1
374 133 0 0 0
1 41 This connects the output of the wavetable


Device 22 Plugin -1
370 144 0 0 0
1 38 To the input of the OSS output plugin.


Device 23 Plugin -1
373 114 0 0 0
1 51 Create/Delete connections by clicking on the ports.


Device 24 Plugin 2
198 286 0 158 214
2 0 0 0


Device 26 Plugin -1
258 295 0 0 0
1 9 <--------


Device 27 Plugin -1
165 65 0 0 0
1 3 (1)


Device 28 Plugin -1
166 250 0 0 0
1 3 (2)


Device 29 Plugin -1
389 288 0 0 0
1 44 To get this to work, click on this port, and


Device 30 Plugin -1
400 301 0 0 0
1 45 then on the WaveTable's one free input above.


Device 31 Plugin -1
266 264 0 0 0
1 44 Controlling the sound with MIDI/PC keyboard.


Device 32 Plugin -1
389 337 0 0 0
1 50 To change the pitch of the tone, press keys in the


Device 35 Plugin -1
389 362 0 0 0
1 51 to have midi, just bash those black and white keys.


Device 37 Plugin -1
396 226 0 0 0
1 103 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Device 38 Plugin 5
401 470 1 313 235
1 0.0529 0.8281 0 0 0.5 0.01

Device 39 Plugin -1
386 394 0 0 0
1 103 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Device 40 Plugin -1
168 421 0 0 0
1 3 (3)


Device 41 Plugin -1
248 435 0 0 0
1 36 Using an envelope to shape the sound


Device 42 Plugin -1
242 491 0 0 0
1 47 Connect this to the WaveTable's output ------->


Device 43 Plugin -1
270 466 0 0 0
1 33 Connect this to the second output


Device 44 Plugin -1
277 478 0 0 0
1 33 down on the Midi plugin. ------->


Device 45 Plugin -1
518 488 0 0 0
1 34 <------ Connect this to one of the


Device 46 Plugin -1
529 501 0 0 0
1 20 OSS plugin's inputs.


Device 47 Plugin -1
398 547 0 0 0
1 65 The layout will now look a little messy, but should now cause the


Device 48 Plugin -1
405 560 0 0 0
1 67 sound to appear and then slowly die away after a note is triggered.


Device 49 Plugin -1
420 573 0 0 0
1 74 Try changing the [A]ttack [D]ecay [S]ustain and [R]elease of the envelope.


Device 51 Plugin -1
325 447 0 0 0
1 73 Click on the WaveTable's output port, so the first connection is deleted.


Device 52 Plugin -1
394 532 0 0 0
1 55 Now hit a key. (In the midi plugin window if necessary)


Device 53 Plugin -1
387 349 0 0 0
1 47 main window on your PC keyboard, or if you are


1
3 3 0 2 2 0


+ 133
- 0
Examples/Tutorial2-Audio&CVs.ssm View File

@@ -0,0 +1,133 @@
SpiralSynthModular File Ver 3
288 90 724 420 292 545 724 420
SectionList
25

Device 2 Plugin 0
631 196 1 539 111


Device 3 Plugin 23
236 103 1 104 120
1 0 0 1 1

Device 24 Plugin 2
171 176 0 100 100
2 0 0 0


Device 38 Plugin 5
446 190 1 374 121
1 0.0529 0.8281 0 0 0.5 0.01

Device 53 Plugin 1
312 186 0 100 100


Device 55 Plugin 1
382 103 0 100 100


Device 56 Plugin 1
512 104 0 100 100


Device 58 Plugin -1
372 -32 0 0 0
1 32 Tutorial 2 - CV's and Audio data


Device 59 Plugin -1
371 -16 0 0 0
1 107 This is a closer look at what is going on in tutorial 1. It's exactly the same design, but with some scopes


Device 60 Plugin -1
377 -2 0 0 0
1 60 to see what is beaing passed through the network of plugins.


Device 61 Plugin -1
378 88 0 0 0
1 7 Scope 1


Device 62 Plugin -1
307 170 0 0 0
1 7 Scope 2


Device 63 Plugin -1
506 89 0 0 0
1 7 Scope 3


Device 64 Plugin -1
390 21 0 0 0
1 113 All data in SSM is treated the same, anything can be plugged into anything else. However, it is important to know


Device 65 Plugin -1
199 33 0 0 0
1 32 the different uses of this data.


Device 66 Plugin -1
367 58 0 0 0
1 104 Open Scope 1, you will see the output of the WaveTable oscillator, which is used here to generate audio.


Device 67 Plugin -1
315 270 0 0 0
1 76 Now open scope 2, and press a key. What you see is the value going from zero


Device 68 Plugin -1
322 284 0 0 0
1 85 in the center, to a high value (if using a midi keyboard - the velocity of the note).


Device 69 Plugin -1
389 298 0 0 0
1 109 This data is CV, or Control Voltage data (the name comes from old synths that acually used votages to control


Device 70 Plugin -1
388 313 0 0 0
1 112 bits of the synth.) You wouldn't actually want to output this data to the speaker, but you use it to control the


Device 71 Plugin -1
168 327 0 0 0
1 14 other plugins.


Device 72 Plugin -1
395 341 0 0 0
1 115 If you open Scope 3, you'll see the amount the envelope is amplifying the WaveTable's signal, triggered by the midi


Device 73 Plugin -1
314 356 0 0 0
1 80 Look at scope 4 (the actual output), and all together they make it much clearer.


Device 74 Plugin 1
543 196 0 100 100


Device 75 Plugin -1
537 181 0 0 0
1 7 Scope 4


8
24 2 0 3 1 0
24 2 1 53 4 0
53 4 0 38 3 0
3 1 0 55 5 0
55 5 0 38 3 1
38 3 0 56 6 0
38 3 1 74 23 0
74 23 0 2 0 0


+ 129
- 0
Examples/Tutorial3-SubtractiveSynth.ssm View File

@@ -0,0 +1,129 @@
SpiralSynthModular File Ver 3
401 127 724 420 402 579 724 420
SectionList
24

Device 0 Plugin 23
263 170 1 99 99
1 3 0 1 1

Device 1 Plugin 2
175 194 0 115 69
2 0 0 0


Device 2 Plugin 5
264 238 1 335 227
1 0.0289 0.16 0.08 1.0404 0.58 0.01

Device 3 Plugin 13
379 171 1 349 100
1 0 0.37137

Device 4 Plugin 0
628 171 0 593 69


Device 6 Plugin 1
484 171 1 472 93


Device 7 Plugin -1
382 10 0 0 0
1 17 Tutorial design 2


Device 8 Plugin -1
381 26 0 0 0
1 19 A subtractive synth


Device 9 Plugin -1
170 176 0 0 0
1 15 Note in signals


Device 11 Plugin -1
260 152 0 0 0
1 15 Sound generator


Device 12 Plugin -1
263 304 0 0 0
1 43 Generates the signal to control the filter.


Device 13 Plugin -1
377 235 0 0 0
1 23 Filters the frequencies


Device 14 Plugin -1
389 249 0 0 0
1 26 from the WaveTable plugin,


Device 15 Plugin -1
401 262 0 0 0
1 32 the envelope passes the value to


Device 16 Plugin -1
420 275 0 0 0
1 43 control the cutoff frequency of the filter.


Device 17 Plugin -1
332 50 0 0 0
1 73 This synth uses what is known as subtractive synthesis to produce sounds.


Device 19 Plugin -1
333 65 0 0 0
1 81 The heart of a subtractive synths is the filter, as it is what the filter removes


Device 20 Plugin -1
236 80 0 0 0
1 32 that dictates the sound produced


Device 21 Plugin -1
348 95 0 0 0
1 81 The waveshape the oscillator uses should contain as many frequencies as possible,


Device 22 Plugin -1
348 110 0 0 0
1 86 (in this case a triangle wave) so that the filter has more of an effect on it's sound.


Device 25 Plugin 6
561 171 0 0 0


Device 28 Plugin -1
339 352 0 0 0
1 79 This is how many of the first analogue synths worked, such as the moogs - hence


Device 29 Plugin -1
223 366 0 0 0
1 32 the use of the moog filter here.


Device 30 Plugin -1
238 317 0 0 0
1 29 Triggered by keypress events.


8
1 1 0 0 0 0
1 1 1 2 2 0
2 2 0 3 3 1
0 0 0 3 3 0
3 3 0 6 5 0
6 5 0 25 20 0
25 20 0 4 4 0
25 20 1 4 4 1


+ 110
- 0
Examples/Tutorial4-AdditiveSynth.ssm View File

@@ -0,0 +1,110 @@
SpiralSynthModular File Ver 3
401 127 724 420 402 579 724 420
SectionList
20

Device 0 Plugin 1
495 175 1 477 128


Device 1 Plugin 0
629 174 0 100 100


Device 2 Plugin 6
562 175 0 0 0


Device 3 Plugin 23
219 175 1 95 14
1 0 2 0.421244 1

Device 4 Plugin 23
357 175 1 90 259
1 0 -3 1 1

Device 5 Plugin 5
289 165 1 143 134
1 0 0.3249 0.96 1 1 0.01

Device 6 Plugin 5
426 165 1 328 136
1 0.0289 0.4624 0.26 1 0.5 0.01

Device 7 Plugin 2
149 175 0 100 100
2 0 0 0


Device 8 Plugin 6
200 93 0 0 0


Device 9 Plugin -1
362 11 0 0 0
1 31 Tutorial 3 - Additive Synthesis


Device 10 Plugin -1
362 30 0 0 0
1 94 Additive synthesis works on the principle of building up sounds by combining simpler elements.


Device 11 Plugin -1
357 44 0 0 0
1 95 In this case, two oscillators are used, one modulating the pitch of the other. This is known as


Device 14 Plugin -1
284 241 0 0 0
1 10 Envelope 1


Device 15 Plugin -1
422 242 0 0 0
1 10 Envelope 2


Device 16 Plugin -1
347 324 0 0 0
1 80 Envelope 1 controls the amount of modulation that the second ocillator recieves,


Device 17 Plugin -1
312 338 0 0 0
1 60 The second envelope shapes the amplitude of the final sound.


Device 18 Plugin -1
212 58 0 0 0
1 28 frequency modulation, or FM.


Device 19 Plugin -1
337 72 0 0 0
1 84 The first digital synths used this technique, such as the DX range of Yamaha synths.


Device 22 Plugin -1
216 246 0 0 0
1 12 Oscillator 1


Device 23 Plugin -1
352 243 0 0 0
1 12 Oscillator 2


11
2 2 0 1 1 0
2 2 1 1 1 1
0 0 0 2 2 0
3 3 0 5 5 1
4 4 0 6 6 1
6 6 1 0 0 0
7 7 1 8 8 0
8 8 1 5 5 0
8 8 0 6 6 0
7 7 0 3 3 0
5 5 1 4 4 0


+ 99
- 0
Examples/Tutorial5-Matrix&Sampler.ssm View File

@@ -0,0 +1,99 @@
SpiralSynthModular File Ver 3
225 58 903 467 306 558 724 420
SectionList
12

Device 1 Plugin 0
556 127 0 100 100


Device 2 Plugin 18
230 98 1 86 49
2 0 0.127474 17 1 0
32 5.4 0
0 0 2 0 4 0 6 0 8 0 10 0 12 0 14 0 16 0 18 0 20 0 22 0 24 0 26 0 28 0 30 0 4 1 12 1 20 1 28 1 0 2 8 2 16 2 24 2 -1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1

Device 3 Plugin 16
316 97 1 634 10
2 1 1 4 None 0
1 1 4 None 1
1 1 4 None 2
1 1 4 None 3
1 1 4 None 4
1 1 4 None 5
1 1 4 None 6
1 1 4 None 7


Device 4 Plugin 6
481 128 0 0 0


Device 5 Plugin -1
358 21 0 0 0
1 31 Tutorial 4 - Matrix and Sampler


Device 6 Plugin -1
364 36 0 0 0
1 99 This design won't produce sound by itself, you'll have to load some samples into the sampler first.


Device 7 Plugin -1
342 50 0 0 0
1 83 Open the sampler plugin window and load up samples (wav format) from your hardrive.


Device 8 Plugin -1
375 65 0 0 0
1 105 Hihat for the first sample, kickdrum and snare for the others (not that it really matters what they are).


Device 9 Plugin -1
386 311 0 0 0
1 104 This represents a very common combination of plugins in ssm, the matrix and sampler. This design is used


Device 10 Plugin -1
361 325 0 0 0
1 92 mainly creating drum loops. Open the matrix and change the trigger notes to change the beat.


Device 11 Plugin -1
395 339 0 0 0
1 108 If you move your mouse over the two columns of ports on the matrix and sampler, you'll see that the triggers


Device 12 Plugin -1
256 353 0 0 0
1 49 are connected up to fire the samples off. Simple!


11
4 3 0 1 0 0
4 3 1 1 0 1
3 2 0 4 3 0
2 1 2 3 2 1
2 1 3 3 2 3
2 1 4 3 2 5
2 1 5 3 2 7
2 1 6 3 2 9
2 1 7 3 2 11
2 1 8 3 2 13
2 1 9 3 2 15


+ 101
- 0
Examples/Tutorial6-Sequencer.ssm View File

@@ -0,0 +1,101 @@
SpiralSynthModular File Ver 3
291 68 724 461 289 564 724 420
SectionList
15

Device 0 Plugin 23
300 144 0 100 100
1 3 0 1 1

Device 1 Plugin 2
152 170 0 100 100
2 0 0 0


Device 2 Plugin 5
299 208 0 100 100
1 0.0529 0.8281 0.49 0.3844 0.5 0.01

Device 3 Plugin 13
367 153 1 350 26
1 0 0.30583

Device 4 Plugin 0
628 151 0 100 100


Device 6 Plugin 1
498 151 1 105 19


Device 25 Plugin 6
563 151 0 0 0


Device 31 Plugin 14
432 152 1 491 28
1 0.321 0.56

Device 32 Plugin 17
222 162 1 107 147
2 1.73101 8.82 1 1 0 0 EventMap 1 2 0 10 50 1 8.82 86 0 100 8 19 5.48 63 0.1 1 5.96 66 0.1 1 6.4 70 0.14 1 6.92 63 0.14 1 7.46 66 0.14 1 7.94 70 0.2 1 0.1 63 0.14 1 0.46 66 0.1 1 0.86 70 0.1 1 1.5 63 0.2 1 2.14 66 0.14 1 2.58 70 0.2 1 3.74 63 0.1 1 4.02 66 0.14 1 4.46 70 0.14 1 8.34 39 0.2 1 1.24 39 0.14 1 3 46 0.3 1 4.86 42 0.2 1
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0

Device 33 Plugin -1
357 33 0 0 0
1 32 Tutorial 5 - Using the sequencer


Device 34 Plugin -1
368 58 0 0 0
1 96 This is the same synth design as in tutorial 2, but with a sequencer controlling it's behavoiur.


Device 35 Plugin -1
364 72 0 0 0
1 93 (and some echo) This sequencer is quite different to the matrix, in that it is much better at


Device 36 Plugin -1
374 86 0 0 0
1 96 playing back melodies. The sequencer also records input, so keys you press while the midi plugin


Device 37 Plugin -1
358 100 0 0 0
1 89 is connected, will be played back. Open up the Sequencer plugin and scroll the piano roll


Device 38 Plugin -1
363 113 0 0 0
1 87 down, you should see the events. These can be moved, deleted or resized with the mouse.


11
2 2 0 3 3 1
0 0 0 3 3 0
6 5 0 25 6 0
25 6 0 4 4 0
25 6 1 4 4 1
3 3 0 31 7 0
31 7 0 6 5 0
1 1 0 32 8 2
1 1 1 32 8 3
32 8 0 0 0 0
32 8 1 2 2 0


+ 125
- 0
Examples/Tutorial7-LADSPA.ssm View File

@@ -0,0 +1,125 @@
SpiralSynthModular File Ver 3
291 68 724 461 289 564 724 420
SectionList
19

Device 0 Plugin 23
279 186 1 100 100
1 3 1 1 1

Device 1 Plugin 2
160 215 0 100 100
2 0 0 0


Device 2 Plugin 5
280 251 1 481 220
1 0.0036 0.3844 0 0.1156 0.5 0.01

Device 3 Plugin 13
347 187 1 350 100
1 0.3208 0.26683

Device 4 Plugin 0
638 187 0 100 100


Device 25 Plugin 6
487 157 0 0 0


Device 31 Plugin 6
212 144 0 0 0


Device 32 Plugin 5
413 144 1 482 101
1 0 0.0784 1 0.2601 0.43 0.01

Device 33 Plugin 22
571 187 0 415 148
2 0.714 /usr/local/lib/ladspa/cmt.so freeverb3 8 -1 -1 -1 0 0 0 0 0 1 1 1 1 1 1 1 1

Device 34 Plugin 3
435 245 1 95 215
3 6 -0.06 0.78 -0.52 0.5 0.22 0.82 1
6
6
Freeze -1 1 0.53
4
Room -1 1 0.11
4
Damp -1 1 0.76
3
Wet -1 1 0.25
3
Dry -1 1 0.39
5
Width -1 1 0.09


Device 35 Plugin -1
374 13 0 0 0
1 33 Tutorial 6 - Using LADSPA Plugins


Device 36 Plugin -1
375 29 0 0 0
1 71 If you have LADSPA installed, the plugins should be fully connected up.


Device 37 Plugin -1
377 43 0 0 0
1 36 If not, then this won't work at all.


Device 38 Plugin -1
566 171 0 0 0
1 10 (FreeVerb)


Device 40 Plugin -1
370 72 0 0 0
1 82 This shows you how you can set up the CV slider plugin to control a LADSPA plugin.


Device 41 Plugin -1
380 86 0 0 0
1 91 It's handy to name the sliders according to what they are controlling. Also important is to


Device 42 Plugin -1
385 99 0 0 0
1 92 tweak the input scales so the plugin behaves correctly. Most plugins set these automatically


Device 43 Plugin -1
277 113 0 0 0
1 45 as this one does, but you have to be careful.


Device 44 Plugin -1
387 356 0 0 0
1 112 Open the LADSPA plugin to load other plugins. When a new plugin is selected, all the connections will be broken.


18
1 1 0 0 0 0
2 2 0 3 3 1
0 0 0 3 3 0
1 1 1 31 6 0
3 3 0 32 7 1
31 6 0 32 7 0
31 6 1 2 2 0
34 9 0 33 8 2
34 9 1 33 8 3
34 9 2 33 8 4
34 9 3 33 8 5
34 9 4 33 8 6
34 9 5 33 8 7
33 8 0 4 4 0
33 8 1 4 4 1
25 5 0 33 8 0
25 5 1 33 8 1
32 7 1 25 5 0


+ 324
- 0
Examples/Tutorial8-AdvSequencing.ssm View File

@@ -0,0 +1,324 @@
SpiralSynthModular File Ver 3
24 32 1244 544 19 534 1248 481
SectionList
48

Device 3 Plugin 0
1092 304 0 265 123


Device 5 Plugin 5
792 123 1 763 66
1 0 0.0529 1 0.16 0.5 0.01

Device 7 Plugin 8
1024 304 0 265 123
1 1.52 0.5 1.01 0.5 1.3 0.5 1 0.5

Device 9 Plugin 14
927 124 1 1031 63
1 0.321 0.5

Device 12 Plugin 13
859 124 1 907 65
1 0.2642 0.21074

Device 13 Plugin 18
445 124 0 265 123
2 0 0.0976591 6 1 0
32 6 5
16 0 20 0 21 0 24 0 28 0 0 2 1 2 4 2 5 2 8 2 12 2 17 5 19 5 27 5 29 5 18 12 22 12 23 12 26 12 30 12 2 14 3 14 6 14 10 14 14 14 -1 32 6 5
20 0 22 0 24 0 26 0 28 0 30 0 0 2 2 2 4 2 6 2 8 2 10 2 12 2 14 2 16 2 18 2 17 7 25 12 7 14 15 14 -1 32 6 5
6 0 8 0 10 0 0 2 30 2 2 4 28 4 18 5 4 7 26 7 12 14 16 14 20 14 22 14 24 14 -1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1

Device 17 Plugin 6
589 123 0 0 0


Device 20 Plugin 23
654 95 1 513 14
1 2 0 1.01382 1

Device 21 Plugin 23
653 164 1 513 129
1 2 0 0.992295 1

Device 22 Plugin 7
724 124 0 265 123
1 1 1 1 1

Device 23 Plugin 21
366 183 0 265 123
1 8 0 1 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 2 0 -1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 -1 0 0 0 0 0 1 0 -1 0 0 0 0 0 2 0 -1 0 0 0 0 0

Device 24 Plugin 18
294 174 0 265 123
2 0 0.0976591 6 1 0
32 6 0
31 0 -1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1

Device 25 Plugin 23
591 298 1 95 220
1 2 1 1.00361 1

Device 26 Plugin 23
590 362 1 95 333
1 2 -1 1 1

Device 27 Plugin 6
519 325 0 0 0


Device 28 Plugin 7
664 325 0 265 123
1 1 1 1 1

Device 30 Plugin 13
832 309 1 489 278
1 0.4528 0.35798

Device 31 Plugin 5
732 325 1 343 278
1 0 0 1 0.2025 0.5 0.01

Device 32 Plugin 18
450 325 0 265 123
2 1 0.0860509 6 1 0
32 6 3
4 0 8 0 9 0 10 0 14 0 22 0 23 0 24 0 25 0 26 0 0 2 1 2 2 2 12 2 16 2 17 2 20 2 18 5 30 9 -1 32 6 3
14 0 22 0 23 0 24 0 25 0 26 0 2 2 6 2 10 2 16 2 17 2 20 2 30 2 18 5 -1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1 32 1 0
-1

Device 33 Plugin 23
732 391 0 265 123
1 0 0 0.00163394 1

Device 34 Plugin 9
802 391 0 265 123
1 0.2642 0

Device 35 Plugin 23
755 497 1 762 241
1 2 0 1 1

Device 36 Plugin 20
689 497 0 265 123
1 0.16 0.17

Device 37 Plugin 17
617 516 0 149 229
2 7.05675 16.45 1 0 0 0 EventMap 1 2 0 10 50 1 16.45 352 0 100 8 10 4.04 74 0.2 1 5.3 77 0.4 1 6.86 79 -6.86 1 0.74 77 0.14 1 1.12 74 0.14 1 2.24 72 0.2 1 3 74 0.2 1 8.92 60 0.2 1 11.8 65 0.3 1 12.92 62 0.14 1
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0
EventMap 1 1 0 10 100 1 2 0 0 100 8 0

Device 38 Plugin 2
546 539 0 265 123
2 0 0 0


Device 39 Plugin 5
824 492 1 1015 352
1 0.0784 0.0289 0.66 1.2769 0.28 0.01

Device 40 Plugin 11
893 506 1 839 355
1 1893.56 3.7 0 0

Device 41 Plugin -1
637 22 0 0 0
1 32 Tutorial 8 - Advanced Sequencing


Device 42 Plugin -1
638 37 0 0 0
1 59 This design shows you how to use sequencers to build songs.


Device 43 Plugin -1
633 47 0 0 0
1 59 Once the oscillators have settled onto the right frequency,


Device 44 Plugin -1
641 58 0 0 0
1 49 you should hear three patterns, playing together.


Device 45 Plugin -1
302 123 0 0 0
1 45 The SeqSelector is the main controlling part.


Device 46 Plugin -1
286 138 0 0 0
1 51 It tells the sequencers what part to play and when.


Device 47 Plugin -1
298 375 0 0 0
1 35 This matrix acts as the main clock.


Device 48 Plugin -1
306 386 0 0 0
1 39 It's one event triggers the seqselector


Device 49 Plugin -1
305 397 0 0 0
1 22 to move on a pattern.


Device 50 Plugin -1
690 634 0 0 0
1 39 This part was recorded from midi notes.


Device 51 Plugin -1
695 646 0 0 0
1 83 You can see them, if you open the Sequencer plugin window, and scroll around a bit.


Device 52 Plugin -1
728 257 0 0 0
1 92 Open the SeqSelector to see the patterns it's sending to the two matrixes and the sequencer.


Device 53 Plugin -1
698 656 0 0 0
1 77 The midi plugin is still connected, so it'll still record any incoming notes.


Device 55 Plugin -1
637 69 0 0 0
1 54 (The sequencer also takes some time to get in rhythm.)


Device 56 Plugin 7
519 112 0 265 123
1 0.46 1 1 1

Device 57 Plugin 23
318 51 1 264 13
1 0 -1 1.3716 1

Device 58 Plugin 9
453 51 0 265 123
1 -0.0377 0

Device 59 Plugin 9
385 51 0 265 123
1 0.0377 0

Device 60 Plugin 5
824 559 1 1013 238
1 0.1156 0.2025 1 1 0.23 0.01

Device 61 Plugin 6
691 561 0 0 0


Device 62 Plugin 14
960 447 0 265 123
1 0.415 0.58

43
7 2 0 3 0 0
7 2 1 3 0 1
9 3 0 7 2 0
13 5 1 5 1 0
17 6 0 20 7 0
17 6 1 21 8 0
21 8 0 22 9 1
20 7 0 22 9 0
24 11 1 23 10 0
23 10 0 13 5 0
23 10 1 32 18 0
32 18 0 27 14 0
27 14 0 25 12 0
27 14 1 26 13 0
25 12 0 28 15 0
26 13 0 28 15 1
32 18 1 31 17 0
28 15 0 31 17 1
31 17 1 30 16 0
30 16 0 7 2 1
33 19 0 34 20 0
34 20 0 30 16 1
36 22 0 35 21 0
38 24 0 37 23 2
38 24 1 37 23 3
37 23 0 36 22 0
23 10 2 37 23 0
35 21 0 39 25 1
39 25 1 40 26 0
22 9 0 5 1 1
5 1 1 12 4 0
12 4 0 9 3 0
58 43 0 56 41 0
13 5 0 56 41 1
56 41 0 17 6 0
57 42 0 59 44 0
59 44 0 58 43 0
37 23 1 61 46 0
61 46 0 39 25 0
61 46 1 60 45 0
60 45 0 40 26 1
40 26 0 62 47 0
62 47 0 7 2 2


BIN
GUI/SSM.xcf View File


+ 1961
- 0
GUI/SSM.xpm
File diff suppressed because it is too large
View File


+ 552
- 0
GUI/SpiralIcon.xpm View File

@@ -0,0 +1,552 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"64 64 485 2",
" c None",
". c #393354",
"+ c #292247",
"@ c #221A41",
"# c #3B3556",
"$ c #352E50",
"% c #2E274B",
"& c #3A3355",
"* c #2F274B",
"= c #706C84",
"- c #928FA2",
"; c #C2C0CB",
"> c #FFFFFF",
", c #B0ACBA",
"' c #322B4E",
") c #3F395A",
"! c #2F284D",
"~ c #EFEEF1",
"{ c #8B879B",
"] c #352E51",
"^ c #757087",
"/ c #CBCAD3",
"( c #DCDAE0",
"_ c #2F284C",
": c #767189",
"< c #908C9F",
"[ c #2D264A",
"} c #726E85",
"| c #332C4F",
"1 c #393255",
"2 c #A9A6B5",
"3 c #251D43",
"4 c #261D47",
"5 c #D0CDD6",
"6 c #362F52",
"7 c #1E163D",
"8 c #21193E",
"9 c #030404",
"0 c #373636",
"a c #403F49",
"b c #626160",
"c c #383151",
"d c #C8C5CE",
"e c #1D153D",
"f c #231C42",
"g c #000000",
"h c #B0B1B0",
"i c #C1C1C1",
"j c #F3F3F0",
"k c #362D56",
"l c #40395A",
"m c #3B3454",
"n c #241E43",
"o c #E5E3E7",
"p c #DCDBE3",
"q c #C6C6C6",
"r c #FBFBFB",
"s c #444444",
"t c #5D557D",
"u c #332C50",
"v c #A6A2B2",
"w c #A2A0AE",
"x c #352F52",
"y c #B7B6C3",
"z c #252043",
"A c #3B3458",
"B c #9E99B2",
"C c #515050",
"D c #DFE0DF",
"E c #403A5B",
"F c #504B69",
"G c #ADADAD",
"H c #D2D2D2",
"I c #645B84",
"J c #9792A7",
"K c #ECEBEE",
"L c #3F3758",
"M c #322B4F",
"N c #C7C6D0",
"O c #1D143E",
"P c #8B85A2",
"Q c #0C0B1A",
"R c #342C4F",
"S c #4A4363",
"T c #262044",
"U c #AFAFAF",
"V c #191919",
"W c #040404",
"X c #151612",
"Y c #A8A3B4",
"Z c #989A93",
"` c #BABABA",
" . c #373053",
".. c #160E36",
"+. c #575757",
"@. c #ACACAC",
"#. c #333333",
"$. c #736E86",
"%. c #CDCDCD",
"&. c #020202",
"*. c #9E9CAC",
"=. c #120A32",
"-. c #B0B0B0",
";. c #C8C8C8",
">. c #8D8D8D",
",. c #BDBAC6",
"'. c #3E3959",
"). c #2E264C",
"!. c #DEDEE3",
"~. c #C3C3C3",
"{. c #919191",
"]. c #9895A7",
"^. c #0E062F",
"/. c #9F9F9F",
"(. c #D1D1D1",
"_. c #626262",
":. c #3C3556",
"<. c #271F45",
"[. c #31294D",
"}. c #30294D",
"|. c #383154",
"1. c #3E3859",
"2. c #9F9CAD",
"3. c #8F8F8F",
"4. c #FFFFFB",
"5. c #B7B4C5",
"6. c #150C36",
"7. c #EBEBED",
"8. c #2F2F2F",
"9. c #F4F4F4",
"0. c #2D2D2D",
"a. c #373736",
"b. c #9590A3",
"c. c #2C2449",
"d. c #6E6981",
"e. c #938FA1",
"f. c #848196",
"g. c #C7C7C7",
"h. c #B9B7C3",
"i. c #30284E",
"j. c #2D2F26",
"k. c #989997",
"l. c #C0BDCB",
"m. c #322A4D",
"n. c #292246",
"o. c #251E43",
"p. c #706A82",
"q. c #B8B5C1",
"r. c #CFCED6",
"s. c #726E86",
"t. c #E3E3E3",
"u. c #4B4B4B",
"v. c #09070F",
"w. c #40395C",
"x. c #342D51",
"y. c #352D53",
"z. c #645C83",
"A. c #696188",
"B. c #383057",
"C. c #171425",
"D. c #DBDDD6",
"E. c #9B97AA",
"F. c #1F183F",
"G. c #261F45",
"H. c #221A42",
"I. c #F3F4F5",
"J. c #2E274A",
"K. c #EEEDEF",
"L. c #010101",
"M. c #433F56",
"N. c #5E587E",
"O. c #80807F",
"P. c #211941",
"Q. c #170F37",
"R. c #0F072F",
"S. c #30284D",
"T. c #E0DFE1",
"U. c #827C9A",
"V. c #BEBDC7",
"W. c #30294C",
"X. c #66607A",
"Y. c #DDDDDD",
"Z. c #CFCFCF",
"`. c #C0C0C0",
" + c #BFBFBF",
".+ c #BEBEBE",
"++ c #CECECE",
"@+ c #5E5F54",
"#+ c #757770",
"$+ c #373835",
"%+ c #222222",
"&+ c #202020",
"*+ c #1D1D1D",
"=+ c #171717",
"-+ c #9E9E9F",
";+ c #B6B3C0",
">+ c #3D3658",
",+ c #9492A4",
"'+ c #0F1013",
")+ c #0C0A0F",
"!+ c #13130F",
"~+ c #635B82",
"{+ c #161422",
"]+ c #D3D0DC",
"^+ c #BDBAC4",
"/+ c #332D4F",
"(+ c #C5C2CC",
"_+ c #7F7E86",
":+ c #3D3758",
"<+ c #3B3456",
"[+ c #000004",
"}+ c #D9D7E3",
"|+ c #959591",
"1+ c #050505",
"2+ c #342D50",
"3+ c #241C43",
"4+ c #2E264A",
"5+ c #716A8D",
"6+ c #383153",
"7+ c #40385E",
"8+ c #969696",
"9+ c #090909",
"0+ c #656562",
"a+ c #373051",
"b+ c #2B2548",
"c+ c #514871",
"d+ c #070709",
"e+ c #211940",
"f+ c #ABA8B5",
"g+ c #E9E9E8",
"h+ c #C0BBCF",
"i+ c #100D21",
"j+ c #606161",
"k+ c #E9EAE4",
"l+ c #362E53",
"m+ c #7C788D",
"n+ c #363052",
"o+ c #CACAD1",
"p+ c #F8F7FE",
"q+ c #949496",
"r+ c #E4E4E4",
"s+ c #F1F1F1",
"t+ c #373052",
"u+ c #AFACB9",
"v+ c #3E3E40",
"w+ c #3D3D3D",
"x+ c #565656",
"y+ c #8F8F90",
"z+ c #BDB9C1",
"A+ c #40385B",
"B+ c #2F284B",
"C+ c #D0D0D0",
"D+ c #CECDD5",
"E+ c #332D50",
"F+ c #C4C3CD",
"G+ c #BDBDBD",
"H+ c #EAEAEA",
"I+ c #2D2A3E",
"J+ c #312A4E",
"K+ c #2A243B",
"L+ c #4B4757",
"M+ c #1A1139",
"N+ c #D2CFD7",
"O+ c #ADADAC",
"P+ c #02000C",
"Q+ c #60597D",
"R+ c #312A4F",
"S+ c #68627F",
"T+ c #B3B3B6",
"U+ c #020203",
"V+ c #373153",
"W+ c #BCBAC5",
"X+ c #FDFDFD",
"Y+ c #EFEFEF",
"Z+ c #080808",
"`+ c #686186",
" @ c #C5C7BF",
".@ c #4D4D51",
"+@ c #0A0814",
"@@ c #7D7C7F",
"#@ c #69657F",
"$@ c #393254",
"%@ c #CCCCD3",
"&@ c #3C3658",
"*@ c #3E3758",
"=@ c #6D6881",
"-@ c #040405",
";@ c #645C81",
">@ c #2A2248",
",@ c #424047",
"'@ c #4B4C4B",
")@ c #282146",
"!@ c #EDECEF",
"~@ c #6C6882",
"{@ c #878787",
"]@ c #625C7D",
"^@ c #F0EFF1",
"/@ c #D6D5DC",
"(@ c #322B4D",
"_@ c #2D274B",
":@ c #362F53",
"<@ c #231B42",
"[@ c #1E183E",
"}@ c #31294C",
"|@ c #3F3859",
"1@ c #928DA3",
"2@ c #7C798F",
"3@ c #312A4D",
"4@ c #21193F",
"5@ c #535353",
"6@ c #EEEDF0",
"7@ c #676085",
"8@ c #252239",
"9@ c #BFC0BF",
"0@ c #A29FB0",
"a@ c #292146",
"b@ c #FEFFFF",
"c@ c #3B3B3B",
"d@ c #F3F3F3",
"e@ c #443E5E",
"f@ c #1A133A",
"g@ c #322A50",
"h@ c #655D82",
"i@ c #6A628A",
"j@ c #EDEBEE",
"k@ c #362F51",
"l@ c #C1BEC9",
"m@ c #F0F0F0",
"n@ c #A5A4B3",
"o@ c #2A2247",
"p@ c #2E264B",
"q@ c #151518",
"r@ c #322D40",
"s@ c #333042",
"t@ c #1D182A",
"u@ c #888495",
"v@ c #9F9BB1",
"w@ c #4A4557",
"x@ c #151025",
"y@ c #373738",
"z@ c #CBC8D2",
"A@ c #989898",
"B@ c #261E44",
"C@ c #2B2348",
"D@ c #D9D8DE",
"E@ c #FBFBFA",
"F@ c #A7A8A3",
"G@ c #262723",
"H@ c #C3C1CB",
"I@ c #E8E7EA",
"J@ c #383053",
"K@ c #C3C3C1",
"L@ c #221C41",
"M@ c #181039",
"N@ c #121212",
"O@ c #F7F6FA",
"P@ c #E1E0E6",
"Q@ c #DFDEE5",
"R@ c #BCB8CB",
"S@ c #262434",
"T@ c #292929",
"U@ c #C1BECA",
"V@ c #F0F0F2",
"W@ c #716A84",
"X@ c #827D94",
"Y@ c #B4B1BE",
"Z@ c #292349",
"`@ c #534B73",
" # c #241D42",
".# c #3E3759",
"+# c #797979",
"@# c #F9F9F9",
"## c #CCC9D7",
"$# c #4A4853",
"%# c #A19EAE",
"&# c #918EA1",
"*# c #261E45",
"=# c #DAD7E4",
"-# c #B3B4B4",
";# c #A5A5A5",
"># c #AAA8B5",
",# c #A7A6B5",
"'# c #B9B9B9",
")# c #020009",
"!# c #9998A1",
"~# c #D5D4DC",
"{# c #3A3354",
"]# c #2E274C",
"^# c #2A2347",
"/# c #E7E5E9",
"(# c #403C50",
"_# c #3A3A3A",
":# c #20183F",
"<# c #463F5F",
"[# c #231B41",
"}# c #525252",
"|# c #7B7983",
"1# c #AEADB1",
"2# c #332C4D",
"3# c #FAFAFB",
"4# c #FAFAFA",
"5# c #8A869A",
"6# c #453E5F",
"7# c #343434",
"8# c #F1F0F6",
"9# c #5E5773",
"0# c #3C3557",
"a# c #F6F5F8",
"b# c #FDFDFF",
"c# c #332B4E",
"d# c #494362",
"e# c #2D2549",
"f# c #B1B1B1",
"g# c #353535",
"h# c #010202",
"i# c #B8B5C2",
"j# c #D5D4DA",
"k# c #2B2448",
"l# c #B4B4B4",
"m# c #2B2B2B",
"n# c #646566",
"o# c #0D0E0E",
"p# c #FCFBFD",
"q# c #403959",
"r# c #837E92",
"s# c #B4B4B5",
"t# c #070707",
"u# c #2C293F",
"v# c #FBFBFF",
"w# c #5F5A75",
"x# c #CAC7D1",
"y# c #46405F",
"z# c #1F173D",
"A# c #BABABC",
"B# c #060606",
"C# c #020100",
"D# c #676088",
"E# c #292148",
"F# c #EFEEF0",
"G# c #2E284B",
"H# c #7B768D",
"I# c #AFACBB",
"J# c #707070",
"K# c #BABBBA",
"L# c #3A3A37",
"M# c #60577E",
"N# c #E1DFE4",
"O# c #F2F2F5",
"P# c #FAFAFD",
"Q# c #342C53",
"R# c #3C3657",
"S# c #CFCED5",
"T# c #282045",
"U# c #D2D0D2",
"V# c #6F6F72",
"W# c #2C2549",
"X# c #DADAE2",
"Y# c #271F44",
"Z# c #79748B",
"`# c #4E456F",
" $ c #554C75",
".$ c #6E6983",
"+$ c #F2F1F3",
"@$ c #C3C2CC",
"#$ c #231C41",
"$$ c #878297",
"%$ c #E0DFE5",
"&$ c #817B92",
"*$ c #2A2348",
"=$ c #68627D",
"-$ c #8B879A",
";$ c #C5C4CD",
">$ c #BEBCC7",
",$ c #F8F8F9",
"'$ c #ABA9B7",
")$ c #CDCAD3",
"!$ c #66617B",
"~$ c #2D2649",
"{$ c #827E93",
"]$ c #3A3254",
"^$ c #BEBCC8",
"/$ c #CDCAD4",
"($ c #CECBD5",
"_$ c #9D9AAA",
":$ c #261F44",
" ",
" ",
" ",
" ",
" ",
" . + @ + # $ % & ",
" * = - ; > > > , ' ) ! > ~ { & ",
" ] ^ / > > ( _ : > > > > < & [ > > > > > > } | ",
" 1 2 > > > > > 3 > > > > > 4 > > > > > > > 5 6 ",
" > > > > > > 7 8 > > > > 9 0 a b > > > > > > > > c ",
" $ d > > > > > e f > > > > g g g g h > > > > i j k l ",
" m | n > > o > > ' p > > q g g g g r > > > s g g t u v w ",
" x y > > z A B C g D > > % E F > > G g g g g > > > H g g g g I J > > K L ",
" M N > > > o O P Q g g g > > R S T > > U g g g V > > > W g g g g g X > > > > ",
" | Y > > > > > > Z g g g g ` > ] ...> > U g g g +.> > @.g g g g g g #.> > > > v ",
" $.> > > > > %.&.g g g g g g > > *.=.> > -.g g g ;.> > g g &.g g g >.> > > > ,.'. ",
" ).!.> > > > > ~.g g g g g g g {.> ].^.> > /.g g g (.> %.g g g g g _.> > > :.<.[.}.|.1. ",
" u 2.> > > > > > > > 3.g g g g g g 4.5.6.7.> 8.g g g 9.> 0.g g g g a.> > b.@ _ % c.d.> e. ",
" |.f.> > > > > > > > > > g.g g g g g g h.i.> > j.g g g > > g g g g k.> l.m.n.o.p.q.> > > r.' ",
" s.> > > > > > > > > > > > t.u.g g g v. w.x.y. z.A. B. C.g g D.> E.F.G.H.I.> > > > > > n. ",
" J.K.> > > > > > > > > > > > > > > L.g M. N.O. P.Q.R.> > > > > > > > > S. ",
" .> > > > > > > > > > > > > > > > > T. U.> > > > > > > > > > V.W. ",
" X.> > > > > > Y.Z.`.i +.+++> > > > @+#+$+%+&+*+=+g g -+> > ;+>+ ",
" # ,+> > > > > g g g g g g g g g '+)+!+ ~+g g g g g g g g g {+]+^+ ",
" /+(+> > > > _+g g g g g g g g g g g g g g g g g g L.g g :+ ",
" <+> > > > > [+g g g g g g g g g g g g .}+|+g g g g g 1+g g ",
" 2+3+@ 4+5+g g g g g g g g g g g g g 6+u 7+ > > > 8+g g g 9+g 0+ ",
" a+b+T n c+g g g d+g g g g g g g g g . e+f+> g+g h+i+g j+> > > > %.L.g g k+l+ ",
" > > > > > g g g g g g g g g g g m+> n+o+> > p+g g > > g g g q+> > > > > r+s+> > t+ ",
" :+u+> > > > > v+g g g g w+s x+y+z+> > > A+ B+> > > g g g > > g g g g C+> > > > > > > D+ . ",
" E+F+> > > > > G+H+> > > > > > > > > > > I+ J+> > K+g g L+> > g g g g g > > > > > > M+6+ ",
" ' N+> > > > > > > > > > > > > > > > O+g P+Q+ ' R+S+g g T+> > U+g g g g g > > > > :+ ",
" V+W+> > > > > > > > X+> > > > > Y+Z+g g g `+ @> > > .@g g g +@@@> > > #@$@ c.%@&@l ",
" *@=@> > > > > > > > > > > > > x+g g -@g g ;@ >@> > > > ,@g '@ > > > $@ )@!@> > ",
" ~@> > > > X+> > > > > > {@g g g g g g g | > > > > ]@ 2+4+B+ % ^@> > > /@(@ ",
" _@> > > X+> > > > > Z.g g g g g g g g g > :@J+ | <@[@}@|@ 1@> > > > > 2@3@ ",
" 4@> > > > > > > > 5@g g g g g g g g g t.> > 6@|. 7@8@9@> > > > > > 0@V+ ",
" a@b@> > > > > c@g g g L.g g g g g g d@> > > > e@<+ f@g@ h@i@ g g &.> > > > > > > j@] ",
" k@l@> > > > m@g g g g g g g g g g ++> > > > n@o@p@> > > q@r@s@s@t@u@v@w@x@g g g g g g y@> > > > > > > z@V+ ",
" > > > > > g g g g &.g g g g A@> > > > > B@C@D@> > E@g g g g g F@> > G@g g g g g g g g H@> > > > > > I@V+ ",
" J@> > > > > K@g g g g g g g _.> > > > > L@' M@> > > > g g g g g g > > > N@g g g g g g g g O@> > > > > > P@ .*@ ",
" 4+Q@> > > > R@S@g g g g g T@> > > > > U@2+}.> > > > > g g g g g g > > > > g g g g g g g g g > > > > > > > V@W@] ",
" |@X@> > > Y@Z@`@g g g g g > > > > > > #.#e > > > > +#g g g g L.g @#> > > ##g g g g g g g g $#> > > > > > > > %#x. ",
" 6+> > &#*#c.=#-#g g g ;#> > > > > >#t+t+,#> > > > T@g g g g L.g '#> > > > )#g g g g g g g g !#> > > > > > > > ~#<+ ",
" {#]#^#u /#> > (#g _#> > > > > > :#<#[#> > X+> > g g g g g 1+g }#> > > > |#g g g g g g g g g 1#> > > > > > > > 2# ",
" 3#> > > > > > > 4#> > > 5#V+|@6#> > > > H g g g g g g g 7#> > > > 8#g g g g g &.g g g g > > > > > > > 9#0# ",
" .a#> > b#> > > > > > > > > c#d#e#> > > > > f#g g g g g g g g#> > > > > g g g g g g g g g h#> > > > > > i#M ",
" |.j#> > > > > > > > > > > > k#d#e > > > > > l#g g g g g 1+g m#> > > > > n#g g g g g g g o#> > > > > > i#[ ",
" p#> > > > > > > > > > q#1.$@r#> > > > > s#g g g g g t#g 9+> > > > > (.g g g g g g u#v#> > > > > w#M ",
" x#> > > > > > X+> 6@W.y#z#> > > > > > A#g g g g g B#g g > > > > > > g g g g C#D# E#> > > F#G#<+ ",
" % H#> > > > > > > o@ V+I#> > > > > > J#g g g g g B#g g > > > > > > K#g g L#M# * M ",
" V+ N#> > > > Y@6 o.> > > > > > > g g g g g g L.g g > > > > > > > O#P#> Q# ",
" l R#S#> > > T# e > > > > > X+> U#V#g g g g g B#1+> > > > > > > > > > W# ",
" ' X#Y# |@Z#> > > > > > > > > > > `# $> > > > > > > > > > > > .$>+ ",
" ' +$> > > > > > > > > > @$J+#$> > > > > > > > > > > > B+ ",
" k@> > > > > > > > > > > $$|@o@> > > > > > > > > %$&$*$ ",
" =$-$;$>$,$> > > > > <+'$> > > > > > )$!$~$|@ ",
" 0#6 _ n. {$ 1. ]$^$/$($_$ :$2+ ",
" :+| 2+0# ",
" ",
" ",
" ",
" ",
" "};

+ 510
- 0
GUI/Widgets/Fl_Canvas.C View File

@@ -0,0 +1,510 @@
/* Canvas Widget
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "Fl/fl_draw.H"
#include "Fl_Canvas.h"
#include "Fl_DeviceGUI.h"
#include <iostream>
#include "../../SpiralSynthModularInfo.h"

//#define IMG_BACKGROUND

#ifdef IMG_BACKGROUND
#include <png.h>
#endif

////////////////////////////////////////////////////////////////////////

Fl_Canvas::Fl_Canvas(int x, int y, int w, int h, char *name) :
Fl_Group(x,y,w,h,name),
cb_Connection(NULL),
cb_Unconnect(NULL),
cb_AddDevice(NULL),
m_ToolMenu(false)
{
m_IncompleteWire.OutputChild=-1;
m_IncompleteWire.OutputPort=-1;
m_IncompleteWire.InputChild=-1;
m_IncompleteWire.InputPort=-1;
m_BG=NULL;
m_BGData=NULL;
#ifdef IMG_BACKGROUND
if (SpiralSynthModularInfo::BGIMG=="None") return;
FILE *fp=fopen(SpiralSynthModularInfo::BGIMG.c_str(),"rb");
if (!fp)
{
SpiralInfo::Alert("Couldn't open image ["+SpiralSynthModularInfo::BGIMG+"]");
}
else
{
png_structp png_ptr;
png_infop info_ptr;
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
info_ptr = png_create_info_struct(png_ptr);
png_init_io(png_ptr, fp);
png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
fclose(fp);
m_BGData = new char[png_ptr->rowbytes*png_ptr->height];
int p=0;
for (unsigned int row = 0; row < png_ptr->height; row++)
{
for (unsigned int i=0; i<png_ptr->rowbytes; i++)
{
m_BGData[p]=(char)info_ptr->row_pointers[row][i];
p++;
}
}
#if FL_MAJOR_VERSION == 1 && FL_MINOR_VERSION == 0
m_BG = new Fl_Image((unsigned char*)m_BGData,
(int)png_ptr->width,
(int)png_ptr->height,(int)png_ptr->rowbytes/(int)png_ptr->width);
#else
m_BG = new Fl_RGB_Image((unsigned char*)m_BGData,(int)png_ptr->width,(int)png_ptr->height);
#endif
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
}
#endif
}

Fl_Canvas::~Fl_Canvas()
{
#ifdef IMG_BACKGROUND
if (m_BGData) delete[] m_BGData;
#endif
}

void Fl_Canvas::draw()
{
Fl_Widget*const* a = array();
if (damage() & ~FL_DAMAGE_CHILD) // redraw the entire thing:
{
if (m_BG)
{
int X=0,Y=0;
while (Y<w())
{
while (X<h())
{
m_BG->draw(parent()->x()+X,parent()->y()+Y);
#if FL_MAJOR_VERSION == 1 && FL_MINOR_VERSION == 0
X+=m_BG->w;
#else
X+=m_BG->w();
#endif
}
#if FL_MAJOR_VERSION == 1 && FL_MINOR_VERSION == 0
Y+=m_BG->h;
#else
Y+=m_BG->h();
#endif
X=0;
}
}
else
{
draw_box();
}
for (int i=children(); i--;)
{
Fl_Widget& o = **a++;
draw_child(o);
draw_outside_label(o);
}
DrawWires();
}
else // only redraw the children that need it:
{
for (int i=children(); i--;) update_child(**a++);
}
if (m_ToolMenu)
{
int Pos=0,X=0,Y=0,textw,texth;
int DegreesPerItem=30;
float conv=3.151/180.0f;
bool selected=false;
m_Selected=-1;
fl_font(fl_font(),10);
for (vector< pair<string,int> >::iterator i=m_PluginNameList.begin();
i!=m_PluginNameList.end(); ++i)
{
textw=0;
fl_font(fl_font(),10);
fl_measure(i->first.c_str(), textw, texth);
X=m_x-(textw/2);
Y=m_y-(m_PluginNameList.size()*5)+Pos*10;
if (Fl::event_y()>Y-10 && Fl::event_y()<Y &&
Fl::event_x()>X && Fl::event_x()<X+textw)
{
fl_font(fl_font(),15);
fl_measure(i->first.c_str(), textw, texth);
X=m_x-(textw/2);
m_Selected=i->second;
selected=true;
}
else selected=false;
fl_color(FL_GRAY);
fl_color(FL_WHITE);
fl_draw(i->first.c_str(),X-1,Y+1);

if (selected) fl_color(FL_BLUE);
else fl_color(FL_BLACK);

fl_draw(i->first.c_str(),X,Y);
Pos+=1;
}
}
}

void Fl_Canvas::DrawWires()
{
for(vector<CanvasWire>::iterator i=m_WireVec.begin();
i!=m_WireVec.end(); i++)
{
if (i->OutputChild>children() || i->InputChild>children())
{
cerr<<"wire output child = "<<i->OutputChild<<endl;
cerr<<"wire input child = "<<i->InputChild<<endl;
SpiralInfo::Alert("Wire drawing mismatch!");
return;
}
Fl_DeviceGUI* SourceDevice = (Fl_DeviceGUI*)(child(i->OutputChild));
Fl_DeviceGUI* DestDevice = (Fl_DeviceGUI*)(child(i->InputChild));
if (!SourceDevice || !DestDevice)
{
SpiralInfo::Alert("Cant find source or dest device while drawing wires");
return;
}
//=============================
// wire colour stuff - dan b.
//=============================
Fl_Color col = (Fl_Color) WIRE_COL0;
switch (SourceDevice->GetPortType(i->OutputPort+SourceDevice->GetInfo()->NumInputs)) {
case 0: col = (Fl_Color) WIRE_COL0;
break;
case 1: col = (Fl_Color) WIRE_COL1;
break;
case 2: col = (Fl_Color) WIRE_COL2;
break;
case 3: col = (Fl_Color) WIRE_COL3;
break;
case 4: col = (Fl_Color) WIRE_COL4;
break;
default: col = (Fl_Color) WIRE_COL0;
}
fl_color(col);
//=============================

fl_line(SourceDevice->GetPortX(i->OutputPort+SourceDevice->GetInfo()->NumInputs),
SourceDevice->GetPortY(i->OutputPort+SourceDevice->GetInfo()->NumInputs),
DestDevice->GetPortX(i->InputPort),
DestDevice->GetPortY(i->InputPort));
}
}
int Fl_Canvas::handle(int event)
{
if (Fl_Group::handle(event)) return 1;

if (Fl::event_button()==3)
{
if (event==FL_PUSH)
{
m_ToolMenu=true;
m_x=Fl::event_x();
m_y=Fl::event_y();
redraw();
}
if (event==FL_DRAG) redraw();
if (event==FL_RELEASE && Fl::event_button()==3)
{
m_ToolMenu=false;
if (m_Selected!=-1 && cb_AddDevice)
{
int args[3];
args[0]=m_Selected;
args[1]=m_x;
args[2]=m_y;
cb_AddDevice(this,args);
}
redraw();
}
}
return 1;
}
void Fl_Canvas::PortClicked(Fl_DeviceGUI* Device, int Type, int Port, bool Value)
{
// find out which child this comes from.
int ChildNum=-1;
for(int n=0; n<children(); n++)
{
if(child(n)==Device)
{
ChildNum=n;
}
}
if (ChildNum==-1)
{
SpiralInfo::Alert("Port clicked callback can't find source child.");
return;
}
if(Value) // Turned on the port
{
if(m_IncompleteWire.InputChild==-1 || m_IncompleteWire.OutputChild==-1)
{
if (Type==Fl_DeviceGUI::OUTPUT)
{
// make sure we don't make a output->output connection
if (m_IncompleteWire.OutputChild==-1)
{
m_IncompleteWire.OutputChild=ChildNum;
m_IncompleteWire.OutputPort=Port;
m_IncompleteWire.OutputID=Device->GetID();
}
else
{
m_IncompleteWire.Clear();
}
}
else
{
// make sure we don't make a input->input connection
if (m_IncompleteWire.InputChild==-1)
{
m_IncompleteWire.InputChild=ChildNum;
m_IncompleteWire.InputPort=Port;
m_IncompleteWire.InputID=Device->GetID();
}
else
{
m_IncompleteWire.Clear();
}
}

// if both have now been set...
if (m_IncompleteWire.InputChild!=-1 && m_IncompleteWire.OutputChild!=-1)
{
m_WireVec.push_back(m_IncompleteWire);
// send the connect callback
cb_Connection(this,(void*)&m_IncompleteWire);
m_Graph.AddConnection(m_IncompleteWire.OutputID,m_IncompleteWire.InputID);
m_IncompleteWire.Clear();
redraw();
}
}
}
else // Turned off the port
{
// Find the connection
for(vector<CanvasWire>::iterator i=m_WireVec.begin();
i!=m_WireVec.end(); i++)
{
if ((Type==Fl_DeviceGUI::OUTPUT && i->OutputChild==ChildNum && i->OutputPort==Port) ||
(Type==Fl_DeviceGUI::INPUT && i->InputChild==ChildNum && i->InputPort==Port))
{
// Turn off both ports
((Fl_DeviceGUI*)(child(i->OutputChild)))->ForcePortValue(i->OutputPort+
((Fl_DeviceGUI*)(child(i->OutputChild)))->GetInfo()->NumInputs,false);
((Fl_DeviceGUI*)(child(i->InputChild)))->ForcePortValue(i->InputPort,false);
// send the unconnect callback
cb_Unconnect(this,(void*)&(*i));
m_Graph.RemoveConnection(i->OutputID,i->InputID);

// Remove the wire
m_WireVec.erase(i);
redraw();
break;
}
}
// Clear the current selection
m_IncompleteWire.Clear();
}
}

void Fl_Canvas::ClearConnections(Fl_DeviceGUI* Device)
{
// find out which child this comes from.
int ChildNum=-1;
for(int n=0; n<children(); n++)
{
if(child(n)==Device)
{
ChildNum=n;
}
}
if (ChildNum==-1)
{
SpiralInfo::Alert("Clear connections callback can't find source child.");
return;
}
bool removedall=false;
while (!removedall)
{
removedall=true;
for (vector<CanvasWire>::iterator i=m_WireVec.begin();
i!=m_WireVec.end(); i++)
{
if (i->OutputChild==ChildNum ||
i->InputChild==ChildNum)
{
// Turn off both ports
((Fl_DeviceGUI*)(child(i->OutputChild)))->ForcePortValue(i->OutputPort+
((Fl_DeviceGUI*)(child(i->OutputChild)))->GetInfo()->NumInputs,false);
((Fl_DeviceGUI*)(child(i->InputChild)))->ForcePortValue(i->InputPort,false);

// send the unconnect callback
cb_Unconnect(this,(void*)&(*i));
m_Graph.RemoveConnection(i->OutputID,i->InputID);
m_WireVec.erase(i);
removedall=false;
break;
}
}
}
}
void Fl_Canvas::RemoveDevice(Fl_DeviceGUI* Device)
{
// find out which child this comes from.
int ChildNum=-1;
for(int n=0; n<children(); n++)
{
if(child(n)==Device)
{
ChildNum=n;
}
}
if (ChildNum==-1)
{
SpiralInfo::Alert("Remove device callback can't find source child.");
return;
}

ClearConnections(Device);

for (vector<CanvasWire>::iterator i=m_WireVec.begin();
i!=m_WireVec.end(); i++)
{
if (i->OutputChild>ChildNum) i->OutputChild--;
if (i->InputChild>ChildNum) i->InputChild--;
}
remove(child(ChildNum));
redraw();
}
void Fl_Canvas::Clear()
{
m_Graph.Clear();

int kids=children();

for(int n=0; n<kids; n++)
{
remove(child(0));
}
m_WireVec.clear();
redraw();
}

istream &operator>>(istream &s, Fl_Canvas &o)
{
int NumWires;
s>>NumWires;
for(int n=0; n<NumWires; n++)
{
CanvasWire NewWire;
s>>NewWire.OutputID;
s>>NewWire.OutputChild;
s>>NewWire.OutputPort;
s>>NewWire.InputID;
s>>NewWire.InputChild;
s>>NewWire.InputPort;

o.m_WireVec.push_back(NewWire);

// Notify connection by callback
o.cb_Connection(&o,(void*)&NewWire);
o.m_Graph.AddConnection(NewWire.OutputID,NewWire.InputID);
// Turn on both ports
((Fl_DeviceGUI*)(o.child(NewWire.OutputChild)))->ForcePortValue(NewWire.OutputPort+
((Fl_DeviceGUI*)(o.child(NewWire.OutputChild)))->GetInfo()->NumInputs,true);
((Fl_DeviceGUI*)(o.child(NewWire.InputChild)))->ForcePortValue(NewWire.InputPort,true);
}
return s;
}

ostream &operator<<(ostream &s, Fl_Canvas &o)
{
s<<o.m_WireVec.size()<<endl;

for(vector<CanvasWire>::iterator i=o.m_WireVec.begin();
i!=o.m_WireVec.end(); i++)
{
s<<i->OutputID<<" ";
s<<i->OutputChild<<" ";
s<<i->OutputPort<<" ";
s<<i->InputID<<" ";
s<<i->InputChild<<" ";
s<<i->InputPort<<endl;
}

return s;
}

+ 104
- 0
GUI/Widgets/Fl_Canvas.h View File

@@ -0,0 +1,104 @@
/* Canvas Widget
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl_Group.h>
#include <FL/Fl_Output.h>
#include <FL/Fl_Image.h>
#include <vector>
#include <string>
#include "../../GraphSort.h"

#ifndef CANVAS_WIDGET
#define CANVAS_WIDGET

using namespace std;

class Fl_DeviceGUI;

class CanvasWire
{
public:
CanvasWire() { Clear(); }
void Clear()
{
OutputChild=-1;
OutputPort=-1;
OutputID=-1;
InputChild=-1;
InputPort=-1;
InputID=-1;
}

int OutputID;
int OutputChild;
int OutputPort;
int InputID;
int InputChild;
int InputPort;
};

class Fl_Canvas : public Fl_Group
{
public:
Fl_Canvas(int x, int y, int w, int h, char *name);
~Fl_Canvas();
virtual void draw();
virtual int handle(int event);
void PortClicked(Fl_DeviceGUI* Device, int Type, int Port, bool Value);

void SetConnectionCallback(Fl_Callback* s) { cb_Connection=s; }
void SetUnconnectCallback(Fl_Callback* s) { cb_Unconnect=s; }
void SetAddDeviceCallback(Fl_Callback* s) { cb_AddDevice=s; }
void ClearConnections(Fl_DeviceGUI* Device);
void RemoveDevice(Fl_DeviceGUI* Device);
void Clear();
void AddPluginName(const string &s, int ID)
{ m_PluginNameList.push_back(pair<string,int>(s,ID)); }
GraphSort* GetGraph() { return &m_Graph; }

private:

void DrawWires();

Fl_Image *m_BG;
char *m_BGData;
void (*cb_Connection)(Fl_Widget*, void*);
void (*cb_Unconnect)(Fl_Widget*, void*);
void (*cb_AddDevice)(Fl_Widget*, void*);
vector<CanvasWire> m_WireVec;
CanvasWire m_IncompleteWire;
bool m_ToolMenu, m_ButtonDown;
int m_x,m_y,m_Selected;
vector< pair<string,int> > m_PluginNameList;

GraphSort m_Graph;

friend istream &operator>>(istream &s, Fl_Canvas &o);
friend ostream &operator<<(ostream &s, Fl_Canvas &o);
};

istream &operator>>(istream &s, Fl_Canvas &o);
ostream &operator<<(ostream &s, Fl_Canvas &o);

#endif

+ 93
- 0
GUI/Widgets/Fl_CommentGUI.C View File

@@ -0,0 +1,93 @@
/* DeviceGUI composite Widget
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "Fl_CommentGUI.h"
#include <FL/fl_ask.H>
#include <FL/fl_draw.H>
#include "../../SpiralSynthModularInfo.h"

Fl_CommentGUI::Fl_CommentGUI(const DeviceGUIInfo& Info, Fl_Window *PW, Fl_Pixmap *Icon) :
Fl_DeviceGUI(Info,PW,Icon),
m_Comment("double click to edit.")
{
box(FL_NO_BOX);
m_DragBar->box(FL_NO_BOX);
m_DragBar->label(m_Comment.c_str());
m_DragBar->color(SpiralSynthModularInfo::GUICOL_Device);
// m_DragBar->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
}

int Fl_CommentGUI::handle(int event)
{
if (Fl::event_button()==1 && event==FL_PUSH && Fl::event_clicks()==1)
{
const char *t=fl_input("and your comment is:", m_Comment.c_str());
if (t)
{
string temp(t);
if (temp!="")
{
m_Comment=temp;
m_DragBar->label(m_Comment.c_str());
redraw();
//int x,y;
//fl_measure(m_Comment.c_str(),x,y);
//m_DragBar->size(x,y);
}
}
}
return Fl_DeviceGUI::handle(event);
}
void Fl_CommentGUI::Setup(const DeviceGUIInfo& Info, bool FirstTime)
{
Fl_DeviceGUI::Setup(Info,FirstTime);
}

void Fl_CommentGUI::Clear()
{
Fl_DeviceGUI::Clear();
}

void Fl_CommentGUI::StreamOut(ostream &s)
{
s<<1<<" ";
s<<m_Comment.size()<<" ";
s<<m_Comment<<endl;
}

void Fl_CommentGUI::StreamIn(istream &s)
{
unsigned int size,version;
string temp;
s>>version;
s>>size;
size++; // see below
char *str = new char[size+1];
s.read(str,size);
str[size]='\0';
// have to move the pointer on by one, as the string
// starts with " ", as the file pointer starts on
// a blank space (after streaming the size)
m_Comment=str+1;
delete[] str;
m_DragBar->label(m_Comment.c_str());
}

+ 41
- 0
GUI/Widgets/Fl_CommentGUI.h View File

@@ -0,0 +1,41 @@
/* DeviceGUI composite Widget
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl_Input.h>
#include "Fl_DeviceGUI.h"

#ifndef COMMENTGUI
#define COMMENTGUI

class Fl_CommentGUI : public Fl_DeviceGUI
{
public:
Fl_CommentGUI(const DeviceGUIInfo& Info, Fl_Window *PW, Fl_Pixmap *Icon);

virtual int handle(int event);
virtual void Setup(const DeviceGUIInfo& Info, bool FirstTime = false);
virtual void Clear();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
protected:

string m_Comment;
};

#endif

+ 214
- 0
GUI/Widgets/Fl_DeviceGUI.C View File

@@ -0,0 +1,214 @@
/* DeviceGUI composite Widget
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "Fl_DeviceGUI.h"
#include "Fl_Canvas.h"
#include "../../SpiralSynthModularInfo.h"

int Fl_DeviceGUI::Numbers[512];

Fl_DeviceGUI::Fl_DeviceGUI(const DeviceGUIInfo& Info, Fl_Group *PW, Fl_Pixmap *Icon) :
Fl_Group(Info.XPos, Info.YPos, Info.Width+(PortGroupWidth*2), Info.Height+TitleBarHeight, ""),
m_PluginWindow(NULL),
m_Icon(NULL),
m_Name(Info.Name),
m_ID(-1),
m_DelMe(false)
{
for (int n=0; n<512; n++) Numbers[n]=n;
type(1);
box(FL_PLASTIC_UP_BOX);
labeltype(FL_ENGRAVED_LABEL);
align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
color(SpiralSynthModularInfo::GUICOL_Device);
m_Icon=Icon;
m_DragBar = new Fl_DragBar(Info.XPos, Info.YPos, Info.Width+PortGroupWidth*2, TitleBarHeight, m_Name.c_str());
m_DragBar->labelsize(10);
m_DragBar->type(Fl_DragBar::FLDRAG);
m_DragBar->color(SpiralSynthModularInfo::GUICOL_Device);
m_PluginWindow = PW;
//Add the input/output ports
Setup(Info, true);
}

void Fl_DeviceGUI::Clear()
{
end();
}

int Fl_DeviceGUI::handle(int event)
{
int t=Fl_Group::handle(event);
if (t==0)
{
if (event==FL_PUSH && Fl::event_button()==1)
{
if (m_PluginWindow && !m_DelMe)
{
if(!m_PluginWindow->visible())
{
m_PluginWindow->show();
}
/*else
{
m_PluginWindow->hide();
}*/
}
}
if (event==FL_RELEASE && Fl::event_button()==2)
{
m_DelMe = true;
}
}
return t;
}

void Fl_DeviceGUI::draw()
{
Fl_Group::draw();
if (m_Icon)
{
int Centx=x()+w()/2;
int Centy=y()+h()/2;
m_Icon->draw(Centx-m_Icon->w()/2,Centy-m_Icon->h()/2);
}
}

void Fl_DeviceGUI::Setup(const DeviceGUIInfo& Info, bool FirstTime)
{
m_Info=Info;
// Remove all current connections - it's the safest thing to do.
if (parent() && !FirstTime)
{
((Fl_Canvas*)(parent()))->ClearConnections(this);
}

// delete the current ports
for(vector<Fl_Button*>::iterator i=m_PortVec.begin();
i!=m_PortVec.end(); i++)
{
remove(*i);
delete(*i);
}

m_PortVec.clear();
int InputX=x()+2;
int OutputX=x()+PortGroupWidth+Info.Width+4;
int StartY=y()+TitleBarHeight;
int PortDist=10;
int PortNum=0;
h(Info.Height+TitleBarHeight);
for (int n=0; n<Info.NumInputs; n++)
{
Fl_Button* NewInput = new Fl_Button(InputX,StartY+PortDist*n,PortSize,PortSize,"");
NewInput->type(1);
NewInput->value(false);
NewInput->box(FL_ROUNDED_BOX);
Fl_Color col = (Fl_Color) WIRE_COL0;
switch (Info.PortTypes[n]) {
case 0: col = (Fl_Color) WIRE_COL0;
break;
case 1: col = (Fl_Color) WIRE_COL1;
break;
case 2: col = (Fl_Color) WIRE_COL2;
break;
case 3: col = (Fl_Color) WIRE_COL3;
break;
case 4: col = (Fl_Color) WIRE_COL4;
break;
default: col = (Fl_Color) WIRE_COL0;
}
NewInput->selection_color(col);
NewInput->down_box(FL_ROUNDED_BOX);
NewInput->tooltip(Info.PortTips[n].c_str());
NewInput->callback((Fl_Callback*)cb_Port,(void*)&Numbers[PortNum]);
m_PortVec.push_back(NewInput);
add(NewInput);
PortNum++;
}
for (int n=0; n<Info.NumOutputs; n++)
{
Fl_Button* NewOutput = new Fl_Button(OutputX,StartY+PortDist*n,PortSize,PortSize,"");
NewOutput->type(1);
NewOutput->value(false);
NewOutput->box(FL_ROUNDED_BOX);

Fl_Color col = (Fl_Color) WIRE_COL0;
switch (Info.PortTypes[n+Info.NumInputs]) {
case 0: col = (Fl_Color) WIRE_COL0;
break;
case 1: col = (Fl_Color) WIRE_COL1;
break;
case 2: col = (Fl_Color) WIRE_COL2;
break;
case 3: col = (Fl_Color) WIRE_COL3;
break;
case 4: col = (Fl_Color) WIRE_COL4;
break;
default: col = (Fl_Color) WIRE_COL0;
}
NewOutput->selection_color(col);

NewOutput->down_box(FL_ROUNDED_BOX);
NewOutput->tooltip(Info.PortTips[n+Info.NumInputs].c_str());
NewOutput->callback((Fl_Callback*)cb_Port,(void*)&Numbers[PortNum]);
m_PortVec.push_back(NewOutput);
add(NewOutput);
PortNum++;
}
}

inline void Fl_DeviceGUI::cb_Port_i(Fl_Button* o, void* v)
{
int Port=*(int*)(v);
PortType Pt;
if (m_DelMe) return;
// Find out if this is an input or an output.
if (Port<m_Info.NumInputs)
{
Pt=INPUT;
}
else
{
Pt=OUTPUT;
Port-=m_Info.NumInputs;
}
((Fl_Canvas*)(parent()))->PortClicked(this,Pt,Port,o->value());
}
void Fl_DeviceGUI::cb_Port(Fl_Button* o, void* v)
{((Fl_DeviceGUI*)(o->parent()))->cb_Port_i(o,v);}

+ 107
- 0
GUI/Widgets/Fl_DeviceGUI.h View File

@@ -0,0 +1,107 @@
/* DeviceGUI composite Widget
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Pixmap.h>
#include <iostream>
#include <vector>
#include <string>
#include "Fl_DragBar.H"
#include <stdio.h>

#ifndef DEVICEGUI
#define DEVICEGUI

#define WIRE_COL0 91
#define WIRE_COL1 FL_GREEN
#define WIRE_COL2 FL_YELLOW
#define WIRE_COL3 FL_BLUE
#define WIRE_COL4 FL_CYAN

using namespace std;

static const int TitleBarHeight = 12;
static const int PortGroupWidth = 12;
static const int PortSize=6;

struct DeviceGUIInfo
{
int XPos;
int YPos;
int Width;
int Height;
int NumInputs;
int NumOutputs;
vector<string> PortTips;
string Name;
vector<int> PortTypes;
};

class Fl_DeviceGUI : public Fl_Group
{
public:
Fl_DeviceGUI(const DeviceGUIInfo& Info, Fl_Group *PW, Fl_Pixmap *Icon);
virtual int handle(int event);
virtual void draw();
enum PortType {INPUT,OUTPUT};
int GetID() { return m_ID; }
void SetID(int s) { m_ID=s; /*DisplayID(s);*/ }
/*char did[8];
void DisplayID(int s) { sprintf(did,"%d",s); label(did); }*/
bool Killed() { return m_DelMe; }
int GetPortX(int n) { return m_PortVec[n]->x()+PortSize/2; }
int GetPortY(int n) { return m_PortVec[n]->y()+PortSize/2; }
void ForcePortValue(int n, bool v) { m_PortVec[n]->value(v); }
const DeviceGUIInfo* GetInfo() { return &m_Info; }
Fl_Group* GetPluginWindow() { return m_PluginWindow; }
// automatically called from the constructor, but may be redone at any time.
virtual void Setup(const DeviceGUIInfo& Info, bool FirstTime = false);
virtual void Clear();
int GetPortType(int n) { return m_Info.PortTypes[n]; }
protected:

DeviceGUIInfo m_Info;

Fl_DragBar* m_DragBar;
Fl_Group* m_PluginWindow;
Fl_Pixmap* m_Icon;
private:

inline void cb_Port_i(Fl_Button* o, void* v);
static void cb_Port(Fl_Button* o, void* v);
vector<Fl_Button*> m_PortVec;
static int Numbers[512];

string m_Name;
int m_ID;
bool m_DelMe;
};

#endif

+ 23
- 0
GUI/Widgets/Fl_DragBar.H View File

@@ -0,0 +1,23 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0010

#ifndef Fl_DragBar_H
#define Fl_DragBar_H
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Window.H>

class Fl_DragBar : public Fl_Widget {
int old_rx,old_ry;
int _type;
public:
enum DragType {WINDRAG=0,NICEWINDRAG,FLDRAG,NICEFLDRAG};
Fl_DragBar(int x,int y,int w,int h,const char *l=0);
~Fl_DragBar();
private:
void draw();
int handle(int event);
public:
void type(int t);
};
#endif

+ 166
- 0
GUI/Widgets/Fl_DragBar.cxx View File

@@ -0,0 +1,166 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0010

#include "Fl_DragBar.H"
#include <string.h>

Fl_DragBar::Fl_DragBar(int x,int y,int w,int h,const char *l): Fl_Widget(x,y,w,h,l) {
_type = Fl_DragBar::NICEFLDRAG;
}

Fl_DragBar::~Fl_DragBar() {
fl_cursor(FL_CURSOR_DEFAULT);
}

void Fl_DragBar::draw() {
int ww,hh;
uchar r,g,b;
uchar rb,gb,bb;
uchar rd,gd,bd;
int val;
draw_box();
int x1 = x()+5;
int x2 = x()+w()-5;
int y1 = y()+5;
int y2 = y()+h()-5;
Fl::get_color(color(),r,g,b);
val = (int)r + 64; rb = val > 255 ? 255:val;
val = (int)g + 64; gb = val > 255 ? 255:val;
val = (int)b + 64; bb = val > 255 ? 255:val;
val = (int)r - 64; rd = val < 0 ? 0:val;
val = (int)g - 64; gd = val < 0 ? 0:val;
val = (int)b - 64; bd = val < 0 ? 0:val;
if (h()<w())
{
if ((_type==Fl_DragBar::NICEWINDRAG) || (_type==Fl_DragBar::NICEFLDRAG))
{
fl_line_style(FL_DASH);
for (int i = y() + 4; i < y()+h()-5;i+=3)
{
fl_line_style(FL_DASH);
fl_color(rb,gb,bb);
fl_line(x1,i,x2,i);
fl_color(rd,gd,bd);
fl_line(x1,i+1,x2,i+1);
}
fl_line_style(FL_SOLID);
}
fl_color(color());
const char *l = label();
ww = labelsize()*strlen(l)/2;
//ww = (int)fl_width(l);
hh = h() - 4;
if (align() & FL_ALIGN_RIGHT)
{
x1 = x() + w() - 5 - ww;
}
else
if (align() & FL_ALIGN_CENTER)
{
x1 = x() + 5;
}
else
{
x1 = x() + (w() - ww) / 2;
}
//fl_rectf(x1,y()+(h() - hh) / 2, ww, hh);
draw_label();
}
else
if ((_type==Fl_DragBar::NICEWINDRAG) || (_type==Fl_DragBar::NICEFLDRAG))
{
fl_line_style(FL_DASH);
for (int i = x() + 4; i < x()+w()-5;i+=3)
{
fl_color(rb,gb,bb);
fl_line(i,y1,i,y2);
fl_color(rd,gd,bd);
fl_line(i+1,y1,i+1,y2);
}
fl_line_style(FL_SOLID);
}
}

int Fl_DragBar::handle(int event) {
int rx,ry,xx,yy;
int mx,my;

if (Fl::event_button()!=1) return 0;

if (_type < (int)Fl_DragBar::FLDRAG)
{
rx = Fl::event_x_root();
ry = Fl::event_y_root();
}
else
{
rx = Fl::event_x();
ry = Fl::event_y();
}
switch(event)
{
case FL_PUSH:
{
window()->show();
fl_cursor(FL_CURSOR_MOVE);
if (_type < (int)Fl_DragBar::FLDRAG)
{
old_rx = rx - window()->x();
old_ry = ry - window()->y();
}
else
{
old_rx = rx - parent()->x();
old_ry = ry - parent()->y();
}
return 1;
}
case FL_RELEASE:
{
fl_cursor(FL_CURSOR_DEFAULT);
do_callback();
return 1;
}
case FL_DRAG:
{
if ((rx != old_rx) || (ry != old_ry))
{
xx = rx - old_rx;
yy = ry - old_ry;
if (_type < (int)Fl_DragBar::FLDRAG)
{
window()->position(xx,yy);
}
else
{
parent()->position(xx,yy);
if (parent()->parent())
parent()->parent()->redraw();
else
window()->redraw();
}
}
return 1;
}
case FL_MOVE:
{
return 0;
}
case FL_ENTER :
{
return 0;
}
case FL_LEAVE :
{
fl_cursor(FL_CURSOR_DEFAULT);
return 1;
}
default :
return 0;
}
}

void Fl_DragBar::type(int t) {
_type = t;
}

+ 180
- 0
GUI/Widgets/Fl_DragBar.fld View File

@@ -0,0 +1,180 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0010
header_name {.H}
code_name {.cxx}
gridx 2
gridy 2
snap 1
decl {\#include <FL/fl_draw.H>} {public
}

decl {\#include <FL/Fl_Widget.H>} {public
}

decl {\#include <FL/Fl_Window.H>} {public
}

class Fl_DragBar {open : {public Fl_Widget}
} {
decl {int old_rx,old_ry;} {}
decl {int _type;} {}
decl {enum DragType {WINDRAG=0,NICEWINDRAG,FLDRAG,NICEFLDRAG};} {public
}
Function {Fl_DragBar(int x,int y,int w,int h,const char *l=0): Fl_Widget(x,y,w,h,l)} {open
} {
code {_type = Fl_DragBar::NICEFLDRAG;} {}
}
Function {~Fl_DragBar()} {} {}
Function {draw()} {private
} {
code {int ww,hh;
uchar r,g,b;
uchar rb,gb,bb;
uchar rd,gd,bd;
int val;
draw_box();
int x1 = x()+5;
int x2 = x()+w()-5;
int y1 = y()+5;
int y2 = y()+h()-5;
Fl::get_color(color(),r,g,b);
val = (int)r + 64; rb = val > 255 ? 255:val;
val = (int)g + 64; gb = val > 255 ? 255:val;
val = (int)b + 64; bb = val > 255 ? 255:val;
val = (int)r - 64; rd = val < 0 ? 0:val;
val = (int)g - 64; gd = val < 0 ? 0:val;
val = (int)b - 64; bd = val < 0 ? 0:val;
if (h()<w())
{
if ((_type==Fl_DragBar::NICEWINDRAG) || (_type==Fl_DragBar::NICEFLDRAG))
{
fl_line_style(FL_DASH);
for (int i = y() + 4; i < y()+h()-5;i+=3)
{
fl_line_style(FL_DASH);
fl_color(rb,gb,bb);
fl_line(x1,i,x2,i);
fl_color(rd,gd,bd);
fl_line(x1,i+1,x2,i+1);
}
fl_line_style(FL_SOLID);
}
fl_color(color());
const char *l = label();
ww = labelsize()*strlen(l)/2;
//ww = (int)fl_width(l);
hh = h() - 4;
if (align() & FL_ALIGN_RIGHT)
{
x1 = x() + w() - 5 - ww;
}
else
if (align() & FL_ALIGN_CENTER)
{
x1 = x() + 5;
}
else
{
x1 = x() + (w() - ww) / 2;
}
fl_rectf(x1,y()+(h() - hh) / 2, ww, hh);
draw_label();
}
else
if ((_type==Fl_DragBar::NICEWINDRAG) || (_type==Fl_DragBar::NICEFLDRAG))
{
fl_line_style(FL_DASH);
for (int i = x() + 4; i < x()+w()-5;i+=3)
{
fl_color(rb,gb,bb);
fl_line(i,y1,i,y2);
fl_color(rd,gd,bd);
fl_line(i+1,y1,i+1,y2);
}
fl_line_style(FL_SOLID);
}} {selected
}
}
Function {handle(int event)} {private return_type int
} {
code {int rx,ry,xx,yy;
int mx,my;

if (_type < (int)Fl_DragBar::FLDRAG)
{
rx = Fl::event_x_root();
ry = Fl::event_y_root();
}
else
{
rx = Fl::event_x();
ry = Fl::event_y();
}
switch(event)
{
case FL_PUSH:
{
window()->show();
fl_cursor(FL_CURSOR_MOVE);
if (_type < (int)Fl_DragBar::FLDRAG)
{
old_rx = rx - window()->x();
old_ry = ry - window()->y();
}
else
{
old_rx = rx - parent()->x();
old_ry = ry - parent()->y();
}
return 1;
}
case FL_RELEASE:
{
fl_cursor(FL_CURSOR_DEFAULT);
do_callback();
return 1;
}
case FL_DRAG:
{
if ((rx != old_rx) || (ry != old_ry))
{
xx = rx - old_rx;
yy = ry - old_ry;
if (_type < (int)Fl_DragBar::FLDRAG)
{
window()->position(xx,yy);
}
else
{
parent()->position(xx,yy);
if (parent()->parent())
parent()->parent()->redraw();
else
window()->redraw();
}
}
return 1;
}
case FL_MOVE:
{
return 0;
}
case FL_ENTER :
{
return 0;
}
case FL_LEAVE :
{
fl_cursor(FL_CURSOR_DEFAULT);
return 1;
}
default :
return 0;
}} {}
}
Function {type(int t)} {} {
code {_type = t;} {}
}
}

+ 40
- 0
GUI/comment.xpm View File

@@ -0,0 +1,40 @@
/* XPM */
static char * comment_xpm[] = {
"15 15 22 1",
" c None",
". c #000000",
"+ c #191919",
"@ c #3D3D3D",
"# c #525252",
"$ c #343434",
"% c #FFFFFF",
"& c #FDFDFD",
"* c #080808",
"= c #E1E1E1",
"- c #DBDBDB",
"; c #C0C0C0",
"> c #9A9A9A",
", c #C8C8C8",
"' c #555555",
") c #9F9F9F",
"! c #121212",
"~ c #1F1F1F",
"{ c #ECECEC",
"] c #141414",
"^ c #020202",
"/ c #242424",
" ",
" .+@#.. ",
" ..$%&*.. ",
" ....=-.... ",
" ....;>.... ",
" ....,'.... ",
" ....)!.... ",
" .......... ",
" . ....'~.... ",
" .......>{].. ",
" ... ..^/.. ",
" .. ",
" ",
" .. ",
" "};

+ 555
- 0
GUI/edit.xpm View File

@@ -0,0 +1,555 @@
/* XPM */
static char * edit_xpm[] = {
"48 51 501 2",
" c None",
". c #0E0F16",
"+ c #191B28",
"@ c #232538",
"# c #2C2F47",
"$ c #323552",
"% c #36395A",
"& c #3C3F65",
"* c #3B3F66",
"= c #000000",
"- c #2E3045",
"; c #7C82BD",
"> c #8389C9",
", c #8389CC",
"' c #8188CD",
") c #7E85CC",
"! c #7C83CA",
"~ c #7980C9",
"{ c #767DC8",
"] c #6F76BF",
"^ c #5E65AA",
"/ c #2A306C",
"( c #2D2F45",
"_ c #868DCF",
": c #838ACE",
"< c #8087CD",
"[ c #7E85CB",
"} c #7B82CA",
"| c #787FC9",
"1 c #757DC7",
"2 c #727AC6",
"3 c #615669",
"4 c #8C5717",
"5 c #333466",
"6 c #1F2131",
"7 c #7F85C7",
"8 c #7E85CA",
"9 c #7D84CB",
"0 c #7A81CA",
"a c #777FC8",
"b c #757CC7",
"c c #7279C6",
"d c #6F76C5",
"e c #5C62A3",
"f c #936E5D",
"g c #BE7210",
"h c #462900",
"i c #111119",
"j c #6E5138",
"k c #564C59",
"l c #7981C9",
"m c #777EC8",
"n c #747BC7",
"o c #7178C5",
"p c #6E76C4",
"q c #6B73C3",
"r c #6970C2",
"s c #636BBE",
"t c #564966",
"u c #C37200",
"v c #8D5200",
"w c #C77400",
"x c #A76E2D",
"y c #555274",
"z c #737AC6",
"A c #7078C5",
"B c #6D75C4",
"C c #6B72C3",
"D c #6870C1",
"E c #5B62AD",
"F c #5259A1",
"G c #2E346F",
"H c #0A0600",
"I c #A66100",
"J c #E28300",
"K c #5F3700",
"L c #696FB0",
"M c #6F77C5",
"N c #6D74C3",
"O c #6A72C2",
"P c #676FC1",
"Q c #646CC0",
"R c #584C60",
"S c #A76920",
"T c #403A5D",
"U c #754400",
"V c #DA7F00",
"W c #E48500",
"X c #DE8100",
"Y c #5A5F9A",
"Z c #6F76C4",
"` c #6C74C3",
" . c #6971C2",
".. c #666EC1",
"+. c #646CBF",
"@. c #6169BE",
"#. c #535AA6",
"$. c #786376",
"%. c #C57715",
"&. c #613900",
"*. c #020100",
"=. c #D77D00",
"-. c #CE7800",
";. c #4B5084",
">. c #6870C2",
",. c #666EC0",
"'. c #636BBF",
"). c #6068BE",
"!. c #5D65BC",
"~. c #5B63BB",
"{. c #575FB8",
"]. c #3F3E71",
"^. c #935600",
"/. c #B76A00",
"(. c #281700",
"_. c #C47200",
":. c #DD8100",
"<. c #3E426F",
"[. c #686FC1",
"}. c #656DC0",
"|. c #626ABF",
"1. c #5F67BD",
"2. c #5A62BB",
"3. c #575FB9",
"4. c #535CB7",
"5. c #303670",
"6. c #512F00",
"7. c #D07900",
"8. c #8E5200",
"9. c #E08300",
"0. c #161723",
"a. c #1A1C2A",
"b. c #0F1019",
"c. c #040407",
"d. c #31355B",
"e. c #5C64BC",
"f. c #5961BA",
"g. c #565FB9",
"h. c #535CB8",
"i. c #5059B6",
"j. c #30366E",
"k. c #190F00",
"l. c #B66A00",
"m. c #D67D00",
"n. c #AE7942",
"o. c #5A5C88",
"p. c #6F76BC",
"q. c #666DB1",
"r. c #555A95",
"s. c #414677",
"t. c #070711",
"u. c #1F223B",
"v. c #585FA9",
"w. c #5C64B5",
"x. c #5C64B8",
"y. c #5861BA",
"z. c #555EB9",
"A. c #535BB8",
"B. c #5058B6",
"C. c #4D56B5",
"D. c #30366C",
"E. c #7C4800",
"F. c #A45F00",
"G. c #805524",
"H. c #5C3808",
"I. c #777EC6",
"J. c #767EC8",
"K. c #7179C6",
"L. c #6D74C1",
"M. c #493013",
"N. c #535283",
"O. c #262B60",
"P. c #111321",
"Q. c #1D2038",
"R. c #1F233E",
"S. c #25294B",
"T. c #2A2E56",
"U. c #303667",
"V. c #353B72",
"W. c #3A4182",
"X. c #3D458D",
"Y. c #2F3569",
"Z. c #C57300",
"`. c #CD7700",
" + c #41456C",
".+ c #777EC7",
"++ c #6E75C4",
"@+ c #6A71C0",
"#+ c #7F5E4E",
"$+ c #A5785E",
"%+ c #2B306C",
"&+ c #010101",
"*+ c #010103",
"=+ c #D87E00",
"-+ c #876655",
";+ c #6066A3",
">+ c #696EBA",
",+ c #CC8127",
"'+ c #3B3B71",
")+ c #965D14",
"!+ c #412601",
"~+ c #6C73C0",
"{+ c #6C73C3",
"]+ c #9A756C",
"^+ c #81593F",
"/+ c #3B3F68",
"(+ c #535996",
"_+ c #5E66BD",
":+ c #6065B4",
"<+ c #C77918",
"[+ c #060300",
"}+ c #473F50",
"|+ c #564547",
"1+ c #666EBF",
"2+ c #626ABE",
"3+ c #5760BA",
"4+ c #986D58",
"5+ c #6E4000",
"6+ c #BE761D",
"7+ c #462F16",
"8+ c #626ABC",
"9+ c #5B64BC",
"0+ c #545CB8",
"a+ c #51529A",
"b+ c #C97608",
"c+ c #080500",
"d+ c #060608",
"e+ c #09090D",
"f+ c #0F0F16",
"g+ c #161722",
"h+ c #1D1E2C",
"i+ c #242637",
"j+ c #292B3F",
"k+ c #242638",
"l+ c #D97E00",
"m+ c #31355F",
"n+ c #6068BD",
"o+ c #5A63BB",
"p+ c #5860BA",
"q+ c #535BB7",
"r+ c #464EA3",
"s+ c #86551F",
"t+ c #6B3F00",
"u+ c #E38400",
"v+ c #787EB3",
"w+ c #868DC9",
"x+ c #8990CF",
"y+ c #8A91D1",
"z+ c #8990D1",
"A+ c #888FD0",
"B+ c #878ED0",
"C+ c #6E75B4",
"D+ c #1D1F41",
"E+ c #965700",
"F+ c #D47B00",
"G+ c #121424",
"H+ c #3C4276",
"I+ c #464D8D",
"J+ c #474E91",
"K+ c #474F96",
"L+ c #474F98",
"M+ c #474F9B",
"N+ c #464E9E",
"O+ c #464EA0",
"P+ c #424A99",
"Q+ c #29222C",
"R+ c #BE6F00",
"S+ c #202233",
"T+ c #181927",
"U+ c #06060A",
"V+ c #D37B00",
"W+ c #DC8000",
"X+ c #BB6D01",
"Y+ c #B68049",
"Z+ c #534C5A",
"`+ c #858CCF",
" @ c #848BCE",
".@ c #67658A",
"+@ c #A9826E",
"@@ c #C17515",
"#@ c #A86200",
"$@ c #050509",
"%@ c #040509",
"&@ c #06060C",
"*@ c #070810",
"=@ c #090A14",
"-@ c #0D0E1D",
";@ c #0D0F1E",
">@ c #05060C",
",@ c #8A5205",
"'@ c #9A828D",
")@ c #7178C3",
"!@ c #686FB7",
"~@ c #6066AA",
"{@ c #565C9C",
"]@ c #4D528C",
"^@ c #242744",
"/@ c #CC7700",
"(@ c #0D0A0A",
"_@ c #7E748B",
":@ c #444258",
"<@ c #8289CD",
"[@ c #6F4611",
"}@ c #8B6758",
"|@ c #2E2F60",
"1@ c #41383F",
"2@ c #AB6811",
"3@ c #6168A8",
"4@ c #676EBE",
"5@ c #4D424F",
"6@ c #76627E",
"7@ c #563922",
"8@ c #B46900",
"9@ c #C67300",
"0@ c #D17900",
"a@ c #D17A00",
"b@ c #B76C04",
"c@ c #996833",
"d@ c #44476A",
"e@ c #8087CC",
"f@ c #7F86CC",
"g@ c #696FAC",
"h@ c #626ABB",
"i@ c #262B61",
"j@ c #3E426B",
"k@ c #4C4968",
"l@ c #676EB5",
"m@ c #646BBD",
"n@ c #574750",
"o@ c #83656A",
"p@ c #684219",
"q@ c #9E5C00",
"r@ c #141520",
"s@ c #6C6A90",
"t@ c #575C8C",
"u@ c #5F649C",
"v@ c #59402C",
"w@ c #947577",
"x@ c #6D4B37",
"y@ c #6B3E00",
"z@ c #784600",
"A@ c #8A5000",
"B@ c #9D5B00",
"C@ c #AB6300",
"D@ c #AB6400",
"E@ c #A05D00",
"F@ c #895000",
"G@ c #834C00",
"H@ c #7F4A00",
"I@ c #7E4900",
"J@ c #7D4800",
"K@ c #7B4800",
"L@ c #7A4700",
"M@ c #724200",
"N@ c #78563A",
"O@ c #433C4F",
"P@ c #4D55AF",
"Q@ c #0E0F20",
"R@ c #1E1F2F",
"S@ c #7C83CB",
"T@ c #595F96",
"U@ c #655662",
"V@ c #806D8B",
"W@ c #523C38",
"X@ c #492B00",
"Y@ c #563200",
"Z@ c #683D00",
"`@ c #774500",
" # c #5A3400",
".# c #66504C",
"+# c #343043",
"@# c #6970C1",
"## c #4A53AB",
"$# c #0B0C1A",
"%# c #23253A",
"&# c #1C2046",
"*# c #525897",
"=# c #6169B5",
"-# c #5E66BC",
";# c #5962BB",
"># c #4851A7",
",# c #070811",
"'# c #2B2E48",
")# c #555DB7",
"!# c #171A3A",
"~# c #5B3500",
"{# c #9A6C46",
"]# c #5A3505",
"^# c #6169BD",
"/# c #565EB9",
"(# c #060710",
"_# c #2F3250",
":# c #7077C5",
"<# c #515AB3",
"[# c #151834",
"}# c #CA7500",
"|# c #8B5101",
"1# c #786577",
"2# c #343456",
"3# c #555DB8",
"4# c #444C9E",
"5# c #06070E",
"6# c #34385A",
"7# c #7179C5",
"8# c #4E56AF",
"9# c #111327",
"0# c #DF8200",
"a# c #DB7F00",
"b# c #C87400",
"c# c #010102",
"d# c #5259A2",
"e# c #5C64B9",
"f# c #5B64BB",
"g# c #515AB7",
"h# c #4F58B6",
"i# c #414998",
"j# c #030307",
"k# c #383C62",
"l# c #6A71C2",
"m# c #0D0E1F",
"n# c #E18300",
"o# c #080910",
"p# c #20233F",
"q# c #282C52",
"r# c #313767",
"s# c #3B417C",
"t# c #424990",
"u# c #474E9D",
"v# c #4850A3",
"w# c #4850A9",
"x# c #3F4691",
"y# c #020204",
"z# c #3C406C",
"A# c #676EC1",
"B# c #5F66B3",
"C# c #5F66B5",
"D# c #4850A6",
"E# c #241A16",
"F# c #653B00",
"G# c #AF6600",
"H# c #05060B",
"I# c #0C0D1A",
"J# c #13152A",
"K# c #181B38",
"L# c #2E2B41",
"M# c #9F631A",
"N# c #C07928",
"O# c #995A03",
"P# c #734300",
"Q# c #3C2300",
"R# c #464B83",
"S# c #3F4273",
"T# c #5A5171",
"U# c #424A9C",
"V# c #030408",
"W# c #4A508E",
"X# c #5C65BC",
"Y# c #3D4590",
"Z# c #4E559A",
"`# c #5760B9",
" $ c #3B4289",
".$ c #5259A4",
"+$ c #545CB6",
"@$ c #373D7E",
"#$ c #555DAF",
"$$ c #545DB8",
"%$ c #5058B2",
"&$ c #323872",
"*$ c #05050A",
"=$ c #555DB4",
"-$ c #525BB7",
";$ c #4C54AE",
">$ c #2F356B",
",$ c #0A0B15",
"'$ c #525AB7",
")$ c #4E57B5",
"!$ c #4951AA",
"~$ c #2B305F",
"{$ c #101123",
"]$ c #5159B7",
"^$ c #4F57B6",
"/$ c #4C55B5",
"($ c #4B54B4",
"_$ c #4A53B4",
":$ c #464EA5",
"<$ c #282D58",
"[$ c #1D203E",
"}$ c #3C427A",
"|$ c #3F4683",
"1$ c #404789",
"2$ c #41488E",
"3$ c #424993",
"4$ c #424A98",
"5$ c #404895",
"6$ c #24294F",
"7$ c #030306",
"8$ c #0C0D19",
"9$ c #101222",
"0$ c #131527",
"a$ c #171A31",
"b$ c #0E101E",
" ",
" ",
" . + @ # $ % & * = ",
" - ; > , ' ) ! ~ { ] ^ / ",
" ( _ : < [ } | 1 2 3 4 5 ",
" 6 7 8 9 0 a b c d e f g h ",
" i j k l m n o p q r s t u v ",
" w x y { z A B C D E F G H I w ",
" J K L b 2 M N O P Q R S T = = U V ",
"W X Y c Z ` ...+.@.#.$.%.&.*. =.-. ",
" ;.p q >.,.'.).!.~.{.].^./.(. _.:. ",
" <.O [.}.|.1.!.2.3.4.5.= 6.7.8. 9. 0.@ a.b.c. ",
" d.P Q @.1.e.f.g.h.i.j.= = k.l.-. m.n.o.! 0 m p.q.r.s.t. ",
" u.v.w.x.~.y.z.A.B.C.D.= = = E.V F. G.H.I.J.n K.L.M.N.O. ",
" P.Q.R.S.T.U.V.W.X.Y.= = Z.`. +.+1 z A ++@+#+$+%+ ",
" = = = = = = = &+*+= = =+-+;+c M N O P >+,+'+= ",
" = = = = = = = = = )+!+~+{+ ...+.@.]+^+= ",
" = = = = = = /+(+O D }.'.)._+:+<+[+= ",
" }+|+1+Q 2+1.!.2.3+4+5+= ",
" -.6+7+8+@._+9+f.g.0+a+b+c+ ",
" d+e+f+g+h+i+j+k+ J l+ m+|.n+!.o+p+z.q+i.r+s+t+ ",
"W u+X v+w+x+y+z+A+B+_ C+D+E+9.F+ G+H+I+J+K+L+M+N+O+P+Q+R+S+T+b.U+ ",
" V+W+X X+Y+Z+A+B+_ `+ @.@+@@@#@ = $@%@&@&@*@=@-@;@>@,@'@m b )@!@~@{@]@^@ ",
"l+/@ (@_@:@`+ @: <@' [@}@|@= = = = = = = = = = 1@2@3@K.M B q 4@5@6@7@ ",
" 8@9@0@a@b@c@d@<@' e@f@[ g@h@i@= = = = = = = = = = j@k@l@++` O D m@n@o@p@v q@",
" r@s@t@f@[ 9 ! u@v@w@x@y@z@A@B@C@ D@E@^.F@G@H@I@J@K@L@M@N@O@` O >...Q |.).P@Q@ ",
" R@) 9 S@} 0 ~ T@U@V@W@X@Y@Z@ `@M@ #.#+#@#P }.'.@.1.!.##$#= ",
" %#} 0 ~ | m { b n y.&#= = = *#=#,.+.2+n+-#9+;#>#,#= ",
" '#| m { b n z c o )#!#= = ~#{#]#^#)._+e.2.p+/#r+(#= ",
" _#1 n z c o :#Z ++<#[#= = }#l+F+|#1#2#1.!.~.f.3.3#q+4#5#= ",
" 6#2 7#:#Z ++N {+C 8#9#= = F+0#a#b# c#d#e#f#2.3+z.h.g#h#i#j#= ",
" k#M p B {+C l#r [.##m#= = l+n#X /@ o#p#q#r#s#t#u#v#w#x#y#= ",
" z#` q O .D A#B#C#D#E#F#G#7.a@_. = = = = c#H#I#J#K#= = ",
" s. .D P ,.}.+.L#M#N#O#P#Q# = = = = = = = = = = ",
" R#,.}.+.'.2+@.S#T#U#V#= = = = = = = = = ",
" W#'.2+@.n+1.-#X#~.Y#*+= = ",
" Z#).1._+!.e.o+;#`# $= = = ",
" .$!.e.~.2.f.3+g.+$@$= = ",
" c##$2.f.p+3.z.$$h.%$&$= = ",
" *$=$3./#3#0+-$g#i.;$>$= = ",
" ,$3#0+q+'$i.h#)$C.!$~$= = ",
" {$'$]$B.^$C./$($_$:$<$= = ",
" *$[$}$|$1$2$3$4$U#5$6$= = ",
" y#7$&@,$8$9$0$a$b$= = ",
" = = = = = = = = = ",
" = = = = = = = = ",
" ",
" ",
" ",
" ",
" "};

+ 954
- 0
GUI/load.xpm View File

@@ -0,0 +1,954 @@
/* XPM */
static char * load_xpm[] = {
"50 70 881 2",
" c None",
". c #E08300",
"+ c #E08200",
"@ c #E68600",
"# c #E88700",
"$ c #E28400",
"% c #DB7F00",
"& c #E48500",
"* c #E28300",
"= c #DF8100",
"- c #E58500",
"; c #C47200",
"> c #000000",
", c #DF8200",
"' c #B26800",
") c #D47B00",
"! c #A35F00",
"~ c #BD6E00",
"{ c #884F00",
"] c #353747",
"^ c #53566F",
"/ c #3F4155",
"( c #2D2F3D",
"_ c #1A1B21",
": c #A15E00",
"< c #7D4900",
"[ c #3D3F52",
"} c #959BCD",
"| c #7C83C0",
"1 c #9BA1D8",
"2 c #AEB3DF",
"3 c #EBEBED",
"4 c #E0E0E3",
"5 c #CECFD1",
"6 c #BFBFC0",
"7 c #ADADAE",
"8 c #A1A1A2",
"9 c #949494",
"0 c #888888",
"a c #7C7C7C",
"b c #6E6E6E",
"c c #5D5D5D",
"d c #4E4E4E",
"e c #373737",
"f c #563A13",
"g c #E78600",
"h c #5A3606",
"i c #0B0C12",
"j c #151622",
"k c #6A6E8F",
"l c #7B82C1",
"m c #282F68",
"n c #8D93C9",
"o c #B1B6E0",
"p c #EFEFEF",
"q c #EEEEEE",
"r c #ECECEC",
"s c #EBEBEB",
"t c #EAEAEA",
"u c #E9E9E9",
"v c #E7E7E7",
"w c #E5E5E5",
"x c #E0E0E0",
"y c #D7D7D7",
"z c #C8C8C8",
"A c #B1B1B1",
"B c #9C9386",
"C c #DE860C",
"D c #56402E",
"E c #393C5D",
"F c #505482",
"G c #262949",
"H c #878DB8",
"I c #989FD6",
"J c #7277A4",
"K c #9CA2D7",
"L c #B8BCE1",
"M c #EDEDED",
"N c #E8E8E8",
"O c #E6E6E6",
"P c #E4E4E4",
"Q c #D9D9D9",
"R c #CDCDCD",
"S c #B9B8B6",
"T c #D88E28",
"U c #47352F",
"V c #33375C",
"W c #505585",
"X c #3D4481",
"Y c #06070F",
"Z c #0F0F14",
"` c #9EA4D8",
" . c #A0A6DC",
".. c #9FA5DB",
"+. c #9DA4DA",
"@. c #C1C4E2",
"#. c #C2C2C2",
"$. c #D8D8D8",
"%. c #DCDCDC",
"&. c #DEDEDE",
"*. c #DFDFDF",
"=. c #D5A157",
"-. c #2A2537",
";. c #353960",
">. c #515687",
",. c #353D7D",
"'. c #060710",
"). c #333546",
"!. c #9FA6DB",
"~. c #9EA4DB",
"{. c #9DA3DA",
"]. c #9CA2DA",
"^. c #CACDE4",
"/. c #E2E2E2",
"(. c #D0D0D0",
"_. c #C7C7C7",
":. c #BDBDBD",
"<. c #B7B7B7",
"[. c #B3B3B3",
"}. c #AAAAAA",
"|. c #B6986E",
"1. c #E88802",
"2. c #E18300",
"3. c #4B2E06",
"4. c #BC6E02",
"5. c #E18302",
"6. c #2D2C40",
"7. c #3C4066",
"8. c #515689",
"9. c #2B316C",
"0. c #000001",
"a. c #4C4E68",
"b. c #9BA2DA",
"c. c #9AA1D9",
"d. c #D5D7E5",
"e. c #DDDDDD",
"f. c #D1C4B3",
"g. c #E68B0D",
"h. c #66400A",
"i. c #121212",
"j. c #221D15",
"k. c #AA6709",
"l. c #DA8004",
"m. c #2C2E49",
"n. c #3F436B",
"o. c #4C5186",
"p. c #222859",
"q. c #676B8E",
"r. c #9CA3DA",
"s. c #9BA1D9",
"t. c #9AA0D9",
"u. c #999FD8",
"v. c #E0E1E7",
"w. c #BBBBBB",
"x. c #B6B6B6",
"y. c #B5B5B5",
"z. c #C0C0C0",
"A. c #CBC7C2",
"B. c #E29426",
"C. c #9D5F09",
"D. c #1B1B1B",
"E. c #242424",
"F. c #2A2A2A",
"G. c #302F2C",
"H. c #8F5C17",
"I. c #C4760C",
"J. c #313352",
"K. c #434771",
"L. c #474D84",
"M. c #1B1F45",
"N. c #878DBD",
"O. c #99A0D9",
"P. c #989FD8",
"Q. c #9CA2D9",
"R. c #E6E6E7",
"S. c #E3E3E3",
"T. c #DADADA",
"U. c #CBCBCB",
"V. c #C48937",
"W. c #CB7703",
"X. c #26221C",
"Y. c #2B2B2B",
"Z. c #3B3B3B",
"`. c #454545",
" + c #484848",
".+ c #323446",
"++ c #6F4E2F",
"@+ c #B87116",
"#+ c #383B5F",
"$+ c #474C7A",
"%+ c #434984",
"&+ c #151937",
"*+ c #1A1B24",
"=+ c #999FD7",
"-+ c #989ED8",
";+ c #979DD7",
">+ c #A8ADDA",
",+ c #D1D1D1",
"'+ c #CECECE",
")+ c #D2D2D2",
"!+ c #D5B17F",
"~+ c #E38501",
"{+ c #463318",
"]+ c #292929",
"^+ c #383838",
"/+ c #4A4A4A",
"(+ c #636363",
"_+ c #686868",
":+ c #424565",
"<+ c #393D61",
"[+ c #3F4062",
"}+ c #414671",
"|+ c #4D5286",
"1+ c #404785",
"2+ c #101228",
"3+ c #3A3D53",
"4+ c #969DD7",
"5+ c #959CD7",
"6+ c #B5B8DC",
"7+ c #C5C5C5",
"8+ c #B2B2B2",
"9+ c #ADADAD",
"0+ c #B6A389",
"a+ c #E78907",
"b+ c #794D11",
"c+ c #414141",
"d+ c #5A5A5A",
"e+ c #717171",
"f+ c #818181",
"g+ c #838486",
"h+ c #4F5484",
"i+ c #4A4F7F",
"j+ c #494E7E",
"k+ c #4D5285",
"l+ c #555A94",
"m+ c #3E4588",
"n+ c #0A0B1A",
"o+ c #535675",
"p+ c #979ED8",
"q+ c #969CD7",
"r+ c #959BD7",
"s+ c #949AD6",
"t+ c #C1C4DD",
"u+ c #E1E1E1",
"v+ c #DBDBDB",
"w+ c #D5D5D5",
"x+ c #CEC8C0",
"y+ c #E3901D",
"z+ c #AB6606",
"A+ c #232221",
"B+ c #393939",
"C+ c #565656",
"D+ c #727272",
"E+ c #8A8A8A",
"F+ c #999999",
"G+ c #94959E",
"H+ c #5C629E",
"I+ c #585E99",
"J+ c #565C96",
"K+ c #585E9A",
"L+ c #5C63A3",
"M+ c #3C448A",
"N+ c #04050B",
"O+ c #7176A2",
"P+ c #949BD6",
"Q+ c #939AD6",
"R+ c #9299D5",
"S+ c #CED0DF",
"T+ c #D6D6D6",
"U+ c #CECDCB",
"V+ c #DF9A3A",
"W+ c #D17B03",
"X+ c #31291F",
"Y+ c #313131",
"Z+ c #434343",
"`+ c #595959",
" @ c #6F6F6F",
".@ c #838383",
"+@ c #ABABAB",
"@@ c #9A9CB0",
"#@ c #666DB1",
"$@ c #636AAD",
"%@ c #6167AA",
"&@ c #6167AB",
"*@ c #6369B0",
"=@ c #373F86",
"-@ c #010102",
";@ c #8D93CB",
">@ c #9399D6",
",@ c #9298D5",
"'@ c #DADBDF",
")@ c #AFAFAF",
"!@ c #A7A7A7",
"~@ c #C99B5A",
"{@ c #E58600",
"]@ c #553B17",
"^@ c #2F2F2F",
"/@ c #474747",
"(@ c #646464",
"_@ c #9A9A9A",
":@ c #999CBA",
"<@ c #6C73BC",
"[@ c #6970BA",
"}@ c #676EB7",
"|@ c #666EB7",
"1@ c #666DB8",
"2@ c #303779",
"3@ c #2B2D3E",
"4@ c #9399D5",
"5@ c #9198D5",
"6@ c #9097D4",
"7@ c #999FD5",
"8@ c #DEDEDF",
"9@ c #D2B58C",
"0@ c #89540A",
"a@ c #3D3D3D",
"b@ c #5C5C5C",
"c@ c #7A7A7A",
"d@ c #A8A8A8",
"e@ c #9296C0",
"f@ c #6E75C1",
"g@ c #6C73C0",
"h@ c #6A72BF",
"i@ c #6971BE",
"j@ c #646CBA",
"k@ c #2A306C",
"l@ c #454865",
"m@ c #9096D4",
"n@ c #8E95D4",
"o@ c #A7ABD6",
"p@ c #D4D4D4",
"q@ c #D0C2AE",
"r@ c #E68C0E",
"s@ c #BD7006",
"t@ c #282622",
"u@ c #343434",
"v@ c #747474",
"w@ c #909090",
"x@ c #BABABA",
"y@ c #888DC2",
"z@ c #6E75C4",
"A@ c #6C74C3",
"B@ c #6B72C2",
"C@ c #6A71C1",
"D@ c #5F67B8",
"E@ c #252A5F",
"F@ c #62668F",
"G@ c #9197D5",
"H@ c #8F96D4",
"I@ c #8E95D3",
"J@ c #8D94D3",
"K@ c #B5B8D7",
"L@ c #BCBCBC",
"M@ c #A6A6A6",
"N@ c #AA8D65",
"O@ c #E68703",
"P@ c #DC8002",
"Q@ c #3D2F1C",
"R@ c #323232",
"S@ c #4C4C4C",
"T@ c #696969",
"U@ c #858585",
"V@ c #9D9D9D",
"W@ c #AEAEAE",
"X@ c #BEBEBE",
"Y@ c #7E84C3",
"Z@ c #6D75C4",
"`@ c #6C73C3",
" # c #6A72C3",
".# c #6971C2",
"+# c #5B63B4",
"@# c #202551",
"## c #8187BE",
"$# c #8E94D3",
"%# c #8D93D3",
"&# c #8B92D2",
"*# c #C3C5D8",
"=# c #D3D3D3",
"-# c #B1A18A",
";# c #D88818",
"># c #644212",
",# c #2C2C2C",
"'# c #444444",
")# c #616161",
"!# c #7D7D7D",
"~# c #979797",
"{# c #A9A9A9",
"]# c #BDBDBE",
"^# c #737AC3",
"/# c #6B73C3",
"(# c #686FC2",
"_# c #555EAF",
":# c #1A1F44",
"<# c #202230",
"[# c #8C93D3",
"}# c #8A91D1",
"|# c #D0D1D9",
"1# c #B8B8B8",
"2# c #A0A0A0",
"3# c #85827E",
"4# c #AE782C",
"5# c #E68601",
"6# c #9E610C",
"7# c #252524",
"8# c #5F5F5F",
"9# c #767676",
"0# c #B9B9B9",
"a# c #B8B8BD",
"b# c #6A71C3",
"c# c #6970C2",
"d# c #676FC1",
"e# c #666EC1",
"f# c #5059AA",
"g# c #151836",
"h# c #3D405B",
"i# c #8C93D2",
"j# c #8B91D2",
"k# c #8990D1",
"l# c #8C92D1",
"m# c #D6D6D8",
"n# c #A2A2A2",
"o# c #666666",
"p# c #745C3A",
"q# c #D27E08",
"r# c #CE7B07",
"s# c #38332C",
"t# c #3C3C3C",
"u# c #535353",
"v# c #898989",
"w# c #9C9C9C",
"x# c #9E9E9E",
"y# c #989898",
"z# c #AEB0BC",
"A# c #6A71C2",
"B# c #6870C2",
"C# c #656CC0",
"D# c #4C54A6",
"E# c #0F1228",
"F# c #575B83",
"G# c #8C92D2",
"H# c #8A91D2",
"I# c #888FD1",
"J# c #878ED0",
"K# c #A9ADD2",
"L# c #C1C2D4",
"M# c #CFCFD3",
"N# c #CFCFCF",
"O# c #929292",
"P# c #777777",
"Q# c #5E5E5E",
"R# c #534E48",
"S# c #5B4D3A",
"T# c #6A6A6A",
"U# c #A4A6BC",
"V# c #676EC1",
"W# c #656DC1",
"X# c #646CC0",
"Y# c #636BBF",
"Z# c #4750A2",
"`# c #0B0D1C",
" $ c #787EB5",
".$ c #888ED0",
"+$ c #868DD0",
"@$ c #858CCF",
"#$ c #848BCF",
"$$ c #838ACE",
"%$ c #8289CD",
"&$ c #8B91CB",
"*$ c #979CC8",
"=$ c #A0A3C0",
"-$ c #A3A5B4",
";$ c #9E9FA2",
">$ c #8D8D8D",
",$ c #787878",
"'$ c #626262",
")$ c #969696",
"!$ c #999CBC",
"~$ c #656DC0",
"{$ c #6169BF",
"]$ c #434C9E",
"^$ c #181924",
"/$ c #8990D0",
"($ c #8289CE",
"_$ c #8188CD",
":$ c #8087CD",
"<$ c #7E85CB",
"[$ c #7B82C8",
"}$ c #777EC4",
"|$ c #7278BC",
"1$ c #6C72B0",
"2$ c #6C71A2",
"3$ c #6C7093",
"4$ c #6D6F86",
"5$ c #72737F",
"6$ c #7D7D7F",
"7$ c #A5A5A5",
"8$ c #B0B0B0",
"9$ c #8F93BC",
"0$ c #636BC0",
"a$ c #626ABF",
"b$ c #6169BE",
"c$ c #6068BE",
"d$ c #3F4898",
"e$ c #020306",
"f$ c #383A55",
"g$ c #868CCF",
"h$ c #7F86CC",
"i$ c #787FC4",
"j$ c #757CC1",
"k$ c #7A81C8",
"l$ c #787FC7",
"m$ c #757BC2",
"n$ c #7077BC",
"o$ c #6A71B3",
"p$ c #636AA9",
"q$ c #5D63A0",
"r$ c #5A609B",
"s$ c #5B619C",
"t$ c #686DA1",
"u$ c #7C80AA",
"v$ c #9194B1",
"w$ c #A6A7B7",
"x$ c #B6B6B9",
"y$ c #8388BC",
"z$ c #5F68BE",
"A$ c #5E66BD",
"B$ c #3A428F",
"C$ c #51557C",
"D$ c #6D74B3",
"E$ c #636689",
"F$ c #686977",
"G$ c #67697E",
"H$ c #6B6E8D",
"I$ c #6D719C",
"J$ c #6D72A9",
"K$ c #6C72B4",
"L$ c #6B71B8",
"M$ c #676EB3",
"N$ c #646BB0",
"O$ c #646AB0",
"P$ c #646BB3",
"Q$ c #666DB7",
"R$ c #686FBC",
"S$ c #6970BF",
"T$ c #6C74C1",
"U$ c #7980C0",
"V$ c #898DBE",
"W$ c #989BBB",
"X$ c #A6A8B8",
"Y$ c #A1A3B7",
"Z$ c #6870BE",
"`$ c #5F67BE",
" % c #5C64BC",
".% c #32397E",
"+% c #7176AF",
"@% c #747BBE",
"#% c #686978",
"$% c #757575",
"%% c #777A99",
"&% c #797B8D",
"*% c #7A7B7E",
"=% c #7B7B7B",
"-% c #7A7A7B",
";% c #767780",
">% c #73758C",
",% c #6F7398",
"'% c #6B70A5",
")% c #666DB3",
"!% c #6970BE",
"~% c #6971C0",
"{% c #6970C1",
"]% c #5F67BD",
"^% c #5961B9",
"/% c #2C3372",
"(% c #181925",
"_% c #838ACD",
":% c #7E86CC",
"<% c #6B709E",
"[% c #797979",
"}% c #747581",
"|% c #777EC8",
"1% c #767DC8",
"2% c #757CC7",
"3% c #757BB9",
"4% c #777BA8",
"5% c #7F7F80",
"6% c #808080",
"7% c #828282",
"8% c #7C7D88",
"9% c #757895",
"0% c #6B70A0",
"a% c #5F66AA",
"b% c #6068B7",
"c% c #646CBF",
"d% c #5E67BD",
"e% c #5D65BD",
"f% c #5B63BC",
"g% c #565EB6",
"h% c #282E67",
"i% c #363955",
"j% c #7F86CD",
"k% c #7E85CC",
"l% c #7C83CA",
"m% c #676981",
"n% c #737695",
"o% c #757DC8",
"p% c #747CC7",
"q% c #737AC7",
"r% c #7279C6",
"s% c #747ABA",
"t% c #848484",
"u% c #868686",
"v% c #8C8C8C",
"w% c #8B8B8C",
"x% c #717384",
"y% c #555A99",
"z% c #545BA5",
"A% c #555CA8",
"B% c #5A62B4",
"C% c #5A63BB",
"D% c #5961BB",
"E% c #525AB2",
"F% c #242A5D",
"G% c #51557F",
"H% c #8188CE",
"I% c #7C84CB",
"J% c #73737A",
"K% c #7075AB",
"L% c #747BC7",
"M% c #7179C6",
"N% c #7078C6",
"O% c #787CAC",
"P% c #878787",
"Q% c #8B8B8B",
"R% c #8E8E8E",
"S% c #8F8F8F",
"T% c #6E7193",
"U% c #5C64B9",
"V% c #535BA8",
"W% c #535AA8",
"X% c #5A62BB",
"Y% c #5860BA",
"Z% c #4F57AF",
"`% c #1E234F",
" & c #7076B3",
".& c #7D85CC",
"+& c #7C83CB",
"@& c #7B82CB",
"#& c #62689E",
"$& c #7C7C7D",
"%& c #7E7E7E",
"&& c #7F7F7F",
"*& c #79797C",
"=& c #7279C1",
"-& c #727AC7",
";& c #7077C5",
">& c #6F76C5",
",& c #7E819E",
"'& c #939393",
")& c #757789",
"!& c #5D66BD",
"~& c #4F56A2",
"{& c #5760BA",
"]& c #565EB9",
"^& c #4B54AC",
"/& c #1B1F46",
"(& c #1E2030",
"_& c #7F86CB",
":& c #7D84CB",
"<& c #7B82CA",
"[& c #7981CA",
"}& c #65688E",
"|& c #737589",
"1& c #7178C6",
"2& c #6F77C5",
"3& c #6E76C5",
"4& c #858693",
"5& c #959595",
"6& c #777988",
"7& c #5962BB",
"8& c #5158A8",
"9& c #545DB4",
"0& c #545DB9",
"a& c #4851A8",
"b& c #181C3E",
"c& c #393D5D",
"d& c #7B83CB",
"e& c #7A82CA",
"f& c #7980CA",
"g& c #767EC7",
"h& c #696B80",
"i& c #6E729B",
"j& c #6E76C4",
"k& c #6D74C4",
"l& c #6E75BE",
"m& c #8B8B8D",
"n& c #919191",
"o& c #71738E",
"p& c #5B64BC",
"q& c #4E56A4",
"r& c #555DB8",
"s& c #545CB9",
"t& c #535BB8",
"u& c #464EA5",
"v& c #131631",
"w& c #3F4367",
"x& c #7A81CA",
"y& c #7980C9",
"z& c #777FC9",
"A& c #6A71B6",
"B& c #797A81",
"C& c #696FAE",
"D& c #6C74C4",
"E& c #757AB3",
"F& c #666A94",
"G& c #565FB9",
"H& c #4D54A2",
"I& c #545CB8",
"J& c #525BB8",
"K& c #515AB7",
"L& c #434CA2",
"M& c #0F1227",
"N& c #292C44",
"O& c #7880C9",
"P& c #777EC9",
"Q& c #6268A5",
"R& c #78787F",
"S& c #6E75C3",
"T& c #6B72C3",
"U& c #7D81A8",
"V& c #9B9B9B",
"W& c #5A5F9B",
"X& c #5861BA",
"Y& c #575FBA",
"Z& c #555DB9",
"`& c #4B53A1",
" * c #5159B7",
".* c #5058B6",
"+* c #414AA0",
"@* c #0D0F21",
"#* c #5D629A",
"$* c #787FC9",
"%* c #666A96",
"&* c #6F728D",
"** c #87899E",
"=* c #565DA9",
"-* c #4B52A1",
";* c #4F58B6",
">* c #4E57B6",
",* c #3F489D",
"'* c #070813",
")* c #0E0F1B",
"!* c #434B90",
"~* c #575FAD",
"{* c #646CB9",
"]* c #4951A0",
"^* c #676A89",
"/* c #666B9C",
"(* c #686FC0",
"_* c #929297",
":* c #9F9F9F",
"<* c #87878C",
"[* c #565EB7",
"}* c #555EB9",
"|* c #4A51A2",
"1* c #4E56B6",
"2* c #4D55B5",
"3* c #3D469A",
"4* c #05060D",
"5* c #191D40",
"6* c #202552",
"7* c #434346",
"8* c #808081",
"9* c #88898A",
"0* c #7F829B",
"a* c #797EB0",
"b* c #6F76BA",
"c* c #6870C1",
"d* c #6F75B8",
"e* c #A1A1A1",
"f* c #797B8F",
"g* c #4F57B3",
"h* c #4A51A4",
"i* c #4D56B5",
"j* c #4C55B5",
"k* c #4B54B4",
"l* c #3B4497",
"m* c #020205",
"n* c #030304",
"o* c #202022",
"p* c #38393B",
"q* c #545458",
"r* c #707173",
"s* c #7F7F81",
"t* c #89898C",
"u* c #8F8F98",
"v* c #888BA3",
"w* c #898BA4",
"x* c #A4A4A4",
"y* c #6B6F93",
"z* c #535CB8",
"A* c #525AB8",
"B* c #4B53AA",
"C* c #4A52AB",
"D* c #4B53B4",
"E* c #4952B4",
"F* c #373F8C",
"G* c #040405",
"H* c #171719",
"I* c #303134",
"J* c #4B4B4E",
"K* c #69696F",
"L* c #7D7E82",
"M* c #898A8E",
"N* c #95969A",
"O* c #9D9D9E",
"P* c #5C6197",
"Q* c #525AB7",
"R* c #5059B7",
"S* c #4850A3",
"T* c #4B53B2",
"U* c #4A53B4",
"V* c #4952B3",
"W* c #4851B3",
"X* c #353D88",
"Y* c #010101",
"Z* c #0F1011",
"`* c #29292B",
" = c #424246",
".= c #606167",
"+= c #7C7D84",
"@= c #88898F",
"#= c #97979E",
"$= c #A2A3A5",
"%= c #4F559D",
"&= c #4F57B6",
"*= c #474EA0",
"== c #4951B3",
"-= c #4750B3",
";= c #464FB1",
">= c #2F3679",
",= c #0A0A0D",
"'= c #222226",
")= c #3A3A3C",
"!= c #575860",
"~= c #767781",
"{= c #878890",
"]= c #9798A0",
"^= c #8D8E92",
"/= c #474E94",
"(= c #4E56AF",
"_= c #4F57B5",
":= c #454C9E",
"<= c #464FB2",
"[= c #444DB0",
"}= c #2E3577",
"|= c #050507",
"1= c #1A1B1F",
"2= c #333337",
"3= c #47484E",
"4= c #262835",
"5= c #191C3F",
"6= c #2B3169",
"7= c #3F4794",
"8= c #474FA7",
"9= c #4750B2",
"0= c #464EB2",
"a= c #444DB1",
"b= c #424AAC",
"c= c #282E68",
"d= c #0E1024",
"e= c #242857",
"f= c #414AA8",
"g= c #434CB0",
"h= c #3E47A4",
"i= c #212654",
"j= c #374091",
"k= c #394294",
"l= c #12152E",
"m= c #010204",
"n= c #080A16",
" ",
" ",
" ",
" ",
" ",
" . ",
" + @ # # ",
" $ # # # # # # ",
" % & # # # # # # # # * ",
" = - # # # # # # # # # # # % ",
" @ # # # # # # # # # # # # # # ; > ",
" , # # # # # # # # # # # # # # ' > ",
" ) # # # # # # # # # # # # # ! > ",
" ~ # # # # # # # # # # # # { > ",
" ] ^ / ( _ : # # # # # # # # # # # < > ",
" [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g # # # # # # # # # # h i j ",
" k l m n o p q r s t u v w x y z A B C # # # # # # # # # # # D E F G ",
" H I J K L M r s t N v O P x Q R S T # # # # # # # # # # # # U V W X Y ",
" Z ` ...+.@.r y #.z R $.%.&.*.$.R =.# # # # # # # # # # # # # -.;.>.,.'. ",
" ).!.~.{.].^.t O /.$.(._.:.<.[.}.|.1.# # # # # # 2.3.4.# # # 5.6.7.8.9.0.> ",
" a.~.{.b.c.d.u v O w P /.x e.y f.g.# # # # # # # h.i.j.k.# # l.m.n.o.p.> > ",
" q.r.s.t.u.v.w w.<.x.y.<.z.z A.B.# # # # # # # C.D.E.F.G.H.# I.J.K.L.M.> > ",
" N.s.O.P.Q.R.O P S./.x T.U.<.V.# # # # # # # W.X.Y.Z.`. +.+++@+#+$+%+&+> > ",
" *+=+O.-+;+>+w ,+'+%.x &.T.)+!+# # # # # # # ~+{+]+^+/+(+_+:+<+[+}+|+1+2+> > ",
" 3+u.-+4+5+6+P T.7+x.8+9+}.0+a+# # # # # # # b+Y.c+d+e+f+g+h+i+j+k+l+m+n+> > ",
" o+p+q+r+s+t+/.u+x &.v+w+x+y+# # # # # # # z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+> ",
" O+q+P+Q+R+S+x &.&.v+T+U+V+# # # # # # # W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@> ",
" ;@P+>@,@,@'@,+[.)@+@!@~@# # # # # # # {@]@^@/@(@f+_@+@y.:@<@[@}@|@1@2@> > ",
" 3@s+4@5@6@7@8@e.v+$.,+9@1.# # # # # # # 0@E.a@b@c@9 d@y.w.e@f@g@h@i@j@k@> > ",
" l@R+5@m@n@o@e.)+Q p@q@r@# # # # # # # s@t@u@ +b@v@.@w@x@:.y@z@A@B@C@D@E@> > ",
" F@G@H@I@J@K@%.L@}.M@N@O@# # # # # # P@Q@R@S@T@U@V@W@<.L@X@Y@Z@`@ #.#+#@#> > ",
" ##H@$#%#&#*#T.$.=#U.L@-#;## # # # # >#,#'#)#!#~#{#y.w.:.]#^#/# #.#(#_#:#> > ",
" <#I@J@[#&#}#|#$.T+,+z 1#2#3#4#5## # 6#7#R@/@8#9#9 W@0#L@:.a#A@b#c#d#e#f#g#> > ",
" h#J@i#j#k#l#m#y w+(._.0#n#U@o#p#q#r#s#t#u#b v#w#x#y#y#M@L@z#A#B#d#e#C#D#E#> ",
" F#G#H#k#I#J#K#L#M#N#z L@}.O#P#Q#R#S#`.u#T#.@F+}.y.x@w.L@w.U#B#V#W#X#Y#Z#`#> ",
" $H#k#.$+$@$#$$$%$&$*$=$-$;$>$,$_+8#'$b f+)$M@8+1#w.w.x@0#!$e#~$X#Y#{$]$'.> ",
" ^$/$I#J#+$@$$$($_$:$<$[$}$|$1$2$3$4$5$6$0 )$7$8$x.x@w.x@0#1#9$~$0$a$b$c$d$e$> ",
" f$I#J#g$#$$$($_$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$x@x@0#<.x.y$Y#a$b$z$A$B$> > ",
" C$+$@$#$$$($:$D$E$F$F$G$H$I$J$K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$a$c$`$A$ %.%> > ",
" +%@$#$($_$:$@%#%$%9#9#%%&%*%=%-%;%>%,%'%)%!%~%{%B#d#e#~$X#a${$c$]%A$ %^%/%> > ",
" (%_%$$($_$:$:%<%9#,$[%}%|%1%2%3%4%5%6%f+7%.@8%9%0%a%b%c%0$a$b$c$d%e% %f%g%h%> > ",
" i%$$($_$j%k%l%m%[%c@=%n%o%p%q%r%s%.@t%U@u%0 v#E+v%w%x%y%z%z%A%B%e% %C%D%E%F%> > ",
" G%H%:$h$k%I%o$J%=%a !#K%L%q%M%N%O%u%P%0 v#Q%v%>$R%S%w@T%c$`$U%V%W%X%D%Y%Z%`%> > ",
" &:$h$.&+&@&#&$&%&&&*&=&-&M%;&>&,&0 v#Q%v%>$R%S%w@O#'&)&]%!& %f%~&Y%{&]&^&/&> > ",
" (&_&k%:&+&<&[&}&&&6%f+|&r%1&2&3&Z@4&Q%v%>$R%S%w@O#'&9 5&6&e% %f%7&8&9&]&0&a&b&> > ",
" c&k%:&d&e&f&g&h&f+7%t%i&N%2&j&k&l&m&>$R%S%n&O#'&9 5&)$y#o&p&X%D%Y%q&r&s&t&u&v&> ",
" w&I%@&x&y&z&A&B&t%U@.@C&>&z@D&/#E&R%S%n&O#'&9 5&)$y#F+_@F&X%D%{&G&H&I&J&K&L&M&> ",
" N&<&x&O&P&1%Q&U@u%P%R&S&Z@D&T&A#U&n&O#'&9 5&)$y#F+_@V&V&W&X&Y&]&Z&`&J& *.*+*@*> ",
" #*$*P&1%p%%*P%0 E+&*Z@`@ #.#B#**'&9 5&~#y#F+_@V&w#x#9 =*Y&]&0&t&-* *;*>*,*'*> ",
" )*!*~*{*]*^*E+Q%v%/*/# #.#(#(*_*5&~#y#F+_@V&w#x#:*2#<*[*}*I&t&K&|*;*1*2*3*4*> ",
" e$@*5*6*7*8*9*>$0*a*b*c*e#d*~#y#F+_@V&w#x#:*2#e*n#f*Z&I&J&K&g*h*i*j*k*l*m*> ",
" > > > n*o*p*q*r*s*t*u*v*w*F+_@V&V@x#:*2#e*n#x*7$y*z*A* *.*B*C*j*D*E*F*-@> ",
" > > > > > G*H*I*J*K*L*M*N*O*:*2#e*n#x*7$M@!@P*Q*R*;*>*S*T*U*V*W*X*0.> ",
" > > > > > Y*Z*`* =.=+=@=#=$=M@!@d@M@%=R*&=1*j**=U*==-=;=>=> > ",
" > > > > > > > ,='=)=!=~={=]=^=/=(=_=j*D*:=W*-=<=[=}=> > ",
" > > > > > > > |=1=2=3=4=5=6=7=8=:=9=0=a=b=c=> > ",
" > > > > > > > > > m*d=e=f=[=g=h=i=> > ",
" > > > > > > > > M.k@j=k=l=> > ",
" > > > m=n=> > > ",
" > > > > ",
" > > ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

+ 242
- 0
GUI/new.xpm View File

@@ -0,0 +1,242 @@
/* XPM */
static char * new_xpm[] = {
"48 61 178 2",
" c None",
". c #000000",
"+ c #161616",
"@ c #9E9E9E",
"# c #ACACAC",
"$ c #B5B5B5",
"% c #AEAEAE",
"& c #ABABAB",
"* c #A7A7A7",
"= c #959595",
"- c #949494",
"; c #919191",
"> c #909090",
", c #808080",
"' c #7D7D7D",
") c #7E7E7E",
"! c #7F7F7F",
"~ c #9A9A9A",
"{ c #A2A2A2",
"] c #B8B8B8",
"^ c #717171",
"/ c #3B3B3B",
"( c #D5D5D5",
"_ c #FFFFFF",
": c #A1A1A1",
"< c #C3C3C3",
"[ c #C7C7C7",
"} c #C8C8C8",
"| c #C9C9C9",
"1 c #CACACA",
"2 c #CBCBCB",
"3 c #CCCCCC",
"4 c #CDCDCD",
"5 c #CECECE",
"6 c #CFCFCF",
"7 c #D0D0D0",
"8 c #D1D1D1",
"9 c #D2D2D2",
"0 c #D3D3D3",
"a c #D4D4D4",
"b c #D6D6D6",
"c c #636363",
"d c #6C6C6C",
"e c #F4F4F4",
"f c #9F9F9F",
"g c #C1C1C1",
"h c #D7D7D7",
"i c #5D5D5D",
"j c #131313",
"k c #A0A0A0",
"l c #FDFDFD",
"m c #FAFAFA",
"n c #989898",
"o c #9D9D9D",
"p c #D8D8D8",
"q c #4B4B4B",
"r c #333333",
"s c #F6F6F6",
"t c #F2F2F2",
"u c #EEEEEE",
"v c #929292",
"w c #C2C2C2",
"x c #454545",
"y c #5C5C5C",
"z c #BBBBBB",
"A c #AFAFAF",
"B c #EAEAEA",
"C c #E6E6E6",
"D c #E2E2E2",
"E c #8B8B8B",
"F c #D9D9D9",
"G c #3D3D3D",
"H c #8C8C8C",
"I c #6D6D6D",
"J c #A3A3A3",
"K c #C4C4C4",
"L c #DADADA",
"M c #2B2B2B",
"N c #888888",
"O c #B6B6B6",
"P c #B3B3B3",
"Q c #AAAAAA",
"R c #939393",
"S c #C0C0C0",
"T c #DBDBDB",
"U c #282828",
"V c #767676",
"W c #C5C5C5",
"X c #C6C6C6",
"Y c #969696",
"Z c #B2B2B2",
"` c #DCDCDC",
" . c #272727",
".. c #6F6F6F",
"+. c #A9A9A9",
"@. c #BDBDBD",
"#. c #DDDDDD",
"$. c #252525",
"%. c #5E5E5E",
"&. c #DEDEDE",
"*. c #202020",
"=. c #606060",
"-. c #B4B4B4",
";. c #DFDFDF",
">. c #B9B9B9",
",. c #BFBFBF",
"'. c #B7B7B7",
"). c #E0E0E0",
"!. c #5B5B5B",
"~. c #E1E1E1",
"{. c #212121",
"]. c #BABABA",
"^. c #E3E3E3",
"/. c #616161",
"(. c #E4E4E4",
"_. c #626262",
":. c #E5E5E5",
"<. c #E7E7E7",
"[. c #676767",
"}. c #E8E8E8",
"|. c #2A2A2A",
"1. c #757575",
"2. c #E9E9E9",
"3. c #2D2D2D",
"4. c #797979",
"5. c #3F3F3F",
"6. c #7C7C7C",
"7. c #BEBEBE",
"8. c #EBEBEB",
"9. c #484848",
"0. c #ECECEC",
"a. c #515151",
"b. c #EDEDED",
"c. c #999999",
"d. c #666666",
"e. c #EFEFEF",
"f. c #F0F0F0",
"g. c #838383",
"h. c #F1F1F1",
"i. c #8F8F8F",
"j. c #F3F3F3",
"k. c #070707",
"l. c #1A1A1A",
"m. c #F5F5F5",
"n. c #1F1F1F",
"o. c #060606",
"p. c #323232",
"q. c #F7F7F7",
"r. c #151515",
"s. c #F8F8F8",
"t. c #313131",
"u. c #464646",
"v. c #F9F9F9",
"w. c #505050",
"x. c #565656",
"y. c #5A5A5A",
"z. c #FBFBFB",
"A. c #979797",
"B. c #686868",
"C. c #FCFCFC",
"D. c #6E6E6E",
"E. c #090909",
"F. c #828282",
"G. c #424242",
"H. c #0F0F0F",
"I. c #0C0C0C",
"J. c #030303",
"K. c #191919",
"L. c #3A3A3A",
"M. c #898989",
"N. c #A8A8A8",
"O. c #595959",
"P. c #363636",
"Q. c #141414",
"R. c #020202",
"S. c #8A8A8A",
"T. c #1B1B1B",
"U. c #010101",
" ",
" ",
" . ",
" + @ # $ % & & * = - = ; > , ' ' ) ! ! ! , , , > ~ { ] ^ ",
" / ( _ : % < [ } } | 1 2 2 3 4 4 5 6 6 7 8 8 9 0 a a ( b c ",
" d e _ _ f { g } | | 1 2 2 3 4 5 5 6 7 7 8 9 9 0 a a ( b h i ",
" j k _ _ l m n o g | 1 1 2 3 3 4 5 6 6 7 8 8 9 0 0 a ( ( b h p q ",
" r 8 l m s t u v o w 1 2 2 3 4 4 5 6 6 7 8 9 9 0 a a ( b b h p p x . ",
" y 4 z A 2 B C D E @ < 2 3 3 4 5 5 6 7 7 8 9 9 0 a ( ( b h h p F F G . . ",
" H o H ! I ' 1 b ) J K 3 4 4 5 6 6 7 8 8 9 0 0 a ( b b h p p F L L M . . ",
" N O $ P Q R ! S ) # [ 4 4 5 6 7 7 8 9 9 0 a a ( b b h p F F L T T U . . ",
" V W X X K z J Y R Z w W X 6 7 7 8 9 0 0 a ( ( b h h p F F L T ` ` .. . ",
" ..} } | 1 | S +.$ S [ @.3 7 8 8 9 0 a a ( b b h p p F L L T ` #.#.$.. . ",
" %.| | 1 2 2 2 z 1 4 6 w S S S W 7 a a ( b h h p F F L T T ` #.#.&.*.. . ",
" =.1 1 2 3 3 4 -.5 6 7 4 < 9 9 5 K w W ( ( 1 1 2 7 L T ` ` #.&.&.;.*.. . ",
" =.2 2 3 4 4 5 ] 6 7 8 6 >.,.2 a ( b 0 < '.4 0 a K T ` #.#.&.;.;.).*.. . ",
" !.3 3 4 5 5 | $ 6 7 8 6 w a } g } b h p 7 K L T X ` #.&.&.;.).).~.{.. . ",
" y 3 4 5 6 6 S ].S g g w w ( ( b 7 < 1 F 9 7 T ` [ [ | 1 L ;.~.~.D {.. . ",
" y 4 5 6 7 7 ,.9 9 0 a a ( b b h p F 8 W W 8 ` #.6 F ;.#.7 2 a D ^.{.. . ",
" /.5 6 7 7 8 g 0 0 a ( ( b h h p F F L T a } a &.F 6 ).).~.D D ^.(.{.. . ",
" _.6 7 S K W @.0 a ( b b h p p F L L T 7 S 1 &.;.#.z 2 2 3 ~.^.(.:.{.. . ",
" c 7 8 S 7 7 O 8 ( b h h p F F L T L X 7 3 ,.T ).).1 D D ^.(.(.:.C U . . ",
" c 8 9 w 0 a 8 O X 0 h p F F L T b K L 8 4 2 ).).~.2 ^.^.(.:.:.C <.U . . ",
" [.9 0 < a ( b w a | W K ] [ z L K #.b 2 ;.1 ~.~.D 5 ^.(.:.C C <.}.|.. . ",
" 1.0 a '.( b h 2 7 F F L S W 1 w ` T [ ).( < &.` T K (.:.C <.<.}.2.3.. . ",
" 4.a ( < ( h p a O X } } z 1 ` X F X ;.).[ 3 ( b h ^.:.C <.<.}.2.B 5.. . ",
" 6.( b 7 g X X [ ,.7 F L | p &.` 7.;.~.2 &.` ^.(.:.C C <.}.}.2.B B x . . ",
" ! b h h p F F p F T ` #.p 3 ;.;.2 ;.( ( ^.(.:.:.C <.<.}.2.2.B 8.8.9.. . ",
" ; h p p F L L T ` ` #.&.&.3 4 4 4 L 4 ^.(.:.:.C <.}.}.2.B B 8.0.0.a.. . ",
" n p F F L T T ` #.#.&.;.;.).~.D ).| ^.(.:.C C <.}.}.2.B 8.8.0.b.b.=.. . ",
" c.F L L T ` ` #.&.&.` #.;.~.D ^.5 ;.:.:.C <.<.}.2.2.B 8.0.0.b.u u d.. . ",
" & L L T ` #.#.5 #.9 3 4 < D ^.T 8 :.C C <.}.}.2.B B 8.0.0.b.u e.e.1.. . ",
" $ T T ` #.#.&.2 #.).~.D F a D 1 :.C C <.}.2.2.B 8.8.0.b.b.u e.e.f.g.. . ",
" '.` ` #.&.&.;.3 &.~.D ^.^.2 1 ^.C <.&.D <.&.B T 2.0 0 ( p D f.f.h.i.. . ",
" . 3 #.#.&.;.;.).4 ;.D ^.(.(.p 6 C <.}.}.2.B B 8.0.b.b.u e.e.f.h.h.t : . . ",
" . a &.&.;.).).~.F a ~.D D ^.(.5 <.}.2.2.B D (.0.:.#.( ( b L h.t t j.Z . . ",
" k.h ;.;.).~.~.D ~.6 6 7 7 8 9 F }.2.B B 8.~.D b.(.C u e.f.h.t j.j.e < . . ",
" l.#.;.).~.D D ^.(.(.:.C C <.}.}.2.B 8.8.0.F a b p 8.f.u e.t j.e e m.&.. . ",
" n.).).~.D ^.^.(.:.:.C <.<.}.2.2.B 8.8.B b.u u e.f.f.h.(.:.j.e e m.s 0.o.. . ",
" p.~.~.D ^.^.(.:.C C <.}.}.2.B B 8.0.0.;.a h u b.F L L e.D ` j.m.s q.q.r.. . ",
" 5.D D ^.(.(.:.C C <.}.2.2.B 8.8.0.b.b.u e.e.f.h.t t h.h.t e e e q.s.s.t.. . ",
" u.^.^.(.:.:.C <.<.}.2.B B 8.0.0.b.<.L e.` h b 2.j.j.` T T 0.^.#.m.v.v.w.. . ",
" x.(.(.:.C C <.}.}.2.B B 8.0.b.b.u u u f.f.h.t j.j.e m.s s q.s.s.v.m m ^ . . ",
" y.(.:.C <.<.}.2.2.B 8.8.0.b.b.u e.f.f.h.t t j.e e m.s s q.s.v.v.m z.z.A.. . ",
" B.:.C <.}.}.2.B B 8.0.0.b.u u e.f.h.h.t j.j.e m.m.s q.q.s.v.v.m z.C.C.K . . ",
" D.C <.}.}.2.B 8.8.0.b.b.u e.e.f.h.h.t j.e e e t B C C ;.;.).~.2.0.s.l e E.. ",
" F.<.}.2.2.B 8.8.0.b.u b.~.X & v 6.[.a.G.3.{.H.I.J.. . . . . . . . I.K.L.H.. ",
" M.}.2.B B B 9 N.' O.P.Q.R.. . . . . . . . . . . . . . . . . . . . . . . . . ",
" f 2.4 S.w.T.U.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
" %./ J.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
" . . . . . . . . . . . . . . . . . . ",
" . . . . . . . . ",
" . . ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

+ 843
- 0
GUI/options.xpm View File

@@ -0,0 +1,843 @@
/* XPM */
static char * options_xpm[] = {
"48 51 789 2",
" c None",
". c #040508",
"+ c #0A0B12",
"@ c #141523",
"# c #1C1D2F",
"$ c #262940",
"% c #313451",
"& c #3C3F61",
"* c #474B71",
"= c #3B3E5C",
"- c #000000",
"; c #040405",
"> c #171929",
", c #6167AA",
"' c #686EB3",
") c #6B71B5",
"! c #6E74B6",
"~ c #7076B7",
"{ c #7379B9",
"] c #767BBA",
"^ c #787EBB",
"/ c #6F74AB",
"( c #0F0F15",
"_ c #6F729C",
": c #585A7A",
"< c #0E0E13",
"[ c #08090F",
"} c #24263D",
"| c #6A70B4",
"1 c #6D73B6",
"2 c #6F75B7",
"3 c #7278B8",
"4 c #757ABA",
"5 c #777DBB",
"6 c #7A7FBC",
"7 c #7D82BE",
"8 c #7F84BE",
"9 c #060609",
"0 c #171821",
"a c #7A7EAB",
"b c #8F94C7",
"c c #9296C8",
"d c #8A8DBB",
"e c #3B3C4F",
"f c #020203",
"g c #030406",
"h c #373B65",
"i c #5A60A4",
"j c #1E2035",
"k c #2F314E",
"l c #7177B8",
"m c #7479B9",
"n c #767CBA",
"o c #797EBC",
"p c #7C81BD",
"q c #7E83BE",
"r c #8186C0",
"s c #8388C1",
"t c #14151D",
"u c #22232F",
"v c #8387B6",
"w c #9195C8",
"x c #9398C9",
"y c #969ACA",
"z c #999DCC",
"A c #9B9FCD",
"B c #777A9B",
"C c #1B1C23",
"D c #0D0E19",
"E c #4C518A",
"F c #6369B1",
"G c #656BB2",
"H c #676DB1",
"I c #333656",
"J c #010102",
"K c #3B3E60",
"L c #7378B9",
"M c #757BBA",
"N c #787DBB",
"O c #7B80BC",
"P c #8085BF",
"Q c #8287C0",
"R c #858AC2",
"S c #888CC3",
"T c #1F202C",
"U c #303244",
"V c #8B8FC0",
"W c #9297C8",
"X c #9599CA",
"Y c #989CCB",
"Z c #9A9ECC",
"` c #9DA1CE",
" . c #A0A3CF",
".. c #A2A6D0",
"+. c #A0A3CB",
"@. c #545569",
"#. c #060608",
"$. c #1E2036",
"%. c #5A60A3",
"&. c #646AB1",
"*. c #676DB3",
"=. c #6C72B5",
"-. c #4B4E79",
";. c #4D507A",
">. c #777CBB",
",. c #797FBC",
"'. c #7F84BF",
"). c #8489C1",
"!. c #878BC3",
"~. c #898EC4",
"{. c #8C91C5",
"]. c #65688C",
"^. c #9094C6",
"/. c #9498C9",
"(. c #979BCB",
"_. c #9CA0CD",
":. c #9EA2CE",
"<. c #A1A5D0",
"[. c #A4A7D1",
"}. c #A6AAD2",
"|. c #A9ACD4",
"1. c #ACB0D3",
"2. c #31323A",
"3. c #030305",
"4. c #35385F",
"5. c #6369B0",
"6. c #666CB2",
"7. c #686FB4",
"8. c #7076B8",
"9. c #7B80BD",
"0. c #868AC2",
"a. c #888DC3",
"b. c #8B90C5",
"c. c #8E92C6",
"d. c #9095C7",
"e. c #9397C9",
"f. c #959ACA",
"g. c #A0A4CF",
"h. c #A3A6D1",
"i. c #A5A9D2",
"j. c #A8ACD3",
"k. c #ABAED5",
"l. c #B4B7DA",
"m. c #C4C8E5",
"n. c #40414B",
"o. c #0C0D16",
"p. c #4B4F86",
"q. c #676EB3",
"r. c #8589C2",
"s. c #878CC3",
"t. c #8A8FC4",
"u. c #8C91C6",
"v. c #9499C9",
"w. c #9FA3CF",
"x. c #A2A5D0",
"y. c #A4A8D1",
"z. c #A7AAD3",
"A. c #AAADD4",
"B. c #ACB0D5",
"C. c #B6B9DB",
"D. c #C0C4E2",
"E. c #BFC3E2",
"F. c #484A55",
"G. c #2D3044",
"H. c #7076B5",
"I. c #696FB4",
"J. c #8488C1",
"K. c #868BC2",
"L. c #8E93C6",
"M. c #A1A4D0",
"N. c #A3A7D1",
"O. c #ABAFD5",
"P. c #AEB1D6",
"Q. c #BABEDE",
"R. c #B9BDDD",
"S. c #B8BCDD",
"T. c #4F515F",
"U. c #20212C",
"V. c #8289B7",
"W. c #7C82B6",
"X. c #7379B7",
"Y. c #8D92C6",
"Z. c #9094C7",
"`. c #A5A8D2",
" + c #A8ABD3",
".+ c #AAAED4",
"++ c #ADB0D6",
"@+ c #AFB2D7",
"#+ c #B3B7D9",
"$+ c #B5B9DA",
"%+ c #B4B8D9",
"&+ c #B2B6D8",
"*+ c #565869",
"=+ c #0F1016",
"-+ c #7A80B0",
";+ c #7A81B1",
">+ c #787EB4",
",+ c #797FBB",
"'+ c #8F93C7",
")+ c #9196C8",
"!+ c #9FA2CF",
"~+ c #A9ADD4",
"{+ c #ACAFD5",
"]+ c #AEB2D6",
"^+ c #B1B4D8",
"/+ c #B4B7D9",
"(+ c #B6B9DA",
"_+ c #B9BBDB",
":+ c #BBBEDD",
"<+ c #BDC0DE",
"[+ c #BFC2DF",
"}+ c #B7B9D3",
"|+ c #AEB0C7",
"1+ c #A7A9BD",
"2+ c #494953",
"3+ c #6D73A4",
"4+ c #747BB1",
"5+ c #777DB5",
"6+ c #7A80BA",
"7+ c #969AC8",
"8+ c #9297C5",
"9+ c #8E93C1",
"0+ c #9095C3",
"a+ c #ADB1D6",
"b+ c #B0B3D7",
"c+ c #B3B6D9",
"d+ c #B5B8DA",
"e+ c #B8BBDB",
"f+ c #BBBDDD",
"g+ c #C0C2DF",
"h+ c #C3C5E1",
"i+ c #C5C7E2",
"j+ c #C8CAE3",
"k+ c #CACDE4",
"l+ c #CDCFE6",
"m+ c #525467",
"n+ c #3B3E5E",
"o+ c #606599",
"p+ c #777CBA",
"q+ c #8D91C6",
"r+ c #999DCB",
"s+ c #A3A8CF",
"t+ c #9BA0C8",
"u+ c #8C92BD",
"v+ c #7C83B2",
"w+ c #6D74A7",
"x+ c #656CA2",
"y+ c #8F94C1",
"z+ c #B2B5D8",
"A+ c #B7BADB",
"B+ c #BABCDC",
"C+ c #BCBFDD",
"D+ c #BFC1DF",
"E+ c #C2C4E0",
"F+ c #C4C7E1",
"G+ c #C7C9E3",
"H+ c #C9CCE4",
"I+ c #CCCEE5",
"J+ c #CFD1E7",
"K+ c #D1D3E8",
"L+ c #565A78",
"M+ c #06070A",
"N+ c #7278B4",
"O+ c #8C90C5",
"P+ c #989DCB",
"Q+ c #B0B5D8",
"R+ c #ACB1D4",
"S+ c #9DA2C9",
"T+ c #8D93BE",
"U+ c #7D84B3",
"V+ c #6E75A8",
"W+ c #5E669D",
"X+ c #525A95",
"Y+ c #A0A4CC",
"Z+ c #BEC0DE",
"`+ c #C0C3DF",
" @ c #C6C8E2",
".@ c #C8CBE3",
"+@ c #CBCDE5",
"@@ c #CED0E6",
"#@ c #D0D2E7",
"$@ c #D3D5E9",
"%@ c #CCCFE4",
"&@ c #666B91",
"*@ c #171823",
"=@ c #7D83BE",
"-@ c #BCC0E0",
";@ c #ADB2D5",
">@ c #9EA3CA",
",@ c #8E94BF",
"'@ c #7F85B4",
")@ c #6F77A9",
"!@ c #60689E",
"~@ c #505993",
"{@ c #858BB8",
"]@ c #BABDDC",
"^@ c #BDBFDE",
"/@ c #C2C5E0",
"(@ c #C7CAE3",
"_@ c #CACCE4",
":@ c #D2D4E8",
"<@ c #D5D6EA",
"[@ c #D7D9EB",
"}@ c #C0C3DC",
"|@ c #7B81AD",
"1@ c #030304",
"2@ c #282A3D",
"3@ c #A1A4CF",
"4@ c #AFB3D6",
"5@ c #9FA4CB",
"6@ c #9096C0",
"7@ c #8087B5",
"8@ c #7178AA",
"9@ c #61699F",
"0@ c #525A94",
"a@ c #9B9FC7",
"b@ c #BCBEDD",
"c@ c #BEC1DE",
"d@ c #C1C3E0",
"e@ c #C4C6E1",
"f@ c #C6C9E2",
"g@ c #C9CBE4",
"h@ c #D4D5E9",
"i@ c #D6D8EA",
"j@ c #D9DAEC",
"k@ c #DBDDED",
"l@ c #B3B7D4",
"m@ c #878DBA",
"n@ c #121218",
"o@ c #3C3E58",
"p@ c #9EA1CE",
"q@ c #A6A9D2",
"r@ c #AEB2D5",
"s@ c #A1A6CC",
"t@ c #9197C1",
"u@ c #8288B6",
"v@ c #7279AB",
"w@ c #636BA1",
"x@ c #8389B6",
"y@ c #C5C8E2",
"z@ c #CDCFE5",
"A@ c #D3D4E9",
"B@ c #D5D7EA",
"C@ c #D8D9EB",
"D@ c #DADCEC",
"E@ c #DDDEEE",
"F@ c #E0E1EF",
"G@ c #A6AACD",
"H@ c #272834",
"I@ c #4F5272",
"J@ c #8E93C3",
"K@ c #8A8EBD",
"L@ c #8388B7",
"M@ c #9498C4",
"N@ c #A5A8D1",
"O@ c #A7ABD3",
"P@ c #ADB0D5",
"Q@ c #A7ABD0",
"R@ c #9297C1",
"S@ c #A8ACD0",
"T@ c #B0B4D3",
"U@ c #A9ADCF",
"V@ c #C9CCE2",
"W@ c #D9DBEC",
"X@ c #DCDDED",
"Y@ c #DFE0EF",
"Z@ c #E1E3F0",
"`@ c #E3E4F0",
" # c #999EC6",
".# c #9399C2",
"+# c #3F4153",
"@# c #5E6288",
"## c #858ABF",
"$# c #8288BB",
"%# c #7F85B7",
"&# c #7A81B2",
"*# c #757CAD",
"=# c #787FB4",
"-# c #B9BBDC",
";# c #C3C6E1",
"># c #C8CBE4",
",# c #D4D6E9",
"'# c #979CC3",
")# c #7980B0",
"!# c #8C92BC",
"~# c #ADB1D0",
"{# c #CED0E4",
"]# c #D3D5E6",
"^# c #989DC6",
"/# c #999EC7",
"(# c #595C73",
"_# c #626893",
":# c #7078AA",
"<# c #7077AA",
"[# c #7077A9",
"}# c #7E84B8",
"|# c #9CA0CE",
"1# c #B8BADB",
"2# c #DADBEC",
"3# c #D8DAEB",
"4# c #898FB9",
"5# c #7178AB",
"6# c #7279A5",
"7# c #6F7393",
"8# c #9DA3CA",
"9# c #747893",
"0# c #494E71",
"a# c #6A72A6",
"b# c #6A71A5",
"c# c #6971A5",
"d# c #6B73A7",
"e# c #898EC0",
"f# c #B7B9DB",
"g# c #B9BCDC",
"h# c #C1C4E0",
"i# c #DEDFEE",
"j# c #E1E2F0",
"k# c #D8D9EA",
"l# c #7B81B0",
"m# c #6C73A7",
"n# c #6B72A6",
"o# c #7379A9",
"p# c #A3A8CE",
"q# c #A4A9CF",
"r# c #9195B6",
"s# c #010101",
"t# c #343854",
"u# c #646CA1",
"v# c #6D74A9",
"w# c #959AC8",
"x# c #B6B8DA",
"y# c #DBDCEC",
"z# c #DDDFEE",
"A# c #E2E4F0",
"B# c #E5E6F2",
"C# c #E8E9F3",
"D# c #D2D4E5",
"E# c #6E75A7",
"F# c #656DA2",
"G# c #676EA0",
"H# c #A9ADD2",
"I# c #AAAFD3",
"J# c #A4A8CA",
"K# c #030303",
"L# c #222539",
"M# c #60679F",
"N# c #9A9ECB",
"O# c #BBBDDA",
"P# c #D2D3E8",
"Q# c #D7D8EB",
"R# c #DCDEED",
"S# c #E4E5F1",
"T# c #E7E8F3",
"U# c #E9EAF4",
"V# c #ECEDF5",
"W# c #EFEFF7",
"X# c #C7CADE",
"Y# c #626AA0",
"Z# c #5F679E",
"`# c #5F679D",
" $ c #A8ACCF",
".$ c #B0B4D7",
"+$ c #8A8EA8",
"@$ c #586099",
"#$ c #878DBC",
"$$ c #CACDE8",
"%$ c #C3C5E0",
"&$ c #D6D7EA",
"*$ c #BFC1D2",
"=$ c #D1D3E2",
"-$ c #E0E2EF",
";$ c #E3E4F1",
">$ c #E6E7F2",
",$ c #EBECF5",
"'$ c #EEEEF6",
")$ c #F0F1F7",
"!$ c #F3F3F9",
"~$ c #F6F6FA",
"{$ c #9BA0C2",
"]$ c #59629A",
"^$ c #596199",
"/$ c #A3A8CC",
"($ c #B5BADB",
"_$ c #67697C",
":$ c #07080D",
"<$ c #505992",
"[$ c #767DAF",
"}$ c #9095C2",
"|$ c #CACEE9",
"1$ c #D0D3ED",
"2$ c #C2C5DF",
"3$ c #888CA5",
"4$ c #D8DAE6",
"5$ c #EAEBF4",
"6$ c #EDEDF6",
"7$ c #EFF0F7",
"8$ c #F2F2F8",
"9$ c #F4F5F9",
"0$ c #F7F7FB",
"a$ c #D2D5E7",
"b$ c #545C96",
"c$ c #535B95",
"d$ c #9A9FC6",
"e$ c #BBBFDF",
"f$ c #41424D",
"g$ c #444C83",
"h$ c #4B5490",
"i$ c #6B72A8",
"j$ c #787FB0",
"k$ c #9CA1CA",
"l$ c #C1C3DF",
"m$ c #C8CBE6",
"n$ c #CED1EC",
"o$ c #CCCFE9",
"p$ c #DEE0EE",
"q$ c #8F95C0",
"r$ c #898DA9",
"s$ c #DDDEE8",
"t$ c #ECECF5",
"u$ c #EEEFF6",
"v$ c #F1F1F8",
"w$ c #F3F4F9",
"x$ c #F7F7FA",
"y$ c #C4C7DF",
"z$ c #8389B7",
"A$ c #4E5792",
"B$ c #4D5691",
"C$ c #8D93BD",
"D$ c #1A1B1F",
"E$ c #353C6A",
"F$ c #454E8B",
"G$ c #6067A0",
"H$ c #747BAD",
"I$ c #ACB0D4",
"J$ c #C2C5E1",
"K$ c #C6C9E5",
"L$ c #C8CCE8",
"M$ c #C7CBE7",
"N$ c #CACDE7",
"O$ c #DBDCED",
"P$ c #CBCEE7",
"Q$ c #888EBB",
"R$ c #8C90B0",
"S$ c #E1E2EA",
"T$ c #F2F3F8",
"U$ c #F5F5FA",
"V$ c #F8F8FB",
"W$ c #F4F4F9",
"X$ c #B5B9D6",
"Y$ c #999FC7",
"Z$ c #989EC6",
"`$ c #8B91BD",
" % c #48518E",
".% c #48518D",
"+% c #7E84B2",
"@% c #B3B6D0",
"#% c #020202",
"$% c #272D52",
"%% c #3F4887",
"&% c #555D99",
"*% c #6B73A6",
"=% c #BBBEDC",
"-% c #C2C5E3",
";% c #C3C7E4",
">% c #C2C6E4",
",% c #C1C5E3",
"'% c #CDCFE7",
")% c #E7E7F3",
"!% c #C5C8E5",
"~% c #7F86B5",
"{% c #898EB1",
"]% c #E6E7EC",
"^% c #F9FAFC",
"/% c #EDEDF5",
"(% c #A7ACCE",
"_% c #969BC4",
":% c #949AC3",
"<% c #9399C3",
"[% c #464F8C",
"}% c #424B89",
"|% c #6B72A5",
"1% c #8C8EA1",
"2% c #1B1F3C",
"3% c #394283",
"4% c #4A5391",
"5% c #666DA2",
"6% c #646CA2",
"7% c #BFC2E1",
"8% c #BEC2E0",
"9% c #BDC1E0",
"0% c #BCC0DF",
"a% c #BBBFDE",
"b% c #D2D4E9",
"c% c #D8DAEC",
"d% c #787FAF",
"e% c #777EAF",
"f% c #767DAE",
"g% c #8187AD",
"h% c #CDD0DF",
"i% c #9BA0C7",
"j% c #9096C1",
"k% c #3C4685",
"l% c #555D96",
"m% c #626470",
"n% c #14162A",
"o% c #323B7A",
"p% c #374079",
"q% c #60679E",
"r% c #5D659A",
"s% c #B2B6D5",
"t% c #B7BBDC",
"u% c #B6BBDB",
"v% c #DFE1EF",
"w% c #E2E3F0",
"x% c #E3E5F1",
"y% c #B8BCDC",
"z% c #8F95BF",
"A% c #6F76A9",
"B% c #8289B5",
"C% c #8A90BC",
"D% c #898FBB",
"E% c #404567",
"F% c #232952",
"G% c #394179",
"H% c #32333A",
"I% c #555D93",
"J% c #586199",
"K% c #575F98",
"L% c #A0A5C8",
"M% c #B1B5D8",
"N% c #AFB4D6",
"O% c #AAAFD2",
"P% c #B6B9D6",
"Q% c #BABDD8",
"R% c #BBBED9",
"S% c #BFC2DB",
"T% c #C2C5DD",
"U% c #C4C7DD",
"V% c #C9CCE0",
"W% c #C8CBE2",
"X% c #6870A4",
"Y% c #686FA4",
"Z% c #676FA3",
"`% c #666EA3",
" & c #787FAE",
".& c #888EBA",
"+& c #868DB9",
"@& c #858BB9",
"#& c #848AB8",
"$& c #44475F",
"%& c #070708",
"&& c #454C7B",
"*& c #525B95",
"=& c #515A94",
"-& c #8D92BB",
";& c #ABAFD3",
">& c #AAAED2",
",& c #A4A9CE",
"'& c #8188B6",
")& c #8187B5",
"!& c #8086B5",
"~& c #7E85B4",
"{& c #AEB3D5",
"]& c #61689F",
"^& c #7E84B3",
"/& c #565B7C",
"(& c #353B64",
"_& c #4D5591",
":& c #4C5590",
"<& c #4C5490",
"[& c #7980AE",
"}& c #A2A7CD",
"|& c #A1A6CD",
"1& c #7B81B1",
"2& c #757CAE",
"3& c #A9AED2",
"4& c #59619A",
"5& c #7B82B1",
"6& c #7A80B1",
"7& c #797FB0",
"8& c #676D97",
"9& c #000001",
"0& c #20233E",
"a& c #47508D",
"b& c #454E8C",
"c& c #666DA0",
"d& c #9CA1C9",
"e& c #747BAC",
"f& c #737AAC",
"g& c #A1A7CD",
"h& c #565F98",
"i& c #515994",
"j& c #4F5893",
"k& c #545D96",
"l& c #2C325C",
"m& c #404988",
"n& c #3F4987",
"o& c #525A92",
"p& c #979CC5",
"q& c #959AC4",
"r& c #6D74A8",
"s& c #6970A4",
"t& c #9EA4CA",
"u& c #5D659C",
"v& c #49528E",
"w& c #737AAB",
"x& c #6E76A9",
"y& c #5E6490",
"z& c #08090D",
"A& c #030407",
"B& c #2F376B",
"C& c #394383",
"D& c #3E4785",
"E& c #9095C0",
"F& c #797FAE",
"G& c #636AA0",
"H& c #60689F",
"I& c #383A4D",
"J& c #323867",
"K& c #414A88",
"L& c #4F557C",
"M& c #09090E",
"N& c #070811",
"O& c #2F3773",
"P& c #333C7E",
"Q& c #8087B4",
"R& c #71769B",
"S& c #26283A",
"T& c #5C649B",
"U& c #5B639B",
"V& c #5A629A",
"W& c #9499C3",
"X& c #121319",
"Y& c #020204",
"Z& c #262C55",
"`& c #384282",
" * c #384182",
".* c #5B649B",
"+* c #6970A5",
"@* c #3E4363",
"#* c #0B0E1E",
"$* c #2E3778",
"%* c #6C73A5",
"&* c #6D7298",
"** c #0C0D11",
"=* c #09090F",
"-* c #576098",
";* c #565E97",
">* c #555D97",
",* c #535C95",
"'* c #7F84AB",
")* c #1A1F42",
"!* c #303A7C",
"~* c #61699E",
"{* c #2D3048",
"]* c #121630",
"^* c #5A6298",
"/* c #696F96",
"(* c #0D0D12",
"_* c #4B5287",
":* c #505893",
"<* c #4F5892",
"[* c #4C5591",
"}* c #5E6280",
"|* c #131631",
"1* c #434B88",
"2* c #5A6195",
"3* c #1D1F30",
"4* c #262A41",
"5* c #0C0D12",
"6* c #393F6D",
"7* c #4A538F",
"8* c #3D4055",
"9* c #171A2B",
"0* c #10121C",
"a* c #282E53",
"b* c #434C8A",
"c* c #414A89",
"d* c #404A88",
"e* c #404987",
"f* c #3E4786",
"g* c #1E202B",
"h* c #0E101D",
"i* c #1C203D",
"j* c #1E2343",
"k* c #202549",
"l* c #202548",
"m* c #20254A",
"n* c #232950",
" ",
" ",
" . + @ # $ % & * = - ; - ",
" > , ' ) ! ~ { ] ^ / - ( _ : < ",
" - [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e f ",
" g h i j - k ! l m n o p q r s t - u v w x y z A B C - ",
" D E F G H I J K L M N O 7 P Q R S T U V W X Y Z ` ...+.@.#. ",
" - $.%.&.*.| =.2 -.;.>.,.p '.r ).!.~.{.].^./.(.z _.:.<.[.}.|.1.2. ",
" 3.4.5.6.7.) ! 8.{ ] ^ 9.q P s 0.a.b.c.d.e.f.Y A ` g.h.i.j.k.l.m.n. ",
" o.p.G q.| 1 2 3 4 5 6 7 '.Q r.s.t.u.b c v.(.Z _.w.x.y.z.A.B.C.D.E.F.- ",
" G.H.I.=.! l m n o p q r J.K.~.b.L.w x y z A :.M.N.}.|.O.P.C.Q.R.S.T.- ",
" U.V.W.X.L M N 9.7 P Q R a.t.Y.Z.W X Y Z ` ...`. +.+++@+#+$+%+#+&+*+- - - ",
" =+-+;+;+>+,+p '.r ).s.~.{.'+)+/.(.z _.!+<.y.}.~+{+]+^+/+(+_+:+<+[+}+|+1+2+ ",
" 3.3+4+5+6+q P s K.a.b.c.d.e.f.7+8+9+0+g.i.j.k.a+b+c+d+e+f+<+g+h+i+j+k+l+m+- ",
" - n+o+p+6 7 '.Q R s.t.q+b c X r+s+t+u+v+w+x+y+B.@+z+/+A+B+C+D+E+F+G+H+I+J+K+L+- ",
" M+N+o p q r ).K.~.O+L.w x y P+Q+R+S+T+U+V+W+X+Y+c+(+_+:+Z+`+h+ @.@+@@@#@$@%@&@- ",
" *@9.=@P s R a.t.Y.Z.W X Y Z g.-@;@>@,@'@)@!@~@{@A+]@^@[+/@i+(@_@l+J+:@<@[@}@|@1@ ",
" 2@'.Q ).s.~.{.'+)+/.(.z _.!+3@R.4@5@6@7@8@9@0@a@b@c@d@e@f@g@I+@@K+h@i@j@k@l@m@n@- ",
" o@s K.a.b.c.d.e.y Y A p@g.N.q@.+r@s@t@u@v@w@x@<+`+h+y@j++@z@#@A@B@C@D@E@F@G@T+H@- ",
" I@s.t.q+b c J@K@L@M@w...N@O@A.B.P@Q@t+R@6@S@D+E+F+G+_@I+J+T@U@V@W@X@Y@Z@`@ #.#+#- ",
" - @###$#%#&#*#*#=#/.<.N.}.|.O.P.^+c+(+-#:+Z+d@;# @>#+@@@#@$@,#'#)#!#~#{#`@]#^#/#(#- ",
" - _#:#<#<#[#)@}#|#..i. +.+++b+z+d+1#]@^@[+/@i+(@_@l+J+:@<@[@2#3#4#v@5#8@6#7#8#5@9#- ",
" - 0#a#b#c#d#e#<.y.z.~+{+@+^+/+f#g#b@c@h#e@f@g@I+@@K+h@i@j@X@i#j#k#l#m#n#a#o#p#q#r#s#- ",
" t#u#u#v#w#N.q@j.k.P.b+c+x#e+f+<+`+h+y@j++@l+#@A@B@C@y#z#F@A#B#C#D#E#F#x+G#H#I#J#K#- ",
" L#W+M#N#`.O@A.++@+z+/+A+]@^@O#E+F+G+_@I+J+P#,#Q#W@R#Y@Z@S#T#U#V#W#X#Y#Z#`# $.$+$- - ",
" @ @$@$#$O@O.P.^+c+(+-#:+c@$$%$ @g@+@@@#@$@&$*$=$i#-$;$>$C#,$'$)$!$~${$]$^$/$($_$- - ",
" :$<$0@[$}$b+z+d+1#]@<+[+|$1$j+_@l+J+:@<@[@D@2$3$4$B#T#5$6$7$8$9$0$a$v+b$c$d$e$f$- - ",
" - g$h$i$j$k$f#g#C+D+l$m$n$o$I+@@K+h@i@W@X@p$>#q$r$s$t$u$v$w$~$x$y$8#z$A$B$C$D.D$- - ",
" - E$F$G$v@H$I$Z+`+J$K$L$M$N$#@A@B@C@O$z#F@`@P$Q$m@R$S$T$U$V$W$X$Y$Z$`$ %.%+%@%#%- - ",
" $%%%&%m#*%[$=%e@-%;%>%,%'%,#[@2#R#Y@Z@S#)%!%Q$~%'@{%]%^%/%(%_%:%<%6@[%}%|%1%- - ",
" 2%3%4%5%F#6%u@7%8%9%0%a%b%c%k@i#-$;$>$C#T#9%`$d%e%f%g%h%i%R@j%q$,@T+h$k%l%m%- - ",
" n%o%p%q%Z#W+r%s%t%u%($$+W@E@v%w%B#T#5$6$x%y%z%<#)@A%V+B%,@T+`$C%D%Q$E%F%G%H%- - ",
" #%3.J I%^$J%K%L%M%.$N%O%l@P%Q%R%S%T%U%V%W%#+<%X%Y%Z%`% &D%.&+&@&#&z$$&- 1@%&- - ",
" - &&c$*&=&-&;&>&H#,&z$'&)&!&'@~&U+v+:%{& #]&!@Z#Z#w+#&V.'&!&'@^&/&- - - - ",
" - (&_&:&<&[&q#p#}&|&~&1&;+)#d%e%f%2&m@3&5@4&J%@$K%9@~&U+v+5&6&7&8&9&- - - ",
" - 0&a&[%b&c&>@S+d&t+^&e&f&v@5#<#)@A%7&q#g&h&i&~@j&k&)#j$e%f%*#f&[#M+- - ",
" J l&m&n&o&^#p&_%q&U+r&m#*%a#c#s&Y%n#t&>@u&v& %.% %w&f&v@8@[#x&y&z&- - ",
" A&B&C&D&E&6@q$,@F&`%F#u#w@G&Y#9@H&:%Y$I&J&K&m&m&X%V+w+m#a#L&M&- - ",
" - N&O&P&Q&C%D%R&S&Z#W+W+u&T&U&V&4&m@W&X&Y&Z&`& *.*+*Y%`%@*3.- - - ",
" - #*$*%*#&&***=*@$-*K%;*>*b$,**&d%'*J - 9&)*!*A$u#~*{*- - - - ",
" - ]*^*/*(*- J _*i&:*<*A$B$[*<&X%}*- - - - |*1*2*3*- - - - ",
" - 4*5*- - - 6*7*v& %a&[%b&F$^$8*- - - - - 9*0*- - - - ",
" - - - - - a*b*}%c*d*e*%%f* %g*- - - - - - - - - - ",
" - - - h*i*j*j*j*k*l*m*n*:$- - - - - ",
" - - - - - - - - - - - ",
" - - - - - - - - ",
" - - - ",
" ",
" ",
" ",
" "};

+ 957
- 0
GUI/save.xpm View File

@@ -0,0 +1,957 @@
/* XPM */
static char * save_xpm[] = {
"48 60 894 2",
" c None",
". c #E38400",
"+ c #E68600",
"@ c #E88700",
"# c #D37B00",
"$ c #E78600",
"% c #DF8200",
"& c #E28400",
"* c #AD6500",
"= c #D77D00",
"- c #9C5B00",
"; c #AC6400",
"> c #E58500",
", c #C17000",
"' c #0B0600",
") c #000000",
"! c #DE8100",
"~ c #D97E00",
"{ c #201300",
"] c #E48500",
"^ c #452800",
"/ c #E78700",
"( c #774500",
"_ c #353747",
": c #53566F",
"< c #3F4155",
"[ c #2D2F3D",
"} c #1A1B21",
"| c #A56000",
"1 c #020100",
"2 c #3D3F52",
"3 c #959BCD",
"4 c #7C83C0",
"5 c #9BA1D8",
"6 c #AEB3DF",
"7 c #EBEBED",
"8 c #E0E0E3",
"9 c #CECFD1",
"0 c #BFBFC0",
"a c #ADADAE",
"b c #A0A0A1",
"c c #929292",
"d c #AD7C39",
"e c #88612B",
"f c #707070",
"g c #686868",
"h c #676767",
"i c #5C5C5C",
"j c #595959",
"k c #4D4D4D",
"l c #AE6909",
"m c #CC7701",
"n c #140D05",
"o c #050609",
"p c #0A0B10",
"q c #12131D",
"r c #020304",
"s c #6A6E8F",
"t c #7B82C1",
"u c #282F68",
"v c #8D93C9",
"w c #B1B6E0",
"x c #EFEFEF",
"y c #EEEEEE",
"z c #ECECEC",
"A c #EBEBEB",
"B c #E9E9E9",
"C c #E6E6E6",
"D c #E0E0E0",
"E c #E3AA5B",
"F c #DEA75B",
"G c #CDCCCC",
"H c #CECECE",
"I c #CFCFCF",
"J c #D3B386",
"K c #E88701",
"L c #E48501",
"M c #3E2C19",
"N c #1D1F2F",
"O c #2C2F47",
"P c #3E4164",
"Q c #4F5482",
"R c #252847",
"S c #878DB8",
"T c #989FD6",
"U c #7277A4",
"V c #9CA2D7",
"W c #B8BCE1",
"X c #EDEDED",
"Y c #E1E1E1",
"Z c #DADADA",
"` c #E29C3A",
" . c #DC9736",
".. c #BEB7AE",
"+. c #BDBDBD",
"@. c #C3B6A4",
"#. c #E58B0D",
"$. c #6A4513",
"%. c #1D1E2A",
"&. c #24263F",
"*. c #2C2F57",
"=. c #414676",
"-. c #5B6096",
";. c #404788",
">. c #060710",
",. c #0F0F14",
"'. c #9EA4D8",
"). c #A0A6DC",
"!. c #9FA5DB",
"~. c #9DA4DA",
"{. c #C1C4E2",
"]. c #D7D7D7",
"^. c #C2C2C2",
"/. c #C8C8C8",
"(. c #CBCBCB",
"_. c #D0D0D0",
":. c #E0962D",
"<. c #DC8E20",
"[. c #B0A08A",
"}. c #DD8E20",
"|. c #9E600B",
"1. c #262626",
"2. c #25273B",
"3. c #2C3052",
"4. c #32376A",
"5. c #4C528B",
"6. c #646AA6",
"7. c #3C438A",
"8. c #070811",
"9. c #333546",
"0. c #9FA6DB",
"a. c #9EA4DB",
"b. c #9DA3DA",
"c. c #9CA2DA",
"d. c #CACDE4",
"e. c #EAEAEA",
"f. c #E2E2E2",
"g. c #CDCDCD",
"h. c #A8A8A8",
"i. c #DE8A16",
"j. c #E68703",
"k. c #C37405",
"l. c #2A2622",
"m. c #313136",
"n. c #313450",
"o. c #40446C",
"p. c #4E5387",
"q. c #5F65A1",
"r. c #696FB1",
"s. c #31397C",
"t. c #000001",
"u. c #4C4E68",
"v. c #9BA2DA",
"w. c #9AA1D9",
"x. c #D5D7E5",
"y. c #E7E7E7",
"z. c #E4E4E4",
"A. c #DEDEDE",
"B. c #D4D4D4",
"C. c #C3C3C3",
"D. c #E78805",
"E. c #DA8002",
"F. c #3F301B",
"G. c #303030",
"H. c #3D3E49",
"I. c #3E4266",
"J. c #4F5483",
"K. c #5E639C",
"L. c #686FAF",
"M. c #656DB3",
"N. c #282E68",
"O. c #676B8E",
"P. c #9CA3DA",
"Q. c #9BA1D9",
"R. c #9AA0D9",
"S. c #999FD8",
"T. c #E0E1E7",
"U. c #E5E5E5",
"V. c #BBBBBB",
"W. c #B7B7B7",
"X. c #B5B5B5",
"Y. c #B0B0B0",
"Z. c #AAAAAA",
"`. c #A7A5A2",
" + c #614113",
".+ c #2B2B2B",
"++ c #424242",
"@+ c #484A5E",
"#+ c #4B4F7C",
"$+ c #5A5F97",
"%+ c #656CAB",
"&+ c #6D74B9",
"*+ c #5F67B1",
"=+ c #202552",
"-+ c #878DBD",
";+ c #99A0D9",
">+ c #989FD8",
",+ c #9CA2D9",
"'+ c #E6E6E7",
")+ c #E3E3E3",
"!+ c #CACACA",
"~+ c #B6A996",
"{+ c #8D560A",
"]+ c #232323",
"^+ c #393939",
"/+ c #555555",
"(+ c #515474",
"_+ c #565B90",
":+ c #6369A6",
"<+ c #6B72B6",
"[+ c #6F77BF",
"}+ c #5861AD",
"|+ c #191D40",
"1+ c #1A1B24",
"2+ c #999FD7",
"3+ c #989ED8",
"4+ c #979DD7",
"5+ c #A8ADDA",
"6+ c #D1D1D1",
"7+ c #DCDCDC",
"8+ c #D8D8D8",
"9+ c #C2AC8E",
"0+ c #925807",
"a+ c #282726",
"b+ c #474747",
"c+ c #666666",
"d+ c #565A85",
"e+ c #5E649F",
"f+ c #686EB1",
"g+ c #6E75BC",
"h+ c #7078C2",
"i+ c #515AA8",
"j+ c #12152F",
"k+ c #3A3D53",
"l+ c #969DD7",
"m+ c #959CD7",
"n+ c #B5B8DC",
"o+ c #C5C5C5",
"p+ c #B6B6B6",
"q+ c #B1B1B1",
"r+ c #A9A9A9",
"s+ c #A0A0A0",
"t+ c #A88D68",
"u+ c #AB6C13",
"v+ c #58544F",
"w+ c #707072",
"x+ c #575C90",
"y+ c #6268A8",
"z+ c #6A71B7",
"A+ c #6E76C0",
"B+ c #7077C3",
"C+ c #4B53A2",
"D+ c #0B0D1D",
"E+ c #535675",
"F+ c #979ED8",
"G+ c #969CD7",
"H+ c #959BD7",
"I+ c #949AD6",
"J+ c #C1C4DD",
"K+ c #D3D3D3",
"L+ c #C8A069",
"M+ c #C37C19",
"N+ c #716E71",
"O+ c #565B93",
"P+ c #6269AA",
"Q+ c #6A71B8",
"R+ c #6D75C0",
"S+ c #6E76C3",
"T+ c #444C9C",
"U+ c #05060D",
"V+ c #7176A2",
"W+ c #949BD6",
"X+ c #939AD6",
"Y+ c #9299D5",
"Z+ c #CED0DF",
"`+ c #D9D9D9",
" @ c #C99D5F",
".@ c #C37C20",
"+@ c #575989",
"@@ c #5E65A4",
"#@ c #676DB4",
"$@ c #6B72BD",
"%@ c #6C74C2",
"&@ c #3B4490",
"*@ c #010102",
"=@ c #8D93CB",
"-@ c #9399D6",
";@ c #9298D5",
">@ c #DADBDF",
",@ c #B4B4B4",
"'@ c #AFAFAF",
")@ c #ADADAD",
"!@ c #A6A6A6",
"~@ c #A1A1A1",
"{@ c #C69146",
"]@ c #E48502",
"^@ c #896652",
"/@ c #585E9C",
"(@ c #6269AE",
"_@ c #686FBA",
":@ c #6970BE",
"<@ c #31397D",
"[@ c #2B2D3E",
"}@ c #9399D5",
"|@ c #9198D5",
"1@ c #9097D4",
"2@ c #999FD5",
"3@ c #DEDEDF",
"4@ c #DDDDDD",
"5@ c #DBDBDB",
"6@ c #D5D5D5",
"7@ c #CCCCCC",
"8@ c #B3B3B3",
"9@ c #CD8D34",
"0@ c #E38401",
"a@ c #B9700B",
"b@ c #885E24",
"c@ c #4F4A54",
"d@ c #444978",
"e@ c #525893",
"f@ c #5D64A8",
"g@ c #646BB6",
"h@ c #636BB9",
"i@ c #2A316D",
"j@ c #454865",
"k@ c #9096D4",
"l@ c #8E95D4",
"m@ c #A7ABD6",
"n@ c #B8B8B8",
"o@ c #D59132",
"p@ c #E08301",
"q@ c #A76406",
"r@ c #66400C",
"s@ c #2A2218",
"t@ c #2E2E2E",
"u@ c #414141",
"v@ c #3E415A",
"w@ c #424776",
"x@ c #50558F",
"y@ c #5B61A5",
"z@ c #6269B3",
"A@ c #5D64B3",
"B@ c #242A5E",
"C@ c #62668F",
"D@ c #9197D5",
"E@ c #8F96D4",
"F@ c #8E95D3",
"G@ c #8D94D3",
"H@ c #B5B8D7",
"I@ c #BCBCBC",
"J@ c #B2B2B2",
"K@ c #DD8C1D",
"L@ c #D67D02",
"M@ c #995C08",
"N@ c #563810",
"O@ c #241F18",
"P@ c #1F1F1F",
"Q@ c #272727",
"R@ c #313131",
"S@ c #3F3F3F",
"T@ c #4F4F4F",
"U@ c #414466",
"V@ c #464A7E",
"W@ c #515794",
"X@ c #5B62A7",
"Y@ c #6168B4",
"Z@ c #575FAE",
"`@ c #1F2450",
" # c #8187BE",
".# c #8E94D3",
"+# c #8D93D3",
"@# c #8B92D2",
"## c #C3C5D8",
"$# c #D6D6D6",
"%# c #939393",
"&# c #DD840A",
"*# c #E78601",
"=# c #875510",
"-# c #4C3617",
";# c #201F1D",
"># c #222222",
",# c #282828",
"'# c #676768",
")# c #484D7B",
"!# c #4E538E",
"~# c #565C9F",
"{# c #5D64AD",
"]# c #6169B7",
"^# c #535BAA",
"/# c #1A1E43",
"(# c #202230",
"_# c #8C93D3",
":# c #8A91D1",
"<# c #D0D1D9",
"[# c #C4C4C4",
"}# c #D08D30",
"|# c #A67F47",
"1# c #6C5F4E",
"2# c #292929",
"3# c #373737",
"4# c #454545",
"5# c #565656",
"6# c #636363",
"7# c #6D6D6D",
"8# c #787878",
"9# c #7F7F83",
"0# c #525894",
"a# c #575DA0",
"b# c #5C63AB",
"c# c #6067B4",
"d# c #626ABA",
"e# c #4F57A7",
"f# c #141835",
"g# c #3D405B",
"h# c #8C93D2",
"i# c #8B91D2",
"j# c #8990D1",
"k# c #8C92D1",
"l# c #D6D6D8",
"m# c #9D9D9D",
"n# c #828282",
"o# c #4E4E4E",
"p# c #545454",
"q# c #5D5D5D",
"r# c #656565",
"s# c #6B6B6B",
"t# c #7B7B7B",
"u# c #8F909B",
"v# c #5B62A8",
"w# c #5E65AF",
"x# c #6068B5",
"y# c #6269B9",
"z# c #626ABC",
"A# c #4B53A4",
"B# c #0F1228",
"C# c #575B83",
"D# c #8C92D2",
"E# c #8A91D2",
"F# c #888FD1",
"G# c #878ED0",
"H# c #A9ADD2",
"I# c #C1C2D4",
"J# c #CFD0D4",
"K# c #D2D2D2",
"L# c #A5A5A5",
"M# c #909090",
"N# c #7D7D7D",
"O# c #717171",
"P# c #6C6C6C",
"Q# c #6F6F6F",
"R# c #767676",
"S# c #7E7E7E",
"T# c #878787",
"U# c #8F8F8F",
"V# c #969696",
"W# c #9C9C9C",
"X# c #9597AC",
"Y# c #6168B6",
"Z# c #626ABB",
"`# c #626ABD",
" $ c #626ABE",
".$ c #4750A2",
"+$ c #0B0D1C",
"@$ c #787EB5",
"#$ c #888ED0",
"$$ c #868DD0",
"%$ c #858CCF",
"&$ c #848BCF",
"*$ c #838ACE",
"=$ c #8289CE",
"-$ c #8D93CE",
";$ c #9CA1CE",
">$ c #ABAECD",
",$ c #B8BACA",
"'$ c #C1C1C5",
")$ c #949494",
"!$ c #8D8D8D",
"~$ c #8B8B8B",
"{$ c #8E8E8E",
"]$ c #9A9A9A",
"^$ c #ACACAC",
"/$ c #9497B5",
"($ c #646BBC",
"_$ c #636BBD",
":$ c #636BBE",
"<$ c #6169BF",
"[$ c #434C9E",
"}$ c #181924",
"|$ c #8990D0",
"1$ c #8188CD",
"2$ c #8087CD",
"3$ c #7F86CC",
"4$ c #7D85CC",
"5$ c #7C83CB",
"6$ c #7A81C9",
"7$ c #797FC6",
"8$ c #8086C0",
"9$ c #898DB8",
"0$ c #9093B0",
"a$ c #989AA8",
"b$ c #A0A1A4",
"c$ c #A3A3A3",
"d$ c #8D91BA",
"e$ c #646CBF",
"f$ c #636BBF",
"g$ c #626ABF",
"h$ c #6169BE",
"i$ c #6068BE",
"j$ c #3F4898",
"k$ c #020306",
"l$ c #383A55",
"m$ c #868CCF",
"n$ c #787FC4",
"o$ c #757CC1",
"p$ c #7B82CA",
"q$ c #7A82CA",
"r$ c #7980C9",
"s$ c #777EC7",
"t$ c #747BC4",
"u$ c #7078C0",
"v$ c #6D74BB",
"w$ c #767BB6",
"x$ c #8589B7",
"y$ c #9699B7",
"z$ c #A6A8B8",
"A$ c #B4B4B7",
"B$ c #8388BC",
"C$ c #5F68BE",
"D$ c #5E66BD",
"E$ c #3A428F",
"F$ c #51557C",
"G$ c #6D74B3",
"H$ c #636689",
"I$ c #686977",
"J$ c #67697E",
"K$ c #6C6F8E",
"L$ c #6F739F",
"M$ c #7075AE",
"N$ c #7077BC",
"O$ c #7179C3",
"P$ c #7077C2",
"Q$ c #6E75C0",
"R$ c #6D74BF",
"S$ c #6C73BF",
"T$ c #6B73C0",
"U$ c #6B72C0",
"V$ c #6A72C1",
"W$ c #6C74C1",
"X$ c #797FC0",
"Y$ c #898DBE",
"Z$ c #989BBB",
"`$ c #A1A3B7",
" % c #6870BE",
".% c #5F67BE",
"+% c #5C64BC",
"@% c #32397E",
"#% c #7176AF",
"$% c #747BBE",
"%% c #686978",
"&% c #757575",
"*% c #777A99",
"=% c #797B8D",
"-% c #7B7B7F",
";% c #7C7C7C",
">% c #7C7C7D",
",% c #797A83",
"'% c #777A91",
")% c #74779F",
"!% c #7075AC",
"~% c #6A71B9",
"{% c #6C73C3",
"]% c #6B72C3",
"^% c #6A71C2",
"/% c #6970C2",
"(% c #676FC1",
"_% c #666EC1",
":% c #656DC0",
"<% c #646CC0",
"[% c #5F67BD",
"}% c #5961B9",
"|% c #2C3372",
"1% c #181925",
"2% c #838ACD",
"3% c #7E86CC",
"4% c #6B709E",
"5% c #797979",
"6% c #747581",
"7% c #777EC8",
"8% c #767DC8",
"9% c #757CC7",
"0% c #757BBA",
"a% c #777CA9",
"b% c #818182",
"c% c #838383",
"d% c #858585",
"e% c #858586",
"f% c #7D7E89",
"g% c #767896",
"h% c #6B70A0",
"i% c #5F66AA",
"j% c #6068B7",
"k% c #636BC0",
"l% c #5E67BD",
"m% c #5D65BD",
"n% c #5B63BC",
"o% c #565EB6",
"p% c #282E67",
"q% c #363955",
"r% c #7F86CD",
"s% c #7E85CC",
"t% c #7C83CA",
"u% c #676981",
"v% c #7A7A7A",
"w% c #737695",
"x% c #757DC8",
"y% c #747CC7",
"z% c #737AC7",
"A% c #7279C6",
"B% c #747ABA",
"C% c #838384",
"D% c #868686",
"E% c #888888",
"F% c #898989",
"G% c #8A8A8A",
"H% c #8C8C8C",
"I% c #8B8B8C",
"J% c #717384",
"K% c #555A99",
"L% c #545BA5",
"M% c #555CA8",
"N% c #5A62B4",
"O% c #5A63BB",
"P% c #5961BB",
"Q% c #525AB2",
"R% c #242A5D",
"S% c #51557F",
"T% c #8188CE",
"U% c #7C84CB",
"V% c #6A71B3",
"W% c #73737A",
"X% c #7075AB",
"Y% c #747BC7",
"Z% c #7179C6",
"`% c #7078C6",
" & c #787CAC",
".& c #6E7193",
"+& c #5C64B9",
"@& c #535BA8",
"#& c #535AA8",
"$& c #5A62BB",
"%& c #5860BA",
"&& c #4F57AF",
"*& c #1E234F",
"=& c #7076B3",
"-& c #7B82CB",
";& c #62689E",
">& c #7F7F7F",
",& c #79797C",
"'& c #7279C1",
")& c #727AC7",
"!& c #7077C5",
"~& c #6F76C5",
"{& c #7E819E",
"]& c #757789",
"^& c #5D66BD",
"/& c #4F56A2",
"(& c #5760BA",
"_& c #565EB9",
":& c #4B54AC",
"<& c #1B1F46",
"[& c #1E2030",
"}& c #7F86CB",
"|& c #7D84CB",
"1& c #7981CA",
"2& c #65688E",
"3& c #808080",
"4& c #818181",
"5& c #737589",
"6& c #7178C6",
"7& c #6F77C5",
"8& c #6E76C5",
"9& c #6D75C4",
"0& c #858693",
"a& c #959595",
"b& c #777988",
"c& c #5962BB",
"d& c #5158A8",
"e& c #545DB4",
"f& c #545DB9",
"g& c #4851A8",
"h& c #181C3E",
"i& c #393D5D",
"j& c #7B83CB",
"k& c #7980CA",
"l& c #767EC7",
"m& c #696B80",
"n& c #848484",
"o& c #6E729B",
"p& c #6E76C4",
"q& c #6D74C4",
"r& c #6E75BE",
"s& c #8B8B8D",
"t& c #919191",
"u& c #989898",
"v& c #71738E",
"w& c #5B64BC",
"x& c #4E56A4",
"y& c #555DB8",
"z& c #545CB9",
"A& c #535BB8",
"B& c #464EA5",
"C& c #131631",
"D& c #3F4367",
"E& c #7A81CA",
"F& c #777FC9",
"G& c #6A71B6",
"H& c #797A81",
"I& c #696FAE",
"J& c #6E75C4",
"K& c #6C74C4",
"L& c #6B73C3",
"M& c #757AB3",
"N& c #999999",
"O& c #666A94",
"P& c #565FB9",
"Q& c #4D54A2",
"R& c #545CB8",
"S& c #525BB8",
"T& c #515AB7",
"U& c #434CA2",
"V& c #0F1227",
"W& c #292C44",
"X& c #7880C9",
"Y& c #777EC9",
"Z& c #6268A5",
"`& c #78787F",
" * c #6E75C3",
".* c #7D81A8",
"+* c #9B9B9B",
"@* c #5A5F9B",
"#* c #5861BA",
"$* c #575FBA",
"%* c #555DB9",
"&* c #4B53A1",
"** c #5159B7",
"=* c #5058B6",
"-* c #414AA0",
";* c #0D0F21",
">* c #5D629A",
",* c #787FC9",
"'* c #666A96",
")* c #6F728D",
"!* c #6A72C3",
"~* c #6971C2",
"{* c #6870C2",
"]* c #87899E",
"^* c #979797",
"/* c #9E9E9E",
"(* c #565DA9",
"_* c #4B52A1",
":* c #4F58B6",
"<* c #4E57B6",
"[* c #3F489D",
"}* c #070813",
"|* c #0E0F1B",
"1* c #434B90",
"2* c #575FAD",
"3* c #646CB9",
"4* c #4951A0",
"5* c #676A89",
"6* c #666B9C",
"7* c #686FC2",
"8* c #686FC0",
"9* c #929297",
"0* c #9F9F9F",
"a* c #87878C",
"b* c #565EB7",
"c* c #555EB9",
"d* c #4A51A2",
"e* c #4E56B6",
"f* c #4D55B5",
"g* c #3D469A",
"h* c #434346",
"i* c #808081",
"j* c #88898A",
"k* c #7F829B",
"l* c #797EB0",
"m* c #6F76BA",
"n* c #6870C1",
"o* c #6F75B8",
"p* c #A2A2A2",
"q* c #797B8F",
"r* c #4F57B3",
"s* c #4A51A4",
"t* c #4D56B5",
"u* c #4C55B5",
"v* c #4B54B4",
"w* c #3B4497",
"x* c #020205",
"y* c #030304",
"z* c #202022",
"A* c #38393B",
"B* c #545458",
"C* c #707173",
"D* c #7F7F81",
"E* c #89898C",
"F* c #8F8F98",
"G* c #888BA3",
"H* c #898BA4",
"I* c #A4A4A4",
"J* c #6B6F93",
"K* c #535CB8",
"L* c #525AB8",
"M* c #4B53AA",
"N* c #4A52AB",
"O* c #4B53B4",
"P* c #4952B4",
"Q* c #373F8C",
"R* c #040405",
"S* c #171719",
"T* c #303134",
"U* c #4B4B4E",
"V* c #69696F",
"W* c #7D7E82",
"X* c #898A8E",
"Y* c #95969A",
"Z* c #9D9D9E",
"`* c #A7A7A7",
" = c #5C6197",
".= c #525AB7",
"+= c #5059B7",
"@= c #4850A3",
"#= c #4B53B2",
"$= c #4A53B4",
"%= c #4952B3",
"&= c #4851B3",
"*= c #353D88",
"== c #010101",
"-= c #0F1011",
";= c #29292B",
">= c #424246",
",= c #606167",
"'= c #7C7D84",
")= c #88898F",
"!= c #97979E",
"~= c #A2A3A5",
"{= c #4F559D",
"]= c #4F57B6",
"^= c #474EA0",
"/= c #4951B3",
"(= c #4750B3",
"_= c #464FB1",
":= c #2F3679",
"<= c #0A0A0D",
"[= c #222226",
"}= c #3A3A3C",
"|= c #575860",
"1= c #767781",
"2= c #878890",
"3= c #9798A0",
"4= c #8D8E92",
"5= c #474E94",
"6= c #4E56AF",
"7= c #4F57B5",
"8= c #454C9E",
"9= c #464FB2",
"0= c #444DB0",
"a= c #2E3577",
"b= c #050507",
"c= c #1A1B1F",
"d= c #333337",
"e= c #47484E",
"f= c #262835",
"g= c #191C3F",
"h= c #2B3169",
"i= c #3F4794",
"j= c #474FA7",
"k= c #4750B2",
"l= c #464EB2",
"m= c #444DB1",
"n= c #424AAC",
"o= c #0E1024",
"p= c #242857",
"q= c #414AA8",
"r= c #434CB0",
"s= c #3E47A4",
"t= c #212654",
"u= c #1B1F45",
"v= c #2A306C",
"w= c #374091",
"x= c #394294",
"y= c #12152E",
"z= c #010204",
"A= c #080A16",
" ",
" . + ",
" @ @ @ # ",
" $ @ @ @ @ % ",
" & @ @ @ @ @ @ + * ",
" = @ @ @ @ @ @ @ @ - ",
" @ @ @ @ @ @ @ @ ; ",
" > @ @ @ @ @ @ @ , ' ) ",
" ! @ @ @ @ @ @ @ ~ { ) ) ",
" @ @ @ @ @ @ @ ] ^ ) ) ",
" / @ @ @ @ @ @ @ ( ) ) ) ",
" _ : < [ } ] @ @ @ @ @ @ @ | 1 ) ) ",
" 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l @ @ @ @ @ @ @ m n o p q r ",
" s t u v w x y z A B C D E @ F G H I H J K @ @ @ @ @ @ L M N O P Q R ",
" S T U V W X z A B C Y Z ` @ @ ...+.@.#.@ @ @ @ @ @ @ $.%.&.*.=.-.;.>. ",
" ,.'.).!.~.{.z ].^./.(._.(.:.@ @ @ <.[.}.@ @ @ @ @ @ @ |.1.2.3.4.5.6.7.8. ",
" 9.0.a.b.c.d.e.C f.].g.+.h.i.@ @ @ @ j.@ @ @ @ @ @ @ k.l.m.n.o.p.q.r.s.t.) ",
" u.a.b.v.w.x.B y.C z.A.B.C.D.@ @ @ @ @ @ @ @ @ @ @ E.F.G.H.I.J.K.L.M.N.) ) ",
" O.P.Q.R.S.T.U.V.W.X.Y.Z.`.@ @ @ @ @ @ @ @ @ @ @ @ +.+++@+#+$+%+&+*+=+) ) ",
" -+Q.;+>+,+'+C z.)+D Z !+~+@ @ @ @ @ @ @ @ @ @ @ {+]+^+/+(+_+:+<+[+}+|+) ) ",
" 1+2+;+3+4+5+U.6+H 7+A.8+(.9+@ @ @ @ @ @ @ @ @ @ @ 0+a+b+c+d+e+f+g+h+i+j+) ) ",
" k+S.3+l+m+n+z.Z o+p+q+r+s+t+@ @ @ @ @ @ @ @ @ @ @ @ u+v+w+x+y+z+A+B+C+D+) ) ",
" E+F+G+H+I+J+f.Y D A.Z K+o+L+@ @ @ @ @ @ @ @ @ @ @ @ @ M+N+O+P+Q+R+S+T+U+) ",
" V+G+W+X+Y+Z+D A.A.7+`+6+^. @@ @ @ @ @ @ @ @ @ @ @ @ @ @ .@+@@@#@$@%@&@*@) ",
" =@W+-@;@;@>@6+,@Y.'@)@!@~@{@@ @ @ @ @ @ @ @ @ @ @ @ @ @ ]@^@/@(@_@:@<@) ) ",
" [@I+}@|@1@2@3@4@7+5@`+6@7@8@9@@ @ @ @ @ @ @ @ @ @ @ 0@a@b@c@d@e@f@g@h@i@) ) ",
" j@Y+|@k@l@m@4@K+5@`+].K+!+n@o@@ @ @ @ @ @ @ @ p@q@r@s@t@u@v@w@x@y@z@A@B@) ) ",
" C@D@E@F@G@H@7+I@)@)@Z.h.J@J@K@@ @ @ @ @ L@M@N@O@P@Q@R@S@T@U@V@W@X@Y@Z@`@) ) ",
" #E@.#+#@###Z `+8+$#B.7@8@%#&#@ *#k.=#-#;#>#,#G.^+++k j '#)#!#~#{#]#^#/#) ) ",
" (#F@G@_#@#:#<#8+].$#6@K+g.[#8@}#|#1#S@t@2#.+G.3#4#5#6#7#8#9#0#a#b#c#d#e#f#) ) ",
" g#G@h#i#j#k#l#].$#B.K+6+7@[#,@m#n#g 5#o#o#p#q#r#h c+s#t#%#u#v#w#x#y#z#A#B#) ",
" C#D#E#j#F#G#H#I#J#K+K#_.(.[#W.L#M#N#O#P#Q#R#S#T#U#V#W#~@!@X#Y#y#Z#`# $.$+$) ",
" @$E#j##$$$%$&$*$=$-$;$>$,$'$I@'@s+)$!$~${$)$]$s+L#r+^$'@Y./$($_$:$ $<$[$>.) ",
" }$|$F#G#$$%$*$=$1$2$3$4$5$6$7$8$9$0$a$b$c$!@r+^$'@J@8@,@X.X.d$e$f$g$h$i$j$k$) ",
" l$F#G#m$&$*$=$1$3$n$o$p$q$r$s$t$u$v$Q+<+w$x$y$z$A$W.W.W.p+p+B$f$g$h$C$D$E$) ) ",
" F$$$%$&$*$=$2$G$H$I$I$J$K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$z$`$ %g$i$.%D$+%@%) ) ",
" #%%$&$=$1$2$$%%%&%R#R#*%=%-%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%g$<$i$[%D$+%}%|%) ) ",
" 1%2%*$=$1$2$3%4%R#8#5%6%7%8%9%0%a%b%n#c%d%e%f%g%h%i%j%e$k%g$h$i$l%m%+%n%o%p%) ) ",
" q%*$=$1$r%s%t%u%5%v%t#w%x%y%z%A%B%C%d%D%T#E%F%G%H%I%J%K%L%L%M%N%m%+%O%P%Q%R%) ) ",
" S%T%2$3$s%U%V%W%t#;%N#X%Y%z%Z%`% &D%T#E%F%~$H%!${$U#M#.&i$.%+&@&#&$&P%%&&&*&) ) ",
" =&2$3$4$5$-&;&>%S#>&,&'&)&Z%!&~&{&E%F%~$H%!${$U#M#c %#]&[%^&+%n%/&%&(&_&:&<&) ) ",
" [&}&s%|&5$p$1&2&>&3&4&5&A%6&7&8&9&0&~$H%!${$U#M#c %#)$a&b&m%+%n%c&d&e&_&f&g&h&) ) ",
" i&s%|&j&q$k&l&m&4&n#n&o&`%7&p&q&r&s&!${$U#t&c %#)$a&V#u&v&w&$&P%%&x&y&z&A&B&C&) ",
" D&U%-&E&r$F&G&H&n&d%c%I&~&J&K&L&M&{$U#t&c %#)$a&V#u&N&]$O&$&P%(&P&Q&R&S&T&U&V&) ",
" W&p$E&X&Y&8%Z&d%D%T#`& *9&K&]%^%.*t&c %#)$a&V#u&N&]$+*+*@*#*$*_&%*&*S&**=*-*;*) ",
" >*,*Y&8%y%'*T#E%G%)*9&{%!*~*{*]*%#)$a&^*u&N&]$+*W#/*)$(*$*_&f&A&_***:*<*[*}*) ",
" |*1*2*3*4*5*G%~$H%6*L&!*~*7*8*9*a&^*u&N&]$+*W#/*0*s+a*b*c*R&A&T&d*:*e*f*g*U+) ",
" k$;*|+=+h*i*j*!$k*l*m*n*_%o*^*u&N&]$+*W#/*0*s+~@p*q*%*R&S&T&r*s*t*u*v*w*x*) ",
" ) ) ) y*z*A*B*C*D*E*F*G*H*N&]$+*m#/*0*s+~@p*I*L#J*K*L***=*M*N*u*O*P*Q**@) ",
" ) ) ) ) ) R*S*T*U*V*W*X*Y*Z*0*s+~@p*I*L#!@`* =.=+=:*<*@=#=$=%=&=*=t.) ",
" ) ) ) ) ) ==-=;=>=,='=)=!=~=!@`*h.!@{=+=]=e*u*^=$=/=(=_=:=) ) ",
" ) ) ) ) ) ) ) <=[=}=|=1=2=3=4=5=6=7=u*O*8=&=(=9=0=a=) ) ",
" ) ) ) ) ) ) ) b=c=d=e=f=g=h=i=j=8=k=l=m=n=N.) ) ",
" ) ) ) ) ) ) ) ) ) x*o=p=q=0=r=s=t=) ) ",
" ) ) ) ) ) ) ) ) u=v=w=x=y=) ) ",
" ) ) ) z=A=) ) ) ",
" ) ) ) ) ",
" ) ) ",
" ",
" "};

+ 192
- 0
GraphSort.C View File

@@ -0,0 +1,192 @@
/* Graph Sort
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <iostream>
#include "GraphSort.h"

//#define GRAPHSORT_TRACE

//////////////////////////////////////////////////////////

GraphSort::GraphSort()
{
}

GraphSort::~GraphSort()
{
}

void GraphSort::Clear()
{
//m_Sorted.clear();
m_Graph.clear();
}


const list<int> &GraphSort::GetSortedList()
{
return m_Sorted;
}

void GraphSort::Sort()
{
// walk back from all the roots
m_Sorted.clear();
list<int> RootNodes;
for (map<int,Node>::iterator i=m_Graph.begin();
i!=m_Graph.end(); i++)
{
// if there are no outputs, this must be a root
if (i->second.Outputs.empty())
{
RecursiveWalk(i->first);
}
}
#ifdef GRAPHSORT_TRACE
for(list<int>::iterator i=m_Sorted.begin();
i!=m_Sorted.end(); i++)
{
cerr<<*i<<" ";
}
cerr<<endl;
#endif
}

void GraphSort::RecursiveWalk(int node)
{
// check it's not been logged already
// (don't want to execute the node twice)
if(find(m_Sorted.begin(),m_Sorted.end(),node)==m_Sorted.end())
{
#ifdef GRAPHSORT_TRACE
//cerr<<"adding "<<node<<" to list"<<endl;
#endif
m_Sorted.push_back(node);
}
else
{
#ifdef GRAPHSORT_TRACE
//cerr<<"Node "<<node<<" already logged, ending this path"<<endl;
#endif
return;
}
// branch back into the inputs
map<int,Node>::iterator i=m_Graph.find(node);
for(list<int>::iterator ii=i->second.Inputs.begin();
ii!=i->second.Inputs.end(); ii++)
{
RecursiveWalk(*ii);
}
}

void GraphSort::Dump()
{
for (map<int,Node>::iterator i=m_Graph.begin();
i!=m_Graph.end(); i++)
{
cerr<<"Node "<<i->first<<endl;
cerr<<"i=";
for (list<int>::iterator ii=i->second.Inputs.begin();
ii!=i->second.Inputs.end(); ii++)
{
cerr<<*ii<<" ";
}
cerr<<endl<<"o=";
for (list<int>::iterator oi=i->second.Outputs.begin();
oi!=i->second.Outputs.end(); oi++)
{
cerr<<*oi<<" ";
}
cerr<<endl;cerr<<endl;
}
}

void GraphSort::AddConnection(int SID, int DID)
{
map<int,Node>::iterator si=m_Graph.find(SID);
if (si==m_Graph.end())
{
Node newnode;
m_Graph[SID]=newnode;
#ifdef GRAPHSORT_TRACE
cerr<<"added "<<SID<<endl;
#endif
}

map<int,Node>::iterator di=m_Graph.find(DID);
if (di==m_Graph.end())
{
Node newnode;
m_Graph[DID]=newnode;
#ifdef GRAPHSORT_TRACE
cerr<<"added "<<DID<<endl;
#endif
}
m_Graph[SID].Outputs.push_back(DID);
m_Graph[DID].Inputs.push_back(SID);
Sort();
}

void GraphSort::RemoveConnection(int SID, int DID)
{
map<int,Node>::iterator si=m_Graph.find(SID);
if (si==m_Graph.end())
{
cerr<<"GraphSort::RemoveConnection - can't find source node"<<endl;
}

map<int,Node>::iterator di=m_Graph.find(DID);
if (di==m_Graph.end())
{
cerr<<"GraphSort::RemoveConnection - can't find dest node"<<endl;
}
list<int>::iterator soi = find(si->second.Outputs.begin(), si->second.Outputs.end(), DID);
if (soi==si->second.Outputs.end()) cerr<<"GraphSort::RemoveConnection - can't find soi"<<endl;
else si->second.Outputs.erase(soi);
list<int>::iterator dii = find(di->second.Inputs.begin(), di->second.Inputs.end(), SID);
if (dii==di->second.Inputs.end()) cerr<<"GraphSort::RemoveConnection - can't find dii"<<endl;
else di->second.Inputs.erase(dii);
// check to remove the nodes
if (si->second.Outputs.empty() && si->second.Inputs.empty())
{
m_Graph.erase(si);
#ifdef GRAPHSORT_TRACE
cerr<<"removed "<<SID<<endl;
#endif
}

if (di->second.Outputs.empty() && di->second.Inputs.empty())
{
m_Graph.erase(di);
#ifdef GRAPHSORT_TRACE
cerr<<"removed "<<DID<<endl;
#endif
}
Sort();
}

+ 55
- 0
GraphSort.h View File

@@ -0,0 +1,55 @@
/* Graph sort
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <vector>
#include <string>
#include <list>
#include <algorithm>
#include <map>

#ifndef GRAPH_SORT
#define GRAPH_SORT

using namespace std;

class GraphSort
{
public:
GraphSort();
~GraphSort();
const list<int> &GetSortedList();
void Sort();
void AddConnection(int SID, int DID);
void RemoveConnection(int SID, int DID);
void Clear();
void Dump();
struct Node
{
list<int> Inputs;
list<int> Outputs;
};
private:
void RecursiveWalk(int node);

map<int,Node> m_Graph;
list<int> m_Sorted;
};

#endif

+ 264
- 0
Makefile.in View File

@@ -0,0 +1,264 @@
#############################################################################
# Makefile for building SpiralSynthModular
# Generated by tmake at 20:13, 2001/10/04
# Project: SpiralSynthModular
# Template: app
#############################################################################

SHELL = @SHELL@

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@ @FLTK_CFLAGS@
CXXFLAGS= @CXXFLAGS@ @FLTK_CXXFLAGS@
INCPATH =
LINK = g++
LFLAGS =
LIBS = @FLTK_LIBS@ -lm -ldl -lpng -lpthread
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

SpiralPlugins = @PLUGINDIR@

####### Files

HEADERS = SpiralSynthModular.h \
SpiralSynthModularInfo.h \
GraphSort.h \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_CommentGUI.h \
GUI/Widgets/Fl_DragBar.H \
GUI/Widgets/Fl_Canvas.h \
SpiralSound/SpiralInfo.h \
SpiralSound/Sample.h \
SpiralSound/Plugins/SpiralPlugin.h \
SpiralSound/Plugins/SpiralPluginGUI.h \
SpiralSound/PluginManager.h \
SettingsWindow.h \
SpiralSynthPluginLocation.h
SOURCES = SpiralSynthModular.C \
SpiralSynthModularInfo.C \
GraphSort.C \
GUI/Widgets/Fl_DeviceGUI.C \
GUI/Widgets/Fl_CommentGUI.C \
GUI/Widgets/Fl_DragBar.cxx \
GUI/Widgets/Fl_Canvas.C \
SpiralSound/SpiralInfo.C \
SpiralSound/Sample.C \
SpiralSound/Plugins/SpiralPlugin.C \
SpiralSound/Plugins/SpiralPluginGUI.C \
SpiralSound/PluginManager.C \
SettingsWindow.C
OBJECTS = SpiralSynthModular.o \
SpiralSynthModularInfo.o \
GraphSort.o \
GUI/Widgets/Fl_DeviceGUI.o \
GUI/Widgets/Fl_CommentGUI.o \
GUI/Widgets/Fl_DragBar.o \
GUI/Widgets/Fl_Canvas.o \
SpiralSound/SpiralInfo.o \
SpiralSound/Sample.o \
SpiralSound/Plugins/SpiralPlugin.o \
SpiralSound/Plugins/SpiralPluginGUI.o \
SpiralSound/PluginManager.o \
SettingsWindow.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = SpiralSynthModular

SUBDIRS = @PLUGINLIST@

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)
list='$(SUBDIRS)'; \
for subdir in $$list; do \
(cd SpiralSound/Plugins/$$subdir ; make) \
done;
$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake: Makefile

Makefile: SpiralSynthModular.pro
tmake SpiralSynthModular.pro -o Makefile

dist:
$(TAR) SpiralSynthModular.tar SpiralSynthModular.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) SpiralSynthModular.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
list='$(SUBDIRS)'; \
for subdir in $$list; do \
(cd SpiralSound/Plugins/$$subdir ; make clean) \
done;

install: SpiralSynthModular
$(INSTALL) SpiralSynthModular $(bindir)
$(INSTALL) -d $(SpiralPlugins)
list='$(SUBDIRS)'; \
for subdir in $$list; do \
(cd SpiralSound/Plugins/$$subdir ; make install) \
done;
uninstall:
rm -f $(bindir)/SpiralSynthModular
rm -rf $(SpiralPlugins)

####### Sub-libraries


###### Combined headers


####### Compile

SpiralSynthModular.o: SpiralSynthModular.C \
SpiralSynthModular.h \
SpiralSynthModularInfo.h \
SpiralSound/SpiralInfo.h \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_CommentGUI.h \
GUI/Widgets/Fl_Canvas.h \
SpiralSound/Plugins/SpiralPlugin.h \
SettingsWindow.h \
SpiralSound/PluginManager.h \
GUI/SSM.xpm \
GUI/load.xpm \
GUI/save.xpm \
GUI/new.xpm \
GUI/options.xpm \
GUI/edit.xpm \
GUI/comment.xpm

SpiralSynthModularInfo.o: SpiralSynthModularInfo.C \
SpiralSynthModularInfo.h \
SpiralSound/SpiralInfo.h \
SpiralSynthPluginLocation.h

GraphSort.o: GraphSort.C \
GraphSort.h

GUI/Widgets/Fl_DeviceGUI.o: GUI/Widgets/Fl_DeviceGUI.C \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_DragBar.H \
GUI/Widgets/Fl_Canvas.h \
GUI/Widgets/../../GraphSort.h \
GUI/Widgets/../../SpiralSynthModularInfo.h \
SpiralSound/SpiralInfo.h

GUI/Widgets/Fl_CommentGUI.o: GUI/Widgets/Fl_CommentGUI.C \
GUI/Widgets/Fl_CommentGUI.h \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_DragBar.H \
GUI/Widgets/../../SpiralSynthModularInfo.h \
SpiralSound/SpiralInfo.h

GUI/Widgets/Fl_DragBar.o: GUI/Widgets/Fl_DragBar.cxx \
GUI/Widgets/Fl_DragBar.H

GUI/Widgets/Fl_Canvas.o: GUI/Widgets/Fl_Canvas.C \
GUI/Widgets/Fl_Canvas.h \
GUI/Widgets/../../GraphSort.h \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_DragBar.H \
GUI/Widgets/../../SpiralSynthModularInfo.h \
SpiralSound/SpiralInfo.h

SpiralSound/SpiralInfo.o: SpiralSound/SpiralInfo.C \
SpiralSound/SpiralInfo.h \
SpiralSound/Sample.h

SpiralSound/Sample.o: SpiralSound/Sample.C \
SpiralSound/Sample.h \
SpiralSound/SpiralInfo.h

SpiralSound/Plugins/SpiralPlugin.o: SpiralSound/Plugins/SpiralPlugin.C \
SpiralSound/Plugins/SpiralPlugin.h \
SpiralSound/Plugins/../Sample.h \
SpiralSound/SpiralInfo.h \
SpiralSound/Sample.h

SpiralSound/Plugins/SpiralPluginGUI.o: SpiralSound/Plugins/SpiralPluginGUI.C \
SpiralSound/Plugins/SpiralPluginGUI.h \
SpiralSound/Plugins/Widgets/Fl_DragBar.H \
SpiralSound/Plugins/SpiralPlugin.h \
SpiralSound/Plugins/../Sample.h \
SpiralSound/SpiralInfo.h \
SpiralSound/Sample.h

SpiralSound/PluginManager.o: SpiralSound/PluginManager.C \
SpiralSound/PluginManager.h \
SpiralSound/Plugins/SpiralPlugin.h \
SpiralSound/Plugins/../Sample.h \
SpiralSound/SpiralInfo.h \
SpiralSound/Sample.h

SettingsWindow.o: SettingsWindow.C \
SettingsWindow.h \
SpiralSynthModular.h \
SpiralSynthModularInfo.h \
SpiralSound/SpiralInfo.h \
SpiralSound/Sample.h \
SpiralSound/SpiralInfo.h \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_DragBar.H \
GUI/Widgets/Fl_CommentGUI.h \
GUI/Widgets/Fl_DeviceGUI.h \
GUI/Widgets/Fl_Canvas.h \
GUI/Widgets/../../GraphSort.h \
SpiralSound/Plugins/SpiralPlugin.h \
SpiralSound/Plugins/../Sample.h \
GUI/options.xpm

+ 63
- 0
README View File

@@ -0,0 +1,63 @@
** SpiralSynthModular **

Last changed Saturday March 23 2002.

SpiralSynthModular is open source software, distributed under the General
Public License (GPL). See the file COPYING.

It uses the OSS /dev/dsp driver, (although this is configurable) and the GUI
it uses is FLTK (www.fltk.org).

See www.pawfal.org for more details.
** Installing **
To build the SpiralSynthModular application, and all the plugins:

./configure
make
make install

Check out the designs in the Examples directory.

The GUI requires FLTK to be installed (www.fltk.org), Which in turn
require Mesa or OpenGL.

*** Jack support ***

This release of SSM comes with an experimental JackPlugin. JACK stands for
Jack Audio Connection Kit and aims to connect Linux audio apps together.
For more information on Jack, and other apps supporting it, see:
http://jackit.sourceforge.net

To build the JackPlugin, use the configure option:
./configure --enable-jack

To load the plugin, add it to .SpiralSynthModular's plugin list.

*** Setting up your .SpiralSynthModular file ***

This file contains all the setup variables for the program. Thes values can be
edited with the options window whilst running SSM, but they will default to the
values in the file.
The following variables in the are the ones to play with to get a good playback
on your machine. This is usually tradeoff between quality and responsiveness
(latency). You can build designs and songs at low quality (22050 samplerate etc)
and then record them at higher settings. The wav file will sound fine, even if
the realtime output doesn't.

BufferSize = 512 - Size of sample buffer to be calculated each cycle.
FragmentSize = 256 - Subbuffer size sent to the soundcard
FragmentCount = -1 - Subbuffer count, -1 computes a suitable size,
setting to 4 or 8 gets better latencies.
Samplerate = 44100 - Sets the samplerate


Disclaimer:
No representations are made about the suitability of this software
for any purpose. This software is provided "as is" without express
or implied warranty.
(Damage to ears, speakers or buildings are not my fault :))

Dave Griffiths - dave@pawfal.org
www.pawfal.org

+ 208
- 0
SettingsWindow.C View File

@@ -0,0 +1,208 @@
/* SpiralSynthModular
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <stdio.h>
#include <FL/Fl_Box.H>
#include <FL/Fl_Pixmap.H>

#include "SettingsWindow.h"
#include "SpiralSynthModularInfo.h"
#include "GUI/options.xpm"

SettingsWindow::SettingsWindow() :
Fl_Double_Window(250,275,"SSM Options"),
m_App(NULL)
{
color(SpiralSynthModularInfo::GUICOL_Tool);
box(FL_FLAT_BOX);
Fl_Pixmap *Icon = new Fl_Pixmap(options_xpm);
Fl_Box *IconBox = new Fl_Box(25,30,50,50,"");
IconBox->image(Icon);

Fl_Box *TextBox = new Fl_Box(180,10,50,20,"SpiralSynth Modular");
TextBox->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
TextBox = new Fl_Box(180,30,50,20,"Constructed by Dave Griffiths");
TextBox->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
TextBox->labelsize(10);
TextBox = new Fl_Box(192,40,50,20,"dave@@pawfal.org");
TextBox->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
TextBox->labelsize(10);
TextBox = new Fl_Box(180,50,50,20,"www.pawfal.org");
TextBox->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
TextBox->labelsize(10);
TextBox = new Fl_Box(180,63,50,20,"We are the music makers");
TextBox->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
TextBox->labelsize(10);
TextBox = new Fl_Box(180,73,50,20,"We are the dreamers of dreams");
TextBox->align(FL_ALIGN_RIGHT | FL_ALIGN_INSIDE);
TextBox->labelsize(10);


Fl_Group *OptionsGrp = new Fl_Group(5,95,240,150,"");
OptionsGrp->box(FL_FLAT_BOX);
OptionsGrp->color(SpiralSynthModularInfo::GUICOL_Button);
m_Options = new Fl_Pack(5,115,230,100,"Settings");
m_Options->color(SpiralSynthModularInfo::GUICOL_Button);
OptionsGrp->add(m_Options);
Fl_Box *Name;
Fl_Pack *Line;
char BufferSize[256];
sprintf(BufferSize,"%d",SpiralSynthModularInfo::BUFSIZE);

char FragmentSize[256];
sprintf(FragmentSize,"%d",SpiralSynthModularInfo::FRAGSIZE);
char FragmentCount[256];
sprintf(FragmentCount,"%d",SpiralSynthModularInfo::FRAGCOUNT);
char Samplerate[256];
sprintf(Samplerate,"%d",SpiralSynthModularInfo::SAMPLERATE);
char OutputDevice[256];
sprintf(OutputDevice,"%s",SpiralSynthModularInfo::OUTPUTFILE.c_str());
char MidiDevice[256];
sprintf(MidiDevice,"%s",SpiralSynthModularInfo::MIDIFILE.c_str());
Line = new Fl_Pack(0,0,100,20,"");
Line->type(FL_HORIZONTAL);
Name = new Fl_Box(55,0,150,20,"Buffer Size");
Name->labelsize(10);
Name->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
Line->add(Name);
m_BufferSize = new Fl_Int_Input(0,0,80,20,"");
m_BufferSize->value(BufferSize);
Line->add(m_BufferSize);
Line->end();
m_Options->add(Line);
Line = new Fl_Pack(0,0,100,20,"");
Line->type(FL_HORIZONTAL);
Name = new Fl_Box(55,0,150,20,"Fragment Size");
Name->labelsize(10);
Name->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
Line->add(Name);
m_FragmentSize = new Fl_Int_Input(0,0,80,20,"");
m_FragmentSize->value(FragmentSize);
Line->add(m_FragmentSize);
Line->end();
m_Options->add(Line);

Line = new Fl_Pack(0,0,100,20,"");
Line->type(FL_HORIZONTAL);
Name = new Fl_Box(55,0,150,20,"Fragment Count (-1 = auto)");
Name->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
Name->labelsize(10);
Line->add(Name);
m_FragmentCount = new Fl_Int_Input(0,0,80,20,"");
m_FragmentCount->value(FragmentCount);
Line->add(m_FragmentCount);
Line->end();
m_Options->add(Line);
Line = new Fl_Pack(0,0,100,20,"");
Line->type(FL_HORIZONTAL);
Name = new Fl_Box(55,0,150,20,"SampleRate");
Name->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
Name->labelsize(10);
Line->add(Name);
m_Samplerate = new Fl_Int_Input(0,0,80,20,"");
m_Samplerate->value(Samplerate);
Line->add(m_Samplerate);
Line->end();
m_Options->add(Line);
Line = new Fl_Pack(0,0,100,20,"");
Line->type(FL_HORIZONTAL);
Name = new Fl_Box(55,0,150,20,"Output Device");
Name->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
Name->labelsize(10);
Line->add(Name);
m_OutputDevice = new Fl_Input(0,0,80,20,"");
m_OutputDevice->value(OutputDevice);
Line->add(m_OutputDevice);
Line->end();
m_Options->add(Line);
Line = new Fl_Pack(0,0,100,20,"");
Line->type(FL_HORIZONTAL);
Name = new Fl_Box(55,0,150,20,"Midi Device");
Name->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
Name->labelsize(10);
Line->add(Name);
m_MidiDevice = new Fl_Input(0,0,80,20,"");
m_MidiDevice->value(MidiDevice);
Line->add(m_MidiDevice);
Line->end();
m_Options->add(Line);
m_Options->end();
m_Save = new Fl_Button(140,250,50,20,"Save");
m_Save->labelsize(10);
m_Save->tooltip("Save these settings");
m_Save->callback((Fl_Callback*)cb_Save);
add(m_Save);
m_Apply = new Fl_Button(195,250,50,20,"Apply");
m_Apply->labelsize(10);
m_Apply->tooltip("Some plugins may request to save data first");
m_Apply->callback((Fl_Callback*)cb_Apply);
add(m_Apply);
end();
}

SettingsWindow::~SettingsWindow()
{
}

inline void SettingsWindow::cb_Apply_i(Fl_Button* o, void* v)
{
SpiralSynthModularInfo::BUFSIZE=(int)atof(m_BufferSize->value());
SpiralSynthModularInfo::FRAGSIZE=(int)atof(m_FragmentSize->value());
SpiralSynthModularInfo::FRAGCOUNT=(int)atof(m_FragmentCount->value());
SpiralSynthModularInfo::SAMPLERATE=(int)atof(m_Samplerate->value());
SpiralSynthModularInfo::OUTPUTFILE=m_OutputDevice->value();
SpiralSynthModularInfo::MIDIFILE=m_MidiDevice->value();

assert(m_App);
if (m_App)
{
m_App->UpdateHostInfo();
}
}
void SettingsWindow::cb_Apply(Fl_Button* o, void* v)
{ ((SettingsWindow*)(o->parent()))->cb_Apply_i(o,v); }
inline void SettingsWindow::cb_Save_i(Fl_Button* o, void* v)
{
SpiralSynthModularInfo::BUFSIZE=(int)atof(m_BufferSize->value());
SpiralSynthModularInfo::FRAGSIZE=(int)atof(m_FragmentSize->value());
SpiralSynthModularInfo::FRAGCOUNT=(int)atof(m_FragmentCount->value());
SpiralSynthModularInfo::SAMPLERATE=(int)atof(m_Samplerate->value());
SpiralSynthModularInfo::OUTPUTFILE=m_OutputDevice->value();
SpiralSynthModularInfo::MIDIFILE=m_MidiDevice->value();
SpiralSynthModularInfo::Get()->SavePrefs();
}
void SettingsWindow::cb_Save(Fl_Button* o, void* v)
{ ((SettingsWindow*)(o->parent()))->cb_Save_i(o,v); }

+ 60
- 0
SettingsWindow.h View File

@@ -0,0 +1,60 @@
/* SpiralSynthModular
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifndef SETTINGSWINDOW
#define SETTINGSWINDOW

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Int_Input.H>
#include <FL/Fl_Input.H>

#include "SpiralSynthModular.h"

class SynthModular;

class SettingsWindow : public Fl_Double_Window
{
public:
SettingsWindow();
~SettingsWindow();
void RegisterApp(SynthModular *s) { m_App=s; }
private:
SynthModular *m_App;
Fl_Pack *m_Options;
Fl_Int_Input *m_BufferSize;
Fl_Int_Input *m_FragmentSize;
Fl_Int_Input *m_FragmentCount;
Fl_Int_Input *m_Samplerate;
Fl_Input *m_OutputDevice;
Fl_Input *m_MidiDevice;
Fl_Button *m_Save;
Fl_Button *m_Apply;
inline void cb_Apply_i(Fl_Button* o, void* v);
static void cb_Apply(Fl_Button* o, void* v);
inline void cb_Save_i(Fl_Button* o, void* v);
static void cb_Save(Fl_Button* o, void* v);
};

#endif

+ 406
- 0
SpiralSound/Midi.C View File

@@ -0,0 +1,406 @@
/*
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "Midi.h"
#include "NoteTable.h"
#include "unistd.h"
#include "sys/types.h"
#include "signal.h"
#include "pthread.h"

#ifdef KEYBOARD_SUPPORT
#include <FL/Fl.h>
#endif

static const int MIDI_SCANBUFSIZE=256;
static const int MIDI_KEYOFFSET=0;

static const unsigned char STATUS_START = 0x80;
static const unsigned char STATUS_NOTE_OFF = 0x80;
static const unsigned char STATUS_NOTE_ON = 0x90;
static const unsigned char STATUS_AFTERTOUCH = 0xa0;
static const unsigned char STATUS_CONTROL_CHANGE = 0xb0;
static const unsigned char STATUS_PROG_CHANGE = 0xc0;
static const unsigned char STATUS_CHANNEL_PRESSURE = 0xd0;
static const unsigned char STATUS_PITCH_WHEEL = 0xe0;
static const unsigned char STATUS_END = 0xf0;
static const unsigned char SYSEX_START = 0xf0;
static const unsigned char SYSEX_TERMINATOR = 0xf7;
static const unsigned char MIDI_CLOCK = 0xf8;
static const unsigned char ACTIVE_SENSE = 0xfe;

static int NKEYS = 30;
static char KEYMAP[30]={'z','s','x','d','c','v','g','b','h','n','j','m','q',
'2','w','3','e','r','5','t','6','y','7','u','i','9',
'o','0','p','['};
MidiDevice *MidiDevice::m_Singleton;
string MidiDevice::m_DeviceName;
MidiDevice::MidiDevice() :
m_Poly(1)
{
Open();

#ifdef KEYBOARD_SUPPORT
m_Oct=4;
m_CurrentVoice=0;
for (int n=0; n<256; n++)
{
m_KeyVoice[n]=' ';
}
#endif
}

MidiDevice::~MidiDevice()
{
Close();
}

void MidiDevice::Close()
{
pthread_mutex_lock(m_Mutex);
pthread_cancel(m_MidiReader);
pthread_mutex_unlock(m_Mutex);
pthread_mutex_destroy(m_Mutex);
close(m_MidiFd);
close(m_MidiWrFd);
cerr<<"Closed midi device"<<endl;
}


void MidiDevice::Open()
{
//if (!SpiralInfo::WANTMIDI) return;
m_MidiFd = open(m_DeviceName.c_str(),O_RDONLY|O_SYNC);
if (!m_MidiFd)
{
cerr<<"Couldn't open midi for reading ["<<m_DeviceName<<"]"<<endl;
return;
}
m_MidiWrFd = open(m_DeviceName.c_str(),O_WRONLY);
if (!m_MidiWrFd)
{
cerr<<"Couldn't open midi for writing ["<<m_DeviceName<<"]"<<endl;
return;
}
cerr<<"Opened midi device ["<<m_DeviceName<<"]"<<endl;
m_Mutex = new pthread_mutex_t;
pthread_mutex_init(m_Mutex, NULL);
int ret=pthread_create(&m_MidiReader,NULL,(void*(*)(void*))MidiDevice::MidiReaderCallback,(void*)this);
}


// returns the next event off the list, or an
// empty event if the list is exhausted
MidiEvent MidiDevice::GetEvent(int Device)
{
if (Device<0 || Device>15)
{
cerr<<"GetEvent: Invalid Midi device "<<Device<<endl;
return MidiEvent(MidiEvent::NONE,0,0);
}

#ifdef KEYBOARD_SUPPORT
CheckKeyboard();
#endif

pthread_mutex_lock(m_Mutex);
if (m_EventVec[Device].size()==0)
{
pthread_mutex_unlock(m_Mutex);
return MidiEvent(MidiEvent::NONE,0,0);
}
MidiEvent event(m_EventVec[Device].front());
m_EventVec[Device].pop();
pthread_mutex_unlock(m_Mutex);
return event;
}

void MidiDevice::SendEvent(int Device,const MidiEvent &Event)
{
if (Device<0 || Device>15)
{
cerr<<"SendEvent: Invalid Midi device "<<Device<<endl;
}

char message[3];
message[1]=Event.GetNote()+MIDI_KEYOFFSET;
message[2]=(char)Event.GetVolume();
if (Event.GetType()==MidiEvent::ON)
{
message[0]=STATUS_NOTE_ON+Device;
write(m_MidiWrFd,message,3);
//cerr<<"sending "<<message<<endl;
}
if (Event.GetType()==MidiEvent::OFF)
{
message[0]=STATUS_NOTE_OFF+Device;
write(m_MidiWrFd,message,3);
//cerr<<"sending "<<message<<endl;
}
}

/////////////////////////////////////////////////////////////////////////////////
// Reader thread functions

// little helper to strip out the realtime and unused messages
void MidiDevice::ReadByte(unsigned char *c)
{
*c=MIDI_CLOCK;
do read(m_MidiFd,c,1);
while (*c>=STATUS_END);
}

// collect events deals with the byte level messages, and sorts
// and filters them into distinct messages we can handle easily
void MidiDevice::CollectEvents()
{
unsigned char buf[1];
int count,n,nn;
bool MessageSent;
unsigned char data[3],last=0;
// constantly scan for relevent input,
// and write it to the pipe

// filters out unhandled messages, and attempts to build
// coherent messages to send to the midi handler
bool InSysex=false;
for(;;)
{
ReadByte(buf);
if (*buf>=STATUS_START) // we've got a status byte
{
if (*buf==SYSEX_TERMINATOR) InSysex=false;

// find out if it's an opcode
if(*buf>=STATUS_START && *buf<=STATUS_END)
{
InSysex=false;
last=data[0]=*buf;
if (data[0]>=STATUS_PROG_CHANGE && data[0]<STATUS_PITCH_WHEEL)
{
ReadByte(&data[1]); //one byte
data[2]=0;
}
else // get the next two bytes
{
ReadByte(&data[1]);
ReadByte(&data[2]);
}
AddEvent(data);
}
else // its a sysex or other message like active sense
{
if (*buf==SYSEX_START) InSysex=true;
cerr<<"Unhandled midi message: "; printf("%x\n",(int)*buf);
}
}
else // more data (running status)
{
if (!InSysex)
{
data[0]=last;
data[1]=*buf;
if (data[0]>=STATUS_PROG_CHANGE && data[0]<STATUS_PITCH_WHEEL)
{
data[2]=0; //one byte
}
else // get the next byte
{
ReadByte(&data[2]);
}
AddEvent(data);
}
}
}
}
// addevent converts the midi bytecode into midi message objects and
// stacks them onto the event list to be picked up by the app
void MidiDevice::AddEvent(unsigned char* midi)
{
MidiEvent::type MessageType=MidiEvent::NONE;
int Volume=0,Note=0,EventDevice=0;
// note off
if (midi[0] >= STATUS_NOTE_OFF && midi[0] < STATUS_NOTE_ON)
{
MessageType=MidiEvent::OFF;
Note=midi[1]-MIDI_KEYOFFSET;
EventDevice=midi[0]-STATUS_NOTE_OFF;
}
// note on
else if (midi[0] >= STATUS_NOTE_ON && midi[0] < STATUS_AFTERTOUCH)
{
Volume = midi[2];
// cope with Roland equipment, where note on's
// with zero velocity are sent as note offs.
if (Volume) MessageType=MidiEvent::ON;
else MessageType=MidiEvent::OFF;

Note=midi[1]-MIDI_KEYOFFSET;
EventDevice=midi[0]-STATUS_NOTE_ON;
}
// aftertouch
else if (midi[0] >= STATUS_AFTERTOUCH && midi[0] < STATUS_CONTROL_CHANGE)
{
MessageType=MidiEvent::AFTERTOUCH;
Note=midi[1]-MIDI_KEYOFFSET;
Volume=midi[2];
EventDevice=midi[0]-STATUS_AFTERTOUCH;
}
// parameter
else if (midi[0] >= STATUS_CONTROL_CHANGE && midi[0] < STATUS_PROG_CHANGE)
{
MessageType=MidiEvent::PARAMETER;
Note=midi[1];
Volume=midi[2];
EventDevice=midi[0]-STATUS_CONTROL_CHANGE;
}
// channel pressure
else if (midi[0] >= STATUS_CHANNEL_PRESSURE && midi[0] < STATUS_PITCH_WHEEL)
{
MessageType=MidiEvent::CHANNELPRESSURE;
Volume=midi[1];
EventDevice=midi[0]-STATUS_CHANNEL_PRESSURE;
}
// note pitchbend
else if (midi[0] >= STATUS_PITCH_WHEEL && midi[0] < STATUS_END)
{
MessageType=MidiEvent::PITCHBEND;
// should probably take the first byte into account too?
Volume=midi[2];
EventDevice=midi[0]-STATUS_PITCH_WHEEL;
}

if (EventDevice<0 || EventDevice>15)
{
cerr<<"Error - Midi device "<<EventDevice<<" ??"<<endl;
return;
}

pthread_mutex_lock(m_Mutex);
m_EventVec[EventDevice].push(MidiEvent(MessageType,Note,Volume));
pthread_mutex_unlock(m_Mutex);
}

///////////////////////////////////////////////////////////////////////////////

// Parse the keyboard to generate midi messages
#ifdef KEYBOARD_SUPPORT
void MidiDevice::CheckKeyboard()
{
Fl::check();
MidiEvent::type MessageType=MidiEvent::NONE;
int Volume=0,Note=0,EventDevice=0;

if (Fl::event_key(FL_F+1)) m_Oct=0;
if (Fl::event_key(FL_F+2)) m_Oct=1;
if (Fl::event_key(FL_F+3)) m_Oct=2;
if (Fl::event_key(FL_F+4)) m_Oct=3;
if (Fl::event_key(FL_F+5)) m_Oct=4;
if (Fl::event_key(FL_F+6)) m_Oct=5;
if (Fl::event_key(FL_F+7)) m_Oct=6;
if (Fl::event_key(FL_F+8)) m_Oct=7;
if (Fl::event_key(FL_F+9)) m_Oct=8;
if (Fl::event_key(FL_F+10)) m_Oct=9;
if (Fl::event_key(FL_F+11)) m_Oct=10;

int note=0;
char KeyChar=0;
bool KeyPressed=false;

for (int key=0; key<NKEYS; key++)
{
KeyChar=KEYMAP[key];
// check if a key's been pressed
if (Fl::event_key(KeyChar))
{
KeyPressed=true;
// check it was pressed last time
bool Found=false;
for (int n=0; n<m_Poly; n++)
{
if (m_KeyVoice[n]==KeyChar)
{
Found=true;
}
}
if (!Found)
{
Volume = 127;
MessageType=MidiEvent::ON;
Note=(m_Oct*12)+note;
// Move to the next voice
m_CurrentVoice++;
if (m_CurrentVoice>=m_Poly)
{
m_CurrentVoice=0;
}
// this should be the current voice we are using
m_KeyVoice[m_CurrentVoice]=KeyChar;
}
}
else // it's not pressed down
{
//see if the note was pressed down last time
for (int n=0; n<m_Poly; n++)
{
if (m_KeyVoice[n]==KeyChar)
{
MessageType=MidiEvent::OFF;
Note=(m_Oct*12)+note;
m_KeyVoice[n]=' ';
}
}
}
note++;
}
if (MessageType!=MidiEvent::NONE)
{
pthread_mutex_lock(m_Mutex);
m_EventVec[EventDevice].push(MidiEvent(MessageType,Note,Volume));
pthread_mutex_unlock(m_Mutex);
}
}
#endif

+ 100
- 0
SpiralSound/Midi.h View File

@@ -0,0 +1,100 @@
/* SpiralSynth
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include <limits.h>
#include <queue>
#include <string>

#ifndef MIDI
#define MIDI

using namespace std;

#define KEYBOARD_SUPPORT


class MidiEvent
{
public:
enum type{NONE,ON,OFF,AFTERTOUCH,PARAMETER,CHANNELPRESSURE,PITCHBEND};

MidiEvent() {m_Type=NONE;}
MidiEvent(type t, int note, float v)
{m_Type=t; m_Note=note; m_Volume=v;}
type GetType() const {return m_Type;}
float GetVolume() const {return m_Volume;}
int GetNote() const {return m_Note;}
private:
float m_Volume;
type m_Type;
int m_Note;
};

class MidiDevice
{
public:
~MidiDevice();

static void SetDeviceName(string s) { m_DeviceName=s; }
static MidiDevice *Get() { if(!m_Singleton) m_Singleton=new MidiDevice; return m_Singleton; }
static void PackUpAndGoHome() { if(m_Singleton) delete m_Singleton; m_Singleton=NULL; }

static void *MidiReaderCallback(void *o) { ((MidiDevice*)o)->CollectEvents(); return NULL; }

MidiEvent GetEvent(int Device);
void SendEvent(int Device,const MidiEvent &Event);

void SetPoly(int s) { m_Poly=s; }

private:
MidiDevice();

void Open();
void Close();
void CollectEvents();
void AddEvent(unsigned char* midi);

void ReadByte(unsigned char *c);

int m_MidiFd;
int m_MidiWrFd;
static string m_DeviceName;
int m_Poly;
queue<MidiEvent> m_EventVec[16];
static MidiDevice *m_Singleton;

pthread_t m_MidiReader;
pthread_mutex_t* m_Mutex;

#ifdef KEYBOARD_SUPPORT
void CheckKeyboard();
char m_KeyVoice[256];
int m_Oct;
int m_CurrentVoice;
#endif
};

#endif

+ 19
- 0
SpiralSound/NoteTable.C View File

@@ -0,0 +1,19 @@
/* SpiralSynth
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "NoteTable.h"


+ 37
- 0
SpiralSound/NoteTable.h View File

@@ -0,0 +1,37 @@
/* SpiralSynth
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#ifndef NOTETABLE
#define NOTETABLE

static const float NoteTable [132]=
{
8.176, 8.662,9.177,9.723,10.301,10.913, 11.562,12.250,12.978,13.750,14.568,15.434,
16.352,17.324,18.354,19.445,20.602,21.827,23.125,24.500,25.957,27.500,29.135,30.868,
32.703,34.648,36.708,38.891,41.203,43.654,46.249,48.999,51.913,55.000,58.270,61.735,
65.406,69.296,73.416,77.782,82.407,87.307,92.499,97.999,103.826,110.000,116.541,123.471,
130.813,138.591,146.832,155.563,164.814,174.614,184.997,195.998,207.652,220.000,233.082,246.942,
261.626,277.183,293.665,311.127,329.628,349.228,369.994,391.995,415.305,440.000,466.164,493.883,
523.251,554.365,587.330,622.254,659.255,698.456,739.989,783.991,830.609,880.000,932.328,987.767,
1046.502,1108.731,1174.659,1244.508,1318.510,1396.913,1479.978,1567.982,1661.219,1760.000,1864.655,1975.533,
2093.005,2217.461,2349.318,2489.016,2637.020,2793.826,2959.955,3135.963,3322.438,3520.000,3729.310,3951.066,
4186.009,4434.922,4698.636,4978.032,5274.041,5587.652,5919.911,6271.927,6644.875,7040.000,7458.620,7902.133,
8372.018,8869.844,9397.273,9956.063,10548.08,11175.30,11839.82,12543.85,0,0,0,0
};

#endif

+ 135
- 0
SpiralSound/PluginManager.C View File

@@ -0,0 +1,135 @@
/* SpiralSound
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <dlfcn.h>
#include <stdio.h>
#include "PluginManager.h"

PluginManager *PluginManager::m_Singleton = NULL;

PluginManager::PluginManager()
{
}
PluginManager::~PluginManager()
{
UnloadAll();
}
PluginID PluginManager::LoadPlugin(const char *PluginName)
{
// Make a new plugin
HostsideInfo *NewPlugin = new HostsideInfo;
NewPlugin->Handle=NULL;
NewPlugin->ID=PluginError;
// Attempt to open the plugin
NewPlugin->Handle = dlopen (PluginName, RTLD_NOW);
if (NewPlugin->Handle==NULL)
{
SpiralInfo::Alert("Error loading plugin: \n"+string(dlerror()));
return PluginError;
}
// Link the neccesary functions
NewPlugin->CreateInstance = (SpiralPlugin*(*)()) dlsym(NewPlugin->Handle, "CreateInstance");
NewPlugin->GetIcon = (char **(*)()) dlsym(NewPlugin->Handle, "GetIcon");
NewPlugin->GetID = (int(*)()) dlsym(NewPlugin->Handle, "GetID");
char *error;
if ((error = dlerror()) != NULL)
{
SpiralInfo::Alert("Error linking to plugin: \n"+string(error));
return PluginError;
}
// We've succesfully open and linked the
// plugin, so add it to the vector.
int ID;
ID = NewPlugin->GetID();
NewPlugin->ID = ID;
m_PluginVec.push_back(NewPlugin);
return ID;
}

void PluginManager::UnLoadPlugin(PluginID ID)
{
if (IsValid(ID))
{
dlclose(GetPlugin(ID)->Handle);
char *error;
if ((error = dlerror()) != NULL)
{
SpiralInfo::Alert("Error unlinking plugin: \n"+string(error));
}
}
}

void PluginManager::UnloadAll()
{
for (vector<HostsideInfo*>::iterator i=m_PluginVec.begin();
i!=m_PluginVec.end(); i++)
{
dlclose((*i)->Handle);
char *error;
if ((error = dlerror()) != NULL)
{
SpiralInfo::Alert("Error unlinking plugin: \n"+string(error));
}
}
}

const HostsideInfo *PluginManager::GetPlugin(PluginID ID)
{
return GetPlugin_i(ID);
}

HostsideInfo *PluginManager::GetPlugin_i(PluginID ID)
{

HostsideInfo *ret = NULL;

for (vector<HostsideInfo*>::iterator i=m_PluginVec.begin();
i!=m_PluginVec.end(); i++)
{
if ((*i)->ID==ID)
{
ret = *i;
break;
}
}

if (!ret)
{
char t[256];
sprintf(t,"%d",ID);
SpiralInfo::Alert("Plugin "+string(t)+" not found.");
}

return ret;
}
bool PluginManager::IsValid(PluginID ID)
{
const HostsideInfo *t = GetPlugin(ID);
return (t && t->Handle!=NULL);
}



+ 60
- 0
SpiralSound/PluginManager.h View File

@@ -0,0 +1,60 @@
/* SpiralSound
* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl_Double_Window.h>
#include <FL/Fl_Pixmap.h>
#include <iostream>
#include <vector>
#include "Plugins/SpiralPlugin.h"

struct HostsideInfo
{
void* Handle;
int ID;
char **(*GetIcon)(void);
SpiralPlugin *(*CreateInstance)(void);
int (*GetID)(void);
};

//////////////////////////////////////////////////////////

typedef int PluginID;
#define PluginError -1

class PluginManager
{
public:
static PluginManager *Get() { if(!m_Singleton) m_Singleton=new PluginManager; return m_Singleton; }
static void PackUpAndGoHome() { if(m_Singleton) delete m_Singleton; }

PluginID LoadPlugin(const char *PluginName);
void UnLoadPlugin(PluginID ID);
void UnloadAll();
const HostsideInfo* GetPlugin(PluginID ID);
bool IsValid(PluginID ID);
int GetIdByName(string Name);
private:

PluginManager();
~PluginManager();
HostsideInfo *GetPlugin_i(PluginID ID);
vector<HostsideInfo*> m_PluginVec;
static PluginManager *m_Singleton;
};

+ 105
- 0
SpiralSound/Plugins/AmpPlugin/AmpPlugin.C View File

@@ -0,0 +1,105 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <math.h>
#include "AmpPlugin.h"
#include "AmpPluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

#define PI 3.141592654

extern "C" {
SpiralPlugin* CreateInstance()
{
return new AmpPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x0009;
}
}

///////////////////////////////////////////////////////

AmpPlugin::AmpPlugin() :
m_Amp(1.0f),
m_DC(0.0f)
{
m_PluginInfo.Name="Amp";
m_PluginInfo.Width=120;
m_PluginInfo.Height=110;
m_PluginInfo.NumInputs=3;
m_PluginInfo.NumOutputs=1;
m_PluginInfo.PortTips.push_back("Input");
m_PluginInfo.PortTips.push_back("Amp CV");
m_PluginInfo.PortTips.push_back("DC Offset CV");
m_PluginInfo.PortTips.push_back("Output");
}

AmpPlugin::~AmpPlugin()
{
}

PluginInfo &AmpPlugin::Initialise(const HostInfo *Host)
{
return SpiralPlugin::Initialise(Host);
}

SpiralGUIType *AmpPlugin::CreateGUI()
{
m_GUI = new AmpPluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void AmpPlugin::Execute()
{
float in;
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
in = GetInput(0,n);
in *= m_Amp+GetInput(1,n);
in += (-m_DC)+GetInput(2,n);
SetOutput(0,n,in);
}
}
void AmpPlugin::Randomise()
{
}
void AmpPlugin::StreamOut(ostream &s)
{
s<<m_Version<<" "<<m_Amp<<" "<<m_DC<<" ";
}

void AmpPlugin::StreamIn(istream &s)
{
int version;
s>>version;
s>>m_Amp>>m_DC;
}

+ 57
- 0
SpiralSound/Plugins/AmpPlugin/AmpPlugin.h View File

@@ -0,0 +1,57 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include <FL/Fl.h>

#ifndef AMPPLUGIN
#define AMPPLUGIN

class AmpPlugin : public SpiralPlugin
{
public:
AmpPlugin();
virtual ~AmpPlugin();
virtual PluginInfo &Initialise(const HostInfo *Host);
virtual SpiralGUIType *CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }
void SetAmp(float s) { m_Amp=s; }
void SetDC(float s) { m_DC=s; }
float GetAmp() { return m_Amp; }
float GetDC() { return m_DC; }
void Randomise();

private:
float m_Amp;
float m_DC;
friend istream &operator>>(istream &s, AmpPlugin &o);
friend ostream &operator<<(ostream &s, AmpPlugin &o);
};
istream &operator>>(istream &s, AmpPlugin &o);
ostream &operator<<(ostream &s, AmpPlugin &o);

#endif

+ 17
- 0
SpiralSound/Plugins/AmpPlugin/AmpPlugin.pro View File

@@ -0,0 +1,17 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
AmpPlugin.h \
AmpPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
AmpPlugin.C \
AmpPluginGUI.C

TARGET = AmpPlugin.so

+ 136
- 0
SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C View File

@@ -0,0 +1,136 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "AmpPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>
static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;
////////////////////////////////////////////
AmpPluginGUI::AmpPluginGUI(int w, int h,AmpPlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o)
{
m_Plugin=o;
m_Amp = new Fl_Slider(15, 20, 20, 70, "Amp");
m_Amp->type(4);
m_Amp->selection_color(GUI_COLOUR);
m_Amp->labelsize(10);
m_Amp->maximum(4);
m_Amp->step(0.0001);
m_Amp->value(2);
m_Amp->callback((Fl_Callback*)cb_Amp);
m_DC = new Fl_Slider(70, 20, 20, 70, "DC Offset");
m_DC->type(4);
m_DC->selection_color(GUI_COLOUR);
m_DC->labelsize(10);
m_DC->maximum(4);
m_DC->step(0.0001);
m_DC->value(2);
m_DC->callback((Fl_Callback*)cb_DC);
m_pop = new Fl_Button(1,h-14, 13, 13, "@>");
m_pop->type(1);
m_pop->box(FL_FLAT_BOX);
m_pop->down_box(FL_FLAT_BOX);
m_pop->labeltype(FL_SYMBOL_LABEL);
m_pop->labelsize(10);
m_pop->labelcolor(25);
m_pop->callback((Fl_Callback*)cb_pop);
m_out_gain = new Fl_Output(25,h+5,36, 15, "Gain");
m_out_gain->box(FL_ENGRAVED_BOX);
m_out_gain->color(16);
m_out_gain->labelsize(10);
m_out_gain->textsize(10);
m_out_gain->hide();
m_out_gain->set_output();
m_out_DC = new Fl_Output(82,h+5,36, 15, "DC");
m_out_DC->box(FL_ENGRAVED_BOX);
m_out_DC->color(16);
m_out_DC->labelsize(10);
m_out_DC->textsize(10);
m_out_DC->hide();
m_out_DC->set_output();
end();
}
extern "C" int sprintf(char *,const char *,...);
void AmpPluginGUI::UpdateValues()
{
m_Amp->value(2.0f-m_Plugin->GetAmp());
m_DC->value(2.0f-m_Plugin->GetDC());
char str[10];
sprintf(str,"%4.2f",m_Plugin->GetAmp());
m_out_gain->value(str);
sprintf(str,"%4.2f",m_Plugin->GetDC());
m_out_DC->value(str);
}
inline void AmpPluginGUI::cb_Amp_i(Fl_Slider* o, void* v)
{
char str[10];
float value=2.0f-o->value();
m_Plugin->SetAmp(value);
sprintf(str,"%4.2f",value);
m_out_gain->value(str);
}
void AmpPluginGUI::cb_Amp(Fl_Slider* o, void* v)
{ ((AmpPluginGUI*)(o->parent()))->cb_Amp_i(o,v); }
inline void AmpPluginGUI::cb_DC_i(Fl_Slider* o, void* v)
{
char str[10];
float value=2.0f-o->value();
m_Plugin->SetDC(value);
sprintf(str,"%4.2f",value);
m_out_DC->value(str);
}
void AmpPluginGUI::cb_DC(Fl_Slider* o, void* v)
{ ((AmpPluginGUI*)(o->parent()))->cb_DC_i(o,v); }
inline void AmpPluginGUI::cb_pop_i(Fl_Button *o, void*) {
if (o->value())
{
o->label("@2>");
m_out_gain->show();
m_out_DC->show();
redraw();
}
else
{
o->label("@>");
m_out_gain->hide();
m_out_DC->hide();
redraw();
parent()->redraw();
}
}
void AmpPluginGUI::cb_pop(Fl_Button* o, void* v) {
((AmpPluginGUI*)(o->parent()))->cb_pop_i(o,v);
}

+ 62
- 0
SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h View File

@@ -0,0 +1,62 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Slider.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Box.H>
#include "AmpPlugin.h"
#include "../SpiralPluginGUI.h"
#ifndef AmpGUI
#define AmpGUI
class AmpPluginGUI : public SpiralPluginGUI
{
public:
AmpPluginGUI(int w, int h, AmpPlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
AmpPlugin *m_Plugin;
private:
Fl_Group *GUIFilterGroup;
Fl_Slider *m_Amp;
Fl_Slider *m_DC;
Fl_Button *m_pop;
Fl_Output *m_out_gain;
Fl_Output *m_out_DC;
//// Callbacks ////
inline void cb_Amp_i(Fl_Slider* o, void* v);
static void cb_Amp(Fl_Slider*, void*);
inline void cb_DC_i(Fl_Slider* o, void* v);
static void cb_DC(Fl_Slider* o, void* v);
inline void cb_pop_i(Fl_Button* o, void*);
static void cb_pop(Fl_Button* o, void*);
};
#endif

+ 164
- 0
SpiralSound/Plugins/AmpPlugin/Makefile.in View File

@@ -0,0 +1,164 @@
#############################################################################
# Makefile for building AmpPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: AmpPlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@
CXXFLAGS= @CXXFLAGS@
INCPATH = -I/usr/X11R6/include
LINK = g++ -shared
LFLAGS =
LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
AmpPlugin.h \
AmpPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
AmpPlugin.C \
AmpPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
AmpPlugin.o \
AmpPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = AmpPlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake AmpPlugin.pro

dist:
$(TAR) AmpPlugin.tar AmpPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) AmpPlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

AmpPlugin.o: AmpPlugin.C \
AmpPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
AmpPluginGUI.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
SpiralIcon.xpm

AmpPluginGUI.o: AmpPluginGUI.C \
AmpPluginGUI.h \
AmpPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H


+ 347
- 0
SpiralSound/Plugins/AmpPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,347 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 308 2",
" c None",
". c #8B889B",
"+ c #9C99AA",
"@ c #ADAAB9",
"# c #837F94",
"$ c #7D7990",
"% c #9995A7",
"& c #67627C",
"* c #CDCBD4",
"= c #FCFCFC",
"- c #D1D0D8",
"; c #FFFFFF",
"> c #F1F1F3",
", c #848095",
"' c #2A2248",
") c #CFCED6",
"! c #68637D",
"~ c #ABA8B6",
"{ c #D5D3DB",
"] c #9490A2",
"^ c #C4C4C4",
"/ c #1D1C1D",
"( c #313134",
"_ c #EEEFEE",
": c #FBFBFB",
"< c #EFEFEF",
"[ c #7B768D",
"} c #464060",
"| c #DEDEE1",
"1 c #CBCACC",
"2 c #EEEEF1",
"3 c #79758C",
"4 c #FBFBFC",
"5 c #A2A2A2",
"6 c #000000",
"7 c #F5F6F5",
"8 c #747474",
"9 c #2A2A2B",
"0 c #403958",
"a c #7D788F",
"b c #C0BEC8",
"c c #BCBAC6",
"d c #BCBAC5",
"e c #625C79",
"f c #2B2932",
"g c #191919",
"h c #CCCCCC",
"i c #807B91",
"j c #3B3556",
"k c #F2F2F4",
"l c #929292",
"m c #0E0E0E",
"n c #BFBFBF",
"o c #111111",
"p c #100E15",
"q c #868689",
"r c #FEFDFE",
"s c #D9D7DE",
"t c #9C98AA",
"u c #FDFCFD",
"v c #DDDDDD",
"w c #575755",
"x c #5E5E5E",
"y c #C4C2CD",
"z c #423C5C",
"A c #F0F0F2",
"B c #939393",
"C c #555555",
"D c #4A4A4A",
"E c #010101",
"F c #282828",
"G c #C2C2C2",
"H c #DBDAE0",
"I c #615C78",
"J c #F6F6F7",
"K c #DADADA",
"L c #545454",
"M c #0F0F0F",
"N c #B8B8B8",
"O c #48445C",
"P c #2B2B2C",
"Q c #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0C0C0C",
"+. c #161800",
"@. c #1A1B00",
"#. c #060600",
"$. c #191A00",
"%. c #393643",
"&. c #47415F",
"*. c #9692A4",
"=. c #D9D8DE",
"-. c #F7F7F8",
";. c #918DA0",
">. c #B8B5C1",
",. c #D1D1D1",
"'. c #212121",
"). c #2D2F00",
"!. c #111200",
"~. c #0B0C00",
"{. c #0F0F00",
"]. c #090A00",
"^. c #040400",
"/. c #727175",
"(. c #FEFEFF",
"_. c #9D99AA",
":. c #DBD9E0",
"<. c #E9E9E9",
"[. c #CBCBCB",
"}. c #E0E0E0",
"|. c #6C6C6C",
"1. c #726C00",
"2. c #FEF100",
"3. c #FCEF00",
"4. c #322F00",
"5. c #515151",
"6. c #A6A6A7",
"7. c #827E93",
"8. c #615C77",
"9. c #EAEAED",
"0. c #DFDFE1",
"a. c #302D00",
"b. c #DCD000",
"c. c #FFF200",
"d. c #1E1C00",
"e. c #1E1D24",
"f. c #9894A7",
"g. c #B1AEBB",
"h. c #69686F",
"i. c #000001",
"j. c #EFE200",
"k. c #F6E900",
"l. c #C6BB00",
"m. c #060500",
"n. c #615C76",
"o. c #5F5A75",
"p. c #413E4D",
"q. c #020203",
"r. c #7E7700",
"s. c #E5D900",
"t. c #F8EB00",
"u. c #1A1A1C",
"v. c #C3C1CB",
"w. c #9D9D9D",
"x. c #202020",
"y. c #383838",
"z. c #4C4C4C",
"A. c #B1A800",
"B. c #A9A000",
"C. c #111112",
"D. c #C9C7D0",
"E. c #F1F1F1",
"F. c #F8F8F8",
"G. c #232323",
"H. c #191700",
"I. c #827B00",
"J. c #ACA300",
"K. c #F2E500",
"L. c #050408",
"M. c #AEACB9",
"N. c #FEFEFE",
"O. c #1D1D1D",
"P. c #444000",
"Q. c #F1E400",
"R. c #B7B5C1",
"S. c #9390A2",
"T. c #BBBBBB",
"U. c #414141",
"V. c #030303",
"W. c #948C00",
"X. c #756F00",
"Y. c #28272A",
"Z. c #F4F4F6",
"`. c #605B76",
" + c #736E86",
".+ c #D8D8D8",
"++ c #727272",
"@+ c #101010",
"#+ c #645E00",
"$+ c #F5E800",
"%+ c #848486",
"&+ c #CCCBD3",
"*+ c #747087",
"=+ c #6D6881",
"-+ c #1C1C1C",
";+ c #242424",
">+ c #656566",
",+ c #F6F6F6",
"'+ c #E8E6EA",
")+ c #706B84",
"!+ c #E3E1E6",
"~+ c #474746",
"{+ c #151515",
"]+ c #C8C8C8",
"^+ c #AEAEAE",
"/+ c #080808",
"(+ c #010100",
"_+ c #373639",
":+ c #FDFCFE",
"<+ c #ABA8B7",
"[+ c #F1F0F3",
"}+ c #6D6980",
"|+ c #0A090E",
"1+ c #95929E",
"2+ c #0A0810",
"3+ c #0D0D0D",
"4+ c #050505",
"5+ c #5B5A5C",
"6+ c #F7F6F7",
"7+ c #F4F3F5",
"8+ c #908C9F",
"9+ c #C8C6D0",
"0+ c #837E96",
"a+ c #86868A",
"b+ c #070608",
"c+ c #ECEBEE",
"d+ c #5B5571",
"e+ c #646078",
"f+ c #AFAFB0",
"g+ c #454545",
"h+ c #363636",
"i+ c #7A7A7A",
"j+ c #C8C8C9",
"k+ c #212025",
"l+ c #060607",
"m+ c #969699",
"n+ c #FAFAFA",
"o+ c #F8F8F9",
"p+ c #A29EAF",
"q+ c #F7F6F8",
"r+ c #F0F0F1",
"s+ c #B8B7B9",
"t+ c #E4E4E4",
"u+ c #FDFDFD",
"v+ c #A5A2B2",
"w+ c #3B3456",
"x+ c #A8A5B4",
"y+ c #525252",
"z+ c #848387",
"A+ c #CDCDCD",
"B+ c #8D899C",
"C+ c #494262",
"D+ c #68627C",
"E+ c #40395A",
"F+ c #ECECEC",
"G+ c #020202",
"H+ c #B4B5B5",
"I+ c #0B0B0B",
"J+ c #313232",
"K+ c #E3E3E3",
"L+ c #B1AEBC",
"M+ c #BDBBC6",
"N+ c #3C3556",
"O+ c #898599",
"P+ c #EDEDED",
"Q+ c #39393A",
"R+ c #040404",
"S+ c #333333",
"T+ c #F5F5F5",
"U+ c #2B2B2B",
"V+ c #2D2A3D",
"W+ c #B6B4C1",
"X+ c #F5F5F6",
"Y+ c #605A76",
"Z+ c #DAD8DF",
"`+ c #F5F4F6",
" @ c #615B76",
".@ c #524D6A",
"+@ c #E4E3E8",
"@@ c #D5D5D5",
"#@ c #1B1B1B",
"$@ c #303030",
"%@ c #AAABAB",
"&@ c #585464",
"*@ c #B0AEBB",
"=@ c #A29FAF",
"-@ c #E9E8E9",
";@ c #787779",
">@ c #0F0E15",
",@ c #2D2D2E",
"'@ c #595959",
")@ c #FAFAFB",
"!@ c #807B92",
"~@ c #B0ADBB",
"{@ c #E8E7EB",
"]@ c #3A3258",
"^@ c #E6E5EA",
"/@ c #DFDEE3",
"(@ c #443E5E",
"_@ c #BAB8C4",
":@ c #C1BFCA",
"<@ c #E0E0E5",
"[@ c #D0CED6",
"}@ c #362F52",
"|@ c #CECCD5",
"1@ c #413A5B",
"2@ c #6A657F",
"3@ c #9793A6",
" ",
" ",
" ",
" . + @ # $ % ",
" & * = * - ; > , ' ; ; ; ) ! ",
" ~ ; ; { ] ; ^ / ( _ ; : < [ ",
" } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ",
" c : d e f g h i j k l 6 m ; n o 6 p q r s ",
" t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ",
" I J ; ; K L 6 6 M N O P E 6 6 6 Q Q M R S T U V W ",
" X Y ; ; ; ; Z ` .6 ..6 6 6 6 6 +.@.#.$.%.&.*.=.-.;. ",
" >.; ; ; ; ; ; = ,.'.).!.~.{.].6 ^.6 6 6 E /.(.; ; _. ",
" :.; ; <.R h [.}.|.6 6 6 6 6 6 6 6 1.2.3.4.E 5.6.4 7. ",
" 8.9.; 0...6 6 6 6 6 6 6 6 6 6 a.b.2.c.3.d.6 6 6 e.f. ",
" V @ g.h.i.6 6 6 6 6 6 6 6 a.j.c.k.l.m.6 6 6 6 6 ",
" n.o.p.6 q.6 6 6 6 r.s.3.c.t.r.6 6 6 6 6 6 6 6 u. ",
" v.; ; w.x.x.y.z.x.6 A.2.2.k.B.6 6 6 6 6 6 6 6 6 C. ",
" D.; ; E.F.; ; ; G.6 H.I.J.K.2.k.r.6 6 6 6 6 6 6 L. ",
" M.; ; ; ; N.; ; O.6 6 6 6 6 P.Q.c.l.6 6 6 6 6 6 6 R., ",
" S.; ; N.; : T.U.V.6 6 6 6 6 6 6 W.2.t.X.6 6 6 6 Y.N.Z.`. ",
" +; ; ; .+++@+6 6 6 6 6 6 6 6 6 6 #+j.$+6 6 6 Q %+; ; &+*+ ",
" =+J ; : -+6 6 6 6 ;+..6 6 6 6 6 6 6 6 6 6 6 6 6 >+,+; ; '+)+ ",
" !+; ; ~+6 E 6 {+]+^+/+6 6 6 6 6 6 6 6 (+6 6 6 6 _+:+; ; > )+ ",
" <+; [+}+|+6 6 ^+N.; 1+2+6 6 6 6 6 6 6 6 3+4+6 6 6 5+6+; ; 7+8+ ",
" )+9+! 0+a+b+x ; ; c+d+e+f+l g+6 6 6 h+i+j+k+6 6 6 l+m+n+; ; o+@ ",
" p+q+r+s+t+u+; v+w+x+; ,+g+6 6 E y+; ; z+6 6 E 6 o A+; ; = B+ ",
" C+> ; ; ; ; ; ; D+E+; ; F+y.6 6 G+D ; ; H+I+6 6 6 J+K+; ; L+ ",
" > ; ; ; ; M+N+O+; ; P+Q+6 6 R+S+; ; T+U+6 6 V+W+; X+3 ",
" Y+Z+= ; `+ @.@+@; ; @@#@6 6 G+$@; ; ; %@y+&@ ",
" *@4 =@ X ; ; ; -@;@$@>@,@'@; ; ; N.)@!@ ",
" ~@; ; ; ; ; {@]@^@; ; ; ; = /@(@ ",
" _@:@<@4 ; ; [@}@|@; ; ; s O+T ",
" 1@ 2@3@O+ ",
" ",
" ",
" "};

+ 102
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/Bezier.C View File

@@ -0,0 +1,102 @@
/* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "Bezier.h"

void Bezier(Vec2 &Out, Vec2 a, Vec2 b, Vec2 c, Vec2 d, float t)
{
float tc=t*t*t;
float ts=t*t;

Out.x=(-a.x+3*b.x-3*c.x+d.x)*tc + (3*a.x-6*b.x+3*c.x)*ts + (-3*a.x+3*b.x)*t + a.x;
Out.y=(-a.y+3*b.y-3*c.y+d.y)*tc + (3*a.y-6*b.y+3*c.y)*ts + (-3*a.y+3*b.y)*t + a.y;
}

void CalculateBezierCurve(vector<Vec2> *List, float x1,float y1,float x2,float y2,float x3,float y3,float x4,float y4,int Sections)
{
Vec2 g1(x1,y1); Vec2 g2(x2,y2); Vec2 g3(x3,y3); Vec2 g4(x4,y4);

float t=0;
Vec2 p(0,0),lp(0,0);
for (int n=0; n<=Sections; n++)
{
Bezier(p,g1,g2,g3,g4,t);
List->push_back(Vec2(p.x,p.y));
lp.x=p.x; lp.y=p.y;
t+=0.1;
}
}

void AddToSpline(const Vec2 &CV)
{
Spline.push_back(CV);
}

void CalculateBezierSpline(vector<Vec2> *List,int Sections)
{

if (Spline.size()==0) return;
Vec2 SplineSection[4];
SplineSection[0].x=Spline[0].x;
SplineSection[0].y=Spline[0].y;
SplineSection[1].x=Spline[0].x;
SplineSection[1].y=Spline[0].y;
SplineSection[2].x=Spline[0].x;
SplineSection[2].y=Spline[0].y;
SplineSection[3].x=Spline[0].x;
SplineSection[3].y=Spline[0].y;
int SCount=0;
for(vector<Vec2>::iterator i=Spline.begin();
i!=Spline.end(); ++i)
{
SplineSection[3].x=i->x;
SplineSection[3].y=i->y;
if (SCount>3)
{
vector<Vec2> BezierLineList;
CalculateBezierCurve(&BezierLineList,
SplineSection[0].x,SplineSection[0].y,
SplineSection[1].x,SplineSection[1].y,
SplineSection[2].x,SplineSection[2].y,
SplineSection[3].x,SplineSection[3].y,
Sections);
for (vector<Vec2>::iterator bi=BezierLineList.begin();
bi!=BezierLineList.end(); bi++)
{
List->push_back(*bi);
}
SCount=1;
}
for (int m=0; m<3; m++)
{
SplineSection[m].x=SplineSection[m+1].x;
SplineSection[m].y=SplineSection[m+1].y;
}
SCount++;
}
Spline.clear();
}

+ 43
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/Bezier.h View File

@@ -0,0 +1,43 @@
/* Copyleft (C) 2002 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <vector>

#ifndef BEZIER_CURVE_STUFF
#define BEZIER_CURVE_STUFF

struct Vec2
{
Vec2(float a=0, float b=0) { x=a; y=b;}
float x; float y;
};

using std::vector;

static vector<Vec2> Spline;

void Bezier(Vec2 &Out, Vec2 a, Vec2 b, Vec2 c, Vec2 d, float t);

void CalculateBezierCurve(vector<Vec2> *List,
float x1,float y1,float x2,float y2,
float x3,float y3,float x4,float y4,
int Sections=16);
void AddToSpline(const Vec2 &CV);
void CalculateBezierSpline(vector<Vec2> *List,int Sections=16);
#endif

+ 233
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePlugin.C View File

@@ -0,0 +1,233 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "ComplexEnvelopePlugin.h"
#include "ComplexEnvelopePluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

extern "C" {
SpiralPlugin* CreateInstance()
{
return new ComplexEnvelopePlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 33;
}
}

///////////////////////////////////////////////////////

ComplexEnvelopePlugin::ComplexEnvelopePlugin() :
m_Triggered(0),
m_Position(-1),
m_SampleTime(2.0f)
{
m_PluginInfo.Name="ComplexEnv";
m_PluginInfo.Width=320;
m_PluginInfo.Height=200;
m_PluginInfo.NumInputs=2;
m_PluginInfo.NumOutputs=2;
m_PluginInfo.PortTips.push_back("Trigger CV");
m_PluginInfo.PortTips.push_back("Input");
m_PluginInfo.PortTips.push_back("CV");
m_PluginInfo.PortTips.push_back("Output");
}

ComplexEnvelopePlugin::~ComplexEnvelopePlugin()
{
}

PluginInfo &ComplexEnvelopePlugin::Initialise(const HostInfo *Host)
{
PluginInfo& Info = SpiralPlugin::Initialise(Host);
CVListToEnvelope(m_CVVec);
return Info;
}

SpiralGUIType *ComplexEnvelopePlugin::CreateGUI()
{
m_GUI = new ComplexEnvelopePluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void ComplexEnvelopePlugin::CVListToEnvelope(const vector<Vec2> &CVVec)
{
m_EnvSample.Zero();

m_CVVec=CVVec;

// check length
if (m_EnvSample.GetLength()/m_HostInfo->SAMPLERATE!=m_SampleTime)
{
m_EnvSample.Clear();
m_EnvSample.Allocate((int)m_SampleTime*m_HostInfo->SAMPLERATE);
}
vector<Vec2> Lines;
if (m_Bezier)
{
// calculate the bezier spline that forms the line segments
for (vector<Vec2>::const_iterator i=CVVec.begin();
i!=CVVec.end(); i++)
{
AddToSpline(*i);
}
CalculateBezierSpline(&Lines,10);
}
else
{
// use the CV's as line endpoints for straight line interpolation
Lines=CVVec;
}
vector<Vec2>::const_iterator i=Lines.begin();
if (i==Lines.end()) return; // no lines
vector<Vec2>::const_iterator ni=i+1;
if (ni==Lines.end()) return; // no lines
for (int n=0; n<m_EnvSample.GetLength(); n++)
{
float gt=n/(float)m_EnvSample.GetLength();
float t=(gt-i->x)/(ni->x-i->x);
if (t<0) t=0;
// see if we need to find the next line
if (gt>=ni->x)
{
i++;
ni++;
// env has ended before the sample length
if (ni==Lines.end())
{
// todo: fill the rest with last value
return;
}
t=Linear(i->x,ni->x,gt,0.0f,1.0f);
if (t<0) t=0;
}
float aa=Linear(0.0f,1.0f,t,ni->y,i->y);
m_EnvSample.Set(n,aa);
}
}

void ComplexEnvelopePlugin::Execute()
{
float temp=0;
bool Freeze=false;
if (m_EnvSample.GetLength()==0) return;
if (GetInput(0,0)>0)
{
if(!m_Triggered)
{
m_Triggered=1.0f;
m_Position=0;
}
}
else
{
if(m_Triggered)
{
m_Triggered=0;
}
}
if (m_Position==-1)
{
GetOutputBuf(0)->Zero();
return;
}
if (!InputExists(1))
{
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
// see if we've fallen off the end
if (m_Position>m_EnvSample.GetLength())
{
m_Position=-1;
break;
}
SetOutput(0,n,m_EnvSample[m_Position]);
m_Position++;
}
}
else
{
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
// see if we've fallen off the end
if (m_Position>m_EnvSample.GetLength())
{
m_Position=-1;
break;
}
SetOutput(0,n,m_EnvSample[m_Position]);
SetOutput(1,n,GetInput(1,n)*m_EnvSample[m_Position]);
m_Position++;
}
}
}

void ComplexEnvelopePlugin::StreamOut(ostream &s)
{
s<<m_Version<<" ";
s<<m_Position<<" "<<m_SampleTime<<" "<<m_Bezier<<" ";
s<<m_CVVec.size()<<endl;
for (vector<Vec2>::iterator i=m_CVVec.begin();
i!=m_CVVec.end(); i++)
{
s<<i->x<<" "<<i->y<<endl;
}
}

void ComplexEnvelopePlugin::StreamIn(istream &s)
{
int version;
s>>version;
s>>m_Position>>m_SampleTime>>m_Bezier;
m_CVVec.clear();
int size;
s>>size;
for(int n=0; n<size; n++)
{
Vec2 t;
s>>t.x>>t.y;
m_CVVec.push_back(t);
}
((ComplexEnvelopePluginGUI*)m_GUI)->SetCVList(m_CVVec);
CVListToEnvelope(m_CVVec);
}

+ 63
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePlugin.h View File

@@ -0,0 +1,63 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include "Bezier.h"
#include <FL/Fl_Pixmap.H>

#ifndef ComplexEnvelopePLUGIN
#define ComplexEnvelopePLUGIN

static const int NUM_CHANNELS = 4;

class ComplexEnvelopePlugin : public SpiralPlugin
{
public:
ComplexEnvelopePlugin();
virtual ~ComplexEnvelopePlugin();
virtual PluginInfo &Initialise(const HostInfo *Host);
virtual SpiralGUIType *CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }
void CVListToEnvelope(const vector<Vec2> &Lines);
void SetLength(float s) { m_SampleTime=s; }
void SetBezier(bool s) { m_Bezier=s; }
private:
float m_Triggered; // should scale envelope
int m_Position;
bool m_Bezier;
Sample m_EnvSample;
float m_SampleTime;

vector<Vec2> m_CVVec;
friend istream &operator>>(istream &s, ComplexEnvelopePlugin &o);
friend ostream &operator<<(ostream &s, ComplexEnvelopePlugin &o);
};
istream &operator>>(istream &s, ComplexEnvelopePlugin &o);
ostream &operator<<(ostream &s, ComplexEnvelopePlugin &o);

#endif

+ 19
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePlugin.pro View File

@@ -0,0 +1,19 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
Bezier.h \
ComplexEnvelopePlugin.h \
ComplexEnvelopePluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
Bezier.C \
ComplexEnvelopePlugin.C \
ComplexEnvelopePluginGUI.C

TARGET = ComplexEnvelopePlugin.so

+ 369
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.C View File

@@ -0,0 +1,369 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <stdio.h>
#include "ComplexEnvelopePluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;
static const float TIMED_SLIDER_MAX = 3.0f;

/////////////////////////////////////////////////////////////////////////

Fl_Envelope::Fl_Handle::Fl_Handle(int x,int y, int w, int h, char *Name) :
Fl_Widget(x,y,w,h,Name),
m_DelMe(false),
m_Changed(false),
m_Coincident(false)
{
}

Fl_Envelope::Fl_Handle::~Fl_Handle()
{
}

int Fl_Envelope::Fl_Handle::handle(int event)
{
int Mousebutton=Fl::event_button();
if (event==FL_DRAG && Mousebutton==1)
{
x(Fl::event_x()-(w()/2));
y(Fl::event_y()-(h()/2));
// restrict the movement to the parent's area
if (x()<parent()->x()) x(parent()->x());
if (x()>parent()->x()+parent()->w()-w()) x(parent()->x()+parent()->w()-w());
if (y()<parent()->y()) y(parent()->y());
if (y()>parent()->y()+parent()->h()-h()) y(parent()->y()+parent()->h()-h());
m_Changed=true;
parent()->redraw();
redraw();
}
if (event==FL_PUSH && Mousebutton==3)
{
m_DelMe=true;
}
return 1;
}

void Fl_Envelope::Fl_Handle::draw()
{
if (m_Coincident)
{
fl_color(FL_BLACK);
fl_rect(x(),y(),w()+1,h()+1);
fl_line(x(),y(),x()+w(),y()+h());
fl_line(x(),y()+h(),x()+w(),y());
}
else
{
fl_color(FL_RED);
fl_arc( x(),y(),w()+1,h()+1,0,360);
}
}



Fl_Envelope::Fl_Envelope(int x,int y, int w, int h, char *Name) :
Fl_Group(x,y,w,h,Name),
m_Length(1.0),
m_Bezier(true)
{
m_Origin_x=x+10;
m_Origin_y=y+h-10;

// default setting
Fl_Handle * newhandle = new Fl_Handle(28,20,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(14,122,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(48,63,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(76,91,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(131,86,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(194,81,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(294,131,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
newhandle = new Fl_Handle(216,124 ,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
show();
}

Fl_Envelope::~Fl_Envelope()
{
end();
}

int Fl_Envelope::handle(int event)
{
int ret=Fl_Group::handle(event);

// search for deleted handles
for(list<Fl_Handle*>::iterator i = m_HandleList.begin();
i!=m_HandleList.end(); ++i)
{
// if it's been modified, update the env via the callback
if ((*i)->Changed()) do_callback();
if ((*i)->Deleted())
{
remove(*i);
m_HandleList.erase(i);
break; // one at a time
}
}

if (!ret)
{
int Mousebutton=Fl::event_button();
if (event==FL_PUSH && Mousebutton==2)
{
Fl_Handle * newhandle = new
Fl_Handle(Fl::event_x()-5,Fl::event_y()-5,10,10,"");
m_HandleList.push_back(newhandle);
add(newhandle);
}
redraw();
}
return ret;
}

void Fl_Envelope::draw()
{
fl_push_clip(x(),y(),w()+1,h()+1);
fl_color(FL_GRAY);
fl_rectf(x(),y(),w()+1,h()+1);
fl_color(FL_BLACK);
fl_rect(x(),y(),w()+1,h()+1);
fl_color(FL_WHITE);
int last_x=m_Origin_x, last_y=m_Origin_y, closest=INT_MAX, dist;
list<Fl_Handle*>::iterator ClosestHandle=m_HandleList.end();

// draw second markers
fl_color(150,150,150);

for (int n=0; n<5; n++)
{
int p=(int)(m_Origin_x+(w()/m_Length*n));
fl_line(p,y(),p,y()+h());
}
m_HandlePos.clear();

m_HandlePos.push_back(Vec2(m_Origin_x,m_Origin_y));
if (m_Bezier) AddToSpline(Vec2(m_Origin_x,m_Origin_y));
for (unsigned int n=0; n<m_HandleList.size(); n++)
{
// slow - search through drawing line connecting handles from left to right
for(list<Fl_Handle*>::iterator i = m_HandleList.begin();
i!=m_HandleList.end(); ++i)
{
dist=(*i)->x()-last_x;
if (dist>-5 && dist<closest)
{
closest=dist;
ClosestHandle=i;
}
}
if (ClosestHandle!=m_HandleList.end())
{
closest=INT_MAX;
fl_color(FL_WHITE);
fl_line(last_x,last_y,(*ClosestHandle)->x()+5,(*ClosestHandle)->y()+5);
(*ClosestHandle)->SetIsCoincident(false);
last_x=(*ClosestHandle)->x()+5;
last_y=(*ClosestHandle)->y()+5;
m_HandlePos.push_back(Vec2((*ClosestHandle)->x()+5,(*ClosestHandle)->y()+5));
if (m_Bezier)
{
if (!(n%3)) (*ClosestHandle)->SetIsCoincident(true);
AddToSpline(Vec2((*ClosestHandle)->x()+5,(*ClosestHandle)->y()+5));
}
}
}
if (m_Bezier)
{
vector<Vec2> BezierLineList;
CalculateBezierSpline(&BezierLineList,10);
vector<Vec2>::iterator bi=BezierLineList.begin();
bi++;
fl_color(FL_BLUE);
for (;bi!=BezierLineList.end(); bi++)
{
fl_line((int)(bi-1)->x,(int)(bi-1)->y,(int)bi->x,(int)bi->y);
}
}
fl_color(FL_BLACK);
fl_line(m_Origin_x,m_Origin_y,m_Origin_x,y()+10);
fl_line(m_Origin_x,m_Origin_y,x()+w()-10,m_Origin_y);
Fl_Group::draw();
fl_pop_clip();
}

void Fl_Envelope::Clear()
{
for(list<Fl_Handle*>::iterator i = m_HandleList.begin();
i!=m_HandleList.end(); ++i)
{
remove(*i);
}
m_HandleList.clear();
}

vector<Vec2> Fl_Envelope::GetCVList()
{
vector<Vec2> m_CV;
for(vector<Vec2>::iterator i = m_HandlePos.begin();
i!=m_HandlePos.end(); ++i)
{
// convert to 0->1
Vec2 vec((i->x-m_Origin_x)/(float)(w()-m_Origin_x),
(m_Origin_y-i->y)/(float)(m_Origin_y-y()));
m_CV.push_back(vec);
}
return m_CV;
}

void Fl_Envelope::SetCVList(const vector<Vec2> &CV)
{
Clear();
for(vector<Vec2>::const_iterator i = CV.begin();
i!=CV.end(); ++i)
{
int minx=m_Origin_x, width=w()-m_Origin_x;
int miny=m_Origin_y, height=m_Origin_y-y();
// convert from 0->1 screen coords
Vec2 vec(minx+(i->x*width),
miny-(i->y*height));
Fl_Handle *nh = new Fl_Handle((int)vec.x,(int)vec.y,10,10,"");
add(nh);
m_HandleList.push_back(nh);
}
redraw();
}

/////////////////////////////////////////////////////////////////////////

ComplexEnvelopePluginGUI::ComplexEnvelopePluginGUI(int w, int h,ComplexEnvelopePlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o)
{
m_Plugin=o;
m_Type = new Fl_Button(15,h-35,100,20,"Bezier Curve");
m_Type->type(1);
m_Type->value(1);
m_Type->labelsize(10);
m_Type->callback((Fl_Callback*)cb_Type);
m_Length = new Fl_Knob(w-60,h-55,40,40,"Length");
m_Length->color(GUI_COLOUR);
m_Length->labelsize(10);
m_Length->maximum(5);
m_Length->step(0.001);
m_Length->value(1);
m_Length->callback((Fl_Callback*)cb_Length);
m_TLength = new Fl_Output(w-130,h-45,60,20,"");
m_TLength->value("1.0");
m_Envelope = new Fl_Envelope(5,20,w-10,h-75,"");
m_Envelope->callback((Fl_Callback*)cb_UpdateEnv);
end();
}

void ComplexEnvelopePluginGUI::UpdateValues()
{
}

inline void ComplexEnvelopePluginGUI::cb_UpdateEnv_i(Fl_Envelope *o, void* v)
{
m_Plugin->CVListToEnvelope(o->GetCVList());
}
void ComplexEnvelopePluginGUI::cb_UpdateEnv(Fl_Envelope* o, void* v)
{((ComplexEnvelopePluginGUI*)(o->parent()))->cb_UpdateEnv_i(o,v);}

inline void ComplexEnvelopePluginGUI::cb_Type_i(Fl_Button *o, void *v)
{
m_Envelope->SetBezier(o->value());
m_Plugin->SetBezier(o->value());
m_Envelope->redraw();
}
void ComplexEnvelopePluginGUI::cb_Type(Fl_Button *o, void *v)
{((ComplexEnvelopePluginGUI*)(o->parent()))->cb_Type_i(o,v);}

inline void ComplexEnvelopePluginGUI::cb_Length_i(Fl_Knob *o, void *v)
{
m_Plugin->SetLength(o->value());
m_Envelope->SetLength(o->value());
static char text[16];
sprintf(text,"%f",o->value());
m_TLength->value(text);
m_Envelope->redraw();
}
void ComplexEnvelopePluginGUI::cb_Length(Fl_Knob *o, void *v)
{((ComplexEnvelopePluginGUI*)(o->parent()))->cb_Length_i(o,v);}

+ 109
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.h View File

@@ -0,0 +1,109 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Output.H>
#include <list>

#include "ComplexEnvelopePlugin.h"
#include "../SpiralPluginGUI.h"
#include "../Widgets/Fl_Knob.H"
#include "Bezier.h"

#ifndef EnvelopeGUI
#define EnvelopeGUI

class Fl_Envelope : public Fl_Group
{
public:
Fl_Envelope(int x,int y, int w, int h, char *Name);
~Fl_Envelope();
virtual int handle(int event);
virtual void draw();
void Clear();
void SetBezier(bool s) { m_Bezier=s; }
void SetLength(float s) { m_Length=s; }
vector<Vec2> GetCVList();
void SetCVList(const vector<Vec2> &CV);
private:
class Fl_Handle : public Fl_Widget
{
public:
Fl_Handle(int x,int y, int w, int h, char *Name);
~Fl_Handle();
virtual int handle(int event);
virtual void draw();
bool Deleted() { return m_DelMe; }
void DelMe() { m_DelMe=true; }
void SetIsCoincident(bool s) { m_Coincident=s; }
bool Changed() { bool t=m_Changed; m_Changed=false; return t; }
private:
bool m_DelMe;
bool m_Changed;
bool m_Coincident;
};

float m_Length;
float m_Time;
bool m_Bezier;
list<Fl_Handle*> m_HandleList;
vector<Vec2> m_HandlePos;
int m_Origin_x;
int m_Origin_y;
};


class ComplexEnvelopePluginGUI : public SpiralPluginGUI
{
public:
ComplexEnvelopePluginGUI(int w, int h, ComplexEnvelopePlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
void SetCVList(const vector<Vec2> &CV) { m_Envelope->SetCVList(CV); }
ComplexEnvelopePlugin *m_Plugin;
private:
Fl_Envelope *m_Envelope;
Fl_Button *m_Type;
Fl_Knob *m_Length;
Fl_Output *m_TLength;
//// Callbacks ////
inline void cb_Type_i(Fl_Button *o, void *v);
static void cb_Type(Fl_Button *o, void *v);
inline void cb_Length_i(Fl_Knob *o, void *v);
static void cb_Length(Fl_Knob *o, void *v);
inline void cb_UpdateEnv_i(Fl_Envelope *o, void*v);
static void cb_UpdateEnv(Fl_Envelope* o, void* v);
};

#endif

+ 172
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/Makefile.in View File

@@ -0,0 +1,172 @@
#############################################################################
# Makefile for building ComplexEnvelopePlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: ComplexEnvelopePlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@ @FLTK_CFLAGS@
CXXFLAGS= @CXXFLAGS@ @FLTK_CXXFLAGS@
INCPATH =
LINK = g++ -shared
LFLAGS =
LIBS = @FLTK_LIBS@ -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
Bezier.h \
ComplexEnvelopePlugin.h \
ComplexEnvelopePluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
Bezier.C \
ComplexEnvelopePlugin.C \
ComplexEnvelopePluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
Bezier.o \
ComplexEnvelopePlugin.o \
ComplexEnvelopePluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = ComplexEnvelopePlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake ComplexEnvelopePlugin.pro

dist:
$(TAR) ComplexEnvelopePlugin.tar ComplexEnvelopePlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) ComplexEnvelopePlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

Bezier.o: Bezier.C \
Bezier.h \

ComplexEnvelopePlugin.o: ComplexEnvelopePlugin.C \
ComplexEnvelopePlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
ComplexEnvelopePluginGUI.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
Bezier.h \
SpiralIcon.xpm

ComplexEnvelopePluginGUI.o: ComplexEnvelopePluginGUI.C \
ComplexEnvelopePluginGUI.h \
ComplexEnvelopePlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
Bezier.h \
../Widgets/Fl_DragBar.H


+ 327
- 0
SpiralSound/Plugins/ComplexEnvelopePlugin/SpiralIcon.xpm View File

@@ -0,0 +1,327 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 288 2",
" c None",
". c #8B889B",
"+ c #9C99AA",
"@ c #ADAAB9",
"# c #837F94",
"$ c #7D7990",
"% c #9995A7",
"& c #67627C",
"* c #CDCBD4",
"= c #FCFCFC",
"- c #D1D0D8",
"; c #FFFFFF",
"> c #F1F1F3",
", c #848095",
"' c #2A2248",
") c #CFCED6",
"! c #68637D",
"~ c #ABA8B6",
"{ c #D5D3DB",
"] c #9490A2",
"^ c #C4C4C4",
"/ c #1D1C1D",
"( c #313134",
"_ c #EEEFEE",
": c #FBFBFB",
"< c #EFEFEF",
"[ c #7B768D",
"} c #464060",
"| c #DEDEE1",
"1 c #CBCACC",
"2 c #EEEEF1",
"3 c #79758C",
"4 c #FBFBFC",
"5 c #A2A2A2",
"6 c #000000",
"7 c #F5F6F5",
"8 c #747474",
"9 c #2A2A2B",
"0 c #403958",
"a c #7D788F",
"b c #C0BEC8",
"c c #BCBAC6",
"d c #BCBAC5",
"e c #625C79",
"f c #2B2932",
"g c #191919",
"h c #CCCCCC",
"i c #807B91",
"j c #3B3556",
"k c #F2F2F4",
"l c #929292",
"m c #0E0E0E",
"n c #BFBFBF",
"o c #111111",
"p c #100E15",
"q c #868689",
"r c #FEFDFE",
"s c #D9D7DE",
"t c #9C98AA",
"u c #FDFCFD",
"v c #DDDDDD",
"w c #575755",
"x c #5E5E5E",
"y c #C4C2CD",
"z c #423C5C",
"A c #F0F0F2",
"B c #939393",
"C c #555555",
"D c #4A4A4A",
"E c #010101",
"F c #282828",
"G c #C2C2C2",
"H c #DBDAE0",
"I c #615C78",
"J c #F6F6F7",
"K c #DADADA",
"L c #545454",
"M c #0F0F0F",
"N c #B8B8B8",
"O c #48445C",
"P c #2B2B2C",
"Q c #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0C0C0C",
"+. c #161800",
"@. c #1A1B00",
"#. c #060600",
"$. c #191A00",
"%. c #393643",
"&. c #47415F",
"*. c #9692A4",
"=. c #D9D8DE",
"-. c #F7F7F8",
";. c #918DA0",
">. c #B8B5C1",
",. c #D1D1D1",
"'. c #212121",
"). c #2D2F00",
"!. c #111200",
"~. c #0F0F00",
"{. c #090A00",
"]. c #040400",
"^. c #727175",
"/. c #FEFEFF",
"(. c #9D99AA",
"_. c #DBD9E0",
":. c #E9E9E9",
"<. c #CBCBCB",
"[. c #E0E0E0",
"}. c #6C6C6C",
"|. c #050500",
"1. c #515151",
"2. c #A6A6A7",
"3. c #827E93",
"4. c #615C77",
"5. c #EAEAED",
"6. c #DFDFE1",
"7. c #FEF100",
"8. c #010100",
"9. c #1E1D24",
"0. c #9894A7",
"a. c #B1AEBB",
"b. c #69686F",
"c. c #000001",
"d. c #615C76",
"e. c #5F5A75",
"f. c #413E4D",
"g. c #020203",
"h. c #1A1A1C",
"i. c #C3C1CB",
"j. c #9D9D9D",
"k. c #202020",
"l. c #383838",
"m. c #4C4C4C",
"n. c #2C2E00",
"o. c #111112",
"p. c #C9C7D0",
"q. c #F1F1F1",
"r. c #F8F8F8",
"s. c #232323",
"t. c #050600",
"u. c #050408",
"v. c #AEACB9",
"w. c #FEFEFE",
"x. c #1D1D1D",
"y. c #292B00",
"z. c #B7B5C1",
"A. c #9390A2",
"B. c #BBBBBB",
"C. c #414141",
"D. c #030303",
"E. c #28272A",
"F. c #F4F4F6",
"G. c #605B76",
"H. c #736E86",
"I. c #D8D8D8",
"J. c #727272",
"K. c #101010",
"L. c #020200",
"M. c #1E2000",
"N. c #848486",
"O. c #CCCBD3",
"P. c #747087",
"Q. c #6D6881",
"R. c #1C1C1C",
"S. c #242424",
"T. c #0A0A00",
"U. c #656566",
"V. c #F6F6F6",
"W. c #E8E6EA",
"X. c #706B84",
"Y. c #E3E1E6",
"Z. c #474746",
"`. c #151515",
" + c #C8C8C8",
".+ c #AEAEAE",
"++ c #080808",
"@+ c #373639",
"#+ c #FDFCFE",
"$+ c #ABA8B7",
"%+ c #F1F0F3",
"&+ c #6D6980",
"*+ c #0A090E",
"=+ c #95929E",
"-+ c #0A0810",
";+ c #0D0D0D",
">+ c #050505",
",+ c #5B5A5C",
"'+ c #F7F6F7",
")+ c #F4F3F5",
"!+ c #908C9F",
"~+ c #C8C6D0",
"{+ c #837E96",
"]+ c #86868A",
"^+ c #070608",
"/+ c #ECEBEE",
"(+ c #5B5571",
"_+ c #646078",
":+ c #AFAFB0",
"<+ c #454545",
"[+ c #363636",
"}+ c #7A7A7A",
"|+ c #C8C8C9",
"1+ c #212025",
"2+ c #060607",
"3+ c #969699",
"4+ c #FAFAFA",
"5+ c #F8F8F9",
"6+ c #A29EAF",
"7+ c #F7F6F8",
"8+ c #F0F0F1",
"9+ c #B8B7B9",
"0+ c #E4E4E4",
"a+ c #FDFDFD",
"b+ c #A5A2B2",
"c+ c #3B3456",
"d+ c #A8A5B4",
"e+ c #525252",
"f+ c #848387",
"g+ c #CDCDCD",
"h+ c #8D899C",
"i+ c #494262",
"j+ c #68627C",
"k+ c #40395A",
"l+ c #ECECEC",
"m+ c #020202",
"n+ c #B4B5B5",
"o+ c #0B0B0B",
"p+ c #313232",
"q+ c #E3E3E3",
"r+ c #B1AEBC",
"s+ c #BDBBC6",
"t+ c #3C3556",
"u+ c #898599",
"v+ c #EDEDED",
"w+ c #39393A",
"x+ c #040404",
"y+ c #333333",
"z+ c #F5F5F5",
"A+ c #2B2B2B",
"B+ c #2D2A3D",
"C+ c #B6B4C1",
"D+ c #F5F5F6",
"E+ c #605A76",
"F+ c #DAD8DF",
"G+ c #F5F4F6",
"H+ c #615B76",
"I+ c #524D6A",
"J+ c #E4E3E8",
"K+ c #D5D5D5",
"L+ c #1B1B1B",
"M+ c #303030",
"N+ c #AAABAB",
"O+ c #585464",
"P+ c #B0AEBB",
"Q+ c #A29FAF",
"R+ c #E9E8E9",
"S+ c #787779",
"T+ c #0F0E15",
"U+ c #2D2D2E",
"V+ c #595959",
"W+ c #FAFAFB",
"X+ c #807B92",
"Y+ c #B0ADBB",
"Z+ c #E8E7EB",
"`+ c #3A3258",
" @ c #E6E5EA",
".@ c #DFDEE3",
"+@ c #443E5E",
"@@ c #BAB8C4",
"#@ c #C1BFCA",
"$@ c #E0E0E5",
"%@ c #D0CED6",
"&@ c #362F52",
"*@ c #CECCD5",
"=@ c #413A5B",
"-@ c #6A657F",
";@ c #9793A6",
" ",
" ",
" ",
" . + @ # $ % ",
" & * = * - ; > , ' ; ; ; ) ! ",
" ~ ; ; { ] ; ^ / ( _ ; : < [ ",
" } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ",
" c : d e f g h i j k l 6 m ; n o 6 p q r s ",
" t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ",
" I J ; ; K L 6 6 M N O P E 6 6 6 Q Q M R S T U V W ",
" X Y ; ; ; ; Z ` .6 ..6 6 6 6 6 +.@.#.$.%.&.*.=.-.;. ",
" >.; ; ; ; ; ; = ,.'.).!.6 ~.{.6 ].6 6 6 E ^./.; ; (. ",
" _.; ; :.R h <.[.}.6 |.6 6 6 6 6 6 6 6 6 6 E 1.2.4 3. ",
" 4.5.; 6...6 6 6 6 6 6 6 6 6 7.7.8.6 6 6 6 6 6 6 9.0. ",
" V @ a.b.c.6 6 6 6 6 6 6 6 7.7.7.6 6 6 6 6 6 6 6 ",
" d.e.f.6 g.6 6 6 6 6 6 7.7.7.7.7.6 6 6 |.6 6 6 h. ",
" i.; ; j.k.k.l.m.k.6 7.7.7.7.7.7.7.6 6 6 n.7.6 6 o. ",
" p.; ; q.r.; ; ; s.6 7.7.7.7.7.7.7.7.6 6 7.7.t.6 u. ",
" v.; ; ; ; w.; ; x.6 7.7.7.7.7.7.7.7.7.7.7.7.y.6 6 z., ",
" A.; ; w.; : B.C.D.Q 7.7.7.7.7.7.7.7.7.7.7.7.6 6 E.w.F.G. ",
" H.; ; ; I.J.K.6 6 6 6 6 6 6 6 6 6 L.6 M.6 6 6 6 N.; ; O.P. ",
" Q.J ; : R.6 6 6 6 S...6 6 6 6 6 6 T.6 6 8.6 6 6 U.V.; ; W.X. ",
" Y.; ; Z.6 E 6 `. +.+++6 6 6 6 6 6 6 6 8.6 6 6 6 @+#+; ; > X. ",
" $+; %+&+*+6 6 .+w.; =+-+6 6 6 6 6 6 6 6 ;+>+6 6 6 ,+'+; ; )+!+ ",
" X.~+! {+]+^+x ; ; /+(+_+:+l <+6 6 6 [+}+|+1+6 6 6 2+3+4+; ; 5+@ ",
" 6+7+8+9+0+a+; b+c+d+; V.<+6 6 E e+; ; f+6 6 E 6 o g+; ; = h+ ",
" i+> ; ; ; ; ; ; j+k+; ; l+l.6 6 m+D ; ; n+o+6 6 6 p+q+; ; r+ ",
" > ; ; ; ; s+t+u+; ; v+w+6 6 x+y+; ; z+A+6 6 B+C+; D+3 ",
" E+F+= ; G+H+I+J+; ; K+L+6 6 m+M+; ; ; N+e+O+ ",
" P+4 Q+ X ; ; ; R+S+M+T+U+V+; ; ; w.W+X+ ",
" Y+; ; ; ; ; Z+`+ @; ; ; ; = .@+@ ",
" @@#@$@4 ; ; %@&@*@; ; ; s u+T ",
" =@ -@;@u+ ",
" ",
" ",
" "};

+ 236
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C View File

@@ -0,0 +1,236 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <stdio.h>
#include "ControllerPlugin.h"
#include "ControllerPluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

extern "C" {
SpiralPlugin* CreateInstance()
{
return new ControllerPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x0003;
}
}

///////////////////////////////////////////////////////

ControllerPlugin::ControllerPlugin() :
m_Num(4)
{
m_Version=3;
m_PluginInfo.Name="CV Control";
m_PluginInfo.Width=240;
m_PluginInfo.Height=224;
m_PluginInfo.NumInputs=0;
m_PluginInfo.NumOutputs=4;
m_PluginInfo.PortTips.push_back("CV 1");
m_PluginInfo.PortTips.push_back("CV 2");
m_PluginInfo.PortTips.push_back("CV 3");
m_PluginInfo.PortTips.push_back("CV 4");
for (int n=0; n<MAX_CHANNELS; n++)
{
m_ChannelVal[n]=0.0f;
}
}

ControllerPlugin::~ControllerPlugin()
{
}

PluginInfo &ControllerPlugin::Initialise(const HostInfo *Host)
{
return SpiralPlugin::Initialise(Host);
}

SpiralGUIType *ControllerPlugin::CreateGUI()
{
m_GUI = new ControllerPluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void ControllerPlugin::Execute()
{
for(int c=0; c<m_Num; c++)
{
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
SetOutput(c,n,m_ChannelVal[c]);
}
}
}

void ControllerPlugin::SetNum(int n)
{
// once to clear the connections with the current info
UpdatePluginInfoWithHost();
if (m_Num<n)
{
char t[256];
sprintf(t,"CV %d",n);
m_PluginInfo.PortTips.push_back(t);
AddOutput();
m_PluginInfo.NumOutputs++;
}
else
{
vector<string>::iterator i=m_PluginInfo.PortTips.end();
m_PluginInfo.PortTips.erase(i--);
RemoveOutput();
m_PluginInfo.NumOutputs--;
}
m_Num=n;
m_PluginInfo.NumOutputs=n;
// do the actual update
UpdatePluginInfoWithHost();
}

// use with caution
void ControllerPlugin::Clear()
{
m_PluginInfo.PortTips.clear();
RemoveAllOutputs();
m_PluginInfo.NumOutputs=0;
}

void ControllerPlugin::StreamOut(ostream &s)
{
s<<m_Version<<" ";
switch (m_Version)
{
case 1:
{
for (int n=0; n<4; n++)
{
s<<m_ChannelVal[n]<<" ";
}
} break;
case 2:
{
s<<m_Num<<" ";
for (int n=0; n<m_Num; n++)
{
s<<m_ChannelVal[n]<<" ";
}
//s<<*(ControllerPluginGUI*)m_GUI<<" ";
((ControllerPluginGUI*)m_GUI)->StreamOut(s);
} break;
case 3:
{
s<<m_Num<<" ";
for (int n=0; n<m_Num; n++)
{
s<<m_ChannelVal[n]<<" ";
}
((ControllerPluginGUI*)m_GUI)->StreamOut(s);
} break;
}
}

void ControllerPlugin::StreamIn(istream &s)
{
int version;
s>>version;
switch (version)
{
case 1:
{
for (int n=0; n<4; n++)
{
s>>m_ChannelVal[n];
}
} break;
case 2:
{
Clear();
s>>m_Num;
for (int n=0; n<m_Num; n++)
{
s>>m_ChannelVal[n];
}
s>>*(ControllerPluginGUI*)m_GUI;
// add the channels one by one
for (int n=0; n<m_Num; n++)
{
char t[256];
sprintf(t,"CV %d",n);
m_PluginInfo.PortTips.push_back(t);
AddOutput();
}
m_PluginInfo.NumOutputs=m_Num;
UpdatePluginInfoWithHost();
} break;
case 3:
{
Clear();
s>>m_Num;
for (int n=0; n<m_Num; n++)
{
s>>m_ChannelVal[n];
}
((ControllerPluginGUI*)m_GUI)->StreamIn(s);
// add the channels one by one
for (int n=0; n<m_Num; n++)
{
char t[256];
sprintf(t,"CV %d",n);
m_PluginInfo.PortTips.push_back(t);
AddOutput();
}
m_PluginInfo.NumOutputs=m_Num;
UpdatePluginInfoWithHost();
} break;
}
}

+ 53
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h View File

@@ -0,0 +1,53 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include <FL/Fl_Pixmap.H>

#ifndef ControllerPLUGIN
#define ControllerPLUGIN

static const int MAX_CHANNELS = 99;

class ControllerPlugin : public SpiralPlugin
{
public:
ControllerPlugin();
virtual ~ControllerPlugin();
virtual PluginInfo &Initialise(const HostInfo *Host);
virtual SpiralGUIType *CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }
void SetChannel(int n, float s) { m_ChannelVal[n]=s; }
void SetNum(int n);
private:
void Clear();
int m_Num;
float m_ChannelVal[MAX_CHANNELS];
};

#endif

+ 17
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.pro View File

@@ -0,0 +1,17 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
ControllerPlugin.h \
ControllerPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
ControllerPlugin.C \
ControllerPluginGUI.C

TARGET = ControllerPlugin.so

+ 244
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C View File

@@ -0,0 +1,244 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <stdio.h>
#include "ControllerPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;

////////////////////////////////////////////

ControllerPluginGUI::CVGUI::CVGUI(int n, ControllerPluginGUI *p)
{
m_SliderGroup = new Fl_Group(0,0,60,153,"");
m_SliderGroup->box(FL_UP_BOX);
m_SliderGroup->user_data((void *)p);
m_Title = new Fl_Input(5,2,50,15,"");
m_Title->value("Name");
m_Title->textsize(10);
m_SliderGroup->add(m_Title);
m_Max = new Fl_Int_Input(5,18,50,15,"");
char t[64];
sprintf(t,"%d",1);
m_Max->value(t);
m_Max->textsize(10);
m_SliderGroup->add(m_Max);
m_Chan = new Fl_Slider(20, 34, 20, 100, "");
m_Chan->type(4);
m_Chan->selection_color(GUI_COLOUR);
m_Chan->maximum(1);
m_Chan->step(0.01);
m_Chan->value(0.5);
m_Chan->callback((Fl_Callback*)ControllerPluginGUI::cb_Chan,
(void*)&Numbers[n]);
m_SliderGroup->add(m_Chan);
m_Min = new Fl_Int_Input(5,136,50,15,"");
char t2[64];
sprintf(t2,"%d",-1);
m_Min->value(t2);
m_Min->textsize(10);
m_SliderGroup->add(m_Min);
}

////////////////////////////////////////////

ControllerPluginGUI::ControllerPluginGUI(int w, int h,ControllerPlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o),
m_CVCount(0)
{
m_Plugin=o;
for (int n=0; n<MAX_CHANNELS; n++)
{
Numbers[n]=n;
}
m_MainPack = new Fl_Pack(0,20,w,h-44);
m_MainPack->type(FL_HORIZONTAL);
// start with four...
AddCV();
AddCV();
AddCV();
AddCV();
m_Delete = new Fl_Button(2,h-22,20,20,"-");
m_Delete->user_data(this);
m_Delete->callback((Fl_Callback*)cb_Delete);
add(m_Delete);
m_Add = new Fl_Button(24,h-22,20,20,"+");
m_Add->user_data(this);
m_Add->callback((Fl_Callback*)cb_Add);
add(m_Add);
}

void ControllerPluginGUI::AddCV()
{
CVGUI *NewCV = new CVGUI(m_CVCount,this);
m_GuiVec.push_back(NewCV);
m_MainPack->add(NewCV->m_SliderGroup);
m_CVCount++;
}

void ControllerPluginGUI::DeleteCV()
{
vector<CVGUI*>::iterator i=m_GuiVec.end();
i--;
m_MainPack->remove((*i)->m_SliderGroup);
delete *i;
m_GuiVec.erase(i);
m_CVCount--;
}

void ControllerPluginGUI::Clear()
{
for (vector<ControllerPluginGUI::CVGUI*>::iterator i=m_GuiVec.begin();
i!=m_GuiVec.end(); i++)
{
m_MainPack->remove((*i)->m_SliderGroup);
delete *i;
}
m_GuiVec.clear();
m_CVCount=0;
}

void ControllerPluginGUI::UpdateValues()
{
}
inline void ControllerPluginGUI::cb_Chan_i(Fl_Slider* o, void* v)
{
int num=*(int*)(v);
// swap em over, cos it's the easiqest way to reverse
// the fltk slider, which is upside down imho
long max=strtol(m_GuiVec[num]->m_Min->value(),NULL,10);
long min=strtol(m_GuiVec[num]->m_Max->value(),NULL,10);
float val=o->value()*(max-min)+min;
m_Plugin->SetChannel(num,val);
}
void ControllerPluginGUI::cb_Chan(Fl_Slider* o, void* v)
{ ((ControllerPluginGUI*)(o->parent()->user_data()))->cb_Chan_i(o,v);}

inline void ControllerPluginGUI::cb_Add_i(Fl_Button* o, void* v)
{
if (m_CVCount<MAX_CHANNELS)
{
AddCV();
resize(x(),y(),w()+60,h());
redraw();
m_Plugin->SetNum(m_GuiVec.size());
}
}
void ControllerPluginGUI::cb_Add(Fl_Button* o, void* v)
{ ((ControllerPluginGUI*)(o->parent()))->cb_Add_i(o,v);}

inline void ControllerPluginGUI::cb_Delete_i(Fl_Button* o, void* v)
{
if (m_GuiVec.size()>1)
{
DeleteCV();
resize(x(),y(),w()-60,h());
redraw();
m_Plugin->SetNum(m_GuiVec.size());
}
}
void ControllerPluginGUI::cb_Delete(Fl_Button* o, void* v)
{ ((ControllerPluginGUI*)(o->parent()))->cb_Delete_i(o,v);}

// call for version <3
istream &operator>>(istream &s, ControllerPluginGUI &o)
{
int c;
string Title,Min,Max;
float Val;
o.Clear();
s>>c;
for (int n=0; n<c; n++)
{
s>>Title>>Min>>Max>>Val;
o.AddCV();
o.m_GuiVec[n]->m_Title->value(Title.c_str());
o.m_GuiVec[n]->m_Min->value(Min.c_str());
o.m_GuiVec[n]->m_Max->value(Max.c_str());
o.m_GuiVec[n]->m_Chan->value(Val);
}
o.resize(o.x(),o.y(),c*60,o.h());
return s;
}

// call for version >=3
// another version of the stream to fix the old style string streaming problem
void ControllerPluginGUI::StreamIn(istream &s)
{
int c,version,size;
string Title,Min,Max;
float Val;
char Buf[4096];
Clear();
s>>version;
s>>c;
for (int n=0; n<c; n++)
{
AddCV();
s>>size;
s.ignore(1);
s.get(Buf,size+1);
m_GuiVec[n]->m_Title->value(Buf);
s>>Min>>Max>>Val;
m_GuiVec[n]->m_Min->value(Min.c_str());
m_GuiVec[n]->m_Max->value(Max.c_str());
m_GuiVec[n]->m_Chan->value(Val);
}
resize(x(),y(),c*60,h());
}

void ControllerPluginGUI::StreamOut(ostream &s)
{
// version
s<<1<<endl;
s<<m_GuiVec.size()<<endl;
for (vector<ControllerPluginGUI::CVGUI*>::iterator i=m_GuiVec.begin();
i!=m_GuiVec.end(); i++)
{
s<<strlen((*i)->m_Title->value())<<endl;
s<<(*i)->m_Title->value()<<" ";
s<<(*i)->m_Min->value()<<" ";
s<<(*i)->m_Max->value()<<" ";
s<<(*i)->m_Chan->value()<<endl;
}
}

+ 90
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h View File

@@ -0,0 +1,90 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Int_Input.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Slider.H>

#include "ControllerPlugin.h"
#include "../SpiralPluginGUI.h"

#ifndef MixerGUI
#define MixerGUI

static int Numbers[MAX_CHANNELS];

class ControllerPluginGUI : public SpiralPluginGUI
{
public:
ControllerPluginGUI(int w, int h, ControllerPlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
ControllerPlugin *m_Plugin;
void StreamIn(istream &s);
void StreamOut(ostream &s);
private:

void Clear();
class CVGUI
{
public:
CVGUI::CVGUI(int n, ControllerPluginGUI *p);
Fl_Group *m_SliderGroup;
Fl_Input *m_Title;
Fl_Int_Input *m_Min;
Fl_Int_Input *m_Max;
Fl_Slider *m_Chan;
};
friend class CVGUI;
Fl_Pack *m_MainPack;
Fl_Button *m_Add;
Fl_Button *m_Delete;
vector<CVGUI*> m_GuiVec;
void AddCV();
void DeleteCV();
int m_CVCount;
//// Callbacks ////
inline void cb_Chan_i(Fl_Slider* o, void* v);
static void cb_Chan(Fl_Slider* o, void* v);
inline void cb_Add_i(Fl_Button* o, void* v);
static void cb_Add(Fl_Button* o, void* v);
inline void cb_Delete_i(Fl_Button* o, void* v);
static void cb_Delete(Fl_Button* o, void* v);

friend istream &operator>>(istream &s, ControllerPluginGUI &o);
};

istream &operator>>(istream &s, ControllerPluginGUI &o);

#endif

+ 164
- 0
SpiralSound/Plugins/ControllerPlugin/Makefile.in View File

@@ -0,0 +1,164 @@
#############################################################################
# Makefile for building ControllerPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: ControllerPlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@
CXXFLAGS= @CXXFLAGS@
INCPATH = -I/usr/X11R6/include
LINK = g++ -shared
LFLAGS =
LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
ControllerPlugin.h \
ControllerPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
ControllerPlugin.C \
ControllerPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
ControllerPlugin.o \
ControllerPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = ControllerPlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake ControllerPlugin.pro

dist:
$(TAR) ControllerPlugin.tar ControllerPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) ControllerPlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

ControllerPlugin.o: ControllerPlugin.C \
ControllerPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
ControllerPluginGUI.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
SpiralIcon.xpm

ControllerPluginGUI.o: ControllerPluginGUI.C \
ControllerPluginGUI.h \
ControllerPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H


+ 352
- 0
SpiralSound/Plugins/ControllerPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,352 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 313 2",
" c None",
". c #8B889B",
"+ c #9C99AA",
"@ c #ADAAB9",
"# c #837F94",
"$ c #7D7990",
"% c #9995A7",
"& c #67627C",
"* c #CDCBD4",
"= c #FCFCFC",
"- c #D1D0D8",
"; c #FFFFFF",
"> c #F1F1F3",
", c #848095",
"' c #2A2248",
") c #CFCED6",
"! c #68637D",
"~ c #ABA8B6",
"{ c #D5D3DB",
"] c #9490A2",
"^ c #C4C4C4",
"/ c #1D1C1D",
"( c #313134",
"_ c #EEEFEE",
": c #FBFBFB",
"< c #EFEFEF",
"[ c #7B768D",
"} c #464060",
"| c #DEDEE1",
"1 c #CBCACC",
"2 c #EEEEF1",
"3 c #79758C",
"4 c #FBFBFC",
"5 c #A2A2A2",
"6 c #000000",
"7 c #F5F6F5",
"8 c #747474",
"9 c #2A2A2B",
"0 c #403958",
"a c #7D788F",
"b c #C0BEC8",
"c c #BCBAC6",
"d c #BCBAC5",
"e c #625C79",
"f c #2B2932",
"g c #191919",
"h c #CCCCCC",
"i c #807B91",
"j c #3B3556",
"k c #F2F2F4",
"l c #929292",
"m c #0E0E0E",
"n c #BFBFBF",
"o c #111111",
"p c #100E15",
"q c #868689",
"r c #FEFDFE",
"s c #D9D7DE",
"t c #9C98AA",
"u c #FDFCFD",
"v c #DDDDDD",
"w c #575755",
"x c #5E5E5E",
"y c #C4C2CD",
"z c #423C5C",
"A c #F0F0F2",
"B c #939393",
"C c #555555",
"D c #4A4A4A",
"E c #010101",
"F c #282828",
"G c #C2C2C2",
"H c #DBDAE0",
"I c #615C78",
"J c #F6F6F7",
"K c #DADADA",
"L c #545454",
"M c #0F0F0F",
"N c #B8B8B8",
"O c #48445C",
"P c #2B2B2C",
"Q c #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0A0A0A",
"+. c #151700",
"@. c #1A1B00",
"#. c #060600",
"$. c #191A00",
"%. c #393643",
"&. c #47415F",
"*. c #9692A4",
"=. c #D9D8DE",
"-. c #F7F7F8",
";. c #918DA0",
">. c #B8B5C1",
",. c #D1D1D1",
"'. c #212121",
"). c #282900",
"!. c #030300",
"~. c #070700",
"{. c #020200",
"]. c #727175",
"^. c #FEFEFF",
"/. c #9D99AA",
"(. c #DBD9E0",
"_. c #E9E9E9",
":. c #CBCBCB",
"<. c #E0E0E0",
"[. c #6C6C6C",
"}. c #515151",
"|. c #A6A6A7",
"1. c #827E93",
"2. c #615C77",
"3. c #EAEAED",
"4. c #DFDFE1",
"5. c #0C0C0C",
"6. c #645E00",
"7. c #F9EC00",
"8. c #FDF100",
"9. c #FDF000",
"0. c #807900",
"a. c #E0D400",
"b. c #191700",
"c. c #1E1D24",
"d. c #9894A7",
"e. c #B1AEBB",
"f. c #69686F",
"g. c #000001",
"h. c #EFE200",
"i. c #FCEF00",
"j. c #CBC000",
"k. c #8E8600",
"l. c #1E1C00",
"m. c #F3E600",
"n. c #615C76",
"o. c #5F5A75",
"p. c #413E4D",
"q. c #020203",
"r. c #010100",
"s. c #FEF100",
"t. c #8C8400",
"u. c #CCC100",
"v. c #D0C500",
"w. c #1A1A1C",
"x. c #C3C1CB",
"y. c #9D9D9D",
"z. c #202020",
"A. c #383838",
"B. c #4C4C4C",
"C. c #FFF200",
"D. c #060500",
"E. c #534E00",
"F. c #111112",
"G. c #C9C7D0",
"H. c #F1F1F1",
"I. c #F8F8F8",
"J. c #232323",
"K. c #736D00",
"L. c #F2E500",
"M. c #050408",
"N. c #AEACB9",
"O. c #FEFEFE",
"P. c #1D1D1D",
"Q. c #E4D800",
"R. c #C1B700",
"S. c #DDD100",
"T. c #9A9200",
"U. c #FAED00",
"V. c #A9A000",
"W. c #B7B5C1",
"X. c #9390A2",
"Y. c #BBBBBB",
"Z. c #414141",
"`. c #030303",
" + c #C6BB00",
".+ c #7E7700",
"++ c #28272A",
"@+ c #F4F4F6",
"#+ c #605B76",
"$+ c #736E86",
"%+ c #D8D8D8",
"&+ c #727272",
"*+ c #101010",
"=+ c #848486",
"-+ c #CCCBD3",
";+ c #747087",
">+ c #6D6881",
",+ c #1C1C1C",
"'+ c #242424",
")+ c #212205",
"!+ c #1B1D00",
"~+ c #000100",
"{+ c #656566",
"]+ c #F6F6F6",
"^+ c #E8E6EA",
"/+ c #706B84",
"(+ c #E3E1E6",
"_+ c #474746",
":+ c #151515",
"<+ c #C8C8C8",
"[+ c #AEAEAE",
"}+ c #070707",
"|+ c #373639",
"1+ c #FDFCFE",
"2+ c #ABA8B7",
"3+ c #F1F0F3",
"4+ c #6D6980",
"5+ c #0A090E",
"6+ c #95929E",
"7+ c #0A0810",
"8+ c #0D0D0D",
"9+ c #050505",
"0+ c #5B5A5C",
"a+ c #F7F6F7",
"b+ c #F4F3F5",
"c+ c #908C9F",
"d+ c #C8C6D0",
"e+ c #837E96",
"f+ c #86868A",
"g+ c #070608",
"h+ c #ECEBEE",
"i+ c #5B5571",
"j+ c #646078",
"k+ c #AFAFB0",
"l+ c #454545",
"m+ c #363636",
"n+ c #7A7A7A",
"o+ c #C8C8C9",
"p+ c #212025",
"q+ c #060607",
"r+ c #969699",
"s+ c #FAFAFA",
"t+ c #F8F8F9",
"u+ c #A29EAF",
"v+ c #F7F6F8",
"w+ c #F0F0F1",
"x+ c #B8B7B9",
"y+ c #E4E4E4",
"z+ c #FDFDFD",
"A+ c #A5A2B2",
"B+ c #3B3456",
"C+ c #A8A5B4",
"D+ c #525252",
"E+ c #848387",
"F+ c #CDCDCD",
"G+ c #8D899C",
"H+ c #494262",
"I+ c #68627C",
"J+ c #40395A",
"K+ c #ECECEC",
"L+ c #020202",
"M+ c #B4B5B5",
"N+ c #0B0B0B",
"O+ c #313232",
"P+ c #E3E3E3",
"Q+ c #B1AEBC",
"R+ c #BDBBC6",
"S+ c #3C3556",
"T+ c #898599",
"U+ c #EDEDED",
"V+ c #39393A",
"W+ c #040404",
"X+ c #333333",
"Y+ c #F5F5F5",
"Z+ c #2B2B2B",
"`+ c #2D2A3D",
" @ c #B6B4C1",
".@ c #F5F5F6",
"+@ c #605A76",
"@@ c #DAD8DF",
"#@ c #F5F4F6",
"$@ c #615B76",
"%@ c #524D6A",
"&@ c #E4E3E8",
"*@ c #D5D5D5",
"=@ c #1B1B1B",
"-@ c #303030",
";@ c #AAABAB",
">@ c #585464",
",@ c #B0AEBB",
"'@ c #A29FAF",
")@ c #E9E8E9",
"!@ c #787779",
"~@ c #0F0E15",
"{@ c #2D2D2E",
"]@ c #595959",
"^@ c #FAFAFB",
"/@ c #807B92",
"(@ c #B0ADBB",
"_@ c #E8E7EB",
":@ c #3A3258",
"<@ c #E6E5EA",
"[@ c #DFDEE3",
"}@ c #443E5E",
"|@ c #BAB8C4",
"1@ c #C1BFCA",
"2@ c #E0E0E5",
"3@ c #D0CED6",
"4@ c #362F52",
"5@ c #CECCD5",
"6@ c #413A5B",
"7@ c #6A657F",
"8@ c #9793A6",
" ",
" ",
" ",
" . + @ # $ % ",
" & * = * - ; > , ' ; ; ; ) ! ",
" ~ ; ; { ] ; ^ / ( _ ; : < [ ",
" } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ",
" c : d e f g h i j k l 6 m ; n o 6 p q r s ",
" t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ",
" I J ; ; K L 6 6 M N O P E 6 6 6 Q Q M R S T U V W ",
" X Y ; ; ; ; Z ` .6 ..6 6 6 6 6 +.@.#.$.%.&.*.=.-.;. ",
" >.; ; ; ; ; ; = ,.'.).!.6 6 6 ~.{.6 6 6 E ].^.; ; /. ",
" (.; ; _.R h :.<.[.6 !.6 6 6 6 6 6 6 6 6 6 E }.|.4 1. ",
" 2.3.; 4.5.6 6 6 6 6 6 6.7.8.9.0.6 a.6.6 6.a.b.6 c.d. ",
" V @ e.f.g.6 6 6 6 6 {.h.i.j.k.l.6 m.a.6 a.7.b.6 ",
" n.o.p.6 q.6 6 6 6 r.s.t.6 6 6 6 u.i.6 s.v.6 6 w. ",
" x.; ; y.z.z.A.B.z.6 6 C.D.6 6 6 6 l.C.E.C.l.6 6 F. ",
" G.; ; H.I.; ; ; J.6 6 s.K.6 6 6 6 6 s.L.L.6 6 6 M. ",
" N.; ; ; ; O.; ; P.6 6 Q.s.R.S.T.6 6 U.C.V.6 6 6 6 W., ",
" X.; ; O.; : Y.Z.`.6 6 6 +9.s..+6 6 u.C.D.6 6 6 ++O.@+#+ ",
" $+; ; ; %+&+*+6 6 6 6 6 6 6 6 6 6 6 6 {.6 6 6 6 =+; ; -+;+ ",
" >+J ; : ,+6 6 6 6 '+)+!+6 ~+6 6 6 6 6 6 6 6 6 6 {+]+; ; ^+/+ ",
" (+; ; _+6 E 6 :+<+[+}+6 6 6 6 6 6 6 6 r.6 6 6 6 |+1+; ; > /+ ",
" 2+; 3+4+5+6 6 [+O.; 6+7+6 6 6 6 6 6 6 6 8+9+6 6 6 0+a+; ; b+c+ ",
" /+d+! e+f+g+x ; ; h+i+j+k+l l+6 6 6 m+n+o+p+6 6 6 q+r+s+; ; t+@ ",
" u+v+w+x+y+z+; A+B+C+; ]+l+6 6 E D+; ; E+6 6 E 6 o F+; ; = G+ ",
" H+> ; ; ; ; ; ; I+J+; ; K+A.6 6 L+D ; ; M+N+6 6 6 O+P+; ; Q+ ",
" > ; ; ; ; R+S+T+; ; U+V+6 6 W+X+; ; Y+Z+6 6 `+ @; .@3 ",
" +@@@= ; #@$@%@&@; ; *@=@6 6 L+-@; ; ; ;@D+>@ ",
" ,@4 '@ X ; ; ; )@!@-@~@{@]@; ; ; O.^@/@ ",
" (@; ; ; ; ; _@:@<@; ; ; ; = [@}@ ",
" |@1@2@4 ; ; 3@4@5@; ; ; s T+T ",
" 6@ 7@8@T+ ",
" ",
" ",
" "};

+ 141
- 0
SpiralSound/Plugins/DelayPlugin/DelayPlugin.C View File

@@ -0,0 +1,141 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "DelayPlugin.h"
#include "DelayPluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

static const float MAX_DELAY=1.0f;

extern "C" {
SpiralPlugin* CreateInstance()
{
return new DelayPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x000f;
}
}

///////////////////////////////////////////////////////

DelayPlugin::DelayPlugin() :
m_Delay(0.75),
m_Mix(0.4),
m_ReadHeadPos(0),
m_WriteHeadPos(0)
{
m_PluginInfo.Name="Delay";
m_PluginInfo.Width=120;
m_PluginInfo.Height=110;
m_PluginInfo.NumInputs=3;
m_PluginInfo.NumOutputs=1;
m_PluginInfo.PortTips.push_back("Input");
m_PluginInfo.PortTips.push_back("Delay CV");
m_PluginInfo.PortTips.push_back("ReadHead CV");
m_PluginInfo.PortTips.push_back("Output");
}

DelayPlugin::~DelayPlugin()
{
}

PluginInfo &DelayPlugin::Initialise(const HostInfo *Host)
{
PluginInfo& Info = SpiralPlugin::Initialise(Host);
m_Buffer.Allocate((int)(m_HostInfo->SAMPLERATE*MAX_DELAY));
return Info;
}

SpiralGUIType *DelayPlugin::CreateGUI()
{
m_GUI = new DelayPluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void DelayPlugin::Execute()
{
int Delay;
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
Delay=(int)((m_Delay+GetInput(1,n)*0.5f)*(float)m_HostInfo->SAMPLERATE);
if (Delay>=MAX_DELAY*m_HostInfo->SAMPLERATE)
{
Delay=(int)(MAX_DELAY*m_HostInfo->SAMPLERATE)-1;
}
if (Delay<0) Delay=0;
if (m_ReadHeadPos<0 || m_ReadHeadPos>=MAX_DELAY*m_HostInfo->SAMPLERATE)
cerr<<"read agh! "<<m_ReadHeadPos<<endl;
if (m_WriteHeadPos<0 || m_WriteHeadPos>=MAX_DELAY*m_HostInfo->SAMPLERATE)
cerr<<"write agh! "<<m_WriteHeadPos<<endl;
// Read from the buffer
SetOutput(0,n,m_Buffer[m_ReadHeadPos]+m_Mix*GetInput(0,n));
// Write to the buffer
m_Buffer.Set((int)m_WriteHeadPos,GetInput(0,n));
m_WriteHeadPos++;
m_ReadHeadPos=m_WriteHeadPos+GetInput(2,n)*Delay;
if (m_ReadHeadPos<0) m_ReadHeadPos=Delay+m_ReadHeadPos;
if (m_WriteHeadPos<0) m_WriteHeadPos=Delay+m_WriteHeadPos;
if (Delay>0)
{
if (m_ReadHeadPos>=Delay) m_ReadHeadPos=m_ReadHeadPos-Delay;
if (m_WriteHeadPos>=Delay) m_WriteHeadPos=m_WriteHeadPos-Delay;
}
else
{
m_ReadHeadPos=0;
m_WriteHeadPos=0;
}
}
}
void DelayPlugin::Randomise()
{
}
void DelayPlugin::StreamOut(ostream &s)
{
s<<m_Version<<" "<<m_Delay<<" "<<m_Mix<<" ";
}

void DelayPlugin::StreamIn(istream &s)
{
int version;
s>>version;
s>>m_Delay>>m_Mix;
}

+ 63
- 0
SpiralSound/Plugins/DelayPlugin/DelayPlugin.h View File

@@ -0,0 +1,63 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include <FL/Fl_Pixmap.H>

#ifndef DelayPLUGIN
#define DelayPLUGIN

class DelayPlugin : public SpiralPlugin
{
public:
DelayPlugin();
virtual ~DelayPlugin();
virtual PluginInfo &Initialise(const HostInfo *Host);
virtual SpiralGUIType *CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }
void SetDelay(float s) { m_Delay=s; }
void SetMix(float s) { m_Mix=s; }
float GetDelay() { return m_Delay; }
float GetMix() { return m_Mix; }
void Randomise();
private:
float m_Delay;
float m_Mix;

float m_ReadHeadPos;
float m_WriteHeadPos;
Sample m_Buffer;

friend istream &operator>>(istream &s, DelayPlugin &o);
friend ostream &operator<<(ostream &s, DelayPlugin &o);
};
istream &operator>>(istream &s, DelayPlugin &o);
ostream &operator<<(ostream &s, DelayPlugin &o);

#endif

+ 17
- 0
SpiralSound/Plugins/DelayPlugin/DelayPlugin.pro View File

@@ -0,0 +1,17 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
DelayPlugin.h \
DelayPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
DelayPlugin.C \
DelayPluginGUI.C

TARGET = DelayPlugin.so

+ 72
- 0
SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C View File

@@ -0,0 +1,72 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "DelayPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;

////////////////////////////////////////////

DelayPluginGUI::DelayPluginGUI(int w, int h,DelayPlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o)
{
m_Plugin=o;
m_Delay = new Fl_Slider(15, 20, 20, 70, "Delay");
m_Delay->type(4);
m_Delay->selection_color(GUI_COLOUR);
m_Delay->labelsize(10);
m_Delay->maximum(1);
m_Delay->step(0.001);
m_Delay->value(0.5);
m_Delay->callback((Fl_Callback*)cb_Delay);
m_Mix = new Fl_Knob(58, 28, 45, 45, "Mix");
m_Mix->color(GUI_COLOUR);
m_Mix->type(Fl_Knob::DOTLIN);
m_Mix->labelsize(10);
m_Mix->maximum(1);
m_Mix->step(0.01);
m_Mix->value(0);
m_Mix->callback((Fl_Callback*)cb_Mix);
end();
}

void DelayPluginGUI::UpdateValues()
{
m_Delay->value(m_Plugin->GetDelay()-5.0f);
m_Mix->value(m_Plugin->GetMix());
}

inline void DelayPluginGUI::cb_Delay_i(Fl_Slider* o, void* v)
{
float value=1.0f-o->value();
m_Plugin->SetDelay(value);
}
void DelayPluginGUI::cb_Delay(Fl_Slider* o, void* v)
{ ((DelayPluginGUI*)(o->parent()))->cb_Delay_i(o,v); }

inline void DelayPluginGUI::cb_Mix_i(Fl_Knob* o, void* v)
{ m_Plugin->SetMix(o->value()); }
void DelayPluginGUI::cb_Mix(Fl_Knob* o, void* v)
{ ((DelayPluginGUI*)(o->parent()))->cb_Mix_i(o,v); }

+ 56
- 0
SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h View File

@@ -0,0 +1,56 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Slider.H>

#include "DelayPlugin.h"
#include "../SpiralPluginGUI.h"
#include "../Widgets/Fl_Knob.H"

#ifndef FilterGUI
#define FilterGUI


class DelayPluginGUI : public SpiralPluginGUI
{
public:
DelayPluginGUI(int w, int h, DelayPlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
DelayPlugin *m_Plugin;
private:
Fl_Slider *m_Delay;
Fl_Knob *m_Mix;
//// Callbacks ////
inline void cb_Delay_i(Fl_Slider* o, void* v);
static void cb_Delay(Fl_Slider*, void*);
inline void cb_Mix_i(Fl_Knob* o, void* v);
static void cb_Mix(Fl_Knob* o, void* v);

};

#endif

+ 166
- 0
SpiralSound/Plugins/DelayPlugin/Makefile.in View File

@@ -0,0 +1,166 @@
#############################################################################
# Makefile for building DelayPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: DelayPlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@
CXXFLAGS= @CXXFLAGS@
INCPATH = -I/usr/X11R6/include
LINK = g++ -shared
LFLAGS =
LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
DelayPlugin.h \
DelayPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
DelayPlugin.C \
DelayPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
DelayPlugin.o \
DelayPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = DelayPlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake DelayPlugin.pro

dist:
$(TAR) DelayPlugin.tar DelayPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) DelayPlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

DelayPlugin.o: DelayPlugin.C \
DelayPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
DelayPluginGUI.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../Widgets/Fl_Knob.H \
SpiralIcon.xpm

DelayPluginGUI.o: DelayPluginGUI.C \
DelayPluginGUI.h \
DelayPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../Widgets/Fl_Knob.H


+ 341
- 0
SpiralSound/Plugins/DelayPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,341 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 302 2",
" c None",
". c #8B889B",
"+ c #9C99AA",
"@ c #ADAAB9",
"# c #837F94",
"$ c #7D7990",
"% c #9995A7",
"& c #67627C",
"* c #CDCBD4",
"= c #FCFCFC",
"- c #D1D0D8",
"; c #FFFFFF",
"> c #F1F1F3",
", c #848095",
"' c #2A2248",
") c #CFCED6",
"! c #68637D",
"~ c #ABA8B6",
"{ c #D5D3DB",
"] c #9490A2",
"^ c #C4C4C4",
"/ c #1D1C1D",
"( c #313134",
"_ c #EEEFEE",
": c #FBFBFB",
"< c #EFEFEF",
"[ c #7B768D",
"} c #464060",
"| c #DEDEE1",
"1 c #CBCACC",
"2 c #EEEEF1",
"3 c #79758C",
"4 c #FBFBFC",
"5 c #A2A2A2",
"6 c #000000",
"7 c #F5F6F5",
"8 c #747474",
"9 c #2A2A2B",
"0 c #403958",
"a c #7D788F",
"b c #C0BEC8",
"c c #BCBAC6",
"d c #BCBAC5",
"e c #625C79",
"f c #2B2932",
"g c #191919",
"h c #CCCCCC",
"i c #807B91",
"j c #3B3556",
"k c #F2F2F4",
"l c #929292",
"m c #0E0E0E",
"n c #BFBFBF",
"o c #111111",
"p c #100E15",
"q c #868689",
"r c #FEFDFE",
"s c #D9D7DE",
"t c #9C98AA",
"u c #FDFCFD",
"v c #DDDDDD",
"w c #575755",
"x c #5E5E5E",
"y c #C4C2CD",
"z c #423C5C",
"A c #F0F0F2",
"B c #939393",
"C c #555555",
"D c #4A4A4A",
"E c #010101",
"F c #282828",
"G c #C2C2C2",
"H c #DBDAE0",
"I c #615C78",
"J c #F6F6F7",
"K c #DADADA",
"L c #545454",
"M c #0F0F0F",
"N c #B8B8B8",
"O c #48445C",
"P c #2B2B2C",
"Q c #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0C0C0C",
"+. c #161800",
"@. c #1A1B00",
"#. c #060600",
"$. c #191A00",
"%. c #393643",
"&. c #47415F",
"*. c #9692A4",
"=. c #D9D8DE",
"-. c #F7F7F8",
";. c #918DA0",
">. c #B8B5C1",
",. c #D1D1D1",
"'. c #212121",
"). c #2D2F00",
"!. c #111200",
"~. c #9C9500",
"{. c #080800",
"]. c #030400",
"^. c #020200",
"/. c #727175",
"(. c #FEFEFF",
"_. c #9D99AA",
":. c #DBD9E0",
"<. c #E9E9E9",
"[. c #CBCBCB",
"}. c #E0E0E0",
"|. c #6C6C6C",
"1. c #050500",
"2. c #FFF200",
"3. c #000100",
"4. c #0F1000",
"5. c #515151",
"6. c #A6A6A7",
"7. c #827E93",
"8. c #615C77",
"9. c #EAEAED",
"0. c #DFDFE1",
"a. c #1E1D24",
"b. c #9894A7",
"c. c #B1AEBB",
"d. c #69686F",
"e. c #000001",
"f. c #040400",
"g. c #010100",
"h. c #615C76",
"i. c #5F5A75",
"j. c #413E4D",
"k. c #020203",
"l. c #1E1C00",
"m. c #807900",
"n. c #1A1A1C",
"o. c #C3C1CB",
"p. c #9D9D9D",
"q. c #202020",
"r. c #383838",
"s. c #4C4C4C",
"t. c #8F8700",
"u. c #FDF000",
"v. c #111112",
"w. c #C9C7D0",
"x. c #F1F1F1",
"y. c #F8F8F8",
"z. c #121212",
"A. c #918900",
"B. c #050408",
"C. c #AEACB9",
"D. c #FEFEFE",
"E. c #B7B5C1",
"F. c #9390A2",
"G. c #BBBBBB",
"H. c #414141",
"I. c #020202",
"J. c #141500",
"K. c #534E00",
"L. c #E2D600",
"M. c #E9DD00",
"N. c #FEF100",
"O. c #E5D900",
"P. c #F1E500",
"Q. c #E8DC00",
"R. c #D1C600",
"S. c #191700",
"T. c #2F3100",
"U. c #28272A",
"V. c #F4F4F6",
"W. c #605B76",
"X. c #736E86",
"Y. c #D8D8D8",
"Z. c #727272",
"`. c #101010",
" + c #EDE100",
".+ c #131400",
"++ c #848486",
"@+ c #CCCBD3",
"#+ c #747087",
"$+ c #6D6881",
"%+ c #1C1C1C",
"&+ c #070707",
"*+ c #656566",
"=+ c #F6F6F6",
"-+ c #E8E6EA",
";+ c #706B84",
">+ c #E3E1E6",
",+ c #474746",
"'+ c #151515",
")+ c #C8C8C8",
"!+ c #AEAEAE",
"~+ c #080808",
"{+ c #373639",
"]+ c #FDFCFE",
"^+ c #ABA8B7",
"/+ c #F1F0F3",
"(+ c #6D6980",
"_+ c #0A090E",
":+ c #95929E",
"<+ c #0A0810",
"[+ c #0D0D0D",
"}+ c #050505",
"|+ c #5B5A5C",
"1+ c #F7F6F7",
"2+ c #F4F3F5",
"3+ c #908C9F",
"4+ c #C8C6D0",
"5+ c #837E96",
"6+ c #86868A",
"7+ c #070608",
"8+ c #ECEBEE",
"9+ c #5B5571",
"0+ c #646078",
"a+ c #AFAFB0",
"b+ c #454545",
"c+ c #363636",
"d+ c #7A7A7A",
"e+ c #C8C8C9",
"f+ c #212025",
"g+ c #060607",
"h+ c #969699",
"i+ c #FAFAFA",
"j+ c #F8F8F9",
"k+ c #A29EAF",
"l+ c #F7F6F8",
"m+ c #F0F0F1",
"n+ c #B8B7B9",
"o+ c #E4E4E4",
"p+ c #FDFDFD",
"q+ c #A5A2B2",
"r+ c #3B3456",
"s+ c #A8A5B4",
"t+ c #525252",
"u+ c #848387",
"v+ c #CDCDCD",
"w+ c #8D899C",
"x+ c #494262",
"y+ c #68627C",
"z+ c #40395A",
"A+ c #ECECEC",
"B+ c #B4B5B5",
"C+ c #0B0B0B",
"D+ c #313232",
"E+ c #E3E3E3",
"F+ c #B1AEBC",
"G+ c #BDBBC6",
"H+ c #3C3556",
"I+ c #898599",
"J+ c #EDEDED",
"K+ c #39393A",
"L+ c #040404",
"M+ c #333333",
"N+ c #F5F5F5",
"O+ c #2B2B2B",
"P+ c #2D2A3D",
"Q+ c #B6B4C1",
"R+ c #F5F5F6",
"S+ c #605A76",
"T+ c #DAD8DF",
"U+ c #F5F4F6",
"V+ c #615B76",
"W+ c #524D6A",
"X+ c #E4E3E8",
"Y+ c #D5D5D5",
"Z+ c #1B1B1B",
"`+ c #303030",
" @ c #AAABAB",
".@ c #585464",
"+@ c #B0AEBB",
"@@ c #A29FAF",
"#@ c #E9E8E9",
"$@ c #787779",
"%@ c #0F0E15",
"&@ c #2D2D2E",
"*@ c #595959",
"=@ c #FAFAFB",
"-@ c #807B92",
";@ c #B0ADBB",
">@ c #E8E7EB",
",@ c #3A3258",
"'@ c #E6E5EA",
")@ c #DFDEE3",
"!@ c #443E5E",
"~@ c #BAB8C4",
"{@ c #C1BFCA",
"]@ c #E0E0E5",
"^@ c #D0CED6",
"/@ c #362F52",
"(@ c #CECCD5",
"_@ c #413A5B",
":@ c #6A657F",
"<@ c #9793A6",
" ",
" ",
" ",
" . + @ # $ % ",
" & * = * - ; > , ' ; ; ; ) ! ",
" ~ ; ; { ] ; ^ / ( _ ; : < [ ",
" } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ",
" c : d e f g h i j k l 6 m ; n o 6 p q r s ",
" t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ",
" I J ; ; K L 6 6 M N O P E 6 6 6 Q Q M R S T U V W ",
" X Y ; ; ; ; Z ` .6 ..6 6 6 6 6 +.@.#.$.%.&.*.=.-.;. ",
" >.; ; ; ; ; ; = ,.'.).!.~.{.].6 ^.6 6 6 E /.(.; ; _. ",
" :.; ; <.R h [.}.|.6 1.6 2.6 6 3.4.6 6 6 6 E 5.6.4 7. ",
" 8.9.; 0...6 6 6 6 6 6 6 6 2.6 6 6 6 6 6 6 6 6 6 a.b. ",
" V @ c.d.e.6 6 6 6 6 f.g.6 2.6 6 6 6 6 6 6 6 6 6 ",
" h.i.j.6 k.6 6 6 6 6 6 6 2.6 6 l.m.6 6 6 6 6 6 n. ",
" o.; ; p.q.q.r.s. .6 6 6 6 2.6 6 t.u.6 6 6 6 6 6 v. ",
" w.; ; x.y.; ; ; z.6 6 6 6 2.6 6 A.u.6 6 6 6 6 6 B. ",
" C.; ; ; ; D.; ; M 6 6 6 6 2.6 6 A.u.6 6 6 6 6 6 6 E., ",
" F.; ; D.; : G.H.I.J.K.L.M.N.M.O.P.N.Q.Q.R.S.g.T.U.D.V.W. ",
" X.; ; ; Y.Z.`.6 6 6 K.L.M. +M.O.Q.Q.Q.Q.R.S.@..+++; ; @+#+ ",
" $+J ; : %+6 6 6 6 q.&+6 6 6 6 6 6 6 6 6 6 6 6 6 *+=+; ; -+;+ ",
" >+; ; ,+6 E 6 '+)+!+~+6 6 6 6 6 6 6 6 g.6 6 6 6 {+]+; ; > ;+ ",
" ^+; /+(+_+6 6 !+D.; :+<+6 6 6 6 6 6 6 6 [+}+6 6 6 |+1+; ; 2+3+ ",
" ;+4+! 5+6+7+x ; ; 8+9+0+a+l b+6 6 6 c+d+e+f+6 6 6 g+h+i+; ; j+@ ",
" k+l+m+n+o+p+; q+r+s+; =+b+6 6 E t+; ; u+6 6 E 6 o v+; ; = w+ ",
" x+> ; ; ; ; ; ; y+z+; ; A+r.6 6 I.D ; ; B+C+6 6 6 D+E+; ; F+ ",
" > ; ; ; ; G+H+I+; ; J+K+6 6 L+M+; ; N+O+6 6 P+Q+; R+3 ",
" S+T+= ; U+V+W+X+; ; Y+Z+6 6 I.`+; ; ; @t+.@ ",
" +@4 @@ X ; ; ; #@$@`+%@&@*@; ; ; D.=@-@ ",
" ;@; ; ; ; ; >@,@'@; ; ; ; = )@!@ ",
" ~@{@]@4 ; ; ^@/@(@; ; ; s I+T ",
" _@ :@<@I+ ",
" ",
" ",
" "};

+ 136
- 0
SpiralSound/Plugins/DistributorPlugin/DistributorPlugin.C View File

@@ -0,0 +1,136 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "DistributorPlugin.h"
#include "DistributorPluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

extern "C" {
SpiralPlugin* CreateInstance()
{
return new DistributorPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x0056;
}
}

///////////////////////////////////////////////////////

DistributorPlugin::DistributorPlugin()
{
m_PluginInfo.Name="Distributor";
m_PluginInfo.Width=220;
m_PluginInfo.Height=250;
m_PluginInfo.NumInputs=2;
m_PluginInfo.NumOutputs=8;
m_PluginInfo.PortTips.push_back("Stream (A)");
m_PluginInfo.PortTips.push_back("Switcher (B)");
m_PluginInfo.PortTips.push_back("Out A1");
m_PluginInfo.PortTips.push_back("Out B1");
m_PluginInfo.PortTips.push_back("Out A2");
m_PluginInfo.PortTips.push_back("Out B2");
m_PluginInfo.PortTips.push_back("Out A3");
m_PluginInfo.PortTips.push_back("Out B3");
m_PluginInfo.PortTips.push_back("Out A4");
m_PluginInfo.PortTips.push_back("Out B4");
}

DistributorPlugin::~DistributorPlugin()
{
}

PluginInfo &DistributorPlugin::Initialise(const HostInfo *Host)
{
return SpiralPlugin::Initialise(Host);
}

SpiralGUIType *DistributorPlugin::CreateGUI()
{
m_GUI=NULL;
return m_GUI;
}

void DistributorPlugin::Execute()
{
if (! m_Defined)
{
m_Triggeronce=false;
m_Previous=0;
m_Now=0;
m_Defined=true;
m_ChannelSelect=0;
m_trigdelay=0;
}
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
// detect the trigger
if ((GetInput(1,n))!=0)
{
if (GetInput(0,n)!=m_Previous)
{
GetOutputBuf(m_ChannelSelect+1)->Zero();
m_ChannelSelect=m_ChannelSelect+2;
if (m_ChannelSelect>6)
{
m_ChannelSelect=0;
}
//zero the outputs first...
GetOutputBuf(m_ChannelSelect)->Zero();
GetOutputBuf(m_ChannelSelect+1)->Zero();
//and copy the inputs as well
if (InputExists(0)) //unless you want segmentation faults...
GetOutputBuf(m_ChannelSelect)->Mix(*GetInput(0),0);
GetOutputBuf(m_ChannelSelect+1)->Mix(*GetInput(1),0);
//now save the present pitch value, because we'll need it next time around.
m_Previous=GetInput(0,n);
m_Triggeronce=true;
}
else if (m_Triggeronce==false)
{
//just copy the trigger in this case.
GetOutputBuf(m_ChannelSelect+1)->Zero();
GetOutputBuf(m_ChannelSelect+1)->Mix(*GetInput(1),0);
m_Triggeronce=true;
}
}
else
{
m_Triggeronce=false;
m_trigdelay++;
if (m_trigdelay>=10)
{
GetOutputBuf(m_ChannelSelect+1)->Zero();
m_trigdelay=0;
}
}
}

}





+ 57
- 0
SpiralSound/Plugins/DistributorPlugin/DistributorPlugin.h View File

@@ -0,0 +1,57 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include <FL/Fl_Pixmap.H>

#ifndef DistributorPLUGIN
#define DistributorPLUGIN

class DistributorPlugin : public SpiralPlugin
{
public:
DistributorPlugin();
virtual ~DistributorPlugin();
virtual PluginInfo& Initialise(const HostInfo *Host);
virtual SpiralGUIType* CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s) {}
virtual void StreamIn(istream &s) {}
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }

private:
bool m_Triggered;
bool m_Switch;
bool m_Triggeronce;
int m_ChannelSelect;
int m_trigdelay;
bool m_Defined;
float m_Previous;
float m_Now;
};

#endif







+ 18
- 0
SpiralSound/Plugins/DistributorPlugin/DistributorPlugin.pro View File

@@ -0,0 +1,18 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
DistributorPlugin.h \
DistributorPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
DistributorPlugin.C \
DistributorPluginGUI.C

TARGET = DistributorPlugin.so


+ 42
- 0
SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.C View File

@@ -0,0 +1,42 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "DistributorPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

static const int GUI_COLOUR = 154;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;

////////////////////////////////////////////

DistributorPluginGUI::DistributorPluginGUI(int w, int h,DistributorPlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o)
{
m_Plugin=o;
end();
}



void DistributorPluginGUI::UpdateValues()
{
}


+ 48
- 0
SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.h View File

@@ -0,0 +1,48 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>

#include "../Widgets/Fl_Knob.H"
#include "../Widgets/Fl_DragBar.H"
#include "DistributorPlugin.h"
#include "../SpiralPluginGUI.h"

#ifndef DistributorGUI
#define DistributorGUI


class DistributorPluginGUI : public SpiralPluginGUI
{
public:
DistributorPluginGUI(int w, int h, DistributorPlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
DistributorPlugin *m_Plugin;
private:

//// Callbacks ////
};

#endif


+ 170
- 0
SpiralSound/Plugins/DistributorPlugin/Makefile.in View File

@@ -0,0 +1,170 @@
# Generated automatically from Makefile.in by configure.
#############################################################################
# Makefile for building DistributorPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: DistributorPlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@
CXXFLAGS= @CXXFLAGS@
INCPATH = -I/usr/X11R6/include
LINK = g++ -shared
LFLAGS =
LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
DistributorPlugin.h \
DistributorPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
DistributorPlugin.C \
DistributorPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
DistributorPlugin.o \
DistributorPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = DistributorPlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake DistributorPlugin.pro

dist:
$(TAR) DistributorPlugin.tar DistributorPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) DistributorPlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

DistributorPlugin.o: DistributorPlugin.C \
DistributorPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
DistributorPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
SpiralIcon.xpm

DistributorPluginGUI.o: DistributorPluginGUI.C \
DistributorPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
DistributorPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H



+ 328
- 0
SpiralSound/Plugins/DistributorPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,328 @@
/* XPM */
static char *SpiralIcon_xpm []={
"36 36 289 2",
"Qt c None",
".G c #000000",
"aa c #000001",
"aV c #010100",
"#d c #010101",
"#Z c #010200",
"aH c #020200",
"bQ c #020202",
"ah c #020203",
"aG c #030303",
"#Q c #040400",
"b1 c #040404",
"ai c #040500",
"ax c #050408",
"ak c #050500",
"bd c #050505",
"#F c #060600",
"bv c #060607",
"bl c #070608",
"a5 c #080808",
"bb c #0a0810",
"b# c #0a090e",
"ab c #0a0a00",
"bS c #0b0b0b",
"#B c #0c0c0c",
"bc c #0d0d0d",
".X c #0e0e0e",
"cl c #0f0e15",
"#l c #0f0f0f",
".0 c #100e15",
"aO c #101010",
"aB c #101100",
".Z c #111111",
"as c #111112",
"ar c #121300",
"aw c #141500",
"a2 c #151515",
"#A c #161616",
"#D c #161800",
"ac c #171800",
"#p c #181900",
".R c #191919",
"#G c #191a00",
"al c #1a1a1c",
"#E c #1a1b00",
"cd c #1b1b1b",
"aT c #1c1c1c",
".t c #1d1c1d",
"aA c #1d1d1d",
"#8 c #1e1d24",
"ao c #202020",
"bu c #212025",
"aU c #242424",
"#P c #252525",
"aI c #28272a",
"#e c #282828",
".m c #2a2248",
".J c #2a2a2b",
".Q c #2b2932",
"b4 c #2b2b2b",
"#o c #2b2b2c",
"b5 c #2d2a3d",
"cm c #2d2d2e",
"ce c #303030",
"#t c #31294d",
".u c #313134",
"bT c #313232",
"b2 c #333333",
"cA c #362f52",
"br c #363636",
"a6 c #373639",
"ap c #383838",
"#H c #393643",
"b0 c #39393a",
"cs c #3a3258",
"bG c #3b3456",
".U c #3b3556",
"bX c #3c3556",
".K c #403958",
"bO c #40395a",
"ad c #404000",
"cC c #413a5b",
"ag c #413e4d",
"aF c #414141",
"#. c #423c5c",
"cv c #443e5e",
"bq c #454545",
".z c #464060",
"#s c #474060",
"#I c #47415f",
"a1 c #474746",
"#n c #48445c",
"bM c #494262",
"#c c #4a4a4a",
"aq c #4c4c4c",
"#0 c #515151",
"ca c #524d6a",
"bI c #525252",
"#k c #545454",
"#b c #555555",
".7 c #575755",
"cg c #585464",
"cn c #595959",
"bn c #5b5571",
"be c #5b5a5c",
".8 c #5e5e5e",
"af c #5f5a75",
"b8 c #605a76",
"aK c #605b76",
"c# c #615b76",
"ae c #615c76",
"#3 c #615c77",
"#h c #615c78",
".P c #625c79",
"#w c #625d78",
"bo c #646078",
"#v c #65607a",
"aW c #656566",
".f c #67627c",
"bN c #68627c",
".o c #68637d",
"a# c #69686f",
"cD c #6a657f",
"#Y c #6c6c6c",
"aS c #6d6881",
"b. c #6d6980",
"aZ c #706b84",
"#u c #716c85",
"#R c #727175",
"aN c #727272",
"aL c #736e86",
"aR c #747087",
".I c #747474",
"ck c #787779",
".D c #79758c",
"bs c #7a7a7a",
".y c #7b768d",
".L c #7d788f",
".d c #7d7990",
".T c #807b91",
"cp c #807b92",
"#6 c #808000",
"#7 c #808080",
"#2 c #827e93",
"bj c #837e96",
".c c #837f94",
".l c #848095",
"bJ c #848387",
"aP c #848486",
".1 c #868689",
"bk c #86868a",
"bY c #898599",
".# c #8b889b",
"#z c #8b8b8b",
"bL c #8d899c",
"bh c #908c9f",
"#M c #918da0",
".W c #929292",
"aD c #9390a2",
"#a c #939393",
".r c #9490a2",
"ba c #95929e",
"#J c #9692a4",
"bw c #969699",
"cE c #9793a6",
"#9 c #9894a7",
".e c #9995a7",
".4 c #9c98aa",
".a c #9c99aa",
"#T c #9d99aa",
"an c #9d9d9d",
"bz c #a29eaf",
"ci c #a29faf",
".F c #a2a2a2",
"bF c #a5a2b2",
"#1 c #a6a6a7",
"bH c #a8a5b4",
"cf c #aaabab",
".p c #aba8b6",
"a8 c #aba8b7",
".b c #adaab9",
"ay c #aeacb9",
"a4 c #aeaeae",
"bp c #afafb0",
"cq c #b0adbb",
"ch c #b0aebb",
"a. c #b1aebb",
"bV c #b1aebc",
"bR c #b4b5b5",
"b6 c #b6b4c1",
"aC c #b7b5c1",
"#N c #b8b5c1",
"bC c #b8b7b9",
"#m c #b8b8b8",
"cw c #bab8c4",
"aE c #bbbbbb",
".O c #bcbac5",
".N c #bcbac6",
"bW c #bdbbc6",
".Y c #bfbfbf",
".M c #c0bec8",
"aj c #c0c000",
"#r c #c1bec9",
"cx c #c1bfca",
"#f c #c2c2c2",
"am c #c3c1cb",
".9 c #c4c2cd",
".s c #c4c4c4",
"bi c #c8c6d0",
"a3 c #c8c8c8",
"bt c #c8c8c9",
"at c #c9c7d0",
".B c #cbcacc",
"#W c #cbcbcb",
"aQ c #cccbd3",
".S c #cccccc",
".g c #cdcbd4",
"bK c #cdcdcd",
"cB c #ceccd5",
".n c #cfced6",
"cz c #d0ced6",
".i c #d1d0d8",
"#O c #d1d1d1",
"#q c #d3d3d3",
".q c #d5d3db",
"#x c #d5d4db",
"cc c #d5d5d5",
"aM c #d8d8d8",
".3 c #d9d7de",
"#K c #d9d8de",
"b9 c #dad8df",
"#j c #dadada",
"#U c #dbd9e0",
"#g c #dbdae0",
".6 c #dddddd",
".A c #dedee1",
"cu c #dfdee3",
"#5 c #dfdfe1",
"#X c #e0e0e0",
"cy c #e0e0e5",
"a0 c #e3e1e6",
"bU c #e3e3e3",
"cb c #e4e3e8",
"bD c #e4e4e4",
"ct c #e6e5ea",
"aY c #e8e6ea",
"cr c #e8e7eb",
"cj c #e9e8e9",
"#V c #e9e9e9",
"#4 c #eaeaed",
"bm c #ecebee",
"bP c #ececec",
"bZ c #ededed",
".C c #eeeef1",
".v c #eeefee",
".x c #efefef",
"bB c #f0f0f1",
"## c #f0f0f2",
"a9 c #f1f0f3",
"au c #f1f1f1",
".k c #f1f1f3",
".V c #f2f2f4",
"bg c #f4f3f5",
"aJ c #f4f4f6",
"c. c #f5f4f6",
"b3 c #f5f5f5",
"b7 c #f5f5f6",
".H c #f5f6f5",
"aX c #f6f6f6",
"#i c #f6f6f7",
"bf c #f7f6f7",
"bA c #f7f6f8",
"#y c #f7f7f7",
"#L c #f7f7f8",
"av c #f8f8f8",
"by c #f8f8f9",
"bx c #fafafa",
"co c #fafafb",
".w c #fbfbfb",
".E c #fbfbfc",
".h c #fcfcfc",
".5 c #fdfcfd",
"a7 c #fdfcfe",
"bE c #fdfdfd",
".2 c #fefdfe",
"az c #fefefe",
"#S c #fefeff",
"#C c #ffff00",
".j c #ffffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQt.#Qt.a.b.cQtQt.d.eQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.f.g.h.gQt.i.j.k.l.m.j.j.j.n.oQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.p.j.j.qQt.r.j.s.t.u.v.j.w.x.yQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.z.A.B.CQt.D.E.F.G.G.H.w.I.J.K.L.MQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQt.N.w.O.P.Q.R.S.T.U.V.W.G.X.j.Y.Z.G.0.1.2.3QtQtQtQtQtQtQtQtQtQt",
"QtQtQtQt.4.5.j.6.7.G.G.8.9#.###a.G#b.j#c#d.G#e#f.j#gQtQtQtQtQtQtQtQtQtQt",
"QtQtQt#h#i.j.j#j#k.G.G#l#m#n#o#d.G.G.G#p#p#l#q#r#s#t#u#vQtQtQtQtQtQtQtQt",
"QtQt#w#x.j.j.j.j#y#z#A.G#B.G.G.G#C#C#D#E#F#G#H#I#J#K#L#MQtQtQtQtQtQtQtQt",
"QtQt#N.j.j.j.j.j.j.h#O#P.G.G#Q.G#C#C#Q.G.G.G#d#R#S.j.j#TQtQtQtQtQtQtQtQt",
"QtQt#U.j.j#V#q.S#W#X#Y.G.G.G#Z.G.G.G.G.G.G.G.G#d#0#1.E#2QtQtQtQtQtQtQtQt",
"Qt#3#4.j#5#B.G.G.G.G.G.G.G.G#Z.G.G.G.G#6#C#7.G.G.G#8#9QtQtQtQtQtQtQtQtQt",
"Qt#u.ba.a#aa.G.G.G.G.Gabac.G#Z.G.Gad#6#C#6#7#7.G.GQtQtQtQtQtQtQtQtQtQtQt",
"QtQtaeafag.Gah.G.G.G.G.Gai.G#Z.G#6aj#C#6.Gakaj#C.GalQtQtQtQtQtQtQtQtQtQt",
"Qtam.j.janaoaoapaqao#C#C.G.G.G#6aj#Cajad.Gar#Caj.GasQtQtQtQtQtQtQtQtQtQt",
"Qtat.j.jauav.j.j.j.G#C#Caw.G.Gaj#Caj#6.G.Gar#7#7.GaxQtQtQtQtQtQtQtQtQtQt",
"Qtay.j.j.j.jaz.j.jaA.G.GaB.G.G#6aj#6.G.G.Gar#7#7.G.GaC.lQtQtQtQtQtQtQtQt",
"QtaD.j.jaz.j.waEaFaG.G.G.G.G.G.G.G.G.G.G.GaH#7.G.GaIazaJaKQtQtQtQtQtQtQt",
"QtaL.j.j.jaMaNaO.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.G.GaP.j.jaQaRQtQtQtQtQtQt",
"QtaS#i.j.waT.G.G.G.GaU#B.G.G.G.G#C#Cab.G.GaV.G.G.GaWaX.j.jaYaZQtQtQtQtQt",
"QtQta0.j.ja1.G#d.Ga2a3a4a5.G.G.G#C#C.G.G.GaV.G.G.G.Ga6a7.j.j.kaZQtQtQtQt",
"QtQta8.ja9b.b#.G.Ga4az.jbabb.G.G.G.G.G.G.G.Gbcbd.G.G.Gbebf.j.jbgbhQtQtQt",
"QtQtaZbi.objbkbl.8.j.jbmbnbobp.Wbq.G.G.Gbrbsbtbu.G.G.Gbvbwbx.j.jby.bQtQt",
"QtQtQtQtbzbAbBbCbDbE.jbFbGbH.jaXbq.G.G#dbI.j.jbJ.G.G#d.G.ZbK.j.j.hbLQtQt",
"QtQtQtbM.k.j.j.j.j.j.jbNbO.j.jbPap.G.GbQ#c.j.jbRbS.G.G.GbTbU.j.jbVQtQtQt",
"QtQtQtQtQt.k.j.j.j.jbWbXbY.j.jbZb0.G.Gb1b2.j.jb3b4.G.Gb5b6.jb7.DQtQtQtQt",
"QtQtQtQtQtb8b9.h.jc.c#cacb.j.jcccd.G.GbQce.j.j.jcfbIcgQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtch.EciQt#w.j.j.jcjckceclcmcn.j.j.jazcocpQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtcq.j.j.j.j.jcrcsct.j.j.j.j.hcucvQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtcwcxcy.E.j.jczcAcB.j.j.j.3bY#sQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtcCQtQtQtQtQtcDcEbYQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

+ 125
- 0
SpiralSound/Plugins/EchoPlugin/EchoPlugin.C View File

@@ -0,0 +1,125 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "EchoPlugin.h"
#include "EchoPluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

static const float MAX_DELAY=1.0f;

extern "C" {
SpiralPlugin* CreateInstance()
{
return new EchoPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x000e;
}
}

///////////////////////////////////////////////////////

EchoPlugin::EchoPlugin() :
m_Delay(0.75),
m_Feedback(0.4),
m_HeadPos(0)
{
m_PluginInfo.Name="Echo";
m_PluginInfo.Width=120;
m_PluginInfo.Height=110;
m_PluginInfo.NumInputs=3;
m_PluginInfo.NumOutputs=1;
m_PluginInfo.PortTips.push_back("Input");
m_PluginInfo.PortTips.push_back("Delay CV");
m_PluginInfo.PortTips.push_back("Feedback CV");
m_PluginInfo.PortTips.push_back("Output");
}

EchoPlugin::~EchoPlugin()
{
}

PluginInfo &EchoPlugin::Initialise(const HostInfo *Host)
{
PluginInfo& Info = SpiralPlugin::Initialise(Host);
m_Buffer.Allocate((int)(m_HostInfo->SAMPLERATE*MAX_DELAY));
return Info;
}

SpiralGUIType *EchoPlugin::CreateGUI()
{
m_GUI = new EchoPluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void EchoPlugin::Execute()
{
float Delay;
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
Delay=(m_Delay+GetInput(1,n)*0.5)*(float)m_HostInfo->SAMPLERATE-1;
if (Delay>=MAX_DELAY*m_HostInfo->SAMPLERATE)
{
Delay=(MAX_DELAY*m_HostInfo->SAMPLERATE)-1;
}
if (Delay<0) Delay=0;
if (m_HeadPos>Delay)
{
m_HeadPos=0;
}

// Write to the buffer
m_Buffer.Set(m_HeadPos,GetInput(0,n)+(m_Buffer[m_HeadPos]*(m_Feedback+GetInput(2,n))));

// Read from the buffer
SetOutput(0,n,m_Buffer[m_HeadPos]);
m_HeadPos++;
}
}
void EchoPlugin::Randomise()
{
}
void EchoPlugin::StreamOut(ostream &s)
{
s<<m_Version<<" "<<m_Delay<<" "<<m_Feedback<<" ";
}

void EchoPlugin::StreamIn(istream &s)
{
int version;
s>>version;
s>>m_Delay>>m_Feedback;
}

+ 61
- 0
SpiralSound/Plugins/EchoPlugin/EchoPlugin.h View File

@@ -0,0 +1,61 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include <FL/Fl_Pixmap.H>

#ifndef ECHOPLUGIN
#define ECHOPLUGIN

class EchoPlugin : public SpiralPlugin
{
public:
EchoPlugin();
virtual ~EchoPlugin();
virtual PluginInfo &Initialise(const HostInfo *Host);
virtual SpiralGUIType *CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }
void SetDelay(float s) { m_Delay=s; }
void SetFeedback(float s) { m_Feedback=s; }
float GetDelay() { return m_Delay; }
float GetFeedback() { return m_Feedback; }
void Randomise();
private:
float m_Delay;
float m_Feedback;

int m_HeadPos;
Sample m_Buffer;

friend istream &operator>>(istream &s, EchoPlugin &o);
friend ostream &operator<<(ostream &s, EchoPlugin &o);
};
istream &operator>>(istream &s, EchoPlugin &o);
ostream &operator<<(ostream &s, EchoPlugin &o);

#endif

+ 17
- 0
SpiralSound/Plugins/EchoPlugin/EchoPlugin.pro View File

@@ -0,0 +1,17 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
EchoPlugin.h \
EchoPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
EchoPlugin.C \
EchoPluginGUI.C

TARGET = EchoPlugin.so

+ 135
- 0
SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C View File

@@ -0,0 +1,135 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "EchoPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;

////////////////////////////////////////////

EchoPluginGUI::EchoPluginGUI(int w, int h,EchoPlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o)
{
m_Plugin=o;
m_Delay = new Fl_Slider(15, 20, 20, 70, "Delay");
m_Delay->type(4);
m_Delay->selection_color(GUI_COLOUR);
m_Delay->labelsize(10);
m_Delay->maximum(1);
m_Delay->step(0.001);
m_Delay->value(0.5);
m_Delay->callback((Fl_Callback*)cb_Delay);
m_Feedback = new Fl_Slider(75, 20, 20, 70, "Feedback");
m_Feedback->type(4);
m_Feedback->selection_color(GUI_COLOUR);
m_Feedback->labelsize(10);
m_Feedback->maximum(1.1);
m_Feedback->step(0.01);
m_Feedback->value(0.4);
m_Feedback->callback((Fl_Callback*)cb_Feedback);
m_pop = new Fl_Button(1,h-14, 13, 13, "@>");
m_pop->type(1);
m_pop->box(FL_FLAT_BOX);
m_pop->down_box(FL_FLAT_BOX);
m_pop->labeltype(FL_SYMBOL_LABEL);
m_pop->labelsize(10);
m_pop->labelcolor(25);
m_pop->callback((Fl_Callback*)cb_pop);
m_out_delay = new Fl_Output(50, h+5, 55, 15, "Delay");
m_out_delay->box(FL_ENGRAVED_BOX);
m_out_delay->color(16);
m_out_delay->labelsize(10);
m_out_delay->textsize(10);
m_out_delay->hide();
m_out_delay->set_output();
m_out_feedback = new Fl_Output(50, h+22, 55, 15, "Feedback");
m_out_feedback->box(FL_ENGRAVED_BOX);
m_out_feedback->color(16);
m_out_feedback->labelsize(10);
m_out_feedback->textsize(10);
m_out_feedback->hide();
m_out_feedback->set_output();
end();
}

extern "C" int sprintf(char *,const char *,...);

void EchoPluginGUI::UpdateValues()
{
m_Delay->value(1.0f-m_Plugin->GetDelay());
m_Feedback->value(1.1f-m_Plugin->GetFeedback());
char str[10];
sprintf(str,"%5.3f s", m_Plugin->GetDelay());
m_out_delay->value(str);
sprintf(str,"%5.1f %%", 100*m_Plugin->GetFeedback());
m_out_feedback->value(str);
}

inline void EchoPluginGUI::cb_Delay_i(Fl_Slider* o, void* v)
{
char str[10];
float value=1.0f-o->value();
m_Plugin->SetDelay(value);
sprintf(str,"%5.3f s", value);
m_out_delay->value(str);
}

void EchoPluginGUI::cb_Delay(Fl_Slider* o, void* v)
{ ((EchoPluginGUI*)(o->parent()))->cb_Delay_i(o,v); }

inline void EchoPluginGUI::cb_Feedback_i(Fl_Slider* o, void* v)
{
char str[10];
m_Plugin->SetFeedback(1.1f-o->value());
sprintf(str,"%5.1f %%", 100*(1.1f-o->value()));
m_out_feedback->value(str);
}
void EchoPluginGUI::cb_Feedback(Fl_Slider* o, void* v)
{ ((EchoPluginGUI*)(o->parent()))->cb_Feedback_i(o,v); }

inline void EchoPluginGUI::cb_pop_i(Fl_Button *o, void*) {
if (o->value())
{
o->label("@2>");
m_out_delay->show();
m_out_feedback->show();
redraw();
}
else
{
o->label("@>");
m_out_delay->hide();
m_out_feedback->hide();
redraw();
parent()->redraw();
}
}
void EchoPluginGUI::cb_pop(Fl_Button* o, void* v) {
((EchoPluginGUI*)(o->parent()))->cb_pop_i(o,v);
}

+ 63
- 0
SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h View File

@@ -0,0 +1,63 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Slider.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Box.H>

#include "EchoPlugin.h"
#include "../SpiralPluginGUI.h"
#include "../Widgets/Fl_Knob.H"

#ifndef FilterGUI
#define FilterGUI


class EchoPluginGUI : public SpiralPluginGUI
{
public:
EchoPluginGUI(int w, int h, EchoPlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
EchoPlugin *m_Plugin;
private:
Fl_Slider *m_Delay;
Fl_Slider *m_Feedback;
Fl_Button *m_pop;
Fl_Output *m_out_delay;
Fl_Output *m_out_feedback;

//// Callbacks ////
inline void cb_Delay_i(Fl_Slider* o, void* v);
static void cb_Delay(Fl_Slider*, void*);
inline void cb_Feedback_i(Fl_Slider* o, void* v);
static void cb_Feedback(Fl_Slider* o, void* v);
inline void cb_pop_i(Fl_Button* o, void*);
static void cb_pop(Fl_Button* o, void*);
};

#endif

+ 166
- 0
SpiralSound/Plugins/EchoPlugin/Makefile.in View File

@@ -0,0 +1,166 @@
#############################################################################
# Makefile for building EchoPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: EchoPlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@
CXXFLAGS= @CXXFLAGS@
INCPATH = -I/usr/X11R6/include
LINK = g++ -shared
LFLAGS =
LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
EchoPlugin.h \
EchoPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
EchoPlugin.C \
EchoPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
EchoPlugin.o \
EchoPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = EchoPlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake EchoPlugin.pro

dist:
$(TAR) EchoPlugin.tar EchoPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) EchoPlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core

install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

EchoPlugin.o: EchoPlugin.C \
EchoPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
EchoPluginGUI.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../Widgets/Fl_Knob.H \
SpiralIcon.xpm

EchoPluginGUI.o: EchoPluginGUI.C \
EchoPluginGUI.h \
EchoPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../Widgets/Fl_Knob.H


+ 341
- 0
SpiralSound/Plugins/EchoPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,341 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 302 2",
" c None",
". c #8B889B",
"+ c #9C99AA",
"@ c #ADAAB9",
"# c #837F94",
"$ c #7D7990",
"% c #9995A7",
"& c #67627C",
"* c #CDCBD4",
"= c #FCFCFC",
"- c #D1D0D8",
"; c #FFFFFF",
"> c #F1F1F3",
", c #848095",
"' c #2A2248",
") c #CFCED6",
"! c #68637D",
"~ c #ABA8B6",
"{ c #D5D3DB",
"] c #9490A2",
"^ c #C4C4C4",
"/ c #1D1C1D",
"( c #313134",
"_ c #EEEFEE",
": c #FBFBFB",
"< c #EFEFEF",
"[ c #7B768D",
"} c #464060",
"| c #DEDEE1",
"1 c #CBCACC",
"2 c #EEEEF1",
"3 c #79758C",
"4 c #FBFBFC",
"5 c #A2A2A2",
"6 c #000000",
"7 c #F5F6F5",
"8 c #747474",
"9 c #2A2A2B",
"0 c #403958",
"a c #7D788F",
"b c #C0BEC8",
"c c #BCBAC6",
"d c #BCBAC5",
"e c #625C79",
"f c #2B2932",
"g c #191919",
"h c #CCCCCC",
"i c #807B91",
"j c #3B3556",
"k c #F2F2F4",
"l c #929292",
"m c #0E0E0E",
"n c #BFBFBF",
"o c #111111",
"p c #100E15",
"q c #868689",
"r c #FEFDFE",
"s c #D9D7DE",
"t c #9C98AA",
"u c #FDFCFD",
"v c #DDDDDD",
"w c #575755",
"x c #5E5E5E",
"y c #C4C2CD",
"z c #423C5C",
"A c #F0F0F2",
"B c #939393",
"C c #555555",
"D c #4A4A4A",
"E c #010101",
"F c #282828",
"G c #C2C2C2",
"H c #DBDAE0",
"I c #615C78",
"J c #F6F6F7",
"K c #DADADA",
"L c #545454",
"M c #0F0F0F",
"N c #B8B8B8",
"O c #48445C",
"P c #2B2B2C",
"Q c #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0C0C0C",
"+. c #161800",
"@. c #1A1B00",
"#. c #060600",
"$. c #191A00",
"%. c #393643",
"&. c #47415F",
"*. c #9692A4",
"=. c #D9D8DE",
"-. c #F7F7F8",
";. c #918DA0",
">. c #B8B5C1",
",. c #D1D1D1",
"'. c #212121",
"). c #2D2F00",
"!. c #101100",
"~. c #090A00",
"{. c #0C0C00",
"]. c #070800",
"^. c #030300",
"/. c #727175",
"(. c #FEFEFF",
"_. c #9D99AA",
":. c #DBD9E0",
"<. c #E9E9E9",
"[. c #CBCBCB",
"}. c #E0E0E0",
"|. c #6C6C6C",
"1. c #CCC200",
"2. c #CCC100",
"3. c #030400",
"4. c #0E0F00",
"5. c #515151",
"6. c #A6A6A7",
"7. c #827E93",
"8. c #615C77",
"9. c #EAEAED",
"0. c #DFDFE1",
"a. c #EADE00",
"b. c #1E1D24",
"c. c #9894A7",
"d. c #B1AEBB",
"e. c #69686F",
"f. c #000001",
"g. c #615C76",
"h. c #5F5A75",
"i. c #413E4D",
"j. c #020203",
"k. c #706A00",
"l. c #131314",
"m. c #C3C1CB",
"n. c #9D9D9D",
"o. c #202020",
"p. c #383838",
"q. c #4C4C4C",
"r. c #080808",
"s. c #E7DB00",
"t. c #09090A",
"u. c #C9C7D0",
"v. c #F1F1F1",
"w. c #F8F8F8",
"x. c #070707",
"y. c #B1A700",
"z. c #020103",
"A. c #AEACB9",
"B. c #FEFEFE",
"C. c #0A0A0A",
"D. c #E8DC00",
"E. c #E0D400",
"F. c #BFB500",
"G. c #D1C600",
"H. c #B7B5C1",
"I. c #9390A2",
"J. c #BBBBBB",
"K. c #414141",
"L. c #020202",
"M. c #131400",
"N. c #807900",
"O. c #FDF000",
"P. c #FFF200",
"Q. c #999100",
"R. c #1D1C1E",
"S. c #F4F4F6",
"T. c #605B76",
"U. c #736E86",
"V. c #D8D8D8",
"W. c #727272",
"X. c #101010",
"Y. c #1E1C00",
"Z. c #8F8700",
"`. c #918900",
" + c #8E8600",
".+ c #090900",
"++ c #848486",
"@+ c #CCCBD3",
"#+ c #747087",
"$+ c #6D6881",
"%+ c #1C1C1C",
"&+ c #242424",
"*+ c #656566",
"=+ c #F6F6F6",
"-+ c #E8E6EA",
";+ c #706B84",
">+ c #E3E1E6",
",+ c #474746",
"'+ c #151515",
")+ c #C8C8C8",
"!+ c #AEAEAE",
"~+ c #010100",
"{+ c #373639",
"]+ c #FDFCFE",
"^+ c #ABA8B7",
"/+ c #F1F0F3",
"(+ c #6D6980",
"_+ c #0A090E",
":+ c #95929E",
"<+ c #0A0810",
"[+ c #0D0D0D",
"}+ c #050505",
"|+ c #5B5A5C",
"1+ c #F7F6F7",
"2+ c #F4F3F5",
"3+ c #908C9F",
"4+ c #C8C6D0",
"5+ c #837E96",
"6+ c #86868A",
"7+ c #070608",
"8+ c #ECEBEE",
"9+ c #5B5571",
"0+ c #646078",
"a+ c #AFAFB0",
"b+ c #454545",
"c+ c #363636",
"d+ c #7A7A7A",
"e+ c #C8C8C9",
"f+ c #212025",
"g+ c #060607",
"h+ c #969699",
"i+ c #FAFAFA",
"j+ c #F8F8F9",
"k+ c #A29EAF",
"l+ c #F7F6F8",
"m+ c #F0F0F1",
"n+ c #B8B7B9",
"o+ c #E4E4E4",
"p+ c #FDFDFD",
"q+ c #A5A2B2",
"r+ c #3B3456",
"s+ c #A8A5B4",
"t+ c #525252",
"u+ c #848387",
"v+ c #CDCDCD",
"w+ c #8D899C",
"x+ c #494262",
"y+ c #68627C",
"z+ c #40395A",
"A+ c #ECECEC",
"B+ c #B4B5B5",
"C+ c #0B0B0B",
"D+ c #313232",
"E+ c #E3E3E3",
"F+ c #B1AEBC",
"G+ c #BDBBC6",
"H+ c #3C3556",
"I+ c #898599",
"J+ c #EDEDED",
"K+ c #39393A",
"L+ c #040404",
"M+ c #333333",
"N+ c #F5F5F5",
"O+ c #2B2B2B",
"P+ c #2D2A3D",
"Q+ c #B6B4C1",
"R+ c #F5F5F6",
"S+ c #605A76",
"T+ c #DAD8DF",
"U+ c #F5F4F6",
"V+ c #615B76",
"W+ c #524D6A",
"X+ c #E4E3E8",
"Y+ c #D5D5D5",
"Z+ c #1B1B1B",
"`+ c #303030",
" @ c #AAABAB",
".@ c #585464",
"+@ c #B0AEBB",
"@@ c #A29FAF",
"#@ c #E9E8E9",
"$@ c #787779",
"%@ c #0F0E15",
"&@ c #2D2D2E",
"*@ c #595959",
"=@ c #FAFAFB",
"-@ c #807B92",
";@ c #B0ADBB",
">@ c #E8E7EB",
",@ c #3A3258",
"'@ c #E6E5EA",
")@ c #DFDEE3",
"!@ c #443E5E",
"~@ c #BAB8C4",
"{@ c #C1BFCA",
"]@ c #E0E0E5",
"^@ c #D0CED6",
"/@ c #362F52",
"(@ c #CECCD5",
"_@ c #413A5B",
":@ c #6A657F",
"<@ c #9793A6",
" ",
" ",
" ",
" . + @ # $ % ",
" & * = * - ; > , ' ; ; ; ) ! ",
" ~ ; ; { ] ; ^ / ( _ ; : < [ ",
" } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ",
" c : d e f g h i j k l 6 m ; n o 6 p q r s ",
" t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ",
" I J ; ; K L 6 6 M N O P E 6 6 6 Q Q M R S T U V W ",
" X Y ; ; ; ; Z ` .6 ..6 6 6 6 6 +.@.#.$.%.&.*.=.-.;. ",
" >.; ; ; ; ; ; = ,.'.).!.~.{.].6 ^.6 6 6 E /.(.; ; _. ",
" :.; ; <.R h [.}.|.6 1.2.6 6 6 3.4.6 6 6 6 E 5.6.4 7. ",
" 8.9.; 0...6 6 6 6 6 6 a.a.6 6 6 6 6 6 6 6 6 6 6 b.c. ",
" V @ d.e.f.6 6 6 6 6 6 a.a.6 2.2.6 6 6 6 6 6 6 6 ",
" g.h.i.6 j.6 6 6 6 6 a.a.6 a.a.6 k.k.6 6 6 6 6 l. ",
" m.; ; n.o.o.p.q.r.6 6 a.a.6 a.a.6 s.s.6 6 6 6 6 t. ",
" u.; ; v.w.; ; ; x.6 6 a.a.6 a.a.6 a.a.6 y.y.6 6 z. ",
" A.; ; ; ; B.; ; C.6 6 D.D.6 E.E.6 F.F.6 G.G.6 6 6 H., ",
" I.; ; B.; : J.K.L.M.N.O.O.O.O.O.O.P.P.P.P.P.Q.!.R.B.S.T. ",
" U.; ; ; V.W.X.6 6 6 Y.Z.`.`.`.`. +Y.6 6 6 6 .+4.++; ; @+#+ ",
" $+J ; : %+6 6 6 6 &+r.6 6 6 6 6 6 6 6 6 6 6 6 6 *+=+; ; -+;+ ",
" >+; ; ,+6 E 6 '+)+!+r.6 6 6 6 6 6 6 6 ~+6 6 6 6 {+]+; ; > ;+ ",
" ^+; /+(+_+6 6 !+B.; :+<+6 6 6 6 6 6 6 6 [+}+6 6 6 |+1+; ; 2+3+ ",
" ;+4+! 5+6+7+x ; ; 8+9+0+a+l b+6 6 6 c+d+e+f+6 6 6 g+h+i+; ; j+@ ",
" k+l+m+n+o+p+; q+r+s+; =+b+6 6 E t+; ; u+6 6 E 6 o v+; ; = w+ ",
" x+> ; ; ; ; ; ; y+z+; ; A+p.6 6 L.D ; ; B+C+6 6 6 D+E+; ; F+ ",
" > ; ; ; ; G+H+I+; ; J+K+6 6 L+M+; ; N+O+6 6 P+Q+; R+3 ",
" S+T+= ; U+V+W+X+; ; Y+Z+6 6 L.`+; ; ; @t+.@ ",
" +@4 @@ X ; ; ; #@$@`+%@&@*@; ; ; B.=@-@ ",
" ;@; ; ; ; ; >@,@'@; ; ; ; = )@!@ ",
" ~@{@]@4 ; ; ^@/@(@; ; ; s I+T ",
" _@ :@<@I+ ",
" ",
" ",
" "};

+ 10
- 0
SpiralSound/Plugins/Edit.sh View File

@@ -0,0 +1,10 @@
#! /bin/sh

for file in `cat PluginList.txt`
do
echo $file
cd $file/
nedit $file.h
nedit $file.C
cd ..
done

+ 98
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C View File

@@ -0,0 +1,98 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "EnvFollowerPlugin.h"
#include "EnvFollowerPluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

extern "C" {
SpiralPlugin* CreateInstance()
{
return new EnvFollowerPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x0013;
}
}

///////////////////////////////////////////////////////

EnvFollowerPlugin::EnvFollowerPlugin() :
m_Attack(0.5),
m_Decay(0.5),
m_Value(0)
{
m_PluginInfo.Name="EnvFollower";
m_PluginInfo.Width=140;
m_PluginInfo.Height=100;
m_PluginInfo.NumInputs=1;
m_PluginInfo.NumOutputs=1;
m_PluginInfo.PortTips.push_back("Input");
m_PluginInfo.PortTips.push_back("Output");
}

EnvFollowerPlugin::~EnvFollowerPlugin()
{
}

PluginInfo &EnvFollowerPlugin::Initialise(const HostInfo *Host)
{
return SpiralPlugin::Initialise(Host);
}

SpiralGUIType *EnvFollowerPlugin::CreateGUI()
{
m_GUI = new EnvFollowerPluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void EnvFollowerPlugin::Execute()
{
float Value;
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
Value = fabs(GetInput(0,n));
if (Value>m_Value) m_Value+=(m_Attack*100);
else m_Value-=(m_Decay*100);
SetOutput(0,n,m_Value);
}
}

void EnvFollowerPlugin::StreamOut(ostream &s)
{
s<<m_Version<<" ";
s<<m_Attack<<" "<<m_Decay;
}

void EnvFollowerPlugin::StreamIn(istream &s)
{
s>>m_Version;
s>>m_Attack>>m_Decay;
}

+ 51
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h View File

@@ -0,0 +1,51 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "../SpiralPlugin.h"
#include <FL/Fl_Pixmap.H>

#ifndef EnvFollowerPLUGIN
#define EnvFollowerPLUGIN

class EnvFollowerPlugin : public SpiralPlugin
{
public:
EnvFollowerPlugin();
virtual ~EnvFollowerPlugin();
virtual PluginInfo& Initialise(const HostInfo *Host);
virtual SpiralGUIType* CreateGUI();
virtual void Execute();
virtual void StreamOut(ostream &s);
virtual void StreamIn(istream &s);
// has to be defined in the plugin
virtual void UpdateGUI() { Fl::check(); }
void SetAttack(float v) { m_Attack=v; }
float GetAttack() { return m_Attack; }
void SetDecay(float v) { m_Decay=v; }
float GetDecay() { return m_Decay; }

private:
float m_Attack;
float m_Decay;
float m_Value;
};

#endif

+ 17
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.pro View File

@@ -0,0 +1,17 @@
HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
EnvFollowerPlugin.h \
EnvFollowerPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
EnvFollowerPlugin.C \
EnvFollowerPluginGUI.C

TARGET = EnvFollowerPlugin.so

+ 73
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C View File

@@ -0,0 +1,73 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "EnvFollowerPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;

////////////////////////////////////////////

EnvFollowerPluginGUI::EnvFollowerPluginGUI(int w, int h,EnvFollowerPlugin *o,const HostInfo *Info) :
SpiralPluginGUI(w,h,o)
{
m_Plugin=o;
m_Attack = new Fl_Knob(20, 25, 40, 40, "Attack");
m_Attack->color(GUI_COLOUR);
m_Attack->type(Fl_Knob::DOTLIN);
m_Attack->labelsize(10);
m_Attack->maximum(1);
m_Attack->step(0.001);
m_Attack->value(0.5);
m_Attack->callback((Fl_Callback*)cb_Attack);
add(m_Attack);
m_Decay = new Fl_Knob(75, 25, 40, 40, "Decay");
m_Decay->color(GUI_COLOUR);
m_Decay->type(Fl_Knob::DOTLIN);
m_Decay->labelsize(10);
m_Decay->maximum(1);
m_Decay->step(0.001);
m_Decay->value(0.5);
m_Decay->callback((Fl_Callback*)cb_Decay);
add(m_Decay);
end();
}



void EnvFollowerPluginGUI::UpdateValues()
{
m_Attack->value(m_Plugin->GetAttack());
m_Decay->value(m_Plugin->GetDecay());
}
inline void EnvFollowerPluginGUI::cb_Decay_i(Fl_Knob* o, void* v)
{ m_Plugin->SetDecay(o->value()); }
void EnvFollowerPluginGUI::cb_Decay(Fl_Knob* o, void* v)
{ ((EnvFollowerPluginGUI*)(o->parent()))->cb_Decay_i(o,v);}

inline void EnvFollowerPluginGUI::cb_Attack_i(Fl_Knob* o, void* v)
{ m_Plugin->SetAttack(o->value()); }
void EnvFollowerPluginGUI::cb_Attack(Fl_Knob* o, void* v)
{ ((EnvFollowerPluginGUI*)(o->parent()))->cb_Attack_i(o,v);}

+ 54
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h View File

@@ -0,0 +1,54 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>

#include "../Widgets/Fl_Knob.H"
#include "../Widgets/Fl_DragBar.H"
#include "EnvFollowerPlugin.h"
#include "../SpiralPluginGUI.h"

#ifndef SplitterGUI
#define SplitterGUI


class EnvFollowerPluginGUI : public SpiralPluginGUI
{
public:
EnvFollowerPluginGUI(int w, int h, EnvFollowerPlugin *o,const HostInfo *Info);
virtual void UpdateValues();
virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
EnvFollowerPlugin *m_Plugin;
private:

Fl_Knob* m_Attack;
Fl_Knob* m_Decay;

//// Callbacks ////
inline void cb_Attack_i(Fl_Knob* o, void* v);
static void cb_Attack(Fl_Knob* o, void* v);
inline void cb_Decay_i(Fl_Knob* o, void* v);
static void cb_Decay(Fl_Knob* o, void* v);
};

#endif

+ 168
- 0
SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in View File

@@ -0,0 +1,168 @@
#############################################################################
# Makefile for building EnvFollowerPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: EnvFollowerPlugin
# Template: app
#############################################################################

####### Compiler, tools and options

CC = gcc
CXX = g++
CFLAGS = @CFLAGS@
CXXFLAGS= @CXXFLAGS@
INCPATH = -I/usr/X11R6/include
LINK = g++ -shared
LFLAGS =
LIBS = -L/usr/X11R6/lib -lfltk -lGL -lXext -lX11 -lm -ldl
MOC = moc
UIC =

TAR = tar -cf
GZIP = gzip -9f

INSTALL = @INSTALL@

###### Autoconf variables

prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@

####### Files

HEADERS = ../SpiralPlugin.h \
../SpiralPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../../Sample.h \
EnvFollowerPlugin.h \
EnvFollowerPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
EnvFollowerPlugin.C \
EnvFollowerPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
EnvFollowerPlugin.o \
EnvFollowerPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = EnvFollowerPlugin.so

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules


all: $(TARGET)

$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)

moc: $(SRCMOC)

tmake:
tmake EnvFollowerPlugin.pro

dist:
$(TAR) EnvFollowerPlugin.tar EnvFollowerPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) EnvFollowerPlugin.tar

clean:
-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET)
-rm -f *~ core
install:
$(INSTALL) $(TARGET) $(libdir)/SpiralPlugins

####### Sub-libraries


###### Combined headers


####### Compile

../SpiralPlugin.o: ../SpiralPlugin.C \
../SpiralPlugin.h \
../../Sample.h

../SpiralPluginGUI.o: ../SpiralPluginGUI.C \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
../SpiralPlugin.h \
../../Sample.h

../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \
../Widgets/Fl_Knob.H

../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \
../Widgets/Fl_DragBar.H

../../Sample.o: ../../Sample.C \
../../Sample.h \
../../SpiralInfo.h

EnvFollowerPlugin.o: EnvFollowerPlugin.C \
EnvFollowerPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
EnvFollowerPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
SpiralIcon.xpm

EnvFollowerPluginGUI.o: EnvFollowerPluginGUI.C \
EnvFollowerPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
EnvFollowerPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H


+ 321
- 0
SpiralSound/Plugins/EnvFollowerPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,321 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 282 2",
" c None",
". c #8B889B",
"+ c #9C99AA",
"@ c #ADAAB9",
"# c #837F94",
"$ c #7D7990",
"% c #9995A7",
"& c #67627C",
"* c #CDCBD4",
"= c #FCFCFC",
"- c #D1D0D8",
"; c #FFFFFF",
"> c #F1F1F3",
", c #848095",
"' c #2A2248",
") c #CFCED6",
"! c #68637D",
"~ c #ABA8B6",
"{ c #D5D3DB",
"] c #9490A2",
"^ c #C4C4C4",
"/ c #1D1C1D",
"( c #313134",
"_ c #EEEFEE",
": c #FBFBFB",
"< c #EFEFEF",
"[ c #7B768D",
"} c #464060",
"| c #DEDEE1",
"1 c #CBCACC",
"2 c #EEEEF1",
"3 c #79758C",
"4 c #FBFBFC",
"5 c #A2A2A2",
"6 c #000000",
"7 c #F5F6F5",
"8 c #747474",
"9 c #2A2A2B",
"0 c #403958",
"a c #7D788F",
"b c #C0BEC8",
"c c #BCBAC6",
"d c #BCBAC5",
"e c #625C79",
"f c #2B2932",
"g c #191919",
"h c #CCCCCC",
"i c #807B91",
"j c #3B3556",
"k c #F2F2F4",
"l c #929292",
"m c #0E0E0E",
"n c #BFBFBF",
"o c #111111",
"p c #100E15",
"q c #868689",
"r c #FEFDFE",
"s c #D9D7DE",
"t c #9C98AA",
"u c #FDFCFD",
"v c #DDDDDD",
"w c #575755",
"x c #5E5E5E",
"y c #C4C2CD",
"z c #423C5C",
"A c #F0F0F2",
"B c #939393",
"C c #555555",
"D c #4A4A4A",
"E c #010101",
"F c #282828",
"G c #C2C2C2",
"H c #DBDAE0",
"I c #615C78",
"J c #F6F6F7",
"K c #DADADA",
"L c #545454",
"M c #0F0F0F",
"N c #B8B8B8",
"O c #48445C",
"P c #2B2B2C",
"Q c #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0C0C0C",
"+. c #161800",
"@. c #1A1B00",
"#. c #060600",
"$. c #191A00",
"%. c #393643",
"&. c #47415F",
"*. c #9692A4",
"=. c #D9D8DE",
"-. c #F7F7F8",
";. c #918DA0",
">. c #B8B5C1",
",. c #D1D1D1",
"'. c #252525",
"). c #040400",
"!. c #141500",
"~. c #727175",
"{. c #FEFEFF",
"]. c #9D99AA",
"^. c #DBD9E0",
"/. c #E9E9E9",
"(. c #CBCBCB",
"_. c #E0E0E0",
":. c #6C6C6C",
"<. c #010200",
"[. c #292B00",
"}. c #515151",
"|. c #A6A6A7",
"1. c #827E93",
"2. c #615C77",
"3. c #EAEAED",
"4. c #DFDFE1",
"5. c #EDFF00",
"6. c #1E1D24",
"7. c #9894A7",
"8. c #B1AEBB",
"9. c #69686F",
"0. c #000001",
"a. c #615C76",
"b. c #5F5A75",
"c. c #413E4D",
"d. c #020203",
"e. c #040500",
"f. c #050500",
"g. c #1A1A1C",
"h. c #C3C1CB",
"i. c #9D9D9D",
"j. c #202020",
"k. c #383838",
"l. c #4C4C4C",
"m. c #111112",
"n. c #C9C7D0",
"o. c #F1F1F1",
"p. c #F8F8F8",
"q. c #232323",
"r. c #050408",
"s. c #AEACB9",
"t. c #FEFEFE",
"u. c #1D1D1D",
"v. c #B7B5C1",
"w. c #9390A2",
"x. c #BBBBBB",
"y. c #414141",
"z. c #030303",
"A. c #28272A",
"B. c #F4F4F6",
"C. c #605B76",
"D. c #736E86",
"E. c #D8D8D8",
"F. c #727272",
"G. c #101010",
"H. c #848486",
"I. c #CCCBD3",
"J. c #747087",
"K. c #6D6881",
"L. c #1C1C1C",
"M. c #242424",
"N. c #656566",
"O. c #F6F6F6",
"P. c #E8E6EA",
"Q. c #706B84",
"R. c #E3E1E6",
"S. c #474746",
"T. c #151515",
"U. c #C8C8C8",
"V. c #AEAEAE",
"W. c #080808",
"X. c #010100",
"Y. c #373639",
"Z. c #FDFCFE",
"`. c #ABA8B7",
" + c #F1F0F3",
".+ c #6D6980",
"++ c #0A090E",
"@+ c #95929E",
"#+ c #0A0810",
"$+ c #0D0D0D",
"%+ c #050505",
"&+ c #5B5A5C",
"*+ c #F7F6F7",
"=+ c #F4F3F5",
"-+ c #908C9F",
";+ c #C8C6D0",
">+ c #837E96",
",+ c #86868A",
"'+ c #070608",
")+ c #ECEBEE",
"!+ c #5B5571",
"~+ c #646078",
"{+ c #AFAFB0",
"]+ c #454545",
"^+ c #363636",
"/+ c #7A7A7A",
"(+ c #C8C8C9",
"_+ c #212025",
":+ c #060607",
"<+ c #969699",
"[+ c #FAFAFA",
"}+ c #F8F8F9",
"|+ c #A29EAF",
"1+ c #F7F6F8",
"2+ c #F0F0F1",
"3+ c #B8B7B9",
"4+ c #E4E4E4",
"5+ c #FDFDFD",
"6+ c #A5A2B2",
"7+ c #3B3456",
"8+ c #A8A5B4",
"9+ c #525252",
"0+ c #848387",
"a+ c #CDCDCD",
"b+ c #8D899C",
"c+ c #494262",
"d+ c #68627C",
"e+ c #40395A",
"f+ c #ECECEC",
"g+ c #020202",
"h+ c #B4B5B5",
"i+ c #0B0B0B",
"j+ c #313232",
"k+ c #E3E3E3",
"l+ c #B1AEBC",
"m+ c #BDBBC6",
"n+ c #3C3556",
"o+ c #898599",
"p+ c #EDEDED",
"q+ c #39393A",
"r+ c #040404",
"s+ c #333333",
"t+ c #F5F5F5",
"u+ c #2B2B2B",
"v+ c #2D2A3D",
"w+ c #B6B4C1",
"x+ c #F5F5F6",
"y+ c #605A76",
"z+ c #DAD8DF",
"A+ c #F5F4F6",
"B+ c #615B76",
"C+ c #524D6A",
"D+ c #E4E3E8",
"E+ c #D5D5D5",
"F+ c #1B1B1B",
"G+ c #303030",
"H+ c #AAABAB",
"I+ c #585464",
"J+ c #B0AEBB",
"K+ c #A29FAF",
"L+ c #E9E8E9",
"M+ c #787779",
"N+ c #0F0E15",
"O+ c #2D2D2E",
"P+ c #595959",
"Q+ c #FAFAFB",
"R+ c #807B92",
"S+ c #B0ADBB",
"T+ c #E8E7EB",
"U+ c #3A3258",
"V+ c #E6E5EA",
"W+ c #DFDEE3",
"X+ c #443E5E",
"Y+ c #BAB8C4",
"Z+ c #C1BFCA",
"`+ c #E0E0E5",
" @ c #D0CED6",
".@ c #362F52",
"+@ c #CECCD5",
"@@ c #413A5B",
"#@ c #6A657F",
"$@ c #9793A6",
" ",
" ",
" ",
" . + @ # $ % ",
" & * = * - ; > , ' ; ; ; ) ! ",
" ~ ; ; { ] ; ^ / ( _ ; : < [ ",
" } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ",
" c : d e f g h i j k l 6 m ; n o 6 p q r s ",
" t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ",
" I J ; ; K L 6 6 M N O P E 6 6 6 Q Q M R S T U V W ",
" X Y ; ; ; ; Z ` .6 ..6 6 6 6 6 +.@.#.$.%.&.*.=.-.;. ",
" >.; ; ; ; ; ; = ,.'.6 6 ).6 6 !.).6 6 6 E ~.{.; ; ]. ",
" ^.; ; /.R h (._.:.6 6 6 <.6 6 6 6 6 [.6 6 E }.|.4 1. ",
" 2.3.; 4...6 6 6 6 6 6 6 5.5.5.6 6 6 6 6 6 6 6 6 6.7. ",
" V @ 8.9.0.6 6 6 6 6 5.5.6 <.6 5.5.6 6 6 6 6 6 6 ",
" a.b.c.6 d.6 6 6 6 6 e.6 5.6 6 6 5.5.5.f.6 6 6 g. ",
" h.; ; i.j.j.k.l.j.6 6 6 5.6 5.6 6 6 6 6 5.5.5.6 m. ",
" n.; ; o.p.; ; ; q.6 6 5.6 6 6 5.6 6 6 6 6 6 6 6 r. ",
" s.; ; ; ; t.; ; u.6 6 5.6 6 6 5.6 6 6 6 5.5.5.6 6 v., ",
" w.; ; t.; : x.y.z.6 5.6 6 6 6 6 5.6 5.5.6 6 6 6 A.t.B.C. ",
" D.; ; ; E.F.G.6 6 6 6 6 6 6 6 6 6 5.5.6 6 6 6 6 H.; ; I.J. ",
" K.J ; : L.6 6 6 6 M...6 6 6 6 6 6 6 6 6 6 6 6 6 N.O.; ; P.Q. ",
" R.; ; S.6 E 6 T.U.V.W.6 6 6 6 6 6 6 6 X.6 6 6 6 Y.Z.; ; > Q. ",
" `.; +.+++6 6 V.t.; @+#+6 6 6 6 6 6 6 6 $+%+6 6 6 &+*+; ; =+-+ ",
" Q.;+! >+,+'+x ; ; )+!+~+{+l ]+6 6 6 ^+/+(+_+6 6 6 :+<+[+; ; }+@ ",
" |+1+2+3+4+5+; 6+7+8+; O.]+6 6 E 9+; ; 0+6 6 E 6 o a+; ; = b+ ",
" c+> ; ; ; ; ; ; d+e+; ; f+k.6 6 g+D ; ; h+i+6 6 6 j+k+; ; l+ ",
" > ; ; ; ; m+n+o+; ; p+q+6 6 r+s+; ; t+u+6 6 v+w+; x+3 ",
" y+z+= ; A+B+C+D+; ; E+F+6 6 g+G+; ; ; H+9+I+ ",
" J+4 K+ X ; ; ; L+M+G+N+O+P+; ; ; t.Q+R+ ",
" S+; ; ; ; ; T+U+V+; ; ; ; = W+X+ ",
" Y+Z+`+4 ; ; @.@+@; ; ; s o+T ",
" @@ #@$@o+ ",
" ",
" ",
" "};

+ 188
- 0
SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C View File

@@ -0,0 +1,188 @@
/* SpiralSound
* Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "EnvelopePlugin.h"
#include "EnvelopePluginGUI.h"
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

extern "C" {
SpiralPlugin* CreateInstance()
{
return new EnvelopePlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 0x0005;
}
}

///////////////////////////////////////////////////////

EnvelopePlugin::EnvelopePlugin() :
m_Trigger(false),
m_t(-1.0f),
m_Attack(0.0f),
m_Decay(0.5f),
m_Sustain(1.0f),
m_Release(1.0f),
m_Volume(0.5f),
m_TrigThresh(0.01)
{
m_PluginInfo.Name="Envelope";
m_PluginInfo.Width=142;
m_PluginInfo.Height=110;
m_PluginInfo.NumInputs=2;
m_PluginInfo.NumOutputs=2;
m_PluginInfo.PortTips.push_back("Trigger CV");
m_PluginInfo.PortTips.push_back("Input");
m_PluginInfo.PortTips.push_back("CV");
m_PluginInfo.PortTips.push_back("Output");
}

EnvelopePlugin::~EnvelopePlugin()
{
}

PluginInfo &EnvelopePlugin::Initialise(const HostInfo *Host)
{
PluginInfo& Info = SpiralPlugin::Initialise(Host);
m_SampleTime=1.0/(float)(m_HostInfo->SAMPLERATE);
return Info;
}

SpiralGUIType *EnvelopePlugin::CreateGUI()
{
m_GUI = new EnvelopePluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,m_HostInfo);
m_GUI->hide();
return m_GUI;
}

void EnvelopePlugin::Execute()
{
float temp=0;
bool Freeze=false;
// Early out?
/*if (m_t<0 && (!m_Input[0] || m_Input[0]->IsEmpty()))
{
m_Output[0]->Zero();
m_Output[1]->Zero();
return;
}*/
for (int n=0; n<m_HostInfo->BUFSIZE; n++)
{
// Check the trigger CV values
if (GetInput(0,n)>m_TrigThresh)
{
if (m_Trigger==false)
{
m_t=0.0f;
m_Trigger=true;
}
}
else
{
m_Trigger=false;
}
// if we are in the envelope...
if (m_t>=0 && m_t<m_Attack+m_Decay+m_Release)
{
// find out what part of the envelope we are in
// in the attack
if (m_t<m_Attack)
{
// get normalised position to
// get the volume between 0 and 1
temp=m_t/m_Attack;
}
else
// in the decay
if (m_t<m_Attack+m_Decay)
{
//if (n==0) cerr<<"in decay"<<endl;
// normalised position in m_Attack->m_Decay range
float nt=(m_t-m_Attack)/m_Decay;
// volume between 1 and m_Sustain
temp=(1-nt)+(m_Sustain*nt);
}
else
// in the release
{
//if (n==0) cerr<<"in release"<<endl;
// normalised position in m_Decay->m_Release range
float nt=(m_t-(m_Attack+m_Decay))/m_Release;
// volume between m_Sustain and 0
temp=m_Sustain*(1-nt);
if (m_Release<0.2f)
{
temp=m_Sustain;
}
if (m_Trigger) Freeze=true;
}
temp*=m_Volume;
SetOutput(0,n,temp);
SetOutput(1,n,GetInput(1,n)*temp);
if (!Freeze) m_t+=m_SampleTime;
}
else
{
SetOutput(0,n,0);
SetOutput(1,n,0);
// if we've run off the end
if (m_t>m_Attack+m_Decay+m_Release)
{
m_t=-1;
//m_Output[0]->Zero();
//m_Output[1]->Zero();
return;
}

}
}
}

void EnvelopePlugin::StreamOut(ostream &s)
{
s<<m_Version<<" "<<m_Attack<<" "<<m_Decay<<" "<<m_Sustain<<" "<<
m_Release<<" "<<m_Volume<<" "<<m_TrigThresh;
}

void EnvelopePlugin::StreamIn(istream &s)
{
int version;
s>>version;
s>>m_Attack>>m_Decay>>m_Sustain>>m_Release>>m_Volume>>m_TrigThresh;
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save