@@ -4,6 +4,7 @@ | |||
/libRack.a | |||
/dep | |||
/plugins | |||
/disabledplugins | |||
/build | |||
/dist | |||
/patches | |||
@@ -1,18 +1,24 @@ | |||
[submodule "dep/nanovg"] | |||
path = dep/nanovg | |||
url = https://github.com/memononen/nanovg.git | |||
ignore = untracked | |||
[submodule "dep/nanosvg"] | |||
path = dep/nanosvg | |||
url = https://github.com/memononen/nanosvg.git | |||
ignore = untracked | |||
[submodule "dep/osdialog"] | |||
path = dep/osdialog | |||
url = https://github.com/AndrewBelt/osdialog.git | |||
ignore = untracked | |||
[submodule "dep/oui-blendish"] | |||
path = dep/oui-blendish | |||
url = https://github.com/AndrewBelt/oui-blendish.git | |||
ignore = untracked | |||
[submodule "dep/rtaudio"] | |||
path = dep/rtaudio | |||
url = https://github.com/thestk/rtaudio.git | |||
ignore = untracked | |||
[submodule "dep/glfw"] | |||
path = dep/glfw | |||
url = https://github.com/AndrewBelt/glfw.git | |||
ignore = untracked |
@@ -28,6 +28,8 @@ | |||
- Fix draw order of cable plugs and wires | |||
- Make Gamepad MIDI driver generate MIDI CC instead of MIDI notes for buttons | |||
- Fix Unicode user directories on Windows | |||
- Add ability to change cable colors in `settings.json` | |||
- Add `-p X` flag for dumping a screenshot of each available module | |||
- Core | |||
- Add Core CV-MIDI, CV-CC, and CV-Gate for sending MIDI to external devices | |||
@@ -35,6 +37,7 @@ | |||
- Add polyphony to Core MIDI-CV | |||
- Add MPE mode to Core MIDI-CV | |||
- Add "Panic" button to all MIDI modules to reset performance state | |||
- Add Core Audio 16 | |||
- API | |||
- Add [`simd.hpp`](include/dsp/simd.hpp) for generically handling arithmetic and math functions for vectors of floats, accelerated with SSE | |||
@@ -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>. |
@@ -512,3 +512,28 @@ EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN | |||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE | |||
SOFTWARE. | |||
# glibc_version_header | |||
MIT License | |||
Copyright (c) 2018 Tom Mason | |||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||
of this software and associated documentation files (the "Software"), to deal | |||
in the Software without restriction, including without limitation the rights | |||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
copies of the Software, and to permit persons to whom the Software is | |||
furnished to do so, subject to the following conditions: | |||
The above copyright notice and this permission notice shall be included in all | |||
copies or substantial portions of the Software. | |||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
SOFTWARE. |
@@ -1,14 +1,27 @@ | |||
# VCV Rack Licenses | |||
All **source code** is copyright © 2019 Andrew Belt and licensed under the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause). | |||
This allows open- and closed-source plugins to freely compile Rack header files into their binaries. | |||
All VCV Rack **source code** is copyright © 2019 Andrew Belt and licensed under the [GNU General Public License v3.0](LICENSE-GPLv3.txt) with the "VCV Rack Non-Commercial Plugin License Exception", allowed under section 7 of GPLv3, and a commercial licensing option. | |||
>#### VCV Rack Non-Commercial Plugin License Exception | |||
> | |||
>A Plugin is defined as a software library intended to be linked and executed by this software. | |||
> | |||
>You are granted the permission to use this software's Application Programming Interface (API) in your Plugin in source and binary forms, as well as link to this software with the Plugin, regardless of the Plugin's license terms even if it would otherwise violate the terms of this software's GPLv3, provided that the Plugin is distributed free of charge. | |||
> | |||
>Derived works of this software may keep or omit this Exception. | |||
This means that non-commercial plugins do not need to be licensed under the GPLv3 and can be released under any license of your choice (open-source or proprietary freeware). However, plugins that copy a significant portion of non-API source code from Rack must be licensed under GPLv3. | |||
If you wish to release a proprietary commercial plugin, email contact@vcvrack.com for commercial licensing. A commercial license is included for plugins sold in the [VCV Plugin Manager](https://vcvrack.com/plugins.html). | |||
--- | |||
Licenses of **third-party libraries** are listed in [LICENSE-dist.txt](LICENSE-dist.txt). | |||
The **Component Library graphics** in the `res/ComponentLibrary` directory are copyright © 2019 [Grayscale](http://grayscale.info/) and licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). | |||
You may not freely sell plugins using Component Library graphics. | |||
However, a free commercial license is available for plugins sold through the [VCV Store](https://vcvrack.com/plugins.html). | |||
Email contact@vcvrack.com for more information about licensing or the VCV Store. | |||
However, a free commercial license is available for plugins sold through the [VCV Plugin Manager](https://vcvrack.com/plugins.html). | |||
Email contact@vcvrack.com for more information about licensing or the VCV Plugin Manager. | |||
The **Core panel graphics** in the `res/Core` directory are copyright © 2019 [Grayscale](http://grayscale.info/) and licensed under [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/). | |||
You may not create modified adaptations of these graphics. | |||
@@ -1,9 +1,8 @@ | |||
RACK_DIR ?= . | |||
VERSION = 1.dev.$(shell git rev-parse --short HEAD) | |||
VERSION := 1.dev.$(shell git rev-parse --short HEAD) | |||
FLAGS += -DVERSION=$(VERSION) | |||
FLAGS += -Iinclude | |||
FLAGS += -Idep/include -Idep/lib/libzip/include | |||
FLAGS += -Iinclude -Idep/include | |||
include arch.mk | |||
@@ -18,7 +17,8 @@ SOURCES += $(wildcard src/*.cpp src/*/*.cpp) | |||
ifdef ARCH_LIN | |||
SOURCES += dep/osdialog/osdialog_gtk2.c | |||
CFLAGS += $(shell pkg-config --cflags gtk+-2.0) | |||
build/dep/osdialog/osdialog_gtk2.c.o: FLAGS += $(shell pkg-config --cflags gtk+-2.0) | |||
LDFLAGS += -rdynamic \ | |||
dep/lib/libglfw3.a dep/lib/libGLEW.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libzip.a dep/lib/libz.a dep/lib/librtmidi.a dep/lib/librtaudio.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a \ | |||
-lpthread -lGL -ldl -lX11 -lasound -ljack \ | |||
@@ -71,7 +71,8 @@ perf: $(TARGET) | |||
# Requires gperftools | |||
perf record --call-graph dwarf -o perf.data ./$< -d | |||
# Analyze with hotspot (https://github.com/KDAB/hotspot) for example | |||
# hotspot perf.data | |||
hotspot perf.data | |||
rm perf.data | |||
valgrind: $(TARGET) | |||
# --gen-suppressions=yes | |||
@@ -104,7 +105,7 @@ ifdef ARCH_LIN | |||
ldd dist/Rack/$(TARGET) | |||
cp plugins/Fundamental/dist/*.zip dist/Rack/Fundamental.zip | |||
# Make ZIP | |||
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack | |||
cd dist && zip -q -9 -r Rack-$(VERSION)-$(ARCH).zip Rack | |||
endif | |||
ifdef ARCH_MAC | |||
mkdir -p dist/$(TARGET).app | |||
@@ -121,8 +122,13 @@ ifdef ARCH_MAC | |||
otool -L dist/$(TARGET).app/Contents/MacOS/$(TARGET) | |||
cp plugins/Fundamental/dist/*.zip dist/$(TARGET).app/Contents/Resources/Fundamental.zip | |||
# Clean up and sign bundle | |||
xattr -cr dist/$(TARGET).app | |||
codesign --sign "Developer ID Application: Andrew Belt (VRF26934X5)" --verbose dist/$(TARGET).app | |||
codesign --verify --verbose dist/$(TARGET).app | |||
spctl --assess --verbose dist/$(TARGET).app | |||
# Make ZIP | |||
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip $(TARGET).app | |||
cd dist && zip -q -9 -r Rack-$(VERSION)-$(ARCH).zip $(TARGET).app | |||
endif | |||
ifdef ARCH_WIN | |||
mkdir -p dist/Rack | |||
@@ -134,7 +140,7 @@ ifdef ARCH_WIN | |||
cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/ | |||
cp plugins/Fundamental/dist/*.zip dist/Rack/Fundamental.zip | |||
# Make ZIP | |||
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack | |||
cd dist && zip -q -9 -r Rack-$(VERSION)-$(ARCH).zip Rack | |||
# Make NSIS installer | |||
# pacman -S mingw-w64-x86_64-nsis | |||
makensis -DVERSION=$(VERSION) installer.nsi | |||
@@ -148,10 +154,11 @@ endif | |||
cp -R include dist/Rack-SDK/ | |||
mkdir -p dist/Rack-SDK/dep/ | |||
cp -R dep/include dist/Rack-SDK/dep/ | |||
cp helper.py dist/Rack-SDK/ | |||
ifdef ARCH_WIN | |||
cp libRack.a dist/Rack-SDK/ | |||
endif | |||
cd dist && zip -5 -r Rack-SDK-$(VERSION).zip Rack-SDK | |||
cd dist && zip -q -9 -r Rack-SDK-$(VERSION).zip Rack-SDK | |||
# Obviously this will only work if you have the private keys to my server | |||
@@ -171,16 +178,11 @@ endif | |||
# Plugin helpers | |||
plugins: | |||
ifdef CMD | |||
for f in plugins/*; do (cd "$$f" && $(CMD)); done | |||
else | |||
for f in plugins/*; do $(MAKE) -C "$$f"; done | |||
cleanplugins: | |||
for f in plugins/*; do $(MAKE) -C "$$f" clean; done | |||
distplugins: | |||
for f in plugins/*; do $(MAKE) -C "$$f" dist; done | |||
cmdplugins: | |||
for f in plugins/*; do (cd "$$f" && ${CMD}); done | |||
endif | |||
# Includes | |||
@@ -15,15 +15,13 @@ FLAGS += -g | |||
FLAGS += -O3 -march=nocona -funsafe-math-optimizations | |||
# Warnings | |||
FLAGS += -Wall -Wextra -Wno-unused-parameter | |||
ifneq ($(ARCH), mac) | |||
CXXFLAGS += -Wsuggest-override | |||
endif | |||
# C++ standard | |||
CXXFLAGS += -std=c++11 | |||
# Architecture-independent flags | |||
ifdef ARCH_LIN | |||
FLAGS += -DARCH_LIN | |||
CXXFLAGS += -Wsuggest-override | |||
endif | |||
ifdef ARCH_MAC | |||
FLAGS += -DARCH_MAC | |||
@@ -36,6 +34,7 @@ endif | |||
ifdef ARCH_WIN | |||
FLAGS += -DARCH_WIN | |||
FLAGS += -D_USE_MATH_DEFINES | |||
CXXFLAGS += -Wsuggest-override | |||
endif | |||
CFLAGS += $(FLAGS) | |||
@@ -151,7 +151,7 @@ ifdef ARCH_WIN | |||
RTAUDIO_FLAGS += -DRTAUDIO_API_DS=ON -DRTAUDIO_API_WASAPI=ON -DRTAUDIO_API_ASIO=ON | |||
endif | |||
ifdef ARCH_LIN | |||
RTAUDIO_FLAGS += -DRTAUDIO_API_ALSA=ON -DRTAUDIO_API_JACK=OFF -DRTAUDIO_API_PULSE=OFF -DRTAUDIO_API_OSS=OFF | |||
RTAUDIO_FLAGS += -DRTAUDIO_API_ALSA=ON -DRTAUDIO_API_JACK=ON -DRTAUDIO_API_PULSE=OFF -DRTAUDIO_API_OSS=OFF | |||
endif | |||
$(rtaudio): | |||
@@ -160,7 +160,7 @@ $(rtaudio): | |||
$(MAKE) -C rtaudio/build | |||
$(MAKE) -C rtaudio/build install | |||
$(nanovg): $(wildcard nanovg/src/*.h) | |||
$(nanovg): $(wildcard nanovg/src/*.h) nanovg/example/stb_image_write.h | |||
cp $^ include/ | |||
$(nanosvg): $(wildcard nanosvg/src/*.h) | |||
@@ -8,7 +8,7 @@ import xml.etree.ElementTree | |||
# Version check | |||
f"Python 3.6 is required" | |||
f"Python 3.6+ is required" | |||
class UserException(Exception): | |||
@@ -39,33 +39,15 @@ def slug_to_identifier(slug): | |||
return slug | |||
def usage(script): | |||
text = f"""Usage: {script} <command> ... | |||
Run commands without arguments for command help. | |||
Commands: | |||
createplugin <slug> | |||
createmodule <module slug> | |||
createmanifest | |||
""" | |||
print(text) | |||
def usage_create_plugin(script): | |||
text = f"""Usage: {script} createplugin <slug> | |||
A directory <slug> will be created in the current working directory and seeded with initial files. | |||
""" | |||
print(text) | |||
def create_plugin(slug): | |||
def create_plugin(slug, plugin_dir=None): | |||
# Check slug | |||
if not is_valid_slug(slug): | |||
raise UserException("Slug must only contain ASCII letters, numbers, '-', and '_'.") | |||
if not plugin_dir: | |||
plugin_dir = os.path.join(slug, '') | |||
# Check if plugin directory exists | |||
plugin_dir = os.path.join(slug, '') | |||
if os.path.exists(plugin_dir): | |||
raise UserException(f"Directory {plugin_dir} already exists") | |||
@@ -74,7 +56,7 @@ def create_plugin(slug): | |||
# Create manifest | |||
try: | |||
create_manifest(plugin_dir, slug) | |||
create_manifest(slug, plugin_dir) | |||
except Exception as e: | |||
os.rmdir(plugin_dir) | |||
raise e | |||
@@ -120,6 +102,7 @@ using namespace rack; | |||
extern Plugin *pluginInstance; | |||
// Declare each Model, defined in each module source file | |||
// extern Model *modelMyModule; | |||
""" | |||
with open(os.path.join(plugin_dir, "src/plugin.hpp"), "w") as f: | |||
f.write(plugin_hpp) | |||
@@ -134,6 +117,9 @@ Plugin *pluginInstance; | |||
void init(Plugin *p) { | |||
pluginInstance = p; | |||
// Add modules here, e.g. | |||
// p->addModel(modelMyModule); | |||
// Any other plugin initialization may go here. | |||
// As an alternative, consider lazy-loading assets and lookup tables when your module is created to reduce startup times of Rack. | |||
} | |||
@@ -156,58 +142,57 @@ void init(Plugin *p) { | |||
print(f"You may use `make`, `make clean`, `make dist`, `make install`, etc in the {plugin_dir} directory.") | |||
def create_manifest(plugin_dir, slug=None): | |||
manifest = {} | |||
def create_manifest(slug, plugin_dir="."): | |||
# Default manifest | |||
manifest = { | |||
'slug': slug, | |||
} | |||
# Try to load existing manifest file | |||
manifest_filename = os.path.join(plugin_dir, 'plugin.json') | |||
try: | |||
with open(manifest_filename, "r") as f: | |||
manifest = json.load(f) | |||
except: | |||
pass | |||
# Query manifest information | |||
if not slug: | |||
slug = input_default("Plugin slug (unique identifier)") | |||
manifest['slug'] = slug | |||
manifest['name'] = input_default("Plugin name", slug) | |||
manifest['version'] = input_default("Version", "1.0.0") | |||
manifest['license'] = input_default("License (if open-source, use license identifier from https://spdx.org/licenses/)", "proprietary") | |||
manifest['author'] = input_default("Author") | |||
manifest['authorEmail'] = input_default("Author email (optional)") | |||
manifest['authorUrl'] = input_default("Author website URL (optional)") | |||
manifest['pluginUrl'] = input_default("Plugin website URL (optional)") | |||
manifest['manualUrl'] = input_default("Manual website URL (optional)") | |||
manifest['sourceUrl'] = input_default("Source code URL (optional)") | |||
manifest['donateUrl'] = input_default("Donate URL (optional)") | |||
manifest['modules'] = [] | |||
manifest['name'] = input_default("Plugin name", manifest.get('name', slug)) | |||
manifest['version'] = input_default("Version", manifest.get('version', "1.0.0")) | |||
manifest['license'] = input_default("License (if open-source, use license identifier from https://spdx.org/licenses/)", manifest.get('license', "proprietary")) | |||
manifest['author'] = input_default("Author", manifest.get('author', "")) | |||
manifest['authorEmail'] = input_default("Author email (optional)", manifest.get('authorEmail', "")) | |||
manifest['authorUrl'] = input_default("Author website URL (optional)", manifest.get('authorUrl', "")) | |||
manifest['pluginUrl'] = input_default("Plugin website URL (optional)", manifest.get('pluginUrl', "")) | |||
manifest['manualUrl'] = input_default("Manual website URL (optional)", manifest.get('manualUrl', "")) | |||
manifest['sourceUrl'] = input_default("Source code URL (optional)", manifest.get('sourceUrl', "")) | |||
manifest['donateUrl'] = input_default("Donate URL (optional)", manifest.get('donateUrl', "")) | |||
if 'modules' not in manifest: | |||
manifest['modules'] = [] | |||
# Dump JSON | |||
manifest_filename = os.path.join(plugin_dir, 'plugin.json') | |||
with open(manifest_filename, "w") as f: | |||
json.dump(manifest, f, indent="\t") | |||
print(f"Manifest created at {manifest_filename}") | |||
json.dump(manifest, f, indent=" ") | |||
print(f"Manifest written to {manifest_filename}") | |||
def usage_create_module(script): | |||
text = f"""Usage: {script} createmodule <module slug> | |||
Must be called in a plugin directory. | |||
A panel file must exist in res/<module slug>.svg. | |||
A source file will be created at src/<module slug>.cpp. | |||
See https://vcvrack.com/manual/PanelTutorial.html for creating SVG panel files. | |||
""" | |||
print(text) | |||
def create_module(slug): | |||
def create_module(slug, panel_filename=None, source_filename=None): | |||
# Check slug | |||
if not is_valid_slug(slug): | |||
raise UserException("Slug must only contain ASCII letters, numbers, '-', and '_'.") | |||
# Read manifest | |||
manifest_filename = 'plugin.json' | |||
manifest = None | |||
with open(manifest_filename, "r") as f: | |||
manifest = json.load(f) | |||
# Check if module manifest exists | |||
module_manifest = find(lambda m: m['slug'] == slug, manifest['modules']) | |||
if not module_manifest: | |||
if module_manifest: | |||
print(f"Module {slug} already exists in plugin.json. Edit this file to modify the module manifest.") | |||
else: | |||
# Add module to manifest | |||
module_manifest = {} | |||
module_manifest['slug'] = slug | |||
@@ -224,50 +209,44 @@ def create_module(slug): | |||
# Write manifest | |||
with open(manifest_filename, "w") as f: | |||
json.dump(manifest, f, indent="\t") | |||
print(f"Added {slug} to plugin.json") | |||
json.dump(manifest, f, indent=" ") | |||
else: | |||
print(f"Module {slug} already exists in plugin.json. Edit this file to modify the module manifest.") | |||
print(f"Added {slug} to {manifest_filename}") | |||
# Check filenames | |||
panel_filename = f"res/{slug}.svg" | |||
source_filename = f"src/{slug}.cpp" | |||
if panel_filename and source_filename: | |||
if not os.path.exists(panel_filename): | |||
raise UserException(f"Panel not found at {panel_filename}.") | |||
if not os.path.exists(panel_filename): | |||
print(f"Panel not found at {panel_filename}. If you wish to automatically generate a source file, run this command with no arguments for instructions for creating a panel file.") | |||
return | |||
print(f"Panel found at {panel_filename}. Generating source file.") | |||
print(f"Panel found at {panel_filename}. Generating source file.") | |||
if os.path.exists(source_filename): | |||
if input_default(f"{source_filename} already exists. Overwrite?", "n").lower() != "y": | |||
return | |||
if os.path.exists(source_filename): | |||
if input_default(f"{source_filename} already exists. Overwrite?", "n").lower() != "y": | |||
return | |||
# Read SVG XML | |||
tree = xml.etree.ElementTree.parse(panel_filename) | |||
# Read SVG XML | |||
tree = xml.etree.ElementTree.parse(panel_filename) | |||
components = panel_to_components(tree) | |||
print(f"Components extracted from {panel_filename}") | |||
components = panel_to_components(tree) | |||
print(f"Components extracted from {panel_filename}") | |||
# Write source | |||
source = components_to_source(components, slug) | |||
# Write source | |||
source = components_to_source(components, slug) | |||
with open(source_filename, "w") as f: | |||
f.write(source) | |||
print(f"Source file generated at {source_filename}") | |||
with open(source_filename, "w") as f: | |||
f.write(source) | |||
print(f"Source file generated at {source_filename}") | |||
# Append model to plugin.hpp | |||
identifier = slug_to_identifier(slug) | |||
# Append model to plugin.hpp | |||
identifier = slug_to_identifier(slug) | |||
# Tell user to add model to plugin.hpp and plugin.cpp | |||
print(f"") | |||
print(f"To enable the module, add") | |||
print(f"extern Model *model{identifier};") | |||
print(f"to plugin.hpp, and add") | |||
print(f"p->addModel(model{identifier});") | |||
print(f"to the init() function in plugin.cpp.") | |||
# Tell user to add model to plugin.hpp and plugin.cpp | |||
print(f""" | |||
To enable the module, add | |||
extern Model *model{identifier}; | |||
to plugin.hpp, and add | |||
p->addModel(model{identifier}); | |||
to the init() function in plugin.cpp.""") | |||
def panel_to_components(tree): | |||
@@ -495,24 +474,49 @@ Model *model{identifier} = createModel<{identifier}, {identifier}Widget>("{slug} | |||
return source | |||
def usage(script): | |||
text = f"""VCV Rack Plugin Helper Utility | |||
Usage: {script} <command> ... | |||
Commands: | |||
createplugin <slug> [plugin dir] | |||
A directory will be created and initialized with a minimal plugin template. | |||
If no plugin directory is given, the slug is used. | |||
createmanifest <slug> [plugin dir] | |||
Creates a `plugin.json` manifest file in an existing plugin directory. | |||
If no plugin directory is given, the current directory is used. | |||
createmodule <module slug> [panel file] [source file] | |||
Adds a new module to the plugin manifest in the current directory. | |||
If a panel and source file are given, generates a template source file initialized with components from a panel file. | |||
Example: | |||
{script} createmodule MyModule res/MyModule.svg src/MyModule.cpp | |||
See https://vcvrack.com/manual/PanelTutorial.html for creating SVG panel files. | |||
""" | |||
print(text) | |||
def parse_args(args): | |||
if len(args) >= 2: | |||
if args[1] == 'createplugin': | |||
if len(args) >= 3: | |||
create_plugin(args[2]) | |||
return | |||
usage_create_plugin(args[0]) | |||
return | |||
if args[1] == 'createmodule': | |||
if len(args) >= 3: | |||
create_module(args[2]) | |||
return | |||
usage_create_module(args[0]) | |||
return | |||
if args[1] == 'createmanifest': | |||
create_manifest('.') | |||
return | |||
usage(args[0]) | |||
script = args.pop(0) | |||
if len(args) == 0: | |||
usage(script) | |||
return | |||
cmd = args.pop(0) | |||
if cmd == 'createplugin': | |||
create_plugin(*args) | |||
elif cmd == 'createmodule': | |||
create_module(*args) | |||
elif cmd == 'createmanifest': | |||
create_manifest(*args) | |||
else: | |||
print(f"Command not found: {cmd}") | |||
if __name__ == "__main__": | |||
@@ -1,16 +1,10 @@ | |||
#pragma once | |||
#include "app/common.hpp" | |||
#include "app/LedDisplay.hpp" | |||
#include "audio.hpp" | |||
namespace rack { | |||
namespace audio { | |||
struct Port; | |||
} | |||
namespace app { | |||
@@ -16,6 +16,7 @@ struct CableWidget : widget::OpaqueWidget { | |||
PortWidget *inputPort = NULL; | |||
PortWidget *hoveredOutputPort = NULL; | |||
PortWidget *hoveredInputPort = NULL; | |||
/** Owned. */ | |||
engine::Cable *cable; | |||
NVGcolor color; | |||
@@ -10,6 +10,7 @@ namespace app { | |||
struct CircularShadow : widget::TransparentWidget { | |||
float blurRadius; | |||
float opacity; | |||
CircularShadow(); | |||
void draw(const DrawArgs &args) override; | |||
}; | |||
@@ -11,6 +11,7 @@ struct LightWidget : widget::TransparentWidget { | |||
NVGcolor bgColor = nvgRGBA(0, 0, 0, 0); | |||
NVGcolor color = nvgRGBA(0, 0, 0, 0); | |||
NVGcolor borderColor = nvgRGBA(0, 0, 0, 0); | |||
void draw(const DrawArgs &args) override; | |||
virtual void drawLight(const DrawArgs &args); | |||
virtual void drawHalo(const DrawArgs &args); | |||
@@ -1,16 +1,10 @@ | |||
#pragma once | |||
#include "app/common.hpp" | |||
#include "app/LedDisplay.hpp" | |||
#include "midi.hpp" | |||
namespace rack { | |||
namespace midi { | |||
struct Port; | |||
} | |||
namespace app { | |||
@@ -14,6 +14,7 @@ Will access firstLightId, firstLightId + 1, etc. for each added color | |||
struct ModuleLightWidget : MultiLightWidget { | |||
engine::Module *module = NULL; | |||
int firstLightId; | |||
void step() override; | |||
}; | |||
@@ -15,11 +15,11 @@ namespace app { | |||
/** Manages an engine::Module in the rack. */ | |||
struct ModuleWidget : widget::OpaqueWidget { | |||
plugin::Model *model = NULL; | |||
/** Owns the module pointer */ | |||
/** Owned. */ | |||
engine::Module *module = NULL; | |||
widget::Widget *panel = NULL; | |||
/** Note that the indexes of these vectors might not correspond with the indexes of `Module::params` etc. | |||
/** Note that the indexes of these vectors do not necessarily correspond with the indexes of `Module::params` etc. | |||
*/ | |||
std::vector<ParamWidget*> params; | |||
std::vector<PortWidget*> outputs; | |||
@@ -29,7 +29,7 @@ struct ModuleWidget : widget::OpaqueWidget { | |||
math::Vec oldPos; | |||
ModuleWidget(); | |||
DEPRECATED ModuleWidget(engine::Module *module) { | |||
DEPRECATED ModuleWidget(engine::Module *module) : ModuleWidget() { | |||
setModule(module); | |||
} | |||
~ModuleWidget(); | |||
@@ -11,6 +11,7 @@ namespace app { | |||
struct MultiLightWidget : LightWidget { | |||
/** Colors of each value state */ | |||
std::vector<NVGcolor> baseColors; | |||
void addBaseColor(NVGcolor baseColor); | |||
/** Sets the color to a linear combination of the baseColors with the given weights */ | |||
void setBrightnesses(const std::vector<float> &brightnesses); | |||
@@ -17,13 +17,13 @@ struct Scene : widget::OpaqueWidget { | |||
MenuBar *menuBar; | |||
widget::Widget *moduleBrowser; | |||
double lastAutoSaveTime = 0.0; | |||
// Version checking | |||
bool checkVersion = true; | |||
bool checkedVersion = false; | |||
std::string latestVersion; | |||
double lastAutoSaveTime = 0.0; | |||
Scene(); | |||
~Scene(); | |||
void step() override; | |||
@@ -18,7 +18,8 @@ struct SvgKnob : Knob { | |||
widget::TransformWidget *tw; | |||
widget::SvgWidget *sw; | |||
/** Angles in radians */ | |||
float minAngle, maxAngle; | |||
float minAngle = 0.f; | |||
float maxAngle = M_PI; | |||
SvgKnob(); | |||
void setSvg(std::shared_ptr<Svg> svg); | |||
@@ -1,5 +1,6 @@ | |||
#pragma once | |||
#include "common.hpp" | |||
#include "widget/Widget.hpp" | |||
#include "widget/FramebufferWidget.hpp" | |||
#include "widget/SvgWidget.hpp" | |||
@@ -9,10 +10,12 @@ namespace app { | |||
/** If you don't add these to your ModuleWidget, they will fall out of the rack... */ | |||
struct SvgScrew : widget::FramebufferWidget { | |||
struct SvgScrew : widget::Widget { | |||
widget::FramebufferWidget *fb; | |||
widget::SvgWidget *sw; | |||
SvgScrew(); | |||
void setSvg(std::shared_ptr<Svg> svg); | |||
}; | |||
@@ -12,9 +12,9 @@ namespace rack { | |||
namespace app { | |||
static const char APP_NAME[] = "VCV Rack"; | |||
static const char APP_VERSION[] = TOSTRING(VERSION); | |||
static const char API_URL[] = "https://api.vcvrack.com"; | |||
extern const char APP_NAME[]; | |||
extern const char APP_VERSION[]; | |||
extern const char API_URL[]; | |||
static const float SVG_DPI = 75.0; | |||
static const float MM_PER_IN = 25.4; | |||
@@ -20,8 +20,8 @@ namespace audio { | |||
struct Port { | |||
// Stream properties | |||
int driver = 0; | |||
int device = -1; | |||
int driverId = 0; | |||
int deviceId = -1; | |||
int offset = 0; | |||
int maxChannels = 8; | |||
int sampleRate = 44100; | |||
@@ -35,17 +35,17 @@ struct Port { | |||
Port(); | |||
virtual ~Port(); | |||
std::vector<int> getDrivers(); | |||
std::string getDriverName(int driver); | |||
void setDriver(int driver); | |||
std::vector<int> getDriverIds(); | |||
std::string getDriverName(int driverId); | |||
void setDriverId(int driverId); | |||
int getDeviceCount(); | |||
bool getDeviceInfo(int device, RtAudio::DeviceInfo *deviceInfo); | |||
bool getDeviceInfo(int deviceId, RtAudio::DeviceInfo *deviceInfo); | |||
/** Returns the number of inputs or outputs, whichever is greater */ | |||
int getDeviceChannels(int device); | |||
std::string getDeviceName(int device); | |||
std::string getDeviceDetail(int device, int offset); | |||
void setDevice(int device, int offset); | |||
int getDeviceChannels(int deviceId); | |||
std::string getDeviceName(int deviceId); | |||
std::string getDeviceDetail(int deviceId, int offset); | |||
void setDeviceId(int deviceId, int offset); | |||
std::vector<int> getSampleRates(); | |||
void setSampleRate(int sampleRate); | |||
@@ -21,6 +21,7 @@ namespace rack { | |||
/** Deprecation notice for functions | |||
E.g. | |||
DEPRECATED void foo(); | |||
*/ | |||
#if defined(__GNUC__) || defined(__clang__) | |||
@@ -33,9 +34,12 @@ E.g. | |||
/** Concatenates two literals or two macros | |||
Example: | |||
#define COUNT 42 | |||
CONCAT(myVariable, COUNT) | |||
expands to | |||
myVariable42 | |||
*/ | |||
#define CONCAT_LITERAL(x, y) x ## y | |||
@@ -44,10 +48,14 @@ expands to | |||
/** Surrounds raw text with quotes | |||
Example: | |||
#define NAME "world" | |||
printf("Hello " TOSTRING(NAME)) | |||
expands to | |||
printf("Hello " "world") | |||
and of course the C++ lexer/parser then concatenates the string literals. | |||
*/ | |||
#define TOSTRING_LITERAL(x) #x | |||
@@ -60,26 +68,35 @@ and of course the C++ lexer/parser then concatenates the string literals. | |||
/** Reserve space for `count` enums starting with `name`. | |||
Example: | |||
enum Foo { | |||
ENUMS(BAR, 14), | |||
BAZ | |||
}; | |||
BAR + 0 to BAR + 13 is reserved. BAZ has a value of 14. | |||
`BAR + 0` to `BAR + 13` is reserved. `BAZ` has a value of 14. | |||
*/ | |||
#define ENUMS(name, count) name, name ## _LAST = name + (count) - 1 | |||
/** References binary files compiled into the program. | |||
For example, to include a file "Test.dat" directly into your program binary, add | |||
BINARIES += Test.dat | |||
to your Makefile and declare | |||
BINARY(Test_dat); | |||
at the root of a .c or .cpp source file. Note that special characters are replaced with "_". Then use | |||
BINARY_START(Test_dat) | |||
BINARY_END(Test_dat) | |||
to reference the data beginning and end as a void* array, and | |||
BINARY_SIZE(Test_dat) | |||
to get its size in bytes. | |||
*/ | |||
#if defined ARCH_MAC | |||
@@ -99,14 +116,15 @@ to get its size in bytes. | |||
/** C#-style property constructor | |||
Example: | |||
Foo *foo = construct<Foo>(&Foo::greeting, "Hello world", &Foo::legs, 2); | |||
*/ | |||
template<typename T> | |||
template <typename T> | |||
T *construct() { | |||
return new T; | |||
} | |||
template<typename T, typename F, typename V, typename... Args> | |||
template <typename T, typename F, typename V, typename... Args> | |||
T *construct(F f, V v, Args... args) { | |||
T *o = construct<T>(args...); | |||
o->*f = v; | |||
@@ -115,21 +133,21 @@ T *construct(F f, V v, Args... args) { | |||
/** Defers code until the scope is destructed | |||
From http://www.gingerbill.org/article/defer-in-cpp.html | |||
Example: | |||
file = fopen(...); | |||
DEFER({ | |||
fclose(file); | |||
}); | |||
*/ | |||
template<typename F> | |||
template <typename F> | |||
struct DeferWrapper { | |||
F f; | |||
DeferWrapper(F f) : f(f) {} | |||
~DeferWrapper() { f(); } | |||
}; | |||
template<typename F> | |||
template <typename F> | |||
DeferWrapper<F> deferWrapper(F f) { | |||
return DeferWrapper<F>(f); | |||
} | |||
@@ -137,7 +155,7 @@ DeferWrapper<F> deferWrapper(F f) { | |||
#define DEFER(code) auto CONCAT(_defer_, __COUNTER__) = rack::deferWrapper([&]() code) | |||
/** Reports a string to the user */ | |||
/** An exception meant to be shown to the user */ | |||
struct UserException : std::runtime_error { | |||
UserException(const std::string &msg) : std::runtime_error(msg) {} | |||
}; | |||
@@ -300,9 +300,12 @@ struct SynthTechAlco : app::SvgKnob { | |||
minAngle = -0.82*M_PI; | |||
maxAngle = 0.82*M_PI; | |||
setSvg(APP->window->loadSvg(asset::system("res/ComponentLibrary/SynthTechAlco.svg"))); | |||
// Add cap | |||
widget::FramebufferWidget *capFb = new widget::FramebufferWidget; | |||
widget::SvgWidget *cap = new widget::SvgWidget; | |||
cap->setSvg(APP->window->loadSvg(asset::system("res/ComponentLibrary/SynthTechAlco_cap.svg"))); | |||
addChild(cap); | |||
capFb->addChild(cap); | |||
addChild(capFb); | |||
} | |||
}; | |||
@@ -460,15 +463,6 @@ struct RedGreenBlueLight : GrayModuleLightWidget { | |||
} | |||
}; | |||
struct RGBLight : app::ModuleLightWidget { | |||
RGBLight() { | |||
addBaseColor(nvgRGBf(1, 0, 0)); | |||
addBaseColor(nvgRGBf(0, 1, 0)); | |||
addBaseColor(nvgRGBf(0, 0, 1)); | |||
} | |||
}; | |||
/** Based on the size of 5mm LEDs */ | |||
template <typename BASE> | |||
struct LargeLight : BASE { | |||
@@ -501,7 +495,7 @@ struct TinyLight : BASE { | |||
} | |||
}; | |||
/** A light to displayed over PB61303. Must add a color by subclassing or templating. */ | |||
/** A light for displaying on top of PB61303. Must add a color by subclassing or templating. */ | |||
template <typename BASE> | |||
struct LEDBezelLight : BASE { | |||
LEDBezelLight() { | |||
@@ -608,15 +602,13 @@ struct PB61303 : app::SvgSwitch { | |||
struct ScrewSilver : app::SvgScrew { | |||
ScrewSilver() { | |||
sw->setSvg(APP->window->loadSvg(asset::system("res/ComponentLibrary/ScrewSilver.svg"))); | |||
box.size = sw->box.size; | |||
setSvg(APP->window->loadSvg(asset::system("res/ComponentLibrary/ScrewSilver.svg"))); | |||
} | |||
}; | |||
struct ScrewBlack : app::SvgScrew { | |||
ScrewBlack() { | |||
sw->setSvg(APP->window->loadSvg(asset::system("res/ComponentLibrary/ScrewBlack.svg"))); | |||
box.size = sw->box.size; | |||
setSvg(APP->window->loadSvg(asset::system("res/ComponentLibrary/ScrewBlack.svg"))); | |||
} | |||
}; | |||
@@ -5,7 +5,7 @@ | |||
namespace rack { | |||
/** Digital signal processing routines for plugins | |||
/** Digital signal processing routines | |||
*/ | |||
namespace dsp { | |||
@@ -69,5 +69,12 @@ inline float exponentialBipolar(float b, float x) { | |||
} | |||
/** Useful for storing arrays of samples in ring buffers and casting them to `float*` to be used by interleaved processors, like SampleRateConverter */ | |||
template <size_t CHANNELS> | |||
struct Frame { | |||
float samples[CHANNELS]; | |||
}; | |||
} // namespace dsp | |||
} // namespace rack |
@@ -6,87 +6,64 @@ namespace rack { | |||
namespace dsp { | |||
/** Detects when a boolean changes from false to true */ | |||
struct BooleanTrigger { | |||
bool state = true; | |||
void reset() { | |||
state = true; | |||
} | |||
bool process(bool state) { | |||
bool triggered = (state && !this->state); | |||
this->state = state; | |||
return triggered; | |||
} | |||
}; | |||
/** Turns HIGH when value reaches 1.f, turns LOW when value reaches 0.f. */ | |||
struct SchmittTrigger { | |||
enum State { | |||
LOW, | |||
HIGH, | |||
UNKNOWN | |||
}; | |||
State state; | |||
SchmittTrigger() { | |||
reset(); | |||
} | |||
bool state = true; | |||
void reset() { | |||
state = UNKNOWN; | |||
state = true; | |||
} | |||
/** Updates the state of the Schmitt Trigger given a value. | |||
Returns true if triggered, i.e. the value increases from 0 to 1. | |||
If different trigger thresholds are needed, use | |||
process(math::rescale(in, low, high, 0.f, 1.f)) | |||
process(rescale(in, low, high, 0.f, 1.f)) | |||
for example. | |||
*/ | |||
bool process(float in) { | |||
switch (state) { | |||
case LOW: | |||
if (in >= 1.f) { | |||
state = HIGH; | |||
return true; | |||
} | |||
break; | |||
case HIGH: | |||
if (in <= 0.f) { | |||
state = LOW; | |||
} | |||
break; | |||
default: | |||
if (in >= 1.f) { | |||
state = HIGH; | |||
} | |||
else if (in <= 0.f) { | |||
state = LOW; | |||
} | |||
break; | |||
if (state) { | |||
// HIGH to LOW | |||
if (in <= 0.f) { | |||
state = false; | |||
} | |||
} | |||
else { | |||
// LOW to HIGH | |||
if (in >= 1.f) { | |||
state = true; | |||
return true; | |||
} | |||
} | |||
return false; | |||
} | |||
bool isHigh() { | |||
return state == HIGH; | |||
} | |||
}; | |||
/** Detects when a boolean changes from false to true */ | |||
struct BooleanTrigger { | |||
bool state; | |||
BooleanTrigger() { | |||
reset(); | |||
} | |||
void reset() { | |||
state = true; | |||
} | |||
bool process(bool state) { | |||
bool triggered = (state && !this->state); | |||
this->state = state; | |||
return triggered; | |||
return state; | |||
} | |||
}; | |||
/** When triggered, holds a high value for a specified time before going low again */ | |||
struct PulseGenerator { | |||
float remaining; | |||
PulseGenerator() { | |||
reset(); | |||
} | |||
float remaining = 0.f; | |||
/** Immediately disables the pulse */ | |||
void reset() { | |||
@@ -113,16 +90,13 @@ struct PulseGenerator { | |||
struct Timer { | |||
float time; | |||
Timer() { | |||
reset(); | |||
} | |||
float time = 0.f; | |||
void reset() { | |||
time = 0.f; | |||
} | |||
/** Returns the time since last reset or initialization. */ | |||
float process(float deltaTime) { | |||
time += deltaTime; | |||
return time; | |||
@@ -131,26 +105,22 @@ struct Timer { | |||
struct ClockDivider { | |||
int clock; | |||
int division = 1; | |||
ClockDivider() { | |||
reset(); | |||
} | |||
uint32_t clock = 0; | |||
uint32_t division = 1; | |||
void reset() { | |||
clock = 0; | |||
} | |||
void setDivision(int division) { | |||
void setDivision(uint32_t division) { | |||
this->division = division; | |||
} | |||
int getDivision() { | |||
uint32_t getDivision() { | |||
return division; | |||
} | |||
int getClock() { | |||
uint32_t getClock() { | |||
return clock; | |||
} | |||
@@ -7,20 +7,10 @@ namespace rack { | |||
namespace dsp { | |||
template<typename T> | |||
T *alignedNew(size_t len) { | |||
return (T*) pffft_aligned_malloc(len * sizeof(T)); | |||
} | |||
template<typename T> | |||
void alignedDelete(T *p) { | |||
pffft_aligned_free(p); | |||
} | |||
/** Real-valued FFT context. | |||
Wrapper for [PFFFT](https://bitbucket.org/jpommier/pffft/) | |||
`length` must be a multiple of 32. | |||
Buffers must be aligned to 16-byte boundaries. new[] and malloc() do this for you. | |||
*/ | |||
struct RealFFT { | |||
PFFFT_Setup *setup; | |||
@@ -106,29 +106,20 @@ struct ExponentialSlewLimiter { | |||
\f$ \frac{dy}{dt} = x \lambda \f$. | |||
*/ | |||
struct ExponentialFilter { | |||
float out; | |||
float out = 0.f; | |||
float lambda = 0.f; | |||
ExponentialFilter() { | |||
reset(); | |||
} | |||
void reset() { | |||
out = NAN; | |||
out = 0.f; | |||
} | |||
float process(float deltaTime, float in) { | |||
if (std::isnan(out)) { | |||
float y = out + (in - out) * lambda * deltaTime; | |||
// If no change was made between the old and new output, assume float granularity is too small and snap output to input | |||
if (out == y) | |||
out = in; | |||
} | |||
else { | |||
float y = out + (in - out) * lambda * deltaTime; | |||
// If no change was detected, assume float granularity is too small and snap output to input | |||
if (out == y) | |||
out = in; | |||
else | |||
out = y; | |||
} | |||
else | |||
out = y; | |||
return out; | |||
} | |||
@@ -1,17 +0,0 @@ | |||
#pragma once | |||
#include "dsp/common.hpp" | |||
namespace rack { | |||
namespace dsp { | |||
/** Useful for storing arrays of samples in ring buffers and casting them to `float*` to be used by interleaved processors, like SampleRateConverter */ | |||
template <size_t CHANNELS> | |||
struct Frame { | |||
float samples[CHANNELS]; | |||
}; | |||
} // namespace dsp | |||
} // namespace rack |
@@ -15,7 +15,7 @@ https://www.cs.cmu.edu/~eli/papers/icmc01-hardsync.pdf | |||
void minBlepImpulse(int z, int o, float *output); | |||
template<int Z, int O> | |||
template <int Z, int O> | |||
struct MinBlepGenerator { | |||
float buf[2 * Z] = {}; | |||
int pos = 0; | |||
@@ -26,7 +26,7 @@ For example, the following solves the system x''(t) = -x(t) using a fixed timest | |||
*/ | |||
/** Solves an ODE system using the 1st order Euler method */ | |||
template<typename F> | |||
template <typename F> | |||
void stepEuler(float t, float dt, float x[], int len, F f) { | |||
float k[len]; | |||
@@ -37,7 +37,7 @@ void stepEuler(float t, float dt, float x[], int len, F f) { | |||
} | |||
/** Solves an ODE system using the 2nd order Runge-Kutta method */ | |||
template<typename F> | |||
template <typename F> | |||
void stepRK2(float t, float dt, float x[], int len, F f) { | |||
float k1[len]; | |||
float k2[len]; | |||
@@ -56,7 +56,7 @@ void stepRK2(float t, float dt, float x[], int len, F f) { | |||
} | |||
/** Solves an ODE system using the 4th order Runge-Kutta method */ | |||
template<typename F> | |||
template <typename F> | |||
void stepRK4(float t, float dt, float x[], int len, F f) { | |||
float k1[len]; | |||
float k2[len]; | |||
@@ -1,6 +1,5 @@ | |||
#pragma once | |||
#include "dsp/common.hpp" | |||
#include "dsp/frame.hpp" | |||
#include "dsp/ringbuffer.hpp" | |||
#include "dsp/fir.hpp" | |||
#include "dsp/window.hpp" | |||
@@ -14,10 +13,10 @@ namespace dsp { | |||
/** Resamples by a fixed rational factor. */ | |||
template<int CHANNELS> | |||
template <int MAX_CHANNELS> | |||
struct SampleRateConverter { | |||
SpeexResamplerState *st = NULL; | |||
int channels = CHANNELS; | |||
int channels = MAX_CHANNELS; | |||
int quality = SPEEX_RESAMPLER_QUALITY_DEFAULT; | |||
int inRate = 44100; | |||
int outRate = 44100; | |||
@@ -31,9 +30,9 @@ struct SampleRateConverter { | |||
} | |||
} | |||
/** Sets the number of channels to actually process. This can be at most CHANNELS. */ | |||
/** Sets the number of channels to actually process. This can be at most MAX_CHANNELS. */ | |||
void setChannels(int channels) { | |||
assert(channels <= CHANNELS); | |||
assert(channels <= MAX_CHANNELS); | |||
if (channels == this->channels) | |||
return; | |||
this->channels = channels; | |||
@@ -68,13 +67,13 @@ struct SampleRateConverter { | |||
assert(st); | |||
assert(err == RESAMPLER_ERR_SUCCESS); | |||
speex_resampler_set_input_stride(st, CHANNELS); | |||
speex_resampler_set_output_stride(st, CHANNELS); | |||
speex_resampler_set_input_stride(st, MAX_CHANNELS); | |||
speex_resampler_set_output_stride(st, MAX_CHANNELS); | |||
} | |||
} | |||
/** `in` and `out` are interlaced with the number of channels */ | |||
void process(const Frame<CHANNELS> *in, int *inFrames, Frame<CHANNELS> *out, int *outFrames) { | |||
void process(const Frame<MAX_CHANNELS> *in, int *inFrames, Frame<MAX_CHANNELS> *out, int *outFrames) { | |||
assert(in); | |||
assert(inFrames); | |||
assert(out); | |||
@@ -95,7 +94,7 @@ struct SampleRateConverter { | |||
else { | |||
// Simply copy the buffer without conversion | |||
int frames = std::min(*inFrames, *outFrames); | |||
std::memcpy(out, in, frames * sizeof(Frame<CHANNELS>)); | |||
std::memcpy(out, in, frames * sizeof(Frame<MAX_CHANNELS>)); | |||
*inFrames = frames; | |||
*outFrames = frames; | |||
} | |||
@@ -104,7 +103,7 @@ struct SampleRateConverter { | |||
/** Downsamples by an integer factor. */ | |||
template<int OVERSAMPLE, int QUALITY> | |||
template <int OVERSAMPLE, int QUALITY> | |||
struct Decimator { | |||
float inBuffer[OVERSAMPLE*QUALITY]; | |||
float kernel[OVERSAMPLE*QUALITY]; | |||
@@ -139,7 +138,7 @@ struct Decimator { | |||
/** Upsamples by an integer factor. */ | |||
template<int OVERSAMPLE, int QUALITY> | |||
template <int OVERSAMPLE, int QUALITY> | |||
struct Upsampler { | |||
float inBuffer[QUALITY]; | |||
float kernel[OVERSAMPLE*QUALITY]; | |||
@@ -54,14 +54,10 @@ struct VuMeter2 { | |||
}; | |||
Mode mode = PEAK; | |||
/** Either the smoothed peak or the mean-square of the brightness, depending on the mode. */ | |||
float v; | |||
float v = 0.f; | |||
/** Inverse time constant in 1/seconds */ | |||
float lambda = 30.f; | |||
VuMeter2() { | |||
reset(); | |||
} | |||
void reset() { | |||
v = 0.f; | |||
} | |||
@@ -14,7 +14,7 @@ inline float hann(float p) { | |||
return 0.5f * (1.f - std::cos(2*M_PI * p)); | |||
} | |||
/** Applies the Hann window to a signal `x`. */ | |||
/** Multiplies the Hann window by a signal `x` of length `len` in-place. */ | |||
inline void hannWindow(float *x, int len) { | |||
for (int i = 0; i < len; i++) { | |||
x[i] *= hann((float) i / (len - 1)); | |||
@@ -25,6 +25,10 @@ struct Engine { | |||
float getSampleRate(); | |||
/** Returns the inverse of the current sample rate. */ | |||
float getSampleTime(); | |||
/** Causes worker threads to block on a mutex instead of spinlock. | |||
Call this in your Module::step() method to hint that the operation will take more than ~0.1 ms. | |||
*/ | |||
void yieldWorkers(); | |||
// Modules | |||
/** Adds a module to the rack engine. | |||
@@ -14,16 +14,16 @@ struct Light { | |||
/** Sets the brightness immediately with no light decay. */ | |||
void setBrightness(float brightness) { | |||
value = (brightness > 0.f) ? std::pow(brightness, 2) : 0.f; | |||
value = (brightness > 0.f) ? brightness : 0.f; | |||
} | |||
float getBrightness() { | |||
return std::sqrt(value); | |||
return value; | |||
} | |||
/** Emulates light decay with slow fall but immediate rise. */ | |||
void setSmoothBrightness(float brightness, float deltaTime) { | |||
float v = (brightness > 0.f) ? std::pow(brightness, 2) : 0.f; | |||
float v = (brightness > 0.f) ? brightness : 0.f; | |||
if (v < value) { | |||
// Fade out light | |||
const float lambda = 30.f; | |||
@@ -37,30 +37,39 @@ struct Module { | |||
std::vector<Light> lights; | |||
std::vector<ParamQuantity*> paramQuantities; | |||
/** ID of the Module immediately to the left, or -1 if nonexistent. */ | |||
int leftModuleId = -1; | |||
/** Pointer to the left Module, or NULL if nonexistent. */ | |||
Module *leftModule = NULL; | |||
/** Double buffer for receiving messages from adjacent modules. | |||
If this module receives messages from adjacent modules, allocate both message buffers with identical blocks of memory (arrays, structs, etc). | |||
Remember to free the buffer in the Module destructor. | |||
Example: | |||
leftProducerMessage = new MyModuleMessage; | |||
leftConsumerMessage = new MyModuleMessage; | |||
At the end of each timestep, the buffers are flipped/swapped. | |||
You may choose for the Module to write to its own message buffer for consumption by other modules. | |||
As long as this convention is followed by the left Module, this is fine. | |||
*/ | |||
void *leftProducerMessage = NULL; | |||
void *leftConsumerMessage = NULL; | |||
/** Represents a message-passing channel for an adjacent module. */ | |||
struct Expander { | |||
/** ID of the expander module, or -1 if nonexistent. */ | |||
int moduleId = -1; | |||
/** Pointer to the expander Module, or NULL if nonexistent. */ | |||
Module *module = NULL; | |||
/** Double buffer for receiving messages from the expander module. | |||
If you intend to receive messages from an expander, allocate both message buffers with identical blocks of memory (arrays, structs, etc). | |||
Remember to free the buffer in the Module destructor. | |||
Example: | |||
rightExpander.producerMessage = new MyExpanderMessage; | |||
rightExpander.consumerMessage = new MyExpanderMessage; | |||
You must check the expander module's `model` before attempting to write its message buffer. | |||
Once the module is checked, you can reinterpret_cast its producerMessage at no performance cost. | |||
Producer messages are intended to be write-only. | |||
Consumer messages are intended to be read-only. | |||
Once you write a message, set messageFlipRequested to true to request that the messages are flipped at the end of the timestep. | |||
This means that message-passing has 1-sample latency. | |||
You may choose for your Module to instead write to its own message buffer for consumption by other modules, i.e. the expander "pulls" rather than this module "pushing". | |||
As long as this convention is followed by the other module, this is fine. | |||
*/ | |||
void *producerMessage = NULL; | |||
void *consumerMessage = NULL; | |||
bool messageFlipRequested = false; | |||
}; | |||
int rightModuleId = -1; | |||
Module *rightModule = NULL; | |||
void *rightProducerMessage = NULL; | |||
void *rightConsumerMessage = NULL; | |||
Expander leftExpander; | |||
Expander rightExpander; | |||
/** Seconds spent in the process() method, with exponential smoothing. | |||
Only written when CPU timing is enabled, since time measurement is expensive. | |||
@@ -19,9 +19,6 @@ struct Param { | |||
void setValue(float value) { | |||
this->value = value; | |||
} | |||
json_t *toJson(); | |||
void fromJson(json_t *rootJ); | |||
}; | |||
@@ -5,6 +5,28 @@ | |||
#include <set> | |||
/** Remaps Ctrl to Cmd on Mac | |||
Use this instead of GLFW_MOD_CONTROL, since Cmd should be used on Mac in place of Ctrl on Linux/Windows. | |||
*/ | |||
#if defined ARCH_MAC | |||
#define RACK_MOD_CTRL GLFW_MOD_SUPER | |||
#define RACK_MOD_CTRL_NAME "Cmd" | |||
#else | |||
#define RACK_MOD_CTRL GLFW_MOD_CONTROL | |||
#define RACK_MOD_CTRL_NAME "Ctrl" | |||
#endif | |||
#define RACK_MOD_SHIFT_NAME "Shift" | |||
#define RACK_MOD_ALT_NAME "Alt" | |||
/** Filters actual mod keys from the mod flags. | |||
Use this if you don't care about GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK. | |||
Example usage: | |||
if ((e.mod & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT)) ... | |||
*/ | |||
#define RACK_MOD_MASK (GLFW_MOD_SHIFT | GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER) | |||
namespace rack { | |||
@@ -123,7 +145,7 @@ struct Button : Base, PositionBase { | |||
/** Occurs when the left mouse button is pressed a second time on the same Widget within a time duration. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on left button press) to receive this event. | |||
*/ | |||
struct DoubleClick : Base { | |||
}; | |||
@@ -153,28 +175,28 @@ struct HoverScroll : Base, PositionBase { | |||
/** Occurs when a Widget begins consuming the Hover event. | |||
Must set the Hover target to receive this event. | |||
Must consume the Hover event to receive this event. | |||
*/ | |||
struct Enter : Base { | |||
}; | |||
/** Occurs when a different Widget is entered. | |||
Must set the Hover target to receive this event. | |||
Must consume the Hover event (when a Widget is entered) to receive this event. | |||
*/ | |||
struct Leave : Base { | |||
}; | |||
/** Occurs when a Widget begins consuming the Button press event for the left mouse button. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on left button press) to receive this event. | |||
*/ | |||
struct Select : Base { | |||
}; | |||
/** Occurs when a different Widget is selected. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on left button press, when the Widget is selected) to receive this event. | |||
*/ | |||
struct Deselect : Base { | |||
}; | |||
@@ -200,21 +222,21 @@ struct DragBase : Base { | |||
}; | |||
/** Occurs when a Widget begins being dragged. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on press) to receive this event. | |||
*/ | |||
struct DragStart : DragBase { | |||
}; | |||
/** Occurs when a Widget stops being dragged by releasing the mouse button. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on press, when the Widget drag begins) to receive this event. | |||
*/ | |||
struct DragEnd : DragBase { | |||
}; | |||
/** Occurs every frame on the dragged Widget. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on press, when the Widget drag begins) to receive this event. | |||
*/ | |||
struct DragMove : DragBase { | |||
/** Change in mouse position since the last frame. Can be zero. */ | |||
@@ -233,7 +255,7 @@ struct DragHover : DragBase, PositionBase { | |||
}; | |||
/** Occurs when the mouse enters a Widget while dragging. | |||
Must set the DragHover target to receive this event. | |||
Must consume the DragHover event to receive this event. | |||
*/ | |||
struct DragEnter : DragBase { | |||
/** The dragged widget */ | |||
@@ -242,7 +264,7 @@ struct DragEnter : DragBase { | |||
/** Occurs when the mouse leaves a Widget while dragging. | |||
Must set the DragHover target to receive this event. | |||
Must consume the DragHover event (when the Widget is entered) to receive this event. | |||
*/ | |||
struct DragLeave : DragBase { | |||
/** The dragged widget */ | |||
@@ -251,7 +273,7 @@ struct DragLeave : DragBase { | |||
/** Occurs when the mouse button is released over a Widget while dragging. | |||
Must set the Button target to receive this event. | |||
Must consume the Button event (on release) to receive this event. | |||
*/ | |||
struct DragDrop : DragBase { | |||
/** The dragged widget */ | |||
@@ -52,8 +52,8 @@ TWidget *createWidget(math::Vec pos) { | |||
template <class TWidget> | |||
TWidget *createWidgetCentered(math::Vec pos) { | |||
TWidget *o = new TWidget; | |||
o->box.pos = pos.minus(o->box.size.div(2));; | |||
TWidget *o = createWidget<TWidget>(pos); | |||
o->box.pos = o->box.pos.minus(o->box.size.div(2)); | |||
return o; | |||
} | |||
@@ -2,14 +2,17 @@ | |||
/** Example usage: | |||
DEBUG("error: %d", errno); | |||
will print something like | |||
[0.123 debug myfile.cpp:45] error: 67 | |||
*/ | |||
#define DEBUG(format, ...) rack::logger::log(rack::logger::DEBUG_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define INFO(format, ...) rack::logger::log(rack::logger::INFO_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define WARN(format, ...) rack::logger::log(rack::logger::WARN_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define FATAL(format, ...) rack::logger::log(rack::logger::FATAL_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define DEBUG(format, ...) logger::log(rack::logger::DEBUG_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define INFO(format, ...) logger::log(rack::logger::INFO_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define WARN(format, ...) logger::log(rack::logger::WARN_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
#define FATAL(format, ...) logger::log(rack::logger::FATAL_LEVEL, __FILE__, __LINE__, format, ##__VA_ARGS__) | |||
namespace rack { | |||
@@ -29,8 +32,8 @@ enum Level { | |||
void init(); | |||
void destroy(); | |||
/** Do not use this function directly. Use the macros below. | |||
Thread-safe. | |||
/** Do not use this function directly. Use the macros above. | |||
Thread-safe, meaning messages cannot overlap each other in the log. | |||
*/ | |||
void log(Level level, const char *filename, int line, const char *format, ...); | |||
@@ -36,7 +36,7 @@ inline int clamp(int x, int a, int b) { | |||
If `b < a`, switches the two values. | |||
*/ | |||
inline int clampSafe(int x, int a, int b) { | |||
return clamp(x, std::min(a, b), std::max(a, b)); | |||
return (a <= b) ? clamp(x, a, b) : clamp(x, b, a); | |||
} | |||
/** Euclidean modulus. Always returns `0 <= mod < b`. | |||
@@ -101,14 +101,14 @@ inline float clamp(float x, float a, float b) { | |||
If `b < a`, switches the two values. | |||
*/ | |||
inline float clampSafe(float x, float a, float b) { | |||
return clamp(x, std::fmin(a, b), std::fmax(a, b)); | |||
return (a <= b) ? clamp(x, a, b) : clamp(x, b, a); | |||
} | |||
/** Returns 1 for positive numbers, -1 for negative numbers, and 0 for zero. | |||
See https://en.wikipedia.org/wiki/Sign_function. | |||
*/ | |||
inline float sgn(float x) { | |||
return x > 0.f ? 1.f : x < 0.f ? -1.f : 0.f; | |||
return x > 0.f ? 1.f : (x < 0.f ? -1.f : 0.f); | |||
} | |||
/** Converts -0.f to 0.f. Leaves all other values unchanged. */ | |||
@@ -119,9 +119,12 @@ inline float normalizeZero(float x) { | |||
/** Euclidean modulus. Always returns `0 <= mod < b`. | |||
See https://en.wikipedia.org/wiki/Euclidean_division. | |||
*/ | |||
inline float eucMod(float a, float base) { | |||
float mod = std::fmod(a, base); | |||
return (mod >= 0.f) ? mod : mod + base; | |||
inline float eucMod(float a, float b) { | |||
float mod = std::fmod(a, b); | |||
if (mod < 0.f) { | |||
mod += b; | |||
} | |||
return mod; | |||
} | |||
/** Returns whether `a` is within epsilon distance from `b`. */ | |||
@@ -131,7 +134,7 @@ inline bool isNear(float a, float b, float epsilon = 1e-6f) { | |||
/** If the magnitude of `x` if less than epsilon, return 0. */ | |||
inline float chop(float x, float epsilon = 1e-6f) { | |||
return isNear(x, 0.f, epsilon) ? 0.f : x; | |||
return std::fabs(x) <= epsilon ? 0.f : x; | |||
} | |||
inline float rescale(float x, float xMin, float xMax, float yMin, float yMax) { | |||
@@ -155,9 +158,9 @@ inline float interpolateLinear(const float *p, float x) { | |||
Arguments may be the same pointers. | |||
Example: | |||
cmultf(&ar, &ai, ar, ai, br, bi); | |||
cmultf(ar, ai, br, bi, &ar, &ai); | |||
*/ | |||
inline void complexMult(float *cr, float *ci, float ar, float ai, float br, float bi) { | |||
inline void complexMult(float ar, float ai, float br, float bi, float *cr, float *ci) { | |||
*cr = ar * br - ai * bi; | |||
*ci = ar * bi + ai * br; | |||
} | |||
@@ -202,6 +205,9 @@ struct Vec { | |||
float dot(Vec b) const { | |||
return x * b.x + y * b.y; | |||
} | |||
float arg() const { | |||
return std::atan2(y, x); | |||
} | |||
float norm() const { | |||
return std::hypot(x, y); | |||
} | |||
@@ -229,6 +235,9 @@ struct Vec { | |||
Vec max(Vec b) const { | |||
return Vec(std::fmax(x, b.x), std::fmax(y, b.y)); | |||
} | |||
Vec abs() const { | |||
return Vec(std::fabs(x), std::fabs(y)); | |||
} | |||
Vec round() const { | |||
return Vec(std::round(x), std::round(y)); | |||
} | |||
@@ -323,7 +332,7 @@ struct Rect { | |||
r.pos.y = math::clampSafe(pos.y, bound.pos.y, bound.pos.y + bound.size.y - size.y); | |||
return r; | |||
} | |||
/** Expands this Rect to contain `b`. */ | |||
/** Returns the bounding box of the union of `this` and `b`. */ | |||
Rect expand(Rect b) const { | |||
Rect r; | |||
r.pos.x = std::fmin(pos.x, b.pos.x); | |||
@@ -12,10 +12,10 @@ namespace network { | |||
enum Method { | |||
GET, | |||
POST, | |||
PUT, | |||
DELETE, | |||
METHOD_GET, | |||
METHOD_POST, | |||
METHOD_PUT, | |||
METHOD_DELETE, | |||
}; | |||
/** Requests a JSON API URL over HTTP(S), using the data as the query (GET) or the body (POST, etc) | |||
@@ -18,8 +18,8 @@ void init(); | |||
void destroy(); | |||
void logIn(const std::string &email, const std::string &password); | |||
void logOut(); | |||
void query(); | |||
void sync(); | |||
void queryUpdates(); | |||
void syncUpdates(); | |||
void cancelDownload(); | |||
bool isLoggedIn(); | |||
Plugin *getPlugin(const std::string &pluginSlug); | |||
@@ -29,10 +29,18 @@ std::string normalizeTag(const std::string &tag); | |||
bool isSlugValid(const std::string &slug); | |||
struct Update { | |||
std::string pluginSlug; | |||
std::string version; | |||
std::string changelogUrl; | |||
}; | |||
extern const std::set<std::string> allowedTags; | |||
extern std::vector<Plugin*> plugins; | |||
extern std::string loginStatus; | |||
extern std::vector<Update> updates; | |||
extern float downloadProgress; | |||
extern std::string downloadName; | |||
@@ -25,7 +25,7 @@ struct Model { | |||
Plugin *plugin = NULL; | |||
std::vector<std::string> presetPaths; | |||
/** Must be unique. Used for saving patches. Never change this. | |||
/** Must be unique. Used for saving patches. Never change this after releasing your module. | |||
The model slug must be unique within your plugin, but it doesn't need to be unique among different plugins. | |||
*/ | |||
std::string slug; | |||
@@ -15,12 +15,12 @@ struct Model; | |||
struct Plugin { | |||
/** A list of the models available by this plugin, add with addModel() */ | |||
std::vector<Model*> models; | |||
/** The file path of the plugin's directory */ | |||
/** The file path to the plugin's directory */ | |||
std::string path; | |||
/** OS-dependent library handle */ | |||
void *handle = NULL; | |||
/** Must be unique. Used for saving patches. Never change this. | |||
/** Must be unique. Used for saving patches. Never change this after releasing your plugin. | |||
To guarantee uniqueness, it is a good idea to prefix the slug by your "company name" if available, e.g. "MyCompany-MyPlugin" | |||
*/ | |||
std::string slug; | |||
@@ -84,7 +84,6 @@ | |||
#include "dsp/fft.hpp" | |||
#include "dsp/filter.hpp" | |||
#include "dsp/fir.hpp" | |||
#include "dsp/frame.hpp" | |||
#include "dsp/minblep.hpp" | |||
#include "dsp/ode.hpp" | |||
#include "dsp/resampler.hpp" | |||
@@ -102,6 +101,7 @@ namespace rack { | |||
/** Define this macro before including this header to prevent common namespaces from being included in the main `rack::` namespace. */ | |||
#ifndef RACK_FLATTEN_NAMESPACES | |||
// Import some namespaces for convenience | |||
using namespace logger; | |||
using namespace math; | |||
using namespace widget; | |||
using namespace ui; | |||
@@ -44,7 +44,8 @@ DEPRECATED inline float chopf(float x, float eps) {return chop(x, eps);} | |||
DEPRECATED inline float rescalef(float x, float a, float b, float yMin, float yMax) {return math::rescale(x, a, b, yMin, yMax);} | |||
DEPRECATED inline float crossf(float a, float b, float frac) {return crossfade(a, b, frac);} | |||
DEPRECATED inline float interpf(const float *p, float x) {return interpolateLinear(p, x);} | |||
DEPRECATED inline void cmultf(float *cr, float *ci, float ar, float ai, float br, float bi) {return complexMult(cr, ci, ar, ai, br, bi);} | |||
DEPRECATED inline void complexMult(float *cr, float *ci, float ar, float ai, float br, float bi) {complexMult(ar, ai, br, bi, cr, ci);} | |||
DEPRECATED inline void cmultf(float *cr, float *ci, float ar, float ai, float br, float bi) {return complexMult(ar, ai, br, bi, cr, ci);} | |||
//////////////////// | |||
// random | |||
@@ -11,7 +11,9 @@ namespace rack { | |||
namespace random { | |||
/** Seeds the RNG with the current time */ | |||
/** Initializes the thread-local RNG state. | |||
Must call per-thread, otherwise the RNG will always return 0. | |||
*/ | |||
void init(); | |||
/** Returns a uniform random uint32_t from 0 to UINT32_MAX */ | |||
uint32_t u32(); | |||
@@ -45,7 +45,7 @@ This derived source file is released under the zlib license. | |||
*/ | |||
#include <emmintrin.h> | |||
#include <x86intrin.h> | |||
/** Generate 1.f without accessing memory */ | |||
@@ -1,6 +1,6 @@ | |||
#pragma once | |||
#include <cstring> | |||
#include <emmintrin.h> | |||
#include <x86intrin.h> | |||
namespace rack { | |||
@@ -13,14 +13,15 @@ namespace string { | |||
/** Converts a UTF-16/32 string (depending on the size of wchar_t) to a UTF-8 string. */ | |||
std::string fromWstring(const std::wstring &s); | |||
std::wstring toWstring(const std::string &s); | |||
/** Converts a `printf()` format string and optional arguments into a std::string | |||
Remember that "%s" must reference a `char *`, so use `.c_str()` for `std::string`s. | |||
/** Converts a `printf()` format string and optional arguments into a std::string. | |||
Remember that "%s" must reference a `char *`, so use `.c_str()` for `std::string`s, otherwise you might get binary garbage. | |||
*/ | |||
std::string f(const char *format, ...); | |||
/** Replaces all characters to lowercase letters */ | |||
std::string lowercase(const std::string &s); | |||
/** Replaces all characters to uppercase letters */ | |||
std::string uppercase(const std::string &s); | |||
/** Removes whitespace from beginning and end of string. */ | |||
std::string trim(const std::string &s); | |||
/** Truncates and adds "..." to a string, not exceeding `len` characters */ | |||
std::string ellipsize(const std::string &s, size_t len); | |||
@@ -12,11 +12,13 @@ namespace system { | |||
/** Returns a list of all entries (directories, files, symbols) in a directory. */ | |||
std::list<std::string> listEntries(const std::string &path); | |||
std::list<std::string> getEntries(const std::string &path); | |||
/** Returns whether the given path is a file. */ | |||
bool isFile(const std::string &path); | |||
/** Returns whether the given path is a directory. */ | |||
bool isDirectory(const std::string &path); | |||
/** Moves a file. */ | |||
void moveFile(const std::string &srcPath, const std::string &destPath); | |||
/** Copies a file. */ | |||
void copyFile(const std::string &srcPath, const std::string &destPath); | |||
/** Creates a directory. | |||
@@ -36,12 +38,12 @@ Shell injection is possible, so make sure the URL is trusted or hard coded. | |||
May block, so open in a new thread. | |||
*/ | |||
void openBrowser(const std::string &url); | |||
/** Opens Explorer, Finder, etc at the folder location. */ | |||
/** Opens Windows Explorer, Finder, etc at the folder location. */ | |||
void openFolder(const std::string &path); | |||
/** Runs an executable without blocking. | |||
The launched process will continue running if the current process is closed. | |||
*/ | |||
void runProcessAsync(const std::string &path); | |||
void runProcessDetached(const std::string &path); | |||
std::string getOperatingSystemInfo(); | |||
@@ -10,14 +10,11 @@ namespace ui { | |||
struct Button : widget::OpaqueWidget { | |||
std::string text; | |||
BNDwidgetState state = BND_DEFAULT; | |||
/** Not owned. Tracks the pressed state of the button.*/ | |||
Quantity *quantity = NULL; | |||
Button(); | |||
void draw(const DrawArgs &args) override; | |||
void onEnter(const event::Enter &e) override; | |||
void onLeave(const event::Leave &e) override; | |||
void onDragStart(const event::DragStart &e) override; | |||
void onDragEnd(const event::DragEnd &e) override; | |||
void onDragDrop(const event::DragDrop &e) override; | |||
@@ -2,6 +2,8 @@ | |||
#include "ui/common.hpp" | |||
#include "widget/OpaqueWidget.hpp" | |||
#include "Quantity.hpp" | |||
#include "app.hpp" | |||
#include "event.hpp" | |||
namespace rack { | |||
@@ -9,14 +11,11 @@ namespace ui { | |||
struct RadioButton : widget::OpaqueWidget { | |||
BNDwidgetState state = BND_DEFAULT; | |||
/** Not owned. */ | |||
Quantity *quantity = NULL; | |||
RadioButton(); | |||
void draw(const DrawArgs &args) override; | |||
void onEnter(const event::Enter &e) override; | |||
void onLeave(const event::Leave &e) override; | |||
void onDragDrop(const event::DragDrop &e) override; | |||
}; | |||
@@ -14,7 +14,6 @@ struct ScrollBar : widget::OpaqueWidget { | |||
HORIZONTAL | |||
}; | |||
Orientation orientation; | |||
BNDwidgetState state = BND_DEFAULT; | |||
float offset = 0.0; | |||
float size = 0.0; | |||
@@ -10,7 +10,6 @@ namespace ui { | |||
struct Slider : widget::OpaqueWidget { | |||
BNDwidgetState state = BND_DEFAULT; | |||
/** Not owned. */ | |||
Quantity *quantity = NULL; | |||
@@ -21,7 +21,7 @@ struct TextField : widget::OpaqueWidget { | |||
TextField(); | |||
void draw(const DrawArgs &args) override; | |||
void onHover(const event::Hover &e) override; | |||
void onDragHover(const event::DragHover &e) override; | |||
void onButton(const event::Button &e) override; | |||
void onSelectText(const event::SelectText &e) override; | |||
void onSelectKey(const event::SelectKey &e) override; | |||
@@ -71,6 +71,7 @@ struct Widget { | |||
Gives ownership of widget to this widget instance. | |||
*/ | |||
void addChild(Widget *child); | |||
void addChildBottom(Widget *child); | |||
/** Removes widget from list of children if it exists. | |||
Does not delete widget but transfers ownership to caller | |||
*/ | |||
@@ -14,27 +14,6 @@ | |||
#include <nanosvg.h> | |||
/** Remaps Ctrl to Cmd on Mac | |||
Use this instead of GLFW_MOD_CONTROL, since Cmd should be used on Mac in place of Ctrl on Linux/Windows. | |||
*/ | |||
#if defined ARCH_MAC | |||
#define RACK_MOD_CTRL GLFW_MOD_SUPER | |||
#define RACK_MOD_CTRL_NAME "Cmd" | |||
#else | |||
#define RACK_MOD_CTRL GLFW_MOD_CONTROL | |||
#define RACK_MOD_CTRL_NAME "Ctrl" | |||
#endif | |||
#define RACK_MOD_SHIFT_NAME "Shift" | |||
#define RACK_MOD_ALT_NAME "Alt" | |||
/** Filters actual mod keys from the mod flags. | |||
Use this if you don't care about GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK. | |||
Example usage: | |||
if ((e.mod & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT)) ... | |||
*/ | |||
#define RACK_MOD_MASK (GLFW_MOD_SHIFT | GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER) | |||
namespace rack { | |||
@@ -98,6 +77,8 @@ struct Window { | |||
Window(); | |||
~Window(); | |||
void run(); | |||
/** Takes a screenshot of each module */ | |||
void screenshot(float zoom); | |||
void close(); | |||
void cursorLock(); | |||
void cursorUnlock(); | |||
@@ -23,6 +23,8 @@ ifdef ARCH_LIN | |||
LDFLAGS += -shared | |||
TARGET := plugin.so | |||
RACK_USER_DIR ?= $(HOME)/.Rack | |||
# Link to glibc 2.23 | |||
# FLAGS += -include $(RACK_DIR)/include/force_link_glibc_2.23.h | |||
endif | |||
ifdef ARCH_MAC | |||
@@ -62,7 +64,7 @@ endif | |||
@# Copy distributables | |||
cp -R $(DISTRIBUTABLES) dist/$(SLUG)/ | |||
@# Create ZIP package | |||
cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG) | |||
cd dist && zip -q -9 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG) | |||
install: dist | |||
cp dist/$(SLUG)-$(VERSION)-$(ARCH).zip $(RACK_USER_DIR)/plugins/ | |||
@@ -0,0 +1,852 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
<!-- Created with Inkscape (http://www.inkscape.org/) --> | |||
<svg | |||
xmlns:dc="http://purl.org/dc/elements/1.1/" | |||
xmlns:cc="http://creativecommons.org/ns#" | |||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |||
xmlns:svg="http://www.w3.org/2000/svg" | |||
xmlns="http://www.w3.org/2000/svg" | |||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |||
width="96.520546mm" | |||
height="128.50067mm" | |||
viewBox="0 0 96.520546 128.50067" | |||
version="1.1" | |||
id="svg27062" | |||
inkscape:version="0.92.4 5da689c313, 2019-01-14" | |||
sodipodi:docname="AudioInterface16.svg"> | |||
<defs | |||
id="defs27056" /> | |||
<sodipodi:namedview | |||
id="base" | |||
pagecolor="#ffffff" | |||
bordercolor="#666666" | |||
borderopacity="1.0" | |||
inkscape:pageopacity="0.0" | |||
inkscape:pageshadow="2" | |||
inkscape:zoom="0.98994949" | |||
inkscape:cx="183.77486" | |||
inkscape:cy="265.37716" | |||
inkscape:document-units="mm" | |||
inkscape:current-layer="layer2" | |||
showgrid="false" | |||
fit-margin-top="0" | |||
fit-margin-left="0" | |||
fit-margin-right="0" | |||
fit-margin-bottom="0" | |||
inkscape:snap-bbox="true" | |||
inkscape:bbox-nodes="false" | |||
inkscape:snap-nodes="false" | |||
inkscape:snap-others="false" | |||
inkscape:snap-bbox-midpoints="true" | |||
inkscape:window-width="1600" | |||
inkscape:window-height="882" | |||
inkscape:window-x="0" | |||
inkscape:window-y="18" | |||
inkscape:window-maximized="0" /> | |||
<metadata | |||
id="metadata27059"> | |||
<rdf:RDF> | |||
<cc:Work | |||
rdf:about=""> | |||
<dc:format>image/svg+xml</dc:format> | |||
<dc:type | |||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |||
<dc:title></dc:title> | |||
</cc:Work> | |||
</rdf:RDF> | |||
</metadata> | |||
<g | |||
inkscape:label="Layer 1" | |||
inkscape:groupmode="layer" | |||
id="layer1" | |||
transform="translate(0.635274,-93.654422)"> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path10950" | |||
d="M -0.54156917,93.74813 H 95.791569 V 222.0614 H -0.54156917 Z m 0,0" | |||
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path10952" | |||
d="M 95.885274,93.654422 H -0.635274 V 222.1551 H 95.885274 Z M 95.697861,221.96769 H -0.44786081 V 93.841835 H 95.697861 Z m 0,0" | |||
style="fill:#ababab;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13768" | |||
d="m 44.871678,218.01134 c -0.115752,0 -0.223239,-0.0661 -0.275606,-0.1695 l -1.001834,-2.00504 c -0.07579,-0.15296 -0.01516,-0.33762 0.137803,-0.41479 0.151585,-0.0758 0.337619,-0.0138 0.413414,0.13918 l 0.726223,1.45245 0.727604,-1.45245 c 0.0758,-0.15296 0.260451,-0.21497 0.413414,-0.13918 0.152961,0.0772 0.213596,0.26183 0.137803,0.41479 l -1.001834,2.00504 c -0.05237,0.10336 -0.159853,0.1695 -0.276987,0.1695" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13770" | |||
d="m 50.378321,218.01134 c -0.117133,0 -0.22462,-0.0661 -0.275608,-0.1695 l -1.00321,-2.00504 c -0.07579,-0.15296 -0.01378,-0.33762 0.1378,-0.41479 0.152966,-0.0758 0.337619,-0.0138 0.413414,0.13918 l 0.727604,1.45245 0.726226,-1.45245 c 0.07579,-0.15296 0.261827,-0.21497 0.413412,-0.13918 0.152961,0.0772 0.214974,0.26183 0.137803,0.41479 l -1.001832,2.00504 c -0.05237,0.10336 -0.159856,0.1695 -0.275609,0.1695" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13772" | |||
d="m 47.775205,218.01134 c -0.723469,0 -1.311891,-0.58705 -1.311891,-1.31051 0,-0.72209 0.588422,-1.31052 1.311891,-1.31052 0.285253,0 0.558107,0.091 0.78686,0.26183 0.135049,0.10197 0.162611,0.29628 0.06063,0.4327 -0.101973,0.13505 -0.294896,0.16261 -0.431323,0.0606 -0.121267,-0.091 -0.264584,-0.13919 -0.416169,-0.13919 -0.383095,0 -0.694531,0.31145 -0.694531,0.69454 0,0.38309 0.311436,0.69453 0.694531,0.69453 0.151585,0 0.294902,-0.0482 0.416169,-0.13918 0.136427,-0.10198 0.32935,-0.0744 0.431323,0.062 0.101979,0.13505 0.07442,0.32935 -0.06063,0.43132 -0.228753,0.17088 -0.501607,0.26183 -0.78686,0.26183" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13774" | |||
d="m 48.195509,216.68567 c 0,0.22186 -0.179147,0.40101 -0.40101,0.40101 -0.220486,0 -0.401008,-0.17915 -0.401008,-0.40101 0,-0.22186 0.180522,-0.40101 0.401008,-0.40101 0.221863,0 0.40101,0.17915 0.40101,0.40101" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 37.205321,102.93888 c 0,0.17088 0.126777,0.30868 0.297656,0.30868 0.137803,0 0.248044,-0.0772 0.303167,-0.20395 l 0.203952,-0.49058 h 1.306377 l 0.198438,0.46853 c 0.06063,0.1323 0.159853,0.226 0.314195,0.226 0.170873,0 0.308679,-0.14332 0.308679,-0.31419 0,-0.0441 -0.01101,-0.0882 -0.03305,-0.13229 l -1.03629,-2.33164 c -0.07166,-0.15985 -0.198438,-0.25907 -0.374825,-0.25907 h -0.03859 c -0.176389,0 -0.308681,0.0992 -0.380338,0.25907 l -1.030774,2.33164 c -0.02204,0.0441 -0.03858,0.0937 -0.03858,0.1378 z m 1.047308,-0.95911 0.413411,-0.97565 0.407898,0.97565 z m 0,0" | |||
id="path26281" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.794013,103.2641 c 0.79375,0 1.300869,-0.43546 1.300869,-1.33394 v -1.37253 c 0,-0.1819 -0.148825,-0.32522 -0.330729,-0.32522 -0.181899,0 -0.325215,0.14332 -0.325215,0.32522 v 1.39458 c 0,0.47404 -0.242536,0.71106 -0.639411,0.71106 -0.396875,0 -0.639408,-0.24804 -0.639408,-0.7276 v -1.37804 c 0,-0.1819 -0.143317,-0.32522 -0.32522,-0.32522 -0.181899,0 -0.325216,0.14332 -0.325216,0.32522 v 1.39458 c 0,0.87092 0.485071,1.31189 1.28433,1.31189 z m 0,0" | |||
id="path26277" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 43.823195,102.89478 c 0,0.18191 0.143317,0.32522 0.325218,0.32522 h 0.826823 c 0.931553,0 1.576478,-0.65043 1.576478,-1.48277 v -0.005 c 0,-0.83785 -0.644925,-1.47726 -1.576478,-1.47726 h -0.826823 c -0.181901,0 -0.325218,0.14883 -0.325218,0.33073 z m 0.650433,-0.26458 v -1.78594 h 0.501608 c 0.534678,0 0.892969,0.36932 0.892969,0.89297 v 0.011 c 0,0.52365 -0.358291,0.88194 -0.892969,0.88194 z m 0,0" | |||
id="path26265" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 47.169688,102.91683 c 0,0.1819 0.143316,0.33073 0.325215,0.33073 0.181904,0 0.325218,-0.14883 0.325218,-0.33073 v -2.3592 c 0,-0.1819 -0.143314,-0.32522 -0.325218,-0.32522 -0.181899,0 -0.325215,0.14332 -0.325215,0.32522 z m 0,0" | |||
id="path26269" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 50.011665,103.26961 c 0.915019,0 1.576477,-0.68902 1.576477,-1.53238 v -0.005 c 0,-0.84336 -0.65595,-1.52687 -1.570966,-1.52687 -0.915017,0 -1.576475,0.68902 -1.576475,1.53238 v 0.011 c 0,0.84336 0.655947,1.52135 1.570964,1.52135 z m 0.0055,-0.60082 c -0.523653,0 -0.898478,-0.42444 -0.898478,-0.93156 v -0.005 c 0,-0.50712 0.363803,-0.92604 0.892969,-0.92604 0.523653,0 0.892969,0.42443 0.892969,0.93155 v 0.011 c 0,0.50712 -0.363802,0.92053 -0.88746,0.92053 z m 0,0" | |||
id="path26273" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 52.464498,102.21679 h 0.733112 c 0.170879,0 0.314196,-0.13781 0.314196,-0.30868 0,-0.17088 -0.143317,-0.30868 -0.314196,-0.30868 h -0.733112 c -0.170879,0 -0.308682,0.1378 -0.308682,0.30868 0,0.17087 0.137803,0.30868 0.308682,0.30868 z m 0,0" | |||
id="path26261" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 54.329262,102.92235 c 0,0.17638 0.143317,0.32521 0.319704,0.32521 0.17639,0 0.319707,-0.14883 0.319707,-0.32521 v -2.38677 c 0,-0.17639 -0.143317,-0.3197 -0.319707,-0.3197 h -0.0055 c -0.09371,0 -0.181901,0.022 -0.308679,0.0551 l -0.418925,0.12127 c -0.132292,0.0386 -0.214974,0.14883 -0.214974,0.28112 0,0.14882 0.132292,0.27561 0.28112,0.27561 0.03858,0 0.08268,-0.005 0.115755,-0.0165 l 0.23151,-0.0551 z m 0,0" | |||
id="path26257" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 56.831832,103.26961 c 0.644924,0 1.129993,-0.41892 1.129993,-1.02526 v -0.005 c 0,-0.61736 -0.451996,-0.94258 -1.041797,-0.94258 -0.292142,0 -0.463021,0.0882 -0.611849,0.18741 0.0441,-0.39136 0.23151,-0.6835 0.595313,-0.6835 0.181901,0 0.303167,0.0386 0.440973,0.11575 0.0441,0.0275 0.10473,0.0496 0.15985,0.0496 0.165365,0 0.308682,-0.13229 0.308682,-0.30317 0,-0.13229 -0.07166,-0.22048 -0.170876,-0.28112 -0.17639,-0.10473 -0.418923,-0.17639 -0.716579,-0.17639 -0.881946,0 -1.300869,0.70556 -1.300869,1.62058 v 0.005 c 0,0.58979 0.137803,0.90399 0.352777,1.12448 0.209463,0.20394 0.468532,0.31419 0.854382,0.31419 z m -0.02204,-0.55673 c -0.325215,0 -0.518142,-0.19292 -0.518142,-0.44097 v -0.011 c 0,-0.24804 0.187413,-0.42443 0.507117,-0.42443 0.32522,0 0.518144,0.1819 0.518144,0.42994 v 0.011 c 0,0.25356 -0.187415,0.43546 -0.507119,0.43546 z m 0,0" | |||
id="path26253" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.650508,177.72002 c 0.606335,0 1.036283,-0.46303 1.036283,-1.01975 v -0.005 c 0,-0.55673 -0.424436,-1.01975 -1.030774,-1.01975 -0.606335,0 -1.036283,0.46853 -1.036283,1.02526 v 0.006 c 0,0.55672 0.424437,1.01423 1.030774,1.01423 z m 0.0055,-0.31971 c -0.391361,0 -0.672484,-0.3197 -0.672484,-0.70004 v -0.005 c 0,-0.38585 0.275609,-0.70005 0.666972,-0.70005 0.391362,0 0.672484,0.31971 0.672484,0.70556 v 0.006 c 0,0.38033 -0.275609,0.69453 -0.666972,0.69453 z m 0,0" | |||
id="path26249" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 43.986525,177.72002 c 0.518142,0 0.848871,-0.29766 0.848871,-0.88746 v -0.96463 c 0,-0.0937 -0.07717,-0.17088 -0.170876,-0.17088 -0.09922,0 -0.176387,0.0772 -0.176387,0.17088 v 0.98117 c 0,0.3638 -0.187415,0.5457 -0.496094,0.5457 -0.308681,0 -0.501608,-0.19293 -0.501608,-0.56224 v -0.96463 c 0,-0.0937 -0.07166,-0.17088 -0.170875,-0.17088 -0.09922,0 -0.17639,0.0772 -0.17639,0.17088 v 0.98117 c 0,0.57326 0.330729,0.87092 0.843359,0.87092 z m 0,0" | |||
id="path26241" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 45.856997,177.52709 c 0,0.0992 0.07717,0.17639 0.17639,0.17639 0.0937,0 0.17639,-0.0772 0.17639,-0.17639 v -1.49379 h 0.479554 c 0.08819,0 0.159854,-0.0717 0.159854,-0.15986 0,-0.0882 -0.07166,-0.15985 -0.159854,-0.15985 H 45.37744 c -0.0882,0 -0.159851,0.0717 -0.159851,0.15985 0,0.0882 0.07165,0.15986 0.159851,0.15986 h 0.479557 z m 0,0" | |||
id="path26245" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 47.244758,177.52709 c 0,0.0992 0.07717,0.17639 0.17639,0.17639 0.0937,0 0.170875,-0.0772 0.170875,-0.17639 v -0.47405 h 0.391364 c 0.435459,0 0.79375,-0.23151 0.79375,-0.67799 v -0.005 c 0,-0.39687 -0.292145,-0.65594 -0.755166,-0.65594 h -0.600823 c -0.09922,0 -0.17639,0.0717 -0.17639,0.17087 z m 0.347265,-0.78824 v -0.71107 h 0.402389 c 0.25907,0 0.429948,0.12127 0.429948,0.35278 v 0.005 c 0,0.20395 -0.165364,0.35278 -0.429948,0.35278 z m 0,0" | |||
id="path26237" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 49.997583,177.72002 c 0.518142,0 0.848871,-0.29766 0.848871,-0.88746 v -0.96463 c 0,-0.0937 -0.07717,-0.17088 -0.170876,-0.17088 -0.09922,0 -0.176387,0.0772 -0.176387,0.17088 v 0.98117 c 0,0.3638 -0.187415,0.5457 -0.496094,0.5457 -0.308681,0 -0.501607,-0.19293 -0.501607,-0.56224 v -0.96463 c 0,-0.0937 -0.07166,-0.17088 -0.170876,-0.17088 -0.09922,0 -0.17639,0.0772 -0.17639,0.17088 v 0.98117 c 0,0.57326 0.330729,0.87092 0.843359,0.87092 z m 0,0" | |||
id="path26233" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 51.866645,177.52709 c 0,0.0992 0.07717,0.17639 0.17639,0.17639 0.0937,0 0.176387,-0.0772 0.176387,-0.17639 v -1.49379 h 0.479555 c 0.0882,0 0.159856,-0.0717 0.159856,-0.15986 0,-0.0882 -0.07166,-0.15985 -0.159856,-0.15985 h -1.311892 c -0.08819,0 -0.159851,0.0717 -0.159851,0.15985 0,0.0882 0.07166,0.15986 0.159851,0.15986 h 0.47956 z m 0,0" | |||
id="path26229" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 53.937073,177.7145 c 0.413409,0 0.705554,-0.22048 0.705554,-0.5898 v -0.005 c 0,-0.32521 -0.214974,-0.47404 -0.633899,-0.57877 -0.380336,-0.0882 -0.474044,-0.15985 -0.474044,-0.30868 v -0.006 c 0,-0.13229 0.121267,-0.23702 0.325218,-0.23702 0.15434,0 0.297656,0.0551 0.451996,0.14883 0.02755,0.0165 0.05512,0.0275 0.0937,0.0275 0.0882,0 0.159856,-0.0717 0.159856,-0.15986 0,-0.0661 -0.03306,-0.11575 -0.07717,-0.1378 -0.17639,-0.12127 -0.374828,-0.18741 -0.622875,-0.18741 -0.391361,0 -0.677994,0.23702 -0.677994,0.57326 v 0.005 c 0,0.3638 0.237021,0.49059 0.661458,0.5898 0.363802,0.0882 0.446484,0.16537 0.446484,0.30317 v 0.006 c 0,0.14883 -0.137803,0.24805 -0.352779,0.24805 -0.214972,0 -0.391361,-0.0717 -0.551215,-0.20395 -0.02204,-0.0165 -0.05512,-0.0276 -0.10473,-0.0276 -0.08819,0 -0.159853,0.0717 -0.159853,0.15985 0,0.0551 0.02755,0.10473 0.06615,0.13229 0.220485,0.16537 0.474046,0.24805 0.744143,0.24805 z m 0,0" | |||
id="path26225" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 42.361216,142.413 c 0,0.0992 0.07166,0.17639 0.170879,0.17639 0.09922,0 0.17639,-0.0772 0.17639,-0.17639 v -1.65916 c 0,-0.0937 -0.07717,-0.17088 -0.17639,-0.17088 -0.09922,0 -0.170879,0.0772 -0.170879,0.17088 z m 0,0" | |||
id="path26221" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 43.302958,142.41851 c 0,0.0937 0.07717,0.17088 0.170874,0.17088 0.09371,0 0.170878,-0.0772 0.170878,-0.17088 v -1.25126 l 1.014238,1.31189 c 0.04961,0.0606 0.09922,0.10474 0.181898,0.10474 h 0.01654 c 0.0937,0 0.165364,-0.0772 0.165364,-0.17088 v -1.65916 c 0,-0.0937 -0.07166,-0.17088 -0.170878,-0.17088 -0.0937,0 -0.170873,0.0772 -0.170873,0.17088 v 1.21268 L 43.69432,140.6877 c -0.0441,-0.0606 -0.0937,-0.0992 -0.181899,-0.0992 h -0.03305 c -0.09922,0 -0.17639,0.0772 -0.17639,0.17087 z m 0,0" | |||
id="path26217" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 45.614647,142.413 c 0,0.0992 0.07717,0.17639 0.176389,0.17639 0.0937,0 0.170874,-0.0772 0.170874,-0.17639 v -0.47405 h 0.391366 c 0.435457,0 0.79375,-0.23151 0.79375,-0.67799 v -0.006 c 0,-0.39688 -0.292148,-0.65595 -0.755168,-0.65595 h -0.600822 c -0.09922,0 -0.176389,0.0717 -0.176389,0.17088 z m 0.347263,-0.78824 v -0.71107 h 0.402389 c 0.259069,0 0.429948,0.12127 0.429948,0.35278 v 0.006 c 0,0.20395 -0.165365,0.35278 -0.429948,0.35278 z m 0,0" | |||
id="path26205" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 48.36662,142.60593 c 0.518142,0 0.848871,-0.29766 0.848871,-0.88746 v -0.96463 c 0,-0.0937 -0.07717,-0.17088 -0.170873,-0.17088 -0.09922,0 -0.17639,0.0772 -0.17639,0.17088 v 0.98116 c 0,0.36381 -0.187412,0.54571 -0.496094,0.54571 -0.308681,0 -0.501607,-0.19293 -0.501607,-0.56224 v -0.96463 c 0,-0.0937 -0.07166,-0.17088 -0.170876,-0.17088 -0.09922,0 -0.176387,0.0772 -0.176387,0.17088 v 0.98116 c 0,0.57327 0.330729,0.87093 0.843356,0.87093 z m 0,0" | |||
id="path26209" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 50.234272,142.413 c 0,0.0992 0.07717,0.17639 0.176389,0.17639 0.09371,0 0.176388,-0.0772 0.176388,-0.17639 v -1.49379 h 0.47956 c 0.08819,0 0.15985,-0.0717 0.15985,-0.15986 0,-0.0882 -0.07166,-0.15985 -0.15985,-0.15985 h -1.311892 c -0.0882,0 -0.159856,0.0717 -0.159856,0.15985 0,0.0882 0.07166,0.15986 0.159856,0.15986 h 0.479555 z m 0,0" | |||
id="path26213" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 52.305271,142.60041 c 0.413409,0 0.705554,-0.22049 0.705554,-0.5898 v -0.006 c 0,-0.32521 -0.214974,-0.47404 -0.633899,-0.57877 -0.380336,-0.0882 -0.474044,-0.15986 -0.474044,-0.30868 v -0.006 c 0,-0.13229 0.121267,-0.23702 0.325218,-0.23702 0.15434,0 0.297657,0.0551 0.451996,0.14882 0.02755,0.0165 0.05512,0.0276 0.0937,0.0276 0.0882,0 0.159856,-0.0717 0.159856,-0.15985 0,-0.0661 -0.03306,-0.11576 -0.07717,-0.1378 -0.17639,-0.12127 -0.374828,-0.18742 -0.622874,-0.18742 -0.391362,0 -0.677993,0.23702 -0.677993,0.57327 v 0.005 c 0,0.3638 0.237019,0.49058 0.661459,0.5898 0.363799,0.0882 0.446481,0.16536 0.446481,0.30316 v 0.005 c 0,0.14883 -0.137802,0.24805 -0.352779,0.24805 -0.214971,0 -0.391359,-0.0717 -0.551214,-0.20395 -0.02204,-0.0165 -0.05512,-0.0276 -0.104728,-0.0276 -0.0882,0 -0.159856,0.0717 -0.159856,0.15986 0,0.0551 0.02755,0.10473 0.06615,0.13229 0.220488,0.16536 0.474046,0.24804 0.744143,0.24804 z m 0,0" | |||
id="path26201" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path26159" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path26171" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path26099" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path26123" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path26031" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path26059" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path25959" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffd714;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="" | |||
id="path25979" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13990" | |||
d="M 76.625814,167.90588 H 88.224761" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13992" | |||
d="M 53.425163,167.90588 H 65.025488" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13994" | |||
d="M 76.625814,153.29178 H 88.224761" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path13996" | |||
d="M 53.425163,153.29178 H 65.025488" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 52.651748,162.03382 c 0,0.0772 0.06615,0.1378 0.137801,0.1378 0.08268,0 0.143317,-0.0606 0.143317,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143317,-0.13781 -0.0441,0 -0.08268,0.011 -0.137801,0.0275 l -0.242535,0.0772 c -0.06063,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06063,0.11576 0.126778,0.11576 0.01101,0 0.03305,0 0.04961,-0.006 l 0.165364,-0.0496 z m 0,0" | |||
id="path25923" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 53.899656,162.18816 c 0.336243,0 0.562239,-0.21497 0.562239,-0.50712 v -0.005 c 0,-0.29765 -0.225996,-0.41892 -0.468529,-0.452 l 0.374825,-0.39136 c 0.04961,-0.0496 0.08268,-0.0882 0.08268,-0.15434 0,-0.0717 -0.06063,-0.12126 -0.143317,-0.12126 h -0.821309 c -0.06615,0 -0.121267,0.0551 -0.121267,0.12126 0,0.0661 0.05512,0.12127 0.121267,0.12127 h 0.584287 l -0.374824,0.40239 c -0.0441,0.0441 -0.06064,0.0772 -0.06064,0.11575 0,0.0661 0.05512,0.12127 0.12127,0.12127 h 0.06063 c 0.220485,0 0.369313,0.0882 0.369313,0.24805 v 0.006 c 0,0.14331 -0.121269,0.24253 -0.281119,0.24253 -0.148828,0 -0.264584,-0.0551 -0.363802,-0.15434 -0.02204,-0.022 -0.05512,-0.0386 -0.09371,-0.0386 -0.07166,0 -0.137803,0.0661 -0.137803,0.13781 0,0.0386 0.02204,0.0772 0.04961,0.0992 0.12678,0.12677 0.308678,0.20946 0.540189,0.20946 z m 0,0" | |||
id="path25927" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 65.044919,147.18011 c 0.336241,0 0.595313,-0.226 0.595313,-0.54571 v -0.006 c 0,-0.3197 -0.24805,-0.50161 -0.556729,-0.50161 -0.192923,0 -0.303167,0.0772 -0.385852,0.15986 0.01101,-0.29215 0.148831,-0.51263 0.385852,-0.51263 0.104733,0 0.187413,0.0331 0.275606,0.0937 0.02204,0.011 0.0441,0.0165 0.07166,0.0165 0.07166,0 0.132292,-0.0551 0.132292,-0.12678 0,-0.0606 -0.02755,-0.0937 -0.07166,-0.12127 -0.104728,-0.0717 -0.237019,-0.11575 -0.396875,-0.11575 -0.457507,0 -0.689017,0.38034 -0.689017,0.87092 v 0.006 c 0,0.32521 0.07166,0.49058 0.192923,0.61184 0.110244,0.11025 0.24805,0.17088 0.446487,0.17088 z m -0.0055,-0.24805 c -0.198438,0 -0.330729,-0.12127 -0.330729,-0.28663 0,-0.15434 0.12678,-0.28663 0.325218,-0.28663 0.198437,0 0.325215,0.12126 0.325215,0.28112 v 0.006 c 0,0.16536 -0.121267,0.28663 -0.319704,0.28663 z m 0,0" | |||
id="path25919" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 64.176649,162.03382 c 0,0.0772 0.06615,0.1378 0.137806,0.1378 0.08268,0 0.143314,-0.0606 0.143314,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143314,-0.13781 -0.0441,0 -0.08268,0.011 -0.137806,0.0275 l -0.242535,0.0772 c -0.06063,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06063,0.11576 0.12678,0.11576 0.01101,0 0.03306,0 0.04961,-0.006 l 0.165364,-0.0496 z m 0,0" | |||
id="path25911" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 65.660644,162.03933 c 0,0.0772 0.06064,0.13229 0.137806,0.13229 0.07717,0 0.132291,-0.0551 0.132291,-0.13229 v -0.23702 h 0.126778 c 0.06615,0 0.115755,-0.0496 0.115755,-0.11576 0,-0.0662 -0.04961,-0.11575 -0.115755,-0.11575 h -0.126778 v -0.904 c 0,-0.0772 -0.06064,-0.13229 -0.132291,-0.13229 -0.08268,0 -0.126783,0.0275 -0.17639,0.0882 l -0.755166,0.89848 c -0.03858,0.0441 -0.06063,0.0937 -0.06063,0.14883 0,0.0772 0.06063,0.13229 0.137801,0.13229 h 0.716581 z m -0.523653,-0.46853 0.523653,-0.63941 v 0.63941 z m 0,0" | |||
id="path25915" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 76.240713,147.03679 c 0,0.0827 0.06615,0.12678 0.143316,0.12678 0.06064,0 0.104733,-0.0275 0.137806,-0.0937 l 0.661458,-1.26228 c 0.02755,-0.0441 0.03858,-0.0937 0.03858,-0.1323 0,-0.0827 -0.04961,-0.12677 -0.126778,-0.12677 h -0.898483 c -0.07166,0 -0.126778,0.0551 -0.126778,0.12126 0,0.0717 0.05512,0.12678 0.126778,0.12678 h 0.694531 l -0.622871,1.15204 c -0.01654,0.0275 -0.02755,0.0661 -0.02755,0.0882 z m 0,0" | |||
id="path25907" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 75.832246,162.03382 c 0,0.0772 0.06615,0.1378 0.137806,0.1378 0.08268,0 0.143317,-0.0606 0.143317,-0.1378 v -1.3615 c 0,-0.0772 -0.06064,-0.13781 -0.143317,-0.13781 -0.0441,0 -0.08269,0.011 -0.137806,0.0275 l -0.242535,0.0772 c -0.06063,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06064,0.11576 0.126783,0.11576 0.01101,0 0.03305,0 0.04961,-0.006 l 0.165364,-0.0496 z m 0,0" | |||
id="path25899" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 77.099868,162.18816 c 0.347268,0 0.589803,-0.22049 0.589803,-0.5457 0,-0.34176 -0.248049,-0.50712 -0.562239,-0.50712 -0.104733,0 -0.17639,0.0165 -0.253561,0.0441 l 0.02755,-0.37483 h 0.600826 c 0.06615,0 0.126778,-0.0551 0.126778,-0.12127 0,-0.0717 -0.06063,-0.12677 -0.126778,-0.12677 h -0.727604 c -0.06615,0 -0.121269,0.0496 -0.126783,0.12677 l -0.03305,0.57878 c -0.0055,0.0496 0.01101,0.0937 0.05512,0.12127 0.04961,0.0386 0.0882,0.0551 0.132292,0.0551 0.0441,0 0.115758,-0.0551 0.275608,-0.0551 0.192927,0 0.33073,0.0992 0.33073,0.26458 v 0.006 c 0,0.17088 -0.132292,0.27561 -0.31419,0.27561 -0.126783,0 -0.237025,-0.0441 -0.347269,-0.13229 -0.02204,-0.0165 -0.04961,-0.0275 -0.08268,-0.0275 -0.07166,0 -0.132292,0.0606 -0.132292,0.13229 0,0.0496 0.02204,0.0827 0.05512,0.11024 0.132291,0.10473 0.297656,0.17639 0.512627,0.17639 z m 0,0" | |||
id="path25903" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 88.223964,147.17459 c 0.352777,0 0.611847,-0.17638 0.611847,-0.46302 v -0.005 c 0,-0.19292 -0.110244,-0.30317 -0.286631,-0.38585 0.132291,-0.0717 0.23151,-0.17639 0.23151,-0.35829 v -0.005 c 0,-0.24805 -0.237022,-0.42995 -0.556726,-0.42995 -0.319706,0 -0.556731,0.18742 -0.556731,0.42995 v 0.005 c 0,0.1819 0.09922,0.28663 0.231511,0.35829 -0.176387,0.0772 -0.286631,0.19844 -0.286631,0.39136 v 0.006 c 0,0.27561 0.259072,0.45751 0.611851,0.45751 z m 0,-0.94808 c -0.165364,0 -0.286633,-0.0992 -0.286633,-0.23703 v -0.005 c 0,-0.12126 0.115755,-0.22599 0.286633,-0.22599 0.170873,0 0.286631,0.10473 0.286631,0.22599 v 0.005 c 0,0.13781 -0.121266,0.23703 -0.286631,0.23703 z m 0,0.71106 c -0.209462,0 -0.336243,-0.11024 -0.336243,-0.23702 v -0.005 c 0,-0.14883 0.148828,-0.24253 0.336243,-0.24253 0.192924,0 0.336238,0.0937 0.336238,0.24253 v 0.005 c 0,0.13229 -0.126778,0.23702 -0.336238,0.23702 z m 0,0" | |||
id="path25895" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 53.414891,147.18011 c 0.347263,0 0.589799,-0.22049 0.589799,-0.54571 0,-0.34175 -0.248047,-0.50711 -0.56224,-0.50711 -0.10473,0 -0.176389,0.0165 -0.25356,0.0441 l 0.02755,-0.37483 h 0.600822 c 0.06614,0 0.126783,-0.0551 0.126783,-0.12127 0,-0.0716 -0.06064,-0.12678 -0.126783,-0.12678 h -0.727605 c -0.06614,0 -0.121266,0.0496 -0.126777,0.12678 l -0.03305,0.57878 c -0.0055,0.0496 0.01101,0.0937 0.05512,0.12127 0.04961,0.0386 0.0882,0.0551 0.132292,0.0551 0.0441,0 0.115755,-0.0551 0.275608,-0.0551 0.192924,0 0.330729,0.0992 0.330729,0.26458 v 0.006 c 0,0.17088 -0.132291,0.27561 -0.314195,0.27561 -0.126778,0 -0.237019,-0.0441 -0.347263,-0.13229 -0.02204,-0.0165 -0.04961,-0.0275 -0.08269,-0.0275 -0.07165,0 -0.132292,0.0606 -0.132292,0.13229 0,0.0496 0.02204,0.0827 0.05512,0.11024 0.132291,0.10473 0.297656,0.17639 0.51263,0.17639 z m 0,0" | |||
id="path25891" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 87.384664,162.03382 c 0,0.0772 0.06615,0.1378 0.137805,0.1378 0.08268,0 0.143314,-0.0606 0.143314,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143314,-0.13781 -0.0441,0 -0.08268,0.011 -0.137805,0.0275 l -0.242536,0.0772 c -0.06063,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06064,0.11576 0.126783,0.11576 0.01101,0 0.03306,0 0.04961,-0.006 l 0.165365,-0.0496 z m 0,0" | |||
id="path25883" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 88.736764,162.18816 c 0.33624,0 0.595312,-0.226 0.595312,-0.5457 v -0.006 c 0,-0.31971 -0.248047,-0.50161 -0.556728,-0.50161 -0.192924,0 -0.303168,0.0772 -0.38585,0.15985 0.01101,-0.29214 0.148828,-0.51263 0.38585,-0.51263 0.104733,0 0.187412,0.0331 0.275609,0.0937 0.02204,0.011 0.04409,0.0165 0.07166,0.0165 0.07165,0 0.132292,-0.0551 0.132292,-0.12678 0,-0.0606 -0.02755,-0.0937 -0.07166,-0.12127 -0.10473,-0.0717 -0.237021,-0.11575 -0.396875,-0.11575 -0.457507,0 -0.689017,0.38034 -0.689017,0.87092 v 0.006 c 0,0.32521 0.07165,0.49058 0.192923,0.61184 0.110242,0.11025 0.248047,0.17088 0.446485,0.17088 z m -0.0055,-0.24805 c -0.198437,0 -0.330729,-0.12127 -0.330729,-0.28663 0,-0.15434 0.126783,-0.28663 0.325221,-0.28663 0.198437,0 0.325215,0.12126 0.325215,0.28112 v 0.006 c 0,0.16536 -0.121269,0.28663 -0.319707,0.28663 z m 0,0" | |||
id="path25887" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14038" | |||
d="M 30.22589,167.90588 H 41.824837" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14040" | |||
d="M 7.0252387,167.90588 H 18.625563" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14042" | |||
d="M 30.22589,153.29178 H 41.824837" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14044" | |||
d="M 7.0252387,153.29178 H 18.625563" | |||
style="fill:none;stroke:#000000;stroke-width:0.35277775;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 6.956673,162.18816 c 0.4354582,0 0.6890174,-0.35829 0.6890174,-0.87643 0,-0.31971 -0.07717,-0.4961 -0.1929236,-0.61185 C 7.3370097,160.58412 7.210232,160.529 7.0062805,160.529 c -0.3527776,0 -0.5953125,0.23702 -0.5953125,0.55122 v 0.006 c 0,0.30868 0.226,0.51262 0.5677535,0.51262 0.1708751,0 0.2921424,-0.0772 0.3748265,-0.17087 -0.011007,0.29765 -0.1543404,0.5016 -0.3858508,0.5016 -0.1102429,0 -0.2039515,-0.0275 -0.2976563,-0.0937 -0.022048,-0.0165 -0.044097,-0.0276 -0.07717,-0.0276 -0.07166,0 -0.1322916,0.0551 -0.1322916,0.1323 0,0.0496 0.027552,0.0882 0.066146,0.11575 0.1157534,0.0772 0.2535589,0.13229 0.4299479,0.13229 z m 0.060632,-0.82682 c -0.1984375,0 -0.3252152,-0.12127 -0.3252152,-0.28663 v -0.006 c 0,-0.16537 0.1157533,-0.29766 0.3197048,-0.29766 0.2039479,0 0.3307291,0.12678 0.3307291,0.29766 0,0.15985 -0.1212672,0.29214 -0.3252187,0.29214 z m 0,0" | |||
id="path25879" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 18.021107,147.02025 c 0,0.0827 0.06615,0.13229 0.148826,0.13229 h 0.909507 c 0.07166,0 0.126778,-0.0551 0.126778,-0.12126 0,-0.0717 -0.05512,-0.12678 -0.126778,-0.12678 h -0.650434 l 0.330729,-0.27561 c 0.286632,-0.23151 0.418924,-0.36931 0.418924,-0.62287 0,-0.28663 -0.214976,-0.47956 -0.529167,-0.47956 -0.253559,0 -0.402389,0.0937 -0.53468,0.25907 -0.01655,0.022 -0.02755,0.0551 -0.02755,0.0827 0,0.0717 0.05512,0.13229 0.126777,0.13229 0.0441,0 0.07717,-0.022 0.09922,-0.0441 0.09922,-0.12126 0.187413,-0.1819 0.314194,-0.1819 0.148827,0 0.25907,0.0937 0.25907,0.25356 0,0.14332 -0.07717,0.24805 -0.297656,0.42995 l -0.496094,0.41892 c -0.04961,0.0441 -0.07166,0.0882 -0.07166,0.14332 z m 0,0" | |||
id="path25875" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 17.712955,162.03382 c 0,0.0772 0.06615,0.1378 0.137802,0.1378 0.08268,0 0.143316,-0.0606 0.143316,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143316,-0.13781 -0.0441,0 -0.08268,0.011 -0.137802,0.0275 l -0.242534,0.0772 c -0.06064,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06063,0.11576 0.126778,0.11576 0.01101,0 0.03305,0 0.04961,-0.006 l 0.165364,-0.0496 z m 0,0" | |||
id="path25867" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 19.113303,162.18816 c 0.424434,0 0.700042,-0.36932 0.700042,-0.83234 0,-0.46302 -0.275608,-0.82682 -0.694532,-0.82682 -0.424434,0 -0.700041,0.36932 -0.700041,0.82682 v 0.006 c 0,0.45751 0.275607,0.82683 0.694531,0.82683 z m 0.0055,-0.25356 c -0.248045,0 -0.407899,-0.25907 -0.407899,-0.57878 0,-0.3197 0.15434,-0.57326 0.402389,-0.57326 0.248045,0 0.41341,0.25907 0.41341,0.57326 v 0.006 c 0,0.3142 -0.159851,0.57327 -0.4079,0.57327 z m 0,0" | |||
id="path25871" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 30.226641,147.18011 c 0.336244,0 0.56224,-0.21498 0.56224,-0.50712 v -0.006 c 0,-0.29766 -0.225996,-0.41892 -0.468529,-0.452 l 0.374824,-0.39136 c 0.04961,-0.0496 0.08268,-0.0882 0.08268,-0.15434 0,-0.0717 -0.06063,-0.12127 -0.143316,-0.12127 h -0.821309 c -0.06615,0 -0.121267,0.0551 -0.121267,0.12127 0,0.0661 0.05512,0.12127 0.121267,0.12127 h 0.584287 l -0.374825,0.40239 c -0.0441,0.0441 -0.06064,0.0772 -0.06064,0.11575 0,0.0661 0.05512,0.12127 0.121269,0.12127 h 0.06064 c 0.220485,0 0.369313,0.0882 0.369313,0.24804 v 0.006 c 0,0.14332 -0.121269,0.24254 -0.28112,0.24254 -0.148828,0 -0.264583,-0.0551 -0.363802,-0.15434 -0.02204,-0.022 -0.05512,-0.0386 -0.09371,-0.0386 -0.07166,0 -0.137803,0.0661 -0.137803,0.1378 0,0.0386 0.02204,0.0772 0.04961,0.0992 0.126781,0.12678 0.308679,0.20947 0.540189,0.20947 z m 0,0" | |||
id="path25863" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 29.698761,162.03382 c 0,0.0772 0.06614,0.1378 0.1378,0.1378 0.08269,0 0.143317,-0.0606 0.143317,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143317,-0.13781 -0.0441,0 -0.08268,0.011 -0.1378,0.0275 l -0.242536,0.0772 c -0.06063,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06063,0.11576 0.126778,0.11576 0.01101,0 0.03305,0 0.04961,-0.006 l 0.165365,-0.0496 z m 0,0" | |||
id="path25855" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 30.657253,162.03382 c 0,0.0772 0.06615,0.1378 0.137803,0.1378 0.08268,0 0.143315,-0.0606 0.143315,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143315,-0.13781 -0.0441,0 -0.08268,0.011 -0.137803,0.0275 l -0.242535,0.0772 c -0.06064,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06063,0.11576 0.126778,0.11576 0.01101,0 0.03306,0 0.04961,-0.006 l 0.165364,-0.0496 z m 0,0" | |||
id="path25859" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.985347,147.03128 c 0,0.0772 0.06063,0.13229 0.137805,0.13229 0.07717,0 0.132292,-0.0551 0.132292,-0.13229 v -0.23702 h 0.126778 c 0.06614,0 0.115757,-0.0496 0.115757,-0.11576 0,-0.0662 -0.04961,-0.11575 -0.115757,-0.11575 h -0.126778 v -0.904 c 0,-0.0772 -0.06063,-0.13229 -0.132292,-0.13229 -0.08268,0 -0.12678,0.0276 -0.17639,0.0882 l -0.755165,0.89848 c -0.03858,0.0441 -0.06063,0.0937 -0.06063,0.14883 0,0.0772 0.06063,0.13229 0.137803,0.13229 h 0.716579 z m -0.523653,-0.46853 0.523653,-0.63941 v 0.63941 z m 0,0" | |||
id="path25851" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 6.9791626,147.02577 c 0,0.0772 0.066146,0.1378 0.1378019,0.1378 0.082684,0 0.143316,-0.0606 0.143316,-0.1378 v -1.3615 c 0,-0.0772 -0.060632,-0.13781 -0.143316,-0.13781 -0.044097,0 -0.08268,0.011 -0.1378019,0.0276 l -0.2425348,0.0772 c -0.060635,0.0165 -0.099219,0.0606 -0.099219,0.12127 0,0.0606 0.060632,0.11576 0.1267778,0.11576 0.011007,0 0.033055,0 0.049611,-0.006 l 0.1653646,-0.0496 z m 0,0" | |||
id="path25847" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.051672,162.03382 c 0,0.0772 0.06614,0.1378 0.1378,0.1378 0.08269,0 0.143317,-0.0606 0.143317,-0.1378 v -1.3615 c 0,-0.0772 -0.06063,-0.13781 -0.143317,-0.13781 -0.0441,0 -0.08268,0.011 -0.1378,0.0275 l -0.242536,0.0772 c -0.06063,0.0165 -0.09922,0.0606 -0.09922,0.12127 0,0.0606 0.06063,0.11576 0.126778,0.11576 0.01101,0 0.03305,0 0.04961,-0.006 l 0.165365,-0.0496 z m 0,0" | |||
id="path25839" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.699197,162.02831 c 0,0.0827 0.06615,0.13229 0.148828,0.13229 h 0.909505 c 0.07166,0 0.126778,-0.0551 0.126778,-0.12127 0,-0.0717 -0.05512,-0.12678 -0.126778,-0.12678 h -0.650433 l 0.330729,-0.27561 c 0.286631,-0.23151 0.418923,-0.36931 0.418923,-0.62287 0,-0.28663 -0.214974,-0.47956 -0.529167,-0.47956 -0.253558,0 -0.402388,0.0937 -0.53468,0.25907 -0.01654,0.022 -0.02755,0.0551 -0.02755,0.0827 0,0.0717 0.05512,0.13229 0.126778,0.13229 0.0441,0 0.07717,-0.022 0.09922,-0.0441 0.09922,-0.12126 0.187413,-0.1819 0.314196,-0.1819 0.148825,0 0.259069,0.0937 0.259069,0.25356 0,0.14332 -0.07717,0.24805 -0.297656,0.42995 l -0.496094,0.41892 c -0.04961,0.0441 -0.07166,0.0882 -0.07166,0.14332 z m 0,0" | |||
id="path25843" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14084" | |||
d="m 69.866535,198.07388 c 0,-0.54983 -0.450617,-1.00045 -1.000453,-1.00045 H 49.584571 c -0.549838,0 -1.000455,0.45062 -1.000455,1.00045 v 12.17359 c 0,0.54846 0.450617,0.99908 1.000455,0.99908 h 19.281511 c 0.549836,0 1.000453,-0.45062 1.000453,-0.99908 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14086" | |||
d="m 93.065808,182.07348 c 0,-0.54983 -0.449239,-0.99907 -0.999078,-0.99907 H 72.783844 c -0.549839,0 -1.000456,0.44924 -1.000456,0.99907 v 12.17359 c 0,0.54984 0.450617,1.00046 1.000456,1.00046 H 92.06673 c 0.549839,0 0.999078,-0.45062 0.999078,-1.00046 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14088" | |||
d="m 69.866535,182.07348 c 0,-0.54983 -0.450617,-0.99907 -1.000453,-0.99907 H 49.584571 c -0.549838,0 -1.000455,0.44924 -1.000455,0.99907 v 12.17359 c 0,0.54984 0.450617,1.00046 1.000455,1.00046 h 19.281511 c 0.549836,0 1.000453,-0.45062 1.000453,-1.00046 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14090" | |||
d="m 93.065808,198.07388 c 0,-0.54983 -0.449239,-1.00045 -0.999078,-1.00045 H 72.783844 c -0.549839,0 -1.000456,0.45062 -1.000456,1.00045 v 12.17359 c 0,0.54846 0.450617,0.99908 1.000456,0.99908 H 92.06673 c 0.549839,0 0.999078,-0.45062 0.999078,-0.99908 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 52.615059,200.00083 c 0,0.0937 0.07717,0.17088 0.176389,0.17088 0.09371,0 0.170879,-0.0772 0.170879,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170879,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165364,0.0276 l -0.226002,0.0661 c -0.07165,0.022 -0.121267,0.0827 -0.121267,0.15434 0,0.0827 0.07166,0.14883 0.15434,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121269,-0.0276 z m 0,0" | |||
id="path25831" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 53.931752,200.18825 c 0.358291,0 0.578779,-0.22049 0.578779,-0.52365 v -0.006 c 0,-0.29765 -0.209463,-0.41341 -0.429948,-0.452 l 0.31419,-0.29765 c 0.06615,-0.0606 0.104733,-0.11024 0.104733,-0.19844 0,-0.0937 -0.07717,-0.15434 -0.17639,-0.15434 h -0.782725 c -0.08269,0 -0.154339,0.0661 -0.154339,0.14883 0,0.0827 0.07165,0.15434 0.154339,0.15434 h 0.49058 l -0.308681,0.31419 c -0.05512,0.0551 -0.07717,0.0937 -0.07717,0.14332 0,0.0827 0.06615,0.14883 0.148828,0.14883 h 0.05512 c 0.198437,0 0.31419,0.0772 0.31419,0.20394 v 0.006 c 0,0.12127 -0.0937,0.19844 -0.225997,0.19844 -0.12678,0 -0.220485,-0.0441 -0.314195,-0.12127 -0.02755,-0.022 -0.06063,-0.0441 -0.110241,-0.0441 -0.0937,0 -0.170876,0.0772 -0.170876,0.17088 0,0.0496 0.02755,0.0992 0.06063,0.12678 0.132291,0.11024 0.30317,0.1819 0.529166,0.1819 z m 0,0" | |||
id="path25835" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 64.142253,200.00083 c 0,0.0937 0.07717,0.17088 0.176388,0.17088 0.0937,0 0.170875,-0.0772 0.170875,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170875,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165364,0.0276 l -0.225997,0.0661 c -0.07166,0.022 -0.121266,0.0827 -0.121266,0.15434 0,0.0827 0.07166,0.14883 0.154339,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121269,-0.0276 z m 0,0" | |||
id="path25823" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 65.651429,200.00635 c 0,0.0937 0.07166,0.16536 0.165364,0.16536 0.09371,0 0.170879,-0.0717 0.170879,-0.16536 v -0.19293 h 0.08268 c 0.08268,0 0.143316,-0.0606 0.143316,-0.14332 0,-0.0772 -0.06063,-0.14331 -0.143316,-0.14331 h -0.08268 v -0.82682 c 0,-0.0937 -0.07717,-0.17088 -0.170879,-0.17088 -0.10473,0 -0.154339,0.0441 -0.220485,0.12127 l -0.694531,0.81028 c -0.05512,0.0606 -0.08268,0.11576 -0.08268,0.19293 0,0.0937 0.07717,0.15985 0.170875,0.15985 h 0.661459 z m -0.429948,-0.47956 0.429948,-0.50161 v 0.50161 z m 0,0" | |||
id="path25827" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 75.795556,200.00083 c 0,0.0937 0.07717,0.17088 0.17639,0.17088 0.0937,0 0.170876,-0.0772 0.170876,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170876,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165365,0.0276 l -0.225996,0.0661 c -0.07166,0.022 -0.121267,0.0827 -0.121267,0.15434 0,0.0827 0.07165,0.14883 0.15434,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121266,-0.0276 z m 0,0" | |||
id="path25815" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 77.12831,200.18825 c 0.352777,0 0.600827,-0.21498 0.600827,-0.55673 v -0.005 c 0,-0.35829 -0.24805,-0.51263 -0.56224,-0.51263 -0.09371,0 -0.148831,0.011 -0.214976,0.0276 l 0.02204,-0.27561 h 0.540192 c 0.08268,0 0.15434,-0.0717 0.15434,-0.15434 0,-0.0827 -0.07165,-0.15434 -0.15434,-0.15434 h -0.700042 c -0.08268,0 -0.148828,0.0661 -0.15434,0.14883 l -0.03305,0.5457 c -0.0055,0.0606 0.01654,0.10474 0.06615,0.14332 0.07165,0.0496 0.110241,0.0717 0.15985,0.0717 0.04961,0 0.110242,-0.0441 0.242533,-0.0441 0.170879,0 0.286634,0.0827 0.286634,0.22049 0,0.14331 -0.110244,0.226 -0.259069,0.226 -0.115758,0 -0.209463,-0.0331 -0.308682,-0.10473 -0.02755,-0.022 -0.05512,-0.0331 -0.09371,-0.0331 -0.0937,0 -0.165365,0.0772 -0.165365,0.17088 0,0.0606 0.02755,0.10473 0.06615,0.1378 0.132292,0.0882 0.286631,0.14883 0.507116,0.14883 z m 0,0" | |||
id="path25819" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 87.350268,200.00083 c 0,0.0937 0.07717,0.17088 0.17639,0.17088 0.0937,0 0.170873,-0.0772 0.170873,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170873,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165364,0.0276 l -0.225997,0.0661 c -0.07166,0.022 -0.121269,0.0827 -0.121269,0.15434 0,0.0827 0.07166,0.14883 0.154342,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121266,-0.0276 z m 0,0" | |||
id="path25807" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 88.765207,200.18825 c 0.347265,0 0.611848,-0.226 0.611848,-0.55673 v -0.005 c 0,-0.33073 -0.242532,-0.50712 -0.562239,-0.50712 -0.159853,0 -0.253558,0.0496 -0.336243,0.0992 0.02755,-0.20946 0.126783,-0.36931 0.32522,-0.36931 0.09922,0 0.165365,0.022 0.237019,0.0661 0.02755,0.011 0.05512,0.022 0.0882,0.022 0.08819,0 0.165364,-0.0717 0.165364,-0.15985 0,-0.0717 -0.03858,-0.12127 -0.0937,-0.15434 -0.09371,-0.0551 -0.226001,-0.0937 -0.385852,-0.0937 -0.479557,0 -0.705554,0.38034 -0.705554,0.87643 v 0.006 c 0,0.3142 0.07717,0.49058 0.192924,0.60634 0.110241,0.11025 0.253558,0.17088 0.463021,0.17088 z m -0.01101,-0.30317 c -0.17639,0 -0.28112,-0.10473 -0.28112,-0.23702 v -0.006 c 0,-0.1378 0.09922,-0.23151 0.275609,-0.23151 0.170875,0 0.275608,0.0992 0.275608,0.23151 v 0.006 c 0,0.1378 -0.09922,0.23702 -0.270097,0.23702 z m 0,0" | |||
id="path25811" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 53.413521,184.1896 c 0.352779,0 0.600826,-0.21497 0.600826,-0.55673 v -0.005 c 0,-0.35828 -0.248047,-0.51262 -0.562239,-0.51262 -0.09371,0 -0.148828,0.011 -0.214974,0.0276 l 0.02204,-0.27561 h 0.540191 c 0.08268,0 0.15434,-0.0717 0.15434,-0.15434 0,-0.0827 -0.07166,-0.15434 -0.15434,-0.15434 h -0.700042 c -0.08268,0 -0.148831,0.0661 -0.154339,0.14883 l -0.03306,0.5457 c -0.0055,0.0606 0.01654,0.10473 0.06615,0.14332 0.07166,0.0496 0.110244,0.0717 0.159851,0.0717 0.04961,0 0.110244,-0.0441 0.242536,-0.0441 0.170878,0 0.286631,0.0827 0.286631,0.22048 0,0.14332 -0.110242,0.226 -0.25907,0.226 -0.115755,0 -0.20946,-0.0331 -0.308679,-0.10473 -0.02755,-0.022 -0.05512,-0.0331 -0.09371,-0.0331 -0.0937,0 -0.165364,0.0772 -0.165364,0.17088 0,0.0606 0.02755,0.10473 0.06615,0.1378 0.132291,0.0882 0.286633,0.14883 0.507119,0.14883 z m 0,0" | |||
id="path25803" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 65.043551,184.1896 c 0.347266,0 0.611849,-0.226 0.611849,-0.55673 v -0.005 c 0,-0.33073 -0.242533,-0.50711 -0.562239,-0.50711 -0.159854,0 -0.253559,0.0496 -0.336243,0.0992 0.02755,-0.20946 0.126783,-0.36932 0.32522,-0.36932 0.09922,0 0.165365,0.022 0.237019,0.0662 0.02755,0.011 0.05512,0.022 0.0882,0.022 0.08819,0 0.165365,-0.0717 0.165365,-0.15985 0,-0.0717 -0.03858,-0.12127 -0.0937,-0.15434 -0.09371,-0.0551 -0.226002,-0.0937 -0.385852,-0.0937 -0.479558,0 -0.705554,0.38034 -0.705554,0.87643 v 0.005 c 0,0.31419 0.07717,0.49058 0.192923,0.60634 0.110242,0.11024 0.253559,0.17087 0.463021,0.17087 z m -0.01101,-0.30317 c -0.17639,0 -0.28112,-0.10473 -0.28112,-0.23702 v -0.005 c 0,-0.1378 0.09922,-0.23151 0.275608,-0.23151 0.170876,0 0.275609,0.0992 0.275609,0.23151 v 0.005 c 0,0.13781 -0.09922,0.23702 -0.270097,0.23702 z m 0,0" | |||
id="path25799" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 76.196178,184.01873 c 0,0.0992 0.0882,0.15434 0.181901,0.15434 0.07166,0 0.121266,-0.0331 0.170878,-0.11576 l 0.64492,-1.16858 c 0.02755,-0.0551 0.04961,-0.12127 0.04961,-0.17087 0,-0.10474 -0.06064,-0.15986 -0.159856,-0.15986 h -0.870919 c -0.0882,0 -0.154342,0.0661 -0.154342,0.15434 0,0.0827 0.06615,0.14883 0.154342,0.14883 h 0.611849 l -0.595312,1.04731 c -0.01654,0.0331 -0.03306,0.0772 -0.03306,0.11025 z m 0,0" | |||
id="path25795" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 88.223964,184.18409 c 0.358288,0 0.617361,-0.17088 0.617361,-0.47405 0,-0.19292 -0.09371,-0.29765 -0.259073,-0.38034 0.126781,-0.0772 0.203952,-0.17638 0.203952,-0.35277 0,-0.24805 -0.220488,-0.44098 -0.56224,-0.44098 -0.341754,0 -0.562239,0.19293 -0.562239,0.44098 0,0.17639 0.07717,0.27561 0.203946,0.35277 -0.170873,0.0772 -0.25907,0.19293 -0.25907,0.38586 v 0.005 c 0,0.28111 0.264584,0.46302 0.617363,0.46302 z m 0,-0.97014 c -0.137805,0 -0.23151,-0.0882 -0.23151,-0.19844 v -0.006 c 0,-0.0992 0.08819,-0.18741 0.23151,-0.18741 0.143314,0 0.231511,0.0937 0.231511,0.19293 0,0.11575 -0.09371,0.19843 -0.231511,0.19843 z m 0,0.67799 c -0.176389,0 -0.275608,-0.0882 -0.275608,-0.19843 v -0.006 c 0,-0.12127 0.115752,-0.19293 0.275608,-0.19293 0.159851,0 0.275606,0.0717 0.275606,0.19293 v 0.006 c 0,0.11575 -0.09922,0.19843 -0.275606,0.19843 z m 0,0" | |||
id="path25791" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14132" | |||
d="m 23.466612,198.07388 c 0,-0.54983 -0.450617,-1.00045 -1.000456,-1.00045 H 3.184646 c -0.5498359,0 -1.0004531,0.45062 -1.0004531,1.00045 v 12.17359 c 0,0.54846 0.4506172,0.99908 1.0004531,0.99908 h 19.28151 c 0.549839,0 1.000456,-0.45062 1.000456,-0.99908 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14134" | |||
d="m 46.665887,182.07348 c 0,-0.54983 -0.450618,-0.99907 -1.000459,-0.99907 h -19.28151 c -0.549836,0 -1.000456,0.44924 -1.000456,0.99907 v 12.17359 c 0,0.54984 0.45062,1.00046 1.000456,1.00046 h 19.28151 c 0.549841,0 1.000459,-0.45062 1.000459,-1.00046 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14136" | |||
d="m 23.466612,182.07348 c 0,-0.54983 -0.450617,-0.99907 -1.000456,-0.99907 H 3.184646 c -0.5498359,0 -1.0004531,0.44924 -1.0004531,0.99907 v 12.17359 c 0,0.54984 0.4506172,1.00046 1.0004531,1.00046 h 19.28151 c 0.549839,0 1.000456,-0.45062 1.000456,-1.00046 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
id="path14138" | |||
d="m 46.665887,198.07388 c 0,-0.54983 -0.450618,-1.00045 -1.000459,-1.00045 h -19.28151 c -0.549836,0 -1.000456,0.45062 -1.000456,1.00045 v 12.17359 c 0,0.54846 0.45062,0.99908 1.000456,0.99908 h 19.28151 c 0.549841,0 1.000459,-0.45062 1.000459,-0.99908 z m 0,0" | |||
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 6.960818,200.18825 c 0.4519967,0 0.7000417,-0.35278 0.7000417,-0.87643 v -0.006 c 0,-0.31419 -0.07717,-0.49058 -0.1929236,-0.60633 -0.1212672,-0.12127 -0.2480487,-0.17088 -0.4630208,-0.17088 -0.3582916,0 -0.6118508,0.23702 -0.6118508,0.56224 v 0.005 c 0,0.32522 0.2260002,0.51815 0.573264,0.51815 0.143316,0 0.2480487,-0.0441 0.3252187,-0.11025 -0.022048,0.21498 -0.1267812,0.36381 -0.3252187,0.36381 -0.099219,0 -0.1708751,-0.022 -0.253559,-0.0717 -0.027552,-0.0165 -0.060632,-0.0276 -0.093705,-0.0276 -0.093708,0 -0.1653646,0.0661 -0.1653646,0.15985 0,0.0661 0.033055,0.11575 0.08268,0.14332 0.1157571,0.0772 0.2425349,0.11575 0.4244375,0.11575 z m 0.066146,-0.87092 c -0.1763887,0 -0.2811214,-0.0992 -0.2811214,-0.23702 v -0.006 c 0,-0.14331 0.099219,-0.24253 0.2700973,-0.24253 0.1763887,0 0.2866318,0.0992 0.2866318,0.24253 v 0.006 c 0,0.1378 -0.1047326,0.23702 -0.2756077,0.23702 z m 0,0" | |||
id="path25787" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 17.67627,200.00083 c 0,0.0937 0.07717,0.17088 0.176389,0.17088 0.0937,0 0.170875,-0.0772 0.170875,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170875,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165365,0.0276 l -0.225996,0.0661 c -0.07166,0.022 -0.121268,0.0827 -0.121268,0.15434 0,0.0827 0.07166,0.14883 0.15434,0.14883 0.02205,0 0.0441,-0.006 0.06615,-0.011 l 0.121268,-0.0276 z m 0,0" | |||
id="path25779" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 19.139454,200.18825 c 0.429948,0 0.71658,-0.3638 0.71658,-0.83234 0,-0.46853 -0.286632,-0.82682 -0.711066,-0.82682 -0.424437,0 -0.716579,0.3638 -0.716579,0.82682 v 0.006 c 0,0.46853 0.286632,0.82682 0.711065,0.82682 z m 0.0055,-0.31971 c -0.209462,0 -0.352778,-0.21497 -0.352778,-0.51263 0,-0.29765 0.137802,-0.50711 0.347264,-0.50711 0.214976,0 0.352778,0.22048 0.352778,0.50711 v 0.006 c 0,0.29214 -0.132292,0.50712 -0.347264,0.50712 z m 0,0" | |||
id="path25783" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 29.643722,200.00083 c 0,0.0937 0.07717,0.17088 0.17639,0.17088 0.0937,0 0.170876,-0.0772 0.170876,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170876,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165364,0.0276 l -0.225997,0.0661 c -0.07166,0.022 -0.121266,0.0827 -0.121266,0.15434 0,0.0827 0.07165,0.14883 0.154339,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121267,-0.0276 z m 0,0" | |||
id="path25775" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 30.651287,200.00083 c 0,0.0937 0.07717,0.17088 0.17639,0.17088 0.0937,0 0.170876,-0.0772 0.170876,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170876,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165365,0.0276 l -0.225997,0.0661 c -0.07166,0.022 -0.121266,0.0827 -0.121266,0.15434 0,0.0827 0.07165,0.14883 0.154339,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121267,-0.0276 z m 0,0" | |||
id="path25771" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.008103,200.00083 c 0,0.0937 0.07717,0.17088 0.176389,0.17088 0.09371,0 0.170879,-0.0772 0.170879,-0.17088 v -1.29535 c 0,-0.0937 -0.07717,-0.17088 -0.170879,-0.17088 h -0.0055 c -0.04961,0 -0.09922,0.011 -0.165364,0.0276 l -0.226002,0.0661 c -0.07165,0.022 -0.121267,0.0827 -0.121267,0.15434 0,0.0827 0.07166,0.14883 0.15434,0.14883 0.02204,0 0.0441,-0.006 0.06615,-0.011 l 0.121269,-0.0276 z m 0,0" | |||
id="path25763" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.717546,199.99532 c 0,0.10473 0.07717,0.16537 0.187412,0.16537 h 0.870921 c 0.08819,0 0.15434,-0.0662 0.15434,-0.14883 0,-0.0882 -0.06615,-0.15434 -0.15434,-0.15434 h -0.556728 l 0.259072,-0.20395 c 0.286631,-0.22048 0.424434,-0.35278 0.424434,-0.62287 v -0.006 c 0,-0.29765 -0.220485,-0.49058 -0.551214,-0.49058 -0.242536,0 -0.396875,0.0827 -0.523653,0.23151 -0.02755,0.0331 -0.0441,0.0717 -0.0441,0.11024 0,0.0937 0.07166,0.16537 0.15985,0.16537 0.05512,0 0.09922,-0.0276 0.121267,-0.0551 0.0882,-0.0937 0.159856,-0.13781 0.264583,-0.13781 0.121269,0 0.214977,0.0717 0.214977,0.20947 0,0.13229 -0.07717,0.22048 -0.281123,0.38585 l -0.451995,0.37482 c -0.06063,0.0441 -0.0937,0.10473 -0.0937,0.17639 z m 0,0" | |||
id="path25767" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 6.9470562,184.00219 c 0,0.0937 0.07717,0.17088 0.176389,0.17088 0.093705,0 0.1708748,-0.0772 0.1708748,-0.17088 v -1.29536 c 0,-0.0937 -0.07717,-0.17088 -0.1708748,-0.17088 h -0.0055 c -0.049608,0 -0.099219,0.011 -0.1653646,0.0275 l -0.2259965,0.0661 c -0.07166,0.022 -0.1212676,0.0827 -0.1212676,0.15434 0,0.0827 0.071656,0.14883 0.1543405,0.14883 0.022048,0 0.044097,-0.005 0.066146,-0.011 l 0.1212673,-0.0275 z m 0,0" | |||
id="path25759" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 18.007348,183.99668 c 0,0.10473 0.07717,0.16536 0.187413,0.16536 h 0.870921 c 0.08819,0 0.15434,-0.0661 0.15434,-0.14883 0,-0.0882 -0.06615,-0.15434 -0.15434,-0.15434 h -0.556729 l 0.259072,-0.20395 c 0.286632,-0.22048 0.424434,-0.35278 0.424434,-0.62287 v -0.006 c 0,-0.29766 -0.220486,-0.49058 -0.551215,-0.49058 -0.242535,0 -0.396875,0.0827 -0.523652,0.23151 -0.02755,0.0331 -0.0441,0.0717 -0.0441,0.11024 0,0.0937 0.07166,0.16536 0.159851,0.16536 0.05512,0 0.09922,-0.0275 0.121267,-0.0551 0.0882,-0.0937 0.159855,-0.1378 0.264583,-0.1378 0.121268,0 0.214976,0.0717 0.214976,0.20946 0,0.1323 -0.07717,0.22049 -0.281121,0.38586 l -0.451997,0.37482 c -0.06063,0.0441 -0.0937,0.10473 -0.0937,0.17639 z m 0,0" | |||
id="path25755" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 30.222056,184.1896 c 0.358291,0 0.578779,-0.22049 0.578779,-0.52365 v -0.006 c 0,-0.29766 -0.209463,-0.41341 -0.429948,-0.452 l 0.31419,-0.29766 c 0.06615,-0.0606 0.104733,-0.11024 0.104733,-0.19843 0,-0.0937 -0.07717,-0.15434 -0.17639,-0.15434 h -0.782725 c -0.08269,0 -0.154339,0.0661 -0.154339,0.14883 0,0.0827 0.07165,0.15434 0.154339,0.15434 h 0.49058 l -0.308681,0.31419 c -0.05512,0.0551 -0.07717,0.0937 -0.07717,0.14331 0,0.0827 0.06615,0.14883 0.148828,0.14883 h 0.05512 c 0.198437,0 0.31419,0.0772 0.31419,0.20395 v 0.006 c 0,0.12127 -0.0937,0.19844 -0.225997,0.19844 -0.12678,0 -0.220485,-0.0441 -0.314195,-0.12127 -0.02755,-0.022 -0.06063,-0.0441 -0.110242,-0.0441 -0.0937,0 -0.170875,0.0772 -0.170875,0.17088 0,0.0496 0.02755,0.0992 0.06063,0.12678 0.132291,0.11024 0.30317,0.1819 0.529166,0.1819 z m 0,0" | |||
id="path25751" /> | |||
<path | |||
inkscape:connector-curvature="0" | |||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.35277775" | |||
d="m 41.948612,184.0077 c 0,0.0937 0.07166,0.16537 0.165364,0.16537 0.0937,0 0.170876,-0.0717 0.170876,-0.16537 v -0.19293 h 0.08268 c 0.08268,0 0.143316,-0.0606 0.143316,-0.14331 0,-0.0772 -0.06063,-0.14332 -0.143316,-0.14332 h -0.08268 v -0.82682 c 0,-0.0937 -0.07717,-0.17088 -0.170876,-0.17088 -0.104732,0 -0.154339,0.0441 -0.220485,0.12127 L 41.19896,183.462 c -0.05512,0.0606 -0.08269,0.11575 -0.08269,0.19292 0,0.0937 0.07717,0.15985 0.170878,0.15985 h 0.661459 z m -0.429948,-0.47956 0.429948,-0.5016 v 0.5016 z m 0,0" | |||
id="path25747" /> | |||
</g> | |||
<g | |||
inkscape:groupmode="layer" | |||
id="layer2" | |||
inkscape:label="components" | |||
style="display:none"> | |||
<rect | |||
style="opacity:1;vector-effect:none;fill:#ffff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1.1962297;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="rect27907" | |||
width="91.381844" | |||
height="28.00036" | |||
x="2.570039" | |||
y="14.838717" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="path28714" | |||
cx="7.6605124" | |||
cy="59.638046" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="59.638046" | |||
cx="19.260149" | |||
id="circle28716" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28718" | |||
cx="30.860474" | |||
cy="59.638046" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="59.638046" | |||
cx="42.4608" | |||
id="circle28720" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28722" | |||
cx="54.060436" | |||
cy="59.638046" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="59.638046" | |||
cx="65.660759" | |||
id="circle28724" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28726" | |||
cx="77.260399" | |||
cy="59.638046" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="59.638046" | |||
cx="88.860031" | |||
id="circle28728" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
r="2" | |||
cy="74.251457" | |||
cx="7.6605129" | |||
id="circle28730" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28732" | |||
cx="19.260149" | |||
cy="74.251457" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="74.251457" | |||
cx="30.860474" | |||
id="circle28734" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28736" | |||
cx="42.460804" | |||
cy="74.251457" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="74.251457" | |||
cx="54.06044" | |||
id="circle28738" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28740" | |||
cx="65.660759" | |||
cy="74.251457" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="74.251457" | |||
cx="77.260399" | |||
id="circle28742" | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#00ff00;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28744" | |||
cx="88.860031" | |||
cy="74.251457" | |||
r="2" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28746" | |||
cx="7.6605129" | |||
cy="96.251144" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="96.251144" | |||
cx="19.260149" | |||
id="circle28748" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28750" | |||
cx="30.860474" | |||
cy="96.251144" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="96.251144" | |||
cx="42.460804" | |||
id="circle28752" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28754" | |||
cx="54.06044" | |||
cy="96.251144" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="96.251144" | |||
cx="65.660759" | |||
id="circle28756" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28758" | |||
cx="77.260399" | |||
cy="96.251144" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="96.251144" | |||
cx="88.860031" | |||
id="circle28760" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
r="2" | |||
cy="112.25154" | |||
cx="7.6605144" | |||
id="circle28762" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28764" | |||
cx="19.260151" | |||
cy="112.25154" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="112.25154" | |||
cx="30.860476" | |||
id="circle28766" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28768" | |||
cx="42.460804" | |||
cy="112.25154" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="112.25154" | |||
cx="54.06044" | |||
id="circle28770" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28772" | |||
cx="65.660759" | |||
cy="112.25154" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="112.25154" | |||
cx="77.260399" | |||
id="circle28774" | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#0000ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28776" | |||
cx="88.860031" | |||
cy="112.25154" | |||
r="2" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="path28778" | |||
cx="13.459989" | |||
cy="55.666542" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="55.666542" | |||
cx="36.660637" | |||
id="circle28780" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28782" | |||
cx="59.8606" | |||
cy="55.666542" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="55.666542" | |||
cx="83.060562" | |||
id="circle28784" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
r="2" | |||
cy="70.247566" | |||
cx="13.459989" | |||
id="circle28786" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28788" | |||
cx="36.660637" | |||
cy="70.247566" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="70.247566" | |||
cx="59.8606" | |||
id="circle28790" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28792" | |||
cx="83.060562" | |||
cy="70.247566" | |||
r="2" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28794" | |||
cx="13.459989" | |||
cy="92.237602" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="92.237602" | |||
cx="36.660637" | |||
id="circle28796" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28798" | |||
cx="59.8606" | |||
cy="92.237602" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="92.237602" | |||
cx="83.060562" | |||
id="circle28800" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
r="2" | |||
cy="108.25936" | |||
cx="13.459989" | |||
id="circle28802" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28804" | |||
cx="36.660637" | |||
cy="108.25936" | |||
r="2" /> | |||
<circle | |||
r="2" | |||
cy="108.25936" | |||
cx="59.8606" | |||
id="circle28806" | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> | |||
<circle | |||
style="opacity:1;vector-effect:none;fill:#ff00ff;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" | |||
id="circle28808" | |||
cx="83.060562" | |||
cy="108.25936" | |||
r="2" /> | |||
</g> | |||
</svg> |
@@ -8,13 +8,10 @@ | |||
#include <condition_variable> | |||
static const int AUDIO_OUTPUTS = 8; | |||
static const int AUDIO_INPUTS = 8; | |||
using namespace rack; | |||
template <int AUDIO_OUTPUTS, int AUDIO_INPUTS> | |||
struct AudioInterfacePort : audio::Port { | |||
std::mutex engineMutex; | |||
std::condition_variable engineCv; | |||
@@ -28,7 +25,7 @@ struct AudioInterfacePort : audio::Port { | |||
~AudioInterfacePort() { | |||
// Close stream here before destructing AudioInterfacePort, so the mutexes are still valid when waiting to close. | |||
setDevice(-1, 0); | |||
setDeviceId(-1, 0); | |||
} | |||
void processStream(const float *input, float *output, int frames) override { | |||
@@ -87,6 +84,7 @@ struct AudioInterfacePort : audio::Port { | |||
}; | |||
template <int AUDIO_OUTPUTS, int AUDIO_INPUTS> | |||
struct AudioInterface : Module { | |||
enum ParamIds { | |||
NUM_PARAMS | |||
@@ -105,7 +103,7 @@ struct AudioInterface : Module { | |||
NUM_LIGHTS | |||
}; | |||
AudioInterfacePort port; | |||
AudioInterfacePort<AUDIO_OUTPUTS, AUDIO_INPUTS> port; | |||
int lastSampleRate = 0; | |||
int lastNumOutputs = -1; | |||
int lastNumInputs = -1; | |||
@@ -183,10 +181,12 @@ struct AudioInterface : Module { | |||
if (outputBuffer.full()) { | |||
// Wait until enough outputs are consumed | |||
// Give up after a timeout in case the audio device is being unresponsive. | |||
std::unique_lock<std::mutex> lock(port.engineMutex); | |||
auto cond = [&] { | |||
return (port.outputBuffer.size() < (size_t) port.blockSize); | |||
}; | |||
if (!cond()) | |||
APP->engine->yieldWorkers(); | |||
std::unique_lock<std::mutex> lock(port.engineMutex); | |||
auto timeout = std::chrono::milliseconds(200); | |||
if (port.engineCv.wait_for(lock, timeout, cond)) { | |||
// Push converted output | |||
@@ -227,13 +227,15 @@ struct AudioInterface : Module { | |||
} | |||
void onReset() override { | |||
port.setDevice(-1, 0); | |||
port.setDeviceId(-1, 0); | |||
} | |||
}; | |||
struct AudioInterfaceWidget : ModuleWidget { | |||
AudioInterfaceWidget(AudioInterface *module) { | |||
struct AudioInterface8Widget : ModuleWidget { | |||
typedef AudioInterface<8, 8> TAudioInterface; | |||
AudioInterface8Widget(TAudioInterface *module) { | |||
setModule(module); | |||
setPanel(APP->window->loadSvg(asset::system("res/Core/AudioInterface.svg"))); | |||
@@ -242,32 +244,32 @@ struct AudioInterfaceWidget : ModuleWidget { | |||
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); | |||
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(3.7069211, 55.530807)), module, AudioInterface::AUDIO_INPUT + 0)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(15.307249, 55.530807)), module, AudioInterface::AUDIO_INPUT + 1)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(26.906193, 55.530807)), module, AudioInterface::AUDIO_INPUT + 2)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(38.506519, 55.530807)), module, AudioInterface::AUDIO_INPUT + 3)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(3.7069209, 70.144905)), module, AudioInterface::AUDIO_INPUT + 4)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(15.307249, 70.144905)), module, AudioInterface::AUDIO_INPUT + 5)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(26.906193, 70.144905)), module, AudioInterface::AUDIO_INPUT + 6)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(38.506519, 70.144905)), module, AudioInterface::AUDIO_INPUT + 7)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(3.7069209, 92.143906)), module, AudioInterface::AUDIO_OUTPUT + 0)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(15.307249, 92.143906)), module, AudioInterface::AUDIO_OUTPUT + 1)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(26.906193, 92.143906)), module, AudioInterface::AUDIO_OUTPUT + 2)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(38.506519, 92.143906)), module, AudioInterface::AUDIO_OUTPUT + 3)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(3.7069209, 108.1443)), module, AudioInterface::AUDIO_OUTPUT + 4)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(15.307249, 108.1443)), module, AudioInterface::AUDIO_OUTPUT + 5)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(26.906193, 108.1443)), module, AudioInterface::AUDIO_OUTPUT + 6)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(38.506523, 108.1443)), module, AudioInterface::AUDIO_OUTPUT + 7)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 54.577202)), module, AudioInterface::INPUT_LIGHT + 0)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 54.577202)), module, AudioInterface::INPUT_LIGHT + 1)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 69.158226)), module, AudioInterface::INPUT_LIGHT + 2)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 69.158226)), module, AudioInterface::INPUT_LIGHT + 3)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 91.147583)), module, AudioInterface::OUTPUT_LIGHT + 0)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 91.147583)), module, AudioInterface::OUTPUT_LIGHT + 1)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 107.17003)), module, AudioInterface::OUTPUT_LIGHT + 2)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 107.17003)), module, AudioInterface::OUTPUT_LIGHT + 3)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(3.7069211, 55.530807)), module, TAudioInterface::AUDIO_INPUT + 0)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(15.307249, 55.530807)), module, TAudioInterface::AUDIO_INPUT + 1)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(26.906193, 55.530807)), module, TAudioInterface::AUDIO_INPUT + 2)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(38.506519, 55.530807)), module, TAudioInterface::AUDIO_INPUT + 3)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(3.7069209, 70.144905)), module, TAudioInterface::AUDIO_INPUT + 4)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(15.307249, 70.144905)), module, TAudioInterface::AUDIO_INPUT + 5)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(26.906193, 70.144905)), module, TAudioInterface::AUDIO_INPUT + 6)); | |||
addInput(createInput<PJ301MPort>(mm2px(Vec(38.506519, 70.144905)), module, TAudioInterface::AUDIO_INPUT + 7)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(3.7069209, 92.143906)), module, TAudioInterface::AUDIO_OUTPUT + 0)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(15.307249, 92.143906)), module, TAudioInterface::AUDIO_OUTPUT + 1)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(26.906193, 92.143906)), module, TAudioInterface::AUDIO_OUTPUT + 2)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(38.506519, 92.143906)), module, TAudioInterface::AUDIO_OUTPUT + 3)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(3.7069209, 108.1443)), module, TAudioInterface::AUDIO_OUTPUT + 4)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(15.307249, 108.1443)), module, TAudioInterface::AUDIO_OUTPUT + 5)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(26.906193, 108.1443)), module, TAudioInterface::AUDIO_OUTPUT + 6)); | |||
addOutput(createOutput<PJ301MPort>(mm2px(Vec(38.506523, 108.1443)), module, TAudioInterface::AUDIO_OUTPUT + 7)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 54.577202)), module, TAudioInterface::INPUT_LIGHT + 0)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 54.577202)), module, TAudioInterface::INPUT_LIGHT + 1)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 69.158226)), module, TAudioInterface::INPUT_LIGHT + 2)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 69.158226)), module, TAudioInterface::INPUT_LIGHT + 3)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 91.147583)), module, TAudioInterface::OUTPUT_LIGHT + 0)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 91.147583)), module, TAudioInterface::OUTPUT_LIGHT + 1)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(12.524985, 107.17003)), module, TAudioInterface::OUTPUT_LIGHT + 2)); | |||
addChild(createLight<SmallLight<GreenLight>>(mm2px(Vec(35.725647, 107.17003)), module, TAudioInterface::OUTPUT_LIGHT + 3)); | |||
AudioWidget *audioWidget = createWidget<AudioWidget>(mm2px(Vec(3.2122073, 14.837339))); | |||
audioWidget->box.size = mm2px(Vec(44, 28)); | |||
@@ -277,4 +279,76 @@ struct AudioInterfaceWidget : ModuleWidget { | |||
}; | |||
Model *modelAudioInterface = createModel<AudioInterface, AudioInterfaceWidget>("AudioInterface"); | |||
struct AudioInterface16Widget : ModuleWidget { | |||
typedef AudioInterface<16, 16> TAudioInterface; | |||
AudioInterface16Widget(TAudioInterface *module) { | |||
setModule(module); | |||
setPanel(APP->window->loadSvg(asset::system("res/Core/AudioInterface16.svg"))); | |||
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0))); | |||
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); | |||
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); | |||
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.661, 59.638)), module, TAudioInterface::AUDIO_INPUT + 0)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.26, 59.638)), module, TAudioInterface::AUDIO_INPUT + 1)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.86, 59.638)), module, TAudioInterface::AUDIO_INPUT + 2)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.461, 59.638)), module, TAudioInterface::AUDIO_INPUT + 3)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.06, 59.638)), module, TAudioInterface::AUDIO_INPUT + 4)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.661, 59.638)), module, TAudioInterface::AUDIO_INPUT + 5)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.26, 59.638)), module, TAudioInterface::AUDIO_INPUT + 6)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.86, 59.638)), module, TAudioInterface::AUDIO_INPUT + 7)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.661, 74.251)), module, TAudioInterface::AUDIO_INPUT + 8)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(19.26, 74.251)), module, TAudioInterface::AUDIO_INPUT + 9)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(30.86, 74.251)), module, TAudioInterface::AUDIO_INPUT + 10)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(42.461, 74.251)), module, TAudioInterface::AUDIO_INPUT + 11)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(54.06, 74.251)), module, TAudioInterface::AUDIO_INPUT + 12)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(65.661, 74.251)), module, TAudioInterface::AUDIO_INPUT + 13)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(77.26, 74.251)), module, TAudioInterface::AUDIO_INPUT + 14)); | |||
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(88.86, 74.251)), module, TAudioInterface::AUDIO_INPUT + 15)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.661, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 0)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.26, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 1)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.86, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 2)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.461, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 3)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.06, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 4)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.661, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 5)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.26, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 6)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.86, 96.251)), module, TAudioInterface::AUDIO_OUTPUT + 7)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.661, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 8)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(19.26, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 9)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(30.86, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 10)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(42.461, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 11)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(54.06, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 12)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(65.661, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 13)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(77.26, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 14)); | |||
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(88.86, 112.252)), module, TAudioInterface::AUDIO_OUTPUT + 15)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(13.46, 55.667)), module, TAudioInterface::INPUT_LIGHT + 0)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(36.661, 55.667)), module, TAudioInterface::INPUT_LIGHT + 1)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(59.861, 55.667)), module, TAudioInterface::INPUT_LIGHT + 2)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(83.061, 55.667)), module, TAudioInterface::INPUT_LIGHT + 3)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(13.46, 70.248)), module, TAudioInterface::INPUT_LIGHT + 4)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(36.661, 70.248)), module, TAudioInterface::INPUT_LIGHT + 5)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(59.861, 70.248)), module, TAudioInterface::INPUT_LIGHT + 6)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(83.061, 70.248)), module, TAudioInterface::INPUT_LIGHT + 7)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(13.46, 92.238)), module, TAudioInterface::OUTPUT_LIGHT + 0)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(36.661, 92.238)), module, TAudioInterface::OUTPUT_LIGHT + 1)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(59.861, 92.238)), module, TAudioInterface::OUTPUT_LIGHT + 2)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(83.061, 92.238)), module, TAudioInterface::OUTPUT_LIGHT + 3)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(13.46, 108.259)), module, TAudioInterface::OUTPUT_LIGHT + 4)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(36.661, 108.259)), module, TAudioInterface::OUTPUT_LIGHT + 5)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(59.861, 108.259)), module, TAudioInterface::OUTPUT_LIGHT + 6)); | |||
addChild(createLightCentered<SmallLight<GreenLight>>(mm2px(Vec(83.061, 108.259)), module, TAudioInterface::OUTPUT_LIGHT + 7)); | |||
AudioWidget *audioWidget = createWidget<AudioWidget>(mm2px(Vec(2.57, 14.839))); | |||
audioWidget->box.size = mm2px(Vec(91.382, 28.0)); | |||
audioWidget->setAudioPort(module ? &module->port : NULL); | |||
addChild(audioWidget); | |||
} | |||
}; | |||
Model *modelAudioInterface = createModel<AudioInterface<8, 8>, AudioInterface8Widget>("AudioInterface"); | |||
Model *modelAudioInterface16 = createModel<AudioInterface<16, 16>, AudioInterface16Widget>("AudioInterface16"); |
@@ -93,13 +93,14 @@ struct BlankWidget : ModuleWidget { | |||
Widget *topRightScrew; | |||
Widget *bottomRightScrew; | |||
Widget *rightHandle; | |||
BlankPanel *blankPanel; | |||
BlankWidget(Module *module) { | |||
setModule(module); | |||
box.size = Vec(RACK_GRID_WIDTH * 10, RACK_GRID_HEIGHT); | |||
panel = new BlankPanel; | |||
addChild(panel); | |||
blankPanel = new BlankPanel; | |||
addChild(blankPanel); | |||
ModuleResizeHandle *leftHandle = new ModuleResizeHandle; | |||
ModuleResizeHandle *rightHandle = new ModuleResizeHandle; | |||
@@ -117,7 +118,7 @@ struct BlankWidget : ModuleWidget { | |||
} | |||
void step() override { | |||
panel->box.size = box.size; | |||
blankPanel->box.size = box.size; | |||
topRightScrew->box.pos.x = box.size.x - 30; | |||
bottomRightScrew->box.pos.x = box.size.x - 30; | |||
if (box.size.x < RACK_GRID_WIDTH * 6) { | |||
@@ -13,11 +13,16 @@ void init(rack::Plugin *p) { | |||
p->manualUrl = "https://vcvrack.com/manual/Core.html"; | |||
p->sourceUrl = "https://github.com/VCVRack/Rack"; | |||
modelAudioInterface->name = "Audio"; | |||
modelAudioInterface->name = "Audio 8"; | |||
modelAudioInterface->description = "Sends audio and CV to/from an audio device"; | |||
modelAudioInterface->tags = {"External"}; | |||
p->addModel(modelAudioInterface); | |||
modelAudioInterface16->name = "Audio 16"; | |||
modelAudioInterface16->description = "Sends audio and CV to/from an audio device"; | |||
modelAudioInterface16->tags = {"External"}; | |||
p->addModel(modelAudioInterface16); | |||
modelMIDI_CV->name = "MIDI-CV"; | |||
modelMIDI_CV->description = "Converts MIDI from an external device to CV and gates"; | |||
modelMIDI_CV->tags = {"External", "MIDI"}; | |||
@@ -5,6 +5,7 @@ using namespace rack; | |||
extern Model *modelAudioInterface; | |||
extern Model *modelAudioInterface16; | |||
extern Model *modelMIDI_CV; | |||
extern Model *modelMIDI_CC; | |||
extern Model *modelMIDI_Gate; | |||
@@ -1,5 +1,4 @@ | |||
#include "app/AudioWidget.hpp" | |||
#include "audio.hpp" | |||
#include "helpers.hpp" | |||
@@ -9,9 +8,9 @@ namespace app { | |||
struct AudioDriverItem : ui::MenuItem { | |||
audio::Port *port; | |||
int driver; | |||
int driverId; | |||
void onAction(const event::Action &e) override { | |||
port->setDriver(driver); | |||
port->setDriverId(driverId); | |||
} | |||
}; | |||
@@ -23,30 +22,36 @@ struct AudioDriverChoice : LedDisplayChoice { | |||
ui::Menu *menu = createMenu(); | |||
menu->addChild(createMenuLabel("Audio driver")); | |||
for (int driver : port->getDrivers()) { | |||
for (int driverId : port->getDriverIds()) { | |||
AudioDriverItem *item = new AudioDriverItem; | |||
item->port = port; | |||
item->driver = driver; | |||
item->text = port->getDriverName(driver); | |||
item->rightText = CHECKMARK(item->driver == port->driver); | |||
item->driverId = driverId; | |||
item->text = port->getDriverName(driverId); | |||
item->rightText = CHECKMARK(item->driverId == port->driverId); | |||
menu->addChild(item); | |||
} | |||
} | |||
void step() override { | |||
if (port) | |||
text = port->getDriverName(port->driver); | |||
else | |||
text = "Audio driver"; | |||
text = (box.size.x >= 200.0) ? "Driver: " : ""; | |||
std::string driverName = (port) ? port->getDriverName(port->driverId) : ""; | |||
if (driverName != "") { | |||
text += driverName; | |||
color.a = 1.f; | |||
} | |||
else { | |||
text += "(No driver)"; | |||
color.a = 0.5f; | |||
} | |||
} | |||
}; | |||
struct AudioDeviceItem : ui::MenuItem { | |||
audio::Port *port; | |||
int device; | |||
int deviceId; | |||
int offset; | |||
void onAction(const event::Action &e) override { | |||
port->setDevice(device, offset); | |||
port->setDeviceId(deviceId, offset); | |||
} | |||
}; | |||
@@ -65,36 +70,34 @@ struct AudioDeviceChoice : LedDisplayChoice { | |||
{ | |||
AudioDeviceItem *item = new AudioDeviceItem; | |||
item->port = port; | |||
item->device = -1; | |||
item->deviceId = -1; | |||
item->text = "(No device)"; | |||
item->rightText = CHECKMARK(item->device == port->device); | |||
item->rightText = CHECKMARK(item->deviceId == port->deviceId); | |||
menu->addChild(item); | |||
} | |||
for (int device = 0; device < deviceCount; device++) { | |||
int channels = std::min(maxTotalChannels, port->getDeviceChannels(device)); | |||
for (int deviceId = 0; deviceId < deviceCount; deviceId++) { | |||
int channels = std::min(maxTotalChannels, port->getDeviceChannels(deviceId)); | |||
for (int offset = 0; offset < channels; offset += port->maxChannels) { | |||
AudioDeviceItem *item = new AudioDeviceItem; | |||
item->port = port; | |||
item->device = device; | |||
item->deviceId = deviceId; | |||
item->offset = offset; | |||
item->text = port->getDeviceDetail(device, offset); | |||
item->rightText = CHECKMARK(item->device == port->device && item->offset == port->offset); | |||
item->text = port->getDeviceDetail(deviceId, offset); | |||
item->rightText = CHECKMARK(item->deviceId == port->deviceId && item->offset == port->offset); | |||
menu->addChild(item); | |||
} | |||
} | |||
} | |||
void step() override { | |||
if (!port) { | |||
text = "Audio device"; | |||
return; | |||
} | |||
text = port->getDeviceDetail(port->device, port->offset); | |||
if (text.empty()) { | |||
text = "(No device)"; | |||
color.a = 0.5f; | |||
text = (box.size.x >= 200.0) ? "Device: " : ""; | |||
std::string detail = (port) ? port->getDeviceDetail(port->deviceId, port->offset) : ""; | |||
if (detail != "") { | |||
text += detail; | |||
color.a = (detail == "") ? 0.5f : 1.f; | |||
} | |||
else { | |||
color.a = 1.f; | |||
text += "(No device)"; | |||
color.a = 0.5f; | |||
} | |||
} | |||
}; | |||
@@ -130,10 +133,13 @@ struct AudioSampleRateChoice : LedDisplayChoice { | |||
} | |||
} | |||
void step() override { | |||
if (port) | |||
text = string::f("%g kHz", port->sampleRate / 1000.0); | |||
else | |||
text = "44.1 kHz"; | |||
text = (box.size.x >= 100.0) ? "Rate: " : ""; | |||
if (port) { | |||
text += string::f("%g kHz", port->sampleRate / 1000.0); | |||
} | |||
else { | |||
text += "0 kHz"; | |||
} | |||
} | |||
}; | |||
@@ -169,10 +175,13 @@ struct AudioBlockSizeChoice : LedDisplayChoice { | |||
} | |||
} | |||
void step() override { | |||
if (port) | |||
text = string::f("%d", port->blockSize); | |||
else | |||
text = "256"; | |||
text = (box.size.x >= 100.0) ? "Block size: " : ""; | |||
if (port) { | |||
text += string::f("%d", port->blockSize); | |||
} | |||
else { | |||
text += "0"; | |||
} | |||
} | |||
}; | |||
@@ -43,6 +43,9 @@ void Knob::onDragStart(const event::DragStart &e) { | |||
} | |||
void Knob::onDragEnd(const event::DragEnd &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
APP->window->cursorUnlock(); | |||
if (paramQuantity) { | |||
@@ -66,6 +69,9 @@ void Knob::onDragEnd(const event::DragEnd &e) { | |||
} | |||
void Knob::onDragMove(const event::DragMove &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
if (paramQuantity) { | |||
float range; | |||
if (paramQuantity->isBounded()) { | |||
@@ -28,6 +28,11 @@ struct MenuButton : ui::Button { | |||
Widget::step(); | |||
} | |||
void draw(const DrawArgs &args) override { | |||
BNDwidgetState state = BND_DEFAULT; | |||
if (APP->event->hoveredWidget == this) | |||
state = BND_HOVER; | |||
if (APP->event->draggedWidget == this) | |||
state = BND_ACTIVE; | |||
bndMenuItem(args.vg, 0.0, 0.0, box.size.x, box.size.y, state, -1, text.c_str()); | |||
} | |||
}; | |||
@@ -484,6 +489,20 @@ struct ManageItem : ui::MenuItem { | |||
struct SyncItem : ui::MenuItem { | |||
void onAction(const event::Action &e) override { | |||
std::thread t([=]() { | |||
plugin::syncUpdates(); | |||
}); | |||
t.detach(); | |||
} | |||
}; | |||
struct UpdateItem : ui::MenuItem { | |||
std::string changelogUrl; | |||
void onAction(const event::Action &e) override { | |||
std::thread t([=]() { | |||
system::openBrowser(changelogUrl); | |||
}); | |||
t.detach(); | |||
} | |||
}; | |||
@@ -562,24 +581,47 @@ struct PluginsMenu : ui::Menu { | |||
void refresh() { | |||
clearChildren(); | |||
if (0) { | |||
ui::ProgressBar *downloadProgressBar = new ui::ProgressBar; | |||
downloadProgressBar->quantity = new DownloadQuantity; | |||
addChild(downloadProgressBar); | |||
{ | |||
ui::MenuLabel *disabledLable = new ui::MenuLabel; | |||
disabledLable->text = "Server not yet available"; | |||
addChild(disabledLable); | |||
return; | |||
} | |||
else if (plugin::isLoggedIn()) { | |||
if (plugin::isLoggedIn()) { | |||
ManageItem *manageItem = new ManageItem; | |||
manageItem->text = "Manage"; | |||
addChild(manageItem); | |||
LogOutItem *logOutItem = new LogOutItem; | |||
logOutItem->text = "Log out"; | |||
addChild(logOutItem); | |||
SyncItem *syncItem = new SyncItem; | |||
syncItem->text = "Update all"; | |||
syncItem->disabled = true; | |||
syncItem->disabled = plugin::updates.empty(); | |||
addChild(syncItem); | |||
LogOutItem *logOutItem = new LogOutItem; | |||
logOutItem->text = "Log out"; | |||
addChild(logOutItem); | |||
if (!plugin::updates.empty()) { | |||
addChild(new ui::MenuEntry); | |||
ui::MenuLabel *updatesLabel = new ui::MenuLabel; | |||
updatesLabel->text = "Updates (click for changelog)"; | |||
addChild(updatesLabel); | |||
for (const plugin::Update &update : plugin::updates) { | |||
UpdateItem *updateItem = new UpdateItem; | |||
updateItem->text = update.pluginSlug; | |||
plugin::Plugin *p = plugin::getPlugin(update.pluginSlug); | |||
if (p) { | |||
updateItem->rightText += "v" + p->version + " → "; | |||
} | |||
updateItem->rightText += "v" + update.version; | |||
updateItem->changelogUrl = update.changelogUrl; | |||
updateItem->disabled = update.changelogUrl.empty(); | |||
addChild(updateItem); | |||
} | |||
} | |||
} | |||
else { | |||
RegisterItem *registerItem = new RegisterItem; | |||
@@ -1,5 +1,4 @@ | |||
#include "app/MidiWidget.hpp" | |||
#include "midi.hpp" | |||
#include "helpers.hpp" | |||
@@ -33,11 +32,7 @@ struct MidiDriverChoice : LedDisplayChoice { | |||
} | |||
} | |||
void step() override { | |||
if (!port) { | |||
text = "MIDI driver"; | |||
return; | |||
} | |||
text = port->getDriverName(port->driverId); | |||
text = port ? port->getDriverName(port->driverId) : ""; | |||
if (text.empty()) { | |||
text = "(No driver)"; | |||
color.a = 0.5f; | |||
@@ -82,11 +77,7 @@ struct MidiDeviceChoice : LedDisplayChoice { | |||
} | |||
} | |||
void step() override { | |||
if (!port) { | |||
text = "MIDI device"; | |||
return; | |||
} | |||
text = port->getDeviceName(port->deviceId); | |||
text = port ? port->getDeviceName(port->deviceId) : ""; | |||
if (text.empty()) { | |||
text = "(No device)"; | |||
color.a = 0.5f; | |||
@@ -123,10 +114,7 @@ struct MidiChannelChoice : LedDisplayChoice { | |||
} | |||
} | |||
void step() override { | |||
if (port) | |||
text = port->getChannelName(port->channel); | |||
else | |||
text = "MIDI channel"; | |||
text = port ? port->getChannelName(port->channel) : "Channel 1"; | |||
} | |||
}; | |||
@@ -12,13 +12,13 @@ void ModuleLightWidget::step() { | |||
assert(module->lights.size() >= firstLightId + baseColors.size()); | |||
for (size_t i = 0; i < baseColors.size(); i++) { | |||
float brightness = module->lights[firstLightId + i].getBrightness(); | |||
if (!std::isfinite(brightness)) | |||
brightness = 0.f; | |||
float b = module->lights[firstLightId + i].getBrightness(); | |||
if (!std::isfinite(b)) | |||
b = 0.f; | |||
b = math::clamp(b, 0.f, 1.f); | |||
// Because LEDs are nonlinear, this seems to look more natural. | |||
brightness = std::sqrt(brightness); | |||
brightness = math::clamp(brightness, 0.f, 1.f); | |||
brightnesses[i] = brightness; | |||
b = std::sqrt(b); | |||
brightnesses[i] = b; | |||
} | |||
} | |||
else { | |||
@@ -1,8 +1,8 @@ | |||
#include "app/ModuleWidget.hpp" | |||
#include "app/Scene.hpp" | |||
#include "app/SvgPanel.hpp" | |||
#include "engine/Engine.hpp" | |||
#include "plugin/Plugin.hpp" | |||
#include "app/SvgPanel.hpp" | |||
#include "system.hpp" | |||
#include "asset.hpp" | |||
#include "helpers.hpp" | |||
@@ -311,7 +311,7 @@ void ModuleWidget::onButton(const event::Button &e) { | |||
if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) { | |||
createContextMenu(); | |||
e.consume(NULL); | |||
e.consume(this); | |||
} | |||
} | |||
@@ -390,6 +390,9 @@ void ModuleWidget::onDragStart(const event::DragStart &e) { | |||
} | |||
void ModuleWidget::onDragEnd(const event::DragEnd &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
history::ComplexAction *h = APP->scene->rack->getModuleDragAction(); | |||
if (!h) { | |||
delete h; | |||
@@ -399,6 +402,9 @@ void ModuleWidget::onDragEnd(const event::DragEnd &e) { | |||
} | |||
void ModuleWidget::onDragMove(const event::DragMove &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
if (!settings::lockModules) { | |||
math::Vec pos = APP->scene->rack->mousePos.minus(dragPos); | |||
if ((APP->window->getMods() & RACK_MOD_MASK) == RACK_MOD_CTRL) | |||
@@ -416,18 +422,21 @@ void ModuleWidget::setModule(engine::Module *module) { | |||
} | |||
void ModuleWidget::setPanel(std::shared_ptr<Svg> svg) { | |||
// Remove old panel | |||
// Remove existing panel | |||
if (panel) { | |||
removeChild(panel); | |||
delete panel; | |||
panel = NULL; | |||
} | |||
// Create SvgPanel | |||
SvgPanel *svgPanel = new SvgPanel; | |||
svgPanel->setBackground(svg); | |||
addChild(svgPanel); | |||
box.size.x = std::round(svgPanel->box.size.x / RACK_GRID_WIDTH) * RACK_GRID_WIDTH; | |||
panel = svgPanel; | |||
addChildBottom(panel); | |||
// Set ModuleWidget size based on panel | |||
box.size.x = std::round(panel->box.size.x / RACK_GRID_WIDTH) * RACK_GRID_WIDTH; | |||
} | |||
void ModuleWidget::addParam(ParamWidget *param) { | |||
@@ -74,7 +74,7 @@ void PortWidget::onButton(const event::Button &e) { | |||
delete cw; | |||
} | |||
e.consume(NULL); | |||
e.consume(this); | |||
} | |||
} | |||
@@ -135,6 +135,9 @@ void PortWidget::onDragStart(const event::DragStart &e) { | |||
} | |||
void PortWidget::onDragEnd(const event::DragEnd &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
CableWidget *cw = APP->scene->rack->releaseIncompleteCable(); | |||
if (cw->isComplete()) { | |||
APP->scene->rack->addCable(cw); | |||
@@ -150,6 +153,9 @@ void PortWidget::onDragEnd(const event::DragEnd &e) { | |||
} | |||
void PortWidget::onDragDrop(const event::DragDrop &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
// Reject ports if this is an input port and something is already plugged into it | |||
if (type == INPUT) { | |||
if (APP->scene->rack->getTopCable(this)) | |||
@@ -167,6 +173,9 @@ void PortWidget::onDragDrop(const event::DragDrop &e) { | |||
} | |||
void PortWidget::onDragEnter(const event::DragEnter &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
// Reject ports if this is an input port and something is already plugged into it | |||
if (type == INPUT) { | |||
if (APP->scene->rack->getTopCable(this)) | |||
@@ -183,6 +192,9 @@ void PortWidget::onDragEnter(const event::DragEnter &e) { | |||
} | |||
void PortWidget::onDragLeave(const event::DragLeave &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
PortWidget *originPort = dynamic_cast<PortWidget*>(e.origin); | |||
if (!originPort) | |||
return; | |||
@@ -34,24 +34,18 @@ void RackScrollWidget::step() { | |||
zoomPos = box.size.div(2); | |||
// Set zoomWidget box to module bounding box | |||
// Compute module bounding box | |||
math::Rect moduleBox = rackWidget->moduleContainer->getChildrenBoundingBox(); | |||
if (!moduleBox.size.isFinite()) | |||
moduleBox = math::Rect(RACK_OFFSET, math::Vec(0, 0)); | |||
zoomWidget->box.pos = moduleBox.pos.mult(zoom); | |||
zoomWidget->box.size = moduleBox.size.mult(zoom); | |||
// Expand to moduleBox | |||
math::Rect scrollBox = moduleBox.grow(RACK_GRID_SIZE.mult(math::Vec(50, 2))); | |||
// Expand moduleBox by half a screen size | |||
math::Rect scrollBox = moduleBox; | |||
scrollBox.pos = scrollBox.pos.mult(zoom); | |||
scrollBox.size = scrollBox.size.mult(zoom); | |||
scrollBox = scrollBox.grow(box.size.mult(0.6666)); | |||
// Expand scrollBox to center the moduleBox | |||
math::Vec s = box.size.minus(scrollBox.size).max(math::Vec()); | |||
scrollBox.pos = scrollBox.pos.minus(s.div(2)); | |||
scrollBox.size = scrollBox.size.plus(s); | |||
// Expand to viewport size | |||
// Expand to the current viewport box so that moving modules (and thus changing the module bounding box) doesn't clamp the scroll offset. | |||
math::Rect viewportBox; | |||
viewportBox.pos = oldOffset; | |||
viewportBox.size = box.size; | |||
@@ -352,8 +352,8 @@ static void RackWidget_updateAdjacent(RackWidget *that) { | |||
} | |||
ModuleWidget *mw = dynamic_cast<ModuleWidget*>(w); | |||
mw->module->rightModuleId = mwRight ? mwRight->module->id : -1; | |||
mw->module->leftModuleId = mwLeft ? mwLeft->module->id : -1; | |||
mw->module->leftExpander.moduleId = mwLeft ? mwLeft->module->id : -1; | |||
mw->module->rightExpander.moduleId = mwRight ? mwRight->module->id : -1; | |||
} | |||
} | |||
@@ -148,7 +148,7 @@ void Scene::onHoverKey(const event::HoverKey &e) { | |||
case GLFW_KEY_F11: { | |||
APP->window->setFullScreen(!APP->window->isFullScreen()); | |||
e.consume(this); | |||
} | |||
} break; | |||
} | |||
} | |||
} | |||
@@ -170,7 +170,7 @@ void Scene::onPathDrop(const event::PathDrop &e) { | |||
void Scene::runCheckVersion() { | |||
std::string versionUrl = app::API_URL; | |||
versionUrl += "/version"; | |||
json_t *versionResJ = network::requestJson(network::GET, versionUrl, NULL); | |||
json_t *versionResJ = network::requestJson(network::METHOD_GET, versionUrl, NULL); | |||
if (versionResJ) { | |||
json_t *versionJ = json_object_get(versionResJ, "version"); | |||
@@ -6,8 +6,18 @@ namespace app { | |||
SvgScrew::SvgScrew() { | |||
fb = new widget::FramebufferWidget; | |||
addChild(fb); | |||
sw = new widget::SvgWidget; | |||
addChild(sw); | |||
fb->addChild(sw); | |||
} | |||
void SvgScrew::setSvg(std::shared_ptr<Svg> svg) { | |||
sw->setSvg(svg); | |||
fb->box.size = sw->box.size; | |||
box.size = sw->box.size; | |||
} | |||
@@ -67,6 +67,9 @@ void Switch::onDragStart(const event::DragStart &e) { | |||
} | |||
void Switch::onDragEnd(const event::DragEnd &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
if (momentary) { | |||
momentaryReleased = true; | |||
} | |||
@@ -0,0 +1,15 @@ | |||
#include "app/common.hpp" | |||
namespace rack { | |||
namespace app { | |||
const char APP_NAME[] = "VCV Rack"; | |||
const char APP_VERSION[] = TOSTRING(VERSION); | |||
const char API_URL[] = "https://api.vcvrack.com"; | |||
} // namespace app | |||
} // namespace rack |
@@ -10,14 +10,14 @@ namespace audio { | |||
Port::Port() { | |||
setDriver(RtAudio::UNSPECIFIED); | |||
setDriverId(RtAudio::UNSPECIFIED); | |||
} | |||
Port::~Port() { | |||
closeStream(); | |||
} | |||
std::vector<int> Port::getDrivers() { | |||
std::vector<int> Port::getDriverIds() { | |||
std::vector<RtAudio::Api> apis; | |||
RtAudio::getCompiledApi(apis); | |||
std::vector<int> drivers; | |||
@@ -29,8 +29,8 @@ std::vector<int> Port::getDrivers() { | |||
return drivers; | |||
} | |||
std::string Port::getDriverName(int driver) { | |||
switch (driver) { | |||
std::string Port::getDriverName(int driverId) { | |||
switch (driverId) { | |||
case RtAudio::UNSPECIFIED: return "Unspecified"; | |||
case RtAudio::LINUX_ALSA: return "ALSA"; | |||
case RtAudio::LINUX_PULSE: return "PulseAudio"; | |||
@@ -46,24 +46,24 @@ std::string Port::getDriverName(int driver) { | |||
} | |||
} | |||
void Port::setDriver(int driver) { | |||
void Port::setDriverId(int driverId) { | |||
// Close device | |||
setDevice(-1, 0); | |||
setDeviceId(-1, 0); | |||
// Close driver | |||
if (rtAudio) { | |||
delete rtAudio; | |||
rtAudio = NULL; | |||
} | |||
this->driver = 0; | |||
this->driverId = 0; | |||
// Open driver | |||
if (driver >= 0) { | |||
rtAudio = new RtAudio((RtAudio::Api) driver); | |||
this->driver = (int) rtAudio->getCurrentApi(); | |||
if (driverId >= 0) { | |||
rtAudio = new RtAudio((RtAudio::Api) driverId); | |||
this->driverId = (int) rtAudio->getCurrentApi(); | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
this->driver = BRIDGE_DRIVER; | |||
else if (driverId == BRIDGE_DRIVER) { | |||
this->driverId = BRIDGE_DRIVER; | |||
} | |||
} | |||
@@ -71,24 +71,24 @@ int Port::getDeviceCount() { | |||
if (rtAudio) { | |||
return rtAudio->getDeviceCount(); | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
else if (driverId == BRIDGE_DRIVER) { | |||
return BRIDGE_NUM_PORTS; | |||
} | |||
return 0; | |||
} | |||
bool Port::getDeviceInfo(int device, RtAudio::DeviceInfo *deviceInfo) { | |||
bool Port::getDeviceInfo(int deviceId, RtAudio::DeviceInfo *deviceInfo) { | |||
if (!deviceInfo) | |||
return false; | |||
if (rtAudio) { | |||
if (device == this->device) { | |||
if (deviceId == this->deviceId) { | |||
*deviceInfo = this->deviceInfo; | |||
return true; | |||
} | |||
else { | |||
try { | |||
*deviceInfo = rtAudio->getDeviceInfo(device); | |||
*deviceInfo = rtAudio->getDeviceInfo(deviceId); | |||
return true; | |||
} | |||
catch (RtAudioError &e) { | |||
@@ -100,43 +100,43 @@ bool Port::getDeviceInfo(int device, RtAudio::DeviceInfo *deviceInfo) { | |||
return false; | |||
} | |||
int Port::getDeviceChannels(int device) { | |||
if (device < 0) | |||
int Port::getDeviceChannels(int deviceId) { | |||
if (deviceId < 0) | |||
return 0; | |||
if (rtAudio) { | |||
RtAudio::DeviceInfo deviceInfo; | |||
if (getDeviceInfo(device, &deviceInfo)) | |||
if (getDeviceInfo(deviceId, &deviceInfo)) | |||
return std::max((int) deviceInfo.inputChannels, (int) deviceInfo.outputChannels); | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
else if (driverId == BRIDGE_DRIVER) { | |||
return std::max(BRIDGE_OUTPUTS, BRIDGE_INPUTS); | |||
} | |||
return 0; | |||
} | |||
std::string Port::getDeviceName(int device) { | |||
if (device < 0) | |||
std::string Port::getDeviceName(int deviceId) { | |||
if (deviceId < 0) | |||
return ""; | |||
if (rtAudio) { | |||
RtAudio::DeviceInfo deviceInfo; | |||
if (getDeviceInfo(device, &deviceInfo)) | |||
if (getDeviceInfo(deviceId, &deviceInfo)) | |||
return deviceInfo.name; | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
return string::f("%d", device + 1); | |||
else if (driverId == BRIDGE_DRIVER) { | |||
return string::f("%d", deviceId + 1); | |||
} | |||
return ""; | |||
} | |||
std::string Port::getDeviceDetail(int device, int offset) { | |||
if (device < 0) | |||
std::string Port::getDeviceDetail(int deviceId, int offset) { | |||
if (deviceId < 0) | |||
return ""; | |||
if (rtAudio) { | |||
RtAudio::DeviceInfo deviceInfo; | |||
if (getDeviceInfo(device, &deviceInfo)) { | |||
if (getDeviceInfo(deviceId, &deviceInfo)) { | |||
std::string deviceDetail = string::f("%s (", deviceInfo.name.c_str()); | |||
if (offset < (int) deviceInfo.inputChannels) | |||
deviceDetail += string::f("%d-%d in", offset + 1, std::min(offset + maxChannels, (int) deviceInfo.inputChannels)); | |||
@@ -148,15 +148,15 @@ std::string Port::getDeviceDetail(int device, int offset) { | |||
return deviceDetail; | |||
} | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
return string::f("Port %d", device + 1); | |||
else if (driverId == BRIDGE_DRIVER) { | |||
return string::f("Port %d", deviceId + 1); | |||
} | |||
return ""; | |||
} | |||
void Port::setDevice(int device, int offset) { | |||
void Port::setDeviceId(int deviceId, int offset) { | |||
closeStream(); | |||
this->device = device; | |||
this->deviceId = deviceId; | |||
this->offset = offset; | |||
openStream(); | |||
} | |||
@@ -164,7 +164,7 @@ void Port::setDevice(int device, int offset) { | |||
std::vector<int> Port::getSampleRates() { | |||
if (rtAudio) { | |||
try { | |||
RtAudio::DeviceInfo deviceInfo = rtAudio->getDeviceInfo(device); | |||
RtAudio::DeviceInfo deviceInfo = rtAudio->getDeviceInfo(deviceId); | |||
std::vector<int> sampleRates(deviceInfo.sampleRates.begin(), deviceInfo.sampleRates.end()); | |||
return sampleRates; | |||
} | |||
@@ -218,13 +218,13 @@ static int rtCallback(void *outputBuffer, void *inputBuffer, unsigned int nFrame | |||
} | |||
void Port::openStream() { | |||
if (device < 0) | |||
if (deviceId < 0) | |||
return; | |||
if (rtAudio) { | |||
// Open new device | |||
try { | |||
deviceInfo = rtAudio->getDeviceInfo(device); | |||
deviceInfo = rtAudio->getDeviceInfo(deviceId); | |||
} | |||
catch (RtAudioError &e) { | |||
WARN("Failed to query RtAudio device: %s", e.what()); | |||
@@ -237,17 +237,17 @@ void Port::openStream() { | |||
setChannels(math::clamp((int) deviceInfo.outputChannels - offset, 0, maxChannels), math::clamp((int) deviceInfo.inputChannels - offset, 0, maxChannels)); | |||
if (numOutputs == 0 && numInputs == 0) { | |||
WARN("RtAudio device %d has 0 inputs and 0 outputs", device); | |||
WARN("RtAudio device %d has 0 inputs and 0 outputs", deviceId); | |||
return; | |||
} | |||
RtAudio::StreamParameters outParameters; | |||
outParameters.deviceId = device; | |||
outParameters.deviceId = deviceId; | |||
outParameters.nChannels = numOutputs; | |||
outParameters.firstChannel = offset; | |||
RtAudio::StreamParameters inParameters; | |||
inParameters.deviceId = device; | |||
inParameters.deviceId = deviceId; | |||
inParameters.nChannels = numInputs; | |||
inParameters.firstChannel = offset; | |||
@@ -263,7 +263,7 @@ void Port::openStream() { | |||
} | |||
try { | |||
INFO("Opening audio RtAudio device %d with %d in %d out", device, numInputs, numOutputs); | |||
INFO("Opening audio RtAudio device %d with %d in %d out", deviceId, numInputs, numOutputs); | |||
rtAudio->openStream( | |||
numOutputs == 0 ? NULL : &outParameters, | |||
numInputs == 0 ? NULL : &inParameters, | |||
@@ -276,7 +276,7 @@ void Port::openStream() { | |||
} | |||
try { | |||
INFO("Starting RtAudio stream %d", device); | |||
INFO("Starting RtAudio stream %d", deviceId); | |||
rtAudio->startStream(); | |||
} | |||
catch (RtAudioError &e) { | |||
@@ -288,9 +288,9 @@ void Port::openStream() { | |||
this->sampleRate = rtAudio->getStreamSampleRate(); | |||
onOpenStream(); | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
else if (driverId == BRIDGE_DRIVER) { | |||
setChannels(BRIDGE_OUTPUTS, BRIDGE_INPUTS); | |||
bridgeAudioSubscribe(device, this); | |||
bridgeAudioSubscribe(deviceId, this); | |||
} | |||
} | |||
@@ -299,7 +299,7 @@ void Port::closeStream() { | |||
if (rtAudio) { | |||
if (rtAudio->isStreamRunning()) { | |||
INFO("Stopping RtAudio stream %d", device); | |||
INFO("Stopping RtAudio stream %d", deviceId); | |||
try { | |||
rtAudio->stopStream(); | |||
} | |||
@@ -308,7 +308,7 @@ void Port::closeStream() { | |||
} | |||
} | |||
if (rtAudio->isStreamOpen()) { | |||
INFO("Closing RtAudio stream %d", device); | |||
INFO("Closing RtAudio stream %d", deviceId); | |||
try { | |||
rtAudio->closeStream(); | |||
} | |||
@@ -318,8 +318,8 @@ void Port::closeStream() { | |||
} | |||
deviceInfo = RtAudio::DeviceInfo(); | |||
} | |||
else if (driver == BRIDGE_DRIVER) { | |||
bridgeAudioUnsubscribe(device, this); | |||
else if (driverId == BRIDGE_DRIVER) { | |||
bridgeAudioUnsubscribe(deviceId, this); | |||
} | |||
onCloseStream(); | |||
@@ -327,8 +327,8 @@ void Port::closeStream() { | |||
json_t *Port::toJson() { | |||
json_t *rootJ = json_object(); | |||
json_object_set_new(rootJ, "driver", json_integer(driver)); | |||
std::string deviceName = getDeviceName(device); | |||
json_object_set_new(rootJ, "driver", json_integer(driverId)); | |||
std::string deviceName = getDeviceName(deviceId); | |||
if (!deviceName.empty()) | |||
json_object_set_new(rootJ, "deviceName", json_string(deviceName.c_str())); | |||
json_object_set_new(rootJ, "offset", json_integer(offset)); | |||
@@ -343,15 +343,15 @@ void Port::fromJson(json_t *rootJ) { | |||
json_t *driverJ = json_object_get(rootJ, "driver"); | |||
if (driverJ) | |||
setDriver(json_number_value(driverJ)); | |||
setDriverId(json_number_value(driverJ)); | |||
json_t *deviceNameJ = json_object_get(rootJ, "deviceName"); | |||
if (deviceNameJ) { | |||
std::string deviceName = json_string_value(deviceNameJ); | |||
// Search for device ID with equal name | |||
for (int device = 0; device < getDeviceCount(); device++) { | |||
if (getDeviceName(device) == deviceName) { | |||
this->device = device; | |||
for (int deviceId = 0; deviceId < getDeviceCount(); deviceId++) { | |||
if (getDeviceName(deviceId) == deviceName) { | |||
this->deviceId = deviceId; | |||
break; | |||
} | |||
} | |||
@@ -21,3 +21,6 @@ | |||
#define NANOSVG_IMPLEMENTATION | |||
#define NANOSVG_ALL_COLOR_KEYWORDS | |||
#include <nanosvg.h> | |||
#define STB_IMAGE_WRITE_IMPLEMENTATION | |||
#include <stb_image_write.h> |
@@ -10,7 +10,7 @@ namespace dsp { | |||
void minBlepImpulse(int z, int o, float *output) { | |||
// Symmetric sinc array with `z` zero-crossings on each side | |||
int n = 2 * z * o; | |||
float *x = alignedNew<float>(n); | |||
float *x = new float[n]; | |||
for (int i = 0; i < n; i++) { | |||
float p = math::rescale((float) i, 0.f, (float) (n - 1), (float) -z, (float) z); | |||
x[i] = sinc(p); | |||
@@ -20,7 +20,7 @@ void minBlepImpulse(int z, int o, float *output) { | |||
blackmanHarrisWindow(x, n); | |||
// Real cepstrum | |||
float *fx = alignedNew<float>(2*n); | |||
float *fx = new float[2*n]; | |||
RealFFT rfft(n); | |||
rfft.rfft(x, fx); | |||
// fx = log(abs(fx)) | |||
@@ -73,8 +73,8 @@ void minBlepImpulse(int z, int o, float *output) { | |||
std::memcpy(output, x, n * sizeof(float)); | |||
// Cleanup | |||
alignedDelete(x); | |||
alignedDelete(fx); | |||
delete[] x; | |||
delete[] fx; | |||
} | |||
@@ -9,8 +9,7 @@ | |||
#include <condition_variable> | |||
#include <mutex> | |||
#include <atomic> | |||
#include <xmmintrin.h> | |||
#include <pmmintrin.h> | |||
#include <x86intrin.h> | |||
namespace rack { | |||
@@ -90,7 +89,54 @@ struct SpinBarrier { | |||
count = 0; | |||
} | |||
else { | |||
while (count != 0); | |||
while (count != 0) { | |||
_mm_pause(); | |||
} | |||
} | |||
} | |||
}; | |||
/** Spinlocks until all `total` threads are waiting. | |||
If `yield` is set to true at any time, all threads will switch to waiting on a mutex instead. | |||
All threads must return before beginning a new phase. Alternating between two barriers solves this problem. | |||
*/ | |||
struct HybridBarrier { | |||
std::atomic<int> count {0}; | |||
int total = 0; | |||
std::mutex mutex; | |||
std::condition_variable cv; | |||
std::atomic<bool> yield {false}; | |||
void wait() { | |||
int id = ++count; | |||
// End and reset phase if this is the last thread | |||
if (id == total) { | |||
count = 0; | |||
if (yield) { | |||
std::unique_lock<std::mutex> lock(mutex); | |||
cv.notify_all(); | |||
yield = false; | |||
} | |||
return; | |||
} | |||
// Spinlock | |||
while (!yield) { | |||
if (count == 0) | |||
return; | |||
_mm_pause(); | |||
} | |||
// Wait on mutex | |||
{ | |||
std::unique_lock<std::mutex> lock(mutex); | |||
cv.wait(lock, [&]{ | |||
return count == 0; | |||
}); | |||
} | |||
} | |||
}; | |||
@@ -104,6 +150,7 @@ struct EngineWorker { | |||
void start() { | |||
thread = std::thread([&] { | |||
random::init(); | |||
run(); | |||
}); | |||
} | |||
@@ -117,7 +164,6 @@ struct EngineWorker { | |||
} | |||
void run(); | |||
void step(); | |||
}; | |||
@@ -146,8 +192,8 @@ struct Engine::Internal { | |||
bool realTime = false; | |||
int threadCount = 1; | |||
std::vector<EngineWorker> workers; | |||
SpinBarrier engineBarrier; | |||
SpinBarrier workerBarrier; | |||
HybridBarrier engineBarrier; | |||
HybridBarrier workerBarrier; | |||
std::atomic<int> workerModuleIndex; | |||
}; | |||
@@ -188,7 +234,7 @@ static void Engine_stepModules(Engine *that, int threadId) { | |||
// Step each module | |||
// for (int i = threadId; i < modulesLen; i += threadCount) { | |||
while (true) { | |||
// Chose module | |||
// Choose next module | |||
int i = internal->workerModuleIndex++; | |||
if (i >= modulesLen) | |||
break; | |||
@@ -232,7 +278,7 @@ static void Engine_step(Engine *that) { | |||
if (smoothModule) { | |||
Param *param = &smoothModule->params[smoothParamId]; | |||
float value = param->value; | |||
// decay rate is 1 graphics frame | |||
// Decay rate is 1 graphics frame | |||
const float smoothLambda = 60.f; | |||
float newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime; | |||
if (value == newValue) { | |||
@@ -256,35 +302,29 @@ static void Engine_step(Engine *that) { | |||
for (Cable *cable : that->internal->cables) { | |||
cable->step(); | |||
} | |||
// Swap messages of all modules | |||
for (Module *module : that->internal->modules) { | |||
std::swap(module->leftProducerMessage, module->leftConsumerMessage); | |||
std::swap(module->rightProducerMessage, module->rightConsumerMessage); | |||
} | |||
} | |||
static void Engine_updateAdjacent(Engine *that, Module *m) { | |||
// Sync leftModule | |||
if (m->leftModuleId >= 0) { | |||
if (!m->leftModule || m->leftModule->id != m->leftModuleId) { | |||
m->leftModule = that->getModule(m->leftModuleId); | |||
// Flip messages for each module | |||
for (Module *module : that->internal->modules) { | |||
if (module->leftExpander.messageFlipRequested) { | |||
std::swap(module->leftExpander.producerMessage, module->leftExpander.consumerMessage); | |||
module->leftExpander.messageFlipRequested = false; | |||
} | |||
} | |||
else { | |||
if (m->leftModule) { | |||
m->leftModule = NULL; | |||
if (module->rightExpander.messageFlipRequested) { | |||
std::swap(module->rightExpander.producerMessage, module->rightExpander.consumerMessage); | |||
module->rightExpander.messageFlipRequested = false; | |||
} | |||
} | |||
} | |||
// Sync rightModule | |||
if (m->rightModuleId >= 0) { | |||
if (!m->rightModule || m->rightModule->id != m->rightModuleId) { | |||
m->rightModule = that->getModule(m->rightModuleId); | |||
static void Engine_updateExpander(Engine *that, Module::Expander *expander) { | |||
if (expander->moduleId >= 0) { | |||
if (!expander->module || expander->module->id != expander->moduleId) { | |||
expander->module = that->getModule(expander->moduleId); | |||
} | |||
} | |||
else { | |||
if (m->rightModule) { | |||
m->rightModule = NULL; | |||
if (expander->module) { | |||
expander->module = NULL; | |||
} | |||
} | |||
} | |||
@@ -332,7 +372,7 @@ static void Engine_run(Engine *that) { | |||
// Every time the that waits and locks a mutex, it steps this many frames | |||
const int mutexSteps = 128; | |||
// Time in seconds that the that is rushing ahead of the estimated clock time | |||
double ahead = 0.0; | |||
double aheadTime = 0.0; | |||
auto lastTime = std::chrono::high_resolution_clock::now(); | |||
while (internal->running) { | |||
@@ -345,6 +385,7 @@ static void Engine_run(Engine *that) { | |||
for (Module *module : internal->modules) { | |||
module->onSampleRateChange(); | |||
} | |||
aheadTime = 0.0; | |||
} | |||
// Launch workers | |||
@@ -357,8 +398,10 @@ static void Engine_run(Engine *that) { | |||
if (!internal->paused) { | |||
std::lock_guard<std::recursive_mutex> lock(internal->mutex); | |||
// Update expander pointers | |||
for (Module *module : internal->modules) { | |||
Engine_updateAdjacent(that, module); | |||
Engine_updateExpander(that, &module->leftExpander); | |||
Engine_updateExpander(that, &module->rightExpander); | |||
} | |||
// Step modules | |||
@@ -368,17 +411,17 @@ static void Engine_run(Engine *that) { | |||
} | |||
double stepTime = mutexSteps * internal->sampleTime; | |||
ahead += stepTime; | |||
aheadTime += stepTime; | |||
auto currTime = std::chrono::high_resolution_clock::now(); | |||
const double aheadFactor = 2.0; | |||
ahead -= aheadFactor * std::chrono::duration<double>(currTime - lastTime).count(); | |||
aheadTime -= aheadFactor * std::chrono::duration<double>(currTime - lastTime).count(); | |||
lastTime = currTime; | |||
ahead = std::fmax(ahead, 0.0); | |||
aheadTime = std::fmax(aheadTime, 0.0); | |||
// Avoid pegging the CPU at 100% when there are no "blocking" modules like AudioInterface, but still step audio at a reasonable rate | |||
// The number of steps to wait before possibly sleeping | |||
const double aheadMax = 1.0; // seconds | |||
if (ahead > aheadMax) { | |||
if (aheadTime > aheadMax) { | |||
std::this_thread::sleep_for(std::chrono::duration<double>(stepTime)); | |||
} | |||
} | |||
@@ -390,7 +433,10 @@ static void Engine_run(Engine *that) { | |||
void Engine::start() { | |||
internal->running = true; | |||
internal->thread = std::thread(Engine_run, this); | |||
internal->thread = std::thread([&] { | |||
random::init(); | |||
Engine_run(this); | |||
}); | |||
} | |||
void Engine::stop() { | |||
@@ -417,6 +463,10 @@ float Engine::getSampleTime() { | |||
return internal->sampleTime; | |||
} | |||
void Engine::yieldWorkers() { | |||
internal->workerBarrier.yield = true; | |||
} | |||
void Engine::addModule(Module *module) { | |||
assert(module); | |||
VIPLock vipLock(internal->vipMutex); | |||
@@ -441,6 +491,7 @@ void Engine::addModule(Module *module) { | |||
} | |||
// Add module | |||
internal->modules.push_back(module); | |||
// Trigger Add event | |||
module->onAdd(); | |||
// Update ParamHandles | |||
for (ParamHandle *paramHandle : internal->paramHandles) { | |||
@@ -453,6 +504,9 @@ void Engine::removeModule(Module *module) { | |||
assert(module); | |||
VIPLock vipLock(internal->vipMutex); | |||
std::lock_guard<std::recursive_mutex> lock(internal->mutex); | |||
// Check that the module actually exists | |||
auto it = std::find(internal->modules.begin(), internal->modules.end(), module); | |||
assert(it != internal->modules.end()); | |||
// If a param is being smoothed on this module, stop smoothing it immediately | |||
if (module == internal->smoothModule) { | |||
internal->smoothModule = NULL; | |||
@@ -467,22 +521,20 @@ void Engine::removeModule(Module *module) { | |||
if (paramHandle->moduleId == module->id) | |||
paramHandle->module = NULL; | |||
} | |||
// Update adjacent modules | |||
// Update expander pointers | |||
for (Module *m : internal->modules) { | |||
if (m->leftModule == module) { | |||
m->leftModuleId = -1; | |||
m->leftModule = NULL; | |||
if (m->leftExpander.module == module) { | |||
m->leftExpander.moduleId = -1; | |||
m->leftExpander.module = NULL; | |||
} | |||
if (m->rightModule == module) { | |||
m->rightModuleId = -1; | |||
m->rightModule = NULL; | |||
if (m->rightExpander.module == module) { | |||
m->rightExpander.moduleId = -1; | |||
m->rightExpander.module = NULL; | |||
} | |||
} | |||
// Check that the module actually exists | |||
auto it = std::find(internal->modules.begin(), internal->modules.end(), module); | |||
assert(it != internal->modules.end()); | |||
// Remove the module | |||
// Trigger Remove event | |||
module->onRemove(); | |||
// Remove module | |||
internal->modules.erase(it); | |||
} | |||
@@ -698,17 +750,14 @@ void EngineWorker::run() { | |||
system::setThreadName("Engine worker"); | |||
system::setThreadRealTime(engine->internal->realTime); | |||
disableDenormals(); | |||
while (running) { | |||
step(); | |||
} | |||
} | |||
void EngineWorker::step() { | |||
engine->internal->engineBarrier.wait(); | |||
if (!running) | |||
return; | |||
Engine_stepModules(engine, id); | |||
engine->internal->workerBarrier.wait(); | |||
while (1) { | |||
engine->internal->engineBarrier.wait(); | |||
if (!running) | |||
return; | |||
Engine_stepModules(engine, id); | |||
engine->internal->workerBarrier.wait(); | |||
} | |||
} | |||
@@ -34,9 +34,19 @@ json_t *Module::toJson() { | |||
// params | |||
json_t *paramsJ = json_array(); | |||
for (Param ¶m : params) { | |||
json_t *paramJ = param.toJson(); | |||
json_array_append_new(paramsJ, paramJ); | |||
for (size_t paramId = 0; paramId < params.size(); paramId++) { | |||
// Don't serialize unbounded Params | |||
if (!paramQuantities[paramId]->isBounded()) | |||
continue; | |||
json_t *paramJ = json_object(); | |||
json_object_set_new(paramJ, "id", json_integer(paramId)); | |||
float value = params[paramId].getValue(); | |||
json_object_set_new(paramJ, "value", json_real(value)); | |||
json_array_append(paramsJ, paramJ); | |||
} | |||
json_object_set_new(rootJ, "params", paramsJ); | |||
@@ -51,12 +61,12 @@ json_t *Module::toJson() { | |||
} | |||
// leftModuleId | |||
if (leftModuleId >= 0) | |||
json_object_set_new(rootJ, "leftModuleId", json_integer(leftModuleId)); | |||
if (leftExpander.moduleId >= 0) | |||
json_object_set_new(rootJ, "leftModuleId", json_integer(leftExpander.moduleId)); | |||
// rightModuleId | |||
if (rightModuleId >= 0) | |||
json_object_set_new(rootJ, "rightModuleId", json_integer(rightModuleId)); | |||
if (rightExpander.moduleId >= 0) | |||
json_object_set_new(rootJ, "rightModuleId", json_integer(rightExpander.moduleId)); | |||
return rootJ; | |||
} | |||
@@ -67,17 +77,29 @@ void Module::fromJson(json_t *rootJ) { | |||
size_t i; | |||
json_t *paramJ; | |||
json_array_foreach(paramsJ, i, paramJ) { | |||
uint32_t paramId = i; | |||
// Get paramId | |||
// Legacy v0.6.0 to <v1.0 | |||
json_t *paramIdJ = json_object_get(paramJ, "paramId"); | |||
if (paramIdJ) { | |||
json_t *paramIdJ = json_object_get(paramJ, "id"); | |||
// Legacy v0.6 to <v1 | |||
if (!paramIdJ) | |||
paramIdJ = json_object_get(paramJ, "paramId"); | |||
size_t paramId; | |||
if (paramIdJ) | |||
paramId = json_integer_value(paramIdJ); | |||
} | |||
// Use index if all else fails | |||
else | |||
paramId = i; | |||
// Check ID bounds | |||
if (paramId >= params.size()) | |||
continue; | |||
// Check that the Param is bounded | |||
if (!paramQuantities[paramId]->isBounded()) | |||
continue; | |||
if (paramId < params.size()) { | |||
params[paramId].fromJson(paramJ); | |||
} | |||
json_t *valueJ = json_object_get(paramJ, "value"); | |||
if (valueJ) | |||
params[paramId].setValue(json_number_value(valueJ)); | |||
} | |||
// bypass | |||
@@ -93,12 +115,12 @@ void Module::fromJson(json_t *rootJ) { | |||
// leftModuleId | |||
json_t *leftModuleIdJ = json_object_get(rootJ, "leftModuleId"); | |||
if (leftModuleIdJ) | |||
leftModuleId = json_integer_value(leftModuleIdJ); | |||
leftExpander.moduleId = json_integer_value(leftModuleIdJ); | |||
// rightModuleId | |||
json_t *rightModuleIdJ = json_object_get(rootJ, "rightModuleId"); | |||
if (rightModuleIdJ) | |||
rightModuleId = json_integer_value(rightModuleIdJ); | |||
rightExpander.moduleId = json_integer_value(rightModuleIdJ); | |||
} | |||
@@ -1,28 +0,0 @@ | |||
#include "engine/Param.hpp" | |||
#include "random.hpp" | |||
#include "math.hpp" | |||
namespace rack { | |||
namespace engine { | |||
json_t *Param::toJson() { | |||
json_t *rootJ = json_object(); | |||
// TODO Handle unbounded case | |||
json_object_set_new(rootJ, "value", json_real(value)); | |||
return rootJ; | |||
} | |||
void Param::fromJson(json_t *rootJ) { | |||
// TODO Handle unbounded case | |||
json_t *valueJ = json_object_get(rootJ, "value"); | |||
if (valueJ) | |||
value = json_number_value(valueJ); | |||
} | |||
} // namespace engine | |||
} // namespace rack |
@@ -57,11 +57,13 @@ int main(int argc, char *argv[]) { | |||
#endif | |||
std::string patchPath; | |||
bool screenshot = false; | |||
float screenshotZoom = 1.f; | |||
// Parse command line arguments | |||
int c; | |||
opterr = 0; | |||
while ((c = getopt(argc, argv, "ds:u:")) != -1) { | |||
while ((c = getopt(argc, argv, "dhp:s:u:")) != -1) { | |||
switch (c) { | |||
case 'd': { | |||
settings::devMode = true; | |||
@@ -69,6 +71,10 @@ int main(int argc, char *argv[]) { | |||
case 'h': { | |||
settings::headless = true; | |||
} break; | |||
case 'p': { | |||
screenshot = true; | |||
sscanf(optarg, "%f", &screenshotZoom); | |||
} break; | |||
case 's': { | |||
asset::systemDir = optarg; | |||
} break; | |||
@@ -154,15 +160,19 @@ int main(int argc, char *argv[]) { | |||
INFO("Starting engine"); | |||
APP->engine->start(); | |||
if (!settings::headless) { | |||
if (settings::headless) { | |||
// TEMP Prove that the app doesn't crash | |||
std::this_thread::sleep_for(std::chrono::seconds(2)); | |||
} | |||
else if (screenshot) { | |||
INFO("Taking screenshots of all modules at %gx zoom", screenshotZoom); | |||
APP->window->screenshot(screenshotZoom); | |||
} | |||
else { | |||
INFO("Running window"); | |||
APP->window->run(); | |||
INFO("Stopped window"); | |||
} | |||
else { | |||
// TEMP Prove that the app doesn't crash | |||
std::this_thread::sleep_for(std::chrono::seconds(2)); | |||
} | |||
INFO("Stopping engine"); | |||
APP->engine->stop(); | |||
@@ -24,7 +24,7 @@ json_t *requestJson(Method method, std::string url, json_t *dataJ) { | |||
// Process data | |||
if (dataJ) { | |||
if (method == GET) { | |||
if (method == METHOD_GET) { | |||
// Append ?key=value&... to url | |||
url += "?"; | |||
bool isFirst = true; | |||
@@ -54,16 +54,16 @@ json_t *requestJson(Method method, std::string url, json_t *dataJ) { | |||
// Set HTTP method | |||
switch (method) { | |||
case GET: | |||
case METHOD_GET: | |||
// This is CURL's default | |||
break; | |||
case POST: | |||
case METHOD_POST: | |||
curl_easy_setopt(curl, CURLOPT_POST, true); | |||
break; | |||
case PUT: | |||
case METHOD_PUT: | |||
curl_easy_setopt(curl, CURLOPT_PUT, true); | |||
break; | |||
case DELETE: | |||
case METHOD_DELETE: | |||
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE"); | |||
break; | |||
} | |||
@@ -81,16 +81,17 @@ void PatchManager::save(std::string path) { | |||
json_decref(rootJ); | |||
}); | |||
FILE *file = std::fopen(path.c_str(), "w"); | |||
// Write to temporary path and then rename it to the correct path | |||
std::string tmpPath = path + ".tmp"; | |||
FILE *file = std::fopen(tmpPath.c_str(), "w"); | |||
if (!file) { | |||
// Fail silently | |||
return; | |||
} | |||
DEFER({ | |||
std::fclose(file); | |||
}); | |||
json_dumpf(rootJ, file, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); | |||
std::fclose(file); | |||
system::moveFile(tmpPath, path); | |||
} | |||
void PatchManager::saveDialog() { | |||
@@ -149,7 +149,7 @@ static bool loadPlugin(std::string path) { | |||
// Search for presets | |||
for (Model *model : plugin->models) { | |||
std::string presetDir = asset::plugin(plugin, "presets/" + model->slug); | |||
for (const std::string &presetPath : system::listEntries(presetDir)) { | |||
for (const std::string &presetPath : system::getEntries(presetDir)) { | |||
model->presetPaths.push_back(presetPath); | |||
} | |||
} | |||
@@ -157,40 +157,7 @@ static bool loadPlugin(std::string path) { | |||
return true; | |||
} | |||
static bool syncPlugin(std::string slug, json_t *manifestJ, bool dryRun) { | |||
// Check that "status" is "available" | |||
json_t *statusJ = json_object_get(manifestJ, "status"); | |||
if (!statusJ) { | |||
return false; | |||
} | |||
std::string status = json_string_value(statusJ); | |||
if (status != "available") { | |||
return false; | |||
} | |||
// Get latest version | |||
json_t *latestVersionJ = json_object_get(manifestJ, "latestVersion"); | |||
if (!latestVersionJ) { | |||
WARN("Could not get latest version of plugin %s", slug.c_str()); | |||
return false; | |||
} | |||
std::string latestVersion = json_string_value(latestVersionJ); | |||
// Check whether we already have a plugin with the same slug and version | |||
Plugin *plugin = getPlugin(slug); | |||
if (plugin && plugin->version == latestVersion) { | |||
return false; | |||
} | |||
json_t *nameJ = json_object_get(manifestJ, "name"); | |||
std::string name; | |||
if (nameJ) { | |||
name = json_string_value(nameJ); | |||
} | |||
else { | |||
name = slug; | |||
} | |||
static bool syncUpdate(const Update &update) { | |||
#if defined ARCH_WIN | |||
std::string arch = "win"; | |||
#elif ARCH_MAC | |||
@@ -199,50 +166,31 @@ static bool syncPlugin(std::string slug, json_t *manifestJ, bool dryRun) { | |||
std::string arch = "lin"; | |||
#endif | |||
std::string downloadUrl; | |||
downloadUrl = app::API_URL; | |||
std::string downloadUrl = app::API_URL; | |||
downloadUrl += "/download"; | |||
if (dryRun) { | |||
downloadUrl += "/available"; | |||
} | |||
downloadUrl += "?token=" + network::encodeUrl(settings::token); | |||
downloadUrl += "&slug=" + network::encodeUrl(slug); | |||
downloadUrl += "&version=" + network::encodeUrl(latestVersion); | |||
downloadUrl += "&slug=" + network::encodeUrl(update.pluginSlug); | |||
downloadUrl += "&version=" + network::encodeUrl(update.version); | |||
downloadUrl += "&arch=" + network::encodeUrl(arch); | |||
if (dryRun) { | |||
// Check if available | |||
json_t *availableResJ = network::requestJson(network::GET, downloadUrl, NULL); | |||
if (!availableResJ) { | |||
WARN("Could not check whether download is available"); | |||
return false; | |||
} | |||
DEFER({ | |||
json_decref(availableResJ); | |||
}); | |||
json_t *successJ = json_object_get(availableResJ, "success"); | |||
return json_boolean_value(successJ); | |||
} | |||
else { | |||
downloadName = name; | |||
downloadProgress = 0.0; | |||
INFO("Downloading plugin %s %s %s", slug.c_str(), latestVersion.c_str(), arch.c_str()); | |||
// Download zip | |||
std::string pluginDest = asset::user("plugins/" + slug + ".zip"); | |||
if (!network::requestDownload(downloadUrl, pluginDest, &downloadProgress)) { | |||
WARN("Plugin %s download was unsuccessful", slug.c_str()); | |||
return false; | |||
} | |||
// downloadName = name; | |||
downloadProgress = 0.0; | |||
INFO("Downloading plugin %s %s %s", update.pluginSlug.c_str(), update.version.c_str(), arch.c_str()); | |||
downloadName = ""; | |||
return true; | |||
// Download zip | |||
std::string pluginDest = asset::user("plugins/" + update.pluginSlug + ".zip"); | |||
if (!network::requestDownload(downloadUrl, pluginDest, &downloadProgress)) { | |||
WARN("Plugin %s download was unsuccessful", update.pluginSlug.c_str()); | |||
return false; | |||
} | |||
// downloadName = ""; | |||
return true; | |||
} | |||
static void loadPlugins(std::string path) { | |||
std::string message; | |||
for (std::string pluginPath : system::listEntries(path)) { | |||
for (std::string pluginPath : system::getEntries(path)) { | |||
if (!system::isDirectory(pluginPath)) | |||
continue; | |||
if (!loadPlugin(pluginPath)) { | |||
@@ -323,7 +271,7 @@ static int extractZip(const char *filename, const char *path) { | |||
static void extractPackages(const std::string &path) { | |||
std::string message; | |||
for (std::string packagePath : system::listEntries(path)) { | |||
for (std::string packagePath : system::getEntries(path)) { | |||
if (string::filenameExtension(packagePath) != "zip") | |||
continue; | |||
INFO("Extracting package %s", packagePath.c_str()); | |||
@@ -366,9 +314,17 @@ void init() { | |||
std::string fundamentalSrc = asset::system("Fundamental.zip"); | |||
std::string fundamentalDir = asset::user("plugins/Fundamental"); | |||
if (!settings::devMode && !getPlugin("Fundamental") && system::isFile(fundamentalSrc)) { | |||
INFO("Extracting bundled Fundamental package"); | |||
extractZip(fundamentalSrc.c_str(), pluginsDir.c_str()); | |||
loadPlugin(fundamentalDir); | |||
} | |||
// TEMP | |||
// Sync in a detached thread | |||
std::thread t([]{ | |||
queryUpdates(); | |||
}); | |||
t.detach(); | |||
} | |||
void destroy() { | |||
@@ -390,46 +346,54 @@ void destroy() { | |||
} | |||
void logIn(const std::string &email, const std::string &password) { | |||
loginStatus = "Logging in..."; | |||
json_t *reqJ = json_object(); | |||
json_object_set(reqJ, "email", json_string(email.c_str())); | |||
json_object_set(reqJ, "password", json_string(password.c_str())); | |||
std::string url = app::API_URL; | |||
url += "/token"; | |||
json_t *resJ = network::requestJson(network::POST, url, reqJ); | |||
json_t *resJ = network::requestJson(network::METHOD_POST, url, reqJ); | |||
json_decref(reqJ); | |||
if (resJ) { | |||
json_t *errorJ = json_object_get(resJ, "error"); | |||
if (errorJ) { | |||
const char *errorStr = json_string_value(errorJ); | |||
loginStatus = errorStr; | |||
if (!resJ) { | |||
loginStatus = "No response from server"; | |||
return; | |||
} | |||
json_t *errorJ = json_object_get(resJ, "error"); | |||
if (errorJ) { | |||
const char *errorStr = json_string_value(errorJ); | |||
loginStatus = errorStr; | |||
} | |||
else { | |||
json_t *tokenJ = json_object_get(resJ, "token"); | |||
if (tokenJ) { | |||
const char *tokenStr = json_string_value(tokenJ); | |||
settings::token = tokenStr; | |||
loginStatus = ""; | |||
} | |||
else { | |||
json_t *tokenJ = json_object_get(resJ, "token"); | |||
if (tokenJ) { | |||
const char *tokenStr = json_string_value(tokenJ); | |||
settings::token = tokenStr; | |||
loginStatus = ""; | |||
} | |||
loginStatus = "No token in response"; | |||
} | |||
json_decref(resJ); | |||
} | |||
json_decref(resJ); | |||
} | |||
void logOut() { | |||
settings::token = ""; | |||
} | |||
void query() { | |||
void queryUpdates() { | |||
if (settings::token.empty()) | |||
return; | |||
updates.clear(); | |||
// Get user's plugins list | |||
json_t *pluginsReqJ = json_object(); | |||
json_object_set(pluginsReqJ, "token", json_string(settings::token.c_str())); | |||
std::string pluginsUrl = app::API_URL; | |||
pluginsUrl += "/plugins"; | |||
json_t *pluginsResJ = network::requestJson(network::GET, pluginsUrl, pluginsReqJ); | |||
json_t *pluginsResJ = network::requestJson(network::METHOD_GET, pluginsUrl, pluginsReqJ); | |||
json_decref(pluginsReqJ); | |||
if (!pluginsResJ) { | |||
WARN("Request for user's plugins failed"); | |||
@@ -448,7 +412,7 @@ void query() { | |||
// Get community manifests | |||
std::string manifestsUrl = app::API_URL; | |||
manifestsUrl += "/community/manifests"; | |||
json_t *manifestsResJ = network::requestJson(network::GET, manifestsUrl, NULL); | |||
json_t *manifestsResJ = network::requestJson(network::METHOD_GET, manifestsUrl, NULL); | |||
if (!manifestsResJ) { | |||
WARN("Request for community manifests failed"); | |||
return; | |||
@@ -457,56 +421,63 @@ void query() { | |||
json_decref(manifestsResJ); | |||
}); | |||
json_dumpf(pluginsResJ, stderr, JSON_INDENT(2)); | |||
json_dumpf(manifestsResJ, stderr, JSON_INDENT(2)); | |||
} | |||
void sync() { | |||
#if 0 | |||
if (settings::token.empty()) | |||
return false; | |||
bool available = false; | |||
if (!dryRun) { | |||
downloadProgress = 0.0; | |||
downloadName = "Updating plugins..."; | |||
} | |||
// Check each plugin in list of plugin slugs | |||
json_t *pluginsJ = json_object_get(pluginsResJ, "plugins"); | |||
if (!pluginsJ) { | |||
WARN("No plugins array"); | |||
return false; | |||
} | |||
json_t *manifestsJ = json_object_get(manifestsResJ, "manifests"); | |||
if (!manifestsJ) { | |||
WARN("No manifests object"); | |||
return false; | |||
} | |||
json_t *pluginsJ = json_object_get(pluginsResJ, "plugins"); | |||
size_t slugIndex; | |||
json_t *slugJ; | |||
json_array_foreach(pluginsJ, slugIndex, slugJ) { | |||
std::string slug = json_string_value(slugJ); | |||
// Search for slug in manifests | |||
const char *manifestSlug; | |||
json_t *manifestJ = NULL; | |||
json_object_foreach(manifestsJ, manifestSlug, manifestJ) { | |||
if (slug == std::string(manifestSlug)) | |||
break; | |||
size_t pluginIndex; | |||
json_t *pluginJ; | |||
json_array_foreach(pluginsJ, pluginIndex, pluginJ) { | |||
Update update; | |||
// Get plugin manifest | |||
update.pluginSlug = json_string_value(pluginJ); | |||
json_t *manifestJ = json_object_get(manifestsJ, update.pluginSlug.c_str()); | |||
if (!manifestJ) { | |||
WARN("VCV account has plugin %s but no manifest was found", update.pluginSlug.c_str()); | |||
continue; | |||
} | |||
// Get version | |||
// TODO Change this to "version" when API changes | |||
json_t *versionJ = json_object_get(manifestJ, "latestVersion"); | |||
if (!versionJ) { | |||
WARN("Plugin %s has no version in manifest", update.pluginSlug.c_str()); | |||
continue; | |||
} | |||
update.version = json_string_value(versionJ); | |||
if (!manifestJ) | |||
// Check if update is needed | |||
Plugin *p = getPlugin(update.pluginSlug); | |||
if (p && p->version == update.version) | |||
continue; | |||
if (syncPlugin(slug, manifestJ, dryRun)) { | |||
available = true; | |||
// Check status | |||
json_t *statusJ = json_object_get(manifestJ, "status"); | |||
if (!statusJ) | |||
continue; | |||
std::string status = json_string_value(statusJ); | |||
if (status != "available") | |||
continue; | |||
// Get changelog URL | |||
json_t *changelogUrlJ = json_object_get(manifestJ, "changelogUrl"); | |||
if (changelogUrlJ) { | |||
update.changelogUrl = json_string_value(changelogUrlJ); | |||
} | |||
updates.push_back(update); | |||
} | |||
} | |||
return available; | |||
#endif | |||
void syncUpdates() { | |||
if (settings::token.empty()) | |||
return; | |||
downloadProgress = 0.0; | |||
downloadName = "Updating plugins..."; | |||
for (const Update &update : updates) { | |||
syncUpdate(update); | |||
} | |||
} | |||
void cancelDownload() { | |||
@@ -647,6 +618,7 @@ bool isSlugValid(const std::string &slug) { | |||
std::vector<Plugin*> plugins; | |||
std::string loginStatus; | |||
std::vector<Update> updates; | |||
float downloadProgress = 0.f; | |||
std::string downloadName; | |||
@@ -11,7 +11,7 @@ namespace random { | |||
// xoroshiro128+ | |||
// from http://xoroshiro.di.unimi.it/xoroshiro128plus.c | |||
static uint64_t xoroshiro128plus_state[2] = {}; | |||
thread_local uint64_t xoroshiro128plus_state[2]; | |||
static uint64_t rotl(const uint64_t x, int k) { | |||
return (x << k) | (x >> (64 - k)); | |||
@@ -30,8 +30,6 @@ static uint64_t xoroshiro128plus_next(void) { | |||
} | |||
void init() { | |||
// Only allow the seed to be initialized once during the lifetime of the program. | |||
assert(xoroshiro128plus_state[0] == 0 && xoroshiro128plus_state[1] == 0); | |||
struct timeval tv; | |||
gettimeofday(&tv, NULL); | |||
xoroshiro128plus_state[0] = tv.tv_sec; | |||
@@ -248,7 +248,7 @@ void load(const std::string &path) { | |||
INFO("Loading settings %s", path.c_str()); | |||
FILE *file = fopen(path.c_str(), "r"); | |||
if (!file) | |||
throw UserException(string::f("Could not load settings file %s", path.c_str())); | |||
return; | |||
DEFER({ | |||
fclose(file); | |||
}); | |||
@@ -25,7 +25,7 @@ namespace rack { | |||
namespace system { | |||
std::list<std::string> listEntries(const std::string &path) { | |||
std::list<std::string> getEntries(const std::string &path) { | |||
std::list<std::string> filenames; | |||
DIR *dir = opendir(path.c_str()); | |||
if (dir) { | |||
@@ -56,14 +56,23 @@ bool isDirectory(const std::string &path) { | |||
return S_ISDIR(statbuf.st_mode); | |||
} | |||
void moveFile(const std::string &srcPath, const std::string &destPath) { | |||
std::remove(destPath.c_str()); | |||
// Whether this overwrites existing files is implementation-defined. | |||
// i.e. Mingw64 fails to overwrite. | |||
// This is why we remove the file above. | |||
std::rename(srcPath.c_str(), destPath.c_str()); | |||
} | |||
void copyFile(const std::string &srcPath, const std::string &destPath) { | |||
// Open files | |||
// Open source | |||
FILE *source = fopen(srcPath.c_str(), "rb"); | |||
if (!source) | |||
return; | |||
DEFER({ | |||
fclose(source); | |||
}); | |||
// Open destination | |||
FILE *dest = fopen(destPath.c_str(), "wb"); | |||
if (!dest) | |||
return; | |||
@@ -93,7 +102,6 @@ void createDirectory(const std::string &path) { | |||
} | |||
int getLogicalCoreCount() { | |||
// TODO Return the physical cores, not logical cores. | |||
return std::thread::hardware_concurrency(); | |||
} | |||
@@ -199,7 +207,7 @@ void openFolder(const std::string &path) { | |||
} | |||
void runProcessAsync(const std::string &path) { | |||
void runProcessDetached(const std::string &path) { | |||
#if defined ARCH_WIN | |||
STARTUPINFOW startupInfo; | |||
PROCESS_INFORMATION processInfo; | |||
@@ -212,6 +220,9 @@ void runProcessAsync(const std::string &path) { | |||
CreateProcessW(pathW.c_str(), NULL, | |||
NULL, NULL, false, 0, NULL, NULL, | |||
&startupInfo, &processInfo); | |||
#else | |||
// Not implemented on Linux or Mac | |||
assert(0); | |||
#endif | |||
} | |||
@@ -226,6 +237,7 @@ std::string getOperatingSystemInfo() { | |||
ZeroMemory(&info, sizeof(info)); | |||
info.dwOSVersionInfoSize = sizeof(info); | |||
GetVersionExW(&info); | |||
// See https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_osversioninfoa for a list of Windows version numbers. | |||
return string::f("Windows %u.%u", info.dwMajorVersion, info.dwMinorVersion); | |||
#endif | |||
} | |||
@@ -1,4 +1,6 @@ | |||
#include "ui/Button.hpp" | |||
#include "app.hpp" | |||
#include "event.hpp" | |||
namespace rack { | |||
@@ -10,28 +12,23 @@ Button::Button() { | |||
} | |||
void Button::draw(const DrawArgs &args) { | |||
BNDwidgetState state = BND_DEFAULT; | |||
if (APP->event->hoveredWidget == this) | |||
state = BND_HOVER; | |||
if (APP->event->draggedWidget == this) | |||
state = BND_ACTIVE; | |||
bndToolButton(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE, state, -1, text.c_str()); | |||
} | |||
void Button::onEnter(const event::Enter &e) { | |||
state = BND_HOVER; | |||
} | |||
void Button::onLeave(const event::Leave &e) { | |||
state = BND_DEFAULT; | |||
} | |||
void Button::onDragStart(const event::DragStart &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
state = BND_ACTIVE; | |||
if (quantity) | |||
quantity->setMax(); | |||
} | |||
void Button::onDragEnd(const event::DragEnd &e) { | |||
state = BND_HOVER; | |||
if (quantity) | |||
quantity->setMin(); | |||
} | |||
@@ -1,4 +1,6 @@ | |||
#include "ui/ChoiceButton.hpp" | |||
#include "app.hpp" | |||
#include "event.hpp" | |||
namespace rack { | |||
@@ -6,6 +8,11 @@ namespace ui { | |||
void ChoiceButton::draw(const DrawArgs &args) { | |||
BNDwidgetState state = BND_DEFAULT; | |||
if (APP->event->hoveredWidget == this) | |||
state = BND_HOVER; | |||
if (APP->event->draggedWidget == this) | |||
state = BND_ACTIVE; | |||
bndChoiceButton(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE, state, -1, text.c_str()); | |||
} | |||
@@ -10,7 +10,10 @@ RadioButton::RadioButton() { | |||
} | |||
void RadioButton::draw(const DrawArgs &args) { | |||
BNDwidgetState state = this->state; | |||
BNDwidgetState state = BND_DEFAULT; | |||
if (APP->event->hoveredWidget == this) | |||
state = BND_HOVER; | |||
std::string label; | |||
if (quantity) { | |||
label = quantity->getLabel(); | |||
@@ -20,14 +23,6 @@ void RadioButton::draw(const DrawArgs &args) { | |||
bndRadioButton(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE, state, -1, label.c_str()); | |||
} | |||
void RadioButton::onEnter(const event::Enter &e) { | |||
state = BND_HOVER; | |||
} | |||
void RadioButton::onLeave(const event::Leave &e) { | |||
state = BND_DEFAULT; | |||
} | |||
void RadioButton::onDragDrop(const event::DragDrop &e) { | |||
if (e.origin == this) { | |||
if (quantity) { | |||
@@ -13,6 +13,12 @@ ScrollBar::ScrollBar() { | |||
} | |||
void ScrollBar::draw(const DrawArgs &args) { | |||
BNDwidgetState state = BND_DEFAULT; | |||
if (APP->event->hoveredWidget == this) | |||
state = BND_HOVER; | |||
if (APP->event->draggedWidget == this) | |||
state = BND_ACTIVE; | |||
bndScrollBar(args.vg, 0.0, 0.0, box.size.x, box.size.y, state, offset, size); | |||
} | |||
@@ -20,7 +26,6 @@ void ScrollBar::onDragStart(const event::DragStart &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
state = BND_ACTIVE; | |||
APP->window->cursorLock(); | |||
} | |||
@@ -36,7 +41,6 @@ void ScrollBar::onDragMove(const event::DragMove &e) { | |||
} | |||
void ScrollBar::onDragEnd(const event::DragEnd &e) { | |||
state = BND_DEFAULT; | |||
APP->window->cursorUnlock(); | |||
} | |||
@@ -13,6 +13,12 @@ Slider::Slider() { | |||
} | |||
void Slider::draw(const DrawArgs &args) { | |||
BNDwidgetState state = BND_DEFAULT; | |||
if (APP->event->hoveredWidget == this) | |||
state = BND_HOVER; | |||
if (APP->event->draggedWidget == this) | |||
state = BND_ACTIVE; | |||
float progress = quantity ? quantity->getScaledValue() : 0.f; | |||
std::string text = quantity ? quantity->getString() : ""; | |||
bndSlider(args.vg, 0.0, 0.0, box.size.x, box.size.y, BND_CORNER_NONE, state, progress, text.c_str(), NULL); | |||
@@ -22,7 +28,6 @@ void Slider::onDragStart(const event::DragStart &e) { | |||
if (e.button != GLFW_MOUSE_BUTTON_LEFT) | |||
return; | |||
state = BND_ACTIVE; | |||
APP->window->cursorLock(); | |||
} | |||
@@ -33,7 +38,6 @@ void Slider::onDragMove(const event::DragMove &e) { | |||
} | |||
void Slider::onDragEnd(const event::DragEnd &e) { | |||
state = BND_DEFAULT; | |||
APP->window->cursorUnlock(); | |||
} | |||
@@ -30,14 +30,12 @@ void TextField::draw(const DrawArgs &args) { | |||
nvgResetScissor(args.vg); | |||
} | |||
void TextField::onHover(const event::Hover &e) { | |||
OpaqueWidget::onHover(e); | |||
void TextField::onDragHover(const event::DragHover &e) { | |||
OpaqueWidget::onDragHover(e); | |||
if (this == APP->event->draggedWidget) { | |||
if (e.origin == this) { | |||
int pos = getTextPosition(e.pos); | |||
if (pos != selection) { | |||
cursor = pos; | |||
} | |||
cursor = pos; | |||
} | |||
} | |||