Compare commits

...

6 Commits
master ... dev

Author SHA1 Message Date
Maurice Grönwoldt 61482e8d4c WIP 2020-07-09 16:31:33 +02:00
Maurice Grönwoldt 3fda15966c - fixed font loading
- changed to RMS
- added decibel Scales
- fixed logo loading
- changed blood theme
- added some look and feel
2020-06-29 22:47:45 +02:00
Maurice Grönwoldt a27c62f062 - save 2020-06-14 21:14:28 +02:00
Maurice Grönwoldt ac22ea5e75 - reformat to JUCE-Guidelines
- added Matrix => half working ;)
2020-06-13 16:52:16 +02:00
Maurice Grönwoldt 26a2935e1c WIP 2020-06-13 10:56:20 +02:00
Maurice Grönwoldt d735c1d076 - cleanup vars
- added LICENSE.txt
- added LabelComponent.cpp
- renamed some variables
- moved instance id to processor
2020-06-08 21:27:17 +02:00
90 changed files with 4177 additions and 343 deletions

674
LICENSE.txt Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state 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 3 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, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,28 +1,45 @@
#include "PluginProcessor.h"
#include "PluginEditor.h"
#include "Veno/Core/Config.h"
#include "Veno/Utils/Logger.h"
#include "Veno/Fonts/Fonts.h"
#include "Veno/Utils.h"
//==============================================================================
VenoAudioProcessorEditor::VenoAudioProcessorEditor(VenoAudioProcessor &p)
: AudioProcessorEditor(&p), processor(p) {
Config::getInstance()->registerEditor(this, id);
LookAndFeel::setDefaultLookAndFeel(look);
setSize(400, 300);
#define SIDEBAR_WIDTH 300
VenoAudioProcessorEditor::VenoAudioProcessorEditor (VenoAudioProcessor& p)
: AudioProcessorEditor(&p), processor(p)
{
m_id = p.m_id;
Config::getInstance()->registerEditor(this, m_id);
LookAndFeel::setDefaultLookAndFeel(m_look);
m_sidebar = std::make_unique<Sidebar>(m_id);
setSize(1200 * Config::getInstance()->getScale(), 700 * Config::getInstance()->getScale());
addAndMakeVisible(*m_sidebar);
}
VenoAudioProcessorEditor::~VenoAudioProcessorEditor() {
VenoAudioProcessorEditor::~VenoAudioProcessorEditor ()
{
LookAndFeel::setDefaultLookAndFeel(nullptr);
Config::getInstance()->removeEditor(id);
delete look;
m_sidebar.reset(nullptr);
delete m_look;
Config::getInstance()->removeEditor(m_id);
}
//==============================================================================
void VenoAudioProcessorEditor::paint(Graphics &g) {
g.fillAll(getLookAndFeel().findColour(ResizableWindow::backgroundColourId));
g.setColour(Colours::white);
g.setFont(15.0f);
g.drawFittedText("Hello World!", getLocalBounds(), Justification::centred, 1);
void VenoAudioProcessorEditor::paint (Graphics& g)
{
auto theme = Config::getInstance()->getCurrentTheme();
g.setFont(*VenoFonts::getNormal());
g.fillAll(theme->getColour(ThemeColour::bg_two));
g.setColour(theme->getColour(ThemeColour::bg));
g.fillRect(0, 0, VeNo::Utils::getCalculatedWidth(SIDEBAR_WIDTH), getHeight());
g.setColour(theme->getColour(ThemeColour::accent));
}
void VenoAudioProcessorEditor::resized() {
void VenoAudioProcessorEditor::resized ()
{
if (m_sidebar != nullptr)
{
m_sidebar->setBounds(0, 0, VeNo::Utils::getCalculatedWidth(SIDEBAR_WIDTH), getHeight());
}
}

View File

@ -3,19 +3,19 @@
#include <JuceHeader.h>
#include "PluginProcessor.h"
#include "Veno/GUI/LookAndFeel/LookHandler.h"
#include "Veno/GUI/GUIParts/Sidebar/Sidebar.h"
class VenoAudioProcessorEditor : public AudioProcessorEditor
class VenoAudioProcessorEditor : public AudioProcessorEditor
{
public:
VenoAudioProcessorEditor (VenoAudioProcessor&);
~VenoAudioProcessorEditor();
~VenoAudioProcessorEditor ();
void paint (Graphics&) override;
void resized() override;
void resized () override;
private:
VenoAudioProcessor& processor;
std::string id = Uuid().toString().toStdString();
LookAndFeel_V4 *look = new LookHandler();
std::string m_id = "";
LookAndFeel_V4* m_look = new LookHandler();
std::unique_ptr<Sidebar> m_sidebar;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoAudioProcessorEditor)
};

View File

@ -1,18 +1,8 @@
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin processor.
==============================================================================
*/
#include "PluginProcessor.h"
#include "PluginEditor.h"
#include "Veno/Core/AudioConfig.h"
//==============================================================================
VenoAudioProcessor::VenoAudioProcessor()
VenoAudioProcessor::VenoAudioProcessor ()
#ifndef JucePlugin_PreferredChannelConfigurations
: AudioProcessor (BusesProperties()
#if ! JucePlugin_IsMidiEffect
@ -24,57 +14,60 @@ VenoAudioProcessor::VenoAudioProcessor()
)
#endif
{
instance = VenoInstance::createInstance(m_id);
AudioConfig::registerInstance(m_id);
}
VenoAudioProcessor::~VenoAudioProcessor()
VenoAudioProcessor::~VenoAudioProcessor ()
{
instance.reset();
VenoInstance::deleteInstance(m_id);
AudioConfig::deleteInstance(m_id);
}
//==============================================================================
const String VenoAudioProcessor::getName() const
const String VenoAudioProcessor::getName () const
{
return JucePlugin_Name;
}
bool VenoAudioProcessor::acceptsMidi() const
bool VenoAudioProcessor::acceptsMidi () const
{
#if JucePlugin_WantsMidiInput
#if JucePlugin_WantsMidiInput
return true;
#else
#else
return false;
#endif
#endif
}
bool VenoAudioProcessor::producesMidi() const
bool VenoAudioProcessor::producesMidi () const
{
#if JucePlugin_ProducesMidiOutput
#if JucePlugin_ProducesMidiOutput
return true;
#else
#else
return false;
#endif
#endif
}
bool VenoAudioProcessor::isMidiEffect() const
bool VenoAudioProcessor::isMidiEffect () const
{
#if JucePlugin_IsMidiEffect
#if JucePlugin_IsMidiEffect
return true;
#else
#else
return false;
#endif
#endif
}
double VenoAudioProcessor::getTailLengthSeconds() const
double VenoAudioProcessor::getTailLengthSeconds () const
{
return 0.0;
}
int VenoAudioProcessor::getNumPrograms()
int VenoAudioProcessor::getNumPrograms ()
{
return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs,
// so this should be at least 1, even if you're not really implementing programs.
return 1;
}
int VenoAudioProcessor::getCurrentProgram()
int VenoAudioProcessor::getCurrentProgram ()
{
return 0;
}
@ -95,97 +88,91 @@ void VenoAudioProcessor::changeProgramName (int index, const String& newName)
//==============================================================================
void VenoAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
{
// Use this method as the place to do any pre-playback
// initialisation that you need..
auto audioConfig = AudioConfig::getInstance();
audioConfig->setSampleRate(sampleRate);
audioConfig->initWaveTables();
}
void VenoAudioProcessor::releaseResources()
void VenoAudioProcessor::releaseResources ()
{
// When playback stops, you can use this as an opportunity to free up any
// spare memory, etc.
}
#ifndef JucePlugin_PreferredChannelConfigurations
bool VenoAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
#if JucePlugin_IsMidiEffect
#if JucePlugin_IsMidiEffect
ignoreUnused (layouts);
return true;
#else
// This is the place where you check if the layout is supported.
// In this template code we only support mono or stereo.
#else
if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono()
&& layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
&& layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
return false;
// This checks if the input layout matches the output layout
#if ! JucePlugin_IsSynth
#if !JucePlugin_IsSynth
if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet())
return false;
#endif
#endif
return true;
#endif
#endif
}
#endif
void VenoAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)
{
ScopedNoDenormals noDenormals;
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
// In case we have more outputs than inputs, this code clears any output
// channels that didn't contain input data, (because these aren't
// guaranteed to be empty - they may contain garbage).
// This is here to avoid people getting screaming feedback
// when they first compile a plugin, but obviously you don't need to keep
// this code if your algorithm always overwrites all the output channels.
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
// This is the place where you'd normally do the guts of your plugin's
// audio processing...
// Make sure to reset the state if your inner loop is processing
// the samples and the outer loop is handling the channels.
// Alternatively, you can process the samples with the channels
// interleaved by keeping the same state.
for (int channel = 0; channel < totalNumInputChannels; ++channel)
instance->matrix.updateSlots();
instance->audioBuffer->reset(buffer.getNumSamples());
int numChannels = buffer.getNumChannels();
for (int i = 0; i < numChannels; ++i)
{
auto* channelData = buffer.getWritePointer (channel);
// ..do something to the data...
auto c = buffer.getReadPointer(i);
for (int j = 0; j < buffer.getNumSamples(); ++j)
{
instance->audioBuffer->addMonoSample(c[j], j);
if (i == 0)
{
instance->audioBuffer->addLeftSample(c[j], j);
}
if (i == 1 || numChannels == 1)
{
instance->audioBuffer->addRightSample(c[j], j);
}
}
}
instance->audioBuffer->calcPeak ();
}
//==============================================================================
bool VenoAudioProcessor::hasEditor() const
bool VenoAudioProcessor::hasEditor () const
{
return true; // (change this to false if you choose to not supply an editor)
return true;
}
AudioProcessorEditor* VenoAudioProcessor::createEditor()
AudioProcessorEditor* VenoAudioProcessor::createEditor ()
{
return new VenoAudioProcessorEditor (*this);
return new VenoAudioProcessorEditor(*this);
}
//==============================================================================
void VenoAudioProcessor::getStateInformation (MemoryBlock& destData)
{
// You should use this method to store your parameters in the memory block.
// You could do that either as raw data, or use the XML or ValueTree classes
// as intermediaries to make it easy to save and load complex data.
auto matrixXML = instance->matrix.saveMatrixToXML();
if (matrixXML != nullptr) {
copyXmlToBinary(*matrixXML, destData);
} else {
DBG("Sorry something went wrong! xml is nullptr");
}
}
void VenoAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
// You should use this method to restore your parameters from this memory block,
// whose contents will have been created by the getStateInformation() call.
std::unique_ptr<XmlElement> xmlState(getXmlFromBinary(data, sizeInBytes));
if (xmlState != nullptr)
instance->matrix.getMatrixFromXML(xmlState);
}
//==============================================================================
// This creates new instances of the plugin..
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
AudioProcessor* JUCE_CALLTYPE createPluginFilter ()
{
return new VenoAudioProcessor();
}

View File

@ -1,61 +1,37 @@
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin processor.
==============================================================================
*/
#pragma once
#include <JuceHeader.h>
#include "Veno/VenoInstance.h"
//==============================================================================
/**
*/
class VenoAudioProcessor : public AudioProcessor
class VenoAudioProcessor : public AudioProcessor
{
public:
//==============================================================================
VenoAudioProcessor();
~VenoAudioProcessor();
//==============================================================================
VenoAudioProcessor ();
~VenoAudioProcessor ();
void prepareToPlay (double sampleRate, int samplesPerBlock) override;
void releaseResources() override;
#ifndef JucePlugin_PreferredChannelConfigurations
void releaseResources () override;
#ifndef JucePlugin_PreferredChannelConfigurations
bool isBusesLayoutSupported (const BusesLayout& layouts) const override;
#endif
#endif
void processBlock (AudioBuffer<float>&, MidiBuffer&) override;
//==============================================================================
AudioProcessorEditor* createEditor() override;
bool hasEditor() const override;
//==============================================================================
const String getName() const override;
bool acceptsMidi() const override;
bool producesMidi() const override;
bool isMidiEffect() const override;
double getTailLengthSeconds() const override;
//==============================================================================
int getNumPrograms() override;
int getCurrentProgram() override;
AudioProcessorEditor* createEditor () override;
bool hasEditor () const override;
const String getName () const override;
bool acceptsMidi () const override;
bool producesMidi () const override;
bool isMidiEffect () const override;
double getTailLengthSeconds () const override;
int getNumPrograms () override;
int getCurrentProgram () override;
void setCurrentProgram (int index) override;
const String getProgramName (int index) override;
void changeProgramName (int index, const String& newName) override;
//==============================================================================
void getStateInformation (MemoryBlock& destData) override;
void setStateInformation (const void* data, int sizeInBytes) override;
// Variable to communicate with the GUI and the Processor
std::string m_id = Uuid().toString().toStdString();
std::shared_ptr<VenoInstance> instance;
private:
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoAudioProcessor)
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoAudioProcessor);
};

View File

@ -0,0 +1,18 @@
#version 330 core
in vec4 newColor;
in vec4 newGradientColor;
in vec4 sPosition;
out vec4 fragColor;
void main()
{
if (newColor == newGradientColor) {
fragColor = newColor;
} else {
vec2 st = sPosition.xy;
float mixValue = distance(st, vec2(0, 0));
vec3 color = mix(newGradientColor.xyz, newColor.xyz, mixValue);
fragColor = vec4(color, mixValue);
}
}

View File

