ZynAddSubFX: imported current head

Imported current head of LMMS-specific ZynAddSubFX source code.

HEAD: c920930cce09b4f691f585d93a19eac85672e50e
This commit is contained in:
Tobias Doerffel
2014-05-12 19:17:51 +02:00
parent 66c2d620ef
commit e4beaf0074
274 changed files with 55921 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
*.o
*~
src/zynaddsubfx
src/Tests/runner
src/Tests/runner.cpp
CMakeCache.txt
CMakeFiles
build

View File

@@ -0,0 +1,3 @@
[submodule "instruments"]
path = instruments
url = git://git.code.sf.net/p/zynaddsubfx/instruments

View File

@@ -0,0 +1,31 @@
Main author:
Nasca Octavian Paul
Developers:
Mark McCurry
Harald Hvaal
Contributors:
Gerald Folcher (legato, mono notes memory)
Lars Luthman (zombie fix,jack midi, LASH support)
Daniel Clemente (with a workaround of X11 repeated key bug)
Emmanuel Saracco (fix for JACK output)
Achim Settelmeier (QUERTZ keyboard layout for virtual keyboard)
J<>r<EFBFBD>mie Andr<64>i (AZERTY keyboard layout, Array index fix, OSS failsafe)
Alexis Ballier (const char* <-> string mismatch, NULLMidi prototype fix)
Tobias Doerffel (static-instance variables fix, missing include fix)
James Morris (Memory leaks in FLTK GUI)
Alan Calvert (Portions of New IO)
Stephen Parry (DSSI rebuild)
Ryan Billing (APhaser)
Hans Petter Selasky (OSS Midi, FreeBSD support, Bank UI bug fix)
Damien Goutte-Gattat (Bank select midi support)
Lieven Moors (Spike/Circle waveform)
Olaf Schulz (MIDI Aftertouch support)
Jonathan Liles (NSM & NTK support)
Johannes Lorenz (Effect Documentation)
Ilario Glasgo (Italian Doc Translation)
Christopher Oliver (Unison + presets fix, mousewheel support)
Filipe Coelho (Globals Cleanup)
Andre Sklenar (UI Pixmaps)

View File

@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
project(zynaddsubfx)
set(VERSION "2.4.3")
enable_testing()
include(CTestConfig.cmake)
#Currently the only directory that uses cmake
add_subdirectory(src)
install(FILES AUTHORS.txt COPYING FAQ.txt HISTORY.txt README.txt
DESTINATION share/doc/zynaddsubfx
)
install(FILES zynaddsubfx-jack.desktop zynaddsubfx-alsa.desktop
DESTINATION share/applications)
install(FILES zynaddsubfx.svg
DESTINATION share/pixmaps)
install(DIRECTORY instruments/banks
DESTINATION share/zynaddsubfx)
install(DIRECTORY instruments/examples
DESTINATION share/zynaddsubfx)

View File

@@ -0,0 +1,347 @@
NOTE! The GPL below is copyrighted by the Free Software Foundation, but
the instance of code that it refers to (the ZynAddSubFX application)
is copyrighted by the authors (Nasca Octavian Paul and others) who actually wrote it.
---------------------------------------------------------------------------
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
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) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 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) year 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.

View File

@@ -0,0 +1,13 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "ZynAddSubFX")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "fundamental-code.com")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ZynAddSubFX")
set(CTEST_DROP_SITE_CDASH TRUE)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,84 @@
#include "Controller.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
pthread_mutex_t mutex;
int Pexitprogram;
Controller::Controller() {
//init
for(int i = 0; i < 6; ++i) {
pars[i].mode = 1;
pars[i].val1 = 0;
pars[i].val2 = 127;
pars[i].nrpn.cpar = 8;
pars[i].nrpn.fpar = 0;
pars[i].nrpn.cval = 0;
}
pars[0].ctl.par = 71;
pars[1].ctl.par = 74;
pars[2].ctl.par = 10;
pars[3].ctl.par = 11;
pars[4].ctl.par = 1;
pars[5].ctl.par = 75;
//ALSA init
snd_seq_open(&midi_out, "default", SND_SEQ_OPEN_OUTPUT, 0);
char portname[50]; sprintf(portname, "Controller");
int alsaport = snd_seq_create_simple_port(
midi_out,
portname,
SND_SEQ_PORT_CAP_READ
| SND_SEQ_PORT_CAP_SUBS_READ,
SND_SEQ_PORT_TYPE_SYNTH);
}
Controller::~Controller() {
snd_seq_close(midi_out);
}
void Controller::sendcontroller(int par, unsigned char val) {
snd_seq_event_t midievent;
snd_seq_ev_clear(&midievent);
snd_seq_ev_set_controller(&midievent, Pchout, par, val);
snd_seq_ev_set_subs(&midievent);
snd_seq_ev_set_direct(&midievent);
snd_seq_event_output_direct(midi_out, &midievent);
// fprintf(stderr,"Controller: %d %d\n",par,val);
}
void Controller::sendnrpn(int npar, unsigned char val) {
// fprintf(stderr,"NRPN: %d %d %d %d\n",pars[npar].nrpn.cpar,pars[npar].nrpn.fpar,pars[npar].nrpn.cval,val);
sendcontroller(0x63, pars[npar].nrpn.cpar);
sendcontroller(0x62, pars[npar].nrpn.fpar);
sendcontroller(0x06, pars[npar].nrpn.cval);
sendcontroller(0x26, val);
// fprintf(stderr,"------------\n\n");
}
void Controller::send(int npar, float xval) {
if(pars[npar].mode == 0)
return;
int val;
if(pars[npar].val1 <= pars[npar].val2)
val =
(int) (xval
* (pars[npar].val2 - pars[npar].val1
+ 1.0) * 0.9999 + pars[npar].val1);
else
val =
(int) (xval
* (pars[npar].val2 - pars[npar].val1
- 1.0) * 0.9999 + pars[npar].val1 + 1.0);
switch(pars[npar].mode) {
case 1: sendcontroller(pars[npar].ctl.par, val); break;
//case 2:break;
case 3: sendnrpn(npar, val); break;
}
}

View File

@@ -0,0 +1,33 @@
#ifndef CONTROLLER_H
#define CONTROLLER_H
#include <alsa/asoundlib.h>
extern pthread_mutex_t mutex;
extern int Pexitprogram;
class Controller
{
public:
Controller();
~Controller();
void send(int npar, float xval);
//parameters
unsigned char Pchout;
struct {
unsigned char mode; //0=off,1=ctl,2=RPN,3=NRPN
unsigned char val1, val2;
struct {
unsigned char par;
} ctl;
struct {
unsigned char cpar, fpar, cval;
} nrpn;
} pars[6];
private:
void sendcontroller(int par, unsigned char val);
void sendnrpn(int npar, unsigned char val);
snd_seq_t *midi_out;
};
#endif

View File

@@ -0,0 +1,217 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0110
header_name {.h}
code_name {.cxx}
decl {\#include <FL/Fl_Box.H>} {selected public
}
decl {\#include <stdlib.h>} {public
}
decl {\#include "Controller.h"} {public
}
decl {Controller *controller;} {}
class Pad {: {public Fl_Box}
} {
Function {Pad(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} {
code {} {}
}
Function {temp_draw()} {} {
code {/*int ox=x(),oy=y(),lx=w(),ly=h(),i,ix,iy,oiy;
float freqx;
fl_color(FL_BLACK);
fl_rectf(ox,oy,lx,ly);
fl_color(FL_GRAY);
fl_line_style(FL_SOLID);
fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2);
*/} {}
}
Function {sendmidi(int button,float datax,float datay)} {} {
code {controller->send(button,datax);
controller->send(button+1,datay);} {}
}
Function {handle(int event)} {return_type int
} {
code {int x_=Fl::event_x()-x();
int y_=Fl::event_y()-y();
if ((event==FL_PUSH)||(event==FL_DRAG)){
if (x_<0) x_=0;if (y_<0) y_=0;
if (x_>=w()) x_=w();if (y_>=h()-1) y_=h()-1;
float tmpx=(float) x_/(w());
float tmpy=1.0-(float) y_/h();
int b=Fl::event_buttons()>>24;
if (b&1) sendmidi(0,tmpx,tmpy);
if (b&2) sendmidi(2,tmpx,tmpy);
if (b&4) sendmidi(4,tmpx,tmpy);
};
return(1);} {}
}
decl {int oldx,oldy;} {}
}
class ControllerUI {} {
Function {make_window()} {} {
Fl_Window controlleruiwindow {
label {Midi Controller}
callback {o->hide();
exit(0);}
xywh {210 213 340 410} type Double hide
} {
Fl_Counter {} {
label {Output Channel}
callback {controller->Pchout=(int) o->value();}
xywh {10 13 75 22} type Simple labelsize 10 align 5 minimum 0 maximum 15 step 1 textfont 1
code0 {o->value(controller->Pchout);}
}
Fl_Box {} {
xywh {10 80 320 320} box ENGRAVED_BOX color 176
class Pad
}
Fl_Choice {} {
callback {nbut=(int) o->value();
refreshvalues();}
xywh {10 50 75 20} down_box BORDER_BOX
} {
MenuItem {} {
label {But.1 X}
xywh {0 0 100 20} labelfont 1 labelsize 12
}
MenuItem {} {
label {But.1 Y}
xywh {10 10 100 20} labelfont 1 labelsize 12 divider
}
MenuItem {} {
label {But.2 X}
xywh {10 10 100 20} labelfont 1 labelsize 12
}
MenuItem {} {
label {But.2 Y}
xywh {20 20 100 20} labelfont 1 labelsize 12 divider
}
MenuItem {} {
label {But.3 X}
xywh {20 20 100 20} labelfont 1 labelsize 12
}
MenuItem {} {
label {But.3 Y}
xywh {30 30 100 20} labelfont 1 labelsize 12
}
}
Fl_Group ctlgroup {
xywh {95 35 60 40} box ENGRAVED_BOX
} {
Fl_Counter ctlcounter {
label Controller
callback {controller->pars[nbut].ctl.par=(int) o->value();}
xywh {100 50 50 15} type Simple labelsize 10 align 1 minimum 0 maximum 127 step 1 textfont 1 textsize 12
}
}
Fl_Choice modechoice {
label Mode
callback {controller->pars[nbut].mode=(int) o->value();
refreshvalues();}
xywh {95 13 60 20} down_box BORDER_BOX labelsize 10 align 5
} {
MenuItem {} {
label OFF
xywh {30 30 100 20} labelfont 1 labelsize 12
}
MenuItem {} {
label {Ctl.}
xywh {20 20 100 20} labelfont 1 labelsize 12
}
MenuItem {} {
label RPN
xywh {30 30 100 20} labelfont 1 labelsize 12 deactivate
}
MenuItem {} {
label NRPN
xywh {40 40 100 20} labelfont 1 labelsize 12
}
}
Fl_Group nrpngroup {
xywh {160 35 170 40} box ENGRAVED_BOX
} {
Fl_Counter cparcounter {
label {CoarseP.}
callback {controller->pars[nbut].nrpn.cpar=(int) o->value();}
xywh {165 50 50 15} type Simple labelsize 10 align 1 minimum 0 maximum 127 step 1 textfont 1 textsize 12
}
Fl_Counter fparcounter {
label {FineP.}
callback {controller->pars[nbut].nrpn.fpar=(int) o->value();}
xywh {220 50 50 15} type Simple labelsize 10 align 1 minimum 0 maximum 127 step 1 textfont 1 textsize 12
}
Fl_Counter cvalcounter {
label {CoarseV.}
callback {controller->pars[nbut].nrpn.cval=(int) o->value();}
xywh {275 50 50 15} type Simple labelsize 10 align 1 minimum 0 maximum 127 step 1 textfont 1 textsize 12
}
}
Fl_Counter val1counter {
label {Val.1}
callback {controller->pars[nbut].val1=(int) o->value();}
xywh {190 15 50 15} type Simple labelsize 10 align 5 minimum 0 maximum 127 step 1 textfont 1 textsize 12
}
Fl_Counter val2counter {
label {Val.2}
callback {controller->pars[nbut].val2=(int) o->value();}
xywh {275 15 50 15} type Simple labelsize 10 align 5 minimum 0 maximum 127 step 1 value 127 textfont 1 textsize 12
}
Fl_Button exchangebutton {
label {<->}
callback {unsigned char tmp=controller->pars[nbut].val2;
controller->pars[nbut].val2=controller->pars[nbut].val1;
controller->pars[nbut].val1=tmp;
refreshvalues();}
xywh {245 15 25 15} box THIN_UP_BOX
}
}
}
Function {refreshvalues()} {} {
code {modechoice->value(controller->pars[nbut].mode);
val1counter->value(controller->pars[nbut].val1);
val2counter->value(controller->pars[nbut].val2);
ctlcounter->value(controller->pars[nbut].ctl.par);
cparcounter->value(controller->pars[nbut].nrpn.cpar);
fparcounter->value(controller->pars[nbut].nrpn.fpar);
cvalcounter->value(controller->pars[nbut].nrpn.cval);
if (controller->pars[nbut].mode!=0){
val1counter->activate();
val2counter->activate();
exchangebutton->activate();
}else{
val1counter->deactivate();
val2counter->deactivate();
exchangebutton->deactivate();
};
if (controller->pars[nbut].mode==1) ctlgroup->activate();
else ctlgroup->deactivate();
if (controller->pars[nbut].mode==3) nrpngroup->activate();
else nrpngroup->deactivate();} {}
}
Function {ControllerUI(Controller *controller_)} {} {
code {nbut=0;
controller=controller_;
make_window();
refreshvalues();
controlleruiwindow->show();} {}
}
decl {int nbut;} {}
}

View File

@@ -0,0 +1,16 @@
#include "Controller.h"
#include "ControllerUI.h"
pthread_t thr1, thr2;
Controller controller;
main()
{
ControllerUI *controllerUI = new ControllerUI(&controller);
Fl::run();
delete controllerUI;
};

View File

@@ -0,0 +1,82 @@
//Copyright (c) 2002-2003 Nasca Octavian Paul
//License: GNU GPL 2
#include "Spliter.h"
#include <stdio.h>
pthread_mutex_t mutex;
int Pexitprogram;
Spliter::Spliter() {
//init
Psplitpoint = 60;
Pchin = 0;
Pchout1 = 0;
Pchout2 = 1;
Poct1 = 0;
Poct2 = 0;
//ALSA init
snd_seq_open(&midi_in, "default", SND_SEQ_OPEN_INPUT, 0);
snd_seq_open(&midi_out, "default", SND_SEQ_OPEN_OUTPUT, 0);
char portname[50]; sprintf(portname, "Spliter IN");
int alsaport = snd_seq_create_simple_port(
midi_in,
portname,
SND_SEQ_PORT_CAP_WRITE
| SND_SEQ_PORT_CAP_SUBS_WRITE,
SND_SEQ_PORT_TYPE_SYNTH);
sprintf(portname, "Spliter OUT");
alsaport = snd_seq_create_simple_port(
midi_out,
portname,
SND_SEQ_PORT_CAP_READ
| SND_SEQ_PORT_CAP_SUBS_READ,
SND_SEQ_PORT_TYPE_SYNTH);
}
Spliter::~Spliter() {
snd_seq_close(midi_in);
snd_seq_close(midi_out);
}
// This splits the Midi events from one channel to another two channels
void Spliter::midievents() {
snd_seq_event_t *midievent;
midievent = NULL;
snd_seq_event_input(midi_in, &midievent);
if(midievent == NULL)
return;
if((midievent->type == SND_SEQ_EVENT_NOTEON)
|| (midievent->type == SND_SEQ_EVENT_NOTEOFF)) {
int cmdchan = midievent->data.note.channel;
if(cmdchan == Pchin) {
snd_seq_ev_set_subs(midievent);
snd_seq_ev_set_direct(midievent);
if(midievent->data.note.note < Psplitpoint) {
midievent->data.note.channel = Pchout1;
int tmp = midievent->data.note.note;
tmp += Poct1 * 12; if(tmp > 127)
tmp = 127; if(tmp < 0)
tmp = 0;
midievent->data.note.note = tmp;
}
else {
midievent->data.note.channel = Pchout2;
int tmp = midievent->data.note.note;
tmp += Poct2 * 12; if(tmp > 127)
tmp = 127; if(tmp < 0)
tmp = 0;
midievent->data.note.note = tmp;
}
snd_seq_event_output_direct(midi_out, midievent);
}
else {
snd_seq_ev_set_subs(midievent);
snd_seq_ev_set_direct(midievent);
snd_seq_event_output_direct(midi_out, midievent);
}
}
snd_seq_free_event(midievent);
}

View File

@@ -0,0 +1,27 @@
//Copyright (c) 2002-2003 Nasca Octavian Paul
//License: GNU GPL 2
#ifndef SPLITER_H
#define SPLITER_H
#include <pthread.h>
#include <alsa/asoundlib.h>
extern pthread_mutex_t mutex;
extern int Pexitprogram;
class Spliter
{
public:
Spliter();
~Spliter();
void midievents();
//parameters
unsigned char Psplitpoint;
unsigned char Pchin, Pchout1, Pchout2;
signed char Poct1, Poct2;
private:
snd_seq_t *midi_in, *midi_out;
};
#endif

View File

@@ -0,0 +1,70 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0102
header_name {.h}
code_name {.cxx}
decl {//Copyright (c) 2002-2003 Nasca Octavian Paul} {selected
}
decl {//License: GNU GPL 2} {}
decl {\#include <stdlib.h>} {public
}
decl {\#include "Spliter.h"} {public
}
class SpliterUI {} {
Function {make_window()} {open
} {
Fl_Window spliteruiwindow {
label {Midi Spliter}
callback {o->hide();
exit(0);}
xywh {225 187 375 72} hide
} {
Fl_Counter {} {
label {Split note}
callback {spliter->Psplitpoint=(int) o->value();}
xywh {93 27 114 24} labelsize 12 align 5 minimum 0 maximum 127 step 1 value 60 textfont 1 textsize 16
code0 {o->value(spliter->Psplitpoint);}
code1 {o->lstep(12);}
}
Fl_Counter {} {
label {Input Channel}
callback {spliter->Pchin=(int) o->value();}
xywh {6 30 69 18} type Simple labelsize 10 align 5 minimum 0 maximum 15 step 1 textfont 1
code0 {o->value(spliter->Pchin);}
}
Fl_Counter {} {
label {Output Channel 1}
callback {spliter->Pchout1=(int) o->value();}
xywh {285 18 69 18} type Simple labelsize 10 align 5 minimum 0 maximum 15 step 1 textfont 1
code0 {o->value(spliter->Pchout1);}
}
Fl_Counter {} {
label {Output Channel 2}
callback {spliter->Pchout2=(int) o->value();}
xywh {285 36 69 18} type Simple labelsize 10 align 6 minimum 0 maximum 15 step 1 textfont 1
code0 {o->value(spliter->Pchout2);}
}
Fl_Counter {} {
label {Tr.1(oct.)}
callback {spliter->Poct1=(int) o->value();}
tooltip {Transpose (octaves)} xywh {225 18 48 18} type Simple labelsize 10 align 5 minimum -8 maximum 8 step 1 textfont 1
code0 {o->value(spliter->Poct1);}
}
Fl_Counter {} {
label {Tr.2(oct.)}
callback {spliter->Poct2=(int) o->value();}
tooltip {Transpose (octaves)} xywh {225 36 48 18} type Simple labelsize 10 align 6 minimum -8 maximum 8 step 1 textfont 1
code0 {o->value(spliter->Poct2);}
}
}
}
Function {SpliterUI(Spliter *spliter_)} {} {
code {spliter=spliter_;
make_window();
spliteruiwindow->show();} {}
}
decl {Spliter *spliter;} {}
}

View File

@@ -0,0 +1,37 @@
//Copyright (c) 2002-2003 Nasca Octavian Paul
//License: GNU GPL 2
#include <pthread.h>
#include "Spliter.h"
#include "SpliterUI.h"
pthread_t thr1, thr2;
Spliter spliter;
void *thread1(void *arg) {
Fl::run();
return 0;
}
void *thread2(void *arg) {
while(Pexitprogram == 0)
spliter.midievents();
return 0;
}
main()
{
Pexitprogram = 0;
SpliterUI *spliterUI = new SpliterUI(&spliter);
pthread_mutex_init(&mutex, NULL);
pthread_create(&thr1, NULL, thread1, NULL);
pthread_create(&thr2, NULL, thread2, NULL);
while(Pexitprogram == 0) {
usleep(100000);
}
pthread_mutex_destroy(&mutex);
delete spliterUI;
};

View File

@@ -0,0 +1,15 @@
Spliter
------
This program splits the keyboard and alows you to play two instruments same time. You can use this program with ZynAddSubFX or any other synthesizer.
This requires ALSA 0.9.x.
To compile it, run "make".
If you want to use with ZynAddSubFX send the midi events thru Spliter with aconnect like this:
- connect the keyboard port to "Spliter IN" port
- connect the "Spliter OUT" to ZynAddSubFX
- change the midi channels that you want to play. Be sure that the both output channels are enabled and receive NoteOn in ZynAddSubFX.
If you change some settings from Spliter while you are playing to keyboard you may ecounter "stucked keys". To clear all theese press to "Panic" button from ZynAddSubFX.

View File

@@ -0,0 +1,2 @@
These are external programs, which can use with ZynAddSubFX or any other midi device. More information is in the documentation (html - webpages).

View File

@@ -0,0 +1,27 @@
Frequently Asked Questions
--------------------------
Q1) What means "ZynAddSubFX" ?
A1) The name of the program comes from 4 words:
1) Synthesizer ('S'->'Z') --> Zyn
^^^
2) Additive Synthesis ------> Add
^^^
3) Subtractive Synthesis ---> Sub
^^^
4) Effects ----------------> FX
So, ZynAddSubFX is a SYNthesizer with ADDitive, SUBtractive engines and effects.
Q2) How can I load files from older versions of ZynAddSubFX (like *.mas_zyn,etc)
A2) You need to convert them into new format. Please use 2.0.0pre1 or (recommended) 2.0.0pre2 versions of ZynAddSubFX to load old file formants and save them in the new formats
Q3) How can I change the number of parts, voices to ADSynth, effects, etc. ?
A3) Look in src/globals.h and change there these values. You don't have to change anything else, just recompile all. But most settings must be below 128. As the rule of the thumb if a setting is 128 or below 128, please don't make it bigger than 128. Anyway, I don't believe that you'll need more than 128 for these settings; for example you don't need 128(or more) effects same time? That's why I put the limit of 128 (using 7 bits of char).
Q4) How do I enable Jack support on ZynAddSubFX ?
A4) If your system has the jack libraries installed, ZynAddSubFX should automatically build with jack support. It is highly recommended that the Jack samplerate to be equal to ZynAddSubFX samplerate (SAMPLE_RATE from globals.h), otherwise the resampling will be done and this will decrease the quality a bit.

