diff --git a/repos/AS/.gitattributes b/repos/AS/.gitattributes deleted file mode 100644 index dfe07704..00000000 --- a/repos/AS/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/repos/AS/AS.JPG b/repos/AS/AS.JPG deleted file mode 100644 index 901b2080..00000000 Binary files a/repos/AS/AS.JPG and /dev/null differ diff --git a/repos/AS/LICENSE.txt b/repos/AS/LICENSE.txt deleted file mode 100644 index d582ae10..00000000 --- a/repos/AS/LICENSE.txt +++ /dev/null @@ -1,288 +0,0 @@ -### AS### - -AS Logo/Monogram Copyright (c) 2017 Alfredo Santamaria , All rights reserved. - -Panel graphics in res/ are © 2017 - -Derivative works may not use the AS logo or panel graphics including custom component graphics (knobs, switches, screws, caps,etc.). - -### AS Modules License ### -MIT License - -Copyright (c) 2017 Alfredo Santamaria, Copyright (c) 2017 AS Custom Works - -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. - - -### FUNDAMENTAL ### - -Copyright (c) 2016 Andrew Belt (Source code licensed under BSD-3-Clause by Andrew Belt) - -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. - -### HetrickCV ### - -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. - - -### Mental ### - -Copyright (c) 2017 Strum strum@softhome.net , All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -### Autodafe ### - -Copyright (c) 2016 Antonio Grazioli (AUtodafe) 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. - -### martin-lueders/ML_modules ### - -BSD 3-Clause License - -Copyright (c) 2017, Martin Lueders -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -### Freeverb - Free, studio-quality reverb SOURCE CODE in the public domain ### ------------------------------------------------------------------------ - -Written by Jezar at Dreampoint - http://www.dreampoint.co.uk - - -Introduction ------------- - -Hello. - -I'll try to keep this "readme" reasonably small. There are few things in the world that I hate more than long "readme" files. Except "coding conventions" - but more on that later... - -In this zip file you will find two folders of C++ source code: - -"Components" - Contains files that should clean-compile ON ANY TYPE OF COMPUTER OR SYSTEM WHATSOEVER. It should not be necessary to make ANY changes to these files to get them to compile, except to make up for inadequacies of certain compilers. These files create three classes - a comb filter, an allpass filter, and a reverb model made up of a number of instances of the filters, with some features to control the filters at a macro level. You will need to link these classes into another program that interfaces with them. The files in the components drawer are completely independant, and can be built without dependancies on anything else. Because of the simple interface, it should be possible to interface these files to any system - VST, DirectX, anything - without changing them AT ALL. - -"FreeverbVST" - Contains a Steinberg VST implementation of this version of Freeverb, using the components in (surprise) the components folder. It was built on a PC but may compile properly for the Macintosh with no problems. I don't know - I don't have a Macintosh. If you've figured out how to compile the examples in the Steinberg VST Development Kit, then you should easilly figure out how to bring the files into a project and get it working in a few minutes. It should be very simple. - -Note that this version of Freeverb doesn't contain predelay, or any EQ. I thought that might make it difficult to understand the "reverb" part of the code. Once you figure out how Freeverb works, you should find it trivial to add such features with little CPU overhead. - -Also, the code in this version of Freeverb has been optimised. This has changed the sound *slightly*, but not significantly compared to how much processing power it saves. - -Finally, note that there is also a built copy of this version of Freeverb called "Freeverb3.dll" - this is a VST plugin for the PC. If you want a version for the Mac or anything else, then you'll need to build it yourself from the code. - - -Technical Explanation ---------------------- - -Freeverb is a simple implementation of the standard Schroeder/Moorer reverb model. I guess the only reason why it sounds better than other reverbs, is simply because I spent a long while doing listening tests in order to create the values found in "tuning.h". It uses 8 comb filters on both the left and right channels), and you might possibly be able to get away with less if CPU power is a serious constraint for you. It then feeds the result of the reverb through 4 allpass filters on both the left and right channels. These "smooth" the sound. Adding more than four allpasses doesn't seem to add anything significant to the sound, and if you use less, the sound gets a bit "grainy". The filters on the right channel are slightly detuned compared to the left channel in order to create a stereo effect. - -Hopefully, you should find the code in the components drawer a model of brevity and clarity. Notice that I don't use any "coding conventions". Personally, I think that coding conventions suck. They are meant to make the code "clearer", but they inevitably do the complete opposite, making the code completely unfathomable. Anyone whose done Windows programming with its - frankly stupid - "Hungarian notation" will know exactly what I mean. Coding conventions typically promote issues that are irrelevant up to the status of appearing supremely important. It may have helped back people in the days when compilers where somewhat feeble in their type-safety, but not in the new millenium with advanced C++ compilers. - -Imagine if we rewrote the English language to conform to coding conventions. After all, The arguments should be just as valid for the English language as they are for a computer language. For example, we could put a lower-case "n" in front of every noun, a lower-case "p" in front of a persons name, a lower-case "v" in front of every verb, and a lower-case "a" in front of every adjective. Can you imagine what the English language would look like? All in the name of "clarity". It's just as stupid to do this for computer code as it would be to do it for the English language. I hope that the code for Freeverb in the components drawer demonstrates this, and helps start a movement back towards sanity in coding practices. - - -Background ----------- - -Why is the Freeverb code now public domain? Simple. I only intended to create Freeverb to provide me and my friends with studio-quality reverb for free. I never intended to make any money out of it. However, I simply do not have the time to develop it any further. I'm working on a "concept album" at the moment, and I'll never finish it if I spend any more time programming. - -In any case, I make more far money as a contract programmer - making Mobile Internet products - than I ever could writing plugins, so it simply doesn't make financial sense for me to spend any more time on it. - -Rather than give Freeverb to any particular individual or organisation to profit from it, I've decided to give it away to the internet community at large, so that quality, FREE (or at the very least, low-cost) reverbs can be developed for all platforms. - -Feel free to use the source code for Freeverb in any of your own products, whether they are also available for free, or even if they are commercial - I really don't mind. You may do with the code whatever you wish. If you use it in a product (whether commercial or not), it would be very nice of you, if you were to send me a copy of your product - although I appreciate that this isn't always possible in all circumstances. - -HOWEVER, please don't bug me with questions about how to use this code. I gave away Freeverb because I don't have time to maintain it. That means I *certainly* don't have time to answer questions about the source code, so please don't email questions to me. I *will* ignore them. If you can't figure the code for Freeverb out - then find somebody who can. I hope that either way, you enjoy experimenting with it. - - -Disclaimer ----------- - -This software and source code is given away for free, without any warranties of any kind. It has been given away to the internet community as a free gift, so please treat it in the same spirit. - - -I hope this code is useful and interesting to you all! -I hope you have lots of fun experimenting with it and make good products! - -Very best regards, -Jezar. -Technology Consultant -Dreampoint Design and Engineering -http://www.dreampoint.co.uk - - -//ends \ No newline at end of file diff --git a/repos/AS/Makefile b/repos/AS/Makefile deleted file mode 100644 index b4a47860..00000000 --- a/repos/AS/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# Must follow the format in the Naming section of https://vcvrack.com/manual/PluginDevelopmentTutorial.html -SLUG = AS - -# Must follow the format in the Versioning section of https://vcvrack.com/manual/PluginDevelopmentTutorial.html -VERSION = 0.6dev - -# FLAGS will be passed to both the C and C++ compiler -FLAGS += -CFLAGS += -CXXFLAGS += - -# Careful about linking to shared libraries, since you can't assume much about the user's environment and library search path. -# Static libraries are fine. -LDFLAGS += - -# Add .cpp and .c files to the build -SOURCES += $(wildcard src/*.cpp freeverb/*.cpp) - -# Add files to the ZIP package when running `make dist` -# The compiled plugin is automatically added. -DISTRIBUTABLES += $(wildcard LICENSE*) res - -# If RACK_DIR is not defined when calling the Makefile, default to two levels above -RACK_DIR ?= ../.. - -# Include the VCV Rack plugin Makefile framework -include $(RACK_DIR)/plugin.mk \ No newline at end of file diff --git a/repos/AS/README.md b/repos/AS/README.md deleted file mode 100644 index 253e787c..00000000 --- a/repos/AS/README.md +++ /dev/null @@ -1,169 +0,0 @@ - -# AS modules for VCV Rack - -AS is a collection of modules for [VCV Rack](https://vcvrack.com/) by Alfredo Santamaria, Need a custom work?, you can find me at [Hakken.com.mx](http://www.hakken.com.mx/). - -AS Logo/Monogram Copyright (c) 2017 Alfredo Santamaria , All rights reserved. -Panel graphics in res/ are © 2017 -Derivative works may not use the AS logo or panel graphics including custom component graphics (knobs, switches, screws, caps,etc.). - -### Releases - -AS is compatible with VCV Rack 0.5.X. releases for Mac, Win and Linux are found on the [Release Page](https://github.com/AScustomWorks/as/releases) - -If you enjoy those modules you can support the development by making a donation, it will be appreciated!. Here's the link: [DONATE](https://www.paypal.me/frederius/) - - -![AS](https://github.com/AScustomWorks/AS/blob/master/AS.JPG) - -# AS modules - -### ADSR -Fundamental ADSR module. Mods: graphics, sliders instead of knobs to provide faster visual input. - -### VCA -Fundamental VCA module. Mods: graphics, sliders instead of knobs to provide faster visual input, one input + lin/exp switch instead of two separate inputs. - -V 0.5.3: Code fix, now the VCA module works ok when there's no envelope input present. - -### QuadVCA/Mixer -AS VCA module x 4, plus mixer functionality (user request). - -V 0.5.5: First relase of this module. - -### BPM Clock -Strum's Mental VCV Master Clock. Mods: graphics, reset trigger input and output. - -V 0.5.2: all the trigger signals are 10v now, it seems that some other modules don't work fine with the correct voltages. - -V 0.5.4: Fixed a reset signal issue. - -V 0.5.5: 16th clock output now sends unipolar signal, just as the other outputs. - -### 8 Channel Mixer -Fundamental/Autodafe mixer module. Mods: graphics, sliders for channel volume, stereo or mono output(L channel outputs L+R signal if R channel is not active). Now with main mix mute button. Beware,the default setting for each channel volume is at 70% in stead of 0%. - -V 0.5.2: added MIX L & R input to chain mixers without giving up 2 mixer channels. - -### Multi 2x5 -2x5 Signal multiplier. - -V 0.5.7 Module size reduced to 5HP - -### Merge 2x5 -2x5 CV Signal merger. - -V 0.5.7: First relase of this module. - -### Mono VU Meter -V 0.5.4, New module added, Mono VU Meter made to match the 8CH Mixer. - -### Stereo VU Meter -V 0.5.3, New module added, Stereo VU Meter made to match the 8CH Mixer. - -### 16-step Sequencer -Fundamental/Autodafe SEQ module. Mods: graphics, digital display to show the number of steps selected. - -V 0.5.2: added digital display to show current sequence step so you can run/stop the sequence and tune in the current step. - -V 0.5.3: added edit mode: manual trigger with current step selector buttons and blinking led light to highlight the current step. Send a row output to a NYSTHI Hot Tuna and enjoy precise step tuning! - -V 0.5.4: Exposed the trigger mode settings into the panel (contextual menu is still there but it won't change the mode) - -### TinySawish -RODENTMODULES MuO. Mods: graphics, smaller panel size. - -V 0.5.4 Added dc blocker code, modified a bit the internal parameters. - -V 0.5.5 Extendend the freq range 1 octave below. - -V 0.5.7 Module size reduced to 4HP - -### TinySine -VCV tutorial module. Mods: graphics, proper sine wave. - -V 0.5.7 Module size reduced to 4HP - -### TriLFO -Fundamental LFO module. Mods:graphics, controls stripped to the basics but you get 3 LFOS on the same space. - -### Triggers -A couple of manual trigger buttons, one ON/OFF, one temporary, both with 4 trigger outputs, trigger volts knob going from 1 to 10 v output. - -(NOTICE: Triggers MKI will supersede Triggers, so Triggers will be removed from the plugin by v0.6 but you have time now to replace it on your current patches and keep everything working fine). - -### Triggers MKI -A manual CV signal trigger module with latch and temporary triggers, volts knob lets you adjust from 0 to 10 v output. - -V 0.5.7: First relase of this module. - -### Triggers MKII -A manual CV signal temporary trigger module with labeling integrated, so you remember where the signal is going. - -The labels list includes: - "------", "MUTE"," SOLO"," RESET"," DRUMS"," KICK"," SNARE"," HIHAT"," CLAP"," PERC","BASS 1","BASS 2"," GTR 1", - " GTR 2","LEAD 1","LEAD 2"," PAD 1"," PAD 2","CHORDS"," FX 1"," FX 2"," SEQ 1"," SEQ 2"," MIX 1"," MIX 2", - " AUX 1"," AUX 2"," ON"," OFF"," START"," STOP"," PAUSE"," UP"," DOWN"," LEFT"," RIGHT", - -V 0.5.7: First relase of this module. - -### Steps -Strum's Mental VCV Counters module. Mods: graphics, 3 counters, up to 64 steps each, added reset lights to the buttons. - -V 0.5.4: First relase of this module. - -V 0.5.5: code tweaks. - -### Launch Gate -Delay the start of a flow of signals by a set number of clock ticks (TAOS request). - -V 0.5.5: First relase of this module. - -### Kill Gate -Cut the flow of signals after a set number of clock ticks (TAOS request). - -V 0.5.6: First relase of this module. - -### Signal Delay -Delay the incomming CV signal by set milliseconds, with signal thru and delayed output. You can chain several Signal Delay modules together for unlimited length of delays. (TAOS request). - -V 0.5.5: First relase of this module. - -### Delay Plus -Fundamental Delay module. Mods: graphics, digital display to show delay time in MS , wet signal send & return, bypass switch. - -V 0.5.4: Updated look. - -V 0.5.5 CHanged the time knob reading from exponential to linear, now you can set any value precisely at the whole 1 to 10k ms range. - -### Phaser -Autodafe's Phaser Fx module. Mods: graphics, bypass switch. - -V 0.5.4: Added CV inputs for each parameter, updated look. - -### SuperDrive -Overdrive/clipping Fx module with DRIVE, TONE and GAIN parameters, to get those acid bass lines we all love!. - -V 0.5.4: First relase of this module. - -### Reverb -Reverb Fx module based on ML_modules reverb and Freeverb code, with DECAY, DAMP and BLEND parameters, a little bit tamed Reverb with mixed output signal. - -0.5.4: First relase of this module. - -### Tremolo -Tremolo Fx module with SHAPE, SPEED and BLEND parameters, and a phase switch (set your effect, duplicate the module and invert the phase for stereo tremolo setup)your Tremolo to go!. - -0.5.6: First relase of this module. - -### WaveShaper -HetrickCV Wave Shaper module. Mods: graphics, bypass switch. - -V 0.5.2: added back the voltage range switch. - -V 0.5.4: Updated look. - -### Blank Panel -Blank panels in 4,6 & 8 HP. - -### Have fun! diff --git a/repos/AS/_config.yml b/repos/AS/_config.yml deleted file mode 100644 index 18854876..00000000 --- a/repos/AS/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-midnight \ No newline at end of file diff --git a/repos/AS/freeverb/allpass.hpp b/repos/AS/freeverb/allpass.hpp deleted file mode 100644 index 9d1ba6ec..00000000 --- a/repos/AS/freeverb/allpass.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// Allpass filter declaration -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -// adapted for use in VCV Rack by Martin Lueders - -#ifndef _allpass_ -#define _allpass_ -#include "denormals.h" - -class allpass -{ -public: - allpass() - { - bufidx = 0; - buffer = 0; - }; - - ~allpass() - { - if (buffer) delete buffer; - }; - - void makebuffer(float *buf, int size) - { - if (buffer) delete buffer; - buffer = new float[size]; - bufsize = size; - bufidx = 0; - } - - void deletebuffer() - { - if(buffer) delete buffer; - bufsize = 0; - }; - - void setbuffer(float *buf, int size) - { - buffer = buf; - bufsize = size; - }; - - inline float process(float inp, float feedback); - void mute() - { - for (int i=0; i=bufsize) bufidx = 0; - - return output; -} - -#endif//_allpass - -//ends diff --git a/repos/AS/freeverb/comb.hpp b/repos/AS/freeverb/comb.hpp deleted file mode 100644 index a0a8bbf0..00000000 --- a/repos/AS/freeverb/comb.hpp +++ /dev/null @@ -1,92 +0,0 @@ -// Comb filter class declaration -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -// adapted for use in VCV Rack by Martin Lueders - -#ifndef _comb_ -#define _comb_ - -#include "denormals.h" - -class comb -{ -public: - comb() - { - buffer = 0; - filterstore = 0; - bufidx = 0; - }; - - ~comb() - { - if (buffer) delete buffer; - }; - - void makebuffer(float *buf, int size) - { - if (buffer) {delete buffer;} - buffer = new float[size]; - bufsize = size; - bufidx = 0; - } - - void deletebuffer() - { - if(buffer) delete buffer; - bufsize = 0; - }; - - void setbuffer(float *buf, int size) - { - buffer = buf; - bufsize = size; - }; - - inline float process(float inp, float damp1, float damp2, float feedback); - void mute() - { - for( int i=0; i=bufsize) bufidx = 0; - - return output; -} - -#endif //_comb_ - -//ends diff --git a/repos/AS/freeverb/denormals.h b/repos/AS/freeverb/denormals.h deleted file mode 100644 index f8714127..00000000 --- a/repos/AS/freeverb/denormals.h +++ /dev/null @@ -1,15 +0,0 @@ -// Macro for killing denormalled numbers -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// Based on IS_DENORMAL macro by Jon Watte -// This code is public domain - -#ifndef _denormals_ -#define _denormals_ - -#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f - -#endif//_denormals_ - -//ends diff --git a/repos/AS/freeverb/readme.txt b/repos/AS/freeverb/readme.txt deleted file mode 100644 index 36361f4b..00000000 --- a/repos/AS/freeverb/readme.txt +++ /dev/null @@ -1,67 +0,0 @@ -Freeverb - Free, studio-quality reverb SOURCE CODE in the public domain ------------------------------------------------------------------------ - -Written by Jezar at Dreampoint - http://www.dreampoint.co.uk - - -Introduction ------------- - -Hello. - -I'll try to keep this "readme" reasonably small. There are few things in the world that I hate more than long "readme" files. Except "coding conventions" - but more on that later... - -In this zip file you will find two folders of C++ source code: - -"Components" - Contains files that should clean-compile ON ANY TYPE OF COMPUTER OR SYSTEM WHATSOEVER. It should not be necessary to make ANY changes to these files to get them to compile, except to make up for inadequacies of certain compilers. These files create three classes - a comb filter, an allpass filter, and a reverb model made up of a number of instances of the filters, with some features to control the filters at a macro level. You will need to link these classes into another program that interfaces with them. The files in the components drawer are completely independant, and can be built without dependancies on anything else. Because of the simple interface, it should be possible to interface these files to any system - VST, DirectX, anything - without changing them AT ALL. - -"FreeverbVST" - Contains a Steinberg VST implementation of this version of Freeverb, using the components in (surprise) the components folder. It was built on a PC but may compile properly for the Macintosh with no problems. I don't know - I don't have a Macintosh. If you've figured out how to compile the examples in the Steinberg VST Development Kit, then you should easilly figure out how to bring the files into a project and get it working in a few minutes. It should be very simple. - -Note that this version of Freeverb doesn't contain predelay, or any EQ. I thought that might make it difficult to understand the "reverb" part of the code. Once you figure out how Freeverb works, you should find it trivial to add such features with little CPU overhead. - -Also, the code in this version of Freeverb has been optimised. This has changed the sound *slightly*, but not significantly compared to how much processing power it saves. - -Finally, note that there is also a built copy of this version of Freeverb called "Freeverb3.dll" - this is a VST plugin for the PC. If you want a version for the Mac or anything else, then you'll need to build it yourself from the code. - - -Technical Explanation ---------------------- - -Freeverb is a simple implementation of the standard Schroeder/Moorer reverb model. I guess the only reason why it sounds better than other reverbs, is simply because I spent a long while doing listening tests in order to create the values found in "tuning.h". It uses 8 comb filters on both the left and right channels), and you might possibly be able to get away with less if CPU power is a serious constraint for you. It then feeds the result of the reverb through 4 allpass filters on both the left and right channels. These "smooth" the sound. Adding more than four allpasses doesn't seem to add anything significant to the sound, and if you use less, the sound gets a bit "grainy". The filters on the right channel are slightly detuned compared to the left channel in order to create a stereo effect. - -Hopefully, you should find the code in the components drawer a model of brevity and clarity. Notice that I don't use any "coding conventions". Personally, I think that coding conventions suck. They are meant to make the code "clearer", but they inevitably do the complete opposite, making the code completely unfathomable. Anyone whose done Windows programming with its - frankly stupid - "Hungarian notation" will know exactly what I mean. Coding conventions typically promote issues that are irrelevant up to the status of appearing supremely important. It may have helped back people in the days when compilers where somewhat feeble in their type-safety, but not in the new millenium with advanced C++ compilers. - -Imagine if we rewrote the English language to conform to coding conventions. After all, The arguments should be just as valid for the English language as they are for a computer language. For example, we could put a lower-case "n" in front of every noun, a lower-case "p" in front of a persons name, a lower-case "v" in front of every verb, and a lower-case "a" in front of every adjective. Can you imagine what the English language would look like? All in the name of "clarity". It's just as stupid to do this for computer code as it would be to do it for the English language. I hope that the code for Freeverb in the components drawer demonstrates this, and helps start a movement back towards sanity in coding practices. - - -Background ----------- - -Why is the Freeverb code now public domain? Simple. I only intended to create Freeverb to provide me and my friends with studio-quality reverb for free. I never intended to make any money out of it. However, I simply do not have the time to develop it any further. I'm working on a "concept album" at the moment, and I'll never finish it if I spend any more time programming. - -In any case, I make more far money as a contract programmer - making Mobile Internet products - than I ever could writing plugins, so it simply doesn't make financial sense for me to spend any more time on it. - -Rather than give Freeverb to any particular individual or organisation to profit from it, I've decided to give it away to the internet community at large, so that quality, FREE (or at the very least, low-cost) reverbs can be developed for all platforms. - -Feel free to use the source code for Freeverb in any of your own products, whether they are also available for free, or even if they are commercial - I really don't mind. You may do with the code whatever you wish. If you use it in a product (whether commercial or not), it would be very nice of you, if you were to send me a copy of your product - although I appreciate that this isn't always possible in all circumstances. - -HOWEVER, please don't bug me with questions about how to use this code. I gave away Freeverb because I don't have time to maintain it. That means I *certainly* don't have time to answer questions about the source code, so please don't email questions to me. I *will* ignore them. If you can't figure the code for Freeverb out - then find somebody who can. I hope that either way, you enjoy experimenting with it. - - -Disclaimer ----------- - -This software and source code is given away for free, without any warranties of any kind. It has been given away to the internet community as a free gift, so please treat it in the same spirit. - - -I hope this code is useful and interesting to you all! -I hope you have lots of fun experimenting with it and make good products! - -Very best regards, -Jezar. -Technology Consultant -Dreampoint Design and Engineering -http://www.dreampoint.co.uk - - -//ends diff --git a/repos/AS/freeverb/revmodel.cpp b/repos/AS/freeverb/revmodel.cpp deleted file mode 100644 index 3fa13906..00000000 --- a/repos/AS/freeverb/revmodel.cpp +++ /dev/null @@ -1,233 +0,0 @@ -// Reverb model implementation -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -// adapted for use in VCV Rack by Martin Lueders - -#include "revmodel.hpp" - -revmodel::revmodel() -{ -}; - - -void revmodel::init(const float sampleRate) -{ - - conversion = sampleRate/44100.0; - - int ccombtuningL1 = round(conversion * combtuningL1); - int ccombtuningR1 = round(conversion * combtuningR1); - int ccombtuningL2 = round(conversion * combtuningL2); - int ccombtuningR2 = round(conversion * combtuningR2); - int ccombtuningL3 = round(conversion * combtuningL3); - int ccombtuningR3 = round(conversion * combtuningR3); - int ccombtuningL4 = round(conversion * combtuningL4); - int ccombtuningR4 = round(conversion * combtuningR4); - int ccombtuningL5 = round(conversion * combtuningL5); - int ccombtuningR5 = round(conversion * combtuningR5); - int ccombtuningL6 = round(conversion * combtuningL6); - int ccombtuningR6 = round(conversion * combtuningR6); - int ccombtuningL7 = round(conversion * combtuningL7); - int ccombtuningR7 = round(conversion * combtuningR7); - int ccombtuningL8 = round(conversion * combtuningL8); - int ccombtuningR8 = round(conversion * combtuningR8); - - int callpasstuningL1 = round(conversion * allpasstuningL1); - int callpasstuningR1 = round(conversion * allpasstuningR1); - int callpasstuningL2 = round(conversion * allpasstuningL2); - int callpasstuningR2 = round(conversion * allpasstuningR2); - int callpasstuningL3 = round(conversion * allpasstuningL3); - int callpasstuningR3 = round(conversion * allpasstuningR3); - int callpasstuningL4 = round(conversion * allpasstuningL4); - int callpasstuningR4 = round(conversion * allpasstuningR4); - - // Tie the components to their buffers - combL[0].makebuffer(bufcombL1,ccombtuningL1); - combR[0].makebuffer(bufcombR1,ccombtuningR1); - combL[1].makebuffer(bufcombL2,ccombtuningL2); - combR[1].makebuffer(bufcombR2,ccombtuningR2); - combL[2].makebuffer(bufcombL3,ccombtuningL3); - combR[2].makebuffer(bufcombR3,ccombtuningR3); - combL[3].makebuffer(bufcombL4,ccombtuningL4); - combR[3].makebuffer(bufcombR4,ccombtuningR4); - combL[4].makebuffer(bufcombL5,ccombtuningL5); - combR[4].makebuffer(bufcombR5,ccombtuningR5); - combL[5].makebuffer(bufcombL6,ccombtuningL6); - combR[5].makebuffer(bufcombR6,ccombtuningR6); - combL[6].makebuffer(bufcombL7,ccombtuningL7); - combR[6].makebuffer(bufcombR7,ccombtuningR7); - combL[7].makebuffer(bufcombL8,ccombtuningL8); - combR[7].makebuffer(bufcombR8,ccombtuningR8); - - allpassL[0].makebuffer(bufallpassL1,callpasstuningL1); - allpassR[0].makebuffer(bufallpassR1,callpasstuningR1); - allpassL[1].makebuffer(bufallpassL2,callpasstuningL2); - allpassR[1].makebuffer(bufallpassR2,callpasstuningR2); - allpassL[2].makebuffer(bufallpassL3,callpasstuningL3); - allpassR[2].makebuffer(bufallpassR3,callpasstuningR3); - allpassL[3].makebuffer(bufallpassL4,callpasstuningL4); - allpassR[3].makebuffer(bufallpassR4,callpasstuningR4); - - feedback_allpass = 0.5; - - setwet(initialwet); - setroomsize(initialroom); - setdry(initialdry); - setdamp(initialdamp); - setwidth(initialwidth); - setmode(initialmode); - - - // Buffer will be full of rubbish - so we MUST mute them - mute(); -} - - -void revmodel::mute() -{ - if (getmode() >= freezemode) - return; - - for (int i=0;i= freezemode) - { - roomsize1 = 1; - damp1 = 0; - gain = muted; - } - else - { - roomsize1 = roomsize; - damp1 = damp; - gain = fixedgain; - } - - damp2 = 1.0 - damp1; -} - -// The following get/set functions are not inlined, because -// speed is never an issue when calling them, and also -// because as you develop the reverb model, you may -// wish to take dynamic action when they are called. - -void revmodel::setroomsize(float value) -{ - roomsize = ((value*scaleroom) + offsetroom); // * conversion; - update(); -} - -float revmodel::getroomsize() -{ -// return (roomsize/conversion-offsetroom)/scaleroom; - return (roomsize-offsetroom)/scaleroom; -} - -void revmodel::setdamp(float value) -{ - damp = value*scaledamp/conversion; - damp = value*scaledamp * sqrt(conversion) ; - update(); -} - -float revmodel::getdamp() -{ -// return conversion * damp/scaledamp; - return damp/scaledamp; -} - -void revmodel::setwet(float value) -{ - wet = value*scalewet; - update(); -} - -float revmodel::getwet() -{ - return wet/scalewet; -} - -void revmodel::setdry(float value) -{ - dry = value*scaledry; -} - -float revmodel::getdry() -{ - return dry/scaledry; -} - -void revmodel::setwidth(float value) -{ - width = value; - update(); -} - -float revmodel::getwidth() -{ - return width; -} - -void revmodel::setmode(float value) -{ - mode = value; - update(); -} - -float revmodel::getmode() -{ - if (mode >= freezemode) - return 1; - else - return 0; -} - -//ends diff --git a/repos/AS/freeverb/revmodel.hpp b/repos/AS/freeverb/revmodel.hpp deleted file mode 100644 index 139548de..00000000 --- a/repos/AS/freeverb/revmodel.hpp +++ /dev/null @@ -1,99 +0,0 @@ -// Reverb model declaration -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -// adapted for use in VCV Rack by Martin Lueders - -#ifndef _revmodel_ -#define _revmodel_ - -#include - -#include "comb.hpp" -#include "allpass.hpp" -#include "tuning.h" - -class revmodel -{ -public: - revmodel(); - - void init(const float sampleRate); - - void mute(); - - void process(const float input, float &outputL, float &outputR); - - void setroomsize(float value); - float getroomsize(); - void setdamp(float value); - float getdamp(); - void setwet(float value); - float getwet(); - void setdry(float value); - float getdry(); - void setwidth(float value); - float getwidth(); - void setmode(float value); - float getmode(); -private: - void update(); -private: - float gain; - float roomsize,roomsize1; - float damp,damp1, damp2; - float feedback_allpass; - float wet,wet1,wet2; - float dry; - float width; - float mode; - - float conversion; - float math_e = 2.71828; - - // The following are all declared inline - // to remove the need for dynamic allocation - // with its subsequent error-checking messiness - - // Comb filters - comb combL[numcombs]; - comb combR[numcombs]; - - // Allpass filters - allpass allpassL[numallpasses]; - allpass allpassR[numallpasses]; - - // Buffers for the combs - float *bufcombL1; - float *bufcombR1; - float *bufcombL2; - float *bufcombR2; - float *bufcombL3; - float *bufcombR3; - float *bufcombL4; - float *bufcombR4; - float *bufcombL5; - float *bufcombR5; - float *bufcombL6; - float *bufcombR6; - float *bufcombL7; - float *bufcombR7; - float *bufcombL8; - float *bufcombR8; - - // Buffers for the allpasses - float *bufallpassL1; - float *bufallpassR1; - float *bufallpassL2; - float *bufallpassR2; - float *bufallpassL3; - float *bufallpassR3; - float *bufallpassL4; - float *bufallpassR4; -}; - -#endif//_revmodel_ - -//ends diff --git a/repos/AS/freeverb/tuning.h b/repos/AS/freeverb/tuning.h deleted file mode 100644 index 709e0457..00000000 --- a/repos/AS/freeverb/tuning.h +++ /dev/null @@ -1,62 +0,0 @@ -// Reverb model tuning values -// -// Written by Jezar at Dreampoint, June 2000 -// http://www.dreampoint.co.uk -// This code is public domain - -#ifndef _tuning_ -#define _tuning_ - -const int numcombs = 8; -const int numallpasses = 4; -const float muted = 0; -//const float fixedgain = 0.015f; -const float fixedgain = 0.025f; -const float scalewet = 3; -const float scaledry = 2; -const float scaledamp = 0.4f; -//const float scaleroom = 0.28f; -const float scaleroom = 0.30f; -const float offsetroom = 0.7f; -const float initialroom = 0.5f; -const float initialdamp = 0.5f; -const float initialwet = 1/scalewet; -const float initialdry = 0; -const float initialwidth = 1; -const float initialmode = 0; -const float freezemode = 0.5f; -const int stereospread = 23; - -// These values assume 44.1KHz sample rate -// they will probably be OK for 48KHz sample rate -// but would need scaling for 96KHz (or other) sample rates. -// The values were obtained by listening tests. -const int combtuningL1 = 1116; -const int combtuningR1 = 1116+stereospread; -const int combtuningL2 = 1188; -const int combtuningR2 = 1188+stereospread; -const int combtuningL3 = 1277; -const int combtuningR3 = 1277+stereospread; -const int combtuningL4 = 1356; -const int combtuningR4 = 1356+stereospread; -const int combtuningL5 = 1422; -const int combtuningR5 = 1422+stereospread; -const int combtuningL6 = 1491; -const int combtuningR6 = 1491+stereospread; -const int combtuningL7 = 1557; -const int combtuningR7 = 1557+stereospread; -const int combtuningL8 = 1617; -const int combtuningR8 = 1617+stereospread; -const int allpasstuningL1 = 556; -const int allpasstuningR1 = 556+stereospread; -const int allpasstuningL2 = 441; -const int allpasstuningR2 = 441+stereospread; -const int allpasstuningL3 = 341; -const int allpasstuningR3 = 341+stereospread; -const int allpasstuningL4 = 225; -const int allpasstuningR4 = 225+stereospread; - -#endif//_tuning_ - -//ends - diff --git a/repos/AS/res/8chMixer.svg b/repos/AS/res/8chMixer.svg deleted file mode 100644 index dc30fab8..00000000 --- a/repos/AS/res/8chMixer.svg +++ /dev/null @@ -1,626 +0,0 @@ - - - -image/svg+xml  \ No newline at end of file diff --git a/repos/AS/res/ADSR.svg b/repos/AS/res/ADSR.svg deleted file mode 100644 index d64f8200..00000000 --- a/repos/AS/res/ADSR.svg +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/BPMClock.svg b/repos/AS/res/BPMClock.svg deleted file mode 100644 index c6df8726..00000000 --- a/repos/AS/res/BPMClock.svg +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/BlankPanel4.svg b/repos/AS/res/BlankPanel4.svg deleted file mode 100644 index 37465fb9..00000000 --- a/repos/AS/res/BlankPanel4.svg +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - image/svg+xml - - BlankPanel8 - - - - - - - - BlankPanel8 - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/BlankPanel6.svg b/repos/AS/res/BlankPanel6.svg deleted file mode 100644 index 2daf64a0..00000000 --- a/repos/AS/res/BlankPanel6.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - image/svg+xml - - - - - - - MyModule - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/BlankPanel8.svg b/repos/AS/res/BlankPanel8.svg deleted file mode 100644 index b235d843..00000000 --- a/repos/AS/res/BlankPanel8.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - BlankPanel8 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/DelayPlus.svg b/repos/AS/res/DelayPlus.svg deleted file mode 100644 index c7c4846b..00000000 --- a/repos/AS/res/DelayPlus.svg +++ /dev/null @@ -1,678 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Flow.svg b/repos/AS/res/Flow.svg deleted file mode 100644 index 032dd91e..00000000 --- a/repos/AS/res/Flow.svg +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/KillGate.svg b/repos/AS/res/KillGate.svg deleted file mode 100644 index 9eb339b1..00000000 --- a/repos/AS/res/KillGate.svg +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - image/svg+xml - - BlankPanel8 - - - - - - - - BlankPanel8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/LaunchGate.svg b/repos/AS/res/LaunchGate.svg deleted file mode 100644 index 3031f5dc..00000000 --- a/repos/AS/res/LaunchGate.svg +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - image/svg+xml - - BlankPanel8 - - - - - - - - BlankPanel8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Merge2_5.svg b/repos/AS/res/Merge2_5.svg deleted file mode 100644 index 3e069821..00000000 --- a/repos/AS/res/Merge2_5.svg +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - image/svg+xml - - MyModule - - - - - - - - MyModule - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Multiple2_5 copy.svg b/repos/AS/res/Multiple2_5 copy.svg deleted file mode 100644 index 60560816..00000000 --- a/repos/AS/res/Multiple2_5 copy.svg +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - image/svg+xml - - MyModule - - - - - - MyModule - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Multiple2_5.svg b/repos/AS/res/Multiple2_5.svg deleted file mode 100644 index 399ea9b6..00000000 --- a/repos/AS/res/Multiple2_5.svg +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - image/svg+xml - - MyModule - - - - - - MyModule - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/OFL.txt b/repos/AS/res/OFL.txt deleted file mode 100644 index 5ccca47e..00000000 --- a/repos/AS/res/OFL.txt +++ /dev/null @@ -1,98 +0,0 @@ -Copyright (c) 2014, Cedric Knight , -with Reserved Font Name "Segment7". - -Copyright (c) 2009, Paul Flo Williams (paul@frixxon.co.uk)., -with Reserved Font Name "Segment14”. - - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/repos/AS/res/Phaser.svg b/repos/AS/res/Phaser.svg deleted file mode 100644 index f7d64e77..00000000 --- a/repos/AS/res/Phaser.svg +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/QuadVCA.svg b/repos/AS/res/QuadVCA.svg deleted file mode 100644 index 701eec17..00000000 --- a/repos/AS/res/QuadVCA.svg +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Reverb.svg b/repos/AS/res/Reverb.svg deleted file mode 100644 index 39519f96..00000000 --- a/repos/AS/res/Reverb.svg +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/SEQ16.svg b/repos/AS/res/SEQ16.svg deleted file mode 100644 index 1e17c294..00000000 --- a/repos/AS/res/SEQ16.svg +++ /dev/null @@ -1,3342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/SawOSC.svg b/repos/AS/res/SawOSC.svg deleted file mode 100644 index f6efc98e..00000000 --- a/repos/AS/res/SawOSC.svg +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Segment7Standard.ttf b/repos/AS/res/Segment7Standard.ttf deleted file mode 100644 index bdd6e2af..00000000 Binary files a/repos/AS/res/Segment7Standard.ttf and /dev/null differ diff --git a/repos/AS/res/SignalDelay.svg b/repos/AS/res/SignalDelay.svg deleted file mode 100644 index 8590d6f9..00000000 --- a/repos/AS/res/SignalDelay.svg +++ /dev/null @@ -1,528 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/SineOSC.svg b/repos/AS/res/SineOSC.svg deleted file mode 100644 index 6fcf932f..00000000 --- a/repos/AS/res/SineOSC.svg +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Steps.svg b/repos/AS/res/Steps.svg deleted file mode 100644 index 187cda89..00000000 --- a/repos/AS/res/Steps.svg +++ /dev/null @@ -1,703 +0,0 @@ - - - - - - image/svg+xml - - BlankPanel8 - - - - - - - - - - - - - BlankPanel8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/SuperDrive.svg b/repos/AS/res/SuperDrive.svg deleted file mode 100644 index d18a0c13..00000000 --- a/repos/AS/res/SuperDrive.svg +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Tremolo.svg b/repos/AS/res/Tremolo.svg deleted file mode 100644 index 0f2e3063..00000000 --- a/repos/AS/res/Tremolo.svg +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/Triggers.svg b/repos/AS/res/Triggers.svg deleted file mode 100644 index c09187c0..00000000 --- a/repos/AS/res/Triggers.svg +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/TriggersMKI.svg b/repos/AS/res/TriggersMKI.svg deleted file mode 100644 index 51f0919e..00000000 --- a/repos/AS/res/TriggersMKI.svg +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/TriggersMKII.svg b/repos/AS/res/TriggersMKII.svg deleted file mode 100644 index 78e3c918..00000000 --- a/repos/AS/res/TriggersMKII.svg +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/VCA.svg b/repos/AS/res/VCA.svg deleted file mode 100644 index acf668b6..00000000 --- a/repos/AS/res/VCA.svg +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/WaveShaper.svg b/repos/AS/res/WaveShaper.svg deleted file mode 100644 index a2ec0f07..00000000 --- a/repos/AS/res/WaveShaper.svg +++ /dev/null @@ -1,624 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-FaderPot.svg b/repos/AS/res/as-FaderPot.svg deleted file mode 100644 index 271e92bf..00000000 --- a/repos/AS/res/as-FaderPot.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-FxKnobBlack.svg b/repos/AS/res/as-FxKnobBlack.svg deleted file mode 100644 index f7e5ab06..00000000 --- a/repos/AS/res/as-FxKnobBlack.svg +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-FxKnobWhite.svg b/repos/AS/res/as-FxKnobWhite.svg deleted file mode 100644 index af3dc0d0..00000000 --- a/repos/AS/res/as-FxKnobWhite.svg +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-PJ301M.svg b/repos/AS/res/as-PJ301M.svg deleted file mode 100644 index 38c41d93..00000000 --- a/repos/AS/res/as-PJ301M.svg +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-SlidePot.svg b/repos/AS/res/as-SlidePot.svg deleted file mode 100644 index f8fbbf0d..00000000 --- a/repos/AS/res/as-SlidePot.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-SlidePotHandle.svg b/repos/AS/res/as-SlidePotHandle.svg deleted file mode 100644 index 9f3db6d6..00000000 --- a/repos/AS/res/as-SlidePotHandle.svg +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-hexscrew.svg b/repos/AS/res/as-hexscrew.svg deleted file mode 100644 index 7450c8dc..00000000 --- a/repos/AS/res/as-hexscrew.svg +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/repos/AS/res/as-knob.svg b/repos/AS/res/as-knob.svg deleted file mode 100644 index 1c97c236..00000000 --- a/repos/AS/res/as-knob.svg +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-knobBlack.svg b/repos/AS/res/as-knobBlack.svg deleted file mode 100644 index 7bd5eee0..00000000 --- a/repos/AS/res/as-knobBlack.svg +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-knobMG.svg b/repos/AS/res/as-knobMG.svg deleted file mode 100644 index 7da04444..00000000 --- a/repos/AS/res/as-knobMG.svg +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as-knobMGbig.svg b/repos/AS/res/as-knobMGbig.svg deleted file mode 100644 index 409a7f50..00000000 --- a/repos/AS/res/as-knobMGbig.svg +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSSH_0.svg b/repos/AS/res/as_CKSSH_0.svg deleted file mode 100644 index 91a2e72d..00000000 --- a/repos/AS/res/as_CKSSH_0.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSSH_1.svg b/repos/AS/res/as_CKSSH_1.svg deleted file mode 100644 index 7c56e7d1..00000000 --- a/repos/AS/res/as_CKSSH_1.svg +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSSThree_0.svg b/repos/AS/res/as_CKSSThree_0.svg deleted file mode 100644 index 978d12cb..00000000 --- a/repos/AS/res/as_CKSSThree_0.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSSThree_1.svg b/repos/AS/res/as_CKSSThree_1.svg deleted file mode 100644 index 385b0a59..00000000 --- a/repos/AS/res/as_CKSSThree_1.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSSThree_2.svg b/repos/AS/res/as_CKSSThree_2.svg deleted file mode 100644 index 0356da4d..00000000 --- a/repos/AS/res/as_CKSSThree_2.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSS_0.svg b/repos/AS/res/as_CKSS_0.svg deleted file mode 100644 index 35ca574c..00000000 --- a/repos/AS/res/as_CKSS_0.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_CKSS_1.svg b/repos/AS/res/as_CKSS_1.svg deleted file mode 100644 index 25fa89bf..00000000 --- a/repos/AS/res/as_CKSS_1.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_LFO.svg b/repos/AS/res/as_LFO.svg deleted file mode 100644 index 7b40ec49..00000000 --- a/repos/AS/res/as_LFO.svg +++ /dev/null @@ -1,786 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/as_bigLEDBezel.svg b/repos/AS/res/as_bigLEDBezel.svg deleted file mode 100644 index bfc522ff..00000000 --- a/repos/AS/res/as_bigLEDBezel.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - image/svg+xml - - as_bigLEDButton - - - - - - - - - - as_bigLEDButton - - - - diff --git a/repos/AS/res/monoVUmeter.svg b/repos/AS/res/monoVUmeter.svg deleted file mode 100644 index 8e10bb84..00000000 --- a/repos/AS/res/monoVUmeter.svg +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/res/saxmono.ttf b/repos/AS/res/saxmono.ttf deleted file mode 100644 index 3fe7d397..00000000 Binary files a/repos/AS/res/saxmono.ttf and /dev/null differ diff --git a/repos/AS/res/stereoVUmeter.svg b/repos/AS/res/stereoVUmeter.svg deleted file mode 100644 index ccbdc4cf..00000000 --- a/repos/AS/res/stereoVUmeter.svg +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/repos/AS/src/ADSR.cpp b/repos/AS/src/ADSR.cpp deleted file mode 100644 index 5515d632..00000000 --- a/repos/AS/src/ADSR.cpp +++ /dev/null @@ -1,154 +0,0 @@ -//************************************************************************************** -//ADSR module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** -#include "AS.hpp" -#include "dsp/digital.hpp" - -struct ADSR : Module { - enum ParamIds { - ATTACK_PARAM, - DECAY_PARAM, - SUSTAIN_PARAM, - RELEASE_PARAM, - NUM_PARAMS - }; - enum InputIds { - ATTACK_INPUT, - DECAY_INPUT, - SUSTAIN_INPUT, - RELEASE_INPUT, - GATE_INPUT, - TRIG_INPUT, - NUM_INPUTS - }; - enum OutputIds { - ENVELOPE_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - ATTACK_LIGHT, - DECAY_LIGHT, - SUSTAIN_LIGHT, - RELEASE_LIGHT, - NUM_LIGHTS - }; - - bool decaying = false; - float env = 0.0f; - SchmittTrigger trigger; - - ADSR() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - - } - void step() override; -}; - - -void ADSR::step() { - float attack = clamp(params[ATTACK_INPUT].value + inputs[ATTACK_INPUT].value / 10.0f, 0.0f, 1.0f); - float decay = clamp(params[DECAY_PARAM].value + inputs[DECAY_INPUT].value / 10.0f, 0.0f, 1.0f); - float sustain = clamp(params[SUSTAIN_PARAM].value + inputs[SUSTAIN_INPUT].value / 10.0f, 0.0f, 1.0f); - float release = clamp(params[RELEASE_PARAM].value + inputs[RELEASE_PARAM].value / 10.0f, 0.0f, 1.0f); - // Gate and trigger - bool gated = inputs[GATE_INPUT].value >= 1.0f; - if (trigger.process(inputs[TRIG_INPUT].value)) - decaying = false; - - const float base = 20000.0f; - const float maxTime = 10.0f; - if (gated) { - if (decaying) { - // Decay - if (decay < 1e-4) { - env = sustain; - } - else { - env += powf(base, 1 - decay) / maxTime * (sustain - env) / engineGetSampleRate(); - } - } - else { - // Attack - // Skip ahead if attack is all the way down (infinitely fast) - if (attack < 1e-4) { - env = 1.0f; - } - else { - env += powf(base, 1 - attack) / maxTime * (1.01 - env) / engineGetSampleRate(); - } - if (env >= 1.0f) { - env = 1.0f; - decaying = true; - } - } - } - else { - // Release - if (release < 1e-4) { - env = 0.0f; - } - else { - env += powf(base, 1 - release) / maxTime * (0.0 - env) / engineGetSampleRate(); - } - decaying = false; - } - - bool sustaining = isNear(env, sustain, 1e-3); - bool resting = isNear(env, 0.0, 1e-3); - - outputs[ENVELOPE_OUTPUT].value = 10.0f * env; - - // Lights - lights[ATTACK_LIGHT].value = (gated && !decaying) ? 1.0f : 0.0f; - lights[DECAY_LIGHT].value = (gated && decaying && !sustaining) ? 1.0f : 0.0f; - lights[SUSTAIN_LIGHT].value = (gated && decaying && sustaining) ? 1.0f : 0.0f; - lights[RELEASE_LIGHT].value = (!gated && !resting) ? 1.0f : 0.0f; -} - - - -struct ADSRWidget : ModuleWidget -{ - ADSRWidget(ADSR *module); -}; - - -ADSRWidget::ADSRWidget(ADSR *module) : ModuleWidget(module) { - box.size = Vec(RACK_GRID_WIDTH*8, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/ADSR.svg"))); - addChild(panel); - } - - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - static const float posX[4] = {13.0f,39.0f,65.0f,91.0f}; - addChild(ModuleLightWidget::create>(Vec(posX[0]+6, 74), module, ADSR::ATTACK_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(posX[1]+6, 74), module, ADSR::DECAY_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(posX[2]+6, 74), module, ADSR::SUSTAIN_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(posX[3]+6, 74), module, ADSR::RELEASE_LIGHT)); - - addParam(ParamWidget::create(Vec(posX[0]-3, 90), module, ADSR::ATTACK_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(posX[1]-3, 90), module, ADSR::DECAY_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(posX[2]-3, 90), module, ADSR::SUSTAIN_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(posX[3]-3, 90), module, ADSR::RELEASE_PARAM, 0.0f, 1.0f, 0.5f)); - - addInput(Port::create(Vec(posX[0]-4, 217), Port::INPUT, module, ADSR::ATTACK_INPUT)); - addInput(Port::create(Vec(posX[1]-4, 217), Port::INPUT, module, ADSR::DECAY_INPUT)); - addInput(Port::create(Vec(posX[2]-4, 217), Port::INPUT, module, ADSR::SUSTAIN_INPUT)); - addInput(Port::create(Vec(posX[3]-4, 217), Port::INPUT, module, ADSR::RELEASE_INPUT)); - - addInput(Port::create(Vec(posX[0]-4, 310), Port::INPUT, module, ADSR::GATE_INPUT)); - addInput(Port::create(Vec(48, 310), Port::INPUT, module, ADSR::TRIG_INPUT)); - - addOutput(Port::create(Vec(posX[3]-4, 310), Port::OUTPUT, module, ADSR::ENVELOPE_OUTPUT)); -} - -Model *modelADSR = Model::create("AS", "ADSR", "ADSR", ENVELOPE_GENERATOR_TAG); \ No newline at end of file diff --git a/repos/AS/src/AS.cpp b/repos/AS/src/AS.cpp deleted file mode 100644 index 837ac922..00000000 --- a/repos/AS/src/AS.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "AS.hpp" - -Plugin *plugin; - -void init(rack::Plugin *p) { - plugin = p; - p->slug = TOSTRING(SLUG); - p->version = TOSTRING(VERSION); - //OSCILLATORS - p->addModel(modelSineOsc); - p->addModel(modelSawOsc); - //TOOLS - p->addModel(modelADSR); - p->addModel(modelVCA); - p->addModel(modelQuadVCA); - p->addModel(modelTriLFO); - p->addModel(modelBPMClock); - p->addModel(modelSEQ16); - p->addModel(modelMixer8ch); - p->addModel(modelMonoVUmeter); - p->addModel(modelStereoVUmeter); - p->addModel(modelSteps); - p->addModel(modelLaunchGate); - p->addModel(modelKillGate); - p->addModel(modelFlow); - p->addModel(modelSignalDelay); - p->addModel(modelMultiple2_5); - p->addModel(modelMerge2_5); - p->addModel(modelTriggersMKI); - p->addModel(modelTriggersMKII); - //EFFECTS - p->addModel(modelDelayPlusFx); - p->addModel(modelPhaserFx); - p->addModel(modelReverbFx); - p->addModel(modelSuperDriveFx); - p->addModel(modelTremoloFx); - p->addModel(modelWaveShaper); - //BLANK PANELS - p->addModel(modelBlankPanel4); - p->addModel(modelBlankPanel6); - p->addModel(modelBlankPanel8); - -} diff --git a/repos/AS/src/AS.hpp b/repos/AS/src/AS.hpp deleted file mode 100644 index 192c268c..00000000 --- a/repos/AS/src/AS.hpp +++ /dev/null @@ -1,207 +0,0 @@ -#include "rack.hpp" - -using namespace rack; - -extern Plugin *plugin; - -//////////////////// -// module widgets -//////////////////// - -extern Model *modelSineOsc; -extern Model *modelSawOsc; - -extern Model *modelADSR; -extern Model *modelVCA; -extern Model *modelQuadVCA; -extern Model *modelTriLFO; -extern Model *modelBPMClock; -extern Model *modelSEQ16; -extern Model *modelMixer8ch; -extern Model *modelMonoVUmeter; -extern Model *modelStereoVUmeter; -extern Model *modelMultiple2_5; -extern Model *modelMerge2_5; -extern Model *modelSteps; -extern Model *modelTriggersMKI; -extern Model *modelTriggersMKII; -extern Model *modelLaunchGate; -extern Model *modelKillGate; -extern Model *modelFlow; -extern Model *modelSignalDelay; - -extern Model *modelDelayPlusFx; -extern Model *modelPhaserFx; -extern Model *modelReverbFx; -extern Model *modelSuperDriveFx; -extern Model *modelTremoloFx; -extern Model *modelWaveShaper; - -extern Model *modelBlankPanel4; -extern Model *modelBlankPanel6; -extern Model *modelBlankPanel8; - -////////////////////////////////////// -//MODULE COMPONENTS -///////////////////////////////////// -struct as_HexScrew : SVGScrew { - as_HexScrew() { - sw->svg = SVG::load(assetPlugin(plugin, "res/as-hexscrew.svg")); - sw->wrap(); - box.size = sw->box.size; - } -}; - -struct as_Knob : SVGKnob { - as_Knob() { - minAngle = -0.83 * M_PI; - maxAngle = 0.83 * M_PI; - sw->svg = SVG::load(assetPlugin(plugin, "res/as-knob.svg")); - sw->wrap(); - box.size = sw->box.size; - } -}; -struct as_KnobBlack : SVGKnob { - as_KnobBlack() { - minAngle = -0.83 * M_PI; - maxAngle = 0.83 * M_PI; - sw->svg = SVG::load(assetPlugin(plugin, "res/as-knobBlack.svg")); - sw->wrap(); - box.size = sw->box.size; - } -}; - -struct as_FxKnobWhite : SVGKnob { - as_FxKnobWhite() { - minAngle = -0.83 * M_PI; - maxAngle = 0.83 * M_PI; - sw->svg = SVG::load(assetPlugin(plugin, "res/as-FxKnobWhite.svg")); - sw->wrap(); - box.size = sw->box.size; - } -}; -struct as_FxKnobBlack : SVGKnob { - as_FxKnobBlack() { - minAngle = -0.83 * M_PI; - maxAngle = 0.83 * M_PI; - sw->svg = SVG::load(assetPlugin(plugin, "res/as-FxKnobBlack.svg")); - sw->wrap(); - box.size = sw->box.size; - } -}; - -struct BigLEDBezel : SVGSwitch, MomentarySwitch { - BigLEDBezel() { - addFrame(SVG::load(assetPlugin(plugin, "res/as_bigLEDBezel.svg"))); - } -}; - -struct as_CKSS : SVGSwitch, ToggleSwitch { - as_CKSS() { - addFrame(SVG::load(assetPlugin(plugin,"res/as_CKSS_0.svg"))); - addFrame(SVG::load(assetPlugin(plugin,"res/as_CKSS_1.svg"))); - } -}; - -struct as_CKSSH : SVGSwitch, ToggleSwitch { - as_CKSSH() { - addFrame(SVG::load(assetPlugin(plugin, "res/as_CKSSH_0.svg"))); - addFrame(SVG::load(assetPlugin(plugin, "res/as_CKSSH_1.svg"))); - sw->wrap(); - box.size = sw->box.size; - } -}; - -struct as_CKSSThree : SVGSwitch, ToggleSwitch { - as_CKSSThree() { - addFrame(SVG::load(assetPlugin(plugin,"res/as_CKSSThree_2.svg"))); - addFrame(SVG::load(assetPlugin(plugin,"res/as_CKSSThree_1.svg"))); - addFrame(SVG::load(assetPlugin(plugin,"res/as_CKSSThree_0.svg"))); - } -}; - -struct as_MuteBtn : SVGSwitch, ToggleSwitch { - as_MuteBtn() { - addFrame(SVG::load(assetPlugin(plugin,"res/as_mute-off.svg"))); - addFrame(SVG::load(assetPlugin(plugin,"res/as_mute-on.svg"))); - } -}; - -struct as_SoloBtn : SVGSwitch, ToggleSwitch { - as_SoloBtn() { - addFrame(SVG::load(assetPlugin(plugin,"res/as_solo-off.svg"))); - addFrame(SVG::load(assetPlugin(plugin,"res/as_solo-on.svg"))); - } -}; - -template -struct GiantLight : BASE { - GiantLight() { - this->box.size = mm2px(Vec(18.0, 18.0)); - } -}; - -template - struct MeterLight : BASE { - MeterLight() { - this->box.size = Vec(8, 8); - } - }; - - struct OrangeLight : GrayModuleLightWidget { - OrangeLight() { - addBaseColor(COLOR_ORANGE); - } -}; - -template -struct LedLight : BASE { - LedLight() { - //this->box.size = Vec(20.0, 20.0); - this->box.size = mm2px(Vec(6.0, 6.0)); - } -}; - -/** Reads two adjacent lightIds, so `lightId` and `lightId + 1` must be defined */ -struct YellowRedLight : GrayModuleLightWidget { - YellowRedLight() { - addBaseColor(COLOR_YELLOW); - addBaseColor(COLOR_RED); - } -}; - -struct as_PJ301MPort : SVGPort { - as_PJ301MPort() { - background->svg = SVG::load(assetPlugin(plugin,"res/as-PJ301M.svg")); - background->wrap(); - box.size = background->box.size; - } -}; - -struct as_SlidePot : SVGFader { - as_SlidePot() { - Vec margin = Vec(4, 4); - maxHandlePos = Vec(-1.5, -8).plus(margin); - minHandlePos = Vec(-1.5, 87).plus(margin); - background->svg = SVG::load(assetPlugin(plugin,"res/as-SlidePot.svg")); - background->wrap(); - background->box.pos = margin; - box.size = background->box.size.plus(margin.mult(2)); - handle->svg = SVG::load(assetPlugin(plugin,"res/as-SlidePotHandle.svg")); - handle->wrap(); - } -}; - -struct as_FaderPot : SVGFader { - as_FaderPot() { - Vec margin = Vec(4, 4); - maxHandlePos = Vec(-1.5, -8).plus(margin); - minHandlePos = Vec(-1.5, 57).plus(margin); - background->svg = SVG::load(assetPlugin(plugin,"res/as-FaderPot.svg")); - background->wrap(); - background->box.pos = margin; - box.size = background->box.size.plus(margin.mult(2)); - handle->svg = SVG::load(assetPlugin(plugin,"res/as-SlidePotHandle.svg")); - handle->wrap(); - } -}; diff --git a/repos/AS/src/BPMClock.cpp b/repos/AS/src/BPMClock.cpp deleted file mode 100644 index f984ff36..00000000 --- a/repos/AS/src/BPMClock.cpp +++ /dev/null @@ -1,380 +0,0 @@ -//************************************************************************************** -// -//BPM Clock module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Based on code taken from Master Clock Module VCV Module Strum 2017 https://github.com/Strum/Strums_Mental_VCV_Modules -//************************************************************************************** - -#include "AS.hpp" -#include "dsp/digital.hpp" - -#include -#include - -struct LFOGenerator { - float phase = 0.0f; - float pw = 0.5f; - float freq = 1.0f; - void setFreq(float freq_to_set) - { - freq = freq_to_set; - } - void step(float dt) { - float deltaPhase = fminf(freq * dt, 0.5f); - phase += deltaPhase; - if (phase >= 1.0f) - phase -= 1.0f; - } - float sqr() { - float sqr = phase < pw ? 1.0f : -1.0f; - return sqr; - } -}; - -struct BPMClock : Module { - enum ParamIds { - TEMPO_PARAM, - TIMESIGTOP_PARAM, - TIMESIGBOTTOM_PARAM, - RESET_SWITCH, - RUN_SWITCH, - NUM_PARAMS - }; - enum InputIds { - RESET_INPUT, - NUM_INPUTS - }; - enum OutputIds { - BEAT_OUT, - EIGHTHS_OUT, - SIXTEENTHS_OUT, - BAR_OUT, - RESET_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - RESET_LED, - RUN_LED, - NUM_LIGHTS - }; - - LFOGenerator clock; - - SchmittTrigger eighths_trig; - SchmittTrigger quarters_trig; - SchmittTrigger bars_trig; - SchmittTrigger run_button_trig; - SchmittTrigger reset_btn_trig; - SchmittTrigger reset_ext_trig; - - const float lightLambda = 0.075f; - float resetLight = 0.0f; - - bool running = true; - - int eighths_count = 0; - int quarters_count = 0; - int bars_count = 0; - - int tempo, time_sig_top, time_sig_bottom = 0; - float frequency = 2.0f; - int quarters_count_limit = 4; - int eighths_count_limit = 2; - int bars_count_limit = 16; - - BPMClock() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - /* - params.resize(NUM_PARAMS); - inputs.resize(NUM_INPUTS); - outputs.resize(NUM_OUTPUTS); - lights.resize(NUM_LIGHTS); - eighths_trig.setThresholds(0.0, 1.0); - quarters_trig.setThresholds(0.0, 1.0); - bars_trig.setThresholds(0.0, 1.0); -*/ - } - void step() override; - - json_t *toJson() override - { - json_t *rootJ = json_object(); - json_t *button_statesJ = json_array(); - json_t *button_stateJ = json_integer((int)running); - json_array_append_new(button_statesJ, button_stateJ); - json_object_set_new(rootJ, "run", button_statesJ); - return rootJ; - } - - void fromJson(json_t *rootJ) override - { - json_t *button_statesJ = json_object_get(rootJ, "run"); - if (button_statesJ) - { - json_t *button_stateJ = json_array_get(button_statesJ,0); - if (button_stateJ) - running = !!json_integer_value(button_stateJ); - } - } -}; - -void BPMClock::step() -{ - if (run_button_trig.process(params[RUN_SWITCH].value)){ - running = !running; - } - lights[RUN_LED].value = running ? 1.0f : 0.0f; - - tempo = std::round(params[TEMPO_PARAM].value); - time_sig_top = std::round(params[TIMESIGTOP_PARAM].value); - time_sig_bottom = std::round(params[TIMESIGBOTTOM_PARAM].value); - time_sig_bottom = std::pow(2,time_sig_bottom+1); - - frequency = tempo/60.0f; - //RESET TRIGGERS - //EXTERNAL RESET TRIGGER - if (reset_ext_trig.process(inputs[RESET_INPUT].value)) { - eighths_count = 0; - quarters_count = 0; - bars_count = 0; - resetLight = 1.0; - outputs[RESET_OUTPUT].value = 10.0f; - //INTERNAL RESET TRIGGER - }else if (reset_btn_trig.process(params[RESET_SWITCH].value)) { - eighths_count = 0; - quarters_count = 0; - bars_count = 0; - resetLight = 1.0; - outputs[RESET_OUTPUT].value = 10.0f; - }else{ - outputs[RESET_OUTPUT].value = 0.0f; - } - - resetLight -= resetLight / lightLambda / engineGetSampleRate(); - lights[RESET_LED].value = resetLight; - - if (!running) { - eighths_count = 0; - quarters_count = 0; - bars_count = 0; - outputs[BAR_OUT].value = 0.0; - outputs[BEAT_OUT].value = 0.0; - outputs[EIGHTHS_OUT].value = 0.0; - outputs[SIXTEENTHS_OUT].value = 0.0; - outputs[SIXTEENTHS_OUT].value = 0.0; - } else{ - if (time_sig_top == time_sig_bottom){ - clock.setFreq(frequency*4); - quarters_count_limit = 4; - eighths_count_limit = 2; - bars_count_limit = 16; - } else{ - if (time_sig_bottom == 4){ - quarters_count_limit = 4; - eighths_count_limit = 2; - bars_count_limit = time_sig_top * 4; - clock.setFreq(frequency*4); - } - if (time_sig_bottom == 8){ - quarters_count_limit = 4; - eighths_count_limit = 2; - bars_count_limit = time_sig_top * 2; - clock.setFreq(frequency*4); - if ((time_sig_top % 3) == 0){ - quarters_count_limit = 6; - eighths_count_limit = 2; - bars_count_limit = (time_sig_top/3) * 6; - clock.setFreq(frequency*6); - } - } - } - - clock.step(1.0 / engineGetSampleRate()); - outputs[SIXTEENTHS_OUT].value = clamp(10.0f * clock.sqr(), 0.0f, 10.0f); - - if (eighths_trig.process(clock.sqr()) && eighths_count <= eighths_count_limit) - eighths_count++; - if (eighths_count >= eighths_count_limit) - { - eighths_count = 0; - } - if (eighths_count == 0) outputs[EIGHTHS_OUT].value = 10.0f; - else outputs[EIGHTHS_OUT].value = 0.0f; - - if (quarters_trig.process(clock.sqr()) && quarters_count <= quarters_count_limit) - quarters_count++; - if (quarters_count >= quarters_count_limit) - { - quarters_count = 0; - } - if (quarters_count == 0) outputs[BEAT_OUT].value = 10.0f; - else outputs[BEAT_OUT].value = 0.0f; - - if (bars_trig.process(clock.sqr()) && bars_count <= bars_count_limit) - bars_count++; - if (bars_count >= bars_count_limit) - { - bars_count = 0; - } - if (bars_count == 0) outputs[BAR_OUT].value = 10.0f; - else outputs[BAR_OUT].value = 0.0f; - } -} - -//////////////////////////////////// -struct BpmDisplayWidget : TransparentWidget { - int *value; - std::shared_ptr font; - - BpmDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::setw(3) << *value; - - Vec textPos = Vec(4.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// -struct SigDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - SigDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - - - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.0); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::setw(2) << *value; - - Vec textPos = Vec(3, 17); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -////////////////////////////////// - -struct BPMClockWidget : ModuleWidget -{ - BPMClockWidget(BPMClock *module); -}; - - -BPMClockWidget::BPMClockWidget(BPMClock *module) : ModuleWidget(module) { - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - - panel->setBackground(SVG::load(assetPlugin(plugin,"res/BPMClock.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //BPM DISPLAY - BpmDisplayWidget *display = new BpmDisplayWidget(); - display->box.pos = Vec(23,50); - display->box.size = Vec(45, 20); - display->value = &module->tempo; - addChild(display); - //TEMPO KNOB - addParam(ParamWidget::create(Vec(26, 74), module, BPMClock::TEMPO_PARAM, 40.0f, 250.0f, 120.0f)); - //SIG TOP DISPLAY - SigDisplayWidget *display2 = new SigDisplayWidget(); - display2->box.pos = Vec(54,123); - display2->box.size = Vec(30, 20); - display2->value = &module->time_sig_top; - addChild(display2); - //SIG TOP KNOB - addParam(ParamWidget::create(Vec(8, 110), module, BPMClock::TIMESIGTOP_PARAM,2.0f, 15.0f, 4.0f)); - //SIG BOTTOM DISPLAY - SigDisplayWidget *display3 = new SigDisplayWidget(); - display3->box.pos = Vec(54,155); - display3->box.size = Vec(30, 20); - display3->value = &module->time_sig_bottom; - addChild(display3); - //SIG BOTTOM KNOB - addParam(ParamWidget::create(Vec(8, 150), module, BPMClock::TIMESIGBOTTOM_PARAM,0.0f, 3.0f, 1.0f)); - //RESET & RUN LEDS - addParam(ParamWidget::create(Vec(55, 202), module, BPMClock::RUN_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(57.2, 204.3), module, BPMClock::RUN_LED)); - addParam(ParamWidget::create(Vec(10.5, 202), module, BPMClock::RESET_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(12.7, 204.3), module, BPMClock::RESET_LED)); - //RESET INPUT - addInput(Port::create(Vec(10, 240), Port::INPUT, module, BPMClock::RESET_INPUT)); - //RESET OUTPUT - addOutput(Port::create(Vec(55, 240), Port::OUTPUT, module, BPMClock::RESET_OUTPUT)); - //TEMPO OUTPUTS - addOutput(Port::create(Vec(10, 280), Port::OUTPUT, module, BPMClock::BAR_OUT)); - addOutput(Port::create(Vec(55, 280), Port::OUTPUT, module, BPMClock::BEAT_OUT)); - addOutput(Port::create(Vec(10, 320), Port::OUTPUT, module, BPMClock::EIGHTHS_OUT)); - addOutput(Port::create(Vec(55, 320), Port::OUTPUT, module, BPMClock::SIXTEENTHS_OUT)); - -} - -Model *modelBPMClock = Model::create("AS", "BPMClock", "BPM Clock", CLOCK_TAG); \ No newline at end of file diff --git a/repos/AS/src/BlankPanel4.cpp b/repos/AS/src/BlankPanel4.cpp deleted file mode 100644 index 5c478d51..00000000 --- a/repos/AS/src/BlankPanel4.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "AS.hpp" - -struct BlankPanel4 : Module { - enum ParamIds { - NUM_PARAMS - }; - enum InputIds { - NUM_INPUTS - }; - enum OutputIds { - NUM_OUTPUTS - }; - enum LightIds { - BLINK_LIGHT, - NUM_LIGHTS - }; - - BlankPanel4() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; -}; - -void BlankPanel4::step() -{ -} - -struct BlankPanel4Widget : ModuleWidget -{ - BlankPanel4Widget(BlankPanel4 *module); -}; - -BlankPanel4Widget::BlankPanel4Widget(BlankPanel4 *module) : ModuleWidget(module) { - box.size = Vec(4 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->setBackground(SVG::load(assetPlugin(plugin, "res/BlankPanel4.svg"))); - panel->box.size = box.size; - addChild(panel); - } - - //SCREWS - MOD SPACING FOR RACK WIDTH*4 - addChild(Widget::create(Vec(0, 0))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); -} - -Model *modelBlankPanel4 = Model::create("AS", "BlankPanel4", "BlankPanel 4", BLANK_TAG); \ No newline at end of file diff --git a/repos/AS/src/BlankPanel6.cpp b/repos/AS/src/BlankPanel6.cpp deleted file mode 100644 index b9b9cccb..00000000 --- a/repos/AS/src/BlankPanel6.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "AS.hpp" - -struct BlankPanel6 : Module { - enum ParamIds { - NUM_PARAMS - }; - enum InputIds { - NUM_INPUTS - }; - enum OutputIds { - NUM_OUTPUTS - }; - enum LightIds { - BLINK_LIGHT, - NUM_LIGHTS - }; - - BlankPanel6() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; -}; - -void BlankPanel6::step() -{ -} - -struct BlankPanel6Widget : ModuleWidget -{ - BlankPanel6Widget(BlankPanel6 *module); -}; - -BlankPanel6Widget::BlankPanel6Widget(BlankPanel6 *module) : ModuleWidget(module) { - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->setBackground(SVG::load(assetPlugin(plugin, "res/BlankPanel6.svg"))); - panel->box.size = box.size; - addChild(panel); - } - - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); -} - -Model *modelBlankPanel6 = Model::create("AS", "BlankPanel6", "BlankPanel 6", BLANK_TAG); \ No newline at end of file diff --git a/repos/AS/src/BlankPanel8.cpp b/repos/AS/src/BlankPanel8.cpp deleted file mode 100644 index d2c1bc07..00000000 --- a/repos/AS/src/BlankPanel8.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "AS.hpp" - -struct BlankPanel8 : Module { - enum ParamIds { - NUM_PARAMS - }; - enum InputIds { - NUM_INPUTS - }; - enum OutputIds { - NUM_OUTPUTS - }; - enum LightIds { - BLINK_LIGHT, - NUM_LIGHTS - }; - - BlankPanel8() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; -}; - -void BlankPanel8::step() -{ -} - -struct BlankPanel8Widget : ModuleWidget -{ - BlankPanel8Widget(BlankPanel8 *module); -}; - -BlankPanel8Widget::BlankPanel8Widget(BlankPanel8 *module) : ModuleWidget(module) { - box.size = Vec(8 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->setBackground(SVG::load(assetPlugin(plugin, "res/BlankPanel8.svg"))); - panel->box.size = box.size; - addChild(panel); - } - - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); -} - -Model *modelBlankPanel8 = Model::create("AS", "BlankPanel8", "BlankPanel 8", BLANK_TAG); \ No newline at end of file diff --git a/repos/AS/src/DelayPlus.cpp b/repos/AS/src/DelayPlus.cpp deleted file mode 100644 index a8ac1a24..00000000 --- a/repos/AS/src/DelayPlus.cpp +++ /dev/null @@ -1,272 +0,0 @@ -//************************************************************************************** -//Delay Plus module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** -#include "AS.hpp" -#include "dsp/samplerate.hpp" -#include "dsp/ringbuffer.hpp" -#include "dsp/filter.hpp" - -#include "dsp/digital.hpp" - -#include -#include - -#define HISTORY_SIZE (1<<21) - -struct DelayPlusFx : Module { - enum ParamIds { - TIME_PARAM, - FEEDBACK_PARAM, - COLOR_PARAM, - MIX_PARAM, - BYPASS_SWITCH, - NUM_PARAMS - }; - enum InputIds { - TIME_INPUT, - FEEDBACK_INPUT, - COLOR_INPUT, - COLOR_RETURN, - - MIX_INPUT, - IN_INPUT, - NUM_INPUTS - }; - enum OutputIds { - COLOR_SEND, - OUT_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - BYPASS_LED, - NUM_LIGHTS - }; - - DoubleRingBuffer historyBuffer; - DoubleRingBuffer outBuffer; - SampleRateConverter<1> src; - float lastWet = 0.0f; - RCFilter lowpassFilter; - RCFilter highpassFilter; - - int lcd_tempo = 0; - SchmittTrigger bypass_button_trig; - - bool fx_bypass = false; - DelayPlusFx() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - - void step() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *statesJ = json_array(); - - json_t *bypassJ = json_boolean(fx_bypass); - json_array_append_new(statesJ, bypassJ); - - json_object_set_new(rootJm, "as_FxBypass", statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *statesJ = json_object_get(rootJm, "as_FxBypass"); - - json_t *bypassJ = json_array_get(statesJ, 0); - - fx_bypass = !!json_boolean_value(bypassJ); - - } - -}; - -void DelayPlusFx::step() { - - if (bypass_button_trig.process(params[BYPASS_SWITCH].value)) - { - fx_bypass = !fx_bypass; - } - lights[BYPASS_LED].value = fx_bypass ? 1.0f : 0.0f; - - // Get input to delay block - float in = inputs[IN_INPUT].value; - float feedback = clamp(params[FEEDBACK_PARAM].value + inputs[FEEDBACK_INPUT].value / 10.0f, 0.0f, 1.0f); - float dry = in + lastWet * feedback; - - // Compute delay time in seconds - //float delay = 1e-3 * powf(10.0 / 1e-3, clampf(params[TIME_PARAM].value + inputs[TIME_INPUT].value / 10.0, 0.0, 1.0)); - float delay = clamp(params[TIME_PARAM].value + inputs[TIME_INPUT].value, 0.001f, 10.0f); - //LCD display tempo - show value as ms - lcd_tempo = std::round(delay*1000); - // Number of delay samples - float index = delay * engineGetSampleRate(); - - // TODO This is a horrible digital delay algorithm. Rewrite later. - - // Push dry sample into history buffer - if (!historyBuffer.full()) { - historyBuffer.push(dry); - } - - // How many samples do we need consume to catch up? - float consume = index - historyBuffer.size(); - //printf("%f\t%d\t%f\n", index, historyBuffer.size(), consume); - // printf("wanted: %f\tactual: %d\tdiff: %d\tratio: %f\n", index, historyBuffer.size(), consume, index / historyBuffer.size()); - if (outBuffer.empty()) { - - double ratio = 1.0; - if (consume <= -16) - ratio = 0.5; - else if (consume >= 16) - ratio = 2.0; - - // printf("%f\t%lf\n", consume, ratio); - int inFrames = min(historyBuffer.size(), 16); - int outFrames = outBuffer.capacity(); - // printf(">\t%d\t%d\n", inFrames, outFrames); - - src.setRates(ratio * engineGetSampleRate(), engineGetSampleRate()); - src.process((const Frame<1>*)historyBuffer.startData(), &inFrames, (Frame<1>*)outBuffer.endData(), &outFrames); - historyBuffer.startIncr(inFrames); - outBuffer.endIncr(outFrames); - // printf("<\t%d\t%d\n", inFrames, outFrames); - // printf("====================================\n"); - } - float out; - float mix; - float wet = 0.0f; - if (!outBuffer.empty()) { - wet = outBuffer.shift(); - } - - if (outputs[COLOR_SEND].active == false) { - //internal color - // Apply color to delay wet output - float color = clamp(params[COLOR_PARAM].value + inputs[COLOR_INPUT].value / 10.0f, 0.0f, 1.0f); - float lowpassFreq = 10000.0f * powf(10.0f, clamp(2.0*color, 0.0f, 1.0f)); - lowpassFilter.setCutoff(lowpassFreq / engineGetSampleRate()); - lowpassFilter.process(wet); - wet = lowpassFilter.lowpass(); - float highpassFreq = 10.0f * powf(100.0f, clamp(2.0f*color - 1.0f, 0.0f, 1.0f)); - highpassFilter.setCutoff(highpassFreq / engineGetSampleRate()); - highpassFilter.process(wet); - wet = highpassFilter.highpass(); - //lastWet = wet; - }else { - //external color, to filter the wet delay signal outside of the module, or to feed another module - outputs[COLOR_SEND].value = wet; - wet = inputs[COLOR_RETURN].value; - } - lastWet = wet; - mix = clamp(params[MIX_PARAM].value + inputs[MIX_INPUT].value / 10.0f, 0.0f, 1.0f); - out = crossfade(in, wet, mix); - //check bypass switch status - if (fx_bypass){ - outputs[OUT_OUTPUT].value = in; - }else{ - outputs[OUT_OUTPUT].value = out; - } -} - -/////////////////////////////////// -struct MsDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - MsDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - // NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::right << std::setw(5) << *value; - - Vec textPos = Vec(4.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~~~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\\\\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// -struct DelayPlusFxWidget : ModuleWidget -{ - DelayPlusFxWidget(DelayPlusFx *module); -}; - -DelayPlusFxWidget::DelayPlusFxWidget(DelayPlusFx *module) : ModuleWidget(module) { - - box.size = Vec(RACK_GRID_WIDTH*8, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/DelayPlus.svg"))); - addChild(panel); - } - - //MS DISPLAY - MsDisplayWidget *display = new MsDisplayWidget(); - display->box.pos = Vec(14,50); - display->box.size = Vec(70, 20); - display->value = &module->lcd_tempo; - addChild(display); - int y_offset=40; - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //KNOBS - addParam(ParamWidget::create(Vec(74, 38+y_offset), module, DelayPlusFx::TIME_PARAM, 0.001f, 10.0f, 0.350f)); - addParam(ParamWidget::create(Vec(74, 90+y_offset), module, DelayPlusFx::FEEDBACK_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(74, 140+y_offset), module, DelayPlusFx::COLOR_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(74, 213+y_offset), module, DelayPlusFx::MIX_PARAM, 0.0f, 1.0f, 0.5f)); - //BYPASS SWITCH - addParam(ParamWidget::create(Vec(49, 272+y_offset), module, DelayPlusFx::BYPASS_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(51.2, 274+y_offset), module, DelayPlusFx::BYPASS_LED)); - //INPUTS - addInput(Port::create(Vec(10, 45+y_offset), Port::INPUT, module, DelayPlusFx::TIME_INPUT)); - addInput(Port::create(Vec(10, 95+y_offset), Port::INPUT, module, DelayPlusFx::FEEDBACK_INPUT)); - addInput(Port::create(Vec(10, 145+y_offset), Port::INPUT, module, DelayPlusFx::COLOR_INPUT)); - //DELAY SIGNAL SEND - addOutput(Port::create(Vec(20, 184+y_offset), Port::OUTPUT, module, DelayPlusFx::COLOR_SEND)); - //DELAY SIGNAL RETURN - addInput(Port::create(Vec(75, 184+y_offset), Port::INPUT, module, DelayPlusFx::COLOR_RETURN)); - //INPUTS - addInput(Port::create(Vec(10, 220+y_offset), Port::INPUT, module, DelayPlusFx::MIX_INPUT)); - addInput(Port::create(Vec(10, 310), Port::INPUT, module, DelayPlusFx::IN_INPUT)); - //OUTPUT - addOutput(Port::create(Vec(85, 310), Port::OUTPUT, module, DelayPlusFx::OUT_OUTPUT)); -} - -Model *modelDelayPlusFx = Model::create("AS", "DelayPlusFx", "DelayPlus Fx", DELAY_TAG, EFFECT_TAG); \ No newline at end of file diff --git a/repos/AS/src/Flow.cpp b/repos/AS/src/Flow.cpp deleted file mode 100644 index b37d0bbd..00000000 --- a/repos/AS/src/Flow.cpp +++ /dev/null @@ -1,152 +0,0 @@ -//************************************************************************************** -//Flow module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//************************************************************************************** -#include "AS.hpp" -#include "dsp/digital.hpp" - -struct Flow: Module { - enum ParamIds { - SWITCH_1, - SWITCH_2, - NUM_PARAMS - }; - enum InputIds { - INPUT_1, - INPUT_2, - RESET_1, - RESET_2, - CV_TRIG_INPUT_1, - CV_TRIG_INPUT_2, - NUM_INPUTS - }; - enum OutputIds { - OUTPUT_1, - OUTPUT_2, - NUM_OUTPUTS - }; - enum LightIds { - TRIGGER_LED_1, - TRIGGER_LED_2, - NUM_LIGHTS - }; - - SchmittTrigger btnTrigger1; - SchmittTrigger extTrigger1; - SchmittTrigger extReset1; - SchmittTrigger btnTrigger2; - SchmittTrigger extTrigger2; - SchmittTrigger extReset2; - - bool on_1 = false; - bool on_2 = false; - Flow() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *on_statesJ = json_array(); - - json_t *on_stateJ1 = json_integer((int) on_1); - json_t *on_stateJ2 = json_integer((int) on_2); - - json_array_append_new(on_statesJ, on_stateJ1); - json_array_append_new(on_statesJ, on_stateJ2); - - json_object_set_new(rootJm, "as_FlowStates", on_statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *on_statesJ = json_object_get(rootJm, "as_FlowStates"); - - json_t *on_stateJ1 = json_array_get(on_statesJ, 0); - json_t *on_stateJ2 = json_array_get(on_statesJ, 1); - - on_1 = !!json_integer_value(on_stateJ1); - on_2 = !!json_integer_value(on_stateJ2); - - } - -}; - -void Flow::step() { - - //TRIGGER 1 - if (btnTrigger1.process(params[SWITCH_1].value)||extTrigger1.process(inputs[CV_TRIG_INPUT_1].value)) { - on_1 = !on_1; - } - if (extReset1.process(inputs[RESET_1].value)) { - on_1 = false; - } - if(on_1){ - outputs[OUTPUT_1].value = inputs[INPUT_1].value; - }else{ - outputs[OUTPUT_1].value = 0.0f; - } - lights[TRIGGER_LED_1].value = on_1 ? 1.0f : 0.0f; - //TRIGGER 2 - if (btnTrigger2.process(params[SWITCH_2].value)||extTrigger2.process(inputs[CV_TRIG_INPUT_2].value)) { - on_2 = !on_2; - } - if (extReset2.process(inputs[RESET_2].value)) { - on_2 = false; - } - if(on_2){ - outputs[OUTPUT_2].value = inputs[INPUT_2].value; - }else{ - outputs[OUTPUT_2].value = 0.0f; - } - lights[TRIGGER_LED_2].value = on_2 ? 1.0f : 0.0f; - - -} - -//////////////////////////////////// -struct FlowWidget : ModuleWidget -{ - FlowWidget(Flow *module); -}; - -FlowWidget::FlowWidget(Flow *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/Flow.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - static const float led_offset = 3.3; - static const float led_center = 15; - static const float y_offset = 150; - //TRIGGER 1 - //SWITCH - addParam(ParamWidget::create(Vec(led_center, 50), module, Flow::SWITCH_1, 0.0, 1.0, 0.0)); - addChild(ModuleLightWidget::create>(Vec(led_center+led_offset, 50+led_offset), module, Flow::TRIGGER_LED_1)); - //PORTS - addInput(Port::create(Vec(10, 140), Port::INPUT, module, Flow::CV_TRIG_INPUT_1)); - addInput(Port::create(Vec(55, 140), Port::INPUT, module, Flow::RESET_1)); - addInput(Port::create(Vec(10, 174), Port::INPUT, module, Flow::INPUT_1)); - addOutput(Port::create(Vec(55, 174), Port::OUTPUT, module, Flow::OUTPUT_1)); - //TRIGGER 2 - //SWITCH - addParam(ParamWidget::create(Vec(led_center, 50+y_offset), module, Flow::SWITCH_2, 0.0, 1.0, 0.0)); - addChild(ModuleLightWidget::create>(Vec(led_center+led_offset, 50+led_offset+y_offset), module, Flow::TRIGGER_LED_2)); - //PORTS - addInput(Port::create(Vec(10, 140+y_offset), Port::INPUT, module, Flow::CV_TRIG_INPUT_2)); - addInput(Port::create(Vec(55, 140+y_offset), Port::INPUT, module, Flow::RESET_2)); - addInput(Port::create(Vec(10, 174+y_offset), Port::INPUT, module, Flow::INPUT_2)); - addOutput(Port::create(Vec(55, 174+y_offset), Port::OUTPUT, module, Flow::OUTPUT_2)); - -} -Model *modelFlow = Model::create("AS", "Flow", "Flow", SWITCH_TAG, UTILITY_TAG); \ No newline at end of file diff --git a/repos/AS/src/KillGate.cpp b/repos/AS/src/KillGate.cpp deleted file mode 100644 index efcf8516..00000000 --- a/repos/AS/src/KillGate.cpp +++ /dev/null @@ -1,280 +0,0 @@ -//************************************************************************************** -//KillGate module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code adapted from Dual Counter - VCV Module, Strum 2017 -//************************************************************************************** - -#include "AS.hpp" - -#include "dsp/digital.hpp" - -#include -#include - -struct KillGate : Module { - enum ParamIds { - RST_BUTTON1, - COUNT_NUM_PARAM_1, - RST_BUTTON2, - COUNT_NUM_PARAM_2, - NUM_PARAMS - }; - enum InputIds { - INPUT_1, - CLK_IN_1, - RESET_IN_1, - INPUT_2, - CLK_IN_2, - RESET_IN_2, - NUM_INPUTS - }; - enum OutputIds { - OUTPUT_1, - OUTPUT_2, - OUTPUT_3, - NUM_OUTPUTS - }; - enum LightIds { - RESET_LIGHT1, - RESET_LIGHT2, - NUM_LIGHTS - }; - - SchmittTrigger clock_trigger_1; - SchmittTrigger reset_trigger_1; - SchmittTrigger reset_ext_trigger_1; - int count_limit1 = 1; - int count1 = 0; - SchmittTrigger clock_trigger_2; - SchmittTrigger reset_trigger_2; - SchmittTrigger reset_ext_trigger_2; - int count_limit_2 = 1; - int count_2 = 0; - - const float lightLambda = 0.075; - - float resetLight1 = 0.0f; - float resetLight2 = 0.0f; - - bool gate1_open= true; - bool gate2_open= true; - - KillGate() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - - } - - void reset() override { - - count_limit1 = 1; - count1 = 0; - count_limit_2 = 1; - count_2 = 0; - gate1_open= false; - gate2_open= false; - - } - - void step() override; - -}; - - -void KillGate::step(){ - - count_limit1 = round(params[COUNT_NUM_PARAM_1].value); - count_limit_2 = round(params[COUNT_NUM_PARAM_2].value); - - bool reset1 = false; - bool reset_2 = false; - ///////////// counter 1 - if (reset_trigger_1.process(params[RST_BUTTON1].value)){ - reset1 = true; - count1 = 0; - gate1_open=true; - resetLight1 = 1.0; - - } - if (reset_ext_trigger_1.process(inputs[RESET_IN_1].value)){ - reset1 = true; - count1 = 0; - gate1_open = true; - resetLight1 = 1.0; - - } - - resetLight1 -= resetLight1 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT1].value = resetLight1; - - if (reset1 == false){ - if (clock_trigger_1.process(inputs[CLK_IN_1].value) && count1 <= count_limit1){ - if (gate1_open){ - count1++; - } - } - } - if (count1 == count_limit1){ - gate1_open = false; - } - if (!gate1_open){ - outputs[OUTPUT_1].value = 0.0f; - }else{ - outputs[OUTPUT_1].value = inputs[INPUT_1].value; - } - ///////////// counter 2 - if (reset_trigger_2.process(params[RST_BUTTON2].value)){ - reset_2 = true; - count_2 = 0; - gate2_open=true; - resetLight2 = 1.0f; - } - if (reset_ext_trigger_2.process(inputs[RESET_IN_2].value)){ - reset_2 = true; - count_2 = 0; - gate2_open=true; - resetLight2 = 1.0f; - } - resetLight2 -= resetLight2 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT2].value = resetLight2; - - if (reset_2 == false){ - if (clock_trigger_2.process(inputs[CLK_IN_2].value) && count_2 <= count_limit_2){ - if (gate2_open){ - count_2++; - } - } - } - if (count_2 == count_limit_2){ - gate2_open = false; - } - if (!gate2_open){ - outputs[OUTPUT_2].value = 0.0f; - }else{ - outputs[OUTPUT_2].value = inputs[INPUT_2].value; - } - -} - -/////////////////////////////////// -struct NumberDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - NumberDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::right << std::setw(2) << *value; - - Vec textPos = Vec(4.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// -struct KillGateWidget : ModuleWidget -{ - KillGateWidget(KillGate *module); -}; - - -KillGateWidget::KillGateWidget(KillGate *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin,"res/KillGate.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - // counter 1 - //COUNT DISPLAY - NumberDisplayWidget *display1 = new NumberDisplayWidget(); - display1->box.pos = Vec(10,50); - display1->box.size = Vec(30, 20); - display1->value = &module->count1; - addChild(display1); - //KillGate DISPLAY - NumberDisplayWidget *display2 = new NumberDisplayWidget(); - display2->box.pos = Vec(50,50); - display2->box.size = Vec(30, 20); - display2->value = &module->count_limit1; - addChild(display2); - - int group_offset = 160; - - addParam(ParamWidget::create(Vec(11, 82), module, KillGate::RST_BUTTON1 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(11+2.2, 82+2.3), module, KillGate::RESET_LIGHT1)); - - addParam(ParamWidget::create(Vec(43, 73), module, KillGate::COUNT_NUM_PARAM_1, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(10, 125), Port::INPUT, module, KillGate::RESET_IN_1)); - addInput(Port::create(Vec(55, 125), Port::INPUT, module, KillGate::CLK_IN_1)); - - addInput(Port::create(Vec(10, 170), Port::INPUT, module, KillGate::INPUT_1)); - addOutput(Port::create(Vec(55, 170), Port::OUTPUT, module, KillGate::OUTPUT_1)); - - // counter 2 - //COUNT DISPLAY - NumberDisplayWidget *display3 = new NumberDisplayWidget(); - display3->box.pos = Vec(10,50 + group_offset); - display3->box.size = Vec(30, 20); - display3->value = &module->count_2; - addChild(display3); - //KillGate DISPLAY - NumberDisplayWidget *display4 = new NumberDisplayWidget(); - display4->box.pos = Vec(50,50 + group_offset); - display4->box.size = Vec(30, 20); - display4->value = &module->count_limit_2; - addChild(display4); - - addParam(ParamWidget::create(Vec(11, 82+ group_offset), module, KillGate::RST_BUTTON2 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(11+2.2, 82+2.3+ group_offset), module, KillGate::RESET_LIGHT2)); - - addParam(ParamWidget::create(Vec(43, 73 + group_offset), module, KillGate::COUNT_NUM_PARAM_2, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(10, 125 + group_offset), Port::INPUT, module, KillGate::RESET_IN_2)); - addInput(Port::create(Vec(55, 125 + group_offset), Port::INPUT, module, KillGate::CLK_IN_2)); - - addInput(Port::create(Vec(10, 170 + group_offset), Port::INPUT, module, KillGate::INPUT_2)); - addOutput(Port::create(Vec(55, 170 + group_offset), Port::OUTPUT, module, KillGate::OUTPUT_2)); - -} - -Model *modelKillGate = Model::create("AS", "KillGate", "Kill Gate", SWITCH_TAG, SEQUENCER_TAG, UTILITY_TAG, DELAY_TAG); diff --git a/repos/AS/src/LaunchGate.cpp b/repos/AS/src/LaunchGate.cpp deleted file mode 100644 index ddcf83fd..00000000 --- a/repos/AS/src/LaunchGate.cpp +++ /dev/null @@ -1,279 +0,0 @@ -//************************************************************************************** -//LaunchGate module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code adapted from Dual Counter - VCV Module, Strum 2017 -//************************************************************************************** - -#include "AS.hpp" - -#include "dsp/digital.hpp" - -#include -#include - -struct LaunchGate : Module { - enum ParamIds { - RST_BUTTON1, - COUNT_NUM_PARAM_1, - RST_BUTTON2, - COUNT_NUM_PARAM_2, - NUM_PARAMS - }; - enum InputIds { - INPUT_1, - CLK_IN_1, - RESET_IN_1, - INPUT_2, - CLK_IN_2, - RESET_IN_2, - NUM_INPUTS - }; - enum OutputIds { - OUTPUT_1, - OUTPUT_2, - OUTPUT_3, - NUM_OUTPUTS - }; - enum LightIds { - RESET_LIGHT1, - RESET_LIGHT2, - NUM_LIGHTS - }; - - SchmittTrigger clock_trigger_1; - SchmittTrigger reset_trigger_1; - SchmittTrigger reset_ext_trigger_1; - int count_limit1 = 1; - int count1 = 0; - SchmittTrigger clock_trigger_2; - SchmittTrigger reset_trigger_2; - SchmittTrigger reset_ext_trigger_2; - int count_limit_2 = 1; - int count_2 = 0; - - const float lightLambda = 0.075f; - - float resetLight1 = 0.0f; - float resetLight2 = 0.0f; - - bool gate1_open= false; - bool gate2_open= false; - - LaunchGate() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - - } - - void reset() override { - - count_limit1 = 1; - count1 = 0; - count_limit_2 = 1; - count_2 = 0; - gate1_open= false; - gate2_open= false; - - } - - void step() override; - -}; - - -void LaunchGate::step(){ - - count_limit1 = round(params[COUNT_NUM_PARAM_1].value); - count_limit_2 = round(params[COUNT_NUM_PARAM_2].value); - - bool reset1 = false; - bool reset_2 = false; - ///////////// counter 1 - if (reset_trigger_1.process(params[RST_BUTTON1].value)){ - reset1 = true; - count1 = 0; - gate1_open=false; - resetLight1 = 1.0f; - - } - if (reset_ext_trigger_1.process(inputs[RESET_IN_1].value)){ - reset1 = true; - count1 = 0; - gate1_open = false; - resetLight1 = 1.0f; - - } - - resetLight1 -= resetLight1 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT1].value = resetLight1; - - if (reset1 == false){ - if (clock_trigger_1.process(inputs[CLK_IN_1].value) && count1 <= count_limit1){ - if (!gate1_open){ - count1++; - } - } - } - if (count1 == count_limit1){ - gate1_open = true; - } - if (gate1_open){ - outputs[OUTPUT_1].value = inputs[INPUT_1].value; - }else{ - outputs[OUTPUT_1].value = 0.0f; - } - ///////////// counter 2 - if (reset_trigger_2.process(params[RST_BUTTON2].value)){ - reset_2 = true; - count_2 = 0; - gate2_open=false; - resetLight2 = 1.0f; - } - if (reset_ext_trigger_2.process(inputs[RESET_IN_2].value)){ - reset_2 = true; - count_2 = 0; - gate2_open=false; - resetLight2 = 1.0f; - } - resetLight2 -= resetLight2 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT2].value = resetLight2; - - if (reset_2 == false){ - if (clock_trigger_2.process(inputs[CLK_IN_2].value) && count_2 <= count_limit_2){ - if (!gate2_open){ - count_2++; - } - } - } - if (count_2 == count_limit_2){ - gate2_open = true; - } - if (gate2_open){ - outputs[OUTPUT_2].value = inputs[INPUT_2].value; - }else{ - outputs[OUTPUT_2].value = 0.0f; - } - -} - -/////////////////////////////////// -struct NumberDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - NumberDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::right << std::setw(2) << *value; - - Vec textPos = Vec(4.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// -struct LaunchGateWidget : ModuleWidget -{ - LaunchGateWidget(LaunchGate *module); -}; - -LaunchGateWidget::LaunchGateWidget(LaunchGate *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin,"res/LaunchGate.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - // counter 1 - //COUNT DISPLAY - NumberDisplayWidget *display1 = new NumberDisplayWidget(); - display1->box.pos = Vec(10,50); - display1->box.size = Vec(30, 20); - display1->value = &module->count1; - addChild(display1); - //LaunchGate DISPLAY - NumberDisplayWidget *display2 = new NumberDisplayWidget(); - display2->box.pos = Vec(50,50); - display2->box.size = Vec(30, 20); - display2->value = &module->count_limit1; - addChild(display2); - - int group_offset = 160; - - addParam(ParamWidget::create(Vec(11, 82), module, LaunchGate::RST_BUTTON1 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(11+2.2, 82+2.3), module, LaunchGate::RESET_LIGHT1)); - - addParam(ParamWidget::create(Vec(43, 73), module, LaunchGate::COUNT_NUM_PARAM_1, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(10, 125), Port::INPUT, module, LaunchGate::RESET_IN_1)); - addInput(Port::create(Vec(55, 125), Port::INPUT, module, LaunchGate::CLK_IN_1)); - - addInput(Port::create(Vec(10, 170), Port::INPUT, module, LaunchGate::INPUT_1)); - addOutput(Port::create(Vec(55, 170), Port::OUTPUT, module, LaunchGate::OUTPUT_1)); - - // counter 2 - //COUNT DISPLAY - NumberDisplayWidget *display3 = new NumberDisplayWidget(); - display3->box.pos = Vec(10,50 + group_offset); - display3->box.size = Vec(30, 20); - display3->value = &module->count_2; - addChild(display3); - //LaunchGate DISPLAY - NumberDisplayWidget *display4 = new NumberDisplayWidget(); - display4->box.pos = Vec(50,50 + group_offset); - display4->box.size = Vec(30, 20); - display4->value = &module->count_limit_2; - addChild(display4); - - addParam(ParamWidget::create(Vec(11, 82+ group_offset), module, LaunchGate::RST_BUTTON2 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(11+2.2, 82+2.3+ group_offset), module, LaunchGate::RESET_LIGHT2)); - - addParam(ParamWidget::create(Vec(43, 73 + group_offset), module, LaunchGate::COUNT_NUM_PARAM_2, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(10, 125 + group_offset), Port::INPUT, module, LaunchGate::RESET_IN_2)); - addInput(Port::create(Vec(55, 125 + group_offset), Port::INPUT, module, LaunchGate::CLK_IN_2)); - - addInput(Port::create(Vec(10, 170 + group_offset), Port::INPUT, module, LaunchGate::INPUT_2)); - addOutput(Port::create(Vec(55, 170 + group_offset), Port::OUTPUT, module, LaunchGate::OUTPUT_2)); - -} - -Model *modelLaunchGate = Model::create("AS", "LaunchGate", "Launch Gate", SWITCH_TAG, SEQUENCER_TAG, UTILITY_TAG, DELAY_TAG); \ No newline at end of file diff --git a/repos/AS/src/Merge2_5.cpp b/repos/AS/src/Merge2_5.cpp deleted file mode 100644 index 3f5a70fe..00000000 --- a/repos/AS/src/Merge2_5.cpp +++ /dev/null @@ -1,98 +0,0 @@ -//************************************************************************************** -//Multiple 2x5 module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//************************************************************************************** -#include "AS.hpp" - -struct Merge2_5 : Module { - enum ParamIds { - NUM_PARAMS - }; - enum InputIds { - INPUT11, - INPUT12, - INPUT13, - INPUT14, - INPUT15, - INPUT21, - INPUT22, - INPUT23, - INPUT24, - INPUT25, - NUM_INPUTS - }; - enum OutputIds { - OUTPUT1, - OUTPUT2, - NUM_OUTPUTS - }; - - Merge2_5() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) {} - void step() override; -}; - - -void Merge2_5::step() { - - float IN11 = inputs[INPUT11].value; - float IN12 = inputs[INPUT12].value; - float IN13 = inputs[INPUT13].value; - float IN14 = inputs[INPUT14].value; - float IN15 = inputs[INPUT15].value; - float IN21 = inputs[INPUT21].value; - float IN22 = inputs[INPUT22].value; - float IN23 = inputs[INPUT23].value; - float IN24 = inputs[INPUT24].value; - float IN25 = inputs[INPUT25].value; - - - // Set outputs - outputs[OUTPUT1].value = IN11 + IN12 + IN13 + IN14 + IN15; - outputs[OUTPUT2].value = IN21 + IN22 + IN23 + IN24 + IN25; - -} - -struct Merge2_5Widget : ModuleWidget -{ - Merge2_5Widget(Merge2_5 *module); -}; - - -Merge2_5Widget::Merge2_5Widget(Merge2_5 *module) : ModuleWidget(module) { - box.size = Vec(5 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/Merge2_5.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - //INPUTS - addInput(Port::create(Vec(8, 75), Port::INPUT, module, Merge2_5::INPUT11)); - addInput(Port::create(Vec(43, 75), Port::INPUT, module, Merge2_5::INPUT21)); - - addInput(Port::create(Vec(8, 120), Port::INPUT, module, Merge2_5::INPUT12)); - addInput(Port::create(Vec(43, 120), Port::INPUT, module, Merge2_5::INPUT22)); - - addInput(Port::create(Vec(8, 165), Port::INPUT, module, Merge2_5::INPUT13)); - addInput(Port::create(Vec(43, 165), Port::INPUT, module, Merge2_5::INPUT23)); - - addInput(Port::create(Vec(8, 210), Port::INPUT, module, Merge2_5::INPUT14)); - addInput(Port::create(Vec(43, 210), Port::INPUT, module, Merge2_5::INPUT24)); - - addInput(Port::create(Vec(8, 255), Port::INPUT, module, Merge2_5::INPUT15)); - addInput(Port::create(Vec(43, 255), Port::INPUT, module, Merge2_5::INPUT25)); - - //OUTPUTS - addOutput(Port::create(Vec(8, 310), Port::OUTPUT, module, Merge2_5::OUTPUT1)); - addOutput(Port::create(Vec(43, 310), Port::OUTPUT, module, Merge2_5::OUTPUT2)); - -} - -Model *modelMerge2_5 = Model::create("AS", "Merge2_5", "Merge 2 x 5", MULTIPLE_TAG, UTILITY_TAG); \ No newline at end of file diff --git a/repos/AS/src/Mixer8ch.cpp b/repos/AS/src/Mixer8ch.cpp deleted file mode 100644 index 1a3a816d..00000000 --- a/repos/AS/src/Mixer8ch.cpp +++ /dev/null @@ -1,434 +0,0 @@ -//************************************************************************************** -//8 channel mixer module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Based on DrumsMixer VCV Rack by Autodafe http://www.autodafe.net -//Based on code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** - -#include "AS.hpp" -#include "dsp/digital.hpp" - -struct Mixer8ch : Module { - enum ParamIds { - MIX_PARAM, - CH1_PARAM, - CH2_PARAM, - CH3_PARAM, - CH4_PARAM, - CH5_PARAM, - CH6_PARAM, - CH7_PARAM, - CH8_PARAM, - - CH1_PAN_PARAM, - CH2_PAN_PARAM, - CH3_PAN_PARAM, - CH4_PAN_PARAM, - CH5_PAN_PARAM, - CH6_PAN_PARAM, - CH7_PAN_PARAM, - CH8_PAN_PARAM, - - CH1MUTE, - CH2MUTE, - CH3MUTE, - CH4MUTE, - CH5MUTE, - CH6MUTE, - CH7MUTE, - CH8MUTE, - MASTER_MUTE, - NUM_PARAMS - }; - enum InputIds { - MIX_CV_INPUT, - - CH1_INPUT, - CH1_CV_INPUT, - CH1_CV_PAN_INPUT, - - CH2_INPUT, - CH2_CV_INPUT, - CH2_CV_PAN_INPUT, - - CH3_INPUT, - CH3_CV_INPUT, - CH3_CV_PAN_INPUT, - - CH4_INPUT, - CH4_CV_INPUT, - CH4_CV_PAN_INPUT, - - CH5_INPUT, - CH5_CV_INPUT, - CH5_CV_PAN_INPUT, - - CH6_INPUT, - CH6_CV_INPUT, - CH6_CV_PAN_INPUT, - - CH7_INPUT, - CH7_CV_INPUT, - CH7_CV_PAN_INPUT, - - CH8_INPUT, - CH8_CV_INPUT, - CH8_CV_PAN_INPUT, - - LINK_L, - LINK_R, - NUM_INPUTS - }; - enum OutputIds { - MIX_OUTPUTL, - MIX_OUTPUTR, - CH1_OUTPUT, - CH2_OUTPUT, - CH3_OUTPUT, - CH4_OUTPUT, - CH5_OUTPUT, - CH6_OUTPUT, - CH7_OUTPUT, - CH8_OUTPUT, - - NUM_OUTPUTS - }; - - enum LightIds { - MUTE_LIGHT1, - MUTE_LIGHT2, - MUTE_LIGHT3, - MUTE_LIGHT4, - MUTE_LIGHT5, - MUTE_LIGHT6, - MUTE_LIGHT7, - MUTE_LIGHT8, - MUTE_LIGHT_MASTER, - NUM_LIGHTS - }; - Mixer8ch() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - reset(); - } - void step() override; - - SchmittTrigger ch1mute; - SchmittTrigger ch2mute; - SchmittTrigger ch3mute; - SchmittTrigger ch4mute; - SchmittTrigger ch5mute; - SchmittTrigger ch6mute; - SchmittTrigger ch7mute; - SchmittTrigger ch8mute; - SchmittTrigger chMmute; - - float ch1m = false; - float ch2m = false; - float ch3m = false; - float ch4m = false; - float ch5m = false; - float ch6m = false; - float ch7m = false; - float ch8m = false; - float chMm = false; - - float mixL = 0.0f; - float mixR = 0.0f; - - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *mutesJ = json_array(); - - json_t *muteJ1 = json_integer((int) ch1m); - json_t *muteJ2 = json_integer((int) ch2m); - json_t *muteJ3 = json_integer((int) ch3m); - json_t *muteJ4 = json_integer((int) ch4m); - json_t *muteJ5 = json_integer((int) ch5m); - json_t *muteJ6 = json_integer((int) ch6m); - json_t *muteJ7 = json_integer((int) ch7m); - json_t *muteJ8 = json_integer((int) ch8m); - json_t *muteJ9 = json_integer((int) chMm); - - json_array_append_new(mutesJ, muteJ1); - json_array_append_new(mutesJ, muteJ2); - json_array_append_new(mutesJ, muteJ3); - json_array_append_new(mutesJ, muteJ4); - json_array_append_new(mutesJ, muteJ5); - json_array_append_new(mutesJ, muteJ6); - json_array_append_new(mutesJ, muteJ7); - json_array_append_new(mutesJ, muteJ8); - json_array_append_new(mutesJ, muteJ9); - - json_object_set_new(rootJm, "as_MixerMutes", mutesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *mutesJ = json_object_get(rootJm, "as_MixerMutes"); - - json_t *muteJ1 = json_array_get(mutesJ, 0); - json_t *muteJ2 = json_array_get(mutesJ, 1); - json_t *muteJ3 = json_array_get(mutesJ, 2); - json_t *muteJ4 = json_array_get(mutesJ, 3); - json_t *muteJ5 = json_array_get(mutesJ, 4); - json_t *muteJ6 = json_array_get(mutesJ, 5); - json_t *muteJ7 = json_array_get(mutesJ, 6); - json_t *muteJ8 = json_array_get(mutesJ, 7); - json_t *muteJ9 = json_array_get(mutesJ, 8); - - - - ch1m = !!json_integer_value(muteJ1); - ch2m = !!json_integer_value(muteJ2); - ch3m = !!json_integer_value(muteJ3); - ch4m = !!json_integer_value(muteJ4); - ch5m = !!json_integer_value(muteJ5); - ch6m = !!json_integer_value(muteJ6); - ch7m = !!json_integer_value(muteJ7); - ch8m = !!json_integer_value(muteJ8); - chMm = !!json_integer_value(muteJ9); - - } - //PAN LEVEL - float PanL(float balance, float cv){ // -1...+1 - float p, gl; - p=M_PI*(balance+1)/4; - if(cv){ - gl=::cos(p)*(1-((cv+1)/5)); - }else - {gl=::cos(p); - } - return gl; - } - - float PanR(float balance , float cv){ - float p, gr; - p=M_PI*(balance+1)/4; - if(cv){gr=::sin(p)*((cv+1)/5); - }else{ - gr=::sin(p); - } - return gr; - } -}; - -void Mixer8ch::step() { - //MUTE BUTTONS - if (ch1mute.process(params[CH1MUTE].value)) { - ch1m = !ch1m; - } - lights[MUTE_LIGHT1].value = ch1m ? 1.0f : 0.0f; - if (ch2mute.process(params[CH2MUTE].value)) { - ch2m = !ch2m; - } - lights[MUTE_LIGHT2].value = ch2m ? 1.0f : 0.0f; - if (ch3mute.process(params[CH3MUTE].value)) { - ch3m = !ch3m; - } - lights[MUTE_LIGHT3].value = ch3m ? 1.0f : 0.0f; - if (ch4mute.process(params[CH4MUTE].value)) { - ch4m = !ch4m; - } - lights[MUTE_LIGHT4].value = ch4m ? 1.0f : 0.0f; - if (ch5mute.process(params[CH5MUTE].value)) { - ch5m = !ch5m; - } - lights[MUTE_LIGHT5].value = ch5m ? 1.0f : 0.0f; - if (ch6mute.process(params[CH6MUTE].value)) { - ch6m = !ch6m; - } - lights[MUTE_LIGHT6].value = ch6m ? 1.0f : 0.0f; - if (ch7mute.process(params[CH7MUTE].value)) { - ch7m = !ch7m; - } - lights[MUTE_LIGHT7].value = ch7m ? 1.0f : 0.0f; - if (ch8mute.process(params[CH8MUTE].value)) { - ch8m = !ch8m; - } - lights[MUTE_LIGHT8].value = ch8m ? 1.0f : 0.0f; - - if (chMmute.process(params[MASTER_MUTE].value)) { - chMm = !chMm; - } - lights[MUTE_LIGHT_MASTER].value = chMm ? 1.0f : 0.0f; - //CHANNEL RESULTS - float ch1L = (1-ch1m) * (inputs[CH1_INPUT].value) * params[CH1_PARAM].value * PanL(params[CH1_PAN_PARAM].value,(inputs[CH1_CV_PAN_INPUT].value))* clamp(inputs[CH1_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch1R = (1-ch1m) * (inputs[CH1_INPUT].value) * params[CH1_PARAM].value * PanR(params[CH1_PAN_PARAM].value,(inputs[CH1_CV_PAN_INPUT].value)) * clamp(inputs[CH1_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - float ch2L = (1-ch2m) *(inputs[CH2_INPUT].value) * params[CH2_PARAM].value * PanL(params[CH2_PAN_PARAM].value,(inputs[CH2_CV_PAN_INPUT].value)) * clamp(inputs[CH2_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch2R = (1-ch2m) *(inputs[CH2_INPUT].value) * params[CH2_PARAM].value * PanR(params[CH2_PAN_PARAM].value,(inputs[CH2_CV_PAN_INPUT].value)) * clamp(inputs[CH2_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - float ch3L = (1-ch3m) *(inputs[CH3_INPUT].value) * params[CH3_PARAM].value * PanL(params[CH3_PAN_PARAM].value,(inputs[CH3_CV_PAN_INPUT].value)) * clamp(inputs[CH3_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch3R = (1-ch3m) *(inputs[CH3_INPUT].value) * params[CH3_PARAM].value * PanR(params[CH3_PAN_PARAM].value,(inputs[CH3_CV_PAN_INPUT].value)) * clamp(inputs[CH3_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - float ch4L = (1-ch4m) *(inputs[CH4_INPUT].value) * params[CH4_PARAM].value * PanL(params[CH4_PAN_PARAM].value,(inputs[CH4_CV_PAN_INPUT].value)) * clamp(inputs[CH4_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch4R = (1-ch4m) *(inputs[CH4_INPUT].value) * params[CH4_PARAM].value * PanR(params[CH4_PAN_PARAM].value,(inputs[CH4_CV_PAN_INPUT].value)) * clamp(inputs[CH4_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - - float ch5L = (1-ch5m) *(inputs[CH5_INPUT].value) * params[CH5_PARAM].value * PanL(params[CH5_PAN_PARAM].value,(inputs[CH5_CV_PAN_INPUT].value)) * clamp(inputs[CH5_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch5R = (1-ch5m) *(inputs[CH5_INPUT].value) * params[CH5_PARAM].value * PanR(params[CH5_PAN_PARAM].value,(inputs[CH5_CV_PAN_INPUT].value)) * clamp(inputs[CH5_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - float ch6L = (1-ch6m) *(inputs[CH6_INPUT].value) * params[CH6_PARAM].value * PanL(params[CH6_PAN_PARAM].value,(inputs[CH6_CV_PAN_INPUT].value)) * clamp(inputs[CH6_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch6R = (1-ch6m) *(inputs[CH6_INPUT].value) * params[CH6_PARAM].value * PanR(params[CH6_PAN_PARAM].value,(inputs[CH6_CV_PAN_INPUT].value)) * clamp(inputs[CH6_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch7L = (1-ch7m) *(inputs[CH7_INPUT].value) * params[CH7_PARAM].value * PanL(params[CH7_PAN_PARAM].value,(inputs[CH7_CV_PAN_INPUT].value)) * clamp(inputs[CH7_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch7R = (1-ch7m) *(inputs[CH7_INPUT].value) * params[CH7_PARAM].value * PanR(params[CH7_PAN_PARAM].value,(inputs[CH7_CV_PAN_INPUT].value)) * clamp(inputs[CH7_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - float ch8L = (1-ch8m) *(inputs[CH8_INPUT].value) * params[CH8_PARAM].value * PanL(params[CH8_PAN_PARAM].value,(inputs[CH8_CV_PAN_INPUT].value)) * clamp(inputs[CH8_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - float ch8R = (1-ch8m) *(inputs[CH8_INPUT].value) * params[CH8_PARAM].value * PanR(params[CH8_PAN_PARAM].value,(inputs[CH8_CV_PAN_INPUT].value)) * clamp(inputs[CH8_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - - if(!chMm){ - mixL = (ch1L + ch2L + ch3L +ch4L + ch5L + ch6L + ch7L + ch8L) * params[MIX_PARAM].value * clamp(inputs[MIX_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - mixR = (ch1R + ch2R + ch3R +ch4R + ch5R + ch6R + ch7R + ch8R) * params[MIX_PARAM].value * clamp(inputs[MIX_CV_INPUT].normalize(10.0f) / 10.0f, 0.0f, 1.0f); - //CHECK FOR INPUT FROM ANOTHER MIXER - if(inputs[LINK_L].active && inputs[LINK_R].active){ - mixL += inputs[LINK_L].value; - mixR += inputs[LINK_R].value; - } - }else{ - mixL = 0.0f; - mixR = 0.0f; - } - - outputs[CH1_OUTPUT].value= ch1L+ch1R; - outputs[CH2_OUTPUT].value= ch2L+ch2R; - outputs[CH3_OUTPUT].value= ch3L+ch3R; - outputs[CH4_OUTPUT].value= ch4L+ch4R; - outputs[CH5_OUTPUT].value= ch5L+ch5R; - outputs[CH6_OUTPUT].value= ch6L+ch6R; - outputs[CH7_OUTPUT].value= ch7L+ch7R; - outputs[CH8_OUTPUT].value= ch8L+ch8R; - //check for MONO OUTPUT - - if(!outputs[MIX_OUTPUTR].active){ - outputs[MIX_OUTPUTL].value= mixL+mixR; - outputs[MIX_OUTPUTR].value= 0.0f; - }else{ - outputs[MIX_OUTPUTL].value= mixL; - outputs[MIX_OUTPUTR].value= mixR; - } - - //outputs[MIX_OUTPUTL].value= mixL; - //outputs[MIX_OUTPUTR].value= mixR; - -} - - -struct Mixer8chWidget : ModuleWidget -{ - Mixer8chWidget(Mixer8ch *module); -}; - - -Mixer8chWidget::Mixer8chWidget(Mixer8ch *module) : ModuleWidget(module) { - //box.size = Vec(15*37, 380); - box.size = Vec(RACK_GRID_WIDTH*26, RACK_GRID_HEIGHT); - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/8chMixer.svg"))); - - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //PAN KNOBS - static const float columnPos[8] = {33,73,113,153, 193, 233, 273, 313}; - static const float panPosY = 180; - addParam(ParamWidget::create(Vec(columnPos[0]-5, panPosY), module, Mixer8ch::CH1_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[1]-5, panPosY), module, Mixer8ch::CH2_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[2]-5, panPosY), module, Mixer8ch::CH3_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[3]-5, panPosY), module, Mixer8ch::CH4_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[4]-5, panPosY), module, Mixer8ch::CH5_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[5]-5, panPosY), module, Mixer8ch::CH6_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[6]-5, panPosY), module, Mixer8ch::CH7_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(columnPos[7]-5, panPosY), module, Mixer8ch::CH8_PAN_PARAM, -1.0f, 1.0f, 0.0f)); - //VOLUME FADERS - static const float volPosY = 223; - addParam(ParamWidget::create(Vec(columnPos[0]+2, volPosY), module, Mixer8ch::CH1_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[1]+2, volPosY), module, Mixer8ch::CH2_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[2]+2, volPosY), module, Mixer8ch::CH3_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[3]+2, volPosY), module, Mixer8ch::CH4_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[4]+2, volPosY), module, Mixer8ch::CH5_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[5]+2, volPosY), module, Mixer8ch::CH6_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[6]+2, volPosY), module, Mixer8ch::CH7_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(columnPos[7]+2, volPosY), module, Mixer8ch::CH8_PARAM, 0.0f, 1.0f, 0.8f)); - //MUTES - static const float mutePosY = 310; - addParam(ParamWidget::create(Vec(columnPos[0]+3, mutePosY), module, Mixer8ch::CH1MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[0]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT1)); - addParam(ParamWidget::create(Vec(columnPos[1]+3, mutePosY), module, Mixer8ch::CH2MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[1]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT2)); - addParam(ParamWidget::create(Vec(columnPos[2]+3, mutePosY), module, Mixer8ch::CH3MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[2]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT3)); - addParam(ParamWidget::create(Vec(columnPos[3]+3, mutePosY), module, Mixer8ch::CH4MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[3]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT4)); - addParam(ParamWidget::create(Vec(columnPos[4]+3, mutePosY), module, Mixer8ch::CH5MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[4]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT5)); - addParam(ParamWidget::create(Vec(columnPos[5]+3, mutePosY), module, Mixer8ch::CH6MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[5]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT6)); - addParam(ParamWidget::create(Vec(columnPos[6]+3, mutePosY), module, Mixer8ch::CH7MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[6]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT7)); - addParam(ParamWidget::create(Vec(columnPos[7]+3, mutePosY), module, Mixer8ch::CH8MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(columnPos[7]+5.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT8)); - //PORTS - static const float portsY[4] = {60,90,120,150}; - addInput(Port::create(Vec(columnPos[0], portsY[0]), Port::INPUT, module, Mixer8ch::CH1_INPUT)); - addInput(Port::create(Vec(columnPos[0], portsY[1]), Port::INPUT, module, Mixer8ch::CH1_CV_INPUT)); - addInput(Port::create(Vec(columnPos[0], portsY[2]), Port::INPUT, module, Mixer8ch::CH1_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[1], portsY[0]), Port::INPUT, module, Mixer8ch::CH2_INPUT)); - addInput(Port::create(Vec(columnPos[1], portsY[1]), Port::INPUT, module, Mixer8ch::CH2_CV_INPUT)); - addInput(Port::create(Vec(columnPos[1], portsY[2]), Port::INPUT, module, Mixer8ch::CH2_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[2], portsY[0]), Port::INPUT, module, Mixer8ch::CH3_INPUT)); - addInput(Port::create(Vec(columnPos[2], portsY[1]), Port::INPUT, module, Mixer8ch::CH3_CV_INPUT)); - addInput(Port::create(Vec(columnPos[2], portsY[2]), Port::INPUT, module, Mixer8ch::CH3_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[3], portsY[0]), Port::INPUT, module, Mixer8ch::CH4_INPUT)); - addInput(Port::create(Vec(columnPos[3], portsY[1]), Port::INPUT, module, Mixer8ch::CH4_CV_INPUT)); - addInput(Port::create(Vec(columnPos[3], portsY[2]), Port::INPUT, module, Mixer8ch::CH4_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[4], portsY[0]), Port::INPUT, module, Mixer8ch::CH5_INPUT)); - addInput(Port::create(Vec(columnPos[4], portsY[1]), Port::INPUT, module, Mixer8ch::CH5_CV_INPUT)); - addInput(Port::create(Vec(columnPos[4], portsY[2]), Port::INPUT, module, Mixer8ch::CH5_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[5], portsY[0]), Port::INPUT, module, Mixer8ch::CH6_INPUT)); - addInput(Port::create(Vec(columnPos[5], portsY[1]), Port::INPUT, module, Mixer8ch::CH6_CV_INPUT)); - addInput(Port::create(Vec(columnPos[5], portsY[2]), Port::INPUT, module, Mixer8ch::CH6_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[6], portsY[0]), Port::INPUT, module, Mixer8ch::CH7_INPUT)); - addInput(Port::create(Vec(columnPos[6], portsY[1]), Port::INPUT, module, Mixer8ch::CH7_CV_INPUT)); - addInput(Port::create(Vec(columnPos[6], portsY[2]), Port::INPUT, module, Mixer8ch::CH7_CV_PAN_INPUT)); - - addInput(Port::create(Vec(columnPos[7], portsY[0]), Port::INPUT, module, Mixer8ch::CH8_INPUT)); - addInput(Port::create(Vec(columnPos[7], portsY[1]), Port::INPUT, module, Mixer8ch::CH8_CV_INPUT)); - addInput(Port::create(Vec(columnPos[7], portsY[2]), Port::INPUT, module, Mixer8ch::CH8_CV_PAN_INPUT)); - - addOutput(Port::create(Vec(columnPos[0], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH1_OUTPUT)); - addOutput(Port::create(Vec(columnPos[1], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH2_OUTPUT)); - addOutput(Port::create(Vec(columnPos[2], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH3_OUTPUT)); - addOutput(Port::create(Vec(columnPos[3], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH4_OUTPUT)); - addOutput(Port::create(Vec(columnPos[4], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH5_OUTPUT)); - addOutput(Port::create(Vec(columnPos[5], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH6_OUTPUT)); - addOutput(Port::create(Vec(columnPos[6], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH7_OUTPUT)); - addOutput(Port::create(Vec(columnPos[7], portsY[3]), Port::OUTPUT, module, Mixer8ch::CH8_OUTPUT)); - //OUTPUT - addOutput(Port::create(Vec(356, portsY[0]), Port::OUTPUT, module, Mixer8ch::MIX_OUTPUTL)); - addOutput(Port::create(Vec(356, portsY[1]), Port::OUTPUT, module, Mixer8ch::MIX_OUTPUTR)); - addInput(Port::create(Vec(356, portsY[3]), Port::INPUT, module, Mixer8ch::MIX_CV_INPUT)); - addParam(ParamWidget::create(Vec(356, volPosY), module, Mixer8ch::MIX_PARAM, 0.0f, 1.0f, 0.8f)); - addParam(ParamWidget::create(Vec(356, mutePosY), module, Mixer8ch::MASTER_MUTE , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(356+2.2, mutePosY+2), module, Mixer8ch::MUTE_LIGHT_MASTER)); - - //LINK - addInput(Port::create(Vec(columnPos[0], 30), Port::INPUT, module, Mixer8ch::LINK_L)); - addInput(Port::create(Vec(columnPos[1], 30), Port::INPUT, module, Mixer8ch::LINK_R)); - -} -Model *modelMixer8ch = Model::create("AS", "Mixer8ch", "8-CH Mixer", MIXER_TAG, AMPLIFIER_TAG); \ No newline at end of file diff --git a/repos/AS/src/MonoVUmeter.cpp b/repos/AS/src/MonoVUmeter.cpp deleted file mode 100644 index b434d1db..00000000 --- a/repos/AS/src/MonoVUmeter.cpp +++ /dev/null @@ -1,96 +0,0 @@ -//*********************************************************************************************** -// -//MonoVUmeter module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//*********************************************************************************************** - -#include "AS.hpp" -#include "dsp/vumeter.hpp" - -struct MonoVUmeter : Module { - enum ParamIds { - NUM_PARAMS - }; - - enum InputIds { - INPUT, - NUM_INPUTS - }; - - enum OutputIds { - OUT, - NUM_OUTPUTS - }; - - enum LightIds { - METER_LIGHT, - NUM_LIGHTS = METER_LIGHT+15 - }; - - MonoVUmeter() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - } - void step() override; - - VUMeter vuBar; - -}; - -void MonoVUmeter::step(){ - //GET VALUES AND ROUTE SIGNAL TO OUTPUT - float signal_in = inputs[INPUT].value; - outputs[OUT].value = signal_in; - //VU METER BARS LIGHTS - vuBar.dBInterval = 3; - vuBar.setValue(signal_in / 10.0f); - for (int i = 0; i < 15; i++){ - lights[METER_LIGHT + i].setBrightnessSmooth(vuBar.getBrightness(i)); - } -}; - -struct MonoVUmeterWidget : ModuleWidget -{ - MonoVUmeterWidget(MonoVUmeter *module); -}; - - -MonoVUmeterWidget::MonoVUmeterWidget(MonoVUmeter *module) : ModuleWidget(module) { - box.size = Vec(2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/MonoVUmeter.svg"))); - addChild(panel); - } - //SCREWS - SPECIAL SPACING FOR RACK WIDTH*4 - addChild(Widget::create(Vec(0, 0))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - // LEFT COLUMN LEDs - static const float ledCol = 11; - static const float offsetY = 12; - static const float startY = 66; - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 0), module, MonoVUmeter::METER_LIGHT + 0)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 1), module, MonoVUmeter::METER_LIGHT + 1)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 2), module, MonoVUmeter::METER_LIGHT + 2)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 3), module, MonoVUmeter::METER_LIGHT + 3)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 4), module, MonoVUmeter::METER_LIGHT + 4)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 5), module, MonoVUmeter::METER_LIGHT + 5)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 6), module, MonoVUmeter::METER_LIGHT + 6)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 7), module, MonoVUmeter::METER_LIGHT + 7)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 8), module, MonoVUmeter::METER_LIGHT + 8)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 9), module, MonoVUmeter::METER_LIGHT + 9)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 10), module, MonoVUmeter::METER_LIGHT + 10)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 11), module, MonoVUmeter::METER_LIGHT + 11)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 12), module, MonoVUmeter::METER_LIGHT + 12)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 13), module, MonoVUmeter::METER_LIGHT + 13)); - addChild(ModuleLightWidget::create>(Vec(ledCol, startY + offsetY * 14), module, MonoVUmeter::METER_LIGHT + 14)); - - //INPUTS - addInput(Port::create(Vec(3, 270), Port::INPUT, module, MonoVUmeter::INPUT)); - //OUTPUTS - addOutput(Port::create(Vec(3,307), Port::OUTPUT, module, MonoVUmeter::OUT)); -} - -Model *modelMonoVUmeter = Model::create("AS", "MonoVUmeter", "Mono VU meter", VISUAL_TAG, UTILITY_TAG); \ No newline at end of file diff --git a/repos/AS/src/Multiple2_5.cpp b/repos/AS/src/Multiple2_5.cpp deleted file mode 100644 index 924bac5f..00000000 --- a/repos/AS/src/Multiple2_5.cpp +++ /dev/null @@ -1,134 +0,0 @@ -//************************************************************************************** -//Multiple 2x5 module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//************************************************************************************** -#include "AS.hpp" - -struct Multiple2_5 : Module { - enum ParamIds { - NUM_PARAMS - }; - enum InputIds { - INPUT1, - INPUT2, - NUM_INPUTS - }; - enum OutputIds { - OUT11, - OUT12, - OUT13, - OUT14, - OUT15, - OUT21, - OUT22, - OUT23, - OUT24, - OUT25, - NUM_OUTPUTS - }; - - Multiple2_5() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) {} - void step() override; -}; - - -void Multiple2_5::step() { - - float IN1 = inputs[INPUT1].value; - float IN2 = inputs[INPUT2].value; - - // Set outputs - outputs[OUT11].value = IN1; - outputs[OUT12].value = IN1; - outputs[OUT13].value = IN1; - outputs[OUT14].value = IN1; - outputs[OUT15].value = IN1; - outputs[OUT21].value = IN2; - outputs[OUT22].value = IN2; - outputs[OUT23].value = IN2; - outputs[OUT24].value = IN2; - outputs[OUT25].value = IN2; - //Is it necessary to check for active outputs in this case? - /* - if (outputs[OUT11].active) { - outputs[OUT11].value = IN1; - } - - if (outputs[OUT12].active) { - outputs[OUT12].value = IN1; - } - - if (outputs[OUT13].active) { - outputs[OUT13].value= IN1; - } - - if (outputs[OUT14].active) { - outputs[OUT14].value = IN1; - } - if (outputs[OUT15].active) { - outputs[OUT15].value = IN1; - } - - if (outputs[OUT21].active) { - outputs[OUT21].value = IN2; - } - - if (outputs[OUT22].active) { - outputs[OUT22].value = IN2; - } - - if (outputs[OUT23].active) { - outputs[OUT23].value = IN2; - } - - if (outputs[OUT24].active) { - outputs[OUT24].value = IN2; - } - if (outputs[OUT25].active) { - outputs[OUT25].value = IN2; - } - */ -} - -struct Multiple2_5Widget : ModuleWidget -{ - Multiple2_5Widget(Multiple2_5 *module); -}; - - -Multiple2_5Widget::Multiple2_5Widget(Multiple2_5 *module) : ModuleWidget(module) { - box.size = Vec(5 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/Multiple2_5.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //INPUTS - addInput(Port::create(Vec(8, 65), Port::INPUT, module, Multiple2_5::INPUT1)); - addInput(Port::create(Vec(43, 65), Port::INPUT, module, Multiple2_5::INPUT2)); - //OUTPUTS - addOutput(Port::create(Vec(8, 130), Port::OUTPUT, module, Multiple2_5::OUT11)); - addOutput(Port::create(Vec(43, 130), Port::OUTPUT, module, Multiple2_5::OUT21)); - - addOutput(Port::create(Vec(8, 175), Port::OUTPUT, module, Multiple2_5::OUT12)); - addOutput(Port::create(Vec(43, 175), Port::OUTPUT, module, Multiple2_5::OUT22)); - - addOutput(Port::create(Vec(8, 220), Port::OUTPUT, module, Multiple2_5::OUT13)); - addOutput(Port::create(Vec(43, 220), Port::OUTPUT, module, Multiple2_5::OUT23)); - - addOutput(Port::create(Vec(8, 265), Port::OUTPUT, module, Multiple2_5::OUT14)); - addOutput(Port::create(Vec(43, 265), Port::OUTPUT, module, Multiple2_5::OUT24)); - - addOutput(Port::create(Vec(8, 310), Port::OUTPUT, module, Multiple2_5::OUT15)); - addOutput(Port::create(Vec(43, 310), Port::OUTPUT, module, Multiple2_5::OUT25)); - -} - -Model *modelMultiple2_5 = Model::create("AS", "Multiple2_5", "Multiple 2 x 5", MULTIPLE_TAG, UTILITY_TAG); \ No newline at end of file diff --git a/repos/AS/src/Phaser.cpp b/repos/AS/src/Phaser.cpp deleted file mode 100644 index 70f48e9e..00000000 --- a/repos/AS/src/Phaser.cpp +++ /dev/null @@ -1,238 +0,0 @@ -//*********************************************************************************************** -// -//Phaser module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -//Based on the Phaser Module for VCV Rack by Autodafe http://www.autodafe.net -//Based on code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//And part of code on musicdsp.org: http://musicdsp.org/showArchiveComment.php?ArchiveID=78 -// -//*********************************************************************************************** - -#include "AS.hpp" -#include "dsp/digital.hpp" - -#include - -struct PhaserFx : Module{ - enum ParamIds { - RATE_PARAM, - FBK_PARAM, - DEPTH_PARAM, - BYPASS_SWITCH, - NUM_PARAMS - }; - enum InputIds { - INPUT, - RATE_CV_INPUT, - FEEDBACK_CV_INPUT, - DEPTH_CV_INPUT, - NUM_INPUTS - }; - enum OutputIds { - OUT, - NUM_OUTPUTS - }; - enum LightIds { - RATE_LIGHT, - FBK_LIGHT, - DEPTH_LIGHT, - BYPASS_LED, - NUM_LIGHTS - }; - - SchmittTrigger bypass_button_trig; - - bool fx_bypass = false; - PhaserFx() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - - void step() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *statesJ = json_array(); - - json_t *bypassJ = json_boolean(fx_bypass); - json_array_append_new(statesJ, bypassJ); - - json_object_set_new(rootJm, "as_FxBypass", statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *statesJ = json_object_get(rootJm, "as_FxBypass"); - - json_t *bypassJ = json_array_get(statesJ, 0); - - fx_bypass = !!json_boolean_value(bypassJ); - - } - -}; - -#define SR (44100.f) //sample rate -#define F_PI (3.14159f) - -class Phaser{ -public: - Phaser() //initialise to some usefull defaults... - : _fb( 0.7f ) - , _lfoPhase( 0.0f ) - , _depth( 1.0f ) - , _zm1( 0.f ) - { - Range( 440.0f, 1600.0f ); - Rate( 0.5f ); - } - - void Range( float fMin, float fMax ){ // Hz - _dmin = fMin / (SR/2.0f); - _dmax = fMax / (SR/2.0f); - } - - void Rate( float rate ){ // cps - _lfoInc = 2.0f * F_PI * (rate / SR); - } - - void Feedback( float fb ){ // 0 -> <1. - _fb = fb; - } - - void Depth( float depth ){ // 0 -> 1. - _depth = depth; - } - - float Update( float inSamp ){ - //calculate and update phaser sweep lfo... - float d = _dmin + (_dmax-_dmin) * ((sin( _lfoPhase ) + -1.f)/2.f); - _lfoPhase += _lfoInc; - if( _lfoPhase >= F_PI * 2.0f ) - _lfoPhase -= F_PI * 2.0f; - - //update filter coeffs - for( int i=0; i<6; i++ ) - _alps[i].Delay( d ); - - //calculate output - float y = _alps[0].Update( - _alps[1].Update( - _alps[2].Update( - _alps[3].Update( - _alps[4].Update( - _alps[5].Update( inSamp + _zm1 * _fb )))))); - _zm1 = y; - - return inSamp + y * _depth; - } -private: - class AllpassDelay{ - public: - AllpassDelay() - : _a1( 0.0f ) - , _zm1( 0.0f ) - {} - - void Delay( float delay ){ //sample delay time - _a1 = (1.0f - delay) / (1.0f + delay); - } - - float Update( float inSamp ){ - float y = inSamp * -_a1 + _zm1; - _zm1 = y * _a1 + inSamp; - - return y; - } - private: - float _a1, _zm1; - }; - - AllpassDelay _alps[6]; - - float _dmin, _dmax; //range - float _fb; //feedback - float _lfoPhase; - float _lfoInc; - float _depth; - - float _zm1; -}; - -Phaser *pha = new Phaser(); - -void PhaserFx::step() { - - if (bypass_button_trig.process(params[BYPASS_SWITCH].value)) - { - fx_bypass = !fx_bypass; - } - lights[BYPASS_LED].value = fx_bypass ? 1.00 : 0.0; - - - float rate = clamp(params[RATE_PARAM].value + inputs[RATE_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - float feedback = clamp(params[FBK_PARAM].value + inputs[FEEDBACK_CV_INPUT].value / 10.0f, 0.0f, 0.95f); - float depth = clamp(params[DEPTH_PARAM].value + inputs[DEPTH_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - - float input = inputs[INPUT].value / 5.0f; - - pha->Rate(rate); - pha->Feedback(feedback); - pha->Depth (depth); - - float out = pha->Update(input); - - //check bypass switch status - if (fx_bypass){ - outputs[OUT].value = input * 5.0f; - }else{ - outputs[OUT].value = out * 5.0f; - } - - lights[RATE_LIGHT].value = clamp(params[RATE_PARAM].value + inputs[RATE_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - lights[FBK_LIGHT].value = clamp(params[FBK_PARAM].value + inputs[FEEDBACK_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - lights[DEPTH_LIGHT].value = clamp(params[DEPTH_PARAM].value + inputs[DEPTH_CV_INPUT].value / 10.0f, 0.0f, 1.0f); -} - - -struct PhaserFxWidget : ModuleWidget -{ - PhaserFxWidget(PhaserFx *module); -}; - - -PhaserFxWidget::PhaserFxWidget(PhaserFx *module) : ModuleWidget(module) { - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/Phaser.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //KNOBS - addParam(ParamWidget::create(Vec(43, 60), module, PhaserFx::RATE_PARAM, 0.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(43, 125), module, PhaserFx::FBK_PARAM, 0.0f, 0.95f, 0.0f)); - addParam(ParamWidget::create(Vec(43, 190), module, PhaserFx::DEPTH_PARAM, 0.0f, 1.0f, 0.0f)); - //LIGHTS - addChild(ModuleLightWidget::create>(Vec(39, 57), module, PhaserFx::RATE_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 122), module, PhaserFx::FBK_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 187), module, PhaserFx::DEPTH_LIGHT)); - //BYPASS SWITCH - addParam(ParamWidget::create(Vec(33, 260), module, PhaserFx::BYPASS_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(35.2, 262), module, PhaserFx::BYPASS_LED)); - //INS/OUTS - addInput(Port::create(Vec(10, 310), Port::INPUT, module, PhaserFx::INPUT)); - addOutput(Port::create(Vec(55, 310), Port::OUTPUT, module, PhaserFx::OUT)); - //CV INPUTS - addInput(Port::create(Vec(10, 67), Port::INPUT, module, PhaserFx::RATE_CV_INPUT)); - addInput(Port::create(Vec(10, 132), Port::INPUT, module, PhaserFx::FEEDBACK_CV_INPUT)); - addInput(Port::create(Vec(10, 197), Port::INPUT, module, PhaserFx::DEPTH_CV_INPUT)); - -} - -Model *modelPhaserFx = Model::create("AS", "PhaserFx", "Phaser FX", EFFECT_TAG); \ No newline at end of file diff --git a/repos/AS/src/QuadVCA.cpp b/repos/AS/src/QuadVCA.cpp deleted file mode 100644 index 5bbadfa3..00000000 --- a/repos/AS/src/QuadVCA.cpp +++ /dev/null @@ -1,176 +0,0 @@ -//************************************************************************************** -//Quad QuadVCA module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code adapted from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** - -#include "AS.hpp" - -struct QuadVCA : Module { - enum ParamIds { - GAIN1_PARAM, - GAIN2_PARAM, - GAIN3_PARAM, - GAIN4_PARAM, - MODE1_PARAM, - MODE2_PARAM, - MODE3_PARAM, - MODE4_PARAM, - NUM_PARAMS - }; - enum InputIds { - GAIN1_CV_INPUT, - IN1_INPUT, - GAIN2_CV_INPUT, - IN2_INPUT, - GAIN3_CV_INPUT, - IN3_INPUT, - GAIN4_CV_INPUT, - IN4_INPUT, - NUM_INPUTS - }; - enum OutputIds { - OUT1_OUTPUT, - OUT2_OUTPUT, - OUT3_OUTPUT, - OUT4_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - GAIN1_LIGHT, - GAIN2_LIGHT, - GAIN3_LIGHT, - GAIN4_LIGHT, - NUM_LIGHTS - }; - - float v1= 0.0f; - float v2= 0.0f; - float v3= 0.0f; - float v4= 0.0f; - const float expBase = 50.0f; - - QuadVCA() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; -}; - -void QuadVCA::step() { - //QuadVCA 1 - float out = 0.0; - v1 = inputs[IN1_INPUT].value * params[GAIN1_PARAM].value; - if(inputs[GAIN1_CV_INPUT].active){ - if(params[MODE1_PARAM].value==1){ - v1 *= clamp(inputs[GAIN1_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - }else{ - v1 *= rescale(powf(expBase, clamp(inputs[GAIN1_CV_INPUT].value / 10.0f, 0.0f, 1.0f)), 1.0f, expBase, 0.0f, 1.0f); - } - } - out+=v1; - lights[GAIN1_LIGHT].setBrightnessSmooth(fmaxf(0.0f, out / 5.0f)); - if (outputs[OUT1_OUTPUT].active) { - outputs[OUT1_OUTPUT].value = out; - out = 0.0f; - } - //QuadVCA 2 - v2 = inputs[IN2_INPUT].value * params[GAIN2_PARAM].value; - if(inputs[GAIN2_CV_INPUT].active){ - if(params[MODE2_PARAM].value){ - v2 *= clamp(inputs[GAIN2_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - }else{ - v2 *= rescale(powf(expBase, clamp(inputs[GAIN2_CV_INPUT].value / 10.0f, 0.0f, 1.0f)), 1.0f, expBase, 0.0f, 1.0f); - } - } - out+=v2; - lights[GAIN2_LIGHT].setBrightnessSmooth(fmaxf(0.0f, out / 5.0f)); - if (outputs[OUT2_OUTPUT].active) { - outputs[OUT2_OUTPUT].value = out; - out = 0.0f; - } - //QuadVCA 3 - v3 = inputs[IN3_INPUT].value * params[GAIN3_PARAM].value; - if(inputs[GAIN3_CV_INPUT].active){ - if(params[MODE3_PARAM].value){ - v3 *= clamp(inputs[GAIN3_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - }else{ - v3 *= rescale(powf(expBase, clamp(inputs[GAIN3_CV_INPUT].value / 10.0f, 0.0f, 1.0f)), 1.0f, expBase, 0.0f, 1.0f); - } - } - out+=v3; - lights[GAIN3_LIGHT].setBrightnessSmooth(fmaxf(0.0f, out / 5.0f)); - if (outputs[OUT3_OUTPUT].active) { - outputs[OUT3_OUTPUT].value = out; - out = 0.0f; - } - //QuadVCA 4 - v4 = inputs[IN4_INPUT].value * params[GAIN4_PARAM].value; - if(inputs[GAIN4_CV_INPUT].active){ - if(params[MODE4_PARAM].value){ - v4 *= clamp(inputs[GAIN4_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - }else{ - v4 *= rescale(powf(expBase, clamp(inputs[GAIN4_CV_INPUT].value / 10.0f, 0.0f, 1.0f)), 1.0f, expBase, 0.0f, 1.0f); - } - } - out+=v4; - lights[GAIN4_LIGHT].setBrightnessSmooth(fmaxf(0.0f, out / 5.0f)); - if (outputs[OUT4_OUTPUT].active) { - outputs[OUT4_OUTPUT].value = out; - out = 0.0f; - } -} - -struct QuadVCAWidget : ModuleWidget -{ - QuadVCAWidget(QuadVCA *module); -}; - - -QuadVCAWidget::QuadVCAWidget(QuadVCA *module) : ModuleWidget(module) { - box.size = Vec(8 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/QuadVCA.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - static const float posX[4] = {13,39,65,91}; - //SLIDERS - addParam(ParamWidget::create(Vec(posX[0]-3, 70), module, QuadVCA::GAIN1_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(posX[1]-3, 70), module, QuadVCA::GAIN2_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(posX[2]-3, 70), module, QuadVCA::GAIN3_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(posX[3]-3, 70), module, QuadVCA::GAIN4_PARAM, 0.0f, 1.0f, 0.5f)); - //MODE SWITCHES - addParam(ParamWidget::create(Vec(posX[0], 190), module, QuadVCA::MODE1_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(posX[1], 190), module, QuadVCA::MODE2_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(posX[2], 190), module, QuadVCA::MODE3_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(posX[3], 190), module, QuadVCA::MODE4_PARAM, 0.0f, 1.0f, 1.0f)); - //CV INPUTS - addInput(Port::create(Vec(posX[0]-4, 217), Port::INPUT, module, QuadVCA::GAIN1_CV_INPUT)); - addInput(Port::create(Vec(posX[1]-4, 217), Port::INPUT, module, QuadVCA::GAIN2_CV_INPUT)); - addInput(Port::create(Vec(posX[2]-4, 217), Port::INPUT, module, QuadVCA::GAIN3_CV_INPUT)); - addInput(Port::create(Vec(posX[3]-4, 217), Port::INPUT, module, QuadVCA::GAIN4_CV_INPUT)); - //INPUTS - addInput(Port::create(Vec(posX[0]-4, 260), Port::INPUT, module, QuadVCA::IN1_INPUT)); - addInput(Port::create(Vec(posX[1]-4, 260), Port::INPUT, module, QuadVCA::IN2_INPUT)); - addInput(Port::create(Vec(posX[2]-4, 260), Port::INPUT, module, QuadVCA::IN3_INPUT)); - addInput(Port::create(Vec(posX[3]-4, 260), Port::INPUT, module, QuadVCA::IN4_INPUT)); - //LEDS - addChild(ModuleLightWidget::create>(Vec(posX[0]+5, 288), module, QuadVCA::GAIN1_LIGHT));//294 - addChild(ModuleLightWidget::create>(Vec(posX[1]+5, 288), module, QuadVCA::GAIN2_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(posX[2]+5, 288), module, QuadVCA::GAIN3_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(posX[3]+5, 288), module, QuadVCA::GAIN4_LIGHT)); - //OUTPUTS - addOutput(Port::create(Vec(posX[0]-4, 310), Port::OUTPUT, module, QuadVCA::OUT1_OUTPUT)); - addOutput(Port::create(Vec(posX[1]-4, 310), Port::OUTPUT, module, QuadVCA::OUT2_OUTPUT)); - addOutput(Port::create(Vec(posX[2]-4, 310), Port::OUTPUT, module, QuadVCA::OUT3_OUTPUT)); - addOutput(Port::create(Vec(posX[3]-4, 310), Port::OUTPUT, module, QuadVCA::OUT4_OUTPUT)); - -} - -Model *modelQuadVCA = Model::create("AS", "QuadVCA", "Quad VCA/Mixer", AMPLIFIER_TAG, MIXER_TAG); \ No newline at end of file diff --git a/repos/AS/src/Reverb.cpp b/repos/AS/src/Reverb.cpp deleted file mode 100644 index 59b61e99..00000000 --- a/repos/AS/src/Reverb.cpp +++ /dev/null @@ -1,176 +0,0 @@ -//*********************************************************************************************** -// -//Reverb module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Based on code from ML_Modules by martin-lueders https://github.com/martin-lueders/ML_modules -//And code from Freeverb by Jezar at Dreampoint - http://www.dreampoint.co.uk -// -//*********************************************************************************************** - -#include "AS.hpp" -#include "dsp/digital.hpp" - -#include "../freeverb/revmodel.hpp" - -struct ReverbFx : Module{ - enum ParamIds { - DECAY_PARAM, - DAMP_PARAM, - BLEND_PARAM, - BYPASS_SWITCH, - NUM_PARAMS - }; - enum InputIds { - SIGNAL_INPUT, - DECAY_CV_INPUT, - DAMP_CV_INPUT, - BLEND_CV_INPUT, - NUM_INPUTS - }; - enum OutputIds { - SIGNAL_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - DECAY_LIGHT, - DAMP_LIGHT, - BLEND_LIGHT, - BYPASS_LED, - NUM_LIGHTS - }; - - revmodel reverb; - float roomsize, damp; - - SchmittTrigger bypass_button_trig; - - bool fx_bypass = false; - - ReverbFx() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - - float gSampleRate = engineGetSampleRate(); - reverb.init(gSampleRate); - } - - void step() override; - - void onSampleRateChange() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *statesJ = json_array(); - - json_t *bypassJ = json_boolean(fx_bypass); - json_array_append_new(statesJ, bypassJ); - - json_object_set_new(rootJm, "as_FxBypass", statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *statesJ = json_object_get(rootJm, "as_FxBypass"); - - json_t *bypassJ = json_array_get(statesJ, 0); - - fx_bypass = !!json_boolean_value(bypassJ); - - } - -}; - -void ReverbFx::onSampleRateChange() { - - float gSampleRate = engineGetSampleRate(); - - reverb.init(gSampleRate); - - reverb.setdamp(damp); - reverb.setroomsize(roomsize); - -}; - - -void ReverbFx::step() { - - if (bypass_button_trig.process(params[BYPASS_SWITCH].value)){ - fx_bypass = !fx_bypass; - } - lights[BYPASS_LED].value = fx_bypass ? 1.0f : 0.0f; - - float out1, out2; - - out1 = out2 = 0.0f; - - float old_roomsize = roomsize; - float old_damp = damp; - - float input_signal = clamp(inputs[SIGNAL_INPUT].value,-10.0f,10.0f); - //float input_signal = inputs[SIGNAL_INPUT].value; - roomsize = clamp(params[DECAY_PARAM].value + inputs[DECAY_CV_INPUT].value / 10.0f, 0.0f, 0.88f); - damp = clamp(params[DAMP_PARAM].value + inputs[DAMP_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - - if( old_damp != damp ) reverb.setdamp(damp); - if( old_roomsize != roomsize) reverb.setroomsize(roomsize); - - reverb.process(input_signal, out1, out2); - - //check bypass switch status - if (fx_bypass){ - outputs[SIGNAL_OUTPUT].value = inputs[SIGNAL_INPUT].value; - }else { - outputs[SIGNAL_OUTPUT].value = input_signal + out1 * clamp(params[BLEND_PARAM].value + inputs[BLEND_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - //outputs[SIGNAL_OUTPUT2].value = input_signal + out2 * clamp(params[BLEND_PARAM].value + inputs[BLEND_CV_INPUT].value / 10.0, 0.0, 1.0); - } - - lights[DECAY_LIGHT].value = clamp(params[DECAY_PARAM].value + inputs[DECAY_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - lights[DAMP_LIGHT].value = clamp(params[DAMP_PARAM].value + inputs[DAMP_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - lights[BLEND_LIGHT].value = clamp(params[BLEND_PARAM].value + inputs[BLEND_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - -} - -struct ReverbFxWidget : ModuleWidget -{ - ReverbFxWidget(ReverbFx *module); -}; - - -ReverbFxWidget::ReverbFxWidget(ReverbFx *module) : ModuleWidget(module) { - box.size = Vec(15 * 6, 380); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - - panel->setBackground(SVG::load(assetPlugin(plugin, "res/Reverb.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //KNOBS - addParam(ParamWidget::create(Vec(43, 60), module, ReverbFx::DECAY_PARAM, 0.0f, 0.9f, 0.5f)); - addParam(ParamWidget::create(Vec(43, 125), module, ReverbFx::DAMP_PARAM, 0.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(43, 190), module, ReverbFx::BLEND_PARAM, 0.0f, 1.0f, 0.5f)); - //LIGHTS - addChild(ModuleLightWidget::create>(Vec(39, 57), module, ReverbFx::DECAY_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 122), module, ReverbFx::DAMP_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 187), module, ReverbFx::BLEND_LIGHT)); - //BYPASS SWITCH - addParam(ParamWidget::create(Vec(33, 260), module, ReverbFx::BYPASS_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(35.2, 262), module, ReverbFx::BYPASS_LED)); - //INS/OUTS - addInput(Port::create(Vec(10, 310), Port::INPUT, module, ReverbFx::SIGNAL_INPUT)); - addOutput(Port::create(Vec(55, 310), Port::OUTPUT, module, ReverbFx::SIGNAL_OUTPUT)); - //CV INPUTS - addInput(Port::create(Vec(10, 67), Port::INPUT, module, ReverbFx::DECAY_CV_INPUT)); - addInput(Port::create(Vec(10, 132), Port::INPUT, module, ReverbFx::DAMP_CV_INPUT)); - addInput(Port::create(Vec(10, 197), Port::INPUT, module, ReverbFx::BLEND_CV_INPUT)); - -} - -Model *modelReverbFx = Model::create("AS", "ReverbFx", "Reverb FX", REVERB_TAG, EFFECT_TAG); \ No newline at end of file diff --git a/repos/AS/src/SEQ16.cpp b/repos/AS/src/SEQ16.cpp deleted file mode 100644 index 4f2b797c..00000000 --- a/repos/AS/src/SEQ16.cpp +++ /dev/null @@ -1,473 +0,0 @@ -//*********************************************************************************************** -//16-step sequencer module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Based on SEQ16 VCV Rack by Autodafe http://www.autodafe.net -//Based on code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//*********************************************************************************************** -#include "AS.hpp" -#include "dsp/digital.hpp" - -struct SEQ16 : Module { - enum ParamIds { - CLOCK_PARAM, - RUN_PARAM, - RESET_PARAM, - STEPS_PARAM, - TRIGGER_PARAM, - PREV_STEP, - NEXT_STEP, - GATE_MODE_PARAM, - ROW1_PARAM, - ROW2_PARAM = ROW1_PARAM + 16, - ROW3_PARAM = ROW2_PARAM + 16, - GATE_PARAM = ROW3_PARAM + 16, - NUM_PARAMS = GATE_PARAM + 16 - }; - enum InputIds { - CLOCK_INPUT, - EXT_CLOCK_INPUT, - RESET_INPUT, - STEPS_INPUT, - NUM_INPUTS - }; - enum OutputIds { - GATES_OUTPUT, - ROW1_OUTPUT, - ROW2_OUTPUT, - ROW3_OUTPUT, - GATE_OUTPUT, - NUM_OUTPUTS = GATE_OUTPUT + 16 - }; - enum LightIds { - RUNNING_LIGHT, - RESET_LIGHT, - GATES_LIGHT, - TRIGGER_LIGHT, - ROW_LIGHTS, - GATE_LIGHTS = ROW_LIGHTS + 3, - NUM_LIGHTS = GATE_LIGHTS + 16 - }; - - bool running = true; - bool triggerActive = false; - // for external clock - SchmittTrigger clockTrigger; - // For buttons - SchmittTrigger runningTrigger; - SchmittTrigger resetTrigger; - SchmittTrigger prevTrigger; - SchmittTrigger nextTrigger; - SchmittTrigger manualTrigger; - SchmittTrigger gateTriggers[16]; - float phase = 0.0f; - float blinkPhase = 0.0f; - int index = 0; - int stepIndex = index+1; - int modeIndex = 0; - bool nextStep = false; - bool gateState[16] = {}; - float resetLight = 0.0f; - float stepLights[16] = {}; - const float lightLambda = 0.075f; - - enum GateMode { - TRIGGER, - RETRIGGER, - CONTINUOUS, - }; - GateMode gateMode = TRIGGER; - PulseGenerator gatePulse; - - SEQ16() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - reset(); - } - void step() override; - - int numSteps; - - json_t *toJson() override { - json_t *rootJ = json_object(); - - // running - json_object_set_new(rootJ, "running", json_boolean(running)); - - // gates - json_t *gatesJ = json_array(); - for (int i = 0; i < 16; i++) { - json_t *gateJ = json_integer((int) gateState[i]); - json_array_append_new(gatesJ, gateJ); - } - json_object_set_new(rootJ, "gates", gatesJ); - // gateMode - json_t *gateModeJ = json_integer((int) gateMode); - json_object_set_new(rootJ, "gateMode", gateModeJ); - return rootJ; - } - - void fromJson(json_t *rootJ) override { - // running - json_t *runningJ = json_object_get(rootJ, "running"); - if (runningJ) - running = json_is_true(runningJ); - // gates - json_t *gatesJ = json_object_get(rootJ, "gates"); - if (gatesJ) { - for (int i = 0; i < 16; i++) { - json_t *gateJ = json_array_get(gatesJ, i); - if (gateJ) - gateState[i] = !!json_integer_value(gateJ); - } - } - - // gateMode - json_t *gateModeJ = json_object_get(rootJ, "gateMode"); - if (gateModeJ) - gateMode = (GateMode)json_integer_value(gateModeJ); - } - - void reset() override { - for (int i = 0; i < 16; i++) { - gateState[i] = true; - } - } - - void randomize() override { - for (int i = 0; i < 16; i++) { - gateState[i] = (randomUniform() > 0.5); - } - } -}; - - -void SEQ16::step() { - numSteps = roundf(clamp(params[STEPS_PARAM].value, 1.0f, 16.0f)); - stepIndex = index+1; - // Gate mode Switch with 3 way switch - modeIndex = params[GATE_MODE_PARAM].value; - gateMode = (GateMode)int(modeIndex); - - // Run - if (runningTrigger.process(params[RUN_PARAM].value)) { - running = !running; - } - lights[RUNNING_LIGHT].value = running ? 1.0f : 0.0f; - - nextStep = false; - - if (running) { - if (inputs[EXT_CLOCK_INPUT].active) { - // External clock - if (clockTrigger.process(inputs[EXT_CLOCK_INPUT].value)) { - phase = 0.0f; - nextStep = true; - } - } - else { - // Internal clock - float clockTime = powf(2.0, params[CLOCK_PARAM].value + inputs[CLOCK_INPUT].value); - phase += clockTime / engineGetSampleRate(); - if (phase >= 1.0f) { - phase -= 1.0f; - nextStep = true; - } - } - } - - // Reset - if (resetTrigger.process(params[RESET_PARAM].value + inputs[RESET_INPUT].value)) { - phase = 0.0f; - index = 16; - nextStep = true; - resetLight = 1.0; - } - - if (nextStep) { - // Advance step - int numSteps = clamp(round(params[STEPS_PARAM].value + inputs[STEPS_INPUT].value), 1.0f, 16.0f); - index += 1; - if (index >= numSteps) { - index = 0; - } - stepLights[index] = 1.0f; - gatePulse.trigger(1e-3); - } - - resetLight -= resetLight / lightLambda / engineGetSampleRate(); - - bool pulse = gatePulse.process(1.0 / engineGetSampleRate()); - - // Gate buttons - for (int i = 0; i < 16; i++) { - if (gateTriggers[i].process(params[GATE_PARAM + i].value)) { - gateState[i] = !gateState[i]; - } - bool gateOn = (running && i == index && gateState[i]); - if (gateMode == TRIGGER) - gateOn = gateOn && pulse; - else if (gateMode == RETRIGGER) - gateOn = gateOn && !pulse; - - outputs[GATE_OUTPUT + i].value = gateOn ? 10.0f : 0.0f; - stepLights[i] -= stepLights[i] / lightLambda / engineGetSampleRate(); - lights[GATE_LIGHTS + i].value = gateState[i] ? 1.0f - stepLights[i] : stepLights[i]; - } - - // Rows - float row1 = params[ROW1_PARAM + index].value; - float row2 = params[ROW2_PARAM + index].value; - float row3 = params[ROW3_PARAM + index].value; - bool gatesOn = (running && gateState[index]); - if (gateMode == TRIGGER) - gatesOn = gatesOn && pulse; - else if (gateMode == RETRIGGER) - gatesOn = gatesOn && !pulse; - - // Outputs - outputs[ROW1_OUTPUT].value = row1; - outputs[ROW2_OUTPUT].value = row2; - outputs[ROW3_OUTPUT].value = row3; - lights[RESET_LIGHT].value = resetLight; - lights[GATES_LIGHT].value = gatesOn ? 1.0f : 0.0f; - lights[ROW_LIGHTS].value = row1; - lights[ROW_LIGHTS + 1].value = row2; - lights[ROW_LIGHTS + 2].value = row3; - //mod to make the manual trigger work - if (running) { - outputs[GATES_OUTPUT].value = gatesOn ? 10.0f : 0.0f; - lights[TRIGGER_LIGHT].value = 0.0f; - //disable manual trigger - triggerActive = false; - } - - //Edit mode - if(manualTrigger.process(params[TRIGGER_PARAM].value)){ - triggerActive = !triggerActive; - } - lights[TRIGGER_LIGHT].value = triggerActive ? 1.0f : 0.0f; - // Manual trigger/manual step, only when the seq is not running - if (triggerActive) { - running=false; - outputs[GATES_OUTPUT].value = 10.0f; - - // Blink light at 1Hz - float deltaTime = 5.0f / engineGetSampleRate(); - blinkPhase += deltaTime; - if (blinkPhase >= 1.0f){ - blinkPhase -= 1.0f; - } - // step edit light indicator - for (int i = 0; i < 16; i++) { - if(i==index){ - lights[GATE_LIGHTS + i].value = (blinkPhase < 0.5f) ? 1.0f : 0.0f; - }else{ - lights[GATES_LIGHT].value = gatesOn ? 1.0f : 0.0f; - } - } - - }else{ - outputs[GATES_OUTPUT].value = gatesOn ? 10.0f : 0.0f; - lights[GATES_LIGHT].value = gatesOn ? 1.0f : 0.0f; - } - //Prev/next step buttons only work when seq is not running - if(!running){ - if (prevTrigger.process(params[PREV_STEP].value)) { - index -= 1; - if(index<0){ - index = numSteps-1; - } - } - if (nextTrigger.process(params[NEXT_STEP].value)) { - index += 1; - if(index>numSteps-1){ - index = 0; - } - } - } -} - -struct StepsDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - StepsDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - - nvgFontSize(vg, 22); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - char displayStr[3]; - - sprintf(displayStr, "%2u", (unsigned) *value); - - Vec textPos = Vec(6, 23); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, displayStr, NULL); - } -}; - -template -struct MuteLight : BASE { - MuteLight() { - //this->box.size = Vec(20.0, 20.0); - this->box.size = mm2px(Vec(6.0, 6.0)); - } -}; - - -struct SEQ16Widget : ModuleWidget { - SEQ16Widget(SEQ16 *module); - Menu *createContextMenu() override; -}; - - -SEQ16Widget::SEQ16Widget(SEQ16 *module) : ModuleWidget(module) { - - box.size = Vec(44 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/SEQ16.svg"))); - addChild(panel); - } - //LCD STEPS SCREEN - StepsDisplayWidget *display = new StepsDisplayWidget(); - display->box.pos = Vec(341,60); - display->box.size = Vec(40, 30); - display->value = &module->numSteps; - addChild(display); - //LCD CURRENT STEP SCREEN - StepsDisplayWidget *display2 = new StepsDisplayWidget(); - display2->box.pos = Vec(401,60); - display2->box.size = Vec(40, 30); - display2->value = &module->stepIndex; - addChild(display2); - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - // - static const float portX[16] = {20,60,100,140,180,220,260,300,340,380,420,460,500,540,580,620}; - static const float elements_offst = 8; - static const float main_lds_y = 64.4; - //CLOCK KNOB - addParam(ParamWidget::create(Vec(portX[1]-elements_offst, 56), module, SEQ16::CLOCK_PARAM, -2.0f, 6.0f, 2.0f)); - //RUN RESET SWITCHES & LEDS - addParam(ParamWidget::create(Vec(portX[2], main_lds_y), module, SEQ16::RUN_PARAM , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(portX[2]+2.2, main_lds_y+2), module, SEQ16::RUNNING_LIGHT)); - addParam(ParamWidget::create(Vec(portX[3], main_lds_y), module, SEQ16::RESET_PARAM , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(portX[3]+2.2, main_lds_y+2), module, SEQ16::RESET_LIGHT)); - //STEP TRIGGER - addParam(ParamWidget::create(Vec(portX[11], main_lds_y+35), module, SEQ16::TRIGGER_PARAM , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(portX[11]+2.2, main_lds_y+2+35), module, SEQ16::TRIGGER_LIGHT)); - addParam(ParamWidget::create(Vec(portX[9]+20, main_lds_y+40), module, SEQ16::PREV_STEP, 0.0f, 1.0f, 0.0f)); - addParam(ParamWidget::create(Vec(portX[10]+5, main_lds_y+40), module, SEQ16::NEXT_STEP, 0.0f, 1.0f, 0.0f)); - //GATE MODE SWITCH - addParam(ParamWidget::create(Vec(portX[6]+2, main_lds_y-4), module, SEQ16::GATE_MODE_PARAM, 0.0f, 2.0f, 0.0f)); - //STEPS KNOBS - addParam(ParamWidget::create(Vec(portX[7]-elements_offst, 56), module, SEQ16::STEPS_PARAM, 1.0f, 16.0f, 16.0f)); - static const float main_inputs_offst = 1; - static const float main_inputs_y = 98; - //SEQ VC INPUTS - addInput(Port::create(Vec(portX[1]- main_inputs_offst, main_inputs_y), Port::INPUT, module, SEQ16::CLOCK_INPUT)); - addInput(Port::create(Vec(portX[2]-main_inputs_offst, main_inputs_y), Port::INPUT, module, SEQ16::EXT_CLOCK_INPUT)); - addInput(Port::create(Vec(portX[3]-main_inputs_offst, main_inputs_y), Port::INPUT, module, SEQ16::RESET_INPUT)); - addInput(Port::create(Vec(portX[7]-main_inputs_offst, main_inputs_y), Port::INPUT, module, SEQ16::STEPS_INPUT)); - //GATE/ROW LEDS - addChild(ModuleLightWidget::create>(Vec(portX[12]+elements_offst, main_lds_y+6), module, SEQ16::GATES_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(portX[13]+elements_offst, main_lds_y+6), module, SEQ16::ROW_LIGHTS)); - addChild(ModuleLightWidget::create>(Vec(portX[14]+elements_offst, main_lds_y+6), module, SEQ16::ROW_LIGHTS + 1)); - addChild(ModuleLightWidget::create>(Vec(portX[15]+elements_offst, main_lds_y+6), module, SEQ16::ROW_LIGHTS + 2)); - //GATE/ROW OUTPUTS - addOutput(Port::create(Vec(portX[12], 98), Port::OUTPUT, module, SEQ16::GATES_OUTPUT)); - addOutput(Port::create(Vec(portX[13], 98), Port::OUTPUT, module, SEQ16::ROW1_OUTPUT)); - addOutput(Port::create(Vec(portX[14], 98), Port::OUTPUT, module, SEQ16::ROW2_OUTPUT)); - addOutput(Port::create(Vec(portX[15], 98), Port::OUTPUT, module, SEQ16::ROW3_OUTPUT)); - - for (int i = 0; i < 16; i++) { - //ROW KNOBS - addParam(ParamWidget::create(Vec(portX[i]-elements_offst, 157), module, SEQ16::ROW1_PARAM + i, 0.0f, 10.0f, 0.0f)); - addParam(ParamWidget::create(Vec(portX[i]-elements_offst, 198), module, SEQ16::ROW2_PARAM + i, 0.0f, 10.0f, 0.0f)); - addParam(ParamWidget::create(Vec(portX[i]-elements_offst, 240), module, SEQ16::ROW3_PARAM + i, 0.0f, 10.0f, 0.0f)); - //GATE LEDS - addParam(ParamWidget::create(Vec(portX[i]+1.5, 284), module, SEQ16::GATE_PARAM + i, 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(portX[i]+5.8, 287.9), module, SEQ16::GATE_LIGHTS + i)); - //GATE STEPS OUT - addOutput(Port::create(Vec(portX[i]-2, 310), Port::OUTPUT, module, SEQ16::GATE_OUTPUT + i)); - } -} - -struct SEQ16GateModeItem : MenuItem { - SEQ16 *seq16; - SEQ16::GateMode gateMode; - void onAction(EventAction &e) override { - seq16->gateMode = gateMode; - } - void step() override { - rightText = CHECKMARK(seq16->gateMode == gateMode); - } -}; - -Menu *SEQ16Widget::createContextMenu() { - Menu *menu = ModuleWidget::createContextMenu(); - - MenuLabel *spacerLabel = new MenuLabel(); - menu->addChild(spacerLabel); - - SEQ16 *seq16 = dynamic_cast(module); - assert(seq16); - - MenuLabel *modeLabel = new MenuLabel(); - modeLabel->text = "Gate Mode"; - menu->addChild(modeLabel); - - SEQ16GateModeItem *triggerItem = new SEQ16GateModeItem(); - triggerItem->text = "Trigger"; - triggerItem->seq16 = seq16; - triggerItem->gateMode = SEQ16::TRIGGER; - menu->addChild(triggerItem); - - SEQ16GateModeItem *retriggerItem = new SEQ16GateModeItem(); - retriggerItem->text = "Retrigger"; - retriggerItem->seq16 = seq16; - retriggerItem->gateMode = SEQ16::RETRIGGER; - menu->addChild(retriggerItem); - - SEQ16GateModeItem *continuousItem = new SEQ16GateModeItem(); - continuousItem->text = "Continuous"; - continuousItem->seq16 = seq16; - continuousItem->gateMode = SEQ16::CONTINUOUS; - menu->addChild(continuousItem); - - return menu; -} - -Model *modelSEQ16 = Model::create("AS", "SEQ16", "16-Step Sequencer", SEQUENCER_TAG); \ No newline at end of file diff --git a/repos/AS/src/SawOSC.cpp b/repos/AS/src/SawOSC.cpp deleted file mode 100644 index 9007d1b0..00000000 --- a/repos/AS/src/SawOSC.cpp +++ /dev/null @@ -1,110 +0,0 @@ -//************************************************************************************** -//SawOsc module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from RODENTCAT https://github.com/RODENTCAT/RODENTMODULES -//Code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** -#include "AS.hpp" - -struct SawOsc : Module { - enum ParamIds { - PITCH_PARAM, - PW_PARAM, - NUM_PARAMS - }; - enum InputIds { - PITCH_INPUT, - PW_INPUT, - NUM_INPUTS - }; - enum OutputIds { - OSC_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - FREQ_LIGHT, - NUM_LIGHTS - }; - - float phase = 0.0f; - float blinkPhase = 0.0f; - - SawOsc() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; -}; - -void SawOsc::step() { - // Implement a simple sine oscillator - float deltaTime = 1.0f / engineGetSampleRate(); - // Compute the frequency from the pitch parameter and input - float pitch = params[PITCH_PARAM].value; - pitch += inputs[PITCH_INPUT].value; - pitch = clamp(pitch, -4.0f, 4.0f); - float freq = 440.0f * powf(2.0f, pitch); - - // Accumulate the phase - phase += freq * deltaTime; - if (phase >= 1.0f) - phase -= 1.0f; - - //Mod param - float pw = params[PW_PARAM].value*0.1f+1.0f; - //Mod input - float minput = inputs[PW_INPUT].value*0.3f; - //Mod param+input - float pinput = (pw + minput); - - // Compute the sine output - //float sine = sinf(2 * M_PI * phase); - //outputs[SINE_OUTPUT].value = 5.0 * sine; - - //saw stuff, original dev says square, but it sounds more like a SAW wave, hence this module name hehe - float saw = cos(exp(pinput * M_PI * phase));///0.87; - //dc block - - float block_coeff = 1.0f - (2.0f * M_PI * (10.0f / 44100.0f)); - float m_prev_in = 0.0f; - float m_prev_out = 0.0f; - m_prev_out = saw - m_prev_in + block_coeff * m_prev_out; - m_prev_in = saw; - - //outputs[OSC_OUTPUT].value = 5 * saw; - outputs[OSC_OUTPUT].value = m_prev_out*5; - lights[FREQ_LIGHT].value = (outputs[OSC_OUTPUT].value > 0.0f) ? 1.0f : 0.0f; -} - -struct SawOscWidget : ModuleWidget -{ - SawOscWidget(SawOsc *module); -}; - - -SawOscWidget::SawOscWidget(SawOsc *module) : ModuleWidget(module) { - box.size = Vec(4 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/SawOSC.svg"))); - addChild(panel); - } - //SCREWS - SPECIAL SPACING FOR RACK WIDTH*4 - addChild(Widget::create(Vec(0, 0))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //LIGHT - addChild(ModuleLightWidget::create>(Vec(22-15, 57), module, SawOsc::FREQ_LIGHT)); - //PARAMS - //addParam(ParamWidget::create(Vec(26, 60), module, SawOsc::PITCH_PARAM, -3.0, 3.0, 0.0)); - addParam(ParamWidget::create(Vec(26-15, 60), module, SawOsc::PITCH_PARAM, -4.0, 4.0, 0.0)); - //addParam(ParamWidget::create(Vec(26, 125), module, SawOsc::PW_PARAM, -4.0, 5.0, -4.0)); - addParam(ParamWidget::create(Vec(26-15, 125), module, SawOsc::PW_PARAM, -4.2, 5.0, -4.2)); - //INPUTS - addInput(Port::create(Vec(33-15, 200), Port::INPUT, module, SawOsc::PW_INPUT)); - addInput(Port::create(Vec(33-15, 260), Port::INPUT, module, SawOsc::PITCH_INPUT)); - //OUTPUTS - addOutput(Port::create(Vec(33-15, 310), Port::OUTPUT, module, SawOsc::OSC_OUTPUT)); -} - -Model *modelSawOsc = Model::create("AS", "SawOSC", "TinySawish", OSCILLATOR_TAG); \ No newline at end of file diff --git a/repos/AS/src/SignalDelay.cpp b/repos/AS/src/SignalDelay.cpp deleted file mode 100644 index 5157e64a..00000000 --- a/repos/AS/src/SignalDelay.cpp +++ /dev/null @@ -1,248 +0,0 @@ -//************************************************************************************** -//Signal Delay module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** -#include "AS.hpp" -#include "dsp/samplerate.hpp" -#include "dsp/ringbuffer.hpp" - -#include -#include - -#define HISTORY_SIZE (1<<21) - -struct SignalDelay : Module { - enum ParamIds { - TIME_1_PARAM, - TIME_2_PARAM, - NUM_PARAMS - }; - enum InputIds { - TIME_1_INPUT, - TIME_2_INPUT, - IN_1_INPUT, - IN_2_INPUT, - NUM_INPUTS - }; - enum OutputIds { - THRU_1_OUTPUT, - THRU_2_OUTPUT, - OUT_1_OUTPUT, - OUT_2_OUTPUT, - NUM_OUTPUTS - }; - - - DoubleRingBuffer historyBuffer1; - DoubleRingBuffer outBuffer1; - SampleRateConverter<1> src1; - float lastWet1 = 0.0f; - - int lcd_tempo1 = 0; - - DoubleRingBuffer historyBuffer2; - DoubleRingBuffer outBuffer2; - SampleRateConverter<1> src2; - float lastWet2 = 0.0f; - - int lcd_tempo2 = 0; - - SignalDelay() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) {} - - void step() override; - -}; - -void SignalDelay::step() { - - // DELAY 1 Get input to delay block - float in1 = inputs[IN_1_INPUT].value; - float feedback1 = 0;//only one repetition, for regular use: clampf(params[FEEDBACK_PARAM].value + inputs[FEEDBACK_INPUT].value / 10.0, 0.0, 1.0); - float dry1 = in1 + lastWet1 * feedback1; - // Compute delay time in seconds - //delay time in seconds. Linear reading, now easy to setup any value by the digit - float delay1 = clamp(params[TIME_1_PARAM].value + inputs[TIME_1_INPUT].value, 0.001f, 10.0f); - //LCD display tempo - show value as ms - lcd_tempo1 = std::round(delay1*1000); - // Number of delay samples - float index1 = delay1 * engineGetSampleRate(); - // Push dry1 sample into history buffer - if (!historyBuffer1.full()) { - historyBuffer1.push(dry1); - } - // How many samples do we need consume1 to catch up? - float consume1 = index1 - historyBuffer1.size(); - if (outBuffer1.empty()) { - double ratio1 = 1.0; - if (consume1 <= -16) - ratio1 = 0.5; - else if (consume1 >= 16) - ratio1 = 2.0; - - int inFrames1 = min(historyBuffer1.size(), 16); - int outFrames1 = outBuffer1.capacity(); - src1.setRates(ratio1 * engineGetSampleRate(), engineGetSampleRate()); - src1.process((const Frame<1>*)historyBuffer1.startData(), &inFrames1, (Frame<1>*)outBuffer1.endData(), &outFrames1); - historyBuffer1.startIncr(inFrames1); - outBuffer1.endIncr(outFrames1); - } - - float wet1 = 0.0f; - if (!outBuffer1.empty()) { - wet1 = outBuffer1.shift(); - } - outputs[THRU_1_OUTPUT].value = in1; - outputs[OUT_1_OUTPUT].value = wet1; - lastWet1 = wet1; - - // DELAY 2 Get input to delay block - float in2 = inputs[IN_2_INPUT].value; - float feedback2 = 0;//only one repetition, for regular use: clamp(params[FEEDBACK_PARAM].value + inputs[FEEDBACK_INPUT].value / 10.0, 0.0, 1.0); - float dry2 = in2 + lastWet2 * feedback2; - // Compute delay time in seconds - //delay time in seconds. Linear reading, now easy to setup any value by the digit - float delay2 = clamp(params[TIME_2_PARAM].value + inputs[TIME_2_INPUT].value, 0.001f, 10.0f); - //LCD display tempo - show value as ms - lcd_tempo2 = std::round(delay2*1000); - // Number of delay samples - float index2 = delay2 * engineGetSampleRate(); - // Push dry sample into history buffer - if (!historyBuffer2.full()) { - historyBuffer2.push(dry2); - } - // How many samples do we need consume1 to catch up? - float consume2 = index2 - historyBuffer2.size(); - if (outBuffer2.empty()) { - double ratio2 = 1.0; - if (consume2 <= -16) - ratio2 = 0.5; - else if (consume2 >= 16) - ratio2 = 2.0; - - int inFrames2 = min(historyBuffer2.size(), 16); - int outFrames2 = outBuffer2.capacity(); - src2.setRates(ratio2 * engineGetSampleRate(), engineGetSampleRate()); - src2.process((const Frame<1>*)historyBuffer2.startData(), &inFrames2, (Frame<1>*)outBuffer2.endData(), &outFrames2); - historyBuffer2.startIncr(inFrames2); - outBuffer2.endIncr(outFrames2); - } - - float wet2 = 0.0; - if (!outBuffer2.empty()) { - wet2 = outBuffer2.shift(); - } - outputs[THRU_2_OUTPUT].value = in2; - outputs[OUT_2_OUTPUT].value = wet2; - lastWet2 = wet2; - - - -} - -/////////////////////////////////// -struct MsDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - MsDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::right << std::setw(5) << *value; - - Vec textPos = Vec(4.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~~~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\\\\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// - -struct SignalDelayWidget : ModuleWidget -{ - SignalDelayWidget(SignalDelay *module); -}; - - -SignalDelayWidget::SignalDelayWidget(SignalDelay *module) : ModuleWidget(module) { - box.size = Vec(RACK_GRID_WIDTH*6, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/SignalDelay.svg"))); - addChild(panel); - } - //DELAY 1 - //MS DISPLAY - MsDisplayWidget *display1 = new MsDisplayWidget(); - display1->box.pos = Vec(10,50); - display1->box.size = Vec(70, 20); - display1->value = &module->lcd_tempo1; - addChild(display1); - static const float posX[3] = {3,33,63}; - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //KNOBS - addParam(ParamWidget::create(Vec(47, 80), module, SignalDelay::TIME_1_PARAM, 0.001f, 10.0f, 0.350f)); - //CV INPUT - addInput(Port::create(Vec(posX[0]+5, 87), Port::INPUT, module, SignalDelay::TIME_1_INPUT)); - //INPUT - addInput(Port::create(Vec(posX[0], 160), Port::INPUT, module, SignalDelay::IN_1_INPUT)); - //OUTPUTS - addOutput(Port::create(Vec(posX[1], 160), Port::OUTPUT, module, SignalDelay::THRU_1_OUTPUT)); - addOutput(Port::create(Vec(posX[2], 160), Port::OUTPUT, module, SignalDelay::OUT_1_OUTPUT)); - - //DELAY 2 - //MS DISPLAY - static const int mod_offset=160; - MsDisplayWidget *display2 = new MsDisplayWidget(); - display2->box.pos = Vec(10,50+mod_offset); - display2->box.size = Vec(70, 20); - display2->value = &module->lcd_tempo2; - addChild(display2); - //KNOBS - addParam(ParamWidget::create(Vec(47, 80+mod_offset), module, SignalDelay::TIME_2_PARAM, 0.001f, 10.0f, 0.350f)); - //CV INPUT - addInput(Port::create(Vec(posX[0]+5, 87+mod_offset), Port::INPUT, module, SignalDelay::TIME_2_INPUT)); - //INPUT - addInput(Port::create(Vec(posX[0], 160+mod_offset), Port::INPUT, module, SignalDelay::IN_2_INPUT)); - //OUTPUTS - addOutput(Port::create(Vec(posX[1], 160+mod_offset), Port::OUTPUT, module, SignalDelay::THRU_2_OUTPUT)); - addOutput(Port::create(Vec(posX[2], 160+mod_offset), Port::OUTPUT, module, SignalDelay::OUT_2_OUTPUT)); -} - -Model *modelSignalDelay = Model::create("AS", "SignalDelay", "Signal Delay", UTILITY_TAG, DELAY_TAG); \ No newline at end of file diff --git a/repos/AS/src/SineOSC.cpp b/repos/AS/src/SineOSC.cpp deleted file mode 100644 index f733db38..00000000 --- a/repos/AS/src/SineOSC.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//************************************************************************************** -//SineOSC module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -//Is just the tutorial module and nothing else hehe -// -//Code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** -#include "AS.hpp" - -struct SineOsc : Module { - enum ParamIds { - FREQ_PARAM, - NUM_PARAMS - }; - enum InputIds { - FREQ_CV, - NUM_INPUTS - }; - enum OutputIds { - OSC_OUTPUT, - TRI_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - FREQ_LIGHT, - NUM_LIGHTS - }; - - float phase = 0.0f; - float blinkPhase = 0.0f; - - SineOsc() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; -}; - - -void SineOsc::step() { - // Implement a simple sine oscillator - // Compute the frequency from the pitch parameter and input - float pitch = params[FREQ_PARAM].value; - pitch += inputs[FREQ_CV].value; - pitch = clamp(pitch, -4.0f, 4.0f); - float freq = 440.0f * powf(2.0f, pitch); - // Accumulate the phase - phase += freq / engineGetSampleRate(); - if (phase >= 1.0f) - phase -= 1.0f; - // Compute the sine output - //correct sine - float sine = sinf(2.0f * M_PI * (phase+1 * 0.125f)) * 5.0f; - //original sine - //float sine = sinf(2 * M_PI * phase)+ sinf(2 * M_PI * phase * 2)*5; - //mod,like this it gives a unipolar saw-ish wave - //float sine = sinf(2.0 * M_PI * (phase * 0.125)) * 5.0; - outputs[OSC_OUTPUT].value = sine; - lights[FREQ_LIGHT].value = (outputs[OSC_OUTPUT].value > 0.0f) ? 1.0f : 0.0f; - -} - -struct SineOscWidget : ModuleWidget -{ - SineOscWidget(SineOsc *module); -}; - - -SineOscWidget::SineOscWidget(SineOsc *module) : ModuleWidget(module) { - box.size = Vec(4 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/SineOSC.svg"))); - addChild(panel); - } - //SCREWS - SPECIAL SPACING FOR RACK WIDTH*4 - addChild(Widget::create(Vec(0, 0))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //LIGHT - addChild(ModuleLightWidget::create>(Vec(22-15, 57), module, SineOsc::FREQ_LIGHT)); - //PARAMS - addParam(ParamWidget::create(Vec(26-15, 60), module, SineOsc::FREQ_PARAM, -3.0f, 3.0f, 0.0f)); - //INPUTS - addInput(Port::create(Vec(33-15, 260), Port::INPUT, module, SineOsc::FREQ_CV)); - //OUTPUTS - addOutput(Port::create(Vec(33-15, 310), Port::OUTPUT, module, SineOsc::OSC_OUTPUT)); - -} - -Model *modelSineOsc = Model::create("AS", "SineOSC", "TinySine", OSCILLATOR_TAG); \ No newline at end of file diff --git a/repos/AS/src/Steps.cpp b/repos/AS/src/Steps.cpp deleted file mode 100644 index ac9a21e1..00000000 --- a/repos/AS/src/Steps.cpp +++ /dev/null @@ -1,323 +0,0 @@ -//************************************************************************************** -//Steps module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from Dual Counter - VCV Module, Strum 2017 -//************************************************************************************** - -#include "AS.hpp" - -#include "dsp/digital.hpp" - -#include -#include - -struct Steps : Module { - enum ParamIds { - RST_BUTTON1, - COUNT_NUM_PARAM_1, - RST_BUTTON2, - COUNT_NUM_PARAM_2, - RST_BUTTON3, - COUNT_NUM_PARAM_3, - NUM_PARAMS - }; - enum InputIds { - CLK_IN_1, - RESET_IN_1, - CLK_IN_2, - RESET_IN_2, - CLK_IN_3, - RESET_IN_3, - NUM_INPUTS - }; - enum OutputIds { - OUTPUT_1, - OUTPUT_2, - OUTPUT_3, - NUM_OUTPUTS - }; - enum LightIds { - RESET_LIGHT1, - RESET_LIGHT2, - RESET_LIGHT3, - NUM_LIGHTS - }; - - SchmittTrigger clock_trigger_1; - SchmittTrigger reset_trigger_1; - SchmittTrigger reset_ext_trigger_1; - int count_limit1 = 1; - int count1 = 0; - SchmittTrigger clock_trigger_2; - SchmittTrigger reset_trigger_2; - SchmittTrigger reset_ext_trigger_2; - int count_limit_2 = 1; - int count_2 = 0; - SchmittTrigger clock_trigger_3; - SchmittTrigger reset_trigger_3; - SchmittTrigger reset_ext_trigger_3; - int count_limit_3 = 1; - int count_3 = 0; - const float lightLambda = 0.075f; - float resetLight1 = 0.0f; - float resetLight2 = 0.0f; - float resetLight3 = 0.0f; - - PulseGenerator clockPulse1; - bool pulse1 = false; - PulseGenerator clockPulse2; - bool pulse2 = false; - PulseGenerator clockPulse3; - bool pulse3 = false; - - Steps() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - - } - - void step() override; -}; - - -void Steps::step(){ - - count_limit1 = round(params[COUNT_NUM_PARAM_1].value); - count_limit_2 = round(params[COUNT_NUM_PARAM_2].value); - count_limit_3 = round(params[COUNT_NUM_PARAM_3].value); - - bool reset1 = false; - bool reset_2 = false; - bool reset_3 = false; - pulse1 = false; - - if (reset_trigger_1.process(params[RST_BUTTON1].value)){ - reset1 = true; - count1 = 0; - outputs[OUTPUT_1].value = 0; - resetLight1 = 1.0f; - - } - if (reset_ext_trigger_1.process(inputs[RESET_IN_1].value)){ - reset1 = true; - count1 = 0; - outputs[OUTPUT_1].value = 0; - resetLight1 = 1.0f; - - } - - resetLight1 -= resetLight1 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT1].value = resetLight1; - - if (reset1 == false){ - if (clock_trigger_1.process(inputs[CLK_IN_1].value) && count1 <= count_limit1) - count1++; - } - if (count1 == count_limit1){ - clockPulse1.trigger(1e-3); - } - if (count1 > count_limit1){ - count1 = 0; - } - pulse1 = clockPulse1.process(1.0 / engineGetSampleRate()); - outputs[OUTPUT_1].value = pulse1 ? 10.0f : 0.0f; - - ///////////// counter 2 - if (reset_trigger_2.process(params[RST_BUTTON2].value)){ - reset_2 = true; - count_2 = 0; - outputs[OUTPUT_2].value = 0; - resetLight2 = 1.0f; - } - if (reset_ext_trigger_2.process(inputs[RESET_IN_2].value)){ - reset_2 = true; - count_2 = 0; - outputs[OUTPUT_2].value = 0; - resetLight2 = 1.0f; - } - resetLight2 -= resetLight2 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT2].value = resetLight2; - - if (reset_2 == false){ - if (clock_trigger_2.process(inputs[CLK_IN_2].value) && count_2 <= count_limit_2) - count_2++; - } - if (count_2 == count_limit_2){ - clockPulse2.trigger(1e-3); - } - if (count_2 > count_limit_2){ - count_2 = 0; - } - pulse2 = clockPulse2.process(1.0 / engineGetSampleRate()); - outputs[OUTPUT_2].value = pulse2 ? 10.0f : 0.0f; - ///////////// counter 3 - if (reset_trigger_3.process(params[RST_BUTTON3].value)){ - reset_3 = true; - count_3 = 0; - outputs[OUTPUT_3].value = 0; - resetLight3 = 1.0f; - } - if (reset_ext_trigger_3.process(inputs[RESET_IN_3].value)){ - reset_3 = true; - count_3 = 0; - outputs[OUTPUT_3].value = 0; - resetLight3 = 1.0f; - } - resetLight3 -= resetLight3 / lightLambda / engineGetSampleRate(); - lights[RESET_LIGHT3].value = resetLight3; - - if (reset_3 == false){ - if (clock_trigger_3.process(inputs[CLK_IN_3].value) && count_3 <= count_limit_3) - count_3++; - } - if (count_3 == count_limit_3){ - clockPulse3.trigger(1e-3); - } - if (count_3 > count_limit_3){ - count_3 = 0; - } - pulse3 = clockPulse3.process(1.0 / engineGetSampleRate()); - outputs[OUTPUT_3].value = pulse3 ? 10.0f : 0.0f; -} - -/////////////////////////////////// -struct NumberDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - NumberDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - std::stringstream to_display; - to_display << std::right << std::setw(2) << *value; - - Vec textPos = Vec(4.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// - -struct StepsWidget : ModuleWidget -{ - StepsWidget(Steps *module); -}; - - -StepsWidget::StepsWidget(Steps *module) : ModuleWidget(module) { - //box.size = Vec(15*4, 380); - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin,"res/Steps.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - // counter 1 - //COUNT DISPLAY - NumberDisplayWidget *display1 = new NumberDisplayWidget(); - display1->box.pos = Vec(10,50); - display1->box.size = Vec(30, 20); - display1->value = &module->count1; - addChild(display1); - //STEPS DISPLAY - NumberDisplayWidget *display2 = new NumberDisplayWidget(); - display2->box.pos = Vec(50,50); - display2->box.size = Vec(30, 20); - display2->value = &module->count_limit1; - addChild(display2); - - int group_offset = 100; - - addParam(ParamWidget::create(Vec(5, 82), module, Steps::RST_BUTTON1 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(5+2.2, 82+2.3), module, Steps::RESET_LIGHT1)); - - addParam(ParamWidget::create(Vec(43, 73), module, Steps::COUNT_NUM_PARAM_1, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(3, 120), Port::INPUT, module, Steps::RESET_IN_1)); - addInput(Port::create(Vec(33, 120), Port::INPUT, module, Steps::CLK_IN_1)); - addOutput(Port::create(Vec(63, 120), Port::OUTPUT, module, Steps::OUTPUT_1)); - - // counter 2 - //COUNT DISPLAY - NumberDisplayWidget *display3 = new NumberDisplayWidget(); - display3->box.pos = Vec(10,50 + group_offset); - display3->box.size = Vec(30, 20); - display3->value = &module->count_2; - addChild(display3); - //STEPS DISPLAY - NumberDisplayWidget *display4 = new NumberDisplayWidget(); - display4->box.pos = Vec(50,50 + group_offset); - display4->box.size = Vec(30, 20); - display4->value = &module->count_limit_2; - addChild(display4); - - addParam(ParamWidget::create(Vec(5, 82+ group_offset), module, Steps::RST_BUTTON2 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(5+2.2, 82+2.3+ group_offset), module, Steps::RESET_LIGHT2)); - - addParam(ParamWidget::create(Vec(43, 73 + group_offset), module, Steps::COUNT_NUM_PARAM_2, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(3, 120 + group_offset), Port::INPUT, module, Steps::RESET_IN_2)); - addInput(Port::create(Vec(33, 120 + group_offset), Port::INPUT, module, Steps::CLK_IN_2)); - addOutput(Port::create(Vec(63, 120 + group_offset), Port::OUTPUT, module, Steps::OUTPUT_2)); - - // counter 3 - //COUNT DISPLAY - NumberDisplayWidget *display5 = new NumberDisplayWidget(); - display5->box.pos = Vec(10,50 + group_offset*2); - display5->box.size = Vec(30, 20); - display5->value = &module->count_3; - addChild(display5); - //STEPS DISPLAY - NumberDisplayWidget *display6 = new NumberDisplayWidget(); - display6->box.pos = Vec(50,50 + group_offset*2); - display6->box.size = Vec(30, 20); - display6->value = &module->count_limit_3; - addChild(display6); - - addParam(ParamWidget::create(Vec(5, 82+ group_offset*2), module, Steps::RST_BUTTON3 , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(5+2.2, 82+2.3+ group_offset*2), module, Steps::RESET_LIGHT3)); - - addParam(ParamWidget::create(Vec(43, 73 + group_offset*2), module, Steps::COUNT_NUM_PARAM_3, 1.0f, 64.0f, 1.0f)); - - addInput(Port::create(Vec(3, 120 + group_offset*2), Port::INPUT, module, Steps::RESET_IN_3)); - addInput(Port::create(Vec(33, 120 + group_offset*2), Port::INPUT, module, Steps::CLK_IN_3)); - addOutput(Port::create(Vec(63, 120 + group_offset*2), Port::OUTPUT, module, Steps::OUTPUT_3)); -} - -Model *modelSteps = Model::create("AS", "Steps", "Steps", SWITCH_TAG, SEQUENCER_TAG, UTILITY_TAG); \ No newline at end of file diff --git a/repos/AS/src/SuperDrive.cpp b/repos/AS/src/SuperDrive.cpp deleted file mode 100644 index d0cbe869..00000000 --- a/repos/AS/src/SuperDrive.cpp +++ /dev/null @@ -1,173 +0,0 @@ -//*********************************************************************************************** -// -//SuperDriveFx module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -//Variable-hardness clipping code from scoofy[ AT ]inf[ DOT ]elte[ DOT ]hu -//Filter code from from VCV rack dsp -// -//*********************************************************************************************** - -#include "AS.hpp" -#include "dsp/digital.hpp" -#include "dsp/filter.hpp" - -//#include - -struct SuperDriveFx : Module{ - enum ParamIds { - DRIVE_PARAM, - OUTPUT_GAIN_PARAM, - TONE_PARAM, - BYPASS_SWITCH, - NUM_PARAMS - }; - enum InputIds { - SIGNAL_INPUT, - DRIVE_CV_INPUT, - GAIN_CV_INPUT, - TONE_CV_INPUT, - NUM_INPUTS - }; - enum OutputIds { - SIGNAL_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - GAIN_LIGHT, - TONE_LIGHT, - DRIVE_LIGHT, - BYPASS_LED, - NUM_LIGHTS - }; - - SchmittTrigger bypass_button_trig; - int drive_scale=50;//to handle cv parameters properly - - RCFilter lowpassFilter; - RCFilter highpassFilter; - - bool fx_bypass = false; - SuperDriveFx() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - - void step() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *statesJ = json_array(); - - json_t *bypassJ = json_boolean(fx_bypass); - json_array_append_new(statesJ, bypassJ); - - json_object_set_new(rootJm, "as_FxBypass", statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *statesJ = json_object_get(rootJm, "as_FxBypass"); - - json_t *bypassJ = json_array_get(statesJ, 0); - - fx_bypass = !!json_boolean_value(bypassJ); - - } - - float input_signal=0.0f; - float drive = 0.1f; - float process= 0.0f; - float inv_atan_drive = 0.0f; - float output_signal= 0.0f; - -}; - -void SuperDriveFx::step() { - - if (bypass_button_trig.process(params[BYPASS_SWITCH].value)) - { - fx_bypass = !fx_bypass; - } - lights[BYPASS_LED].value = fx_bypass ? 1.0f : 0.0f; - - float input_signal = inputs[SIGNAL_INPUT].value; - //OVERDRIVE SIGNAL - //float drive = params[DRIVE_PARAM].value; - drive = clamp(params[DRIVE_PARAM].value + inputs[DRIVE_CV_INPUT].value / 10.0f, 0.1f, 1.0f); - - drive = drive * drive_scale; - //precalc - inv_atan_drive = 1.0f/atan(drive); - //process - process = inv_atan_drive * atan(input_signal*drive); - //output_signal = process * params[OUTPUT_GAIN_PARAM].value; - output_signal = process * clamp(params[OUTPUT_GAIN_PARAM].value + inputs[GAIN_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - - //TONE CONTROL - float tone = clamp(params[TONE_PARAM].value + inputs[TONE_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - float lowpassFreq = 10000.0f * powf(10.0f, clamp(2.0f*tone, 0.0f, 1.0f)); - lowpassFilter.setCutoff(lowpassFreq / engineGetSampleRate()); - lowpassFilter.process(output_signal); - output_signal = lowpassFilter.lowpass(); - float highpassFreq = 10.0f * powf(100.0f, clamp(2.0f*tone - 1.0f, 0.0f, 1.0f)); - highpassFilter.setCutoff(highpassFreq / engineGetSampleRate()); - highpassFilter.process(output_signal); - output_signal = highpassFilter.highpass(); - - //check bypass switch status - if (fx_bypass){ - outputs[SIGNAL_OUTPUT].value = inputs[SIGNAL_INPUT].value; - }else { - outputs[SIGNAL_OUTPUT].value = output_signal*3.5f;// 3.5; - } - //lights without cv input - old - //lights[DRIVE_LIGHT].value = params[DRIVE_PARAM].value; - //lights[GAIN_LIGHT].value = params[OUTPUT_GAIN_PARAM].value; - - lights[DRIVE_LIGHT].value = clamp(params[DRIVE_PARAM].value + inputs[DRIVE_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - lights[TONE_LIGHT].value = clamp(params[TONE_PARAM].value + inputs[TONE_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - lights[GAIN_LIGHT].value = clamp(params[OUTPUT_GAIN_PARAM].value + inputs[GAIN_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - -} - -struct SuperDriveFxWidget : ModuleWidget -{ - SuperDriveFxWidget(SuperDriveFx *module); -}; - - -SuperDriveFxWidget::SuperDriveFxWidget(SuperDriveFx *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/SuperDrive.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //KNOBS - addParam(ParamWidget::create(Vec(43, 60), module, SuperDriveFx::DRIVE_PARAM, 0.1f, 1.0f, 0.1f)); - addParam(ParamWidget::create(Vec(43, 125), module, SuperDriveFx::TONE_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(43, 190), module, SuperDriveFx::OUTPUT_GAIN_PARAM, 0.0f, 1.0f, 0.5f)); - //LIGHTS - addChild(ModuleLightWidget::create>(Vec(39, 57), module, SuperDriveFx::DRIVE_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 122), module, SuperDriveFx::TONE_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 187), module, SuperDriveFx::GAIN_LIGHT)); - //BYPASS SWITCH - addParam(ParamWidget::create(Vec(33, 260), module, SuperDriveFx::BYPASS_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(35.2, 262), module, SuperDriveFx::BYPASS_LED)); - //INS/OUTS - addInput(Port::create(Vec(10, 310), Port::INPUT, module, SuperDriveFx::SIGNAL_INPUT)); - addOutput(Port::create(Vec(55, 310), Port::OUTPUT, module, SuperDriveFx::SIGNAL_OUTPUT)); - //CV INPUTS - addInput(Port::create(Vec(10, 67), Port::INPUT, module, SuperDriveFx::DRIVE_CV_INPUT)); - addInput(Port::create(Vec(10, 132), Port::INPUT, module, SuperDriveFx::TONE_CV_INPUT)); - addInput(Port::create(Vec(10, 197), Port::INPUT, module, SuperDriveFx::GAIN_CV_INPUT)); - -} - -Model *modelSuperDriveFx = Model::create("AS", "SuperDriveFx", "Super Drive FX", AMPLIFIER_TAG, EFFECT_TAG); \ No newline at end of file diff --git a/repos/AS/src/Tremolo.cpp b/repos/AS/src/Tremolo.cpp deleted file mode 100644 index 04fdb08c..00000000 --- a/repos/AS/src/Tremolo.cpp +++ /dev/null @@ -1,228 +0,0 @@ -//*********************************************************************************************** -// -//TremoloFx module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//LFO code adapted from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//*********************************************************************************************** - -#include "AS.hpp" -#include "dsp/digital.hpp" - -//LFO CODE ***************************** -struct LowFrequencyOscillator { - float phase = 0.0f; - float pw = 0.5f; - float freq = 1.0f; - bool offset = false; - bool invert = false; - SchmittTrigger resetTrigger; - LowFrequencyOscillator() { - - } - void setPitch(float pitch) { - pitch = fminf(pitch, 8.0f); - freq = powf(2.0f, pitch); - } - void setPulseWidth(float pw_) { - const float pwMin = 0.01f; - pw = clamp(pw_, pwMin, 1.0f - pwMin); - } - void setReset(float reset) { - if (resetTrigger.process(reset)) { - phase = 0.0f; - } - } - void step(float dt) { - float deltaPhase = fminf(freq * dt, 0.5f); - phase += deltaPhase; - if (phase >= 1.0f) - phase -= 1.0f; - } - float sin() { - if (offset) - return 1.0f - cosf(2*M_PI * phase) * (invert ? -1.0f : 1.0f); - else - return sinf(2.0f*M_PI * phase) * (invert ? -1.0f : 1.0f); - } - float tri(float x) { - return 4.0f * fabsf(x - roundf(x)); - } - float tri() { - if (offset) - return tri(invert ? phase - 0.5 : phase); - else - return -1.0f + tri(invert ? phase - 0.25f : phase - 0.75f); - } - /* - float saw(float x) { - return 2.0 * (x - roundf(x)); - } - float saw() { - if (offset) - return invert ? 2.0 * (1.0 - phase) : 2.0 * phase; - else - return saw(phase) * (invert ? -1.0 : 1.0); - } - float sqr() { - float sqr = (phase < pw) ^ invert ? 1.0 : -1.0; - return offset ? sqr + 1.0 : sqr; - } - */ - float light() { - return sinf(2.0f*M_PI * phase); - } -}; -//LFO CODE ***************************** - -struct TremoloFx : Module{ - enum ParamIds { - WAVE_PARAM, - FREQ_PARAM, - BLEND_PARAM, - INVERT_PARAM, - BYPASS_SWITCH, - NUM_PARAMS - }; - enum InputIds { - SIGNAL_INPUT, - WAVE_CV_INPUT, - FREQ_CV_INPUT, - BLEND_CV_INPUT, - NUM_INPUTS - }; - enum OutputIds { - SIGNAL_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - WAVE_LIGHT, - PHASE_POS_LIGHT, - PHASE_NEG_LIGHT, - BLEND_LIGHT, - BYPASS_LED, - NUM_LIGHTS - }; - - LowFrequencyOscillator oscillator; - - SchmittTrigger bypass_button_trig; - - bool fx_bypass = false; - - TremoloFx() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - - void step() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *statesJ = json_array(); - - json_t *bypassJ = json_boolean(fx_bypass); - json_array_append_new(statesJ, bypassJ); - - json_object_set_new(rootJm, "as_FxBypass", statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *statesJ = json_object_get(rootJm, "as_FxBypass"); - - json_t *bypassJ = json_array_get(statesJ, 0); - - fx_bypass = !!json_boolean_value(bypassJ); - - } - - float input_signal =0.0f; - float output_signal = 0.0f; - float tremolo_signal = 0.0f; - float blend_control = 0.0f; - float lfo_modulation = 0.0f; - -}; - -void TremoloFx::step() { - - if (bypass_button_trig.process(params[BYPASS_SWITCH].value)){ - fx_bypass = !fx_bypass; - } - lights[BYPASS_LED].value = fx_bypass ? 1.0f : 0.0f; - - input_signal = clamp(inputs[SIGNAL_INPUT].value,-10.0f,10.0f); - - //oscillator.setPitch(params[FREQ_PARAM].value); - oscillator.setPitch( clamp(params[FREQ_PARAM].value + inputs[FREQ_CV_INPUT].value, 0.0f, 3.5f) ); - oscillator.offset = (1.0f); - oscillator.invert = (params[INVERT_PARAM].value <= 0.0f); - oscillator.setPulseWidth(0.5f); - oscillator.step(1.0f / engineGetSampleRate()); - - float wave = clamp( params[WAVE_PARAM].value + inputs[WAVE_CV_INPUT].value, 0.0f, 1.0f ); - float interp = crossfade(oscillator.sin(), oscillator.tri(), wave); - - lfo_modulation = 5.0f * interp; - - //check bypass switch status - if (fx_bypass){ - outputs[SIGNAL_OUTPUT].value = input_signal; - }else { - tremolo_signal = input_signal * clamp(lfo_modulation/10.0f, 0.0f, 1.0f); - blend_control = clamp(params[BLEND_PARAM].value + inputs[BLEND_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - output_signal = crossfade(input_signal,tremolo_signal,blend_control); - outputs[SIGNAL_OUTPUT].value = output_signal; - } - - lights[PHASE_POS_LIGHT].setBrightnessSmooth(fmaxf(0.0f, oscillator.light())); - lights[PHASE_NEG_LIGHT].setBrightnessSmooth(fmaxf(0.0f, -oscillator.light())); - lights[BLEND_LIGHT].value = clamp(params[BLEND_PARAM].value + inputs[BLEND_CV_INPUT].value / 10.0f, 0.0f, 1.0f); - -} - - - -struct TremoloFxWidget : ModuleWidget -{ - TremoloFxWidget(TremoloFx *module); -}; - - -TremoloFxWidget::TremoloFxWidget(TremoloFx *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/Tremolo.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //phase switch - addParam(ParamWidget::create(Vec(13, 100), module, TremoloFx::INVERT_PARAM, 0.0f, 1.0f, 1.0f)); - //KNOBS - addParam(ParamWidget::create(Vec(43, 60), module, TremoloFx::WAVE_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(43, 125), module, TremoloFx::FREQ_PARAM, 0.0f, 3.5f, 1.75f)); - addParam(ParamWidget::create(Vec(43, 190), module, TremoloFx::BLEND_PARAM, 0.0f, 1.0f, 0.5f)); - //LIGHTS - addChild(ModuleLightWidget::create>(Vec(39, 122), module, TremoloFx::PHASE_POS_LIGHT)); - addChild(ModuleLightWidget::create>(Vec(39, 187), module, TremoloFx::BLEND_LIGHT)); - //BYPASS SWITCH - addParam(ParamWidget::create(Vec(33, 260), module, TremoloFx::BYPASS_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(35.2, 262), module, TremoloFx::BYPASS_LED)); - //INS/OUTS - addInput(Port::create(Vec(10, 310), Port::INPUT, module, TremoloFx::SIGNAL_INPUT)); - addOutput(Port::create(Vec(55, 310), Port::OUTPUT, module, TremoloFx::SIGNAL_OUTPUT)); - //CV INPUTS - addInput(Port::create(Vec(10, 67), Port::INPUT, module, TremoloFx::WAVE_CV_INPUT)); - addInput(Port::create(Vec(10, 132), Port::INPUT, module, TremoloFx::FREQ_CV_INPUT)); - addInput(Port::create(Vec(10, 197), Port::INPUT, module, TremoloFx::BLEND_CV_INPUT)); - -} - -Model *modelTremoloFx = Model::create("AS", "TremoloFx", "Tremolo FX", EFFECT_TAG); \ No newline at end of file diff --git a/repos/AS/src/TriLFO.cpp b/repos/AS/src/TriLFO.cpp deleted file mode 100644 index f5d2527d..00000000 --- a/repos/AS/src/TriLFO.cpp +++ /dev/null @@ -1,254 +0,0 @@ -//************************************************************************************** -//TriLFO module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code adapted from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** -#include "AS.hpp" -#include "dsp/digital.hpp" - -struct LowFrequencyOscillator { - float phase = 0.0f; - float pw = 0.5f; - float freq = 1.0f; - bool offset = false; - bool invert = false; - SchmittTrigger resetTrigger; - LowFrequencyOscillator() { - //resetTrigger.setThresholds(0.0f, 0.01f); - } - void setPitch(float pitch) { - pitch = fminf(pitch, 8.0f); - freq = powf(2.0f, pitch); - } - void setPulseWidth(float pw_) { - const float pwMin = 0.01f; - pw = clamp(pw_, pwMin, 1.0f - pwMin); - } - void setReset(float reset) { - if (resetTrigger.process(reset)) { - phase = 0.0f; - } - } - void step(float dt) { - float deltaPhase = fminf(freq * dt, 0.5f); - phase += deltaPhase; - if (phase >= 1.0f) - phase -= 1.0f; - } - float sin() { - if (offset) - return 1.0f - cosf(2*M_PI * phase) * (invert ? -1.0f : 1.0f); - else - return sinf(2.0f*M_PI * phase) * (invert ? -1.0f : 1.0f); - } - float tri(float x) { - return 4.0f * fabsf(x - roundf(x)); - } - float tri() { - if (offset) - return tri(invert ? phase - 0.5f : phase); - else - return -1.0f + tri(invert ? phase - 0.25f : phase - 0.75f); - } - float saw(float x) { - return 2.0f * (x - roundf(x)); - } - float saw() { - if (offset) - return invert ? 2.0f * (1.0f - phase) : 2.0f * phase; - else - return saw(phase) * (invert ? -1.0f : 1.0f); - } - float sqr() { - float sqr = (phase < pw) ^ invert ? 1.0f : -1.0f; - return offset ? sqr + 1.0f : sqr; - } - float light() { - return sinf(2.0f*M_PI * phase); - } -}; - - -struct TriLFO : Module { - enum ParamIds { - OFFSET1_PARAM, - INVERT1_PARAM, - FREQ1_PARAM, - OFFSET2_PARAM, - INVERT2_PARAM, - FREQ2_PARAM, - OFFSET3_PARAM, - INVERT3_PARAM, - FREQ3_PARAM, - // - FM1_PARAM, - FM2_PARAM, - PW_PARAM, - PWM_PARAM, - // - NUM_PARAMS - }; - enum InputIds { - FM1_INPUT, - FM2_INPUT, - RESET1_INPUT, - RESET2_INPUT, - RESET3_INPUT, - PW_INPUT, - NUM_INPUTS - }; - enum OutputIds { - SIN1_OUTPUT, - TRI1_OUTPUT, - SAW1_OUTPUT, - SQR1_OUTPUT, - SIN2_OUTPUT, - TRI2_OUTPUT, - SAW2_OUTPUT, - SQR2_OUTPUT, - SIN3_OUTPUT, - TRI3_OUTPUT, - SAW3_OUTPUT, - SQR3_OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - PHASE1_POS_LIGHT, - PHASE1_NEG_LIGHT, - PHASE2_POS_LIGHT, - PHASE2_NEG_LIGHT, - PHASE3_POS_LIGHT, - PHASE3_NEG_LIGHT, - NUM_LIGHTS - }; - - LowFrequencyOscillator oscillator1; - LowFrequencyOscillator oscillator2; - LowFrequencyOscillator oscillator3; - - TriLFO() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; - - float pw_param = 0.5f; -}; - - -void TriLFO::step() { - //LFO1 - oscillator1.setPitch(params[FREQ1_PARAM].value + params[FM1_PARAM].value * inputs[FM1_INPUT].value + params[FM2_PARAM].value * inputs[FM2_INPUT].value); - //oscillator1.setPulseWidth(params[PW_PARAM].value + params[PWM_PARAM].value * inputs[PW_INPUT].value / 10.0); - oscillator1.setPulseWidth(pw_param); - oscillator1.offset = (params[OFFSET1_PARAM].value > 0.0f); - oscillator1.invert = (params[INVERT1_PARAM].value <= 0.0f); - oscillator1.step(1.0f / engineGetSampleRate()); - oscillator1.setReset(inputs[RESET1_INPUT].value); - - outputs[SIN1_OUTPUT].value = 5.0f * oscillator1.sin(); - outputs[TRI1_OUTPUT].value = 5.0f * oscillator1.tri(); - outputs[SAW1_OUTPUT].value = 5.0f * oscillator1.saw(); - outputs[SQR1_OUTPUT].value = 5.0f * oscillator1.sqr(); - - lights[PHASE1_POS_LIGHT].setBrightnessSmooth(fmaxf(0.0f, oscillator1.light())); - lights[PHASE1_NEG_LIGHT].setBrightnessSmooth(fmaxf(0.0f, -oscillator1.light())); - //LFO2 - oscillator2.setPitch(params[FREQ2_PARAM].value + params[FM1_PARAM].value * inputs[FM1_INPUT].value + params[FM2_PARAM].value * inputs[FM2_INPUT].value); - //oscillator2.setPulseWidth(params[PW_PARAM].value + params[PWM_PARAM].value * inputs[PW_INPUT].value / 10.0); - oscillator2.setPulseWidth(pw_param); - oscillator2.offset = (params[OFFSET2_PARAM].value > 0.0f); - oscillator2.invert = (params[INVERT2_PARAM].value <= 0.0f); - oscillator2.step(1.0f / engineGetSampleRate()); - oscillator2.setReset(inputs[RESET2_INPUT].value); - - outputs[SIN2_OUTPUT].value = 5.0f * oscillator2.sin(); - outputs[TRI2_OUTPUT].value = 5.0f * oscillator2.tri(); - outputs[SAW2_OUTPUT].value = 5.0f * oscillator2.saw(); - outputs[SQR2_OUTPUT].value = 5.0f * oscillator2.sqr(); - - lights[PHASE2_POS_LIGHT].setBrightnessSmooth(fmaxf(0.0f, oscillator2.light())); - lights[PHASE2_NEG_LIGHT].setBrightnessSmooth(fmaxf(0.0f, -oscillator2.light())); - //LFO3 - oscillator3.setPitch(params[FREQ3_PARAM].value + params[FM1_PARAM].value * inputs[FM1_INPUT].value + params[FM2_PARAM].value * inputs[FM2_INPUT].value); - //oscillator3.setPulseWidth(params[PW_PARAM].value + params[PWM_PARAM].value * inputs[PW_INPUT].value / 10.0); - oscillator3.setPulseWidth(pw_param); - oscillator3.offset = (params[OFFSET3_PARAM].value > 0.0f); - oscillator3.invert = (params[INVERT3_PARAM].value <= 0.0f); - oscillator3.step(1.0f / engineGetSampleRate()); - oscillator3.setReset(inputs[RESET3_INPUT].value); - - outputs[SIN3_OUTPUT].value = 5.0f * oscillator3.sin(); - outputs[TRI3_OUTPUT].value = 5.0f * oscillator3.tri(); - outputs[SAW3_OUTPUT].value = 5.0f * oscillator3.saw(); - outputs[SQR3_OUTPUT].value = 5.0f * oscillator3.sqr(); - - lights[PHASE3_POS_LIGHT].setBrightnessSmooth(fmaxf(0.0f, oscillator3.light())); - lights[PHASE3_NEG_LIGHT].setBrightnessSmooth(fmaxf(0.0f, -oscillator3.light())); - -} - - -struct TriLFOWidget : ModuleWidget -{ - TriLFOWidget(TriLFO *module); -}; - - -TriLFOWidget::TriLFOWidget(TriLFO *module) : ModuleWidget(module) { - box.size = Vec(RACK_GRID_WIDTH*10, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/as_LFO.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //LFO 1 - addInput(Port::create(Vec(10, 60), Port::INPUT, module, TriLFO::RESET1_INPUT)); - addParam(ParamWidget::create(Vec(41, 55), module, TriLFO::FREQ1_PARAM, -8.0f, 6.0f, -1.0f)); - // - addChild(ModuleLightWidget::create>(Vec(37, 52), module, TriLFO::PHASE1_POS_LIGHT)); - // - addParam(ParamWidget::create(Vec(90, 60), module, TriLFO::OFFSET1_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(120, 60), module, TriLFO::INVERT1_PARAM, 0.0f, 1.0f, 1.0f)); - // - addOutput(Port::create(Vec(11, 120), Port::OUTPUT, module, TriLFO::SIN1_OUTPUT)); - addOutput(Port::create(Vec(45, 120), Port::OUTPUT, module, TriLFO::TRI1_OUTPUT)); - addOutput(Port::create(Vec(80, 120), Port::OUTPUT, module, TriLFO::SAW1_OUTPUT)); - addOutput(Port::create(Vec(114, 120), Port::OUTPUT, module, TriLFO::SQR1_OUTPUT)); - //LFO 2 - static const int lfo2_y_offset = 100; - addInput(Port::create(Vec(10, 60+lfo2_y_offset), Port::INPUT, module, TriLFO::RESET2_INPUT)); - addParam(ParamWidget::create(Vec(41, 55+lfo2_y_offset), module, TriLFO::FREQ2_PARAM, -8.0f, 6.0f, -1.0f)); - // - addChild(ModuleLightWidget::create>(Vec(37, 52+lfo2_y_offset), module, TriLFO::PHASE2_POS_LIGHT)); - // - addParam(ParamWidget::create(Vec(90, 60+lfo2_y_offset), module, TriLFO::OFFSET2_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(120, 60+lfo2_y_offset), module, TriLFO::INVERT2_PARAM, 0.0f, 1.0f, 1.0f)); - // - addOutput(Port::create(Vec(11, 120+lfo2_y_offset), Port::OUTPUT, module, TriLFO::SIN2_OUTPUT)); - addOutput(Port::create(Vec(45, 120+lfo2_y_offset), Port::OUTPUT, module, TriLFO::TRI2_OUTPUT)); - addOutput(Port::create(Vec(80, 120+lfo2_y_offset), Port::OUTPUT, module, TriLFO::SAW2_OUTPUT)); - addOutput(Port::create(Vec(114, 120+lfo2_y_offset), Port::OUTPUT, module, TriLFO::SQR2_OUTPUT)); - //LFO 3 - static const int lfo3_y_offset = 200; - addInput(Port::create(Vec(10, 60+lfo3_y_offset), Port::INPUT, module, TriLFO::RESET3_INPUT)); - addParam(ParamWidget::create(Vec(41, 55+lfo3_y_offset), module, TriLFO::FREQ3_PARAM, -8.0f, 6.0f, -1.0f)); - // - addChild(ModuleLightWidget::create>(Vec(37, 52+lfo3_y_offset), module, TriLFO::PHASE3_POS_LIGHT)); - // - addParam(ParamWidget::create(Vec(90, 60+lfo3_y_offset), module, TriLFO::OFFSET3_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(120, 60+lfo3_y_offset), module, TriLFO::INVERT3_PARAM, 0.0f, 1.0f, 1.0f)); - // - addOutput(Port::create(Vec(11, 120+lfo3_y_offset), Port::OUTPUT, module, TriLFO::SIN3_OUTPUT)); - addOutput(Port::create(Vec(45, 120+lfo3_y_offset), Port::OUTPUT, module, TriLFO::TRI3_OUTPUT)); - addOutput(Port::create(Vec(80, 120+lfo3_y_offset), Port::OUTPUT, module, TriLFO::SAW3_OUTPUT)); - addOutput(Port::create(Vec(114, 120+lfo3_y_offset), Port::OUTPUT, module, TriLFO::SQR3_OUTPUT)); - -} - -Model *modelTriLFO = Model::create("AS", "TriLFO", "Tri LFO", LFO_TAG); \ No newline at end of file diff --git a/repos/AS/src/TriggersMKI.cpp b/repos/AS/src/TriggersMKI.cpp deleted file mode 100644 index 282e89dd..00000000 --- a/repos/AS/src/TriggersMKI.cpp +++ /dev/null @@ -1,196 +0,0 @@ -//************************************************************************************** -//TriggersMKIMKI module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//************************************************************************************** -#include "AS.hpp" -#include "dsp/digital.hpp" -#include -#include - -struct TriggersMKI: Module { - enum ParamIds { - VOLTAGE_PARAM, - RUN_SWITCH, - MOMENTARY_SWITCH, - NUM_PARAMS - }; - enum InputIds { - CV_RUN_INPUT, - NUM_INPUTS - }; - enum OutputIds { - TRIGGER_OUT, - NUM_OUTPUTS - }; - enum LightIds { - RUN_LED, - MOMENTARY_LED, - NUM_LIGHTS - }; - - SchmittTrigger LatchTrigger; - SchmittTrigger LatchExtTrigger; - SchmittTrigger BtnTrigger; - SchmittTrigger BtnExtTrigger; - - const float lightLambda = 0.075; - float resetLight = 0.0f; - float volts = 0.0f; - bool running = false; - - TriggersMKI() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; - - - json_t *toJson() override - { - json_t *rootJ = json_object(); - json_t *button_statesJ = json_array(); - json_t *button_stateJ = json_integer((int)running); - json_array_append_new(button_statesJ, button_stateJ); - json_object_set_new(rootJ, "run", button_statesJ); - return rootJ; - } - - void fromJson(json_t *rootJ) override - { - json_t *button_statesJ = json_object_get(rootJ, "run"); - if (button_statesJ) - { - json_t *button_stateJ = json_array_get(button_statesJ,0); - if (button_stateJ) - running = !!json_integer_value(button_stateJ); - } - } - -}; - -void TriggersMKI::step() { - - volts = clamp(params[VOLTAGE_PARAM].value, 0.0f, 10.0f); - - //LATCH TRIGGER - //EXTERNAL TRIGGER - if (LatchTrigger.process(params[RUN_SWITCH].value)||LatchExtTrigger.process(inputs[CV_RUN_INPUT].value)) { - running = !running; - } - //INTERNAL TRIGGER - if (running) { - lights[RUN_LED].value = 1.0f; - outputs[TRIGGER_OUT].value = volts; - }else{ - lights[RUN_LED].value = 0.0f; - outputs[TRIGGER_OUT].value = 0.0f; - } - - //MOMENTARY TRIGGER - //EXTERNAL TRIGGER - if (BtnTrigger.process(params[MOMENTARY_SWITCH].value)) { - resetLight = 1.0; - if (!running) { - outputs[TRIGGER_OUT].value = volts; - } - }else{ - if (!running) { - outputs[TRIGGER_OUT].value = 0.0f; - } - } - resetLight -= resetLight / lightLambda / engineGetSampleRate(); - lights[MOMENTARY_LED].value = resetLight; - -} - -/////////////////////////////////// -struct VoltsDisplayWidget : TransparentWidget { - - float *value; - std::shared_ptr font; - - VoltsDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/Segment7Standard.ttf")); - }; - - void draw(NVGcontext *vg) override { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.5); - - char display_string[10]; - sprintf(display_string,"%5.2f",*value); - - Vec textPos = Vec(3.0f, 17.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "~~~~~", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "\\\\\\\\\\", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - nvgText(vg, textPos.x, textPos.y, display_string, NULL); - //nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - } -}; -//////////////////////////////////// - -struct TriggersMKIWidget : ModuleWidget -{ - TriggersMKIWidget(TriggersMKI *module); -}; - - -TriggersMKIWidget::TriggersMKIWidget(TriggersMKI *module) : ModuleWidget(module) { - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/TriggersMKI.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - //VOLTS DISPLAY - VoltsDisplayWidget *display1 = new VoltsDisplayWidget(); - display1->box.pos = Vec(10,50); - display1->box.size = Vec(70, 20); - display1->value = &module->volts; - addChild(display1); - - //PARAMS - addParam(ParamWidget::create(Vec(26, 77), module, TriggersMKI::VOLTAGE_PARAM, 0.0f, 10.0f, 5.0f)); - //SWITCHES - static const float led_offset = 3.3; - static const float led_center = 15; - addParam(ParamWidget::create(Vec(led_center, 182), module, TriggersMKI::RUN_SWITCH, 0.0, 1.0, 0.0)); - addChild(ModuleLightWidget::create>(Vec(led_center+led_offset, 182+led_offset), module, TriggersMKI::RUN_LED)); - - addParam(ParamWidget::create(Vec(led_center, 262), module, TriggersMKI::MOMENTARY_SWITCH, 0.0, 1.0, 0.0)); - addChild(ModuleLightWidget::create>(Vec(led_center+led_offset, 262+led_offset), module, TriggersMKI::MOMENTARY_LED)); - - //PORTS - addInput(Port::create(Vec(10, 145), Port::INPUT, module, TriggersMKI::CV_RUN_INPUT)); - addOutput(Port::create(Vec(55, 145), Port::OUTPUT, module, TriggersMKI::TRIGGER_OUT)); - -} - -Model *modelTriggersMKI = Model::create("AS", "TriggersMKI", "Triggers MKI", SWITCH_TAG, UTILITY_TAG); \ No newline at end of file diff --git a/repos/AS/src/TriggersMKII.cpp b/repos/AS/src/TriggersMKII.cpp deleted file mode 100644 index 640dde62..00000000 --- a/repos/AS/src/TriggersMKII.cpp +++ /dev/null @@ -1,248 +0,0 @@ -//************************************************************************************** -//TriggersMKII module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//************************************************************************************** -#include "AS.hpp" -#include "dsp/digital.hpp" -#include -#include -//#include -//#include - -struct TriggersMKII: Module { - enum ParamIds { - LABEL_PARAM_1, - LABEL_PARAM_2, - TRIGGER_SWITCH_1, - MOMENTARY_SWITCH_2, - NUM_PARAMS - }; - enum InputIds { - CV_TRIG_INPUT_1, - CV_TRIG_INPUT_2, - NUM_INPUTS - }; - enum OutputIds { - - TRIGGER_OUT1, - MOMENTARY_OUT2, - - NUM_OUTPUTS - }; - enum LightIds { - RUN_LED, - TRIGGER_LED_1, - MOMENTARY_LED_2, - NUM_LIGHTS - }; - - SchmittTrigger btnTrigger1; - SchmittTrigger extTrigger1; - SchmittTrigger btnTrigger2; - SchmittTrigger extTrigger2; - - const float lightLambda = 0.075f; - float resetLight1 = 0.0f; - float resetLight2 = 0.0f; - - int label_num1 = 0; - int label_num2 = 0; - - TriggersMKII() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; - - -}; - -void TriggersMKII::step() { - - label_num1 = roundf(params[LABEL_PARAM_1].value); - label_num2 = roundf(params[LABEL_PARAM_2].value); - - - outputs[TRIGGER_OUT1].value = 0.0f; - outputs[MOMENTARY_OUT2].value = 0.0f; - - //TRIGGER 1 - //EXTERNAL TRIGGER - if (btnTrigger1.process(params[TRIGGER_SWITCH_1].value)) { - resetLight1 = 1.0; - outputs[TRIGGER_OUT1].value = 10.0f; - //INTERNAL TRIGGER - }else if (extTrigger1.process(inputs[CV_TRIG_INPUT_1].value)) { - resetLight1 = 1.0; - outputs[TRIGGER_OUT1].value = 10.0f; - }else{ - outputs[TRIGGER_OUT1].value = 0.0f; - } - resetLight1 -= resetLight1 / lightLambda / engineGetSampleRate(); - lights[TRIGGER_LED_1].value = resetLight1; - - //TRIGGER 2 - //EXTERNAL TRIGGER - - if (btnTrigger2.process(params[MOMENTARY_SWITCH_2].value)) { - resetLight2 = 1.0; - outputs[MOMENTARY_OUT2].value = 10.0f; - //INTERNAL TRIGGER - }else if (extTrigger2.process(inputs[CV_TRIG_INPUT_2].value)) { - resetLight2 = 1.0; - outputs[MOMENTARY_OUT2].value = 10.0f; - }else{ - outputs[MOMENTARY_OUT2].value = 0.0f; - } - resetLight2 -= resetLight2 / lightLambda / engineGetSampleRate(); - lights[MOMENTARY_LED_2].value = resetLight2; - -} - -static const char *label_values[] = { - "------", - " MUTE", - " SOLO", - " RESET", - " DRUMS", - " KICK", - " SNARE", - " HIHAT", - " CLAP", - " PERC", - "BASS 1", - "BASS 2", - " GTR 1", - " GTR 2", - "LEAD 1", - "LEAD 2", - " PAD 1", - " PAD 2", - "CHORDS", - " FX 1", - " FX 2", - " SEQ 1", - " SEQ 2", - " MIX 1", - " MIX 2", - " AUX 1", - " AUX 2", - " ON", - " OFF", - " START", - " STOP", - " PAUSE", - " UP", - " DOWN", - " LEFT", - " RIGHT", -}; - -/////////////////////////////////// -struct LabelDisplayWidget : TransparentWidget { - - int *value; - std::shared_ptr font; - - LabelDisplayWidget() { - font = Font::load(assetPlugin(plugin, "res/saxmono.ttf")); - }; - - void draw(NVGcontext *vg) override - { - // Background - //NVGcolor backgroundColor = nvgRGB(0x20, 0x20, 0x20); - NVGcolor backgroundColor = nvgRGB(0x20, 0x10, 0x10); - NVGcolor borderColor = nvgRGB(0x10, 0x10, 0x10); - nvgBeginPath(vg); - nvgRoundedRect(vg, 0.0, 0.0, box.size.x, box.size.y, 4.0); - nvgFillColor(vg, backgroundColor); - nvgFill(vg); - nvgStrokeWidth(vg, 1.5); - nvgStrokeColor(vg, borderColor); - nvgStroke(vg); - // text - nvgFontSize(vg, 18); - nvgFontFaceId(vg, font->handle); - nvgTextLetterSpacing(vg, 2.0); - - std::stringstream to_display; - to_display << std::right << std::setw(5) << *value; - - Vec textPos = Vec(4.0f, 16.0f); - - NVGcolor textColor = nvgRGB(0xdf, 0xd2, 0x2c); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "000000", NULL); - - textColor = nvgRGB(0xda, 0xe9, 0x29); - nvgFillColor(vg, nvgTransRGBA(textColor, 16)); - nvgText(vg, textPos.x, textPos.y, "------", NULL); - - textColor = nvgRGB(0xf0, 0x00, 0x00); - nvgFillColor(vg, textColor); - //nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); - nvgText(vg, textPos.x, textPos.y, label_values[*value], NULL); - } -}; -//////////////////////////////////// - -struct TriggersMKIIWidget : ModuleWidget -{ - TriggersMKIIWidget(TriggersMKII *module); -}; - -TriggersMKIIWidget::TriggersMKIIWidget(TriggersMKII *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/TriggersMKII.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - static const float led_offset = 3.3; - static const float led_center = 15; - static const float y_offset = 150; - //TRIGGER 1 - //LABEL DISPLAY - LabelDisplayWidget *display1 = new LabelDisplayWidget(); - display1->box.pos = Vec(6,50); - display1->box.size = Vec(78, 20); - display1->value = &module->label_num1; - addChild(display1); - - //PARAM - addParam(ParamWidget::create(Vec(46, 77), module, TriggersMKII::LABEL_PARAM_1, 0.0, 35.0, 0.0)); - //SWITCH - addParam(ParamWidget::create(Vec(led_center, 132), module, TriggersMKII::TRIGGER_SWITCH_1, 0.0, 1.0, 0.0)); - addChild(ModuleLightWidget::create>(Vec(led_center+led_offset, 132+led_offset), module, TriggersMKII::TRIGGER_LED_1)); - //PORTS - addOutput(Port::create(Vec(7, 78), Port::OUTPUT, module, TriggersMKII::TRIGGER_OUT1)); - addInput(Port::create(Vec(7, 104), Port::INPUT, module, TriggersMKII::CV_TRIG_INPUT_1)); - - //TRIGGER 2 - //LABEL DISPLAY - LabelDisplayWidget *display2 = new LabelDisplayWidget(); - display2->box.pos = Vec(6,50+y_offset); - display2->box.size = Vec(78, 20); - display2->value = &module->label_num2; - addChild(display2); - - //PARAM - addParam(ParamWidget::create(Vec(46, 77+y_offset), module, TriggersMKII::LABEL_PARAM_2, 0.0, 35.0, 0.0)); - //SWITCH - addParam(ParamWidget::create(Vec(led_center, 132+y_offset), module, TriggersMKII::MOMENTARY_SWITCH_2, 0.0, 1.0, 0.0)); - addChild(ModuleLightWidget::create>(Vec(led_center+led_offset, 132+led_offset+y_offset), module, TriggersMKII::MOMENTARY_LED_2)); - //PORTS - addOutput(Port::create(Vec(7, 78+y_offset), Port::OUTPUT, module, TriggersMKII::MOMENTARY_OUT2)); - addInput(Port::create(Vec(7, 104+y_offset), Port::INPUT, module, TriggersMKII::CV_TRIG_INPUT_2)); - -} - - -Model *modelTriggersMKII = Model::create("AS", "TriggersMKII", "Triggers MKII", SWITCH_TAG, UTILITY_TAG); diff --git a/repos/AS/src/VCA.cpp b/repos/AS/src/VCA.cpp deleted file mode 100644 index 3d3fa7b4..00000000 --- a/repos/AS/src/VCA.cpp +++ /dev/null @@ -1,101 +0,0 @@ -//************************************************************************************** -//VCA module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from the Fundamentals plugins by Andrew Belt http://www.vcvrack.com -//************************************************************************************** - -#include "AS.hpp" - -struct VCA : Module { - enum ParamIds { - LEVEL1_PARAM, - LEVEL2_PARAM, - MODE1_PARAM, - MODE2_PARAM, - NUM_PARAMS - }; - enum InputIds { - ENV1_INPUT, - IN1_INPUT, - ENV2_INPUT, - IN2_INPUT, - NUM_INPUTS - }; - enum OutputIds { - OUT1_OUTPUT, - OUT2_OUTPUT, - NUM_OUTPUTS - }; - - float v1= 0.0f; - float v2= 0.0f; - const float expBase = 50.0f; - - VCA() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS) {} - void step() override; -}; - -void VCA::step() { - //VCA 1 - v1 = inputs[IN1_INPUT].value * params[LEVEL1_PARAM].value; - if(inputs[ENV1_INPUT].active){ - if(params[MODE1_PARAM].value==1){ - v1 *= clamp(inputs[ENV1_INPUT].value / 10.0f, 0.0f, 1.0f); - }else{ - v1 *= rescale(powf(expBase, clamp(inputs[ENV1_INPUT].value / 10.0f, 0.0f, 1.0f)), 1.0f, expBase, 0.0f, 1.0f); - } - } - outputs[OUT1_OUTPUT].value = v1; - //VCA 2 - v2 = inputs[IN2_INPUT].value * params[LEVEL2_PARAM].value; - if(inputs[ENV2_INPUT].active){ - if(params[MODE2_PARAM].value){ - v2 *= clamp(inputs[ENV2_INPUT].value / 10.0f, 0.0f, 1.0f); - }else{ - v2 *= rescale(powf(expBase, clamp(inputs[ENV2_INPUT].value / 10.0f, 0.0f, 1.0f)), 1.0f, expBase, 0.0f, 1.0f); - } - } - outputs[OUT2_OUTPUT].value = v2; -} - - -struct VCAWidget : ModuleWidget -{ - VCAWidget(VCA *module); -}; - -VCAWidget::VCAWidget(VCA *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/VCA.svg"))); - addChild(panel); - } - - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //SLIDERS - addParam(ParamWidget::create(Vec(10, 70), module, VCA::LEVEL1_PARAM, 0.0f, 1.0f, 0.5f)); - addParam(ParamWidget::create(Vec(55, 70), module, VCA::LEVEL2_PARAM, 0.0f, 1.0f, 0.5f)); - //MODE SWITCHES - addParam(ParamWidget::create(Vec(14, 190), module, VCA::MODE1_PARAM, 0.0f, 1.0f, 1.0f)); - addParam(ParamWidget::create(Vec(59, 190), module, VCA::MODE2_PARAM, 0.0f, 1.0f, 1.0f)); - //PORTS - addInput(Port::create(Vec(10, 217), Port::INPUT, module, VCA::ENV1_INPUT)); - addInput(Port::create(Vec(55, 217), Port::INPUT, module, VCA::ENV2_INPUT)); - - addInput(Port::create(Vec(10, 260), Port::INPUT, module, VCA::IN1_INPUT)); - addInput(Port::create(Vec(55, 260), Port::INPUT, module, VCA::IN2_INPUT)); - - addOutput(Port::create(Vec(10, 310), Port::OUTPUT, module, VCA::OUT1_OUTPUT)); - addOutput(Port::create(Vec(55, 310), Port::OUTPUT, module, VCA::OUT2_OUTPUT)); - -} - -Model *modelVCA = Model::create("AS", "VCAWidget", "VCA", AMPLIFIER_TAG); \ No newline at end of file diff --git a/repos/AS/src/WaveShaper.cpp b/repos/AS/src/WaveShaper.cpp deleted file mode 100644 index 5b29dbc2..00000000 --- a/repos/AS/src/WaveShaper.cpp +++ /dev/null @@ -1,130 +0,0 @@ -//************************************************************************************** -//WaveSahper module for VCV Rack by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// -//Code taken from HetrickCV plugins by Michael Hetrick https://github.com/mhetrick/hetrickcv -//************************************************************************************** -#include "AS.hpp" - -#include "dsp/digital.hpp" - -struct WaveShaper : Module { - enum ParamIds { - AMOUNT_PARAM, - SCALE_PARAM, - RANGE_PARAM, - BYPASS_SWITCH, - NUM_PARAMS - }; - enum InputIds { - INPUT, - AMOUNT_INPUT, - NUM_INPUTS - }; - enum OutputIds { - OUTPUT, - NUM_OUTPUTS - }; - enum LightIds { - BYPASS_LED, - NUM_LIGHTS - }; - - SchmittTrigger bypass_button_trig; - bool fx_bypass = false; - - WaveShaper() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} - void step() override; - - json_t *toJson()override { - json_t *rootJm = json_object(); - - json_t *statesJ = json_array(); - - json_t *bypassJ = json_boolean(fx_bypass); - json_array_append_new(statesJ, bypassJ); - - json_object_set_new(rootJm, "as_FxBypass", statesJ); - - return rootJm; - } - - void fromJson(json_t *rootJm)override { - json_t *statesJ = json_object_get(rootJm, "as_FxBypass"); - - json_t *bypassJ = json_array_get(statesJ, 0); - - fx_bypass = !!json_boolean_value(bypassJ); - - } - -}; - - -void WaveShaper::step() { - - if (bypass_button_trig.process(params[BYPASS_SWITCH].value)){ - fx_bypass = !fx_bypass; - } - lights[BYPASS_LED].value = fx_bypass ? 1.0f : 0.0f; - - float input = inputs[INPUT].value; - - bool mode5V = (params[RANGE_PARAM].value == 0.0f); - if(mode5V) input = clamp(input, -5.0f, 5.0f) * 0.2f; - else input = clamp(input, -10.0f, 10.0f) * 0.1f; - - float shape = params[AMOUNT_PARAM].value + (inputs[AMOUNT_INPUT].value * params[SCALE_PARAM].value); - shape = clamp(shape, -5.0f, 5.0f) * 0.2f; - shape *= 0.99f; - - const float shapeB = (1.0f - shape) / (1.0f + shape); - const float shapeA = (4.0f * shape) / ((1.0f - shape) * (1.0f + shape)); - - float output = input * (shapeA + shapeB); - output = output / ((std::abs(input) * shapeA) + shapeB); - output *= 10.0f; - //check for bypass switch status - if (fx_bypass){ - outputs[OUTPUT].value = inputs[INPUT].value; - }else{ - outputs[OUTPUT].value = output; - } -} - -struct WaveShaperWidget : ModuleWidget -{ - WaveShaperWidget(WaveShaper *module); -}; - -WaveShaperWidget::WaveShaperWidget(WaveShaper *module) : ModuleWidget(module) { - - box.size = Vec(6 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/WaveShaper.svg"))); - addChild(panel); - } - //SCREWS - addChild(Widget::create(Vec(RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - //PARAMS - addParam(ParamWidget::create(Vec(26, 60), module, WaveShaper::AMOUNT_PARAM, -5.0f, 5.0f, 0.0f)); - addParam(ParamWidget::create(Vec(26, 125), module, WaveShaper::SCALE_PARAM, -1.0f, 1.0f, 1.0f)); - //INPUTS - addInput(Port::create(Vec(33, 180), Port::INPUT, module, WaveShaper::AMOUNT_INPUT)); - //RANGE SWITCH - addParam(ParamWidget::create(Vec(33, 220), module, WaveShaper::RANGE_PARAM, 0.0f, 1.0f, 0.0f)); - //BYPASS SWITCH - addParam(ParamWidget::create(Vec(33, 260), module, WaveShaper::BYPASS_SWITCH , 0.0f, 1.0f, 0.0f)); - addChild(ModuleLightWidget::create>(Vec(35.2, 262), module, WaveShaper::BYPASS_LED)); - //INS/OUTS - addInput(Port::create(Vec(10, 310), Port::INPUT, module, WaveShaper::INPUT)); - addOutput(Port::create(Vec(55, 310), Port::OUTPUT, module, WaveShaper::OUTPUT)); - -} - -Model *modelWaveShaper = Model::create("AS", "WaveShaper", "Wave Shaper", WAVESHAPER_TAG); \ No newline at end of file diff --git a/repos/AS/src/stereoVUmeter.cpp b/repos/AS/src/stereoVUmeter.cpp deleted file mode 100644 index dc348cea..00000000 --- a/repos/AS/src/stereoVUmeter.cpp +++ /dev/null @@ -1,124 +0,0 @@ -///////////////////////////////////////////////////// -// Stereo VU Meter module by Alfredo Santamaria - AS - https://github.com/AScustomWorks/AS -// StereoVUmeter -// -///////////////////////////////////////////////////// - -#include "AS.hpp" -#include "dsp/vumeter.hpp" - -struct StereoVUmeter : Module { - enum ParamIds { - NUM_PARAMS - }; - - enum InputIds { - INPUT_LEFT, - INPUT_RIGHT, - NUM_INPUTS - }; - - enum OutputIds { - OUT_LEFT, - OUT_RIGHT, - NUM_OUTPUTS - }; - - enum LightIds { - METER_LIGHT_LEFT, - METER_LIGHT_RIGHT = METER_LIGHT_LEFT+15, - NUM_LIGHTS = METER_LIGHT_RIGHT + 15 - }; - - StereoVUmeter() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { - } - void step() override; - - VUMeter vuBar; - -}; - -void StereoVUmeter::step(){ - //GET VALUES AND ROUTE SIGNALS TO OUTPUTS - float signal_in_Left = inputs[INPUT_LEFT].value; - float signal_in_Right = inputs[INPUT_RIGHT].value; - outputs[OUT_LEFT].value = signal_in_Left; - outputs[OUT_RIGHT].value = signal_in_Right; - //VU METER BARS LIGHTS - vuBar.dBInterval = 3; - for (int i = 0; i < 15; i++){ - vuBar.setValue(signal_in_Left / 10.0f); - lights[METER_LIGHT_LEFT + i].setBrightnessSmooth(vuBar.getBrightness(i)); - vuBar.setValue(signal_in_Right / 10.0f); - lights[METER_LIGHT_RIGHT + i].setBrightnessSmooth(vuBar.getBrightness(i)); - } -}; - -struct StereoVUmeterWidget : ModuleWidget -{ - StereoVUmeterWidget(StereoVUmeter *module); -}; - - -StereoVUmeterWidget::StereoVUmeterWidget(StereoVUmeter *module) : ModuleWidget(module) { - - box.size = Vec(4 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT); - { - SVGPanel *panel = new SVGPanel(); - panel->box.size = box.size; - panel->setBackground(SVG::load(assetPlugin(plugin, "res/StereoVUmeter.svg"))); - addChild(panel); - } - //SCREWS - SPECIAL SPACING FOR RACK WIDTH*4 - addChild(Widget::create(Vec(0, 0))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, 0))); - addChild(Widget::create(Vec(0, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - addChild(Widget::create(Vec(box.size.x - RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); - - // LEFT COLUMN LEDs - static const float leftCol = 15; - static const float offsetY = 12; - static const float startY = 66; - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 0), module, StereoVUmeter::METER_LIGHT_LEFT + 0)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 1), module, StereoVUmeter::METER_LIGHT_LEFT + 1)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 2), module, StereoVUmeter::METER_LIGHT_LEFT + 2)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 3), module, StereoVUmeter::METER_LIGHT_LEFT + 3)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 4), module, StereoVUmeter::METER_LIGHT_LEFT + 4)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 5), module, StereoVUmeter::METER_LIGHT_LEFT + 5)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 6), module, StereoVUmeter::METER_LIGHT_LEFT + 6)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 7), module, StereoVUmeter::METER_LIGHT_LEFT + 7)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 8), module, StereoVUmeter::METER_LIGHT_LEFT + 8)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 9), module, StereoVUmeter::METER_LIGHT_LEFT + 9)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 10), module, StereoVUmeter::METER_LIGHT_LEFT + 10)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 11), module, StereoVUmeter::METER_LIGHT_LEFT + 11)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 12), module, StereoVUmeter::METER_LIGHT_LEFT + 12)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 13), module, StereoVUmeter::METER_LIGHT_LEFT + 13)); - addChild(ModuleLightWidget::create>(Vec(leftCol, startY + offsetY * 14), module, StereoVUmeter::METER_LIGHT_LEFT + 14)); - //RIGHT COLUMN LEDs - static const float rightCol = 37; - - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 0), module, StereoVUmeter::METER_LIGHT_RIGHT + 0)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 1), module, StereoVUmeter::METER_LIGHT_RIGHT + 1)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 2), module, StereoVUmeter::METER_LIGHT_RIGHT + 2)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 3), module, StereoVUmeter::METER_LIGHT_RIGHT + 3)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 4), module, StereoVUmeter::METER_LIGHT_RIGHT + 4)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 5), module, StereoVUmeter::METER_LIGHT_RIGHT + 5)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 6), module, StereoVUmeter::METER_LIGHT_RIGHT + 6)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 7), module, StereoVUmeter::METER_LIGHT_RIGHT + 7)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 8), module, StereoVUmeter::METER_LIGHT_RIGHT + 8)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 9), module, StereoVUmeter::METER_LIGHT_RIGHT + 9)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 10), module, StereoVUmeter::METER_LIGHT_RIGHT + 10)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 11), module, StereoVUmeter::METER_LIGHT_RIGHT + 11)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 12), module, StereoVUmeter::METER_LIGHT_RIGHT + 12)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 13), module, StereoVUmeter::METER_LIGHT_RIGHT + 13)); - addChild(ModuleLightWidget::create>(Vec(rightCol, startY + offsetY * 14), module, StereoVUmeter::METER_LIGHT_RIGHT + 14)); - - //INPUTS - addInput(Port::create(Vec(3, 270), Port::INPUT, module, StereoVUmeter::INPUT_LEFT)); - addInput(Port::create(Vec(3, 307), Port::INPUT, module, StereoVUmeter::INPUT_RIGHT)); - //OUTPUTS - addOutput(Port::create(Vec(33,270), Port::OUTPUT, module, StereoVUmeter::OUT_LEFT)); - addOutput(Port::create(Vec(33,307), Port::OUTPUT, module, StereoVUmeter::OUT_RIGHT)); -} - -Model *modelStereoVUmeter = Model::create("AS", "StereoVUmeter", "Stereo VU meter", VISUAL_TAG, UTILITY_TAG); \ No newline at end of file