@ -0,0 +1,15 @@
#version 330 core
in vec4 position;
uniform vec4 color = vec4(1f, 1f, 1f, 1f);
uniform vec4 gradientColor = vec4(1f, 1f, 1f, 1f);
out vec4 newColor;
out vec4 newGradientColor;
out vec4 sPosition;
void main()
{
gl_Position = position;
newColor = color;
newGradientColor = gradientColor;
sPosition = position;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
Source/Resources/arvo.ttf Normal file

Binary file not shown.

BIN
Source/Resources/lcd.ttf Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
//
// Created by versustune on 13.06.20.
//
#include "ModulateValue.h"
ModulateValue::ModulateValue (const std::string& name, const std::string& processId)
{
m_name = name;
m_processId = processId;
}
void ModulateValue::addValue (float d)
{
}
ModulateValue::~ModulateValue ()
{
}

View File

@ -0,0 +1,25 @@
//
// Created by versustune on 13.06.20.
//
#ifndef VENO_MODULATEVALUE_H
#define VENO_MODULATEVALUE_H
#include <string>
// a class that is used to can handle the value from a "gui-part" and the matrix and all other modulation
class ModulateValue
{
public:
ModulateValue (const std::string& name, const std::string& processId);
~ModulateValue ();
void addValue (float d);
private:
std::string m_name;
std::string m_processId;
float m_value;
float m_baseValue = 0;
float m_maxValue = 1;
float m_minValue = -1;
};
#endif //VENO_MODULATEVALUE_H

View File

@ -0,0 +1,24 @@
//
// Created by versustune on 13.06.20.
//
#include "Modulator.h"
float Modulator::getValue ()
{
return m_value;
}
Modulator::Modulator ()
{
}
Modulator::~Modulator ()
{
}
void Modulator::update ()
{
}

View File

@ -0,0 +1,19 @@
//
// Created by versustune on 13.06.20.
//
#ifndef VENO_MODULATOR_H
#define VENO_MODULATOR_H
// class that define if it can be a modulator on not
// like LFO, Envelope, maybe also OSCILLATORS :P VELOCITY AND OTHER STUFF IS ALSO A MODULATOR!
class Modulator
{
public:
Modulator ();
~Modulator ();
float getValue ();
void update ();
protected:
float m_value;
};
#endif //VENO_MODULATOR_H

View File

@ -0,0 +1,136 @@
//
// Created by versustune on 13.06.20.
//
#include "VeNoMatrix.h"
#include "../../Utils/StringUtils.h"
VeNoMatrix::VeNoMatrix (const std::string& processId) : m_processId (processId)
{
}
VeNoMatrix::~VeNoMatrix ()
{
for (auto& m_slot : m_slots)
{
delete m_slot.second;
m_slots.erase (m_slot.first);
}
for (auto& value : m_modulationValues)
{
delete value.second;
m_modulationValues.erase (value.first);
}
for (auto& value : m_modulators)
{
delete value.second;
m_modulators.erase (value.first);
}
}
void VeNoMatrix::removeModulateValue (const std::string& name)
{
m_modulationValues.erase (name);
}
void VeNoMatrix::removeModulator (const std::string& name)
{
m_modulators.erase (name);
}
void VeNoMatrix::addModulateValue (const std::string& name, ModulateValue* modulateValue)
{
m_modulationValues.emplace (std::pair<const std::string&, ModulateValue*> (name, modulateValue));
}
void VeNoMatrix::addModulator (const std::string& name, Modulator* modulator)
{
m_modulators.emplace (std::pair<const std::string&, Modulator*> (name, modulator));
}
//matrix is not in the valueTree-state is some own implementation!
void VeNoMatrix::updateSlots ()
{
for (auto& m_source : m_modulators)
{
m_source.second->update ();
}
for (auto& m_slot : m_slots)
{
auto source = m_modulators[m_slot.second->source];
auto value = m_modulationValues[m_slot.second->name];
auto amount = m_slot.second->amount;
value->addValue (source->getValue () * amount);
}
}
void VeNoMatrix::setMatrixModulation (const std::string& name, const std::string& source, float amount)
{
auto c = std::string (source + name);
if (m_slots.find (c) == m_slots.end ())
{
m_slots[c] = new VeNoMatrixTarget ();
m_slots[c]->source = source;
m_slots[c]->name = name;
}
m_slots[c]->amount = amount;
}
std::unique_ptr<XmlElement> VeNoMatrix::saveMatrixToXML ()
{
auto* tree = new ValueTree ();
for (auto& m_slot : m_slots)
{
std::string name = m_slot.second->source + m_slot.second->name;
tree->setProperty (String (name), String (m_slot.second->toString ()), nullptr);
}
auto xml = tree->createXml ();
delete tree;
return xml;
}
void VeNoMatrix::getMatrixFromXML (std::unique_ptr<XmlElement>& xml)
{
// first we need to delete the state!
for (auto& m_slot : m_slots)
{
delete m_slot.second;
m_slots.erase (m_slot.first);
}
// recreate the matrix from xml...
auto tree = juce::ValueTree::fromXml (*xml);
for (int i = 0; i < tree.getNumChildren (); ++i)
{
auto name = tree.getPropertyName (i);
auto child = tree.getPropertyAsValue (name, nullptr);
auto slot = VeNoMatrixTarget::fromString (child.toString ().toStdString ());
if (slot != nullptr)
{
m_slots[name.toString ().toStdString ()] = slot;
}
}
}
// crate a string to save to ValueTree-State
std::string VeNoMatrixTarget::toString () const
{
return std::string (source + "_#_" + name + "_#_" + std::to_string (amount));
}
// recreate from ValueTree-State... <3 is a very special format
VeNoMatrixTarget* VeNoMatrixTarget::fromString (const std::string& value)
{
auto out = VeNo::StringUtils::split (value, "_#_");
// if size is not 3 this is invalid! return nullptr!
if (out.size () == 3)
{
auto returnValue = new VeNoMatrixTarget ();
returnValue->source = out[0];
returnValue->name = out[1];
returnValue->amount = std::atof (out[2].c_str ());
return new VeNoMatrixTarget ();
}
return nullptr;
}

View File

@ -0,0 +1,48 @@
//
// Created by versustune on 13.06.20.
//
#ifndef VENO_VENOMATRIX_H
#define VENO_VENOMATRIX_H
#include <string>
#include <unordered_map>
#include <vector>
#include "Modulator.h"
#include "ModulateValue.h"
#include "JuceHeader.h"
// class that modulate everything :D
struct VeNoMatrixTarget
{
std::string name;
std::string source;
float amount = 0; // always 0 to 1 <-- apply amount to modulator
std::string toString() const;
static VeNoMatrixTarget* fromString(const std::string& value);
};
//@todo rebuild to new unlimited implementation!
// and make compatible with the value class that is used for saving and sync the ValueTree...
class VeNoMatrix
{
public:
explicit VeNoMatrix (const std::string& processId);
~VeNoMatrix ();
void updateSlots ();
void addModulator (const std::string& name, Modulator* modulator);
void addModulateValue (const std::string& name, ModulateValue* modulateValue);
void removeModulator (const std::string& name);
void removeModulateValue (const std::string& name);
void setMatrixModulation(const std::string& name, const std::string& source, float amount);
std::unique_ptr<XmlElement> saveMatrixToXML();
void getMatrixFromXML(std::unique_ptr<XmlElement>& xml);
private:
std::unordered_map<std::string, Modulator*> m_modulators; //all sources
std::unordered_map<std::string, ModulateValue*> m_modulationValues;
std::unordered_map<std::string, VeNoMatrixTarget*> m_slots;
std::string m_processId;
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VeNoMatrix)
};
#endif //VENO_VENOMATRIX_H

View File

@ -0,0 +1,11 @@
//
// Created by versustune on 09.06.20.
//
#include "SynthInstance.h"
#include <utility>
SynthInstance::SynthInstance (std::string processId)
: m_processId(std::move(processId))
{
}

View File

@ -0,0 +1,22 @@
//
// Created by versustune on 09.06.20.
//
#ifndef VENO_SYNTHINSTANCE_H
#define VENO_SYNTHINSTANCE_H
#include <string>
#include "JuceHeader.h"
// class that hold all voices, oscillators and other stuff :)
class SynthInstance
{
private:
std::string m_processId;
public:
explicit SynthInstance (std::string processId);
~SynthInstance () = default;
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SynthInstance)
};
#endif //VENO_SYNTHINSTANCE_H

View File

@ -0,0 +1,84 @@
//
// Created by versustune on 12.06.20.
//
#include <cmath>
#include "VenoBuffer.h"
#include "../Utils.h"
VenoBuffer::VenoBuffer ()
{
}
VenoBuffer::~VenoBuffer ()
{
buffer.clear ();
right.clear ();
left.clear ();
}
void VenoBuffer::reset (int size)
{
if (size != buffer.size ())
{
buffer.resize (size);
right.resize (size);
left.resize (size);
}
// reset to 0 dc :D
for (int i = 0; i < size; ++i)
{
buffer[i] = 0;
left[i] = 0;
right[i] = 0;
}
leftPeak = -30;
rightPeak = -30;
monoPeak = -30;
}
void VenoBuffer::addMonoSample (float value, int index)
{
buffer[index] = value;
}
void VenoBuffer::addLeftSample (float value, int index)
{
left[index] = value;
}
void VenoBuffer::addRightSample (float value, int index)
{
right[index] = value;
}
void VenoBuffer::calcPeak ()
{
float leftRMS = 0;
float rightRMS = 0;
auto size = buffer.size();
for (int i = 0; i < size; ++i)
{
leftRMS += left[i] * left[i];
rightRMS += right[i] * right[i];
}
rightPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (std::sqrt (rightRMS / size), -30.0f), -30.0f, 0.0f);
leftPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (std::sqrt (leftRMS / size), -30.0f), -30.0f, 0.0f);
monoPeak = leftPeak;
}
const std::vector<float>& VenoBuffer::getBuffer () const
{
return buffer;
}
const std::vector<float>& VenoBuffer::getRight () const
{
return right;
}
const std::vector<float>& VenoBuffer::getLeft () const
{
return left;
}

View File

@ -0,0 +1,34 @@
//
// Created by versustune on 12.06.20.
//
#ifndef VENO_VENOBUFFER_H
#define VENO_VENOBUFFER_H
#include <vector>
#include "JuceHeader.h"
class VenoBuffer
{
private:
std::vector<float> buffer;
std::vector<float> right;
std::vector<float> left;
public:
VenoBuffer ();
~VenoBuffer ();
void reset (int size);
void addMonoSample (float value, int index);
void addLeftSample (float value, int index);
void addRightSample (float value, int index);
void calcPeak ();
float leftPeak;
float rightPeak;
float monoPeak;
const std::vector<float>& getBuffer () const;
const std::vector<float>& getRight () const;
const std::vector<float>& getLeft () const;
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoBuffer);
};
#endif //VENO_VENOBUFFER_H

View File

@ -0,0 +1,31 @@
//
// Created by versustune on 08.06.20.
//
#include "WaveTableGenerator.h"
#include "../../Utils/Logger.h"
#include "TableHelper.h"
void generateSaw (WaveTableGroup* group)
{
if (group == nullptr)
{
return;
}
int tableLen = findTableLen();
int idx;
auto* freqWaveRe = new double[tableLen];
auto* freqWaveIm = new double[tableLen];
for (idx = 0; idx < tableLen; idx++)
{
freqWaveIm[idx] = 0.0;
}
freqWaveRe[0] = freqWaveRe[tableLen >> 1] = 0.0;
for (idx = 1; idx < (tableLen >> 1); idx++)
{
freqWaveRe[idx] = 1.0 / idx; // sawtooth spectrum
freqWaveRe[tableLen - idx] = -freqWaveRe[idx]; // mirror
}
fillTables(group, freqWaveRe, freqWaveIm, tableLen);
VeNo::Logger::infoDebugMessage("Generated clean Saw Wave");
}

View File

@ -0,0 +1,8 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_SAWWAVES_H
#define VENO_SAWWAVES_H
void generateSaw (WaveTableGroup* group);
#endif //VENO_SAWWAVES_H

View File

@ -0,0 +1,5 @@
//
// Created by versustune on 08.06.20.
//
#include "SineWaves.h"

View File

@ -0,0 +1,11 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_SINEWAVES_H
#define VENO_SINEWAVES_H
class SineWaves
{
};
#endif //VENO_SINEWAVES_H

View File

@ -0,0 +1,5 @@
//
// Created by versustune on 08.06.20.
//
#include "SquareWaves.h"

View File

@ -0,0 +1,11 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_SQUAREWAVES_H
#define VENO_SQUAREWAVES_H
class SquareWaves
{
};
#endif //VENO_SQUAREWAVES_H

View File

@ -0,0 +1,163 @@
//
// Created by versustune on 08.06.20.
//
#include "TableHelper.h"
#include "../../Core/AudioConfig.h"
#include "../../Utils.h"
void fft (int N, double* ar, double* ai)
{
int i, j, k, L; /* indexes */
int M, TEMP, LE, LE1, ip; /* M = log N */
int NV2, NM1;
double t; /* temp */
double Ur, Ui, Wr, Wi, Tr, Ti;
double Ur_old;
// if ((N > 1) && !(N & (N - 1))) // make sure we have a power of 2
NV2 = N >> 1;
NM1 = N - 1;
TEMP = N; /* get M = log N */
M = 0;
while (TEMP >>= 1) ++M;
/* shuffle */
j = 1;
for (i = 1; i <= NM1; i++)
{
if (i < j)
{ /* swap a[i] and a[j] */
t = ar[j - 1];
ar[j - 1] = ar[i - 1];
ar[i - 1] = t;
t = ai[j - 1];
ai[j - 1] = ai[i - 1];
ai[i - 1] = t;
}
k = NV2; /* bit-reversed counter */
while (k < j)
{
j -= k;
k /= 2;
}
j += k;
}
LE = 1.;
for (L = 1; L <= M; L++)
{ // stage L
LE1 = LE; // (LE1 = LE/2)
LE *= 2; // (LE = 2^L)
Ur = 1.0;
Ui = 0.;
Wr = std::cos(M_PI / (float) LE1);
Wi = -std::sin(M_PI / (float) LE1); // Cooley, Lewis, and Welch have "+" here
for (j = 1; j <= LE1; j++)
{
for (i = j; i <= N; i += LE)
{ // butterfly
ip = i + LE1;
Tr = ar[ip - 1] * Ur - ai[ip - 1] * Ui;
Ti = ar[ip - 1] * Ui + ai[ip - 1] * Ur;
ar[ip - 1] = ar[i - 1] - Tr;
ai[ip - 1] = ai[i - 1] - Ti;
ar[i - 1] = ar[i - 1] + Tr;
ai[i - 1] = ai[i - 1] + Ti;
}
Ur_old = Ur;
Ur = Ur_old * Wr - Ui * Wi;
Ui = Ur_old * Wi + Ui * Wr;
}
}
}
float makeWaveTable (WaveTableGroup* group, int len, double* ar, double* ai, double scale, double topFreq)
{
fft(len, ar, ai);
if (scale == 0.0)
{
// calc normal
double max = 0;
for (int idx = 0; idx < len; idx++)
{
double temp = fabs(ai[idx]);
if (max < temp)
max = temp;
}
scale = 1.0 / max * .999;
}
// normalize
auto* wave = new float[len];
for (int idx = 0; idx < len; idx++)
wave[idx] = ai[idx] * scale;
if (group->m_numWaveTables < WaveTableGroup::numWaveTableSlots)
{
auto table = group->m_WaveTables[group->m_numWaveTables] = new WaveTableObject();
float* waveTable = group->m_WaveTables[group->m_numWaveTables]->m_waveTable = new float[len + 1];
table->m_waveTableLen = len;
table->m_topFreq = topFreq;
++group->m_numWaveTables;
// fill in wave
for (long idx = 0; idx < len; idx++)
waveTable[idx] = wave[idx];
waveTable[len] = waveTable[0]; // duplicate for interpolation wraparound
return 0;
}
else
{
scale = 0.0;
}
return (float) scale;
}
int fillTables (WaveTableGroup* group, double* freqWaveRe, double* freqWaveIm, int numSamples)
{
int idx;
freqWaveRe[0] = freqWaveIm[0] = 0.0;
freqWaveRe[numSamples >> 1] = freqWaveIm[numSamples >> 1] = 0.0;
int maxHarmonic = numSamples >> 1;
const double minVal = 0.000001; // -120 dB
while ((fabs(freqWaveRe[maxHarmonic]) + fabs(freqWaveIm[maxHarmonic]) < minVal) && maxHarmonic) --maxHarmonic;
double topFreq = 2.0 / 3.0 / maxHarmonic;
double* ar = new double[numSamples];
double* ai = new double[numSamples];
double scale = 0.0;
int numTables = 0;
while (maxHarmonic)
{
// fill the table in with the needed harmonics
for (idx = 0; idx < numSamples; idx++)
ar[idx] = ai[idx] = 0.0;
for (idx = 1; idx <= maxHarmonic; idx++)
{
ar[idx] = freqWaveRe[idx];
ai[idx] = freqWaveIm[idx];
ar[numSamples - idx] = freqWaveRe[numSamples - idx];
ai[numSamples - idx] = freqWaveIm[numSamples - idx];
}
// make the wavetable
scale = makeWaveTable(group, numSamples, ar, ai, scale, topFreq);
numTables++;
// prepare for next table
topFreq *= 2;
maxHarmonic >>= 1;
}
return numTables;
}
float getNextRand ()
{
return std::rand() / double(RAND_MAX);
}
int findTableLen ()
{
int maxHarms = AudioConfig::getInstance()->getSampleRate() / (5.0 * 20) + 0.5;
return VeNo::Utils::nextPowerOfTwo(maxHarms) * 2;
}

View File

@ -0,0 +1,28 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_TABLEHELPER_H
#define VENO_TABLEHELPER_H
#include <cmath>
#include <cstdlib>
#include "WaveTableGenerator.h"
#define M_PI 3.14159265358979323846
#define DOUBLE_PI 6.283185307179586476925286766559
/*
in-place complex fft
After Cooley, Lewis, and Welch; from Rabiner & Gold (1975)
program adapted from FORTRAN
by K. Steiglitz (ken@princeton.edu)
Computer Science Dept.
Princeton University 08544
*/
void fft (int N, double* ar, double* ai);
float makeWaveTable (WaveTableGroup* group, int len, double* ar, double* ai, double scale, double topFreq);
// utils stuff
int fillTables (WaveTableGroup* group, double* freqWaveRe, double* freqWaveIm, int numSamples);
int findTableLen ();
float getNextRand ();
#endif //VENO_TABLEHELPER_H

View File

@ -0,0 +1,5 @@
//
// Created by versustune on 08.06.20.
//
#include "TriangleWaves.h"

View File

@ -0,0 +1,11 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_TRIANGLEWAVES_H
#define VENO_TRIANGLEWAVES_H
class TriangleWaves
{
};
#endif //VENO_TRIANGLEWAVES_H