View File

@@ -0,0 +1,222 @@
2.4.3 (15 Jun 2012)
- Non-session manager support
- Midi aftertouch support
- Documentation additions
- Somewhat more sane Nio defaults
- Misc bug fixes
2.4.2 (26 Feb 2012)
- New IO backend support
- MIDI bank select
- Spike/Circle waveform
- Faster subsynth
- --exec-after-init flag
- Version information compiled in
- Misc Bug fixes
2.4.1 (27 Jun 2010)
- Azerty layout
- XML bug fixes
- Vibrato/Unison additions
- Reverb rewrite
- DSSI support enabled
- Adding APhaser
- other bugfixes
- code cleanup
2.4.0 (21 Jun 2009)
- extended mono functionality
- legato mode
- export functionality on PADsynth
- inclusion of LASH client
- inclusion of DSSI audio output
- enabled tooltips for knobs (both description and value tooltips)
- added support for newer JACK api
- added quertz support for virtual keyboard
- started to encorperate cxxtest for unit testing
- many bugfixes
- code cleanup
2.2.1 (28 Apr 2005)
- made to work with mxml-2.2 (will NOT work on older versions)
- it is possible to remove completely the graphical user interface (e.g. it can run without X). For this you need to modify the DISABLE_GUI option from the Makefile.inc
- added a commandline -L which load a instrument (.xiz) - now it only loads to part 0 (you can use this option with -l to load a master file and after this the option -L to replace the part)
2.2.0 (8 Apr 2005)
- the VST version of ZynAddSubFX is removed from the instalation until it will be more stable (hope soon :) )
- now, the instrument banks contains over 300 high quality instruments
- added "Apply" a button from OscilGen window for PADsynth
- added another parameter to ADsynth that controls the amount of all detunes of voices
- adaptive harmonics postprocess
- improved the VU-meter and added a RMS plot
- Dvorak support for Virtual Keyboard
- many bugs fixed and code cleanups
2.1.1 (2 Oct 2004)
- Removed a big bug that prevented changing the part
2.1.0 (1 Oct 2004)
- Added a installer for windows (thanks to NSIS installer ( http://nsis.sourceforge.net/ ) ). Both VST and standalone vesions are contained in the same installer.
- Added a new user interface for beginners. You can switch the current user interface with that anytime do you want.
- All parts, effects, etc. are counted from '1' and not from '0'
- Added the posibility to compile the OSS and JACK support in the same binary (look in the Makefile.inc)
- VST host should be able to save all zynaddsubfx parameters into their setups (this is untested)
- Bugfixes and other
2.0.0 (27 Aug 2004)
- VST version works (there are some issues/bugs but it works)
- Added a advanced Clipboard and Preset module - now is possible to add user preset LFOs,Envelopes, Effects, Oscillators, Resonances, Filters, etc.
- Completely removed the *.MAS_ZYN formats (masters, instruments,etc) support; use 2.0.0pre1 and 2.0.0pre2 to convert
- Corrected a error to pitch bend on VST plugin (thanks to Krzysztof Korpiela)
- Impoved the PADsynth module
- Because the PADsynth module takes a time to load, the instrument that contains such modules are shown in different colors
- Bugfixes
- Other
2.0.0_pre2 (31 Iul 2004)
- Updated the XMLwrapper to mxml-2.0
- Many bugfixes
- Other
2.0.0_pre1 (17 Iul 2004)
- Added a new powerful synth engine which is called PADsynth, you can make very beautifull pads and even some strange sounds
- Now is used the XML format for all zynaddsubfx parameters(.XMZ for master parameters, .XIZ for instrument parameters and .XSZ for scale parameters).You can import older parameters. All parameters files are compressed with gzip algorithm.
- Some parameters has changed and you might ecounter different sounds that you saved in the older versions of zynaddsubfx
- The instrument banks are no longer single files, but directories that contains instrument .XIZ files (you can organize them even with a file manager). Also, you can use more than 1 banks easily.
- Added a new effect called DynamicFilter that allows you to do WahWah,AutoWah, VocalMorpher and other effects
- Speedups
- Started to write a small sequencer that allows to load and play a midi file from zynaddsubfx (unfinished)
- ZynAddSubFX is available from CVS, too. Please look at the sourceforge project page to get more information ( http://sourceforge.net/projects/zynaddsubfx )
- The waveform generator (OscilGen) has many new parameters :) also if you press the "Shift" key, you can draw the hamonics amplitude/phases
- Many user interface improvements
- You can load a file at the start of the program with "-l" command-line parameter and you can run zynaddsubfx w/o user interface with "-U"
- It is possible to dump all MIDI notes into a text file
- The instruments can contain comments and copyright information in order to encourage sharing of them
- FFT3W library is supported
- More "randomness" options
- Other impovements
- Many, many bugfixes
- Added the full changelog (since I started to write zynaddsubfx), most is in Romanian
- Other things
1.4.3 (31 Aug 2003)
- added state variable filters and other types to analog filters
- small user interface improvememnts
- small bugfixes
1.4.2 (17 Iul 2003)
- added full-featured, advanced formantic filters
- added mixer panel which lets you to see/change most important part settings, and shows a vu-meters for each part
- you can choose to process the instrument's kit items only with one Part effect (eg. you can make a instrument kit that contains a reverberated piano and flanged strings)
- enabled to launch more instances in Jack
- when is launched first time, it searches for default.bnk_zyn file into /usr/share/zynaddsubfx and /usr/local/share/zynaddsubfx directories (useful for binary packages for Linux distributions)
- bugfixes
1.4.1 (8 May 2003)
- added single mode to the instrument kit who alows only one item to be played same time
- added "Spectrum Adjust" to the ADsynth oscillator
- added "drum mode" to the instrument, where all midi keys are mapped to 12tET
- added a parameter to the "440Hz" which make the freq to varies a bit according to the key pressed (very usefull to toms and other drums)
- (for OSS audio out) if it is launched with root privileges, the synth will gain realtime scheduling priority
- bugfixes
1.4.0 (15 Apr 2003)
- added instrument's own effect (effects that are loaded/saved with the instrument)
- FreeMode Envelopes: all Envelopes can have any shape (not only ADSR)
- Added instrument kits: It is possible to use more than one instruments into one part (used for layered synths or drum kits)
- Amplitude envelopes can be linear or logarithmic
- added interpolation on the Resonance user interface
- user interface improvements and cleanups of it's code
- initiated a mailing list to allow users to share patches for ZynAddSubFX. Please share your ZynAddSubFX patches; look at http://lists.sourceforge.net/mailman/listinfo/zynaddsubfx-user for more information about the mailing list.
1.2.1 (6 Apr 2003)
- improved filter interpolation
- bugfix: wav header is written correctly
- bugfix: NRPN works correctly (eg:the controller was 0x98 instead of 98), now you can controll all effects parametrer realtime via MIDI
- bugfix: pitch bend works OK in windows
- added master fine detune (-64..63 cents)
- it is possible to swap effects or copy them
- started to port ZynAddSubFX to VST (not functional, yet)
- the resonace can protect the fundamental freq. against damping
1.2.0 (21 Mar 2003)
- ZynAddSubFX is ported to Windows ;-)
- added internal Virtual Keyboard
- added Configuration window
- added frequency tracking to filter
- improved the OscilGen (harmonic filter, RMS normalisation, etc..)
- improved the recorder (uses the WAV file format and it starts only when a key is pressed)
- added filter interpolation if the frequency is changed very fast (it removes some annoying clicks)
- other improovements, bugfixes, speedups and cleanups of the code
1.0.9 (24 Feb 2003)
- added keylimit to Part
- you can use multiple filter stages in order to make very steep filter rolloffs (eg. 48 dB/octave)
- ADsynth - added noise mode and you can make fixed frequencies; added the "Punch" parameter
- added an external program "Controller" which enables you to use the mouse for MIDI controllers
- other improvements and bugfixes
1.0.8 (14 Feb 2003)
- added mono mode and portamento
- added the EQ effect
- the output of a system effect can be sent to others system effects
- minor bugfixes and improvements
1.0.7 (7 Feb 2003)
- some settings (like samplerate) are set at runtime (by comand line)
- added Distorsion effect
- added controllers, and NRPNs for changing all effects parameters by midi
- bugs removed and other improvements
1.0.6 (30 Jan 2003)
- Added JACK output ;-)
- Minor improvements and bugfixes
1.0.5 (24 Jan 2003)
- The bug that crashed ZynAddSubFX if you change some effect parameters, it is realy removed (I forgot to update the file before upload)
- Other bugfixes and code cleanups
- Added a Global Filter to SubSynth
- Added keyresponse limits to Part
- Added presets to Effects
- The fade is smaller on high frequecy content and larger on low frequecies; so you'll don't hear starting clicks on basses and audible fadeins on higher pitched sounds
- Added tunnings to Reverb: you can choose Random of Freeverb
1.0.4 (7 Jan 2003)
- It is possible to load Scala (.scl and .kbm) files
- Added mapping from note number to scale degree is possible to load Scala kbm files
- Corrected small bugs related to Microtonal
- If you want to use ZynAddSubFX with OSS (or you don't have ALSA) you can modify the Makefile.inc file to compile with OSS only.
- It is shown the real detune (in cents)
- Made a new widget that replaces the Dial widget
- Removed a bug that crashed ZynAddSubFX if you change some effect parameters
1.0.3 (23 Dec 2002)
- small bugfixes: "Bypass Global Filter" from ADnoteUI dissapears sometimes ;
removed the low amplitude noise produced by the reverb;
if you "acconect" zynaddsubfx with aseqview no note was processed a long time.
- added Notch Filter
- added the option to randomize the ressonance function
- added VU-Meter
- Change the Insertion effect modes behaves (it sounds a bit louder)
- Added to the project an external program called Spliter that splits the
keyboard and alows you to play two instruments same time. You can use this
program with ZynAddSubFX or any other synthesizer.
- Added a new function to OscilGen
1.0.2-1 (13 Dec 2002)
- bug found and removed: sometimes when Master/Instrument is saved, the synth crashed
1.0.2 (13 Dec 2002)
- Added instrument banks
- the BandPass Filter's output amplitude was increased
- few fixes of FFTwrapper. See the documentation from "FFTwrapper.h" if you got error messages.
1.0.1 (6 Dec 2002)
- corrected a bug that made ZynAddSubFX to crash(sometimes) if you disable a part
- wrote Resonance
- added the BandPass filter
- added the recording feature
- added "New instrument" menuitem
1.0.0 (25 Sep 2002)
- first release, done a lot before it :-)

View File

@@ -0,0 +1,86 @@
ZynAddSubFX
-----------
It is a realtime software synthesizer for Linux and Windows with many features. Please see the docs for details.
Copyright (c) 2002-2011 Nasca Octavian Paul and others contributors
e-mail: zynaddsubfx AT yahoo D0T com
ZynAddSubFX is free program and is distributed WITH NO WARRANTY. It is licensed under GNU General Public License version 2 (and only version 2) - see the file COPYING.
--==## PLEASE SHARE YOUR INSTRUMENTS/MASTER SETTINGS ##==--
--==## MADE WITH ZynAddSubFX ##==--
Here is the mailing list where you can share your patches with others:
http://lists.sourceforge.net/mailman/listinfo/zynaddsubfx-user
The project page is
http://sourceforge.net/projects/zynaddsubfx
or
http://zynaddsubfx.sourceforge.net
ZynAddSubFX is also available on many Internet sites like:
http://www-ccrma.stanford.edu/planetccrma/software/soundapps.html (Planet CCRMA)
http://www.hitsquad.com/smm/programs/ZynAddSubFX/
http://freshmeat.net/projects/zynaddsubfx/
http://ibiblio.org/pub/Linux/apps/sound/midi/
or search "ZynAddSubFX" on a search engine (like www.google.com).
Requirements:
-------------
- a fast computer
- Linux or Windows
- FFTW 3.x.x - necessary for Fast Fourier computations
- MXML-2.5 or more recent library from www.minixml.org
- zlib library from http://www.zlib.org
- (for Linux) OpenSoundSystem (OSS) (if you don't have ALSA, only)
- (for Windows) pthreads, portaudio
Not required, but recommended:
------------------------------
- FLTK 1.x.x (tested with fltk 1.1.0, 1.1.1, 1.1.2,etc.)
- ALSA 0.9.x or later (with OSS emulation, if you don't use JACK)
- JACK
- a VST host for the VST version [For more information see:
http://www.kvraudio.com/forum/viewtopic.php?t=268277&sid=95be0b6c9909300d566006428bcbb97d]
Compilation:
------------
For the main program see doc/build.txt.
To compile the Spliter, run "make" from the "Spliter" directory.
To compile the Controller, run "make" from the "Controller" directory.
Running on LINUX
----------------
Under linux there are several options for both audio output and MIDI input.
Defaults are set at compile time and the desired backend can be set when starting ZynAddSubFX with the '-I' and '-O' options.
The currently supported backends are:
- Audio Output
* ALSA (Advanced Linux Sound Architecture)
* OSS (Open Sound System)
* JACK (JACK Audio Connection Kit)
* Port Audio
- MIDI Input
* ALSA
* OSS
* JACK
Running on WINDOWS
------------------
NOTE: At this time only older versions of ZynAddSubFX were compiled on windows
See older versions on sf.net (ie version 2.2.1)
If you launch zynaddsubfx.exe and nothing happens, you need pthreadGC.dll in the same directory (or windows directory). The dll files are distribuited with ZynAddSubFX windows binaries.
It might be possible that the latency will be very high. If this happens, you have to set the environment variable PA_MIN_LATENCY_MSEC to a value that represents the latency in miliseconds.
Eg: (in autoexec.bat or launched before running ZynAddSubFX) "set PA_MIN_LATENCY_MSEC=50"
Warning: if the value is too low, you might encounter severe dropouts on ZynAddSubFX. You'll have to set to a higher value and turn off automated background tasks (like virus scanners, email clients, etc.).
If you have more cards, you can select the desired card where you can play audio with the environment variable "PA_RECOMMENDED_OUTPUT_DEVICE"
Eg: "set PA_RECOMMENDED_OUTPUT_DEVICE=1"
A better way to set all of this, I will put on next versions.
Please send me instruments,banks,master settings,songs(midi+...xmz files) done with ZynAddSubFX. I'll appreciate this.
Have fun! :-)
--The ZynAddSubFX team

View File

@@ -0,0 +1,22 @@
Begin4
Title: ZynAddSubFX
Version: 2.2.1
Entered-date: 28-04-2005
Description: A real-time software synthesizer for Linux with many
features, including polyphony, multi-timbral and microtonal
capabilities. It includes randomness of some parameters,which
makes warm sounds, like analogue synthesizers.
The program has system/insertion effects, too.
ZynAddSubFX has much more features, don't let be cheated by
the size of the source code :)
Keywords: synthesizer,MIDI,ALSA,music,X11,microtonal,real-time
Author: zynaddsubfx@yahoo.com (Nasca Paul)
Maintained-by: zynaddsubfx@yahoo.com (Nasca Paul)
Primary-site: zynaddsubfx.sourceforge.net
sourceforge.net/projects/zynaddsubfx
920k ZynAddSubFX-2.2.0.tar.bz2 (source code)
Alternate-site:
Original-site:
Platforms: Linux with X11
Copying-policy: GNU General Public License (version 2)
End

View File

View File

@@ -0,0 +1,69 @@
# Alsa check, based on libkmid/configure.in.in.
# Only the support for Alsa >= 0.9.x was included; 0.5.x was dropped (but feel free to re-add it if you need it)
# It defines ...
# It offers the following macros:
# ALSA_CONFIGURE_FILE(config_header) - generate a config.h, typical usage:
# ALSA_CONFIGURE_FILE(${CMAKE_BINARY_DIR}/config-alsa.h)
# ALSA_VERSION_STRING(version_string) looks for alsa/version.h and reads the version string into
# the first argument passed to the macro
# Copyright (c) 2006, David Faure, <faure@kde.org>
# Copyright (c) 2007, Matthias Kretz <kretz@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CheckIncludeFiles)
include(CheckIncludeFileCXX)
include(CheckLibraryExists)
# Already done by toplevel
find_library(ASOUND_LIBRARY asound)
set(ASOUND_LIBRARY_DIR "")
if(ASOUND_LIBRARY)
get_filename_component(ASOUND_LIBRARY_DIR ${ASOUND_LIBRARY} PATH)
endif(ASOUND_LIBRARY)
check_library_exists(asound snd_seq_create_simple_port "${ASOUND_LIBRARY_DIR}" HAVE_LIBASOUND2)
if(HAVE_LIBASOUND2)
message(STATUS "Found ALSA: ${ASOUND_LIBRARY}")
else(HAVE_LIBASOUND2)
message(STATUS "ALSA not found")
endif(HAVE_LIBASOUND2)
set(ALSA_FOUND ${HAVE_LIBASOUND2})
find_path(ALSA_INCLUDES alsa/version.h)
macro(ALSA_VERSION_STRING _result)
# check for version in alsa/version.h
if(ALSA_INCLUDES)
file(READ "${ALSA_INCLUDES}/alsa/version.h" _ALSA_VERSION_CONTENT)
string(REGEX REPLACE ".*SND_LIB_VERSION_STR.*\"(.*)\".*" "\\1" ${_result} ${_ALSA_VERSION_CONTENT})
else(ALSA_INCLUDES)
message(STATUS "ALSA version not known. ALSA output will probably not work correctly.")
endif(ALSA_INCLUDES)
endmacro(ALSA_VERSION_STRING _result)
get_filename_component(_FIND_ALSA_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
macro(ALSA_CONFIGURE_FILE _destFile)
check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H)
check_include_files(linux/awe_voice.h HAVE_LINUX_AWE_VOICE_H)
check_include_files(awe_voice.h HAVE_AWE_VOICE_H)
check_include_files(/usr/src/sys/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H)
check_include_files(/usr/src/sys/gnu/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H)
check_include_file_cxx(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H)
check_include_file_cxx(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H)
check_library_exists(asound snd_pcm_resume "${ASOUND_LIBRARY_DIR}" ASOUND_HAS_SND_PCM_RESUME)
if(ASOUND_HAS_SND_PCM_RESUME)
set(HAVE_SND_PCM_RESUME 1)
endif(ASOUND_HAS_SND_PCM_RESUME)
configure_file(${_FIND_ALSA_MODULE_DIR}/config-alsa.h.cmake ${_destFile})
endmacro(ALSA_CONFIGURE_FILE _destFile)
mark_as_advanced(ALSA_INCLUDES ASOUND_LIBRARY)

View File

@@ -0,0 +1,200 @@
# - Find CxxTest
# Find the CxxTest suite and declare a helper macro for creating unit tests
# and integrating them with CTest.
# For more details on CxxTest see http://cxxtest.tigris.org
#
# INPUT Variables
#
# CXXTEST_USE_PYTHON [deprecated since 1.3]
# Only used in the case both Python & Perl
# are detected on the system to control
# which CxxTest code generator is used.
# Valid only for CxxTest version 3.
#
# NOTE: In older versions of this Find Module,
# this variable controlled if the Python test
# generator was used instead of the Perl one,
# regardless of which scripting language the
# user had installed.
#
# CXXTEST_TESTGEN_ARGS (since CMake 2.8.3)
# Specify a list of options to pass to the CxxTest code
# generator. If not defined, --error-printer is
# passed.
#
# OUTPUT Variables
#
# CXXTEST_FOUND
# True if the CxxTest framework was found
# CXXTEST_INCLUDE_DIRS
# Where to find the CxxTest include directory
# CXXTEST_PERL_TESTGEN_EXECUTABLE
# The perl-based test generator
# CXXTEST_PYTHON_TESTGEN_EXECUTABLE
# The python-based test generator
# CXXTEST_TESTGEN_EXECUTABLE (since CMake 2.8.3)
# The test generator that is actually used (chosen using user preferences
# and interpreters found in the system)
# CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3)
# The full path to the Perl or Python executable on the system
#
# MACROS for optional use by CMake users:
#
# CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>)
# Creates a CxxTest runner and adds it to the CTest testing suite
# Parameters:
# test_name The name of the test
# gen_source_file The generated source filename to be
# generated by CxxTest
# input_files_to_testgen The list of header files containing the
# CxxTest::TestSuite's to be included in
# this runner
#
# #==============
# Example Usage:
#
# find_package(CxxTest)
# if(CXXTEST_FOUND)
# include_directories(${CXXTEST_INCLUDE_DIR})
# enable_testing()
#
# CXXTEST_ADD_TEST(unittest_foo foo_test.cc
# ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
# target_link_libraries(unittest_foo foo) # as needed
# endif()
#
# This will (if CxxTest is found):
# 1. Invoke the testgen executable to autogenerate foo_test.cc in the
# binary tree from "foo_test.h" in the current source directory.
# 2. Create an executable and test called unittest_foo.
#
# #=============
# Example foo_test.h:
#
# #include <cxxtest/TestSuite.h>
#
# class MyTestSuite : public CxxTest::TestSuite
# {
# public:
# void testAddition( void )
# {
# TS_ASSERT( 1 + 1 > 1 );
# TS_ASSERT_EQUALS( 1 + 1, 2 );
# }
# };
#
#=============================================================================
# Copyright 2008-2010 Kitware, Inc.
# Copyright 2008-2010 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Version 1.4 (11/18/10) (CMake 2.8.4)
# Issue 11384: Added support to the CXX_ADD_TEST macro so header
# files (containing the tests themselves) show up in
# Visual Studio and other IDEs.
#
# Version 1.3 (8/19/10) (CMake 2.8.3)
# Included patch by Simone Rossetto to check if either Python or Perl
# are present in the system. Whichever intepreter that is detected
# is now used to run the test generator program. If both interpreters
# are detected, the CXXTEST_USE_PYTHON variable is obeyed.
#
# Also added support for CXXTEST_TESTGEN_ARGS, for manually specifying
# options to the CxxTest code generator.
# Version 1.2 (3/2/08)
# Included patch from Tyler Roscoe to have the perl & python binaries
# detected based on CXXTEST_INCLUDE_DIR
# Version 1.1 (2/9/08)
# Clarified example to illustrate need to call target_link_libraries()
# Changed commands to lowercase
# Added licensing info
# Version 1.0 (1/8/08)
# Fixed CXXTEST_INCLUDE_DIRS so it will work properly
# Eliminated superfluous CXXTEST_FOUND assignment
# Cleaned up and added more documentation
#=============================================================
# CXXTEST_ADD_TEST (public macro)
#=============================================================
macro(CXXTEST_ADD_TEST _cxxtest_testname _cxxtest_outfname)
set(_cxxtest_real_outfname ${CMAKE_CURRENT_BINARY_DIR}/${_cxxtest_outfname})
add_custom_command(
OUTPUT ${_cxxtest_real_outfname}
DEPENDS ${ARGN}
COMMAND ${CXXTEST_TESTGEN_INTERPRETER}
${CXXTEST_TESTGEN_EXECUTABLE} ${CXXTEST_TESTGEN_ARGS} -o ${_cxxtest_real_outfname} ${ARGN}
)
set_source_files_properties(${_cxxtest_real_outfname} PROPERTIES GENERATED true)
add_executable(${_cxxtest_testname} ${_cxxtest_real_outfname} ${ARGN})
if(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
add_test(${_cxxtest_testname} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_cxxtest_testname})
elseif(EXECUTABLE_OUTPUT_PATH)
add_test(${_cxxtest_testname} ${EXECUTABLE_OUTPUT_PATH}/${_cxxtest_testname})
else()
add_test(${_cxxtest_testname} ${CMAKE_CURRENT_BINARY_DIR}/${_cxxtest_testname})
endif()
endmacro(CXXTEST_ADD_TEST)
#=============================================================
# main()
#=============================================================
if(NOT DEFINED CXXTEST_TESTGEN_ARGS)
set(CXXTEST_TESTGEN_ARGS --error-printer)
endif()
find_package(PythonInterp QUIET)
find_package(Perl QUIET)
find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h)
find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE
NAMES cxxtestgen cxxtestgen.py
PATHS ${CXXTEST_INCLUDE_DIR})
find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl
PATHS ${CXXTEST_INCLUDE_DIR})
if(PYTHONINTERP_FOUND OR PERL_FOUND)
include(FindPackageHandleStandardArgs)
if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND OR NOT DEFINED CXXTEST_USE_PYTHON))
set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE})
set(CXXTEST_TESTGEN_INTERPRETER ${PYTHON_EXECUTABLE})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG
CXXTEST_INCLUDE_DIR CXXTEST_PYTHON_TESTGEN_EXECUTABLE)
elseif(PERL_FOUND)
set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PERL_TESTGEN_EXECUTABLE})
set(CXXTEST_TESTGEN_INTERPRETER ${PERL_EXECUTABLE})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG
CXXTEST_INCLUDE_DIR CXXTEST_PERL_TESTGEN_EXECUTABLE)
endif()
if(CXXTEST_FOUND)
set(CXXTEST_INCLUDE_DIRS ${CXXTEST_INCLUDE_DIR})
endif()
else()
set(CXXTEST_FOUND false)
if(NOT CxxTest_FIND_QUIETLY)
if(CxxTest_FIND_REQUIRED)
message(FATAL_ERROR "Neither Python nor Perl found, cannot use CxxTest, aborting!")
else()
message(STATUS "Neither Python nor Perl found, CxxTest will not be used.")
endif()
endif()
endif()

View File

@@ -0,0 +1,17 @@
#Find JACK Audio Connection Kit
include(LibFindMacros)
libfind_pkg_check_modules(JACK jack)
find_path(JACK_INCLUDE_DIR
NAMES jack/jack.h
PATHS ${JACK_INCLUDE_DIRS}
)
find_library(JACK_LIBRARY
NAMES jack
PATHS ${JACK_LIBRARY_DIRS}
)
set(JACK_PROCESS_INCLUDES JACK_INCLUDE_DIR)
set(JACK_PROCESS_LIBS JACK_LIBRARY)
libfind_process(JACK)

View File

@@ -0,0 +1,9 @@
# Find OSS (Open Sound System)
find_path(OSS_INCLUDE_DIR sys/soundcard.h)
set(OSS_LIBRARIES True)
mark_as_advanced(OSS_INCLUDE_DIR)
# handle the QUIETLY and REQUIRED arguments and set OSS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSS DEFAULT_MSG OSS_LIBRARIES OSS_INCLUDE_DIR)

View File

@@ -0,0 +1,39 @@
# - Find zlib
# Find the native ZLIB includes and library
#
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
# ZLIB_LIBRARIES - List of libraries when using zlib.
# ZLIB_FOUND - True if zlib found.
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
IF (ZLIB_INCLUDE_DIR)
# Already in cache, be silent
SET(ZLIB_FIND_QUIETLY TRUE)
ENDIF (ZLIB_INCLUDE_DIR)
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
SET(ZLIB_NAMES z zlib zdll)
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
# Per-recommendation
SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)

View File

@@ -0,0 +1,309 @@
# Doxyfile 1.5.7
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = ZynAddSubFX
PROJECT_NUMBER = 2.3.0
OUTPUT_DIRECTORY = /home/mark/zynaddsubfx/doc/dox2/
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/mark/zynaddsubfx/src/
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 5
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/mark/zynaddsubfx/src/
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.py \
*.f90 \
*.f \
*.vhd \
*.vhdl \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.PY \
*.F90 \
*.F \
*.VHD \
*.VHDL
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHG_LOCATION =
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NONE
TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = YES
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = YES
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

View File

@@ -0,0 +1,55 @@
Come iniziare
---------------
ZynAddSubFX è un sintetizzatore software piuttosto complesso, con un gran numero
di controlli. Perciò l'uso di ZynAddSubFX non è sempre ovvio.
Molte applicazioni sotto Linux trasportano il MIDI con AlSA e trasmettono l'audio
con JACK. ZynAddSubFX può essere lanciato con questa configurazione eseguendo:
------------------------------
zynaddsubfx -I alsa -O jack -a
------------------------------
Questo imposta ALSA come driver input e JACK come driver audio, che dovrebbe
tentare di connettersi automaticamente alla tua scheda audio, per via del flag -a.
Se questa è la prima volta che lanci ZynAddSubFX, vedrai una schermata che ti lascia
scegliere tra l'interfaccia per principianti e quella avanzata. Attualmente
l'interfaccia 'beginner' è deprecata, quindi è raccomandato usare l'interfaccia
'advanced'.
Ora dovresti essere in grado di vedere la finestra principale di ZynAddSubFX, dalla
quale puoi impostare patch, effetti e altre configurazioni generali, ma la cosa più
importante è che fornisce i collegamenti tra le patch. ZynAddSubFX è uno strumento
potente con una serie di patch di base, ma la vera forza sta dietro all'abilità di
creare delle patch personali.
.Main Window
image::./images/uimain.png[]
Per un utilizzo base, potrai usare il pulsante alla destra dell'etichetta 'enabled'.
Questo pulsante consentirà di selezionare lo strumento desiderato dai banchi
disponibili in ZynAddSubFX. Per suonare note in ZynAddSubFX puoi usare la tastiera
virtuale integrata (accessibile dal pulsante 'vK') oppure puoi connettere la tua
tastiera al sistema e usare *aconnect* per connetterla in ZynAddSubFX (supponendo
che si stia usando ALSA).
Questa finestra principale consente l'accesso a molte features più avanzate.
Di cui alcune sono:
* System Effects
* Insertion Effects
* Recording
* Part Settings (strumento impostazioni del livello)
* Master Settings
* Microtonal Settings
Ad esempio, per utilizzare la funzione di registrazione deve essere selezionato un
file wave dal menù di registrazione, poi può essere avviata con il pulsante 'record'
e stoppata con il pulsante 'stop'. Questo è un modo semplice e veloce di registrare
alcuni samples da ZynAddSubFX, anche se ci sono strumenti con caratteristiche più
complete disponibili tramite gli strumenti di registrazione di JACK.
NOTE: Dopo aver premuto 'record', il file wave non partirà la registrazione fino a
quando un nuovo tasto non sarà premuto da una sorgente MIDI esterna o dalla virtual
keyboard. Le proprietà dei 'System Effects' e degli 'Insertion Effects' sono
accessibili e disponibili così come le proprietà di ogni strumento.

View File

@@ -0,0 +1,61 @@
Filters
-------
:Author: Mark McCurry
:Date: June 24, 2012
ZynAddSubFX offre diversi tipi di filtri, che possono essere usati per modellare
lo spettro di un segnale. I parametri primari che influenzano le caratteristiche
del filtro sono 'cutoff', 'resonance', 'filter stages' e il tipo di filtro '(filter type)'.
* *Cutoff (frequenza di taglio)*: Questo valore determina quale frequenza segna
il punto di cambiamento per il filtro.
In un filtro 'low-pass' (passa-bassi) questo
valore segna il punto da cui le frequenze alte
verranno attenuate.
* *Resonance*: La Resonance di un filtro determina l'enfatizzazione del filtro
sulla frequenza di taglio. In ZynAddSubFX è rappresentata dal
fattore 'Q', che è definito come la frequenza di taglio diviso
la larghezza di banda '(bandwidth)'. In altre parole un più alto
valore di Q causa un picco molto più stretto e risonante.
* *Stages*: Il numero di fasi di filtrazione in un dato filtro descrive quanto
bruscamente è in grado di applicare cambiamenti nella risposta in
frequenza.
I filtri analogici di base '(analog)' che ZynAddSubFX offre sono mostrati di
seguito, con la frequenza centrale segnata con una linea rossa. I filtri a stato
variabile '(state variable)' dovrebbero essere molto simili.
image:images/filter0.png[]
Come detto in precedenza, il valore Q di un filtro influenza quanto concentrata è
l'energia del segnale nella frequenza di taglio; il risultato di differenti valori
di Q sono mostrati sotto.
TIP: Per molti suoni analogici classici, alti valori di Q sono ussati sugli
'sweeping filters'. Un semplice low-pass filter con Q alto modulato da un forte
'envelope' solitamente è sufficiente per avere un buon suono.
image:images/filter1.png[]
Infine, l'effetto dell'ordine del filtro può essere visto sotto. Questo è
approssimativamente il numero di fasi del filtro '(filter stages)'. Per patches
più complesse è importante capire che la nitidezza in più nel filtro non è gratuita,
in quanto richiede molti più calcoli in corso di esecuzione; questo fenomeno
è più facilmente visibile nel 'subsynth', dove è facile avere bisogno di centinaia
di 'filter stages' per produrre una certa nota.
image:images/filter2.png[]
User Interface
~~~~~~~~~~~~~~
image:images/uifilter.png[]
* *C.freq*: Cutoff frequency
* *Q*: Level of resonance for the filter
* *V.SnsA.*: Velocity sensing amount for filter cutoff
* *V.Sns.*: Velocity sensing function
* *freq.tr*: Frequency tracking amount. When this parameter is positive, higher
note frequencies shift the filter's cutoff frequency higher.
* *gain*: Additional gain/attenuation for filter
* *St*: Filter stages

View File