View File

@ -0,0 +1,5 @@
//
// Created by versustune on 08.06.20.
//
#include "VeNoXWaves.h"

View File

@ -0,0 +1,11 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_VENOXWAVES_H
#define VENO_VENOXWAVES_H
class VeNoXWaves
{
};
#endif //VENO_VENOXWAVES_H

View File

@ -0,0 +1,61 @@
//
// Created by versustune on 08.06.20.
//
#include "WaveTableGenerator.h"
#include "../../Core/AudioConfig.h"
#include "WavesInlcuder.h"
void WaveTableGenerator::init ()
{
//if the sampleRate changed... the WaveTables are not harmonic Save anymore and are needed to rebuild... pls stay save later!
if (AudioConfig::getInstance()->isNeedToReInit())
{
cleanTables();
AudioConfig::getInstance()->setNeedToReInit(false);
}
if (m_isInit)
{
return;
}
m_waveTables[WaveForms::SAW] = new WaveTableGroup();
m_waveTables[WaveForms::SINE] = new WaveTableGroup();
m_waveTables[WaveForms::SQUARE] = new WaveTableGroup();
m_waveTables[WaveForms::TRIANGLE] = new WaveTableGroup();
m_waveTables[WaveForms::wSaw] = new WaveTableGroup();
m_waveTables[WaveForms::wSQUARE] = new WaveTableGroup();
m_waveTables[WaveForms::SYNTHONE] = new WaveTableGroup();
m_waveTables[WaveForms::SYNTHTWO] = new WaveTableGroup();
m_waveTables[WaveForms::VENOX] = new WaveTableGroup();
generateSaw(m_waveTables[WaveForms::SAW]);
m_isInit = true;
}
WaveTableGroup* WaveTableGenerator::getGroup (int id)
{
if (!m_isInit)
{
init();
}
if (id < 40)
{
return m_waveTables[id];
}
return nullptr;
}
void WaveTableGenerator::cleanTables ()
{
for (auto& m_waveTable : m_waveTables)
{
for (int i = 0; i < numWaveTableSlots; ++i)
{
if (m_waveTable != nullptr && m_waveTable->m_WaveTables[i] != nullptr) {
delete[] m_waveTable->m_WaveTables[i]->m_waveTable;
delete m_waveTable->m_WaveTables[i];
}
}
delete m_waveTable;
}
m_isInit = false;
}

View File

@ -0,0 +1,55 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_WAVETABLEGENERATOR_H
#define VENO_WAVETABLEGENERATOR_H
#include "JuceHeader.h"
struct WaveTableObject
{
double m_topFreq;
int m_waveTableLen;
float* m_waveTable;
};
struct WaveTableGroup
{
static constexpr int numWaveTableSlots = 40;
WaveTableObject* m_WaveTables[numWaveTableSlots] = {};
int m_numWaveTables = 0;
};
enum WaveForms
{
SAW = 0,
SINE,
SQUARE,
TRIANGLE,
wSaw,
wSQUARE, //that stuff is to dirty xD,
SYNTHONE,
SYNTHTWO,
VENOX
};
class WaveTableGenerator
{
private:
static constexpr int numWaveTableSlots = 40;
WaveTableGroup* m_waveTables[numWaveTableSlots] = {};
public:
static WaveTableGenerator& getInstance ()
{
static WaveTableGenerator instance;
return instance;
}
WaveTableGroup* getGroup (int id);
void init ();
void cleanTables ();
protected:
bool m_isInit = false;
WaveTableGenerator () = default;
~WaveTableGenerator () = default;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WaveTableGenerator)
};
#endif //VENO_WAVETABLEGENERATOR_H

View File

@ -0,0 +1,6 @@
#include "TableHelper.h"
#include "SawWaves.h"
#include "SineWaves.h"
#include "SquareWaves.h"
#include "TriangleWaves.h"
#include "VeNoXWaves.h"

View File

@ -0,0 +1,78 @@
//
// Created by versustune on 22.03.20.
//
#include "AudioConfig.h"
#include "../Audio/WaveTable/WaveTableGenerator.h"
std::shared_ptr<AudioConfig> AudioConfig::m_instance;
std::unordered_map<std::string, std::string> AudioConfig::m_instances;
float AudioConfig::getSampleRate ()
{
return m_sampleRate;
}
void AudioConfig::setSampleRate (float _sampleRate)
{
if (m_sampleRate != _sampleRate)
{
m_sampleRate = _sampleRate;
m_needToReInit = true;
}
}
float AudioConfig::getBufferSize ()
{
return m_bufferSize;
}
void AudioConfig::setBufferSize (float _bufferSize)
{
m_bufferSize = _bufferSize;
}
bool AudioConfig::isNeedToReInit () const
{
return m_needToReInit;
}
void AudioConfig::setNeedToReInit (bool _needToReInit)
{
m_needToReInit = _needToReInit;
}
std::shared_ptr<AudioConfig> AudioConfig::getInstance ()
{
if (AudioConfig::m_instance == nullptr)
AudioConfig::m_instance = std::make_shared<AudioConfig> ();
return m_instance;
}
void AudioConfig::initWaveTables ()
{
WaveTableGenerator::getInstance ().init ();
}
AudioConfig::~AudioConfig ()
{
WaveTableGenerator::getInstance ().cleanTables ();
}
AudioConfig::AudioConfig ()
{
}
void AudioConfig::registerInstance (std::string id)
{
m_instances[id] = id;
}
void AudioConfig::deleteInstance (std::string id)
{
m_instances.erase (id);
if (m_instances.size () == 0)
{
m_instance.reset ();
}
}

View File

@ -10,48 +10,28 @@
/**
* holds SampleRate and other needed sound information's :)
*/
class AudioConfig {
class AudioConfig
{
private:
static std::shared_ptr<AudioConfig> instance;
float sampleRate = 44100;
float bufferSize = 512; //maybe we need that... but this will update always!
bool needToReInit = false; //this is to reInit the Oscillators, ADSR and other stuff
static std::shared_ptr<AudioConfig> m_instance;
float m_sampleRate = 44100;
float m_bufferSize = 512; //maybe we need that... but this will update always!
bool m_needToReInit = false; //this is to reInit the Oscillators, ADSR and other stuff
static std::unordered_map<std::string, std::string> m_instances;
public:
static std::shared_ptr<AudioConfig> getInstance() {
if (!instance)
instance = std::make_shared<AudioConfig>();
return instance;
}
float getSampleRate() const {
return sampleRate;
}
void setSampleRate(float _sampleRate) {
if (sampleRate != _sampleRate) {
sampleRate = _sampleRate;
needToReInit = true;
}
}
float getBufferSize() const {
return bufferSize;
}
void setBufferSize(float _bufferSize) {
AudioConfig::bufferSize = _bufferSize;
}
bool isNeedToReInit() const {
return needToReInit;
}
void setNeedToReInit(bool _needToReInit) {
AudioConfig::needToReInit = _needToReInit;
}
static std::shared_ptr<AudioConfig> getInstance ();
float getSampleRate ();
void setSampleRate (float _sampleRate);
float getBufferSize ();
void setBufferSize (float _bufferSize);
bool isNeedToReInit () const;
void setNeedToReInit (bool _needToReInit);
static void initWaveTables ();
AudioConfig();
~AudioConfig ();
static void registerInstance (std::string id);
static void deleteInstance (std::string id);
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioConfig);
};
#endif //VENO_AUDIOCONFIG_H

View File