@@ -0,0 +1,64 @@
LFO
---
:author: Paul Nasca
Introduzione
~~~~~~~~~~~~
"LFO" significa Low Frequency Oscillator. Questi oscillatori non sono usati per
fare suoni da soli, ma per cambiare alcuni parametri (come le frequenze, le
ampiezze o i filtri).
L'LFO ha alcuni parametri di base:
* *Delay*: Questo parametro imposta il tempo tra l'inizio della nota e l'inizio
dell'LFO
* *Start Phase*: La posizione che avrà l'LFO alla partenza
* *Frequency*: La velocità dell'LFO (quanto velocemente il parametro è controllato
dai cambiamenti dell'LFO)
* *Depth*: L'ampiezza dell'LFO (quanto il parametro è controllato dai cambiamenti
dell'LFO)
image:images/lfo0.png[]
Un altro importante parametro dell'LFO è la forma '(shape)'. Ci sono molti
tipi di LFO in base alla forma. ZynAddSubFX supporta le seguenti forme:
image:images/lfo1.png[]
Un altro parametro è 'LFO Randomness' (casualità dell'LFO).
Esso modifica casualmente l'ampiezza o la frequenza dell'LFO ed in ZynAddSubFX puoi scegliere quanto, con questo parametro.
Nelle seguenti immagini sono mostrati alcuni esempi di casualità e come cambia la
forma d'onda triangolare dell'LFO.
image:images/lfo2.png[]
Altri parametri sono:
* *Continous mode*: Se si utilizza questa modalità, l'LFO non partirà da "zero"
ad ogni nuova nota, ma sarà continuo. E' molto utile applicato sui filtri, per
fare interessanti 'sweeps'.
* *Stretch*: Controlla quanto la frequenza dell'LFO cambia in base alla frequenza
della nota.
Si può passare da 'stretch' negativo (la frequenza dell'LFO diminuisce sulle
note più alte) a zero (rimane la stessa in tutte le note) a 'stretch' positivo
(aumenta sulle note più alte).
User Interface
~~~~~~~~~~~~~~
In ZynAddSubFX i parametri dell'LFO sono mostrati così:
image:images/uilfo.jpg[]
Questi parametri sono:
* *Freq*: LFO Frequency
* *Depth*: LFO Depth
* *Start*: LFO Start Phase -
Se questo knob è al valore più basso, LFO Start Phase sarà random
* *Delay*: LFO Delay
* *A.R.*: LFO Amplitude Randomnes
* *F.R.*: LFO Frequency Randomness
* *C.*: LFO Continous Mode
* *Str.*: LFO Stretch - Nell'immagine sopra LFO Stretch è impostato a zero

View File

@@ -0,0 +1,134 @@
Envelopes
---------
Introduzione
~~~~~~~~~~~~
Gli inviluppi controllano come cambiano nel tempo l'ampiezza, la frequenza o il
filtro.
Amplitude Envelopes (inviluppi di ampiezza)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Questi inviluppi controllano l'ampiezza del suono.
In ZynAddSubFX, gli inviluppi di ampiezza possono essere lineari o logaritmici.
Nell'immagine seguente sono mostrate le differenze tra questi inviluppi.
image:images/envelope1.png[Alt text]
L'inviluppo di ampiezza è diviso in:
* *Attack*: Inizia all'attacco della nota (Note On). Il volume inizia da 0 al
massimo. In ZynAddSubFX l'attack è sempre lineare
* *Decay*: Il volume scende dal valore massimo ad un livello chiamato "Sustain level"
* *Sustain*: Il volume rimane costante fino a quando il tasto non viene
rilasciato (Note Off). Dopo questo, avviene l'ultima fase.
* *Release*: Il volume scende a zero.
Frequency Envelopes
~~~~~~~~~~~~~~~~~~~
Questi inviluppi controllano la frequenza (o, più esattamente, il 'pitch')
degli oscillatori.
La seguente figura disegna le fasi di questi inviluppi.
image::images/envelope2.png[Alt text]
La linea puntinata rappresenta il pitch reale del suono senza inviluppo.
Gli inviluppi di frequenza sono divisi in 3 fasi:
* *Attack*: Inizia all'attacco della nota (Note On). La frequenza inizia da un
certo valore e "scivola" alla reale frequenza della nota.
* *Sustain*: La frequenza è la stessa per tutto il periodo di Sustain
* *Release*: Questa fase inizia con il Note Off e scala la frequenza della nota
ad un certo valore
Filter Envelopes
~~~~~~~~~~~~~~~~
Questi inviluppi controllano la frequenza di cutoff dei filtri e sono divisi in:
image:images/envelope3.png[Alt Text]
* *Attack*: Inizia all'inizio della nota (Note On). La frequenza di cutoff inizia
ad un certo valore e scala ad un altro
* *Decay*: La frequenza di cutoff continua a scivolare verso il valore reale della
frequenza di cutoff del filtro (linea puntinata)
* *Sustain*: La frequenza di cutoff è la stessa per tutto il periodo di
Sustain (linea puntinata)
* *Release*: Questa fase inizia con il Note Off e scala la frequenza di cutoff della
nota ad un certo valore
Freemode Envelopes
~~~~~~~~~~~~~~~~~~
Per tutti gli inviluppi c'è una modalità che consente all'utente di impostare un numero
arbitrario di fasi e punti di controllo. Questa modalità è chiamata 'Freemode'.
image:images/envelope4.png[Alt Text]
L'unica fase che rimane sempre definita è il Sustain, dove gli inviluppi si bloccano
fino ad un evento Note Off.
User Interface
~~~~~~~~~~~~~~
Tutti i tipi di inviluppi hanno alcuni controlli comuni:
* *E*: Mostra una finestra che può far vedere la vera forma dell'inviluppo o convertirlo
in 'Freemode' per editarlo
* *Stretch*: Come l'inviluppo è allungato in base alla nota.
Sulle note più alte gli inviluppi sono più corti delle note più basse.
Nel valore più a sinistra lo 'stretch' è zero.
Il valore più a destra indica un allungamento del 200%; ciò significa che l'inviluppo
è allungato circa 4 volte/ottava.
* *frcR*: Release forzato. Se questa opzione è settata su On, il rilascio andrà al
valore finale anche se la fase di Sustain non è stata completata.
Di solito questo parametro è settato.
I parametri degli Amplitude Evelopes in ZynAddSubFX sono:
image:images/uienvelope3.jpg[Alt Text]
* *A.dt*: Durata Attack
* *D.dt*: Durata Decay
* *S.Val*: Valore di Sustain
* *R.dt*: Release time
* *L*: Se questa opzione è settata l'inviluppo è lineare, altrimenti sarà logaritmico.
Per i Frequency Envelopes l'interfaccia ha i seguenti parametri:
image:images/uienvelope2.jpg[Alt Text]
* *A.val*: Valore di Attack
* *A.dt*: Durata Attack
* *R.dt*: Release time
* *R.val*: Valore di Release
I Filter Evelopes hanno i parametri:
image:images/uienvelope1.jpg[Alt Text]
* *A.val*: Valore di Attack
* *A.dt*: Durata di Attack
* *D.val*: Valore di Decay
* *D.dt*: Decay time
* *R.dt*: Release time
* *R.val*: Valore di Release
I Freemode Envelopes hanno una finestra separata per impostare parametri e controlli:
image:images/uienvelope0.jpg[]
* *Control points (punti di controllo)*: Puoi muovere i punti usando il mouse.
In basso a destra nella finestra viene mostrata la durata totale dell'inviluppo.
Se si clicka su un control point verrà visualizzata la durata della fase in cui
è quel punto.
* *Freemode*: Questo pulsante attiva o disattiva la modalità 'Freemode'
* *Add Point*: Aggiunge un punto dopo il punto correntemente selezionato.
Puoi selezionare un punto clickandoci su.
* *Delete point*: Rimuove il punto dall'inviluppo.
* *Sust.*: Imposta il punto di Sustain. E' mostrato usando la linea gialla.
* *Str.*: Envelope stretch

View File

@@ -0,0 +1,78 @@
AdSynth
-------
AdSynth, principalmente un motore di sintesi additiva, è uno dei tre principali
motori di sintesi disponibili in ZynAddSubFX.
Il concetto base di questo motore è la somma di un insieme di voci, ciascuno dei
quali consiste in oscillatori.
High Level (Global)
~~~~~~~~~~~~~~~~~~~
Il livello globale di AdSynth consiste negli elementi mostrati nella figura sotto:
.AdSynth Global Elements
image::gen/ad-note.png[scalewidth="50%",width="700"]
Il livello globale di AdSynth è quasi interamente composto dagli elementi
precedentemente discussi.
Comunque appaiono qui alcune nuove features, come: il rilevamento di velocità
'(velocity sensing)', 'punch', opzioni di detune e relativa bandwidth, resonance.
.AdSynth Global Window
image::images/ad-global.png[]
Il rilevamento di velocità è semplicemente una trasformazione esponenziale dalla
velocità della nota ad alcuni cambiamenti di parametro (!?).
Il diagramma sotto mostra come il 'velocity sensing' controlla questa traslazione
in tutto il range di velocity delle note possibili.
.Velocity Sensing Chart
image::gen/velf.png[scalewidth="50%",width="600"]
Il 'punch' di una nota in AdSynth è un'amplificazione costante dell'output
alla partenza della nota, con una lunghezza determinata dal 'punch time' e 'stretch'
e l'ampiezza determinata da 'punch strength' e 'velocity sensing'.
Il controllo relBw nel riquadro di frequenza è di fatto un moltiplicatore per
"scordare" '(detuning)' tutte le voci di una nota.
NOTE: TODO Talk about resonance
La somma delle voci passa attraverso filtri e amplificazione per produrre il
suono finale.
Questro potrebbe far pensare che ad-note è solo un mucchio di post-elaborazione
minore e che a questo livello molto della generazione del suono è nascosta.
Voices
~~~~~~
La voce da accesso ad un configurazione simile dei parametri globali più altre
cose come il modulatore, l'oscillatore e features di unison.
.AdSynth Voice Window
image::images/ad-voice.png[]
Modulation
^^^^^^^^^^
Tra le opzioni di modulazione si può selezionare:
* Morph
* Ring Modulation
* Phase Modulation
* Frequency Modulation
* Disabled
Unison
^^^^^^
Unison è utile nel creare il suono tipo chorus di più oscillatori simultanei.
Oscillator
~~~~~~~~~~
NOTE: TODO show waveforms, talk about distortions somewhere, etc
.Oscillator Window
image::images/uioscil.png[]

View File

@@ -0,0 +1,56 @@
Controller
---------
image::./images/uicontroller.png[]
General
~~~~~~~
* *ModWh*: Modulation Wheel depth (profondità della Modulation Wheel)
* *Exp MWh*: Exponential Modulation Wheel (cambia la scala di mudulazione in
esponenziale)
* *BwDpth*: Bandwidth Depth (profondità della Bandwidth)
* *Exp BW*: Exponential Bandwidth (cambia la scala di Bandwidth in esponenziale)
* *PanDpth*: Panning Depth (profondità del pan)
* *FltQ*: Filter Q (resonance) depth
* *FltCut* Filter Cutoff frequency depth (profondità della frequenza di taglio)
* *Expr*: Attiva/disattiva Expression
* *Vol*: Attiva/disattiva la ricezione di Volume controller
* *FMamp*: Attiva/disattiva la ricezione di Modulation Amplitude controller (76)
* *Sustain*: Attiva/disattiva sustain pedal
* *PWheelB.Rng (cents)*: Pitch Wheel Bend Range (cents; 100 cents = 1 semitono)
Portamento
~~~~~~~~~~
* *Rcv.*: Controlla se la parte riceve il Portamento - On/Off (65)
* *time*: La durata del Portamento
* *thresh*: La soglia '(Threshold)' del Portamento.
Rappresenta il minimo o il massimo numero di semitoni (o centesimi di semitono)
richiesti per lo start del Portamento.
La differenza è calcolata tra l'ultima nota e la corrente.
* *th.type*: Il tipo di Threshold
Se selezionato significa che il Portamento si attiva quando la differenza
delle frequenze è al di sopra della soglia ("thresh"); non selezionato si attiva
quando è al di sotto della soglia.
NOTE: La Threshold si riferisce alle frequenze e non alle note MIDI
(si potrebbe tenere in considerazione se si usano scale microtonali).
Proportional Portamento
^^^^^^^^^^^^^^^^^^^^^^
////
TODO: add graphs to explain prp.rate and prp. depth
////
* *Propt.*: Se il Portamento è proporzionale al rapporto '(Ratio)' delle frequenze
* *Prp. Rate*: Ratio necessaria per raddoppiare il tempo del Portamento
* *Prp. Dpth*
Resonance
~~~~~~~~~
* *CFdpth*: Controlla la profondità del centro della Resonance
* *BWdpth*: Controlla la profondità della larghezza di banda (Bandwidth) della
Resonance

View File

@@ -0,0 +1,54 @@
Persistence
-----------
Come la gran parte delle applicazioni ZynAddSubFX consente di salvare il tuo
lavoro e ricaricarlo.
Salvare tutto
~~~~~~~~~~~~~
Uno dei modi più semplici di salvare il tuo lavoro è quello di salvare l'intera
sessione. Questo può essere fatto dal menu File e il risultato sarà la creazione
di un .xmz file.
Una volta creato, questo file conterrà le tutte le impostazioni della sessione,
come le accordature microtonali, tutte le patch, tutti i tipi di effetti, ecc...
Salvare delle parti
~~~~~~~~~~~~~~~~~~~
In alcuni casi salvare tutto non è quello che si desidera.
Di seguito c'è un esempio di salvataggio di una patch.
Patches
^^^^^^^
Per salvare una patch, si può salvare dal menu strumenti o dalla bank window.
Con il menu strumenti si può solo salvare il file in una dato percorso con
l'estensione .xiz.
Con il menu dei banchi si può assegnare una patch ad un certo slot con un banco.
Questo strumento rimarrà qui per un futuro uso fin quando non viene cancellato.
Per vedere la posizione fisica del file .xiz si può controllare la finestra in
File->Settings->Bank_Root_Dirs, per vedere i percorsi dei banchi.
NOTE: Devi avere i permessi di scrittura per aggiungere uno strumento al banco.
Presets
^^^^^^^
Avete un'impostazione favorita per un inviluppo o un oscillatore difficile da
rifare? Allora i preset fanno al caso vostro.
I preset consentono di salvare le impostazioni per ogni componente che supporta
operazioni di copia/incolla.
Questo viene fatto con i prest file (.xpz), che sono memorizzati nelle cartelle
indicate da File->Settings->Preset_Root_Dirs.
Riepilogo
~~~~~~~
.Riepilogo delle estensioni
[literal]
xmz Everything
xiz Instrument
xsz Scale Settings
xpz Presets

View File

@@ -0,0 +1,22 @@
Appendice A: Default MIDI
-------------------------
.Connessioni MIDI di Default
[literal]
001 - Modulation Wheel
007 - Volume
010 - Pan
011 - Expression
064 - Sustain
065 - Portamento Enable
071 - Filter Q
074 - Filter Cutoff
075 - Bandwidth(*)
076 - Modulation Amplitude(*)
077 - Resonance Center Frequency(*)
078 - Resonance Bandwidth(*)
120 - All Sounds Off
121 - Reset All Controllers
123 - All Notes Off
Le voci con '(*)' non rientrano nelle specifiche General Midi.

View File

@@ -0,0 +1,61 @@
Appendice B: Compilare ZynAddSubFX
--------------------------------
Introduzione a CMake
~~~~~~~~~~~~~~~~~~~~~
************************************************************************
Note: Questa sezione è in gran parte copiata dal wiki di OpenSceneGraph:
http://www.openscenegraph.org/projects/osg/wiki/Build/CMake
************************************************************************
ZynAddSubFX usa CMake come suo sistema di compilazione unificato. CMake
è capace di leggere semplici build script dall'albero dei sorgenti e
creare da questo un sistema di compilazione specifico per la piattaforma.
Questo sistema di compilazione può avere la forma di VisualStudio project
files, Unix Makefiles o XCode project files. CMake è capace di individuare
automaticamente le dipendeze esterne e consente di attivare/disattivare
la compilazione del modulo e di configurare varie opzioni di compilazione.
L'uso di un sistema di compilazione unificato consente di evitare rotture
di compilazione che erano presenti nel precedente metodo di compilazione,
ovvero quello di mantenere tre obiettivi di compilazione separati per
VisualStudio, Unix "make" and XCode. Si riduce anche l'onere della
manutenzione per gli sviluppatori base e collaboratori.
Nell'insieme, l'uso di CMake dovrebbe portare come risultato una migliore
coerenza e build più stabili su ogni piattaforma per gli utenti finali e
una maggiore produttività nello sviluppo di nuove versioni.
Speriamo che con una maggior coerenza di builds tra piattaforme renderà
più facile per gli sviluppatori utilizzare la 'development version' di
ZynAddSubFX e aiutare a contribuire ai testing e alle migliorie,
portando ad un codice di più alta qualità.
Quick start guide
~~~~~~~~~~~~~~~~~
Per i più impazienti, qui c'è una guida veloce su come compilare
immediatamente ZynAddSubFX da sorgenti.
************************************************************************
Note: Ciò presuppone che tu abbia già una copia dei sorgenti.
************************************************************************
---------------------------------
#enter the source directory
cd zynaddsubfx
#make a directory for an out-of-source build
mkdir build
cd build
#generate a cmake build project here from the cmake root, which is
#found in the directory below the current one
cmake ..
#OPTIONAL: Adjust compile variables in the Cache file:
ccmake .
#And finally, build as usual using make
make
---------------------------------

View File

@@ -0,0 +1,63 @@
Appendix C: Ottenere ZynAddSubFX
-------------------------------
Normalmente ci sono diversi modi per ottenere una copia di ZynAddSubFX.
SourceForge::
http://sourceforge.net/projects/zynaddsubfx/files/
Distribuition::
apt/yum/others
Git::
git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfxg
Introduzione a Git
~~~~~~~~~~~~~~~~~~~
Per coloro che vogliono vivere "on the bleeding edge" o chi vuole essere certo che
la prossima release abbia meno bug, si può avere il codice con git.
Git è usato per gestire il codice sorgente di questo progetto ed è utile per
ottenere velocemente e facilmente una copia "up-to-date" del codice sorgente.
Ottenere il codice sorgente
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Per avere una copia dei sorgenti di ZynAddSubFX tutto il necessario da fare è:
---------------------------------------------
git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx
cd zynaddsubfx
#Download additional resources
git submodule init
git submodule update
---------------------------------------------
Ora dovresti essere nella directory del codice sorgente.
Per compilare facilmente si guardi l'Appendice B del manuale.
Dare un'occhiata ai branch
^^^^^^^^^^^^^^^^^^^^^^^^^^
Diciamo che lo sviluppo si è esteso ad una creazione di una feature che si vuole
vedere in anteprima.
Per il bene di questa guida, supponiamo che il nome del branch della feature che
verrà è 'foo'.
-----------------------------------------
#checkout the foo branch from sourceforge
git checkout --track -b foo origin/foo
#lets checkout the primary branch again
git checkout master
#hop back to the other branch
git checkout foo
----------------------------------------
Ora si dovrebbe essere in grado di cambiare branches e andare nella build-directory
(come descritto in Appendice B) e ricompilare ZynAddSubFX.
NOTE: Quando si usano i branches può venir meno un po' di stabilità.

View File

@@ -0,0 +1,28 @@
Zynaddsubfx
===========
:Author: Paul Nasca and Mark McCurry, translated by Ilario Glasgo
include::01-intro_IT.txt[]
include::02-filter_IT.txt[]
include::03-lfo_IT.txt[]
include::04-envelope_IT.txt[]
include::05-adsynth_IT.txt[]
include::06-controller_IT.txt[]
/////////////////////////////
include 07-effects_IT.txt
include nrpn.txt
/////////////////////////////
include::08-saving_IT.txt[]
include::APPENDIX_A-mididefaults_IT.txt[]
include::APPENDIX_B-build_IT.txt[]
include::APPENDIX_C-doc_getting_IT.txt[]

View File

@@ -0,0 +1,9 @@
Requirements for this directory:
* standalone (latex module)
* pgfplots (latex module)
* pst-sigsys (latex module)
* auto-pst-pdf (latex module)
* pst-tools (latex module)
* gnuplot

View File

@@ -0,0 +1,148 @@
AdSynth
-------
AdSynth, a primarily additive synthesis engine, is one of the three major
synthesis engines available in ZynAddSubFX.
The basic concept of this engine is the summation of a collection of voices,
each of which consist of oscillators.
High Level (Global)
~~~~~~~~~~~~~~~~~~~
AdSynth's global level consists of the elements shown in the below figure:
.AdSynth Global Elements
image::gen/ad-note.png[scalewidth="50%",width="700"]
The global level of adsynth is almost entirely composed of previously discussed
elements.
However a few new features appear here, this includes velocity sensing, punch,
detune options and realative bandwidth , and resonance.
.AdSynth Global Window
image::images/ad-global.png[]
Velocity sensing is simply an exponental transformation from the note's velocity
to some parameter change.
The below diagram shows how the velocity senseing controls affects this
translation over the whole range of possible note velocities.
.Velocity Sensing Chart
image::gen/velf.png[scalewidth="50%",width="600"]
The puch of a note in AdSynth is a constant amplification to the output at the
start of the note, with its length determined by the punch time and stretch and
the amplitude being determined by the punch strength and velocity sensing.
The relBW control in the frequency pane is effectively a multiplier for detuning
all voices within an adnote.
NOTE: TODO Talk about resonance
The sum of the voices are passed through filters and amplification to produce
the final sound.
This could lead one to think that ad-note is just a bunch of minor
postprocessing and at this level much of the sound generation is hidden.
Voices
~~~~~~
The voice gives access to a similar setup to the global parameters and then some
more, such as the modulator, oscillator, and unison features.
.AdSynth Voice Window
image::images/ad-voice.png[]
Modulation
^^^^^^^^^^
Within the options for modulation, one can select:
* Morph
* Ring Modulation
* Phase Modulation
* Frequency Modulation
* Disabled
Unison
^^^^^^
Unison is useful in creating the chorus like sound of many simultaneous
oscillators
Oscillator
~~~~~~~~~~
The oscillator is lets you choose the basic waveform, which oscillates while
the sound is playing and is then further modified.
.Oscillator Window
image::images/uioscil.png[]
[[adsynth::oscilllator::types_of_waveshaping, Types of Waveshaping]]
Types of Waveshaping
^^^^^^^^^^^^^^^^^^^^
Waveshaping can be done using the *Wsh* area in the Oscillator editor.
The type of distortion has much influence on how the overtones are being placed.
Sometimes, you get a "fat" bass, and sometimes, high frequencies are added,
makeing the sound "crystal clear".
Atan & Sigmoid
++++++++++++++
This is the default setting. It is an easy way to apply loudness to a
wave without getting undesired high overtones. Thus, it can be used both for
making instruments that sound like "real" ones, but also for electronic music.
The transformation turns, roughly said, every amplitude into a square amplitude.
Thus, sine, power, pulse and triangle turn into a usual square wave, while a saw
turns into a phased square wave. A chirp wave turns into a kind of phase
modulated square wave.
Quants
++++++
http://en.wikipedia.org/wiki/Quantization_%28sound_processing%29[Quantization]
adds high overtones early. It can be seen as an unnatural effect, which is often
used for electronic music.
The transformation is a bit similar to building
the http://en.wikipedia.org/wiki/Riemann_sum[lower sum] of a wave,
mathematically said. This means that the transformation effect turns your
"endless high" sampled wave into only a few samples. The more distortion you
will apply, the less samples will be used. Indeed, this is equivalent to say
that more input amplification is used. To see this, here is a small sample of
code, where "ws" is the (correctly scaled amount of input amplification, and "n"
the number of original samples.
---------------------------------
for(i = 0; i < n; ++i)
smps[i] = floor(smps[i] / ws + 0.5f) * ws;
---------------------------------
NOTE: If you turn on quantisation very high, you might be confused
that, especially high notes, make no sound. The reason: High frequencies are
"forgotten" if you sample with only few samples. Also, the sign of an amplitude
can be forgotten. This behaviour might make some quantisations a bit unexpected.
Limiting & Clipping
+++++++++++++++++++
http://en.wikipedia.org/wiki/Limiting[Limiting] usually means that for a signal,
the amplitude is modified because it exceeds its maximum value. Overdrive, as
often used for guitars, is often achieved by limiting: It happens because an
amplifier "overdrives" the maximum amplitude it can deliver.
ZynAddSubFX has two types of limiting. Soft limiting, here as *Lmt*, means
that the sound may not exceed a certain value. If the amplitude does so, it will
simply be reduced to the limiting value. The overtones are generated in the
lower frequencies first.
Hard limiting, is also called clipping and abbreviated *Clip*. This means that
if the maximum is exceeded, instead of being constant at the limiting value, the
original signal still has some influence on the output signal. Still, it does
not exceed the limiting value. For ZynAddSubFX, a signal exceeding the limiting
value will continue to grow "in the negative". This leads to overtones being
generated on the full frequency band.

View File

@@ -0,0 +1,59 @@
Appendix B: Building ZynAddSubFX
--------------------------------
Introduction to CMake
~~~~~~~~~~~~~~~~~~~~~
********************************************************************
Note: This section is mostly copied from the OpenSceneGraph wiki, at:
http://www.openscenegraph.org/projects/osg/wiki/Build/CMake
********************************************************************
ZynAddSubFX uses CMake as its unified build system. CMake
is able to read simple build scripts from the source tree and create
from this a platform-specific build system. This build system can be in
the form of VisualStudio project files, Unix Makefiles or XCode project
files. CMake is able to automatically locate external dependencies, and
allows you to toggle on/off module compilation and configure various
build options.
The use of a unified build system has allowed to avoid build breakages
that were common in the previous build method of maintaining three
separate build targets for VisualStudio, Unix "make" and XCode. It also
reduces the maintenance burden for core developers and contributors.
Taken together usage of CMake should result in better consistency and
more stable builds across all platforms for end users and a greater
productivity in development of new versions. Hopefully with greater
consistency of builds across platforms it will be easier for developers
to use the development version of ZynAddSubFX and help contribute
to its testing and refinement, leading to a high-quality code base.
Quick start guide
~~~~~~~~~~~~~~~~~
For the impatient ones, here is a quick guide on how to immediately
build ZynAddSubFX from source.
**************************************************************
Note: This assumes that you already have a copy of the source.
**************************************************************
---------------------------------
#enter the source directory
cd zynaddsubfx
#make a directory for an out-of-source build
mkdir build
cd build
#generate a cmake build project here from the cmake root, which is
#found in the directory below the current one
cmake ..
#OPTIONAL: Adjust compile variables in the Cache file:
ccmake .
#And finally, build as usual using make
make
---------------------------------

View File

@@ -0,0 +1,54 @@
Controller
---------
image::./images/uicontroller.png[]
General
~~~~~~~
* *ModWh*: Modullation Wheel depth
* *Exp MWh*: Exponental Modulation Wheel (changes modulation scale to
exponental)
* *BwDpth*: Bandwidth Depth
* *Exp BW*: Exponental Bandwidth (changes badwidth scale to exponental)
* *PanDpth*: Panning Depth
* *FltQ*: Filter Q (ressonance) depth
* *FltCut* Filter Cutoff frequency depth
* *Expr*: enable/disable expression
* *Vol*: enable/disable receiving volume controller
* *FMamp*: enable/disable receiving Modulation Amplitude controller (76)
* *Sustain*: enable/disable sustain pedal
* *PWheelB.Rng (cents)*: Pitch Wheel Bend Range (cents; 100 cents = 1 halftone)
Portamento
~~~~~~~~~~
* *Rcv.*: If the part receives portamento On/Off (65) controller
* *time*: The duration of the portamento
* *thresh*: The threshold of the portamento.
It represents the minimum or the maximum number of halftones
(or hundried cents) required to start the portamento.
The difference is computed between the last note and current note.
* *th.type*: The threshold type.
Checked means that the portamento activates when the difference of frequencies
is above the threshold ("thresh"); not checked is for below the threshold.
NOTE: The threshold refers to the frequencies and not to MIDI notes
(you should consider this if you use microtonal scales).
Proportinal Portamento
^^^^^^^^^^^^^^^^^^^^^^
////
TODO: add graphs to explain prp.rate and prp. depth
////
* *Propt.*: If the portamento is proportinal to ratio of frequencies
* *Prp. Rate*: Ratio needed to double the time of portamento
* *Prp. Dpth*: The divergence from
Resonance
~~~~~~~~~
* *CFdpth*: resonance center controller depth
* *BWdpth*: resonance bandwidth controller depth

View File

@@ -0,0 +1,531 @@
Effects
-------
Effects are, generally, blackboxes that transform audio signals in a
specified way. More exactly, the only input data for an effect in ZynAddSubFX
is:
* an array of samples, which is read *on line*
* the current system time (used for LFOs)
The output is the transformed array of samples.
NOTE: As described, effects have no information about anything else. For
example, key presses are not recognized. Therefore, pressing a key does not
initiate the LFO. Phase knobs will always be relative to a *global* LFO, which is
only dependent on the system time.
ZynAddSubFX has 3 types of effects:
* System Effects
* Insertion Effects
* Instrument Effects
TODO: Describe these 3 types (their differences).
[[effects::general_topics, General Topics]]
General topics
~~~~~~~~~~~~~~
* *Wetness* determines the mix of the results of the effect and its input. This
mix is made the effects output. If an effect is wet, it means that nothing of
the input signal is bypassing the effect. If it is dry, then the effect has no
effect. TODO: Difference between Volume and D/W?
* *Pan* lets you apply panning, which means that the sound source can move to
the right or left. Set it to 0.0 to only hear output on the right side, or to
the maximum value to only hear output on the left side.
* *LRc.* or *L/R* let you apply crossover.
* *Filter stages* are the number of times that this filter is applied in series.
So, if this number is 1, you simply have this one filter. If it is two, the
sound first passes the filter, and the results then pass the same filter again.
In ZynAddSubFX, the wetness is applied after all stages were passed.
* *LFOs* are, as the name says, oscillators with, compared to the frequency of
the sound, low frequency. They often appear in order to control the effect.
They can have some of the following controls:
** *LFO Type* determines the shape of the LFO. If not present, the LFO is a
sine wave.
** *Freq* determines the LFO's frequency.
** *Dpth* is a multiplier to the LFO. Thus, it determines the LFOs amplitude
and its influence.
** *Rnd* is the LFO amplitude's randomness
** *St.df* lets you determine how much left and right LFO are phase shifted.
64.0 means stereo, higher values increase the right LFO relatively to the left
one.
********************************************************************
Hint: Keep in mind that Effects that can be controlled by LFO can also be
controlled arbitrary: Set the LFO depth to zero and manipulate the phase knob
(e.g. with NRPNs or maybe via OSC in the future).
********************************************************************
Equalizer
~~~~~~~~~
Introduction
^^^^^^^^^^^^
An http://en.wikipedia.org/wiki/Filter_%28signal_processing%29[equalizer] is a
filter effect that applies different volume to different frequencies of the
input signal. This can, for example, be used to "filter out" unwanted
frequencies.
ZynAddSubFX's implementations follow the
http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt["Cookbook formulae for
audio EQ"] by Robert Bristow-Johnson.
Filter Types
^^^^^^^^^^^^
This topic is completely discussed in <<filters, the Filters section>>.
Usage
^^^^^
We describe all parts of the GUI here. The term passband (or often just "band")
refers to the amount of frequencies which are not significantly attenuated by
the filter.
* *Gain* (on the left) defines an offset which is added to the complete filter.
* *B.* lets you choose the passband number. Multiple passbands define one
filter. This is important if you want multiple filters to be called after each
other. Note that filters are commutative.
* *T.* lets you choose the current filter's type, as described above.
* *Freq* describes the frequencies where the filter has its poles. For some
filters, this is called the "cutoff" frequency. Note, however, that a bandpass
filter has two cutoff frequencies.
* *Gain* is only active for some filters and sets the amount of a special peak
these filters have. Note that for those filters, using the predefined gain makes
them effectless.
* *Resonance* lets you describe a peak at the given frequency for filters with
2 poles. This can be compared to real physical objects that have more gain at
their resonance frequency.
* *St.* lets you define multiple filter stages. This is equivalent to having
multiple copies of the same filter in sequence.
Chorus
~~~~~~
Introduction
^^^^^^^^^^^^
In a chorus, many people sing together. Even if each of them sings at exactly
the same frequency, all their voices usually sound different. We say they have a
different timbre. Timbre is the way we perceive sound and makes us differ
between different music instruments. This is, physically, achieved by varying
both the amplitude envelope and the frequency spectrum. Multiple sounds with
slightly different timbres make a sound more shimmering, or powerful. This is
called the chorus effect.
Function
^^^^^^^^
The chorus effect can be achieved by multiple people singing together. In
a concert, there are many instruments, resulting in the same effect. When making
electronic music, we only have an input wave and need to generate these
different timbres by ourselves. ZynAddSubFX therefore simply plays the sound,
pitch modulated by an LFO, and adds this to the original sound. This explains
the diagram below: The multiple pitches are generated by a delayed version of
the input. This version is being pitched by an LFO. More detailled, this pitch
is generated by varying the reading speed of the delayed sound; the variation
amount is controlled by an LFO.
image:./gen/chorus.png[width=700,
title="The chorus effect. z^(-n.m) describes the delay."]
TODO: Add LFO pointing to delay?
Related effects to Chorus are Flangers. Flangers can be described as Chorus
with very short LFO delay and little LFO depth. You can imagine a flanger as two
copies of a sound playing at almost the same time. This leeds to interference,
which can be clearly heared. It is popular to apply flangers to guitars, giving
them more "character".
Usage
^^^^^
* First, crossover is applied.
* The following 5 knobs (*Freq*, *Rnd*, *LFO Type*, *St.df*, *Depth*) control
the LFO for the pitch. If the depth is set to zero, the pitch will not be
changed at all.
* *Delay* is the time that the delayed sound is delayed "on average". Note that
the delay also depends on the current pitch.
* After the correct element of the sound buffer is found using the LFO, the
*Fb* knob lets you set how loud it shall be played. This is mostly redundant to
the *D/W* knob, but we have not applied panning and substraction yet.
* Next, the singal can be negated. If the *Substract* Checkbox is activated,
the amplitude is multiplied by -1.
* Finally, *Pan* lets you apply panning.
Distortion
~~~~~~~~~~
Introduction
^^^^^^^^^^^^
Distortion means, in general, altering a signal. Natural instruments
usually produce sine like waves. A wave is transformed in an unnatural way when
distortion is used. The most distorted waves are usually pulse waves. It is
typical for distortion to add overtones to a sound. Distortion often increases
the power and the http://en.wikipedia.org/wiki/Loudness[loudness] of a signal,
while the db level is not increased. This is an important topic in the
http://en.wikipedia.org/wiki/Loudness_war[Loudness War].
NOTE: As distortion increases loudness, distorted music can cause ear damage
at lower volume levels. Thus, you might want to use it a bit careful.
Distortion can happen in many situations when working with audio. Often, this is
not wanted. In classical music, for example, distortion does not occur
naturally. However, distortion can also be a wanted effect. It is typical for
Rock guitars, but also present in electronic music, mostly in Dubstep and
DrumNBass.
The basic components of distortion are mainly
* a preamplifier
* the waveshaping function
* filters
Preamplification changes the volume before the wave is shaped, and is indeed the
amount of distortion. For example, if you clip a signal, the louder the input
gets, the more distortion you will get. This can have different meanings for
different types of distortions, as described below.
********************************************************************
The filters are practical. A reason for using them afterwards is that distortion
can lead to waves with undesired high frequency parts. Those can be filtered out
using the LPF. A reason for using filters before applying is to achieve
multiband distortion. ZynAddSubFX has no "real" multiband distortion by now,
however.
********************************************************************
Types of Distortion
^^^^^^^^^^^^^^^^^^^
This topic is completely discussed in
<<adsynth::oscilllator::types_of_waveshaping, the Oscillator Section>>. Note
that you can use the
Oscillator editor in order to find out what your distortion effect does. Also
note that while the Oscillator editor's distortion is limited to some
oscillators you can produce in the Oscillator editor, the distortion effect can
be used on every wave that you can generate with ZynAddSubFX.
Function
^^^^^^^^
We explain the functionality in a diagram and list the components below.
image:./gen/distort.png[width=700,
title="The components of a distortion function."]
* Negation is the first thing to happen. If the *Neg* Checkbox is activated, the
amplitude is multiplied by -1.
* Panning is applied. Note, however, that you have to activate the
Stereo Checkbox, labeled *St*, before.
* Pre amplification is done next. The amount can be changed using the
*Drive* nob. Indeed, this is the amount of distortion. For example, if you clip
a signal, the louder the input gets, the more distortion you will get. This can
have different meanings for different types of distortion, as described above.
* *HPF* and *LPF* are filters with 2 poles. Whether they are used before or
after the waveshape, depends on the checkbox labeled *PF*.
* The next step is the wave shape. This defines how the wave is
actually modified. The *Type* ComboBox lets you define how. We will discuss some
types below.
* After the wave shape, we scale the level again. This is called
output amplification. You can change the value using the *Level* knob.
* Crossover is the last step. This is controlled by the knob *LR Mix* and
means that afterwards, a percentage of the left side is applied to the right
side, and, synchronously, the other way round. It is a kind of interpolation
between left and right. If you set the LR Mix to 0.0, you will always have a
stereo output.
Dynamic Filter
~~~~~~~~~~~~~
Introduction
^^^^^^^^^^^^
A dynamic filter is, as the name says, a filter which changes its parameters
dynamically, dependent on the input and current time. In ZynAddSubFX,
frequency is the only variable parameter. It can be used as an "envelope
following filter" (sometimes referenced "Auto Wah" or simply "envelope filter").
Function
^^^^^^^^
Though this filter might look a bit complicated, it is actually easy. We divide
the parameters into two classes:
* *Filter Parameters* are the ones you get when you click on *Filter*. They
give the filter its basic settings.
* *Effect Parameters* are the other ones that control how the filter changes.
The filter basically works like this: The input signal is passed through a
filter which dynamically changes its frequency. The frequency is an additive of:
* the filter's base frequency
* an LFO from the effect parameters
* the "amplitude" of the input wave
image:./gen/dynamic.png[width=700,
title="The components of a dynamical filter"]
The amplitude of the input wave is not the current amplitude, but the so called
https://en.wikipedia.org/wiki/Root_mean_square["Root Mean Square (RMS)"] value.
This means that we build a mean on the current amplitude and the past values.
How much the new amplitude takes influence is determined by the *Amplitude
Smoothness* (see below).
********************************************************************
RMS value plays an important role in the term loudness. A fully distorted
signal can sound 20 db louder due to its higher RMS value. This filter takes
this into account, depending on the smoothness.
********************************************************************
Usage
^^^^^
* The 4 knobs in the middle (*Freq*, *Rnd*, *LFO Type*, *St.df*) control the
LFO.
* Two knobs let you control the way how the RMS value of the amplitudes is
measured:
** *A.M* sets the Amplitude Smoothness (this is described above). The higher
you set this value, the more slow will the filter react.
** *A.Inv.*, if being set, negates the (absolute) RMS value. This will lower
the filter frequency instead of increasing it. Note that this will not have
much effect if the effects input is not very loud.
* The following controls define the mix of the LFO and the amplitude.
** *A.S* sets the Amplitude Sensing (i.e. how much influence the amplitude
shall have).
** *LfoD* sets the LFO depth.
* The filter button lets you choose the filter type.
* After the input signal has passed through the filter, *Pan* can apply
panning.
Echo
~~~~
Introduction
^^^^^^^^^^^^
The echo effect, also known as
http://en.wikipedia.org/wiki/Delay_%28audio_effect%29[delay effect], simulates
the natural reflection of a sound. The listener can hear the sound multiple
times, usually decreasing in volume. Echos can be useful to fill empty parts of
your songs with.
Function
^^^^^^^^
In ZynAddSubFX, the echo is basically implemented as the addition of the
current sound and a delayed version of it. The delay is implemented as in the
picture below. First, we add the delayed signal to the effect input. Then,
they pass an LP1. This shall simulate the effect of dampening, which means that
low and especially high frequencies get lost earlier over distance than middle
frequencies do. Next, the sound is delayed, and then it will be output and added
to the input.
image:./gen/echo.png[width="700",
title="The echo includes a fb line, labeled as z^-n, and a delay."]
********************************************************************
The exact formula in the source code for the dampening effect is as follows:
latexmath:[$Y(t) := (1-d) \cdot X(t) + d \cdot Y(t-1)$],
where latexmath:[t] be the time index for the input
buffer, latexmath:[d] be the dampening amount and latexmath:[X,Y] be the input,
respective the output of the dampening. This solves to
latexmath:[$Y(z) = Z(Y(t)) = (1-d) \cdot X(z) + d \cdot Y(z) \cdot z^{-1}$]
latexmath:[$\Leftrightarrow H(z) := \frac{Y(z)}{X(z)} = \frac{1-d}{1 -
d \cdot z^{-1}}$]
which is used in latexmath:[$Y(z) = H(z) \cdot X(z)$]. So latexmath:[$H(z)$] is
indeed a filter, and by looking at it, we see that it is an LP1. Note that
infinite looping for d=1 is impossible.
********************************************************************
Description
^^^^^^^^^^^
* *Pan* lets you apply panning of the input.
* *Delay* sets the time for one delay.
* *LRdl.* means Left-Right-Delay. If it is set to the middle, then both sides
are delayed equally. If not, then the left echo comes earlier and the right
echo comes (the same amount) later than the average echo; or the other way
round. Set the knob to 0 to hear on the right first.
* *LRc.* applies crossover.
* Feedback describes how much of the delay is added back to the input. Set
*Fb.* to the maximum to hear an infinite echo, or to the minimum to just
hear a single repeat.
* The *Damp* value lets the LP1 reject higher frequencies earlier if
increased.
Reverb
~~~~~~
Introduction
^^^^^^^^^^^^
A http://en.wikipedia.org/wiki/Reverberation[Reverberation] actually expresses
the effect of many echoes being played at the same time. This can happen in an
enclosed room, where the sound can be reflected in different angles. Also, in
nature, thunders approximate reverbs, because the sound is reflected in many
different ways, arriving at the listener at different times.
In music, reverbs are popular in many ways. Reverbs with large room size can be
used to emulate sounds like in live concerts. This is useful for voices, pads,
and hand claps. A small room size can simulate the sound board of string
instruments, like guitars or pianos.
Function
^^^^^^^^
As mentioned, a reverb consists of permanent echo. The reverb in ZynAddSubFX is
more complex than the echo. After the delaying, comb filters and then allpass
filters are being applied. These make the resulting sound more realistic. The
parameters for these filters depend on the roomsize. For details, consider the
information about https://ccrma.stanford.edu/~jos/pasp/Freeverb.html[Freeverb].
image:./gen/reverb.png[width=700,
"The reverb, being similar to the echo."]
Description
^^^^^^^^^^^
* The *Type* ComboBox lets you select a reverb type:
** *Freeverb* is a preset. It was proposed by Jezar at Dreampoint.
** *Bandwidth* has the same parameters for the comb and allpass filters, but it
applies a unison before the LP/HP. The unison's bandwidth can be set using *bw*.
** Random chooses a random layout for comb and allpass each time the type or
the roomsize is being changed.
* The roomsize (*R.S.*) defines parameters only for the comb and allpass
filters.
* *Time* controls how long the whole reverb shall take, including how slow the
volume is decreased.
* The initial delay (*I.del*) is the time which the sounds need at least to
return to the user. The initial delay feedback (*I.delfb*) says how much of the
delayed sound is added to the input.
* Low pass filter (*LPF*) and high pass filter (*HPF*) can be applied before
the comb filters.
* The dampening control (*Damp*) currently only allows to damp low frequencies.
Its parameters are being used by the comb and allpass filters.
* *Pan* lets you apply panning. This is the last thing to happen.
Phaser
~~~~~~
Introduction
^^^^^^^^^^^^
The http://en.wikipedia.org/wiki/Phaser_%28effect%29[Phaser] is a special
dynamic filter. The result is a sweeping
sound, which is
often used on instruments with a large frequency band, like guitars or strings.
This makes it typical for genres like rock or funk, where it is often modulated
with a pedal, but also for giving strings a warm, relaxing character.
Function
^^^^^^^^
The audio signal is split into two paths. One path remains unchanged. The other
one is sent to a delay line. The delay time (the so called *phase*) is made
dependent on the frequency. Therefore, an all-pass filter is applied to the
signal, which *preserves* the amplitude, but determines the delay time. In the
end, both paths are added.
The following picture describes how this works on white noise. Light blue
signalises that the frequency is not present at the current time, and dark blue
signalises the opposite. The dark blue peaks appear if the delay time is very
short, because then, the second path almost equals the first one, which results
in duplication of the signal. If the delay line is very long, then it is --- in
the case of white noise --- totally at random whether the delayed signal
currently duplicates the unchanged path, or whether it cancels it out to zero.
This random effect results in white noise between the clear blue structures.
image:./images/phaser-spectrogram.jpg[width="700",
title="Spectrogram of an 8-stage phaser
modulated by a sine LFO applied to white noise."]
Phaser Types
^^^^^^^^^^^^
ZynAddSubFX offers different types of phasers:
* Analog and "normal" phasers. Analog phasers are more complicated. They sound
punchier, while normal phasers sound more fluently. However, analog filters
usually need more filter stages to reach a characteristic sound.
* Sine and triangle filters. Note that an analog triangle filter with many poles
is a barber pole filter and can be used to generate
http://en.wikipedia.org/wiki/Shepard_tone[Shepard Tones],
i.e. tones that seem to increase or decrease with time, but do not really.
* The LFO function can be squared. This converts the triangle wave into a hyper
sine wave. The sine squared is simply a faster sine wave.
* TODO: Barber is deactivated, since PLFOtype is only 0 or 1?
Description
^^^^^^^^^^^
For the normal phaser, first, the LFO is generated:
* There are 4 controls (*Freq*,*Rnd*,*LFO tpye*,*St.df*) that define the
LFO.
* *Phase* and *Depth* are applied afterwards in the usual way (TODO: I don't
understand the code here for the normal phase...). For the analog phaser,
*Phase* is not implemented, yet.
** If *hyp* is being set, then the LFO function is being squared.
Next, the input is being used.
* *Analog* decides whether the phaser is analog or "normal".
* First, *Pan* applies panning to the original input in every loop.
* Next, barber pole phasing is being applied (Analog only).
* *Fb* applies feedback. The last sound buffer element is (after
phasing) multiplied by this value and then added to the current one. For normal
filter, the value is added before, for analog after the first phasing stage.
* Now, *Stages* phasing stages are being applied. *dist* sets the distortion
for when applying the phasing stages. This has only effect for analog phasers.
* The feedback is taken now.
* In the end, *Substract* inverts the signal, multiplying it by -1.
Alienwah
~~~~~~~~
Introduction
^^^^^^^^^^^^
The AlienWah effect is a special, dynamic
http://en.wikipedia.org/wiki/Formant[formant] filter (TODO: is this true?).
Paul Nasca named it AlienWah because it sounded "a bit like wahwah, but more
strange". The result of the filter is a sound varying between the
vocals "Ahhhhh" (or "Uhhhhh") and "Eeeeee".
Function
^^^^^^^^
The way that the filter moves between the two vocals is mainly
described by an LFO. A bit easified, Paul Nasca has stated the formula (for
latexmath:[$i^2=-1; R<1$]) as
latexmath:[$fb=R*(\cos(\alpha)+i*\sin(\alpha))$]
latexmath:[$y_n=y_{n-delay}*R*(\cos(\alpha)+i*\sin(\alpha))+x_n*(1-R)$].
The input latexmath:[$x_n$] has the real part of the samples from the wavefile
and the imaginary part is zero. The output of this effect is the real part of
latexmath:[$y_n$]. latexmath:[$\alpha$] is the phase.
Description
^^^^^^^^^^^
* *Pan*
* The following 5 controls (*Freq*,*Rnd*,*LFO tpye*,*St.df*, *Dpth*) define the
LFO.
** *Fb*
** *Delay* If this value is low, the sound is turned more into a
"wah-wah"-effect.
** *Phase* See latexmath:[$\alpha$] in the above formula. This lets you set
where the vocal is between "Ahhhhh" and "Eeeeee".
** *L/R* applies crossover in the end of every stage. This is currently not
implemented for the Analog Phaser.

View File

@@ -0,0 +1,131 @@
Envelopes
---------
Introduction
~~~~~~~~~~~~
Envelopes control how the amplitude, the frequency, or the
filter changes over time.
Amplitude Envelopes
~~~~~~~~~~~~~~~~~~~
These envelopes controls the amplitude of the sound.
In ZynAddSubFX, amplitude envelopes can be linear or logarithmic.
In the next image, it is shown the differences between these envelopes.
image::images/envelope1.png[Alt text]
The amplitude envelope is divided into:
* *Attack*: Begins at the Note On. The volume starts from 0 to the maximum.
In ZynAddSubFX, the attack is always linear.
* *Decay*: The volume drops from the maximum value to a level called "Sustain level"
* *Sustain*: The volume remains constant until the key is depressed (Note Off).
After this, the last stage take place.
* *Release*: The volume drops to zero
Frequency Envelopes
~~~~~~~~~~~~~~~~~~~
These envelopes controls the frequency (more exactly, the pitch) of
the oscillators.
The following picture draws the stages of these envelopes.
image::images/envelope2.png[Alt text]
The dotted line represents the real pitch of the sound without the
envelope.
The frequency envelopes are divided into 3 stages:
* *Attack*: Begins at the Note On. The frequency starts from a certain value and
glides to the real frequency of the note.
* *Sustain*: The frequency is the same on over the sustain period
* *Release*: This stage begins on Note Off and glides the frequency of the note
to a certain
value
Filter Envelopes
~~~~~~~~~~~~~~~~
These envelopes controls the cutoff frequency of the filters and are divided
into
image:images/envelope3.png[Alt Text]
* *Attack*: Begins at the Note On. The cutoff frequency starts from a certain value and glides to another value
* *Decay*: The cutoff frequency continues to glide to the real cutoff frequency value of the filter (dotted line)
* *Sustain*: the cutoff frequency is the same on over the sustain period (dotted line)
* *Release*: this stage begins on Note Off and glides the filter cutoff frequency of the note to a certain value
Freemode Envelopes
~~~~~~~~~~~~~~~~~~
For all envelope there is a mode that allows the user to set an arbitrary number of stages and control points. This mode is called Freemode.
image:images/envelope4.png[Alt Text]
Only stage that always remains defined is the Sustain, where the envelopes freezes until a Note Off event.
User Interface
~~~~~~~~~~~~~~
All the envelope types has some common controls:
* *E*: Shows a window that you can view the real envelope shape or convert to free mode to edit it
* *Stretch*: How the envelope is stretched according the note.
On the higher notes the envelopes are shorter than lower notes.
In the leftmost value, the stretch is zero.
The rightmost use a stretch of 200%; this means that the envelope is stretched about 4 times/octave.
* *frcR*: Forced release.
This means that if this option is turned on, the release will go to the final value, even if the sustain stage is not reached. Usually, this must be set.
The parameters for Amplitude Envelopes for ZynAddSubFX are:
image:images/uienvelope3.jpg[Alt Text]
* *A.dt*: Attack duration
* *D.dt*: Decay duration
* *S.Val*: Sustain value
* *R.dt*: Release time
* *L*: If this option is set, the envelope is linear, otherwise, it will be
logarithmic
For Frequency Envelopes the interface has the following parameters:
image:images/uienvelope2.jpg[Alt Text]
* *A.val*: Attack value
* *A.dt*: Attack duration
* *R.dt*: Release time
* *R.val*: Release value
Filter Envelopes has the parameters:
image:images/uienvelope1.jpg[Alt Text]
* *A.val*: Attack value
* *A.dt*: Attack duration
* *D.val*: Decay value
* *D.dt*: Decay time
* *R.dt*: Release time
* *R.val*: Release value
The Freemode envelopes has a separate window to set the parameters and controls:
image:images/uienvelope0.jpg[]
* *Control points*: You can move the points using the mouse.
In the right on the windows, it is shown the total duration of the envelope.
If the mouse button will be pressed on a control point, it will be shown the
duration of the stage where the point is.
* *FreeMode*: this button activates or deactivates the freemode mode.
* *Add Point*: Adds the point next to the current selected point.
You can select a point by clicking on it.
* *Delete point*: Removes the point from the envelope.
* *Sust.*: Set the sustain point. It is shown using the yellow line.
* *Str.*: Envelope stretch

View File

@@ -0,0 +1,81 @@
[[filters]]
Filters
-------
:Author: Mark McCurry
:Date: June 24, 2012
ZynAddSubFX offers several different types of filters, which can be used to
shape the spectrum of a signal.
The primary parameters that affect the characteristics of the filter are the
cutoff, resonance, filter stages, and the filter type.
* *Cutoff*: This value determines which frequency marks the changing point for
the filter. In a low pass filter, this value marks the point where
higher frequencies are attenuated.
* *Resonance*: The resonance of a filter determines how much excess energy is
present at the cutoff frequency. In ZynAddSubFX, this is
represented by the Q-factor, which is defined to be the cutoff
frequency divided by the bandwidth. In other words higher Q
values result in a much more narrow resonant spike.
* *Stages*: The number of stages in a given filter describes how sharply it is
able to make changes in the frequency response.
The basic 'analog' filters that ZynAddSubFX offers are shown below, with the
center frequency being marked by the red line.
The 'state variable' filters should look quite similar.
image:images/filter0.png[]
As previously mentioned, the Q value of a filter affects how concentrated the
signal's energy is at the cutoff frequency; The result of differing Q values are
below.
TIP: For many classical analog sounds, high Q values were used on sweeping
filters. A simple high Q low pass filter modulated by a strong envelope is
usually sufficient to get a good sound.
image:images/filter1.png[]
Lastly, the affect of the order of the filter can be seen below.
This is roughly synonymous with the number of stages of the filter.
For more complex patches it is important to realize that the extra sharpness in
the filter does not come for free as it requires many more calculations being
performed; This phenomena is the most visible in subsynth, where it is easy to
need several hundred filter stages to produce a given note.
image:images/filter2.png[]
There are different types of filters. The number of poles define what will
happen at a given frequency. Mathematically, the filters are functions which
have poles that correspond to that frequency. Usually, two poles mean that the
function has more "steepness", and that you can set the exact value of the
function at the poles by defining the "resonance value". Filters with two poles
are also often referenced
as http://de.wikipedia.org/wiki/Butterworth-Filter[Butterworth Filters].
********************************************************************
For the interested, functions having poles means that we are given a quotient of
polynomials. The denominator has degree 1 or 2, depending on the filter having
one or two poles. In the file _DSP/AnalogFilter.cpp_,
_AnalogFilter::computefiltercoefs()_ sets the coefficients (depending on the
filter type), and _AnalogFilter::singlefilterout()_ shows the whole polynomial
(in a formula where no quotient is needed).
********************************************************************
User Interface
~~~~~~~~~~~~~~
image:images/uifilter.png[]
* *C.freq*: Cutoff frequency
* *Q*: Level of resonance for the filter
* *V.SnsA.*: Velocity sensing amount for filter cutoff
* *V.Sns.*: Velocity sensing function
* *freq.tr*: Frequency tracking amount. When this parameter is positive, higher
note frequencies shift the filter's cutoff frequency higher.
* *gain*: Additional gain/attenuation for filter
* *St*: Filter stages
NOTE: TODO add a lengthy section on the formant filter setup

View File

@@ -0,0 +1,37 @@
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes,chains,scopes}
\begin{document}
\input{fig.sty}
\begin{tikzpicture}
\matrix (mtx) [matrix of nodes, row sep=5mm, column sep=5mm] {
&
|[lfo]| Freq LFO &
|[lfo]| Filter LFO &
|[lfo]| Amp LFO &
&\\
|[block]| Base Fq. &
|[block]| Voices &
|[block]| Filter &
|[block, shape=isosceles triangle]| Volume &
{Output} \\
&
|[env]| Freq Env&
|[env]| Filter Env&
|[env]| Amp Env&\\
};
{ [start chain=trunk]
\chainin (mtx-2-1)[join=by tip];
\chainin (mtx-2-2)[join=by tip];
\chainin (mtx-2-3)[join=by tip];
\chainin (mtx-2-4)[join=by tip];
\chainin (mtx-2-5)[join=by tip];
}
\foreach \i in {2,3,4}
{
\draw[->] (mtx-1-\i) -- (mtx-2-\i);
\draw[->] (mtx-3-\i) -- (mtx-2-\i);
}
\end{tikzpicture}
\end{document}

View File

@@ -0,0 +1,38 @@
\documentclass[12pt]{report}
\pagestyle{empty}
\usepackage{pst-sigsys}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}[showgrid=false](0,-1)(8,2)
%Style
\psset{framesize=1 .65}
\psset{style=Arrow}
%In/Out
\rput(0,0){\rnode{in}{$x[n]$}}
\rput(8,0){\rnode{out}{$y[n]$}}
%Crossover
\psfblock[framesize=2 .65](1.5,0){cross}{Crossover}
%Feedback over fractional delay
\pscircleop(3,0){comb}
\psfblock[framesize=1.2 .65](4.5,0){delay}{$z^{-n.m}$}
\pnode(5.5,0){decoration}
\pscircleop[operation=times](4,1){fb}
\rput(4,1.5){Feedback}
\ncangle[angleA=90]{decoration}{fb}
\ncangle[angleA=180,angleB=90]{fb}{comb}
%subtract?
\pscircleop[operation=times] (6,0){sub}
\rput(6,-0.5){Subtract}
%Panning
\pscircleop[operation=times] (7,0){pan}
\rput(7,0.5){Panning}
%Connections
\nclist{ncline}{in,cross,comb,delay,sub,pan,out}
\end{pspicture}
\end{document}

View File

@@ -0,0 +1,44 @@
\documentclass[11pt]{report}
\pagestyle{empty}
\usepackage{pst-sigsys}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}[showgrid=false](0,-2)(10,2)
%Style
\psset{framesize=1 .65}
\psset{style=Arrow}
%In/Out
\rput(0,0){\rnode{in}{$x[n]$}}
\rput(9.5,0){\rnode{out}{$y[n]$}}
%Panning
\rput(1,0.5){Panning}
\pscircleop[operation=times] (1,0){pan}
\ncline{in}{pan}
%Preamp
\rput(2,-0.5){Preamp}
\pscircleop[operation=times] (2,0){preamp}
\ncline{pan}{preamp}
%Filtering
\psfblock(3,0){fil1}{Filter}
\ncline{preamp}{fil1}
%Distortion
\psfblock(4.5,0){shape}{$H(n)$}
\ncline{fil1}{shape}
%Filtering
\psfblock(6,0){fil2}{Filter}
\ncline{shape}{fil2}
%Crossover
\psfblock[framesize=1.8 .65](8,0){cross}{Crossover}
\ncline{fil2}{cross}
\ncline{cross}{out}
\end{pspicture}
\end{document}

View File

@@ -0,0 +1,46 @@
\documentclass[11pt]{report}
\pagestyle{empty}
\usepackage{pst-sigsys}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}[showgrid=false](0,0)(8,2)
%Style
\psset{framesize=1 .65}
\psset{style=Arrow}
%In/Out
\rput(0,0){\rnode{in}{$x[n]$}}
\rput(8,0){\rnode{out}{$y[n]$}}
%Smoothing
\psfblock(1,1){smooth}{LPF}
\rput(1,1.6){smooth}
%Sensing
\pscircleop[operation=times](2.5,1){sense}
\rput(2.5,1.5){sense}
%Combine
\pscircleop(4,1){comb}
%Depth
\pscircleop[operation=times](5.5,1){depth}
\rput(5.5,1.5){depth}
%LFO
\psfblock(7,1){lfo}{LFO}
%Filter
\psfblock(4,0){fil}{Filter}
%Panning
\pscircleop[operation=times] (5.5,0){pan}
\rput(5.5,-0.5){Panning}
%Connections
\pnode(1,0){decoration}
\nclist{ncline}{in,fil,pan,out}
\nclist{ncline}{decoration,smooth,sense,comb,fil}
\nclist{ncline}{lfo,depth,comb}
\end{pspicture}
\end{document}

View File

@@ -0,0 +1,43 @@
\documentclass[11pt]{report}
\pagestyle{empty}
\usepackage{pst-sigsys}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}[showgrid=false](0,0)(8,2)
%Style
\psset{framesize=1 .65}
\psset{style=Arrow}
%In/Out
\rput(0,0){\rnode{in}{$x[n]$}}
\rput(8,0){\rnode{out}{$y[n]$}}
%Panning
\rput(1,0.5){Panning}
\pscircleop[operation=times] (1,0){pan}
\ncline{in}{pan}
%Crossover
\psfblock[framesize=1.8 .65](6,0){cross}{Crossover}
%Feedback
\rput(4,1.5){Feedback}
\pscircleop[operation=times](4,1){fb}
\ncangle[angleA=90,angleB=0]{cross}{fb}
\pscircleop(2,0){combine}
\ncline{pan}{combine}
\ncangle[angleA=180,angleB=90]{fb}{combine}
%Dampining
\psfblock(3,0){hidamp}{LPF}
\ncline{combine}{hidamp}
%Delay
\psfblock(4.3,0){delay}{$z^{-n}$}
\ncline{hidamp}{delay}
\ncline{delay}{cross}
\ncline{cross}{out}
\end{pspicture}
\end{document}

View File

@@ -0,0 +1,14 @@
\tikzset{
>=stealth,
thick,
block/.style={rectangle, draw=black!50, thick,
top color=white,
bottom color=red!50!black!20,
font=\itshape},
op/.style={circle, draw=black!50, thick,
top color=white,bottom color=black!20,
font=\ttfamily},
lfo/.style={block,bottom color=orange!80},
env/.style={block,bottom color=yellow!80},
tip/.style={->,shorten >=1pt}
}

View File

@@ -0,0 +1,50 @@
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes,chains,scopes}
\begin{document}
\input{fig.sty}
\begin{tikzpicture}[
point/.style={coordinate},
every on chain/.style={rounded corners}]
%Style
\matrix[row sep=5mm, column sep=5mm] {
&
\node (fb) {$f_b$};&
\node (del) {$Delay$};
&&&&& \\
&
\node[op] (pb1) {$\times$};&
\node[block] (pb2) {$z^{-n}$}; &
&&&& \\
\node (p1) {$x[n]$}; &
\node[op] (p2) {$+$}; &
\node[point] (p3) {};&
\node[block] (p4) {HP/LP}; &
\node[block] (p5) {Comb Filter}; &
\node[block] (p6) {Allpass}; &
\node (p7) {$y[n]$}; \\
};
\draw[->] (fb) -- (pb1);
\draw[->] (del) -- (pb2);
{ [start chain=trunk]
\chainin (p1)[join=by tip];
\chainin (p2)[join=by tip] ;
\chainin (p3)[join=by {}];
%\chainin[join by={}] (p3);
{ [start branch]
\chainin (pb2)[join=by tip];
\chainin (pb1)[join=by tip];
\chainin (p2)[join=by tip];
}
\chainin (p4)[join=by tip];
\chainin (p5)[join=by tip];
\chainin (p6)[join=by tip];
\chainin (p7)[join=by tip];
}
\end{tikzpicture}
\end{document}