@ -3,71 +3,143 @@
//
#include "Config.h"
#include "../Fonts/Fonts.h"
#include "../GUI/GUIParts/Sidebar/VenoLogo.h"
#include "../Utils.h"
std::shared_ptr<Config> Config::instance = nullptr;
std::shared_ptr<Config> Config::m_instance = nullptr;
Config::Config() {
// i want to load the config file here...
Config::Config ()
{
// i want to load the m_config file here...
initConfig();
theme = std::make_shared<Theme>(config);
theme->init();
m_theme = std::make_shared<Theme>(m_config);
m_theme->init();
m_fps = m_config->getIntValue("waveform_fps", 60);
startTimer(5000);
}
void Config::saveAll() {
if (config != nullptr) {
config->saveIfNeeded();
void Config::saveAll ()
{
if (m_config != nullptr)
{
m_config->saveIfNeeded();
}
}
int Config::getCurrentLook() {
if (currentLook > 1) {
currentLook = 0;
int Config::getCurrentLook ()
{
if (m_currentLook > 1)
{
m_currentLook = 0;
}
return currentLook;
return m_currentLook;
}
void Config::initConfig() {
void Config::initConfig ()
{
PropertiesFile::Options options;
options.applicationName = "config";
options.folderName = "veno";
options.filenameSuffix = "xml";
config = std::make_unique<PropertiesFile>(options);
m_config = std::make_unique<PropertiesFile>(options);
m_scale = (float) m_config->getDoubleValue("scale", 1.0);
}
std::shared_ptr<Theme> Config::getCurrentTheme() {
return theme;
std::shared_ptr<Theme> Config::getCurrentTheme ()
{
return m_theme;
}
double Config::getScale() {
return 0;
double Config::getScale () const
{
return m_scale;
}
void Config::setColourForIndex(Colour *colour, ThemeColour index) {
if (theme) {
theme->setColour(index, colour);
void Config::setColourForIndex (Colour* colour, ThemeColour index)
{
if (m_theme)
{
m_theme->setColour(index, colour);
}
}
Config::~Config() {
config->save();
theme.reset();
config.reset();
Config::~Config ()
{
m_config->save();
m_config->setNeedsToBeSaved(false);
m_theme.reset();
m_config.reset();
m_lookHandler.reset();
stopTimer();
VenoFonts::destroyAll();
VenoLogo::deleteInstance();
}
//LEAK DETECTOR FIX!
void Config::registerEditor(AudioProcessorEditor *editor, const std::string &name) {
editors[name] = editor;
void Config::registerEditor (AudioProcessorEditor* editor, const std::string& name)
{
m_editors[name] = editor;
}
void Config::removeEditor(const std::string &name) {
editors.erase(name);
if (editors.empty()) {
instance = nullptr;
void Config::removeEditor (const std::string& name)
{
m_editors.erase(name);
if (m_editors.empty())
{
m_instance = nullptr;
}
}
//for LCD :P let's be a bit funny xD
int Config::getEditorCount() {
editors.size();
int Config::getEditorCount ()
{
return m_editors.size();
}
std::shared_ptr<Config> Config::getInstance ()
{
if (m_instance == nullptr)
m_instance = std::make_shared<Config>();
return m_instance;
}
int Config::getFps () const
{
return m_fps;
}
void Config::setScale (float value)
{
value = VeNo::Utils::clamp(value, 0.5f, 2.5f);
m_scale = value;
m_config->setValue("scale", m_scale);
m_config->setNeedsToBeSaved(true);
for (auto& editor : m_editors)
{
editor.second->setSize(1200 * m_scale, 700 * m_scale);
}
}
void Config::timerCallback ()
{
m_config->saveIfNeeded();
}
void Config::repaintAll ()
{
for (auto& editor : m_editors)
{
if (editor.second->isShowing())
{
editor.second->repaint();
}
}
}
void Config::setFps (float value)
{
m_fps = VeNo::Utils::clamp(value, 15, 90);
m_config->setValue("waveform_fps", m_fps);
m_config->setNeedsToBeSaved(true);
}

View File

@ -10,43 +10,37 @@
#include "../GUI/Theme/Theme.h"
#include <memory>
class Config {
class Config : public Timer
{
private:
std::shared_ptr<PropertiesFile> config = nullptr;
std::shared_ptr<Theme> theme = nullptr;
static std::shared_ptr<Config> instance;
int currentLook = 0; //nah move the bitch logic from current to next
std::unordered_map<std::string, AudioProcessorEditor *> editors;
std::shared_ptr<PropertiesFile> m_config = nullptr;
std::shared_ptr<Theme> m_theme = nullptr;
static std::shared_ptr<Config> m_instance;
int m_currentLook = 0; //nah move the bitch logic from current to next
std::unordered_map<std::string, AudioProcessorEditor*> m_editors;
std::shared_ptr<LookHandler> m_lookHandler;
public:
static std::shared_ptr<Config> getInstance() {
if (!instance)
instance = std::make_shared<Config>();
return instance;
}
void saveAll();
int getCurrentLook();
void setColourForIndex(Colour *colour, ThemeColour index);
std::shared_ptr<Theme> getCurrentTheme();
double getScale();
int m_fps = 60;
float m_scale = 1.0f;
static std::shared_ptr<Config> getInstance ();
void saveAll ();
int getCurrentLook ();
void setColourForIndex (Colour* colour, ThemeColour index);
std::shared_ptr<Theme> getCurrentTheme ();
double getScale () const;
// can be public but doesnt need!
Config();
~Config();
void registerEditor(AudioProcessorEditor *editor, const std::string& name);
void removeEditor(const std::string& name);
int getEditorCount();
Config ();
~Config ();
void registerEditor (AudioProcessorEditor* editor, const std::string& name);
void removeEditor (const std::string& name);
int getEditorCount ();
int getFps () const;
void setScale(float value);
void setFps(float value);
void timerCallback () override;
void repaintAll();
protected:
void initConfig();
void initConfig ();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Config);
};
#endif //VENO_CONFIG_H

View File

@ -0,0 +1,5 @@
//
// Created by versustune on 11.06.20.
//
#include "PresetManager.h"

View File

@ -0,0 +1,11 @@
//
// Created by versustune on 11.06.20.
//
#ifndef VENO_PRESETMANAGER_H
#define VENO_PRESETMANAGER_H
class PresetManager
{
};
#endif //VENO_PRESETMANAGER_H

View File

@ -0,0 +1,16 @@
//
// Created by versustune on 14.06.20.
//
#include "VeNoState.h"
VeNoState::VeNoState (std::string pid)
{
m_pid = pid;
}
VeNoState::~VeNoState ()
{
delete configScreen;
configScreen = nullptr;
}

View File

@ -0,0 +1,21 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_VENOSTATE_H
#define VENO_VENOSTATE_H
#include <string>
#include "../GUI/GUIParts/ConfigScreen/VenoConfigScreen.h"
class VeNoState
{
protected:
std::string m_pid = "";
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VeNoState);
public:
VeNoState(std::string pid);
~VeNoState();
VenoConfigScreen* configScreen = nullptr;
};
#endif //VENO_VENOSTATE_H

View File

@ -0,0 +1,50 @@
//
// Created by versustune on 13.06.20.
//
#include "Fonts.h"
VenoFonts* VenoFonts::instance = new VenoFonts();
Font* VenoFonts::getNormal ()
{
return getInstance()->arvo;
}
Font* VenoFonts::getLCD ()
{
return getInstance()->lcdFont;
}
VenoFonts* VenoFonts::getInstance ()
{
if (instance == nullptr)
{
instance = new VenoFonts();
}
return instance;
}
void VenoFonts::destroyAll ()
{
if (instance != nullptr) {
delete instance;
}
instance = nullptr;
}
VenoFonts::VenoFonts ()
{
arvo = new Font(Typeface::createSystemTypefaceFor(BinaryData::arvo_ttf,
BinaryData::arvo_ttfSize));
lcdFont = new Font(Typeface::createSystemTypefaceFor(BinaryData::lcd_ttf,
BinaryData::lcd_ttfSize));
}
VenoFonts::~VenoFonts ()
{
delete arvo;
delete lcdFont;
arvo = nullptr;
lcdFont = nullptr;
}

25
Source/Veno/Fonts/Fonts.h Normal file
View File

@ -0,0 +1,25 @@
//
// Created by versustune on 19.01.20.
//
#ifndef VENO_FONTS_H
#define VENO_FONTS_H
#include "JuceHeader.h"
class VenoFonts
{
protected:
static VenoFonts* instance;
Font* lcdFont;
Font* arvo;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoFonts)
public:
VenoFonts ();
~VenoFonts ();
static void destroyAll ();
static Font* getLCD ();
static Font* getNormal ();
static VenoFonts* getInstance ();
};
#endif //VENO_FONTS_H

View File

@ -3,3 +3,53 @@
//
#include "BaseComponent.h"
#include "../../Utils.h"
#include "../../Fonts/Fonts.h"
#include <utility>
BaseComponent::BaseComponent (const std::string& processId)
{
m_processId = processId;
}
BaseComponent::~BaseComponent ()
{
m_label.reset();
}
void BaseComponent::addLabel (const std::string& label_text, LabelPosition labelPosition)
{
m_enableLabel = true;
m_label = std::make_shared<LabelComponent>(this, label_text);
m_label->setPosition(labelPosition);
addAndMakeVisible(*m_label);
}
void BaseComponent::resized ()
{
if (m_enableLabel && m_label != nullptr)
{
LabelPosition position = m_label->getLabelPosition();
if (position == LabelPosition::TOP)
{
m_label->setBounds(0, 0, getWidth(), VeNo::Utils::getCalculatedHeight(15));
}
else if (position == LabelPosition::BOTTOM)
{
auto height = VeNo::Utils::getCalculatedHeight(15);
m_label->setBounds(0, getHeight() - height, getWidth(), height);
}
}
}
void BaseComponent::paint (Graphics& g)
{
g.setFont(*VenoFonts::getNormal());
}
void BaseComponent::setParameter (std::string name, std::string group)
{
m_name = std::move(name);
m_group = std::move(group);
setName(m_name);
}

View File

@ -6,20 +6,29 @@
#define VENO_BASECOMPONENT_H
#include "JuceHeader.h"
#include "LabelComponent.h"
#include "../LookAndFeel/LookHandler.h"
#include <string>
/**
* this is the base Component of all VeNo Components... it has all important Methods
*/
class BaseComponent : public Component {
class BaseComponent : public Component
{
private:
std::string prefix;
std::string m_group;
std::string m_name;
bool m_enableLabel = false;
public:
BaseComponent() = default;
~BaseComponent() = default;
explicit BaseComponent (const std::string& processId);
~BaseComponent () override;
void addLabel (const std::string& label, LabelPosition labelPosition);
void setParameter (std::string name, std::string group);
void resized () override;
void paint (Graphics& g) override;
protected:
std::string m_processId;
std::shared_ptr<LabelComponent> m_label;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BaseComponent);
};
#endif //VENO_BASECOMPONENT_H

View File

@ -0,0 +1,65 @@
//
// Created by versustune on 14.06.20.
//
#include "VeNoColour.h"
#include <utility>
#include "../../../Core/Config.h"
#include "../../../Utils.h"
using ColourOption = ColourSelector::ColourSelectorOptions;
VeNoColour::~VeNoColour ()
{
BaseComponent::m_label.reset();
m_selector.reset();
}
VeNoColour::VeNoColour (const std::string& processId, ThemeColour index)
: BaseComponent(processId)
{
m_index = index;
m_selector = std::make_unique<ColourSelector>(
ColourOption::showColourAtTop|ColourOption::editableColour|ColourOption::showColourspace);
m_selector->setCurrentColour(Config::getInstance()->getCurrentTheme()->getColour(index),
NotificationType::dontSendNotification);
m_selector->addChangeListener(this);
m_selector->setOpaque(false);
addAndMakeVisible(*m_selector);
}
void VeNoColour::setName (std::string name)
{
m_name = std::move(name);
if (BaseComponent::m_label == nullptr)
{
BaseComponent::addLabel(m_name, LabelPosition::TOP);
}
}
void VeNoColour::changeListenerCallback (ChangeBroadcaster* source)
{
auto selector = m_selector->getCurrentColour();
auto* colour = new Colour(selector.getRed(), selector.getGreen(), selector.getBlue(),
1.0f);
Config::getInstance()->getCurrentTheme()->setColour(m_index, colour);
Config::getInstance()->repaintAll();
}
void VeNoColour::resized ()
{
auto h = VeNo::Utils::getCalculatedHeight(30);
if (BaseComponent::m_label != nullptr)
{
BaseComponent::m_label->setBounds(0, 0, getWidth(), h);
}
if (m_selector != nullptr)
{
m_selector->setBounds(0, h, getWidth(), getHeight() - h);
}
}
void VeNoColour::paint (Graphics& g)
{
g.setColour(Colours::white);
BaseComponent::paint(g);
}

View File

@ -0,0 +1,27 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_VENOCOLOUR_H
#define VENO_VENOCOLOUR_H
#include "JuceHeader.h"
#include "../BaseComponent.h"
#include "../../Theme/Theme.h"
class VeNoColour : public BaseComponent, ChangeListener
{
private:
ThemeColour m_index;
std::unique_ptr<ColourSelector> m_selector;
std::string m_name;
public:
explicit VeNoColour (const std::string& processId, ThemeColour index);
~VeNoColour () override;
void setName(std::string name);
void resized () override;
void paint (Graphics& g) override;
private:
void changeListenerCallback (ChangeBroadcaster* source) override;
};
#endif //VENO_VENOCOLOUR_H

View File

@ -0,0 +1,34 @@
//
// Created by versustune on 14.06.20.
//
#include "VenoConfigButton.h"
#include "../../../Core/Config.h"
#include "../../../Utils.h"
#include "../../../VenoInstance.h"
#include "../../../Utils/Logger.h"
VenoConfigButton::VenoConfigButton (const std::string& processId) : BaseComponent(processId)
{
setMouseCursor(MouseCursor::PointingHandCursor);
}
void VenoConfigButton::paint (Graphics& g)
{
auto theme = Config::getInstance()->getCurrentTheme();
VeNo::Utils::setFontSize(16.0f, g);
g.setColour(theme->getColour(ThemeColour::accent));
g.drawRect(0, 0, getWidth(), getHeight());
g.drawFittedText("Config", 0, 0, getWidth(), getHeight(), Justification::centred, 1, 1);
}
void VenoConfigButton::mouseDown (const MouseEvent& event)
{
// open Window on click :)
auto state = VenoInstance::getInstance(m_processId)->state;
if (state->configScreen != nullptr)
{
return;
}
state->configScreen = new VenoConfigScreen(m_processId);
}

View File

@ -0,0 +1,21 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_VENOCONFIGBUTTON_H
#define VENO_VENOCONFIGBUTTON_H
#include "JuceHeader.h"
#include "../BaseComponent.h"
class VenoConfigButton : public BaseComponent
{
public:
VenoConfigButton (const std::string& processId);
~VenoConfigButton() = default;
void paint (Graphics& g) override;
void mouseDown (const MouseEvent& event) override;
private:
};
#endif //VENO_VENOCONFIGBUTTON_H

View File

@ -0,0 +1,84 @@
//
// Created by versustune on 14.06.20.
//
#include "VenoPreColours.h"
#include "../../../Core/Config.h"
VenoPreColours::VenoPreColours (const std::string& processId) : BaseComponent(processId)
{
initSliders();
initButtons();
}
VenoPreColours::~VenoPreColours ()
{
m_scaleSlider.reset();
m_fpsSlider.reset();
for (int i = 0; i < 4; ++i)
{
m_pre[i].reset();
}
}
void VenoPreColours::initSliders ()
{
m_fpsSlider = std::make_shared<Slider>();
m_fpsSlider->setRange(15, 90, 1);
m_fpsSlider->setValue(Config::getInstance()->getFps());
m_fpsSlider->setSliderStyle(Slider::SliderStyle::LinearHorizontal);
m_fpsSlider->setTooltip("FPS");
m_scaleSlider = std::make_shared<Slider>();
m_scaleSlider->setRange(0.5f, 2.5f, 0.1);
m_scaleSlider->setValue(Config::getInstance()->getScale());
m_scaleSlider->setSliderStyle(Slider::SliderStyle::LinearHorizontal);
m_scaleSlider->setTooltip("Scale");
m_scaleSlider->addListener(this);
m_fpsSlider->addListener(this);
addAndMakeVisible(*m_fpsSlider);
addAndMakeVisible(*m_scaleSlider);
}
void VenoPreColours::sliderValueChanged (Slider* slider)
{
if (slider == m_fpsSlider.get())
{
Config::getInstance()->setFps(slider->getValue());
}
if (slider == m_scaleSlider.get())
{
Config::getInstance()->setScale(slider->getValue());
}
}
void VenoPreColours::initButtons ()
{
//4
m_pre.resize(4);
for (int i = 0; i < 4; ++i)
{
m_pre[i] = std::make_unique<TextButton>(m_names[i]);
m_pre[i]->addListener(this);
addAndMakeVisible(m_pre[i].get());
}
}
void VenoPreColours::buttonClicked (Button* button)
{
auto text = button->getButtonText().toStdString();
Config::getInstance()->getCurrentTheme()->setDefault(text);
}
void VenoPreColours::resized ()
{
auto bounds = Rectangle<int>();
bounds.setBounds(0,0,getWidth(), getHeight()-100);
auto bWidth = (getWidth()-80) / 4;
for (int i = 0; i < 4 ; ++i)
{
m_pre[i]->setBounds((bWidth * i) + 40, 110, bWidth, 50);
}
// set slider and button position
m_fpsSlider->setBounds(20, 0, getWidth()-40, 50);
m_scaleSlider->setBounds(20, 50, getWidth()-40, 50);
}

View File

@ -0,0 +1,30 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_VENOPRECOLOURS_H
#define VENO_VENOPRECOLOURS_H
#include "JuceHeader.h"
#include "../../Components/BaseComponent.h"
class VenoPreColours : public BaseComponent, public Slider::Listener, Button::Listener
{
public:
VenoPreColours (const std::string& processId);
~VenoPreColours();
void initSliders();
void initButtons();
void sliderValueChanged (Slider* slider) override;
void resized () override;
private:
void buttonClicked (Button* button) override;
protected:
std::shared_ptr<Slider> m_fpsSlider;
std::shared_ptr<Slider> m_scaleSlider;
std::vector<std::unique_ptr<TextButton>> m_pre;
std::string m_names[4]{
"LED", "Blood", "Orange Dream", "Ocean"
};
};
#endif //VENO_VENOPRECOLOURS_H

View File

@ -0,0 +1,68 @@
//
// Created by Maurice on 29.06.2020.
//
#include "DecibelScale.h"
#include "../../../Core/Config.h"
#include "../../../Utils.h"
#include "../../../Fonts/Fonts.h"
DecibelScale::DecibelScale (const std::string& process_id) : BaseComponent (process_id)
{
}
void DecibelScale::resized ()
{
m_scale = 0.95 * getHeight();
}
void DecibelScale::paint (Graphics& g)
{
VeNo::Utils::setFontSize(7, g);
auto theme = Config::getInstance ()->getCurrentTheme ();
g.setColour (theme->getColour (ThemeColour::lcd));
g.setFont(*VenoFonts::getLCD());
if (m_mode == 0)
{
drawLabel (g, getScale (0), "0");
drawLabel (g, getScale (-3), "3");
drawLabel (g, getScale (-6), "6");
drawLabel (g, getScale (-9), "9");
drawLabel (g, getScale (-12), "12");
drawLabel (g, getScale (-18), "18");
drawLabel (g, getScale (-27), "27");
}
else
{
g.setOpacity (0);
}
}
int DecibelScale::getScale (float dB)
{
float fDef = (dB+30) / 30;
return int (fDef * m_scale);
}
void DecibelScale::drawLabel (Graphics& g, int y, const std::string& label)
{
auto font = g.getCurrentFont ();
int currentY = getHeight () - y;
int thisWidth = getWidth ();
int iMidHeight = (int) (font.getHeight () * 0.5f);
if (font.getStringWidth (label) < thisWidth - 5)
{
g.drawLine (0, currentY, 2, currentY);
g.drawLine (thisWidth - 3, currentY, thisWidth - 1, currentY);
}
g.drawText (label,
2, currentY - iMidHeight, thisWidth - 3, (int) font.getHeight (),
Justification::centred,
false);
m_lastY = currentY + 1;
}

View File

@ -0,0 +1,28 @@
//
// Created by Maurice on 29.06.2020.
//
#ifndef VENO_DECIBELSCALE_H
#define VENO_DECIBELSCALE_H
#include "JuceHeader.h"
#include "../BaseComponent.h"
class DecibelScale : public BaseComponent
{
private:
public:
explicit DecibelScale (const std::string& process_id);
~DecibelScale () override = default;
void resized () override;
void paint (Graphics& g) override;
int getScale(float dB);
void drawLabel(Graphics& g, int y, const std::string& label);
int m_mode = 0;
protected:
float m_scale = 0;
float m_lastY = 0;
};
#endif //VENO_DECIBELSCALE_H

View File

@ -0,0 +1,63 @@
//
// Created by versustune on 11.06.20.
//
#include "SidebarLCD.h"
#include "../../../Utils.h"
#include "../../../Core/Config.h"
#include "../../../Fonts/Fonts.h"
SidebarLCD::SidebarLCD (const std::string& process_id) : BaseComponent(process_id)
{
waveform = std::make_unique<Waveforms>(process_id);
addAndMakeVisible(*waveform);
}
SidebarLCD::~SidebarLCD ()
{
waveform.reset(nullptr);
}
void SidebarLCD::drawHeadline (Graphics& g)
{
float fontSize = VeNo::Utils::setFontSize(12.0f, g) + 2;
int line = m_innerY + fontSize + 2;
// should draw random stuff? or draw current selected preset :)
g.drawText(">>> INIT <<<", 0, m_innerY, getWidth() - m_width, fontSize,
Justification::centred,
true);
g.drawLine(0, line, getWidth(), line);
}
void SidebarLCD::drawFooter (Graphics& g)
{
float fontSize = VeNo::Utils::setFontSize(8.0f, g) + 4;
int space = m_innerY + fontSize;
int line = getHeight() - space;
g.drawText("by VersusTuneZ for " + SystemStats::getFullUserName(), 0, line, getWidth() - m_width, fontSize,
Justification::horizontallyCentred,
true);
g.drawLine(0, line - 4, getWidth(), line - 4);
}
void SidebarLCD::resized ()
{
float topSpace = (12 * Config::getInstance()->getScale()) + 4 + m_innerY;
if (waveform != nullptr)
{
waveform->setBounds(0, topSpace * 2, getWidth(), getHeight() - (topSpace * 4));
}
}
void SidebarLCD::paint (Graphics& g)
{
std::shared_ptr<Theme> theme = Config::getInstance()->getCurrentTheme();
auto colour = theme->getColour(ThemeColour::lcd_bg);
g.fillAll(colour);
// background
auto accent = theme->getColour(ThemeColour::lcd);
g.setColour(accent);
g.setFont(*VenoFonts::getLCD());
drawHeadline(g);
drawFooter(g);
}

View File

@ -0,0 +1,29 @@
//
// Created by versustune on 11.06.20.
//
#ifndef VENO_SIDEBARLCD_H
#define VENO_SIDEBARLCD_H
#include "JuceHeader.h"
#include "../BaseComponent.h"
#include "Waveforms.h"
class SidebarLCD : public BaseComponent
{
private:
int m_innerX = 5;
int m_innerY = 5;
int m_width = m_innerX * 2;
public:
explicit SidebarLCD (const std::string& process_id);
~SidebarLCD ();
void resized () override;
void paint (Graphics& g) override;
protected:
void drawHeadline (Graphics& g);
void drawFooter (Graphics& g);
std::unique_ptr<Waveforms> waveform;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SidebarLCD);
};
#endif //VENO_SIDEBARLCD_H

View File

@ -0,0 +1,327 @@
//
// Created by versustune on 11.06.20.
//
#include "Waveforms.h"
#include <utility>
#include "../../../Core/Config.h"
#include "../../../Utils.h"
#include "../../../VenoInstance.h"
#include "../../../Fonts/Fonts.h"
Waveforms::Waveforms (const std::string& processId) : BaseComponent (processId)
{
setMouseCursor (MouseCursor::PointingHandCursor);
m_context.setOpenGLVersionRequired (OpenGLContext::OpenGLVersion::openGL3_2);
m_context.setRenderer (this);
m_context.setContinuousRepainting (false);
m_context.setComponentPaintingEnabled (true);
m_context.attachTo (*this);
setFps ();
std::srand (unsigned (time (nullptr)));
pickRandomText = (std::rand () % RANDOM_TEXT_COUNT);
m_ticks = 0;
dBScale = std::make_unique<DecibelScale> (processId);
dBScale->m_mode = -1;
addAndMakeVisible (*dBScale);
}
Waveforms::~Waveforms ()
{
stopTimer ();
shaderProgram.reset ();
m_context.detach ();
dBScale.reset (nullptr);
}
void Waveforms::newOpenGLContextCreated ()
{
compileOpenGLShaderProgram ();
}
void Waveforms::openGLContextClosing ()
{
}
void Waveforms::renderOpenGL ()
{
if (!isShowing () || shaderProgram == nullptr || !shaderProgram->getLastError ().isEmpty ())
{
return;
}
auto theme = Config::getInstance ()->getCurrentTheme ();
if (theme == nullptr)
{
return;
}
OpenGLHelpers::clear (theme->getColour (ThemeColour::lcd_bg));
//glViewport(0, 0, getWidth(), getHeight());
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
shaderProgram->use ();
auto color = theme->getColour (ThemeColour::lcd);
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
color.getFloatAlpha ());
// same color currently! will set to a diff if peak is detected!
shaderProgram->setUniform ("gradientColor", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
color.getFloatAlpha ());
if (m_isWelcome || m_isStarting || m_isChangingData)
{
return;
}
switch (m_mode)
{
case 1:
drawAudioOutput ();
break;
case 2:
drawWaveTable ();
break;
case 3:
drawSpectrum ();
break;
default:
drawPeakMeter ();
}
}
void Waveforms::compileOpenGLShaderProgram ()
{
std::unique_ptr<OpenGLShaderProgram> shaderProgramAttempt
= std::make_unique<OpenGLShaderProgram> (m_context);
if (shaderProgramAttempt->addVertexShader ({BinaryData::WaveForm_vertex_glsl})
&& shaderProgramAttempt->addFragmentShader ({BinaryData::WaveForm_fragment_glsl})
&& shaderProgramAttempt->link ())
{
shaderProgram = std::move (shaderProgramAttempt);
} else {
DBG(shaderProgramAttempt->getLastError().toStdString());
}
}
void Waveforms::mouseDown (const MouseEvent& e)
{
if (!m_enableModeToggle)
{
return;
}
m_mode++;
if (m_mode > 3)
{
m_mode = 0;
}
dBScale->m_mode = m_mode;
dBScale->repaint ();
}
void Waveforms::mouseDrag (const MouseEvent& e)
{
//do nothing... you faggot
}
void Waveforms::timerCallback ()
{
if (m_isWelcome || m_isStarting || m_isChangingData || needToClear)
{
repaint ();
}
else
{
if (m_context.isAttached ())
{
m_context.triggerRepaint ();
}
}
setFps ();
}
void Waveforms::drawWaveTable ()
{
// this will draw the current selected oscillator :D
}
void Waveforms::drawAudioOutput ()
{
// draw audio from the oscillators
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
auto buffer = instance->audioBuffer->getBuffer ();
glBegin (GL_LINE_STRIP);
float posX = -1;
float inc = 2.0f / buffer.size ();
for (int j = 0; j < buffer.size(); ++j)
{
try
{
glVertex2f (posX, buffer.at(j));
posX += inc;
} catch (_exception e)
{
//something is wrong skip the draw and end it!
break;
}
}
glEnd ();
}
void Waveforms::drawPeakMeter ()
{
auto theme = Config::getInstance ()->getCurrentTheme ();
if (theme == nullptr)
{
return;
}
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
repaint();
// draw peak signal
auto leftChannel = getdBForChannel (instance->audioBuffer->leftPeak);
selectColourByPeak (leftChannel);
glBegin (GL_TRIANGLES);
glVertex2f (-0.9f, leftChannel);
glVertex2f (-0.9f, -1.0f);
glVertex2f (-0.08f, -1.0f);
glEnd ();
auto rightChannel = getdBForChannel (instance->audioBuffer->rightPeak);
selectColourByPeak (rightChannel);
glBegin (GL_TRIANGLES);
glVertex2f (0.9f, rightChannel);
glVertex2f (0.9f, -1.0f);
glVertex2f (0.08f, -1.0f);
glEnd ();
}
void Waveforms::paint (Graphics& g)
{
std::shared_ptr<Theme> theme = Config::getInstance ()->getCurrentTheme ();
auto accent = theme->getColour (ThemeColour::lcd);
g.setColour (accent);
g.setFont(*VenoFonts::getLCD());
VeNo::Utils::setFontSize (16.0f, g);
if (m_isWelcome)
{
drawWelcome (g, getWidth (), getHeight (), 0, 0);
m_ticks++;
if (m_ticks > m_time_needed_startup)
{
m_isWelcome = false;
m_ticks = 0;
needToClear = true;
}
}
else if (m_isStarting)
{
g.drawText (m_warmUpText[pickRandomText], 0, 0, getWidth (), getHeight (),
Justification::centred, true);
m_ticks++;
if (m_ticks > m_time_needed_startup)
{
m_isStarting = false;
m_ticks = 0;
needToClear = true;
}
}
else if (m_isChangingData)
{
drawChangedParameter (g, getWidth (), getHeight (), 0, 0);
m_ticks++;
if (m_ticks > m_time_needed)
{
m_isChangingData = false;
m_ticks = 0;
needToClear = true;
}
}
else
{
if (needToClear) {
dBScale->m_mode = m_mode;
dBScale->repaint();
g.resetToDefaultState ();
needToClear = false;
}
g.setFont(*VenoFonts::getLCD());
VeNo::Utils::setFontSize (16.0f, g);
if (m_mode == 0)
{
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
g.setColour (theme->getColour (ThemeColour::lcd_bg));
float size = VeNo::Utils::setFontSize (7, g);
auto halfWidth = getWidth () / 2;
auto halfHalfWidth = halfWidth / 2;
auto y = getHeight () - size;
g.drawText (std::to_string (instance->audioBuffer->leftPeak), halfWidth - halfHalfWidth - (size * 1.5), y,
(size * 3), size, Justification::centred, false);
g.drawText (std::to_string (instance->audioBuffer->rightPeak), halfWidth + halfHalfWidth - (size * 1.5), y,
(size * 3), size, Justification::centred, false);
}
}
}
void Waveforms::drawChangedParameter (Graphics& g, int w, int h, int x, int y) const
{
int halfHeight = h / 2;
float font = VeNo::Utils::setFontSize (12, g);
g.drawText (changingParameter, x, y + halfHeight - font, w, font, Justification::centred, true);
g.drawText (std::to_string (changedValue), x, y + halfHeight + 4, w, font, Justification::centred,
true);
}
void Waveforms::drawWelcome (Graphics& g, int w, int h, int x, int y)
{
float font = VeNo::Utils::setFontSize (12, g);
int halfHeight = h / 2;
g.drawText (m_readyText, x, y + halfHeight - font, w, font, Justification::centred, true);
g.drawText (SystemStats::getLogonName (), x, y + halfHeight + 4, w, font, Justification::centred,
true);
}
void Waveforms::drawSpectrum ()
{
}
void Waveforms::selectColourByPeak (float value)
{
auto theme = Config::getInstance ()->getCurrentTheme ();
if (theme == nullptr)
{
return;
}
auto color = theme->getColour (ThemeColour::lcd);
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
color.getFloatAlpha ());
if (value > 0.87)
{
color = theme->getColour (ThemeColour::clip);
}
else if (value > 0.75)
{
color = theme->getColour (ThemeColour::warning);
}
shaderProgram->setUniform ("gradientColor", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
color.getFloatAlpha ());
}
float Waveforms::getdBForChannel (float value)
{
return jmap (value, -30.0f, 0.0f, -1.0f,
0.9f);
}
void Waveforms::setFps ()
{
if (m_currentFps != Config::getInstance ()->getFps ())
{
m_currentFps = Config::getInstance ()->getFps ();
// is something that
m_time_needed = roundToInt (4000 / (1000 / m_currentFps));
m_time_needed_startup = roundToInt (1000 / (1000 / m_currentFps));
stopTimer ();
startTimer (m_currentFps);
}
}
void Waveforms::resized ()
{
auto halfWidth = getWidth () / 2;
auto w = VeNo::Utils::getCalculatedWidth (21);
dBScale->setBounds (halfWidth - (w / 2), 0, w, getHeight ());
}

View File

@ -0,0 +1,62 @@
//
// Created by versustune on 11.06.20.
//
#ifndef VENO_WAVEFORMS_H
#define VENO_WAVEFORMS_H
#include "JuceHeader.h"
#include "../BaseComponent.h"
#include "DecibelScale.h"
#define RANDOM_TEXT_COUNT 5
// opengl context :D
class Waveforms : public BaseComponent,
private OpenGLRenderer,
private Timer
{
protected:
bool m_enableModeToggle = true;
int m_mode = 0;
std::string m_readyText = "=WELCOME=";
std::string m_warmUpText[RANDOM_TEXT_COUNT] = {"Warmup...", "Mayonnaise", "Dont shake the baby", "Awesome stuff",
"drink beer"};
int pickRandomText = 0;
bool m_isWelcome = true;
bool m_isStarting = true;
int m_ticks = 0;
int m_time_needed_startup = 0;
int m_time_needed = 0;
bool needToClear = false;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Waveforms);
public:
explicit Waveforms (const std::string& processId);
~Waveforms () override;
void newOpenGLContextCreated () override;
void openGLContextClosing () override;
void renderOpenGL () override;
void mouseDown (const MouseEvent& e) override;
void mouseDrag (const MouseEvent& e) override;
void paint (Graphics& g) override;
void resized () override;
bool m_isChangingData = false;
std::string changingParameter = "";
float changedValue = 0;
private:
void timerCallback () override;
void drawWaveTable ();
void drawAudioOutput ();
void drawSpectrum ();
void drawPeakMeter (); //?!
void drawChangedParameter (Graphics& g, int w, int h, int x, int y) const;
void drawWelcome (Graphics& g, int w, int h, int x, int y);
void compileOpenGLShaderProgram ();
void selectColourByPeak (float value);
float getdBForChannel (float value);
void setFps();
OpenGLContext m_context;
std::unique_ptr<OpenGLShaderProgram> shaderProgram;
std::unique_ptr<DecibelScale> dBScale;
int m_currentFps = 0;
};
#endif //VENO_WAVEFORMS_H

View File

@ -0,0 +1,40 @@
//
// Created by versustune on 07.06.20.
//
#include "LabelComponent.h"
LabelComponent::LabelComponent (Component* parent, std::string name)
{
m_text = name;
m_parent = parent;
m_label = std::make_shared<Label>(m_parent->getName(), name);
addAndMakeVisible(*m_label);
}
LabelComponent::~LabelComponent ()
{
m_label.reset();
}
void LabelComponent::resized ()
{
if (m_label != nullptr)
{
m_label->setBounds(0, 0, getWidth(), getHeight());
}
}
void LabelComponent::paint (Graphics& g)
{
}
void LabelComponent::setPosition (LabelPosition position)
{
m_position = position;
}
LabelPosition LabelComponent::getLabelPosition ()
{
return m_position;
}

View File

@ -0,0 +1,32 @@
//
// Created by versustune on 07.06.20.
//
#ifndef VENO_LABELCOMPONENT_H
#define VENO_LABELCOMPONENT_H
#include "JuceHeader.h"
enum LabelPosition
{
NO_LABEL,
TOP,
BOTTOM
};
class LabelComponent : public Component
{
public:
LabelComponent (Component* parent, std::string name);
~LabelComponent () override;
void resized () override;
void paint (Graphics& g) override;
void setPosition (LabelPosition position);
LabelPosition getLabelPosition ();
protected:
private:
std::string m_text;
Component* m_parent;
LabelPosition m_position = LabelPosition::NO_LABEL;
std::shared_ptr<Label> m_label;
};
#endif //VENO_LABELCOMPONENT_H

View File

@ -0,0 +1,78 @@
//
// Created by versustune on 14.06.20.
//
#include "ConfigComponent.h"
#include <utility>
ConfigComponent::ConfigComponent (std::string pid)
{
m_pid = std::move(pid);
m_colors.resize(8);
auto theme = Config::getInstance()->getCurrentTheme();
for (int i = 0; i < 8; i++)
{
m_colors[i] = std::make_unique<VeNoColour>(pid, getColorForId(i));
m_colors[i]->setName(m_names[i]);
addAndMakeVisible(m_colors[i].get());
}
m_preColours = std::make_unique<VenoPreColours>(pid);
addAndMakeVisible(*m_preColours);
flexBox.flexDirection = FlexBox::Direction::row;
flexBox.justifyContent = FlexBox::JustifyContent::flexStart;
flexBox.flexWrap = FlexBox::Wrap::wrap;
auto w = 200;
auto h = 100;
for (auto& color : m_colors)
{
auto item = FlexItem(w, h, *color);
item.margin = FlexItem::Margin(5, 5, 5, 5);
flexBox.items.add(item);
}
}
ConfigComponent::~ConfigComponent ()
{
for (auto& color : m_colors)
{
color.reset();
}
m_colors.clear();
m_preColours.reset(nullptr);
}
ThemeColour ConfigComponent::getColorForId (int id)
{
switch (id)
{
default:
return ThemeColour::bg;
case 1:
return ThemeColour::bg_two;
case 2:
return ThemeColour::accent;
case 3:
return ThemeColour::accent_two;
case 4:
return ThemeColour::warning;
case 5:
return ThemeColour::clip;
case 6:
return ThemeColour::lcd_bg;
case 7:
return ThemeColour::lcd;
}
}
void ConfigComponent::paint (Graphics& g)
{
g.fillAll(Colours::black);
}
void ConfigComponent::resized ()
{
auto bounds = Rectangle<int>();
bounds.setBounds(0,0,getWidth(), getHeight()-200);
flexBox.performLayout(bounds);
m_preColours->setBounds(0, getHeight() - 200, getWidth(), 200);
}

View File

@ -0,0 +1,30 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_CONFIGCOMPONENT_H
#define VENO_CONFIGCOMPONENT_H
#include "JuceHeader.h"
#include "../../../Core/Config.h"
#include "../../Components/Config/VeNoColour.h"
#include "../../Components/Config/VenoPreColours.h"
class ConfigComponent : public Component
{
public:
explicit ConfigComponent(std::string pid);
~ConfigComponent() override;
void paint (Graphics& g) override;
void resized () override;
protected:
static ThemeColour getColorForId(int id);
std::string m_pid;
std::string m_names[8]{
"Background", "BackgroundTwo", "Accent", "Accent Two", "Warning", "Clip", "LCD Background", "LCD"
};
std::vector<std::unique_ptr<VeNoColour>> m_colors;
std::unique_ptr<VenoPreColours> m_preColours;
FlexBox flexBox;
};
#endif //VENO_CONFIGCOMPONENT_H

View File

@ -0,0 +1,49 @@
//
// Created by versustune on 14.06.20.
//
#include "VenoConfigScreen.h"
#include "../../../VenoInstance.h"
VenoConfigScreen::VenoConfigScreen (const std::string& pid) : DocumentWindow("VeNo Config", Colours::black,
DocumentWindow::closeButton, true)
{
m_pid = pid;
auto w = 840;
auto h = 800;
component = std::make_shared<ConfigComponent>(pid);
component->setSize(w, h);
m_lookHandler = std::make_unique<LookHandler>();
component->setLookAndFeel(m_lookHandler->getLook());
centreWithSize(w, h);
setAlwaysOnTop(true);
setContentOwned(component.get(), false);
setResizable(false, false);
setUsingNativeTitleBar(true);
setVisible(true);
}
VenoConfigScreen::~VenoConfigScreen ()
{
component->setLookAndFeel(nullptr);
m_lookHandler.reset();
component.reset();
}
void VenoConfigScreen::closeButtonPressed ()
{
auto state = VenoInstance::getInstance(m_pid)->state;
if (state != nullptr && state->configScreen != nullptr)
{
delete state->configScreen;
state->configScreen = nullptr;
}
}
void VenoConfigScreen::paint (Graphics& graphics)
{
}
void VenoConfigScreen::resized ()
{
}

View File

@ -0,0 +1,28 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_VENOCONFIGSCREEN_H
#define VENO_VENOCONFIGSCREEN_H
#include "JuceHeader.h"
#include "../../../Core/Config.h"
#include "../../Components/Config/VeNoColour.h"
#include "ConfigComponent.h"
class VenoConfigScreen : public DocumentWindow
{
public:
explicit VenoConfigScreen (const std::string& pid);
~VenoConfigScreen () override;
void closeButtonPressed () override;
void paint (Graphics& graphics) override;
void resized () override;
private:
std::string m_pid;
std::shared_ptr<ConfigComponent> component;
std::unique_ptr<LookHandler> m_lookHandler;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoConfigScreen)
};
#endif //VENO_VENOCONFIGSCREEN_H

View File

@ -0,0 +1,52 @@
//
// Created by versustune on 13.06.20.
//
#include "Sidebar.h"
#include "VenoLogo.h"
#include "../../../Utils.h"
Sidebar::Sidebar (const std::string& processId) : BaseComponent(processId)
{
m_lcd = std::make_unique<SidebarLCD>(processId);
m_configButton = std::make_unique<VenoConfigButton>(processId);
addAndMakeVisible(*m_lcd);
addAndMakeVisible(*m_configButton);
}
Sidebar::~Sidebar ()
{
m_lcd.reset(nullptr);
m_configButton.reset(nullptr);
m_mixer.reset(nullptr);
VenoLogo::deleteInstance();
}
void Sidebar::resized ()
{
if (m_lcd != nullptr)
{
m_lcd->setBounds(0, (getWidth() / 5) + 30, getWidth(), VeNo::Utils::getCalculatedHeight(175));
}
if (m_configButton != nullptr)
{
auto height = VeNo::Utils::getCalculatedHeight(30);
auto margin = VeNo::Utils::getCalculatedWidth(10);
m_configButton->setBounds(margin, getHeight()-height-margin, (getWidth()/2)-(margin*2), height);
}
}
void Sidebar::paint (Graphics& g)
{
auto logo = VenoLogo::getInstance()->getLogo();
if (logo.isValid())
{
float height = getWidth() / 5;
g.drawImage(logo, 0, 15, getWidth(), height, 0, 0, 500, 100);
}
else
{
g.setFont(getWidth() / 4);
g.drawSingleLineText("VeNo", 0, 25);
}
}

View File

@ -0,0 +1,28 @@
//
// Created by versustune on 13.06.20.
//
#ifndef VENO_SIDEBAR_H
#define VENO_SIDEBAR_H
#include "JuceHeader.h"
#include "../../Components/BaseComponent.h"
#include "../../Components/LCD/SidebarLCD.h"
#include "SidebarMixer.h"
#include "../../Components/Config/VenoConfigButton.h"
class Sidebar : public BaseComponent
{
private:
public:
Sidebar (const std::string& processId);
~Sidebar () override;
void resized () override;
void paint (Graphics& g) override;
protected:
std::unique_ptr<SidebarLCD> m_lcd;
std::unique_ptr<SidebarMixer> m_mixer;
std::unique_ptr<VenoConfigButton> m_configButton;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Sidebar)
};
#endif //VENO_SIDEBAR_H

View File

@ -0,0 +1,10 @@
//
// Created by versustune on 13.06.20.
//
#include "SidebarMixer.h"
SidebarMixer::SidebarMixer (const std::string& processId) : BaseComponent (processId)
{
}

View File

@ -0,0 +1,20 @@
//
// Created by versustune on 13.06.20.
//
#ifndef VENO_SIDEBARMIXER_H
#define VENO_SIDEBARMIXER_H
#include "JuceHeader.h"
#include "../../Components/BaseComponent.h"
class SidebarMixer : public BaseComponent
{
private:
public:
SidebarMixer (const std::string& processId);
~SidebarMixer() = default;
protected:
};
#endif //VENO_SIDEBARMIXER_H

View File

@ -0,0 +1,34 @@
//
// Created by versustune on 14.06.20.
//
#include "VenoLogo.h"
VenoLogo* VenoLogo::instance = nullptr;
VenoLogo* VenoLogo::getInstance ()
{
if (instance == nullptr)
{
instance = new VenoLogo();
}
return instance;
}
VenoLogo::VenoLogo ()
{
MemoryOutputStream mo;
auto result = ImageCache::getFromMemory(BinaryData::LogoVeNo_png, BinaryData::LogoVeNo_pngSize);
realLogo = result;
}
Image VenoLogo::getLogo ()
{
return getInstance()->realLogo;
}
void VenoLogo::deleteInstance ()
{
delete instance;
instance = nullptr;
}

View File

@ -0,0 +1,24 @@
//
// Created by versustune on 14.06.20.
//
#ifndef VENO_VENOLOGO_H
#define VENO_VENOLOGO_H
#include "JuceHeader.h"
class VenoLogo
{
private:
Image realLogo;
static VenoLogo* instance;
public:
static VenoLogo* getInstance ();
static Image getLogo ();
static void deleteInstance ();
VenoLogo ();
~VenoLogo () = default;
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoLogo)
};
#endif //VENO_VENOLOGO_H

View File

@ -7,11 +7,10 @@
#include "JuceHeader.h"
class CrazyLook : public LookAndFeel_V4 {
class CrazyLook : public LookAndFeel_V4
{
private:
public:
protected:
};
#endif //VENO_CRAZYLOOK_H

View File

@ -3,3 +3,92 @@
//
#include "FlatLook.h"
#include "../../Core/Config.h"
void FlatLook::drawButtonBackground (Graphics& graphics, Button& button, const Colour& backgroundColour,
bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown)
{
auto theme = Config::getInstance ()->getCurrentTheme ();
auto buttonArea = button.getLocalBounds ();
if (shouldDrawButtonAsHighlighted)
{
graphics.setColour (theme->getColour (ThemeColour::accent));
}
else
{
graphics.setColour (theme->getColour (ThemeColour::accent_two));
}
graphics.drawRect (buttonArea);
}
void FlatLook::drawRotarySlider (Graphics& g, int x, int y, int width, int height, float sliderPosProportional,
float rotaryStartAngle, float rotaryEndAngle, Slider& slider)
{
auto theme = Config::getInstance ()->getCurrentTheme ();
float MAX_RADIAN = 2.53073;
auto radius = jmin (width / 2, height / 2) - 4.0f;
auto centreX = x + width * 0.5f;
auto centreY = y + height * 0.5f;
auto angle = rotaryStartAngle + sliderPosProportional * (rotaryEndAngle - rotaryStartAngle);
//---[the real draw]---//
Path outerArc;
outerArc.addCentredArc (0, 0, radius, radius, 0, -MAX_RADIAN,
MAX_RADIAN,
true);
outerArc.applyTransform (AffineTransform ().translated (centreX, centreY));
g.setColour (Colour (65, 65, 65));
g.strokePath (outerArc, PathStrokeType (3.0f));
//prepare pointer for drawing
Path arc;
arc.addCentredArc (0, 0, radius, radius, 0, -MAX_RADIAN, (sliderPosProportional * 2 - 1) * MAX_RADIAN,
true);
arc.applyTransform (AffineTransform ().translated (centreX, centreY));
g.setGradientFill (
ColourGradient::horizontal (theme->getColour (ThemeColour::accent_two), centreX - radius,theme->getColour (ThemeColour::accent),
centreX + radius));
g.strokePath (arc, PathStrokeType (3.0f));
Path pointer;
auto pointerThickness = 3;
pointer.addEllipse (-pointerThickness * 0.25f, -(radius - 5), pointerThickness, pointerThickness);
pointer.applyTransform (AffineTransform::rotation (angle).translated (centreX, centreY));
g.setColour (Colour (125, 125, 125));
g.fillPath (pointer);
}
void FlatLook::drawTextEditorOutline (Graphics& graphics, int width, int height, TextEditor& editor)
{
auto theme = Config::getInstance ()->getCurrentTheme ();
graphics.setGradientFill (
ColourGradient::horizontal (
theme->getColour (ThemeColour::accent_two),
0,
theme->getColour (ThemeColour::accent),
width
)
);
graphics.drawLine (10, height, width - 10, height, 0.9f);
}
void FlatLook::drawToggleButton (Graphics& graphics, ToggleButton& button, bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown)
{
LookAndFeel_V4::drawToggleButton (graphics, button, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);
}
void FlatLook::drawTabButton (TabBarButton& button, Graphics& graphics, bool isMouseOver, bool isMouseDown)
{
LookAndFeel_V3::drawTabButton (button, graphics, isMouseOver, isMouseDown);
}
void FlatLook::drawComboBox (Graphics& graphics, int width, int height, bool isButtonDown, int buttonX, int buttonY,
int buttonW, int buttonH, ComboBox& box)
{
auto theme = Config::getInstance ()->getCurrentTheme ();
graphics.setColour (theme->getColour (ThemeColour::bg));
graphics.fillRect (0, 0, width, height);
graphics.setColour (theme->getColour (ThemeColour::accent));
graphics.drawRect (0, 0, width, height);
}

View File

@ -7,11 +7,30 @@
#include "JuceHeader.h"
class FlatLook : public LookAndFeel_V4 {
class FlatLook : public LookAndFeel_V4
{
private:
public:
FlatLook() = default;
~FlatLook() override = default;
void drawButtonBackground (Graphics& graphics, Button& button, const Colour& backgroundColour,
bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
void drawRotarySlider(Graphics &graphics, int x, int y, int width, int height, float sliderPosProportional,
float rotaryStartAngle, float rotaryEndAngle, Slider &slider) override;
void drawTextEditorOutline(Graphics &graphics, int width, int height, TextEditor &editor) override;
void drawToggleButton(Graphics &graphics, ToggleButton &button, bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown) override;
void drawTabButton(TabBarButton &button, Graphics &graphics, bool isMouseOver, bool isMouseDown) override;
void
drawComboBox(Graphics &graphics, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW,
int buttonH, ComboBox &box) override;
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlatLook);
};
#endif //VENO_FLATLOOK_H

View File

@ -5,16 +5,25 @@
#include "LookHandler.h"
#include "../../Core/Config.h"
LookHandler::LookHandler() {
LookHandler::LookHandler ()
{
selectLook(Config::getInstance()->getCurrentLook());
}
LookHandler::~LookHandler() {
LookHandler::~LookHandler ()
{
//delete this shit!
delete feels[0];
delete feels[1];
delete m_feels[0];
delete m_feels[1];
m_look.reset();
}
void LookHandler::selectLook(int index) {
currentLook = index;
void LookHandler::selectLook (int index)
{
m_currentLook = index;
}
LookAndFeel_V4* LookHandler::getLook ()
{
return m_feels[m_currentLook];
}

View File

@ -11,20 +11,21 @@
#include <memory>
/**
* overwrite the basic look and feel based on the selected Look and Feel :)
* overwrite the basic m_look and feel based on the selected Look and Feel :)
*/
class LookHandler : public LookAndFeel_V4 {
class LookHandler : public LookAndFeel_V4
{
private:
std::shared_ptr<LookAndFeel_V4> look;
int currentLook = 0;
std::shared_ptr<LookAndFeel_V4> m_look;
int m_currentLook = 0;
public:
LookHandler();
~LookHandler();
void selectLook(int index);
LookHandler ();
~LookHandler () override;
void selectLook (int index);
LookAndFeel_V4* getLook ();
protected:
//currently both available themes are CrazyLook <-- (this is a fun one xD) and FlatLook
LookAndFeel_V4 *feels[2] = {new FlatLook(), new CrazyLook()};
LookAndFeel_V4* m_feels[2] = {new FlatLook(), new CrazyLook()};
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookHandler);
};
#endif //VENO_LOOKHANDLER_H

View File

@ -4,32 +4,38 @@
#include "Theme.h"
#include "ThemePresets.cpp"
#include "../../Core/Config.h"
Theme::Theme(std::shared_ptr<PropertiesFile> file) {
configFile = file;
Theme::Theme (std::shared_ptr<PropertiesFile> file)
{
m_configFile = file;
}
Theme::~Theme() {
colours.clear();
configFile.reset();
Theme::~Theme ()
{
m_colours.clear();
m_configFile.reset();
}
void Theme::setColour(ThemeColour index, Colour *colour) {
auto c = colours[index];
if (c) {
void Theme::setColour (ThemeColour index, Colour* colour)
{
auto c = m_colours[index];
if (c)
{
delete c;
colours[index] = colour;
} else {
colours[index] = colour;
m_colours[index] = colour;
}
configFile->setValue(ThemeColourToString(index), colour->toString());
configFile->save();
else
{
m_colours[index] = colour;
}
m_configFile->setValue(ThemeColourToString(index), colour->toString());
m_configFile->setNeedsToBeSaved(true);
}
void Theme::init() {
setLEDTheme(this);
void Theme::init ()
{
getColourFromConfig(ThemeColour::bg);
getColourFromConfig(ThemeColour::bg_two);
getColourFromConfig(ThemeColour::accent);
@ -40,11 +46,69 @@ void Theme::init() {
getColourFromConfig(ThemeColour::lcd);
}
void Theme::getColourFromConfig(ThemeColour index) {
void Theme::getColourFromConfig (ThemeColour index)
{
std::string key = ThemeColourToString(index);
if (configFile->containsKey(key)) {
auto baseColour = Colour::fromString(configFile->getValue(key));
auto *colour = new Colour(baseColour.getRed(), baseColour.getGreen(), baseColour.getBlue());
setColour(index, colour);
if (m_configFile->containsKey(key))
{
auto baseColour = Colour::fromString(m_configFile->getValue(key));
auto* colour = new Colour(baseColour.getRed(), baseColour.getGreen(), baseColour.getBlue());
delete m_colours[index];
m_colours[index] = colour;
}
else
{
// should only trigger if config is broken or empty :)
setLEDTheme(this);
}
}
Colour Theme::getColour (ThemeColour index)
{
if (m_colours[index] != nullptr)
{
return *m_colours[index];
}
return Colour(255, 255, 255);
}
void Theme::setColourThemeById (int id)
{
switch (id)
{
case 1:
setLEDTheme(this);
break;
case 2:
setOrangeDreamTheme(this);
break;
case 3:
setBloodTheme(this);
break;
case 4:
setOceanTheme(this);
default:
break;
}
}
void Theme::setDefault (const std::string& value)
{
if (value == "LED")
{
setLEDTheme(this);
}
if (value == "Blood")
{
setBloodTheme(this);
}
if (value == "Orange Dream")
{
setOrangeDreamTheme(this);
}
if (value == "Ocean")
{
setOceanTheme(this);
}
Config::getInstance()->repaintAll();
}

View File

@ -8,23 +8,25 @@
#include "JuceHeader.h"
#include <vector>
enum class ThemeColour {
enum class ThemeColour
{
bg = 0, bg_two, accent, accent_two, warning, clip, lcd_bg, lcd
};
class Theme {
class Theme
{
private:
public:
Theme(std::shared_ptr<PropertiesFile> file);
~Theme();
void setColour(ThemeColour index, Colour *colour);
void init();
void getColourFromConfig(ThemeColour index);
explicit Theme (std::shared_ptr<PropertiesFile> file);
~Theme ();
void setColour (ThemeColour index, Colour* colour);
void setColourThemeById (int id);
void init ();
void setDefault(const std::string& value);
void getColourFromConfig (ThemeColour index);
Colour getColour (ThemeColour index);
protected:
std::map<ThemeColour, Colour*> colours;
std::shared_ptr<PropertiesFile> configFile;
std::map<ThemeColour, Colour*> m_colours;
std::shared_ptr<PropertiesFile> m_configFile;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Theme);
};
#endif //VENO_THEME_H

View File

@ -1,15 +1,18 @@
#include "Theme.h"
#ifndef VENO_THEME_PRESETS
#define VENO_THEME_PRESETS
/*
* this file holds function that read some presets
* in the current Theme class
* so we doesn't have lot's of classes that only save some hex codes... and make the coding harder
* also good on this is that the user can slightly change the preset theme and doesn't have to make all of them himself
* also good on this is that the user can slightly change the preset m_theme and doesn't have to make all of them himself
*
* maybe i want a double look and feel... that's make it easier to implement different knob styles, slider styles and co
* maybe i want a double m_look and feel... that's make it easier to implement different knob styles, slider styles and co
*/
void setLEDTheme(Theme *theme) {
void setLEDTheme (Theme* theme)
{
theme->setColour(ThemeColour::bg, new Colour(41, 47, 54));
theme->setColour(ThemeColour::bg_two, new Colour(217, 217, 217));
theme->setColour(ThemeColour::accent, new Colour(169, 208, 142));
@ -20,18 +23,65 @@ void setLEDTheme(Theme *theme) {
theme->setColour(ThemeColour::lcd, new Colour(169, 208, 142));
}
void setBloodTheme (Theme* theme)
{
theme->setColour(ThemeColour::bg, new Colour(41, 47, 54));
theme->setColour(ThemeColour::bg_two, new Colour(64, 67, 78));
theme->setColour(ThemeColour::accent, new Colour(180, 38, 50));
theme->setColour(ThemeColour::accent_two, new Colour(115, 47, 64));
theme->setColour(ThemeColour::clip, new Colour(255, 23, 68));
theme->setColour(ThemeColour::warning, new Colour(255, 143, 0));
theme->setColour(ThemeColour::lcd_bg, new Colour(43, 0, 0));
theme->setColour(ThemeColour::lcd, new Colour(255, 0, 0));
}
std::string ThemeColourToString(ThemeColour index) {
void setOrangeDreamTheme (Theme* theme)
{
theme->setColour(ThemeColour::bg, new Colour(21, 21, 21));
theme->setColour(ThemeColour::bg_two, new Colour(42, 42, 42));
theme->setColour(ThemeColour::accent, new Colour(255, 160, 0));
theme->setColour(ThemeColour::accent_two, new Colour(255, 11, 0));
theme->setColour(ThemeColour::clip, new Colour(255, 23, 68));
theme->setColour(ThemeColour::warning, new Colour(255, 143, 0));
theme->setColour(ThemeColour::lcd_bg, new Colour(33, 33, 33));
theme->setColour(ThemeColour::lcd, new Colour(255, 160, 0));
}
void setOceanTheme (Theme* theme)
{
theme->setColour(ThemeColour::bg, new Colour(55, 63, 81));
theme->setColour(ThemeColour::bg_two, new Colour(64, 67, 78));
theme->setColour(ThemeColour::accent, new Colour(0, 141, 213));
theme->setColour(ThemeColour::accent_two, new Colour(0, 129, 194));
theme->setColour(ThemeColour::clip, new Colour(255, 23, 68));
theme->setColour(ThemeColour::warning, new Colour(255, 143, 0));
theme->setColour(ThemeColour::lcd_bg, new Colour(21, 21, 21));
theme->setColour(ThemeColour::lcd, new Colour(0, 129, 194));
}
std::string ThemeColourToString (ThemeColour index)
{
switch (index)
{
case ThemeColour::bg: return "colour_bg";
case ThemeColour::bg_two: return "colour_bg_two";
case ThemeColour::accent: return "colour_accent";
case ThemeColour::accent_two: return "colour_accent_two";
case ThemeColour::clip: return "colour_clip";
case ThemeColour::warning: return "colour_warning";
case ThemeColour::lcd_bg: return "colour_lcd_bg";
case ThemeColour::lcd: return "colour_lcd";
default: return "";
case ThemeColour::bg:
return "colour_bg";
case ThemeColour::bg_two:
return "colour_bg_two";
case ThemeColour::accent:
return "colour_accent";
case ThemeColour::accent_two:
return "colour_accent_two";
case ThemeColour::clip:
return "colour_clip";
case ThemeColour::warning:
return "colour_warning";
case ThemeColour::lcd_bg:
return "colour_lcd_bg";
case ThemeColour::lcd:
return "colour_lcd";
default:
return "";
}
}
}
#endif

77
Source/Veno/Utils.cpp Normal file
View File

@ -0,0 +1,77 @@
//
// Created by versustune on 08.06.20.
//
#include "Utils.h"
#include "Core/Config.h"
int VeNo::Utils::nextPowerOfTwo (float value)
{
unsigned int v = value;
v--;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
v++;
return v;
}
float VeNo::Utils::setFontSize (float size, Graphics& g)
{
double scale = Config::getInstance()->getScale();
float s = size * scale;
g.setFont(s);
return s;
}
float VeNo::Utils::clamp (float value, float min, float max)
{
return value > max ? max : value < min ? min : value;
}
void
VeNo::Utils::setPosition (int width, int height, int x, int y, std::shared_ptr<Component> component, bool useMarginY)
{
double scale = Config::getInstance()->getScale();
double w = width * scale;
double h = height * scale;
if (useMarginY)
{
y += 10;
}
component->setBounds(x + 10, y, w, h);
}
void VeNo::Utils::setPositionSameRow (int width, int height, std::shared_ptr<Component> component,
std::shared_ptr<Component> previous)
{
setPosition(width, height, previous->getX() + previous->getWidth(), previous->getY(), component, false);
}
void VeNo::Utils::setPositionByPreviousRow (int width, int height, int x, std::shared_ptr<Component> component,
std::shared_ptr<Component> previous)
{
setPosition(width, height, x, previous->getY() + previous->getHeight(), component, true);
}
std::vector<int> VeNo::Utils::calcPosition (int width, int height, int prevWidth, int prevHeight)
{
double scale = Config::getInstance()->getScale();
int w = (width * scale);
int h = (height * scale);
int x = prevWidth + 10;
int y = prevHeight + 10;
return {x, y, w, h};
}
int VeNo::Utils::getCalculatedWidth (int width)
{
return width * Config::getInstance()->getScale();
}
int VeNo::Utils::getCalculatedHeight (int height)
{
return height * Config::getInstance()->getScale();
}

31
Source/Veno/Utils.h Normal file
View File

@ -0,0 +1,31 @@
//
// Created by versustune on 08.06.20.
//
#ifndef VENO_UTILS_H
#define VENO_UTILS_H
#include "JuceHeader.h"
namespace VeNo
{
class Utils
{
public:
Utils () = default;
~Utils () = default;
static int nextPowerOfTwo (float value);
static float clamp (float value, float min, float max);
static float setFontSize (float size, Graphics& g);
static void
setPosition (int width, int height, int x, int y, std::shared_ptr<Component> component, bool useMarginY);
static void setPositionSameRow (int width, int height, std::shared_ptr<Component> component,
std::shared_ptr<Component> previous);
static void
setPositionByPreviousRow(int width, int height, int x, std::shared_ptr<Component> component, std::shared_ptr<Component> previous);
static std::vector<int> calcPosition(int width, int height, int prevWidth, int prevHeight);
static int getCalculatedWidth(int width);
static int getCalculatedHeight(int height);
};
}
#endif //VENO_UTILS_H

36
Source/Veno/Utils/FFT.cpp Normal file
View File

@ -0,0 +1,36 @@
//
// Created by versustune on 12.06.20.
//
#include "FFT.h"
void FFT::pushNextSampleIntoFifo (float sample) noexcept
{
{
if (fifoIndex == fftSize) // [11]
{
if (!nextFFTBlockReady) // [12]
{
zeromem(fftData, sizeof(fftData));
memcpy(fftData, fifo, sizeof(fifo));
nextFFTBlockReady = true;
}
fifoIndex = 0;
}
fifo[fifoIndex++] = sample; // [12]
}
}
void FFT::drawNextFrameOfSpectrum ()
{
window.multiplyWithWindowingTable(fftData, fftSize); // [1]
fft.performFrequencyOnlyForwardTransform(fftData); // [2]
auto mindB = -80.0f;
auto maxdB = 0.0f;
for (int i = 0; i < scopeSize; ++i)
{
auto level = jmap(Decibels::gainToDecibels(fftData[i], mindB), mindB, maxdB, -1.0f, 1.0f);
scopeData[i] = level;
}
}

33
Source/Veno/Utils/FFT.h Normal file
View File

@ -0,0 +1,33 @@
//
// Created by versustune on 12.06.20.
//
#ifndef VENO_FFT_H
#define VENO_FFT_H
#include "JuceHeader.h"
class FFT
{
private:
public:
FFT () = default;
~FFT () = default;
void pushNextSampleIntoFifo (float sample) noexcept;
enum
{
fftOrder = 11, // [1]
fftSize = 1 << fftOrder, // [2]
scopeSize = 512 // [3]
};
void drawNextFrameOfSpectrum ();
bool nextFFTBlockReady = false;
float scopeData[scopeSize]{};
float fftData[2 * fftSize]{};
protected:
dsp::FFT fft{fftOrder};
dsp::WindowingFunction<float> window{fftSize, dsp::WindowingFunction<float>::hann};
float fifo[fftSize]{};
int fifoIndex = 0;
};
#endif //VENO_FFT_H

View File

@ -0,0 +1,21 @@
//
// Created by versustune on 09.06.20.
//
#include "Logger.h"
#include "JuceHeader.h"
void VeNo::Logger::debugMessage (const std::string& message)
{
#ifdef DEBUG
std::cout << "\u001b[38;5;172m[DEBUG]\u001b[0m\t" << message << "\n";
DBG("\u001b[38;5;172m[DEBUG]\u001b[0m\t" + message + "\n");
#endif
}
void VeNo::Logger::infoDebugMessage (const std::string& message)
{
#ifdef DEBUG
std::cout << "\u001b[38;5;111m[INFO]\u001b[0m\t" << message << "\n";
#endif
}

View File

@ -0,0 +1,15 @@
#ifndef VENO_LOGGER_H
#define VENO_LOGGER_H
#include <iostream>
namespace VeNo
{
class Logger
{
public:
static void debugMessage (const std::string& message);
static void infoDebugMessage (const std::string& message);
};
}
#endif //VENO_LOGGER_H

View File

@ -0,0 +1,20 @@
//
// Created by Maurice on 08.07.2020.
//
#include "StringUtils.h"
std::vector<std::string> VeNo::StringUtils::split (std::string input, std::string separator)
{
std::vector<std::string> result;
std::string_view::size_type position, start = 0;
while (std::string_view::npos != (position = input.find (separator, start)))
{
result.push_back (input.substr (start, position - start));
start = position + separator.size ();
}
result.push_back (input.substr (start));
return result;
}

View File

@ -0,0 +1,22 @@
//
// Created by Maurice on 08.07.2020.
//
#ifndef VENO_STRINGUTILS_H
#define VENO_STRINGUTILS_H
#include <string>
#include <vector>
namespace VeNo
{
class StringUtils
{
public:
static std::vector<std::string> split (std::string input, std::string separator = " ");
};
}
#endif //VENO_STRINGUTILS_H

View File

@ -0,0 +1,62 @@
//
// Created by versustune on 09.06.20.
//
#include "VenoInstance.h"
#include <utility>
#include "Utils/Logger.h"
std::unordered_map<std::string, std::shared_ptr<VenoInstance>> VenoInstance::instances;
VenoInstance::VenoInstance (std::string id)
{
m_id = std::move(id);
m_synthInstance = std::make_shared<SynthInstance>(id);
audioBuffer = std::make_shared<VenoBuffer>();
state = new VeNoState(id);
}
VenoInstance::~VenoInstance ()
{
m_synthInstance.reset();
audioBuffer.reset();
delete state;
}
std::shared_ptr<VenoInstance> VenoInstance::createInstance (const std::string& id)
{
auto instance = std::make_shared<VenoInstance>(id);
instances.insert(std::pair<std::string, std::shared_ptr<VenoInstance>>(id, instance));
VeNo::Logger::debugMessage("Created VenoInstance with id: " + id);
return instance;
}
// will return the instance or a empty new on... can find out because the id is fucked!
std::shared_ptr<VenoInstance> VenoInstance::getInstance (const std::string& id)
{
if (instances.find(id) != instances.end())
{
return instances[id];
}
return createInstance(id);
}
const std::shared_ptr<SynthInstance>& VenoInstance::getSynthInstance () const
{
return m_synthInstance;
}
void VenoInstance::deleteInstance (const std::string& processId)
{
if (instances.find(processId) != instances.end())
{
instances[processId].reset();
instances.erase(processId);
VeNo::Logger::debugMessage("Removed VenoInstance with id: " + processId);
}
}
std::unordered_map<std::string, std::shared_ptr<VenoInstance>> VenoInstance::getAll ()
{
return instances;
}

View File

@ -0,0 +1,36 @@
//
// Created by versustune on 09.06.20.
//
#ifndef VENO_VENOINSTANCE_H
#define VENO_VENOINSTANCE_H
#include "JuceHeader.h"
#include "Audio/Synth/SynthInstance.h"
#include "Utils/FFT.h"
#include "Audio/VenoBuffer.h"
#include "Audio/Engine/VeNoMatrix.h"
#include "Core/VeNoState.h"
#include <unordered_map>
class VenoInstance
{
private:
std::shared_ptr<SynthInstance> m_synthInstance;
static std::unordered_map<std::string, std::shared_ptr<VenoInstance>> instances;
std::string m_id;
public:
explicit VenoInstance (std::string id);
~VenoInstance ();
static std::shared_ptr<VenoInstance> createInstance (const std::string& id);
static std::shared_ptr<VenoInstance> getInstance (const std::string& id);
static void deleteInstance (const std::string& processId);
const std::shared_ptr<SynthInstance>& getSynthInstance () const;
std::shared_ptr<VenoBuffer> audioBuffer;
VeNoMatrix matrix{m_id}; //matrix need a own xml profile to save and restore!
VeNoState* state;
static std::unordered_map<std::string, std::shared_ptr<VenoInstance>> getAll ();
protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoInstance);
};
#endif //VENO_VENOINSTANCE_H

View File

@ -1,20 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="ZP1QhJ" name="Veno" jucerVersion="5.4.7" companyName="VersusTuneZ"
<JUCERPROJECT id="ZP1QhJ" name="VeNo" jucerVersion="5.4.7" companyName="VersusTuneZ"
companyWebsite="https://vstz.dev" companyEmail="info@vstz.dev"
splashScreenColour="Dark" projectType="audioplug" pluginCharacteristicsValue="pluginIsSynth,pluginProducesMidiOut,pluginWantsMidiIn"
pluginManufacturerCode="VSTZ" pluginCode="veno" pluginVST3Category="Generator,Instrument,Synth"
cppLanguageStandard="17">
<MAINGROUP id="m9l7SJ" name="Veno">
cppLanguageStandard="17" version="1.0.0" companyCopyright="Copyright VersusTuneZ 2019-2020"
reportAppUsage="0" displaySplashScreen="0">
<MAINGROUP id="m9l7SJ" name="VeNo">
<GROUP id="{AAF9955A-D1A2-45FF-2C17-02C73D8064D3}" name="Source">
<GROUP id="{12946A85-B629-A60C-6A3F-4FD136126888}" name="Resources">
<GROUP id="{4AC597AA-FCB4-EFDC-BFFC-F4FE85035F06}" name="GL">
<FILE id="sMJWAN" name="WaveForm.fragment.glsl" compile="0" resource="1"
file="Source/Resources/GL/WaveForm.fragment.glsl"/>
<FILE id="RZABPZ" name="WaveForm.vertex.glsl" compile="0" resource="1"
file="Source/Resources/GL/WaveForm.vertex.glsl"/>
</GROUP>
<FILE id="gB4Xst" name="arvo.ttf" compile="0" resource="1" file="Source/Resources/arvo.ttf"/>
<FILE id="QG10mY" name="lcd.ttf" compile="0" resource="1" file="Source/Resources/lcd.ttf"/>
<FILE id="yeOELp" name="LogoVeNo.png" compile="0" resource="1" file="Source/Resources/LogoVeNo.png"/>
</GROUP>
<GROUP id="{5791B3F9-67EA-BE3E-0208-47B8AF81F72F}" name="Veno">
<GROUP id="{B6FC2EBB-E15D-DE35-7ACC-81D051410D51}" name="Utils"/>
<GROUP id="{00F06C9B-B6B7-5466-5846-495A9FF5EC4A}" name="Static"/>
<GROUP id="{BD05234A-1BBB-5055-FA22-C66F1E78CC81}" name="Fonts">
<FILE id="D4zlai" name="Fonts.cpp" compile="1" resource="0" file="Source/Veno/Fonts/Fonts.cpp"/>
<FILE id="ytenkm" name="Fonts.h" compile="0" resource="0" file="Source/Veno/Fonts/Fonts.h"/>
</GROUP>
<GROUP id="{857B8B89-43D1-9083-E43D-8CE49DC48C2E}" name="Utils">
<FILE id="bQgR0Y" name="FFT.cpp" compile="1" resource="0" file="Source/Veno/Utils/FFT.cpp"/>
<FILE id="McoT9E" name="FFT.h" compile="0" resource="0" file="Source/Veno/Utils/FFT.h"/>
<FILE id="fnGWyM" name="Logger.cpp" compile="1" resource="0" file="Source/Veno/Utils/Logger.cpp"/>
<FILE id="wYGzZw" name="Logger.h" compile="0" resource="0" file="Source/Veno/Utils/Logger.h"/>
<FILE id="xJwmEr" name="StringUtils.cpp" compile="1" resource="0" file="Source/Veno/Utils/StringUtils.cpp"/>
<FILE id="C21Iyn" name="StringUtils.h" compile="0" resource="0" file="Source/Veno/Utils/StringUtils.h"/>
</GROUP>
<FILE id="XtqjAL" name="VenoInstance.h" compile="0" resource="0" file="Source/Veno/VenoInstance.h"/>
<FILE id="LItgbD" name="VenoInstance.cpp" compile="1" resource="0"
file="Source/Veno/VenoInstance.cpp"/>
<FILE id="nB3dnt" name="Utils.h" compile="0" resource="0" file="Source/Veno/Utils.h"/>
<FILE id="jHgT3X" name="Utils.cpp" compile="1" resource="0" file="Source/Veno/Utils.cpp"/>
<GROUP id="{95543E53-EBB6-70D0-E280-A334ED5EAB84}" name="Audio">
<GROUP id="{54E62D70-D597-6F59-0770-96E3824F110B}" name="Engine">
<FILE id="tKRVBt" name="ModulateValue.cpp" compile="1" resource="0"
file="Source/Veno/Audio/Engine/ModulateValue.cpp"/>
<FILE id="Tpzeeh" name="ModulateValue.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/ModulateValue.h"/>
<FILE id="dB1Djv" name="Modulator.cpp" compile="1" resource="0" file="Source/Veno/Audio/Engine/Modulator.cpp"/>
<FILE id="eA6ftc" name="Modulator.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/Modulator.h"/>
<FILE id="rkTKQ1" name="VeNoMatrix.cpp" compile="1" resource="0" file="Source/Veno/Audio/Engine/VeNoMatrix.cpp"/>
<FILE id="v4AuOK" name="VeNoMatrix.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/VeNoMatrix.h"/>
</GROUP>
<FILE id="tHbIrz" name="VenoBuffer.cpp" compile="1" resource="0" file="Source/Veno/Audio/VenoBuffer.cpp"/>
<FILE id="ufeJaH" name="VenoBuffer.h" compile="0" resource="0" file="Source/Veno/Audio/VenoBuffer.h"/>
<GROUP id="{A8A2C90F-3822-64F1-4430-4E6163B67B9A}" name="Synth">
<FILE id="kPIbsd" name="SynthInstance.cpp" compile="1" resource="0"
file="Source/Veno/Audio/Synth/SynthInstance.cpp"/>
<FILE id="cn8tWc" name="SynthInstance.h" compile="0" resource="0" file="Source/Veno/Audio/Synth/SynthInstance.h"/>
</GROUP>
<GROUP id="{06DB92E3-6D1E-CFC5-096E-315C4121F8AD}" name="WaveTable">
<FILE id="aK5Pjz" name="SawWaves.cpp" compile="1" resource="0" file="Source/Veno/Audio/WaveTable/SawWaves.cpp"/>
<FILE id="xIMCot" name="SawWaves.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/SawWaves.h"/>
<FILE id="dF6Ci9" name="SineWaves.cpp" compile="1" resource="0" file="Source/Veno/Audio/WaveTable/SineWaves.cpp"/>
<FILE id="lmInYK" name="SineWaves.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/SineWaves.h"/>
<FILE id="HZwgeM" name="SquareWaves.cpp" compile="1" resource="0" file="Source/Veno/Audio/WaveTable/SquareWaves.cpp"/>
<FILE id="HJUsG7" name="SquareWaves.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/SquareWaves.h"/>
<FILE id="H81SA7" name="TableHelper.cpp" compile="1" resource="0" file="Source/Veno/Audio/WaveTable/TableHelper.cpp"/>
<FILE id="uSJMy6" name="TableHelper.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/TableHelper.h"/>
<FILE id="pzpArE" name="TriangleWaves.cpp" compile="1" resource="0"
file="Source/Veno/Audio/WaveTable/TriangleWaves.cpp"/>
<FILE id="uJANqm" name="TriangleWaves.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/TriangleWaves.h"/>
<FILE id="HEHVy9" name="VeNoXWaves.cpp" compile="1" resource="0" file="Source/Veno/Audio/WaveTable/VeNoXWaves.cpp"/>
<FILE id="rMLam7" name="VeNoXWaves.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/VeNoXWaves.h"/>
<FILE id="PFmKTU" name="WavesInlcuder.h" compile="0" resource="0" file="Source/Veno/Audio/WaveTable/WavesInlcuder.h"/>
<FILE id="iWkNs3" name="WaveTableGenerator.cpp" compile="1" resource="0"
file="Source/Veno/Audio/WaveTable/WaveTableGenerator.cpp"/>
<FILE id="yI9w2X" name="WaveTableGenerator.h" compile="0" resource="0"
file="Source/Veno/Audio/WaveTable/WaveTableGenerator.h"/>
</GROUP>
<GROUP id="{16AA5D0B-E67A-8176-4F36-1180ADAFA480}" name="Oscillator"/>
<GROUP id="{A224AFA7-CD28-E0FE-3B5A-8203BFD9467B}" name="FX"/>
</GROUP>
<GROUP id="{EFD25B6B-987D-435F-F8DE-BD6C2B831E62}" name="GUI">
<GROUP id="{9C28E1EA-57BD-A04E-6ED6-3C46B5BC7FC7}" name="GUIParts">
<GROUP id="{D7ABC90B-205D-31C2-67AD-7A31B96627FF}" name="ConfigScreen">
<FILE id="klHmJa" name="ConfigComponent.cpp" compile="1" resource="0"
file="Source/Veno/GUI/GUIParts/ConfigScreen/ConfigComponent.cpp"/>
<FILE id="pYQYBm" name="ConfigComponent.h" compile="0" resource="0"
file="Source/Veno/GUI/GUIParts/ConfigScreen/ConfigComponent.h"/>
<FILE id="aeg3dC" name="VenoConfigScreen.cpp" compile="1" resource="0"
file="Source/Veno/GUI/GUIParts/ConfigScreen/VenoConfigScreen.cpp"/>
<FILE id="CvExms" name="VenoConfigScreen.h" compile="0" resource="0"
file="Source/Veno/GUI/GUIParts/ConfigScreen/VenoConfigScreen.h"/>
</GROUP>
<GROUP id="{B7626B9F-22D9-713A-B543-1D7B34AF77B7}" name="Sidebar">
<FILE id="aGx0eJ" name="Sidebar.cpp" compile="1" resource="0" file="Source/Veno/GUI/GUIParts/Sidebar/Sidebar.cpp"/>
<FILE id="uL7MJ3" name="Sidebar.h" compile="0" resource="0" file="Source/Veno/GUI/GUIParts/Sidebar/Sidebar.h"/>
<FILE id="lNXOQs" name="SidebarMixer.cpp" compile="1" resource="0"
file="Source/Veno/GUI/GUIParts/Sidebar/SidebarMixer.cpp"/>
<FILE id="onzdTZ" name="SidebarMixer.h" compile="0" resource="0" file="Source/Veno/GUI/GUIParts/Sidebar/SidebarMixer.h"/>
<FILE id="w3JFHK" name="VenoLogo.h" compile="0" resource="0" file="Source/Veno/GUI/GUIParts/Sidebar/VenoLogo.h"/>
<FILE id="AE7YqM" name="VenoLogo.cpp" compile="1" resource="0" file="Source/Veno/GUI/GUIParts/Sidebar/VenoLogo.cpp"/>
</GROUP>
</GROUP>
<GROUP id="{53C33AC6-67D7-762E-FFD5-C82B7F51DA5F}" name="Components">
<GROUP id="{90BA3743-01F8-1537-6D24-1C38F4063F10}" name="Config">
<FILE id="SRKqRQ" name="VeNoColour.cpp" compile="1" resource="0" file="Source/Veno/GUI/Components/Config/VeNoColour.cpp"/>
<FILE id="Da4NUN" name="VeNoColour.h" compile="0" resource="0" file="Source/Veno/GUI/Components/Config/VeNoColour.h"/>
<FILE id="zC4cQd" name="VenoConfigButton.cpp" compile="1" resource="0"
file="Source/Veno/GUI/Components/Config/VenoConfigButton.cpp"/>
<FILE id="kCWitN" name="VenoConfigButton.h" compile="0" resource="0"
file="Source/Veno/GUI/Components/Config/VenoConfigButton.h"/>
<FILE id="Yxj8Nf" name="VenoPreColours.cpp" compile="1" resource="0"
file="Source/Veno/GUI/Components/Config/VenoPreColours.cpp"/>
<FILE id="DbGZt9" name="VenoPreColours.h" compile="0" resource="0"
file="Source/Veno/GUI/Components/Config/VenoPreColours.h"/>
</GROUP>
<GROUP id="{7C37E6D2-F2F7-6BF7-5D9B-2DDABFFE993F}" name="LCD">
<FILE id="HcApOX" name="DecibelScale.cpp" compile="1" resource="0"
file="Source/Veno/GUI/Components/LCD/DecibelScale.cpp"/>
<FILE id="eSXqPi" name="DecibelScale.h" compile="0" resource="0" file="Source/Veno/GUI/Components/LCD/DecibelScale.h"/>
<FILE id="LpeTfD" name="SidebarLCD.cpp" compile="1" resource="0" file="Source/Veno/GUI/Components/LCD/SidebarLCD.cpp"/>
<FILE id="Y5kUlM" name="SidebarLCD.h" compile="0" resource="0" file="Source/Veno/GUI/Components/LCD/SidebarLCD.h"/>
<FILE id="Ox2oOB" name="Waveforms.cpp" compile="1" resource="0" file="Source/Veno/GUI/Components/LCD/Waveforms.cpp"/>
<FILE id="vMrsGE" name="Waveforms.h" compile="0" resource="0" file="Source/Veno/GUI/Components/LCD/Waveforms.h"/>
</GROUP>
<FILE id="BobUXL" name="BaseComponent.cpp" compile="1" resource="0"
file="Source/Veno/GUI/Components/BaseComponent.cpp"/>
<FILE id="AbXWzA" name="BaseComponent.h" compile="0" resource="0" file="Source/Veno/GUI/Components/BaseComponent.h"/>
<FILE id="BrnsHS" name="LabelComponent.cpp" compile="1" resource="0"
file="Source/Veno/GUI/Components/LabelComponent.cpp"/>
<FILE id="jZrLeG" name="LabelComponent.h" compile="0" resource="0"
file="Source/Veno/GUI/Components/LabelComponent.h"/>
</GROUP>
<GROUP id="{EDE17E47-34A6-CDD7-4D68-0477CFCF0A64}" name="LookAndFeel">
<FILE id="SbCAQ4" name="CrazyLook.cpp" compile="1" resource="0" file="Source/Veno/GUI/LookAndFeel/CrazyLook.cpp"/>
@ -31,11 +144,16 @@
file="Source/Veno/GUI/Theme/ThemePresets.cpp"/>
</GROUP>
</GROUP>
<GROUP id="{2E9A4660-1408-92E7-A653-7BA5E2FEE2DA}" name="Engine"/>
<GROUP id="{ACC73001-EF99-9282-8ADC-7BBE2EB85E06}" name="Core">
<FILE id="PFeyYY" name="AudioConfig.cpp" compile="1" resource="0" file="Source/Veno/Core/AudioConfig.cpp"/>
<FILE id="pu5RZU" name="AudioConfig.h" compile="0" resource="0" file="Source/Veno/Core/AudioConfig.h"/>
<FILE id="AfXpWs" name="Config.cpp" compile="1" resource="0" file="Source/Veno/Core/Config.cpp"/>
<FILE id="e1wHY7" name="Config.h" compile="0" resource="0" file="Source/Veno/Core/Config.h"/>
<FILE id="i3vbdH" name="PresetManager.cpp" compile="1" resource="0"
file="Source/Veno/Core/PresetManager.cpp"/>
<FILE id="WV2uuz" name="PresetManager.h" compile="0" resource="0" file="Source/Veno/Core/PresetManager.h"/>
<FILE id="Wvf9em" name="VeNoState.cpp" compile="1" resource="0" file="Source/Veno/Core/VeNoState.cpp"/>
<FILE id="skv4zn" name="VeNoState.h" compile="0" resource="0" file="Source/Veno/Core/VeNoState.h"/>
</GROUP>
</GROUP>
<FILE id="zASeb7" name="PluginProcessor.cpp" compile="1" resource="0"
@ -68,12 +186,13 @@
<MODULEPATH id="juce_gui_basics" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_gui_extra" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_opengl" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_dsp" path="../../tools/JUCE/modules"/>
</MODULEPATHS>
</VS2019>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile">
<CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug"/>
<CONFIGURATION isDebug="0" name="Release"/>
<CONFIGURATION isDebug="0" name="Release" linkTimeOptimisation="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_audio_basics" path="../../Tools/JUCE/modules"/>
@ -90,9 +209,10 @@
<MODULEPATH id="juce_gui_basics" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_gui_extra" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_opengl" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_dsp" path="../../tools/JUCE/modules"/>
</MODULEPATHS>
</LINUX_MAKE>
<CLION targetFolder="Builds/CLion" clionMakefileEnabled="1">
<CLION targetFolder="Builds/CLion" clionMakefileEnabled="1" clionCodeBlocksEnabled="1">
<MODULEPATHS>
<MODULEPATH id="juce_audio_basics" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_audio_devices" path="../../Tools/JUCE/modules"/>
@ -108,8 +228,32 @@
<MODULEPATH id="juce_gui_basics" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_gui_extra" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_opengl" path="../../Tools/JUCE/modules"/>
<MODULEPATH id="juce_dsp" path="../../tools/JUCE/modules"/>
</MODULEPATHS>
</CLION>
<CODEBLOCKS_WINDOWS targetFolder="Builds/CodeBlocksWindows">
<CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug"/>
<CONFIGURATION isDebug="0" name="Release"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_opengl"/>
<MODULEPATH id="juce_gui_extra"/>
<MODULEPATH id="juce_gui_basics"/>
<MODULEPATH id="juce_graphics"/>
<MODULEPATH id="juce_events"/>
<MODULEPATH id="juce_dsp"/>
<MODULEPATH id="juce_data_structures"/>
<MODULEPATH id="juce_cryptography"/>
<MODULEPATH id="juce_core"/>
<MODULEPATH id="juce_audio_utils"/>
<MODULEPATH id="juce_audio_processors"/>
<MODULEPATH id="juce_audio_plugin_client"/>
<MODULEPATH id="juce_audio_formats"/>
<MODULEPATH id="juce_audio_devices"/>
<MODULEPATH id="juce_audio_basics"/>
</MODULEPATHS>
</CODEBLOCKS_WINDOWS>
</EXPORTFORMATS>
<MODULES>
<MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
@ -122,6 +266,7 @@
<MODULE id="juce_core" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_cryptography" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_dsp" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_events" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
@ -130,6 +275,8 @@
</MODULES>
<LIVE_SETTINGS>
<LINUX/>
<WINDOWS/>
</LIVE_SETTINGS>
<JUCEOPTIONS JUCE_VST3_CAN_REPLACE_VST2="0" JUCE_STRICT_REFCOUNTEDPOINTER="1"/>
<JUCEOPTIONS JUCE_VST3_CAN_REPLACE_VST2="0" JUCE_STRICT_REFCOUNTEDPOINTER="1"
JUCE_WEB_BROWSER="0" JUCE_USE_WINRT_WEBVIEW="0"/>
</JUCERPROJECT>