View File

@@ -0,0 +1,16 @@
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=0:1,samples=128,no markers,
xlabel=Note Velocity,ylabel=Param Magnitude,
legend style={ cells={anchor=east}, legend pos=outer north east}]
\addplot gnuplot{x^8^1};
\addlegendentry{max sensing}
\addplot gnuplot{x^(8^-1)};
\addlegendentry{min sensing}
\addplot gnuplot{x};
\addlegendentry{avg sensing}
\end{axis}
\end{tikzpicture}
\end{document}

View File

@@ -0,0 +1,65 @@
Appendix C: Getting ZynAddSubFX
-------------------------------
Usually there are several methods to obtain a copy of ZynAddSubFX.
SourceForge::
http://sourceforge.net/projects/zynaddsubfx/files/
Distribuition::
apt/yum/others
Git::
git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx
Introduction to Git
~~~~~~~~~~~~~~~~~~~
For those who want to live on the bleeding edge or who want to assist with
making sure that the next release has fewer bugs, you will want to get aquanted
with git.
Git is used to manage the source code for this project and can be used to
quickly and easily get an up-to-date copy of the source code.
Getting the Source Code
^^^^^^^^^^^^^^^^^^^^^^^
In order to get a copy of the ZynAddSubFX source code, all that needs to be done is:
---------------------------------------------
git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx
cd zynaddsubfx
#Download additional resources
git submodule init
git submodule update
---------------------------------------------
You should now be in the directory of the source code.
For simple steps on building, please see Appendix B of the manual.
Checking out a branch
^^^^^^^^^^^^^^^^^^^^^
Lets say that development has extended into the creation of a new feature that
you want to preview.
For the sake of this guide, lets assume that the name of the branch that the
feature is on is foo.
-----------------------------------------
#checkout the foo branch from sourceforge
git checkout --track -b foo origin/foo
#lets checkout the primary branch again
git checkout master
#hop back to the other branch
git checkout foo
----------------------------------------
Now one should be able to change branches and go into the build directory (as
described in Appendix B) and recompile ZynAddSubFX.
NOTE: When using branches other than the master be aware that stability may
suffer

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,59 @@
Getting Started
---------------
ZynAddSubFX is a fairly complex software synthesizer with a very large number of
controls.
As such, it is not alway obvious how to use ZynAddSubFX.
Many applications under Linux transport MIDI over ALSA and transmit audio over
JACK.
ZynAddSubFX can be run in this configuration by running:
------------------------------
zynaddsubfx -I alsa -O jack -a
------------------------------
This sets the input driver to be alsa and the output driver to be jack, which
should attempt to autoconnect to your soundcard as per the '-a' flag.
If this is your first time running ZynAddSubFX, you will see a screen that lets
you choose between the advanced and beginner interface.
Currently the beginner interface is deprecated, so the advanced one is
recommended.
Now you should be able to see ZynAddSubFX's main window, from which you can
setup patches, effects, and general configurations, but more importatnly it
provides links into the parameters of the patches.
ZynAddSubFX is a powerful tool with a number of base patches, but its true power
lies in the ability to make your own patches.
.Main Window
image::./images/uimain.png[]
For basic usage, you will want to use the button to the right of the enabled
label.
This button will allow for one to select the desired instrument from the banks
that ZynAddSubFX has available.
To play notes in ZynAddSubFX, either utilize the builtin virtual keyboard
(accessible via the vK button) or connect your keyboard to the system and use
*aconnect* to connect it to ZynAddSubFX (assuming that ALSA was used).
This main window provides access to a number of more advanced features.
Some of these features are:
* System Effects
* Insertion Effects
* Recording
* Part Settings (instrument level settings)
* Master Settings
* Microtonal Settings
For instance to use the recording feature, a wave file must be selected from the
recording menu and then the recording can be started with the record button and
stopped with the stop button.
This is a simple and quick way of recording some samples from ZynAddSubFX,
though there are more full featured options available via JACK recording tools.
NOTE: After hitting record, the wave file will not start recording until a new
key has been pressed via either an external midi source or the virtual keyboard
Both system and insertion effects can be accessed, the properties are available as well as properties of each
instrument.

View File

@@ -0,0 +1,65 @@
LFO
---
:author: Paul Nasca
Introduction
~~~~~~~~~~~~
"LFO" means Low Frequency Oscillator.
These oscillators are not used to make sounds by themselves, but they changes
somes parameters (like the frequencies, the amplitudes or the filters).
The LFOs has some basic parameters:
* *Delay*: This parameter sets how much time takes since the start of the
note to the start of the LFO
* *Start Phase*: The possition that a LFO will start at
* *Frequency*: How fast the LFO is (i.e. how fast the parameter's controlled by
the LFO changes)
* *Depth*: The amplitude of the LFO (i.e. how much the parameter's controlled
by the LFO changes)
image:images/lfo0.png[]
Another important LFO parameter is the shape.
There are many LFO Types according to the shape.
ZynAddSubFX supports the folowing LFO shapes:
image:images/lfo1.png[]
Another parameter is the LFO Randomness.
It modifies the LFO amplitude or the LFO frequency at random.
In ZynAddSubFX you can choose how much the LFO frequency or LFO amplitude
changes by this parameter.
In the folowing images are shown some examples of randomness and how changes
the shape of a triangle LFO.
image:images/lfo2.png[]
Other parameters are:
* *Continous mode*: If this mode is used, the LFO will not start from "zero" on each new note, but it will be continuous. This is very usefull if you apply on filters to make interesting sweeps.
* *Stretch*: It controlls how much the LFO frequency changes according to the
note's frequency.
It can vary from negative stretch (the LFO frequency is decreased on higher
notes) to zero (the LFO frequency will be the same on all notes) to positive
stretch (the LFO frequency will be increased on higher notes).
User Interface
~~~~~~~~~~~~~~
In ZynAddSubFX, LFO parameters are shown as:
image:images/uilfo.jpg[]
Theese parameters are:
* *Freq*: LFO Frequency
* *Depth*: LFO Depth
* *Start*: LFO Start Phase -
If this knob is at the lowest value, the LFO Start Phase will be random.
* *Delay*: LFO Delay
* *A.R.*: LFO Amplitude Randomnes
* *F.R.*: LFO Frequency Randomness
* *C.*: LFO Continous Mode
* *Str.*: LFO Stretch - in the image above the LFO stretch is set to zero

View File

@@ -0,0 +1,22 @@
Appendex A: MIDI Defaults
-------------------------
.Default MIDI Connections
[literal]
001 - Modulation Wheel
007 - Volume
010 - Pan
011 - Expression
064 - Sustain
065 - Portamento Enable
071 - Filter Q
074 - Filter Cutoff
075 - Bandwidth(*)
076 - Modulation Amplitude(*)
077 - Resonance Center Frequency(*)
078 - Resonance Bandwidth(*)
120 - All Sounds Off
121 - Reset All Controllers
123 - All Notes Off
The entries with `(*)` are not within the General Midi specification

View File

@@ -0,0 +1,162 @@
NRPN (Non Registered Parameters Number)
---------------------------------------
NRPNs can control all system and insertion effect parameters.
For example, you may change the reverb time when playing to keyboard or
flanger's lfo frequency.
You can disable the NRPN receiving by deselecting the "NRPN" checkbox from the
main window (near "Master Keyshift" counter).
The controls can be sent on any midi channel
(the midi channels numbers are ignored).
The parameters are:
- NRPN coarse (99 or 0x63)sets the system/insertion effects (4 for system effects or 8 for insertion effects)
- NRPN fine (98 or 0x62)sets the number of the effect (first effect is 0)
- Data entry coarse (6) sets the parameter number of effect to change(see below)
- Data entry fine (26) sets the parameter of the effect
You have to send NRPN coarse/fine before sending Data entry coarse/fine.
If the effect/parameter doesn't exists or is set to none, then the NRPN is
ignored.
Example(all values in this example are hex):
B0 63 08 // Select the insertion effects
B0 62 01 // Select the second effect (remember: the first is 00 and not 01)
B0 06 00 // Select the effect parameter 00
B0 26 7F // Change the parameter of effect to the value 7F (127)
WARNING: Changing of some of the effect parameters produces clicks when sounds
passes thru these effects.
I advise you to change only when the sound volume that passes thru the effect to be very low (or silence).
Some parameters produce clicks when are changed very fast.
Here are the effects parameter number (for Data entry coarse).
The parameters that produces clicks are written in [red]#red# and have (AC)
after their entry (always clicks).
The parameter that produces clicks only when they are changed fast are written
in [orange]#orange# and have a (FC) after the entry (Fast Clicks).
Most parameters has the range from 0 to 127.
When parameters have another range, it is written as [low...high] .
Reverb
~~~~~~
[verse]
+[orange]#00 - Volume or Dry/Wet (FC)#
[orange]#01 - Pan (FC)#
02 - Reverb Time
[orange]#03 - Initial Delay (FC)#
04 - Initial Delay Feedback
[grey]#05 - reserved#
[grey]#06 - reserved#
07 - Low Pass
08 - High Pass
09 - High Frequency Damping [64..127] 64=no damping
[red]#10 - Reverb Type [0..1] 0 - Random, 1 - Freeverb (AC)#
[red]#11 - Room Size (AC)#+
Echo
~~~~
[verse]
+[orange]#00 - Volume or Dry/Wet (FC)#
[orange]#01 - Pan (FC)#
[red]#02 - Delay (AC)#
[red]#03 - Delay between left and right (AC)#
[orange]#04 - Left/Right Crossing (FC)#
05 - Feedback
06 - High Frequency Damp+
Chorus
~~~~~~
[verse]
+[orange]#00 - Volume or Dry/Wet (FC)#
[orange]#01 - Pan (FC)#
02 - LFO Frequency
03 - LFO Randomness
04 - LFO Type [0..1]
05 - LFO Stereo Difference
06 - LFO Depth
07 - Delay
08 - Feedback
[orange]#09 - Left/Right Crossing (FC)#
[grey]#10 - reserved#
[red]#11 - Mode [0..1] (0=add, 1=subtract) (AC)#+
Phaser
~~~~~~
[verse]
+[orange]#00 - Volume or Dry/Wet (FC)#
[orange]#01 - Pan (FC)#
02 - LFO Frequency
03 - LFO Randomness
04 - LFO Type [0..1]
05 - LFO Stereo Difference
06 - LFO Depth
07 - Feedback
[red]#08 - Number of stages [0..11] (AC)#
[orange]#09 - Let/Right Crossing (FC)#
[red]#10 - Mode [0..1] (0=add, 1=subtract) (AC)#
11 - Phase+
AlienWah
~~~~~~~~
[verse]
+[orange]#00 - Volume or Dry/Wet (FC)#
[orange]#01 - Pan (FC)#
02 - LFO Frequency
03 - LFO Randomness
04 - LFO Type [0..1]
05 - LFO Stereo Difference
06 - LFO Depth
07 - Feedback
08 - Delay [0..100]
[orange]#09 - Left/Right Crossing (FC)#
10 - Phase+
Distorsion
~~~~~~~~~~
[verse]
+[orange]#00 - Volume or Dry/Wet (FC)#
[orange]#01 - Pan (FC)#
02 - Left/Right Crossing
[orange]#03 - Drive (FC)#
[orange]#04 - Level (FC)#
05 - Type [0..11]
06 - Invert the signal (negate) [0..1]
07 - Low Pass
08 - High Pass
09 - Mode [0.1] (0=mono,1=stereo)+
EQ
~~
[verse]
+[orange]#00 - Gain (FC)#+
All other settings of the EQ are shown in a different way.
The N represent the band ("B." setting in the UI) and the first band is 0
(and not 1), like it is shown in the UI.
Change the "N" with the band you like.
If you want to change a band that doesn't exist, the NRPN will be ignored.
[verse]
+[red]#10+N*5 - Change the mode of the filter [0..9] (AC)#
11+N*5 - Band's filter frequency
12+N*5 - Band's filter gain
13+N*5 - Band's filter Q (bandwidth or resonance)
[grey]#14+N*5 - reserved#+
Example of setting the gain on the second band:
. The bands start counting from 0, so the second band is 1 => N=1.
. The formula is 12+N*5 => 12+1*5=17, so the number of effect parameter
. (for Data entry coarse) is 17.

View File

@@ -0,0 +1,55 @@
Persistence
-----------
As with most applications ZynAddSubFX allows for one to ave your work and reload
it.
Saving it all
~~~~~~~~~~~~~
One of the simplest ways to save your work is to save the entire session.
This can be done through the File menu and will result in the creation of an
.xmz file.
Once created, this file will hold the settings for all settings within that
session, such as microtonal tunings, all patches, system effects, insertion
effects, etc...
Saving Parts
~~~~~~~~~~~~
In many cases saving everything is not what is desired.
Saving a patch later on is one such example.
Patches
^^^^^^^
In order to save a patch, one can either save it from the instruments menu or
through the bank window.
With the instrument menu, one can just save the file to any given location with
the .xiz extension.
With the banks menu, one can assign a patch to a given slot with a bank.
This instrument will remain here for future use until it is deleted.
To see the physical location of the .xiz file, one should check the
File->Settings->Bank_Root_Dirs window to see the paths for banks.
NOTE: You need to have write permissions to add instruments to the bank.
Presets
^^^^^^^
Have a favorite setting for an envelope, a difficult to reproduce oscillator?
Then presets are for you.
Presets allow for one to save the settings for any of the components which
support copy/paste operations.
This is done with preset files (.xpz), which get stored in the folders indicated
by File->Settings->Preset_Root_Dirs.
Summary
~~~~~~~
.Extension Summary
[literal]
xmz Everything
xiz Instrument
xsz Scale Settings
xpz Presets

View File

@@ -0,0 +1,82 @@
ZYNADDSUBFX(1)
==============
:doctype: manpage
NAME
----
zynaddsubfx - a software synthesizer
SYNOPSIS
--------
*zynaddsubfx* ['OPTIONS']
DESCRIPTION
-----------
*zynaddsubfx* is a polyphonic multimbral synthesizer, which supports three
synthesis engines and numerous effects to generate sound.
1) ADsynth generates sounds by adding a number of voices.
Each voice has filters, envelopes, LFOs, morphing, modulation
(Ring Modulation, Phase Modulation... the modulators can have any
shape), resonance, etc...
Each voice includes a waveform generator with up to 128 sine/non-sine
harmonics.
You can use Fourier synthesis or if you don't like it you
can wave-shaping/filtering of functions.
2) SUBsynth is a simple engine which makes sounds through
harmonic filtering of white noise
3) PADsynth is an engine that makes very beautiful pads and other instruments,
which can be exported for use with other programs.
Midi and audio support exists for OSS, ALSA, JACK, and others...
OPTIONS
-------
*-h, --help*::
Display command-line help and exit
*-v, --version*::
Display version and exit
*-l, --load=FILE*::
Loads a .xmz file
*-L, --load-instrument*=FILE::
Loads a .xiz file
*-r --sample-rate*=SR::
Set the sample rate SR
*-b, --buffer-size*=SR::
Set the buffer size, which determines the granularity of how often parameter
changes can be applied
*-o, --oscil-size*=OS::
Set the ADsynth oscillator size
*-S, --swap*::
Swap Left and Right output channels
*-D, --dump*::
Dumps midi note ON/OFF commands
*-U, --no-gui*::
Run ZynAddSubFX without user interface
*-N, --named*=Name::
Postfix IO Name when possible
*-a, --auto-connect*::
AutoConnect when using JACK
*-O, --output*=engine::
Set Output Engine
*-I, --input*=engine::
Set Input Engine
*-e, --exec-after-init*=command::
Run post-initialization script. This script will be run after midi and audio
drivers have been initialized.
BUGS
----
Please report any bugs to either the mailing list
zynaddsubfx-user@lists.sourceforge.net
or the bugtracker
http://sourceforge.net/tracker/?group_id=62934
AUTHOR
------
ZynAddSubFX was originally written by Nasca Octavian Paul. It is currently being
maintained by Mark McCurry.

View File

@@ -0,0 +1,31 @@
Zynaddsubfx
===========
:Author: Paul Nasca and Mark McCurry
This documentation is a work in progress
include::intro.txt[]
include::filter.txt[]
include::lfo.txt[]
include::envelope.txt[]
include::adsynth.txt[]
include::controller.txt[]
include::effects.txt[]
/////////////////////////////
include::nrpn.txt[]
/////////////////////////////
include::saving.txt[]
include::mididefaults.txt[]
include::build.txt[]
include::getting.txt[]

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,384 @@
#checking include/library paths
message(STATUS "Checking Include Path" $ENV{CMAKE_INCLUDE_PATH} ${CMAKE_INCLUDE_PATH})
message(STATUS "Checking Library Path" $ENV{CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH})
#Dependency check
find_package(PkgConfig REQUIRED)
find_package(zlib REQUIRED)
pkg_check_modules(FFTW REQUIRED fftw3)
pkg_check_modules(MXML REQUIRED mxml)
find_package(Threads REQUIRED)
find_package(OSS)
find_package(Alsa)
pkg_check_modules(JACK jack)
pkg_check_modules(PORTAUDIO portaudio-2.0>=19)
set(FLTK_SKIP_OPENGL true)
pkg_check_modules(NTK ntk)
pkg_check_modules(NTK_IMAGES ntk_images)
find_package(FLTK)
find_package(OpenGL) #for FLTK
find_package(CxxTest)
if(CXXTEST_FOUND)
set(CXXTEST_USE_PYTHON TRUE)
endif()
# lash
pkg_search_module(LASH lash-1.0)
mark_as_advanced(LASH_LIBRARIES)
pkg_search_module(DSSI dssi>=0.9.0)
mark_as_advanced(DSSI_LIBRARIES)
pkg_search_module(LIBLO liblo>=0.26)
mark_as_advanced(LIBLO_LIBRARIES)
CHECK_FUNCTION_EXISTS(sched_setscheduler HAVE_SCHEDULER)
execute_process(COMMAND echo fistpl 0
COMMAND as -
ERROR_VARIABLE AVOID_ASM)
######### Settings ###########
# NOTE: These cache variables should normally not be changed in this
# file, but either in in CMakeCache.txt before compile, or by passing
# parameters directly into cmake using the -D flag.
SET (GuiModule fltk CACHE STRING "GUI module, either fltk, ntk or off")
SET (CompileTests ${CXXTEST_FOUND} CACHE BOOL "whether tests should be compiled in or not")
SET (AlsaEnable ${ALSA_FOUND} CACHE BOOL
"Enable support for Advanced Linux Sound Architecture")
SET (JackEnable ${JACK_FOUND} CACHE BOOL
"Enable support for JACK Audio Connection toolKit")
SET (OssEnable ${OSS_FOUND} CACHE BOOL
"Enable support for Open Sound System")
SET (PaEnable ${PORTAUDIO_FOUND} CACHE BOOL
"Enable support for Port Audio System")
SET (LashEnable ${LASH_FOUND} CACHE BOOL
"Enable LASH Audio Session Handler")
SET (DssiEnable ${DSSI_FOUND} CACHE BOOL
"Enable DSSI Plugin compilation")
SET (LibloEnable ${LIBLO_FOUND} CACHE BOOL
"Enable Liblo")
# Now, handle the incoming settings and set define flags/variables based
# on this
# Add version information
add_definitions(-DVERSION="${VERSION}")
message(STATUS "Building on a '${CMAKE_SYSTEM_NAME}' System")
if(NOT "Darwin" STREQUAL ${CMAKE_SYSTEM_NAME})
# Add scheduler function existance info (OSX compatiability)
add_definitions(-DHAVE_SCHEDULER=${HAVE_SCHEDULER})
endif()
# Give a good guess on the best Input/Output default backends
if (JackEnable)
SET (DefaultOutput jack CACHE STRING
"Default Output module: [null, alsa, oss, jack, portaudio]")
# Override with perhaps more helpful midi backends
if (AlsaEnable)
SET (DefaultInput alsa CACHE STRING
"Default Input module: [null, alsa, oss, jack]")
elseif (OssEnable)
SET (DefaultInput oss CACHE STRING
"Default Input module: [null, alsa, oss, jack]")
else ()
SET (DefaultInput jack CACHE STRING
"Default Input module: [null, alsa, oss, jack]")
endif ()
elseif (AlsaEnable)
SET (DefaultOutput alsa CACHE STRING
"Default Output module: [null, alsa, oss, jack, portaudio]")
SET (DefaultInput alsa CACHE STRING
"Default Input module: [null, alsa, oss, jack]")
elseif (OssEnable)
SET (DefaultOutput oss CACHE STRING
"Default Output module: [null, alsa, oss, jack, portaudio]")
SET (DefaultInput oss CACHE STRING
"Default Input module: [null, alsa, oss, jack]")
else()
SET (DefaultOutput null CACHE STRING
"Default Output module: [null, alsa, oss, jack, portaudio]")
SET (DefaultInput null CACHE STRING
"Default Input module: [null, alsa, oss, jack]")
endif()
if (GuiModule STREQUAL qt AND QT_FOUND)
set (QtGui TRUE)
elseif(GuiModule STREQUAL ntk AND NTK_FOUND)
set (NtkGui TRUE)
elseif(GuiModule STREQUAL fltk AND FLTK_FOUND)
set (FltkGui TRUE)
elseif(GuiModule STREQUAL off)
add_definitions(-DDISABLE_GUI)
else ()
set (GuiModule off CACHE STRING "GUI module, either fltk, qt or off")
add_definitions(-DDISABLE_GUI)
message(STATUS "GUI module defaulting to off")
endif()
#Build Flags
option (BuildForAMD_X86_64 "Build for AMD x86_64 system" OFF)
option (BuildForCore2_X86_64 "Build for Intel Core2 x86_64 system" OFF)
option (BuildForDebug "Include gdb debugging support" OFF)
set(CMAKE_BUILD_TYPE "Release")
set (BuildOptions_x86_64AMD
"-O3 -march=athlon64 -m64 -Wall -ffast-math -fno-finite-math-only -fomit-frame-pointer"
CACHE STRING "X86_64 compiler options"
)
set (BuildOptions_X86_64Core2
"-O3 -march=core2 -m64 -Wall -ffast-math -fno-finite-math-only -fomit-frame-pointer"
CACHE STRING "X86_64 compiler options"
)
set (BuildOptionsBasic
"-O3 -msse -msse2 -mfpmath=sse -ffast-math -fomit-frame-pointer"
CACHE STRING "basic X86 complier options"
)
set (BuildOptionsDebug
"-O0 -g3 -ggdb -Wall -Wpointer-arith" CACHE STRING "Debug build flags")
########### Settings dependant code ###########
# From here on, the setting variables have been prepared so concentrate
# on the actual compiling.
if(AlsaEnable)
list(APPEND AUDIO_LIBRARIES ${ASOUND_LIBRARY})
list(APPEND AUDIO_LIBRARY_DIRS ${ASOUND_LIBRARY_DIRS})
add_definitions(-DALSA=1)
endif(AlsaEnable)
if(JackEnable)
list(APPEND AUDIO_LIBRARIES ${JACK_LIBRARIES})
list(APPEND AUDIO_LIBRARY_DIRS ${JACK_LIBRARY_DIRS})
add_definitions(-DJACK=1)
endif(JackEnable)
if(OssEnable)
add_definitions(-DOSS=1)
endif(OssEnable)
if(PaEnable)
include_directories(${PORTAUDIO_INCLUDE_DIR})
add_definitions(-DPORTAUDIO=1)
list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES})
list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
endif()
if (CompileTests)
ENABLE_TESTING()
endif()
if(LashEnable)
include_directories(${LASH_INCLUDE_DIRS})
add_definitions(-DLASH=1)
list(APPEND AUDIO_LIBRARIES ${LASH_LIBRARIES})
list(APPEND AUDIO_LIBRARY_DIRS ${LASH_LIBRARY_DIRS})
message(STATUS "Compiling with lash")
endif()
if(LibloEnable)
include_directories(${LIBLO_INCLUDE_DIRS})
add_definitions(-DUSE_NSM=1)
list(APPEND AUDIO_LIBRARIES ${LIBLO_LIBRARIES})
list(APPEND AUDIO_LIBRARY_DIRS ${LIBLO_LIBRARY_DIRS})
message(STATUS "Compiling with liblo")
endif()
# other include directories
include_directories(${ZLIB_INCLUDE_DIRS} ${MXML_INCLUDE_DIRS})
add_definitions(
-g #TODO #todo put in a better location
-Wall
-Wextra
)
if(NOT AVOID_ASM)
message(STATUS "Compiling with x86 opcode support")
add_definitions(-DASM_F2I_YES)
endif()
if (BuildForDebug)
set (CMAKE_BUILD_TYPE "Debug")
set (CMAKE_CXX_FLAGS_DEBUG ${BuildOptionsDebug})
message (STATUS "Building for ${CMAKE_BUILD_TYPE}, flags: ${CMAKE_CXX_FLAGS_DEBUG}")
else (BuildForDebug)
set (CMAKE_BUILD_TYPE "Release")
if (BuildForAMD_X86_64)
set (CMAKE_CXX_FLAGS_RELEASE ${BuildOptions_x86_64AMD})
else (BuildForAMD_X86_64)
if (BuildForCore2_X86_64)
set (CMAKE_CXX_FLAGS_RELEASE ${BuildOptions_X86_64Core2})
else (BuildForCore2_X86_64)
set (CMAKE_CXX_FLAGS_RELEASE ${BuildOptionsBasic})
endif (BuildForCore2_X86_64)
endif (BuildForAMD_X86_64)
message (STATUS "Building for ${CMAKE_BUILD_TYPE}, flags: ${CMAKE_CXX_FLAGS_RELEASE}")
endif (BuildForDebug)
add_definitions(-fPIC)
if(FLTK_FOUND)
mark_as_advanced(FORCE FLTK_BASE_LIBRARY)
mark_as_advanced(FORCE FLTK_CONFIG_SCRIPT)
mark_as_advanced(FORCE FLTK_DIR)
mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE)
mark_as_advanced(FORCE FLTK_FORMS_LIBRARY)
mark_as_advanced(FORCE FLTK_GL_LIBRARY)
mark_as_advanced(FORCE FLTK_IMAGES_LIBRARY)
mark_as_advanced(FORCE FLTK_INCLUDE_DIR)
mark_as_advanced(FORCE FLTK_MATH_LIBRARY)
endif(FLTK_FOUND)
if(NTK_FOUND)
mark_as_advanced(FORCE NTK_BASE_LIBRARY)
mark_as_advanced(FORCE NTK_CONFIG_SCRIPT)
mark_as_advanced(FORCE NTK_DIR)
mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE)
mark_as_advanced(FORCE NTK_FORMS_LIBRARY)
mark_as_advanced(FORCE NTK_GL_LIBRARY)
mark_as_advanced(FORCE NTK_IMAGES_LIBRARY)
mark_as_advanced(FORCE NTK_INCLUDE_DIR)
mark_as_advanced(FORCE NTK_MATH_LIBRARY)
endif(NTK_FOUND)
if(FltkGui)
#UGLY WORKAROUND
find_program (FLTK_CONFIG fltk-config)
if (FLTK_CONFIG)
execute_process (COMMAND ${FLTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE FLTK_LDFLAGS)
string(STRIP ${FLTK_LDFLAGS} FLTK_LIBRARIES)
endif()
message(STATUS ${FLTK_LDFLAGS})
set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui)
add_definitions(-DFLTK_GUI)
message(STATUS "Will build FLTK gui")
include_directories(
${FLTK_INCLUDE_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/UI"
"${CMAKE_CURRENT_BINARY_DIR}/UI"
)
add_subdirectory(UI)
endif()
if(NtkGui)
find_program( FLTK_FLUID_EXECUTABLE ntk-fluid)
message(STATUS ${NTK_LDFLAGS} ${NTK_IMAGES_LDFLAGS})
set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_IMAGES_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui)
add_definitions(-DNTK_GUI)
message(STATUS "Will build NTK gui")
include_directories(
${NTK_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}/UI"
"${CMAKE_CURRENT_BINARY_DIR}/UI"
)
add_subdirectory(UI)
endif()
########### General section ##############
# Following this should be only general compilation code, and no mention
# of module-specific variables
link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS})
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set(NONGUI_LIBRARIES
zynaddsubfx_misc
zynaddsubfx_synth
zynaddsubfx_effect
zynaddsubfx_params
zynaddsubfx_dsp
zynaddsubfx_nio
)
add_subdirectory(Misc)
add_subdirectory(Synth)
add_subdirectory(Effects)
add_subdirectory(Params)
add_subdirectory(DSP)
add_subdirectory(Nio)
add_library(zynaddsubfx_core STATIC
${zynaddsubfx_dsp_SRCS}
${zynaddsubfx_effect_SRCS}
${zynaddsubfx_misc_SRCS}
${zynaddsubfx_params_SRCS}
${zynaddsubfx_synth_SRCS}
)
target_link_libraries(zynaddsubfx_core
${ZLIB_LIBRARIES}
${FFTW_LIBRARIES}
${MXML_LIBRARIES}
${OS_LIBRARIES}
pthread)
if(CompileTests)
add_subdirectory(Tests)
endif(CompileTests)
message(STATUS "using link directories: ${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS}")
add_executable(zynaddsubfx main.cpp)
target_link_libraries(zynaddsubfx
zynaddsubfx_core
zynaddsubfx_nio
${GUI_LIBRARIES}
${NIO_LIBRARIES}
${AUDIO_LIBRARIES}
)
if (DssiEnable)
add_library(zynaddsubfx_dssi SHARED
Output/DSSIaudiooutput.cpp
)
target_link_libraries(zynaddsubfx_dssi
zynaddsubfx_core
${OS_LIBRARIES}
)
if (${CMAKE_SIZEOF_VOID_P} EQUAL "8")
install(TARGETS zynaddsubfx_dssi LIBRARY DESTINATION lib64/dssi/)
else ()
install(TARGETS zynaddsubfx_dssi LIBRARY DESTINATION lib/dssi/)
endif ()
endif()
message(STATUS "Link libraries: ${ZLIB_LIBRARY} ${FFTW_LIBRARY} ${MXML_LIBRARIES} ${AUDIO_LIBRARIES} ${OS_LIBRARIES}")
install(TARGETS zynaddsubfx
RUNTIME DESTINATION bin
)
if(NtkGui)
install(DIRECTORY ../pixmaps DESTINATION share/zynaddsubfx)
add_definitions(-DPIXMAP_PATH="${CMAKE_INSTALL_PREFIX}/share/zynaddsubfx/pixmaps/")
add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
endif(NtkGui)
include(CTest)

View File

@@ -0,0 +1,428 @@
/*
ZynAddSubFX - a software synthesizer
AnalogFilter.cpp - Several analog filters (lowpass, highpass...)
Copyright (C) 2002-2005 Nasca Octavian Paul
Copyright (C) 2010-2010 Mark McCurry
Author: Nasca Octavian Paul
Mark McCurry
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <cstring> //memcpy
#include <cmath>
#include <cassert>
#include "../Misc/Util.h"
#include "AnalogFilter.h"
AnalogFilter::AnalogFilter(unsigned char Ftype,
float Ffreq,
float Fq,
unsigned char Fstages,
unsigned int srate, int bufsize)
:Filter(srate, bufsize),
type(Ftype),
stages(Fstages),
freq(Ffreq),
q(Fq),
gain(1.0),
abovenq(false),
oldabovenq(false)
{
for(int i = 0; i < 3; ++i)
coeff.c[i] = coeff.d[i] = oldCoeff.c[i] = oldCoeff.d[i] = 0.0f;
if(stages >= MAX_FILTER_STAGES)
stages = MAX_FILTER_STAGES;
cleanup();
firsttime = false;
setfreq_and_q(Ffreq, Fq);
firsttime = true;
coeff.d[0] = 0; //this is not used
outgain = 1.0f;
}
AnalogFilter::~AnalogFilter()
{}
void AnalogFilter::cleanup()
{
for(int i = 0; i < MAX_FILTER_STAGES + 1; ++i) {
history[i].x1 = 0.0f;
history[i].x2 = 0.0f;
history[i].y1 = 0.0f;
history[i].y2 = 0.0f;
oldHistory[i] = history[i];
}
needsinterpolation = false;
}
void AnalogFilter::computefiltercoefs(void)
{
float tmp;
bool zerocoefs = false; //this is used if the freq is too high
//do not allow frequencies bigger than samplerate/2
float freq = this->freq;
if(freq > (halfsamplerate_f - 500.0f)) {
freq = halfsamplerate_f - 500.0f;
zerocoefs = true;
}
if(freq < 0.1f)
freq = 0.1f;
//do not allow bogus Q
if(q < 0.0f)
q = 0.0f;
float tmpq, tmpgain;
if(stages == 0) {
tmpq = q;
tmpgain = gain;
}
else {
tmpq = (q > 1.0f) ? powf(q, 1.0f / (stages + 1)) : q;
tmpgain = powf(gain, 1.0f / (stages + 1));
}
//Alias Terms
float *c = coeff.c;
float *d = coeff.d;
//General Constants
const float omega = 2 * PI * freq / samplerate_f;
const float sn = sinf(omega), cs = cosf(omega);
float alpha, beta;
//most of theese are implementations of
//the "Cookbook formulae for audio EQ" by Robert Bristow-Johnson
//The original location of the Cookbook is:
//http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
switch(type) {
case 0: //LPF 1 pole
if(!zerocoefs)
tmp = expf(-2.0f * PI * freq / samplerate_f);
else
tmp = 0.0f;
c[0] = 1.0f - tmp;
c[1] = 0.0f;
c[2] = 0.0f;
d[1] = tmp;
d[2] = 0.0f;
order = 1;
break;
case 1: //HPF 1 pole
if(!zerocoefs)
tmp = expf(-2.0f * PI * freq / samplerate_f);
else
tmp = 0.0f;
c[0] = (1.0f + tmp) / 2.0f;
c[1] = -(1.0f + tmp) / 2.0f;
c[2] = 0.0f;
d[1] = tmp;
d[2] = 0.0f;
order = 1;
break;
case 2: //LPF 2 poles
if(!zerocoefs) {
alpha = sn / (2.0f * tmpq);
tmp = 1 + alpha;
c[1] = (1.0f - cs) / tmp;
c[0] = c[2] = c[1] / 2.0f;
d[1] = -2.0f * cs / tmp * -1.0f;
d[2] = (1.0f - alpha) / tmp * -1.0f;
}
else {
c[0] = 1.0f;
c[1] = c[2] = d[1] = d[2] = 0.0f;
}
order = 2;
break;
case 3: //HPF 2 poles
if(!zerocoefs) {
alpha = sn / (2.0f * tmpq);
tmp = 1 + alpha;
c[0] = (1.0f + cs) / 2.0f / tmp;
c[1] = -(1.0f + cs) / tmp;
c[2] = (1.0f + cs) / 2.0f / tmp;
d[1] = -2.0f * cs / tmp * -1.0f;
d[2] = (1.0f - alpha) / tmp * -1.0f;
}
else
c[0] = c[1] = c[2] = d[1] = d[2] = 0.0f;
order = 2;
break;
case 4: //BPF 2 poles
if(!zerocoefs) {
alpha = sn / (2.0f * tmpq);
tmp = 1.0f + alpha;
c[0] = alpha / tmp *sqrtf(tmpq + 1.0f);
c[1] = 0.0f;
c[2] = -alpha / tmp *sqrtf(tmpq + 1.0f);
d[1] = -2.0f * cs / tmp * -1.0f;
d[2] = (1.0f - alpha) / tmp * -1.0f;
}
else
c[0] = c[1] = c[2] = d[1] = d[2] = 0.0f;
order = 2;
break;
case 5: //NOTCH 2 poles
if(!zerocoefs) {
alpha = sn / (2.0f * sqrtf(tmpq));
tmp = 1.0f + alpha;
c[0] = 1.0f / tmp;
c[1] = -2.0f * cs / tmp;
c[2] = 1.0f / tmp;
d[1] = -2.0f * cs / tmp * -1.0f;
d[2] = (1.0f - alpha) / tmp * -1.0f;
}
else {
c[0] = 1.0f;
c[1] = c[2] = d[1] = d[2] = 0.0f;
}
order = 2;
break;
case 6: //PEAK (2 poles)
if(!zerocoefs) {
tmpq *= 3.0f;
alpha = sn / (2.0f * tmpq);
tmp = 1.0f + alpha / tmpgain;
c[0] = (1.0f + alpha * tmpgain) / tmp;
c[1] = (-2.0f * cs) / tmp;
c[2] = (1.0f - alpha * tmpgain) / tmp;
d[1] = -2.0f * cs / tmp * -1.0f;
d[2] = (1.0f - alpha / tmpgain) / tmp * -1.0f;
}
else {
c[0] = 1.0f;
c[1] = c[2] = d[1] = d[2] = 0.0f;
}
order = 2;
break;
case 7: //Low Shelf - 2 poles
if(!zerocoefs) {
tmpq = sqrtf(tmpq);
alpha = sn / (2.0f * tmpq);
beta = sqrtf(tmpgain) / tmpq;
tmp = (tmpgain + 1.0f) + (tmpgain - 1.0f) * cs + beta * sn;
c[0] = tmpgain
* ((tmpgain
+ 1.0f) - (tmpgain - 1.0f) * cs + beta * sn) / tmp;
c[1] = 2.0f * tmpgain
* ((tmpgain - 1.0f) - (tmpgain + 1.0f) * cs) / tmp;
c[2] = tmpgain
* ((tmpgain
+ 1.0f) - (tmpgain - 1.0f) * cs - beta * sn) / tmp;
d[1] = -2.0f * ((tmpgain - 1.0f) + (tmpgain + 1.0f) * cs)
/ tmp * -1.0f;
d[2] = ((tmpgain + 1.0f) + (tmpgain - 1.0f) * cs - beta * sn)
/ tmp * -1.0f;
}
else {
c[0] = tmpgain;
c[1] = c[2] = d[1] = d[2] = 0.0f;
}
order = 2;
break;
case 8: //High Shelf - 2 poles
if(!zerocoefs) {
tmpq = sqrtf(tmpq);
alpha = sn / (2.0f * tmpq);
beta = sqrtf(tmpgain) / tmpq;
tmp = (tmpgain + 1.0f) - (tmpgain - 1.0f) * cs + beta * sn;
c[0] = tmpgain
* ((tmpgain
+ 1.0f) + (tmpgain - 1.0f) * cs + beta * sn) / tmp;
c[1] = -2.0f * tmpgain
* ((tmpgain - 1.0f) + (tmpgain + 1.0f) * cs) / tmp;
c[2] = tmpgain
* ((tmpgain
+ 1.0f) + (tmpgain - 1.0f) * cs - beta * sn) / tmp;
d[1] = 2.0f * ((tmpgain - 1.0f) - (tmpgain + 1.0f) * cs)
/ tmp * -1.0f;
d[2] = ((tmpgain + 1.0f) - (tmpgain - 1.0f) * cs - beta * sn)
/ tmp * -1.0f;
}
else {
c[0] = 1.0f;
c[1] = c[2] = d[1] = d[2] = 0.0f;
}
order = 2;
break;
default: //wrong type
type = 0;
computefiltercoefs();
break;
}
}
void AnalogFilter::setfreq(float frequency)
{
if(frequency < 0.1f)
frequency = 0.1f;
float rap = freq / frequency;
if(rap < 1.0f)
rap = 1.0f / rap;
oldabovenq = abovenq;
abovenq = frequency > (halfsamplerate_f - 500.0f);
bool nyquistthresh = (abovenq ^ oldabovenq);
//if the frequency is changed fast, it needs interpolation
if((rap > 3.0f) || nyquistthresh) { //(now, filter and coeficients backup)
oldCoeff = coeff;
for(int i = 0; i < MAX_FILTER_STAGES + 1; ++i)
oldHistory[i] = history[i];
if(!firsttime)
needsinterpolation = true;
}
freq = frequency;
computefiltercoefs();
firsttime = false;
}
void AnalogFilter::setfreq_and_q(float frequency, float q_)
{
q = q_;
setfreq(frequency);
}
void AnalogFilter::setq(float q_)
{
q = q_;
computefiltercoefs();
}
void AnalogFilter::settype(int type_)
{
type = type_;
computefiltercoefs();
}
void AnalogFilter::setgain(float dBgain)
{
gain = dB2rap(dBgain);
computefiltercoefs();
}
void AnalogFilter::setstages(int stages_)
{
if(stages_ >= MAX_FILTER_STAGES)
stages_ = MAX_FILTER_STAGES - 1;
stages = stages_;
cleanup();
computefiltercoefs();
}
inline void AnalogBiquadFilterA(const float coeff[5], float &src, float work[4])
{
work[3] = src*coeff[0]
+ work[0]*coeff[1]
+ work[1]*coeff[2]
+ work[2]*coeff[3]
+ work[3]*coeff[4];
work[1] = src;
src = work[3];
}
inline void AnalogBiquadFilterB(const float coeff[5], float &src, float work[4])
{
work[2] = src*coeff[0]
+ work[1]*coeff[1]
+ work[0]*coeff[2]
+ work[3]*coeff[3]
+ work[2]*coeff[4];
work[0] = src;
src = work[2];
}
void AnalogFilter::singlefilterout(float *smp, fstage &hist,
const Coeff &coeff)
{
assert((buffersize % 8) == 0);
if(order == 1) { //First order filter
for(int i = 0; i < buffersize; ++i) {
float y0 = smp[i] * coeff.c[0] + hist.x1 * coeff.c[1]
+ hist.y1 * coeff.d[1];
hist.y1 = y0;
hist.x1 = smp[i];
smp[i] = y0;
}
} else if(order == 2) {//Second order filter
const float coeff_[5] = {coeff.c[0], coeff.c[1], coeff.c[2], coeff.d[1], coeff.d[2]};
float work[4] = {hist.x1, hist.x2, hist.y1, hist.y2};
for(int i = 0; i < buffersize; i+=8) {
AnalogBiquadFilterA(coeff_, smp[i + 0], work);
AnalogBiquadFilterB(coeff_, smp[i + 1], work);
AnalogBiquadFilterA(coeff_, smp[i + 2], work);
AnalogBiquadFilterB(coeff_, smp[i + 3], work);
AnalogBiquadFilterA(coeff_, smp[i + 4], work);
AnalogBiquadFilterB(coeff_, smp[i + 5], work);
AnalogBiquadFilterA(coeff_, smp[i + 6], work);
AnalogBiquadFilterB(coeff_, smp[i + 7], work);
}
hist.x1 = work[0];
hist.x2 = work[1];
hist.y1 = work[2];
hist.y2 = work[3];
}
}
void AnalogFilter::filterout(float *smp)
{
for(int i = 0; i < stages + 1; ++i)
singlefilterout(smp, history[i], coeff);
if(needsinterpolation) {
//Merge Filter at old coeff with new coeff
float ismp[buffersize];
memcpy(ismp, smp, bufferbytes);
for(int i = 0; i < stages + 1; ++i)
singlefilterout(ismp, oldHistory[i], oldCoeff);
for(int i = 0; i < buffersize; ++i) {
float x = (float)i / buffersize_f;
smp[i] = ismp[i] * (1.0f - x) + smp[i] * x;
}
needsinterpolation = false;
}
for(int i = 0; i < buffersize; ++i)
smp[i] *= outgain;
}
float AnalogFilter::H(float freq)
{
float fr = freq / samplerate_f * PI * 2.0f;
float x = coeff.c[0], y = 0.0f;
for(int n = 1; n < 3; ++n) {
x += cosf(n * fr) * coeff.c[n];
y -= sinf(n * fr) * coeff.c[n];
}
float h = x * x + y * y;
x = 1.0f;
y = 0.0f;
for(int n = 1; n < 3; ++n) {
x -= cosf(n * fr) * coeff.d[n];
y += sinf(n * fr) * coeff.d[n];
}
h = h / (x * x + y * y);
return powf(h, (stages + 1.0f) / 2.0f);
}

View File

@@ -0,0 +1,85 @@
/*
ZynAddSubFX - a software synthesizer
Analog Filter.h - Several analog filters (lowpass, highpass...)
Copyright (C) 2002-2005 Nasca Octavian Paul
Copyright (C) 2010-2010 Mark McCurry
Author: Nasca Octavian Paul
Mark McCurry
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef ANALOG_FILTER_H
#define ANALOG_FILTER_H
#include "../globals.h"
#include "Filter.h"
/**Implementation of Several analog filters (lowpass, highpass...)
* Implemented with IIR filters
* Coefficients generated with "Cookbook formulae for audio EQ"*/
class AnalogFilter:public Filter
{
public:
AnalogFilter(unsigned char Ftype, float Ffreq, float Fq,
unsigned char Fstages, unsigned int srate, int bufsize);
~AnalogFilter();
void filterout(float *smp);
void setfreq(float frequency);
void setfreq_and_q(float frequency, float q_);
void setq(float q_);
void settype(int type_);
void setgain(float dBgain);
void setstages(int stages_);
void cleanup();
float H(float freq); //Obtains the response for a given frequency
private:
struct fstage {
float x1, x2; //Input History
float y1, y2; //Output History
} history[MAX_FILTER_STAGES + 1], oldHistory[MAX_FILTER_STAGES + 1];
struct Coeff {
float c[3], //Feed Forward
d[3]; //Feed Back
} coeff, oldCoeff;
//old coeffs are used for interpolation when paremeters change quickly
//Apply IIR filter to Samples, with coefficients, and past history
void singlefilterout(float *smp, fstage &hist, const Coeff &coeff);
//Update coeff and order
void computefiltercoefs(void);
int type; //The type of the filter (LPF1,HPF1,LPF2,HPF2...)
int stages; //how many times the filter is applied (0->1,1->2,etc.)
float freq; //Frequency given in Hz
float q; //Q factor (resonance or Q factor)
float gain; //the gain of the filter (if are shelf/peak) filters
int order; //the order of the filter (number of poles)
bool needsinterpolation, //Interpolation between coeff changes
firsttime; //First Iteration of filter
bool abovenq, //if the frequency is above the nyquist
oldabovenq; //if the last time was above nyquist
//(used to see if it needs interpolation)
};
#endif

View File

@@ -0,0 +1,9 @@
set(zynaddsubfx_dsp_SRCS
DSP/AnalogFilter.cpp
DSP/FFTwrapper.cpp
DSP/Filter.cpp
DSP/FormantFilter.cpp
DSP/SVFilter.cpp
DSP/Unison.cpp
PARENT_SCOPE
)

View File

@@ -0,0 +1,85 @@
/*
ZynAddSubFX - a software synthesizer
FFTwrapper.c - A wrapper for Fast Fourier Transforms
Copyright (C) 2002-2005 Nasca Octavian Paul
Author: Nasca Octavian Paul
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <cmath>
#include <cassert>
#include <cstring>
#include "FFTwrapper.h"
FFTwrapper::FFTwrapper(int fftsize_)
{
fftsize = fftsize_;
time = new fftw_real[fftsize];
fft = new fftwf_complex[fftsize + 1];
planfftw = fftwf_plan_dft_r2c_1d(fftsize,
time,
fft,
FFTW_ESTIMATE);
planfftw_inv = fftwf_plan_dft_c2r_1d(fftsize,
fft,
time,
FFTW_ESTIMATE);
}
FFTwrapper::~FFTwrapper()
{
fftwf_destroy_plan(planfftw);
fftwf_destroy_plan(planfftw_inv);
delete [] time;
delete [] fft;
}
void FFTwrapper::smps2freqs(const float *smps, fft_t *freqs)
{
//Load data
for(int i = 0; i < fftsize; ++i)
time[i] = smps[i];
//DFT
fftwf_execute(planfftw);
//Grab data
memcpy((void *)freqs, (const void *)fft, fftsize * sizeof(fftw_real));
}
void FFTwrapper::freqs2smps(const fft_t *freqs, float *smps)
{
//Load data
memcpy((void *)fft, (const void *)freqs, fftsize * sizeof(fftw_real));
//clear unused freq channel
fft[fftsize / 2][0] = 0.0f;
fft[fftsize / 2][1] = 0.0f;
//IDFT
fftwf_execute(planfftw_inv);
//Grab data
for(int i = 0; i < fftsize; ++i)
smps[i] = static_cast<float>(time[i]);
}
void FFT_cleanup()
{
fftwf_cleanup();
}

View File

@@ -0,0 +1,52 @@
/*
ZynAddSubFX - a software synthesizer
FFTwrapper.h - A wrapper for Fast Fourier Transforms
Copyright (C) 2002-2005 Nasca Octavian Paul
Author: Nasca Octavian Paul
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef FFT_WRAPPER_H
#define FFT_WRAPPER_H
#include <fftw3.h>
#include <complex>
typedef float fftw_real;
typedef std::complex<fftw_real> fft_t;
/**A wrapper for the FFTW library (Fast Fourier Transforms)*/
class FFTwrapper
{
public:
/**Constructor
* @param fftsize The size of samples to be fed to fftw*/
FFTwrapper(int fftsize_);
/**Destructor*/
~FFTwrapper();
/**Convert Samples to Frequencies using Fourier Transform
* @param smps Pointer to Samples to be converted; has length fftsize_
* @param freqs Structure FFTFREQS which stores the frequencies*/
void smps2freqs(const float *smps, fft_t *freqs);
void freqs2smps(const fft_t *freqs, float *smps);
private:
int fftsize;
fftw_real *time;
fftwf_complex *fft;
fftwf_plan planfftw, planfftw_inv;
};
void FFT_cleanup();
#endif

View File

@@ -0,0 +1,75 @@
/*
ZynAddSubFX - a software synthesizer
Filter.cpp - Filters, uses analog,formant,etc. filters
Copyright (C) 2002-2005 Nasca Octavian Paul
Author: Nasca Octavian Paul
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
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 <stdio.h>
#include "Filter.h"
#include "AnalogFilter.h"
#include "FormantFilter.h"
#include "SVFilter.h"
#include "../Params/FilterParams.h"
Filter::Filter(unsigned int srate, int bufsize)
: outgain(1.0f),
samplerate(srate),
buffersize(bufsize)
{
alias();
}
Filter *Filter::generate(FilterParams *pars, unsigned int srate, int bufsize)
{
if (srate == 0)
srate = synth->samplerate;
if (bufsize == 0)
bufsize = synth->buffersize;
unsigned char Ftype = pars->Ptype;
unsigned char Fstages = pars->Pstages;
Filter *filter;
switch(pars->Pcategory) {
case 1:
filter = new FormantFilter(pars, srate, bufsize);
break;
case 2:
filter = new SVFilter(Ftype, 1000.0f, pars->getq(), Fstages, srate, bufsize);
filter->outgain = dB2rap(pars->getgain());
if(filter->outgain > 1.0f)
filter->outgain = sqrt(filter->outgain);
break;
default:
filter = new AnalogFilter(Ftype, 1000.0f, pars->getq(), Fstages, srate, bufsize);
if((Ftype >= 6) && (Ftype <= 8))
filter->setgain(pars->getgain());
else
filter->outgain = dB2rap(pars->getgain());
break;
}
return filter;
}
float Filter::getrealfreq(float freqpitch)
{
return powf(2.0f, freqpitch + 9.96578428f); //log2(1000)=9.95748f
}

View File

@@ -0,0 +1,64 @@
/*
ZynAddSubFX - a software synthesizer
Filter.h - Filters, uses analog,formant,etc. filters
Copyright (C) 2002-2005 Nasca Octavian Paul
Author: Nasca Octavian Paul
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef FILTER_H
#define FILTER_H
#include "../globals.h"
class Filter
{
public:
static float getrealfreq(float freqpitch);
static Filter *generate(class FilterParams * pars, unsigned int srate = 0, int bufsize = 0);
Filter(unsigned int srate, int bufsize);
virtual ~Filter() {}
virtual void filterout(float *smp) = 0;
virtual void setfreq(float frequency) = 0;
virtual void setfreq_and_q(float frequency, float q_) = 0;
virtual void setq(float q_) = 0;
virtual void setgain(float dBgain) = 0;
protected:
float outgain;
// current setup
unsigned int samplerate;
int buffersize;
// alias for above terms
float samplerate_f;
float halfsamplerate_f;
float buffersize_f;
int bufferbytes;
inline void alias()
{
samplerate_f = samplerate;
halfsamplerate_f = samplerate_f / 2.0f;
buffersize_f = buffersize;
bufferbytes = buffersize * sizeof(float);
}
};
#endif

View File

@@ -0,0 +1,230 @@
/*
ZynAddSubFX - a software synthesizer
FormantFilter.cpp - formant filters
Copyright (C) 2002-2005 Nasca Octavian Paul
Author: Nasca Octavian Paul
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License
as published by the Free Software Foundation.
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 (version 2 or later) for more details.
You should have received a copy of the GNU General Public License (version 2)
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <cmath>
#include <cstdio>
#include "../Misc/Util.h"
#include "FormantFilter.h"
#include "AnalogFilter.h"
#include "../Params/FilterParams.h"
FormantFilter::FormantFilter(FilterParams *pars, unsigned int srate, int bufsize)
: Filter(srate, bufsize)
{
numformants = pars->Pnumformants;
for(int i = 0; i < numformants; ++i)
formant[i] = new AnalogFilter(4 /*BPF*/, 1000.0f, 10.0f, pars->Pstages, srate, bufsize);
cleanup();
for(int j = 0; j < FF_MAX_VOWELS; ++j)
for(int i = 0; i < numformants; ++i) {
formantpar[j][i].freq = pars->getformantfreq(
pars->Pvowels[j].formants[i].freq);
formantpar[j][i].amp = pars->getformantamp(
pars->Pvowels[j].formants[i].amp);
formantpar[j][i].q = pars->getformantq(
pars->Pvowels[j].formants[i].q);
}
for(int i = 0; i < FF_MAX_FORMANTS; ++i)
oldformantamp[i] = 1.0f;
for(int i = 0; i < numformants; ++i) {
currentformants[i].freq = 1000.0f;
currentformants[i].amp = 1.0f;
currentformants[i].q = 2.0f;
}
formantslowness = powf(1.0f - (pars->Pformantslowness / 128.0f), 3.0f);
sequencesize = pars->Psequencesize;
if(sequencesize == 0)
sequencesize = 1;
for(int k = 0; k < sequencesize; ++k)
sequence[k].nvowel = pars->Psequence[k].nvowel;
vowelclearness = powf(10.0f, (pars->Pvowelclearness - 32.0f) / 48.0f);
sequencestretch = powf(0.1f, (pars->Psequencestretch - 32.0f) / 48.0f);
if(pars->Psequencereversed)
sequencestretch *= -1.0f;
outgain = dB2rap(pars->getgain());
oldinput = -1.0f;
Qfactor = 1.0f;
oldQfactor = Qfactor;
firsttime = 1;
}
FormantFilter::~FormantFilter()
{
for(int i = 0; i < numformants; ++i)
delete (formant[i]);
}
void FormantFilter::cleanup()
{
for(int i = 0; i < numformants; ++i)
formant[i]->cleanup();
}
void FormantFilter::setpos(float input)
{
int p1, p2;
if(firsttime != 0)
slowinput = input;
else
slowinput = slowinput
* (1.0f - formantslowness) + input * formantslowness;
if((fabsf(oldinput - input) < 0.001f) && (fabsf(slowinput - input) < 0.001f)
&& (fabsf(Qfactor - oldQfactor) < 0.001f)) {
// oldinput=input; daca setez asta, o sa faca probleme la schimbari foarte lente
firsttime = 0;
return;
}
else
oldinput = input;
float pos = fmodf(input * sequencestretch, 1.0f);
if(pos < 0.0f)
pos += 1.0f;
F2I(pos * sequencesize, p2);
p1 = p2 - 1;
if(p1 < 0)
p1 += sequencesize;
pos = fmodf(pos * sequencesize, 1.0f);
if(pos < 0.0f)
pos = 0.0f;
else
if(pos > 1.0f)
pos = 1.0f;
pos =
(atanf((pos * 2.0f
- 1.0f)
* vowelclearness) / atanf(vowelclearness) + 1.0f) * 0.5f;
p1 = sequence[p1].nvowel;
p2 = sequence[p2].nvowel;
if(firsttime != 0) {
for(int i = 0; i < numformants; ++i) {
currentformants[i].freq =
formantpar[p1][i].freq
* (1.0f - pos) + formantpar[p2][i].freq * pos;
currentformants[i].amp =
formantpar[p1][i].amp
* (1.0f - pos) + formantpar[p2][i].amp * pos;
currentformants[i].q =
formantpar[p1][i].q * (1.0f - pos) + formantpar[p2][i].q * pos;
formant[i]->setfreq_and_q(currentformants[i].freq,
currentformants[i].q * Qfactor);
oldformantamp[i] = currentformants[i].amp;
}
firsttime = 0;
}
else
for(int i = 0; i < numformants; ++i) {
currentformants[i].freq =
currentformants[i].freq * (1.0f - formantslowness)
+ (formantpar[p1][i].freq
* (1.0f - pos) + formantpar[p2][i].freq * pos)
* formantslowness;
currentformants[i].amp =
currentformants[i].amp * (1.0f - formantslowness)
+ (formantpar[p1][i].amp * (1.0f - pos)
+ formantpar[p2][i].amp * pos) * formantslowness;
currentformants[i].q = currentformants[i].q
* (1.0f - formantslowness)
+ (formantpar[p1][i].q * (1.0f - pos)
+ formantpar[p2][i].q
* pos) * formantslowness;
formant[i]->setfreq_and_q(currentformants[i].freq,
currentformants[i].q * Qfactor);
}
oldQfactor = Qfactor;
}
void FormantFilter::setfreq(float frequency)
{
setpos(frequency);
}
void FormantFilter::setq(float q_)
{
Qfactor = q_;
for(int i = 0; i < numformants; ++i)
formant[i]->setq(Qfactor * currentformants[i].q);
}
void FormantFilter::setgain(float /*dBgain*/)
{}
inline float log_2(float x)
{
return logf(x) / logf(2.0f);
}
void FormantFilter::setfreq_and_q(float frequency, float q_)
{
//Convert form real freq[Hz]
const float freq = log_2(frequency) - 9.96578428f; //log2(1000)=9.95748f.
Qfactor = q_;
setpos(freq);
}
void FormantFilter::filterout(float *smp)
{
float inbuffer[buffersize];
memcpy(inbuffer, smp, bufferbytes);
memset(smp, 0, bufferbytes);
for(int j = 0; j < numformants; ++j) {
float tmpbuf[buffersize];
for(int i = 0; i < buffersize; ++i)
tmpbuf[i] = inbuffer[i] * outgain;
formant[j]->filterout(tmpbuf);
if(ABOVE_AMPLITUDE_THRESHOLD(oldformantamp[j], currentformants[j].amp))
for(int i = 0; i < buffersize; ++i)
smp[i] += tmpbuf[i]
* INTERPOLATE_AMPLITUDE(oldformantamp[j],
currentformants[j].amp,
i,
buffersize);
else
for(int i = 0; i < buffersize; ++i)
smp[i] += tmpbuf[i] * currentformants[j].amp;
oldformantamp[j] = currentformants[j].amp;
}
}

Some files were not shown because too many files have changed in this diff Show More