├── .gitattributes ├── .gitignore ├── BitDos.jucer ├── JuceLibraryCode ├── BinaryData.cpp ├── BinaryData.h ├── BinaryData2.cpp ├── JuceHeader.h ├── JuceLV2Defines.h ├── JucePluginDefines.h ├── ReadMe.txt ├── include_juce_audio_basics.cpp ├── include_juce_audio_basics.mm ├── include_juce_audio_plugin_client_AAX.cpp ├── include_juce_audio_plugin_client_AAX.mm ├── include_juce_audio_plugin_client_AAX_utils.cpp ├── include_juce_audio_plugin_client_ARA.cpp ├── include_juce_audio_plugin_client_AU_1.mm ├── include_juce_audio_plugin_client_AU_2.mm ├── include_juce_audio_plugin_client_AUv3.mm ├── include_juce_audio_plugin_client_LV2.cpp ├── include_juce_audio_plugin_client_LV2.mm ├── include_juce_audio_plugin_client_Standalone.cpp ├── include_juce_audio_plugin_client_Unity.cpp ├── include_juce_audio_plugin_client_VST2.cpp ├── include_juce_audio_plugin_client_VST2.mm ├── include_juce_audio_plugin_client_VST3.cpp ├── include_juce_audio_plugin_client_VST3.mm ├── include_juce_audio_processors.cpp ├── include_juce_audio_processors.mm ├── include_juce_audio_processors_ara.cpp ├── include_juce_audio_processors_lv2_libs.cpp ├── include_juce_core.cpp ├── include_juce_core.mm ├── include_juce_core_CompilationTime.cpp ├── include_juce_data_structures.cpp ├── include_juce_data_structures.mm ├── include_juce_events.cpp ├── include_juce_events.mm ├── include_juce_graphics.cpp ├── include_juce_graphics.mm ├── include_juce_graphics_Harfbuzz.cpp ├── include_juce_gui_basics.cpp ├── include_juce_gui_basics.mm ├── include_juce_gui_extra.cpp └── include_juce_gui_extra.mm ├── LICENSE.txt ├── README.md ├── Source ├── Background.cpp ├── Background.h ├── NumberScreen.cpp ├── NumberScreen.h ├── PluginEditor.cpp ├── PluginEditor.h ├── PluginProcessor.cpp └── PluginProcessor.h └── res ├── bitdos_badge.png ├── bitdos_gui.png ├── bitdos_on.png ├── floppy_btn.png └── seg_7.otf /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd 364 | /Builds 365 | /bit.7z 366 | 367 | /.vscode 368 | /.vscode/** -------------------------------------------------------------------------------- /BitDos.jucer: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 25 | 27 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /JuceLibraryCode/BinaryData.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================================= 2 | 3 | This is an auto-generated file: Any edits you make may be overwritten! 4 | 5 | */ 6 | 7 | #pragma once 8 | 9 | namespace BinaryData 10 | { 11 | extern const char* bitdos_badge_png; 12 | const int bitdos_badge_pngSize = 23226; 13 | 14 | extern const char* bitdos_gui_png; 15 | const int bitdos_gui_pngSize = 8358640; 16 | 17 | extern const char* bitdos_on_png; 18 | const int bitdos_on_pngSize = 479348; 19 | 20 | extern const char* floppy_btn_png; 21 | const int floppy_btn_pngSize = 31283; 22 | 23 | extern const char* seg_7_otf; 24 | const int seg_7_otfSize = 10464; 25 | 26 | // Number of elements in the namedResourceList and originalFileNames arrays. 27 | const int namedResourceListSize = 5; 28 | 29 | // Points to the start of a list of resource names. 30 | extern const char* namedResourceList[]; 31 | 32 | // Points to the start of a list of resource filenames. 33 | extern const char* originalFilenames[]; 34 | 35 | // If you provide the name of one of the binary resource variables above, this function will 36 | // return the corresponding data and its size (or a null pointer if the name isn't found). 37 | const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes); 38 | 39 | // If you provide the name of one of the binary resource variables above, this function will 40 | // return the corresponding original, non-mangled filename (or a null pointer if the name isn't found). 41 | const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8); 42 | } 43 | -------------------------------------------------------------------------------- /JuceLibraryCode/JuceHeader.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | This is the header file that your files should include in order to get all the 7 | JUCE library headers. You should avoid including the JUCE headers directly in 8 | your own source files, because that wouldn't pick up the correct configuration 9 | options for your app. 10 | 11 | */ 12 | 13 | #pragma once 14 | 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #include "BinaryData.h" 27 | 28 | #if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION 29 | /** If you've hit this error then the version of the Projucer that was used to generate this project is 30 | older than the version of the JUCE modules being included. To fix this error, re-save your project 31 | using the latest version of the Projucer or, if you aren't using the Projucer to manage your project, 32 | remove the JUCE_PROJUCER_VERSION define. 33 | */ 34 | #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error." 35 | #endif 36 | 37 | 38 | #if ! JUCE_DONT_DECLARE_PROJECTINFO 39 | namespace ProjectInfo 40 | { 41 | const char* const projectName = "BitDOS"; 42 | const char* const companyName = ""; 43 | const char* const versionString = "1.0.0"; 44 | const int versionNumber = 0x10000; 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /JuceLibraryCode/JuceLV2Defines.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef JucePlugin_LV2URI 4 | #define JucePlugin_LV2URI "http://lv2plug.in/ns/ext/uri-map/BitDOS" 5 | #endif 6 | -------------------------------------------------------------------------------- /JuceLibraryCode/JucePluginDefines.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #pragma once 9 | 10 | //============================================================================== 11 | // Audio plugin settings.. 12 | 13 | #ifndef JucePlugin_Build_VST 14 | #define JucePlugin_Build_VST 0 15 | #endif 16 | #ifndef JucePlugin_Build_VST3 17 | #define JucePlugin_Build_VST3 1 18 | #endif 19 | #ifndef JucePlugin_Build_AU 20 | #define JucePlugin_Build_AU 0 21 | #endif 22 | #ifndef JucePlugin_Build_AUv3 23 | #define JucePlugin_Build_AUv3 0 24 | #endif 25 | #ifndef JucePlugin_Build_AAX 26 | #define JucePlugin_Build_AAX 0 27 | #endif 28 | #ifndef JucePlugin_Build_Standalone 29 | #define JucePlugin_Build_Standalone 0 30 | #endif 31 | #ifndef JucePlugin_Build_Unity 32 | #define JucePlugin_Build_Unity 0 33 | #endif 34 | #ifndef JucePlugin_Build_LV2 35 | #define JucePlugin_Build_LV2 1 36 | #endif 37 | #ifndef JucePlugin_Enable_IAA 38 | #define JucePlugin_Enable_IAA 0 39 | #endif 40 | #ifndef JucePlugin_Enable_ARA 41 | #define JucePlugin_Enable_ARA 0 42 | #endif 43 | #ifndef JucePlugin_Name 44 | #define JucePlugin_Name "BitDOS" 45 | #endif 46 | #ifndef JucePlugin_Desc 47 | #define JucePlugin_Desc "Bit-inversion Distortion" 48 | #endif 49 | #ifndef JucePlugin_Manufacturer 50 | #define JucePlugin_Manufacturer "_astriid_" 51 | #endif 52 | #ifndef JucePlugin_ManufacturerWebsite 53 | #define JucePlugin_ManufacturerWebsite "www.yourcompany.com" 54 | #endif 55 | #ifndef JucePlugin_ManufacturerEmail 56 | #define JucePlugin_ManufacturerEmail "" 57 | #endif 58 | #ifndef JucePlugin_ManufacturerCode 59 | #define JucePlugin_ManufacturerCode 0x4d616e75 60 | #endif 61 | #ifndef JucePlugin_PluginCode 62 | #define JucePlugin_PluginCode 0x56656f72 63 | #endif 64 | #ifndef JucePlugin_IsSynth 65 | #define JucePlugin_IsSynth 0 66 | #endif 67 | #ifndef JucePlugin_WantsMidiInput 68 | #define JucePlugin_WantsMidiInput 0 69 | #endif 70 | #ifndef JucePlugin_ProducesMidiOutput 71 | #define JucePlugin_ProducesMidiOutput 0 72 | #endif 73 | #ifndef JucePlugin_IsMidiEffect 74 | #define JucePlugin_IsMidiEffect 0 75 | #endif 76 | #ifndef JucePlugin_EditorRequiresKeyboardFocus 77 | #define JucePlugin_EditorRequiresKeyboardFocus 0 78 | #endif 79 | #ifndef JucePlugin_Version 80 | #define JucePlugin_Version 1.0.0 81 | #endif 82 | #ifndef JucePlugin_VersionCode 83 | #define JucePlugin_VersionCode 0x10000 84 | #endif 85 | #ifndef JucePlugin_VersionString 86 | #define JucePlugin_VersionString "1.0.0" 87 | #endif 88 | #ifndef JucePlugin_VSTUniqueID 89 | #define JucePlugin_VSTUniqueID JucePlugin_PluginCode 90 | #endif 91 | #ifndef JucePlugin_VSTCategory 92 | #define JucePlugin_VSTCategory kPlugCategEffect 93 | #endif 94 | #ifndef JucePlugin_Vst3Category 95 | #define JucePlugin_Vst3Category "Fx|Distortion" 96 | #endif 97 | #ifndef JucePlugin_AUMainType 98 | #define JucePlugin_AUMainType 'aufx' 99 | #endif 100 | #ifndef JucePlugin_AUSubType 101 | #define JucePlugin_AUSubType JucePlugin_PluginCode 102 | #endif 103 | #ifndef JucePlugin_AUExportPrefix 104 | #define JucePlugin_AUExportPrefix BitDOSAU 105 | #endif 106 | #ifndef JucePlugin_AUExportPrefixQuoted 107 | #define JucePlugin_AUExportPrefixQuoted "BitDOSAU" 108 | #endif 109 | #ifndef JucePlugin_AUManufacturerCode 110 | #define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode 111 | #endif 112 | #ifndef JucePlugin_CFBundleIdentifier 113 | #define JucePlugin_CFBundleIdentifier com.yourcompany.BitDOS 114 | #endif 115 | #ifndef JucePlugin_AAXIdentifier 116 | #define JucePlugin_AAXIdentifier com.yourcompany.BitDOS 117 | #endif 118 | #ifndef JucePlugin_AAXManufacturerCode 119 | #define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode 120 | #endif 121 | #ifndef JucePlugin_AAXProductId 122 | #define JucePlugin_AAXProductId JucePlugin_PluginCode 123 | #endif 124 | #ifndef JucePlugin_AAXCategory 125 | #define JucePlugin_AAXCategory 0 126 | #endif 127 | #ifndef JucePlugin_AAXDisableBypass 128 | #define JucePlugin_AAXDisableBypass 0 129 | #endif 130 | #ifndef JucePlugin_AAXDisableMultiMono 131 | #define JucePlugin_AAXDisableMultiMono 0 132 | #endif 133 | #ifndef JucePlugin_IAAType 134 | #define JucePlugin_IAAType 0x61757278 135 | #endif 136 | #ifndef JucePlugin_IAASubType 137 | #define JucePlugin_IAASubType JucePlugin_PluginCode 138 | #endif 139 | #ifndef JucePlugin_IAAName 140 | #define JucePlugin_IAAName "_astriid_: BitDOS" 141 | #endif 142 | #ifndef JucePlugin_VSTNumMidiInputs 143 | #define JucePlugin_VSTNumMidiInputs 16 144 | #endif 145 | #ifndef JucePlugin_VSTNumMidiOutputs 146 | #define JucePlugin_VSTNumMidiOutputs 16 147 | #endif 148 | #ifndef JucePlugin_ARAContentTypes 149 | #define JucePlugin_ARAContentTypes 0 150 | #endif 151 | #ifndef JucePlugin_ARATransformationFlags 152 | #define JucePlugin_ARATransformationFlags 0 153 | #endif 154 | #ifndef JucePlugin_ARAFactoryID 155 | #define JucePlugin_ARAFactoryID "com.yourcompany.BitDOS.factory" 156 | #endif 157 | #ifndef JucePlugin_ARADocumentArchiveID 158 | #define JucePlugin_ARADocumentArchiveID "com.yourcompany.BitDOS.aradocumentarchive.1.0.0" 159 | #endif 160 | #ifndef JucePlugin_ARACompatibleArchiveIDs 161 | #define JucePlugin_ARACompatibleArchiveIDs "" 162 | #endif 163 | -------------------------------------------------------------------------------- /JuceLibraryCode/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | Important Note!! 3 | ================ 4 | 5 | The purpose of this folder is to contain files that are auto-generated by the Projucer, 6 | and ALL files in this folder will be mercilessly DELETED and completely re-written whenever 7 | the Projucer saves your project. 8 | 9 | Therefore, it's a bad idea to make any manual changes to the files in here, or to 10 | put any of your own files in here if you don't want to lose them. (Of course you may choose 11 | to add the folder's contents to your version-control system so that you can re-merge your own 12 | modifications after the Projucer has saved its changes). 13 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_basics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_basics.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_AAX.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_AAX.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_AAX_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_ARA.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_AU_2.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_AUv3.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_LV2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_LV2.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_Unity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_VST2.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_plugin_client_VST3.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_processors.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_processors.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_processors_ara.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_core.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_core.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_core_CompilationTime.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_data_structures.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_data_structures.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_events.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_events.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_graphics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_graphics.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_graphics_Harfbuzz.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_gui_basics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_gui_basics.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_gui_extra.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /JuceLibraryCode/include_juce_gui_extra.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bit-Destruction of Sound 2 | 3 | An 8-bit distortion that will absolutely destroy whatever sound you run into it! 4 | 5 | ![image](https://github.com/astriiddev/BitDos/assets/98296288/cacb508d-5429-4782-9d19-3789b6e9d8d6) 6 | 7 | Click on any one of the 8 bits to invert it. Click it again and that bit will always be set to a hard zero no 8 | matter what is thrown into it. 9 | 10 | The further left the bit, the louder and more intense the distortion. 11 | And by loud I mean LOUD. 12 | 13 | Reset the bit back to normal mode by clicking it one more time after it's set to "hard zero" mode. 14 | 15 | (Hint: green is normal mode for that bit, amber is inverted mode, and red is hard zero mode) 16 | 17 | Change input and output volume as well as wet/dry blend by clicking on the BitDOS logo. 18 | Change the mode from unsigned 8bits to signed 8bits by clicking the floppy drive. 19 | 20 | ![image](https://github.com/astriiddev/BitDOS/assets/98296288/02fd438b-adc0-4ab7-b6f4-1df40d8a9948) 21 | 22 | (Hint: green floppy LED is unsigned mode, red is signed mode) 23 | 24 | Perfect for industrial, EBM, harsh noise wall, or whatever genre where you just wanna destroy your sound! 25 | 26 | 27 | Donate with PayPal 28 | 29 | -------------------------------------------------------------------------------- /Source/Background.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | Background.cpp 5 | Created: 24 Sep 2023 12:02:56pm 6 | Author: _astriid_ 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #include 12 | #include "Background.h" 13 | 14 | //============================================================================== 15 | Background::Background(BitDosAudioProcessor& p) : audioProcessor(p) 16 | { 17 | const juce::Image bg = juce::ImageCache::getFromMemory(BinaryData::bitdos_gui_png, BinaryData::bitdos_gui_pngSize); 18 | 19 | addAndMakeVisible(bgImg); 20 | 21 | if (!bg.isNull()) 22 | bgImg.setImage(bg, juce::RectanglePlacement::stretchToFit); 23 | else 24 | jassert(!bg.isNull()); 25 | 26 | initImgButton(&bdgBtn,1.0f, 1.0f, BinaryData::bitdos_badge_png, BinaryData::bitdos_badge_pngSize); 27 | initImgButton(&fpBtn, 0.0f, 1.0f, BinaryData::floppy_btn_png, BinaryData::floppy_btn_pngSize); 28 | initImgButton(&onBtn, 1.0f, 0.0f, BinaryData::bitdos_on_png, BinaryData::bitdos_on_pngSize); 29 | 30 | bgImg.setBufferedToImage(true); 31 | 32 | onBtn.setClickingTogglesState(true); 33 | setRepaintsOnMouseActivity(false); 34 | } 35 | 36 | Background::~Background() 37 | { 38 | } 39 | 40 | void Background::paintOverChildren(juce::Graphics& g) 41 | { 42 | if (audioProcessor.getBypassState()) 43 | { 44 | onBtn.setToggleState(true, juce::NotificationType::dontSendNotification); 45 | return; 46 | } 47 | 48 | if (audioProcessor.inSignedMode()) 49 | g.setColour(juce::Colour(0x80DD0000)); 50 | else 51 | g.setColour(juce::Colour(0x5000DD00)); 52 | 53 | if (fpBtn.getState() != juce::Button::buttonDown) 54 | g.fillRect(onLED); 55 | } 56 | 57 | void Background::resized() 58 | { 59 | bgImg.setBounds(0, 0, 720, 526); 60 | onBtn.setBounds(485, 278, 147, 144); 61 | fpBtn.setBounds(350, 87, 65, 23); 62 | bdgBtn.setBounds(550, 70, 100, 100); 63 | } 64 | 65 | void Background::buttonClicked(juce::Button* button) 66 | { 67 | if (button == &onBtn) 68 | { 69 | audioProcessor.setBypassState(); 70 | repaint(); 71 | } 72 | 73 | if (audioProcessor.getBypassState()) return; 74 | 75 | if (button == &fpBtn) 76 | { 77 | audioProcessor.setSignedMode(); 78 | repaint(onLED); 79 | } 80 | 81 | if (button == &bdgBtn) 82 | { 83 | audioProcessor.setBitMode(); 84 | repaint(100, 375, 400, 100); 85 | } 86 | } 87 | 88 | void Background::initImgButton(juce::ImageButton* b, const float up, const float down, const void* imgData, const int dataSize) 89 | { 90 | juce::Image img; 91 | 92 | jassert(b != nullptr); 93 | jassert(imgData != nullptr); 94 | 95 | img = juce::ImageCache::getFromMemory(imgData, dataSize); 96 | 97 | if (img.isNull()) 98 | { 99 | jassert(!img.isNull()); 100 | return; 101 | } 102 | 103 | addAndMakeVisible(*b); 104 | 105 | b->addListener(this); 106 | b->setRepaintsOnMouseActivity(false); 107 | b->setMouseCursor(juce::MouseCursor::PointingHandCursor); 108 | 109 | b->setImages(true, true, true, 110 | img, up, juce::Colours::transparentWhite, 111 | img, up, juce::Colours::transparentWhite, 112 | img, down, juce::Colours::transparentWhite); 113 | } 114 | -------------------------------------------------------------------------------- /Source/Background.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | Background.h 5 | Created: 24 Sep 2023 12:02:56pm 6 | Author: _astriid_ 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include "PluginProcessor.h" 15 | 16 | //============================================================================== 17 | /* 18 | */ 19 | class Background : public juce::Component, 20 | public juce::Button::Listener 21 | { 22 | public: 23 | Background(BitDosAudioProcessor&); 24 | ~Background() override; 25 | 26 | void paintOverChildren(juce::Graphics&) override; 27 | 28 | void resized() override; 29 | 30 | private: 31 | void buttonClicked(juce::Button* button) override; 32 | void mouseMove(const juce::MouseEvent&) override {} 33 | 34 | void initImgButton(juce::ImageButton*, const float up, const float down, const void* imgData, const int dataSize); 35 | 36 | juce::ImageComponent bgImg; 37 | 38 | juce::ImageButton onBtn, fpBtn, bdgBtn; 39 | 40 | const juce::Rectangle onLED{ 122, 94, 23, 10 }; 41 | 42 | BitDosAudioProcessor& audioProcessor; 43 | 44 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Background) 45 | }; 46 | -------------------------------------------------------------------------------- /Source/NumberScreen.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | NumberScreen.cpp 5 | Created: 24 Sep 2023 1:08:06am 6 | Author: _astriid_ 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #include 12 | #include "NumberScreen.h" 13 | 14 | //============================================================================== 15 | NumberScreen::NumberScreen(BitDosAudioProcessor& p) : audioProcessor(p) 16 | { 17 | startTimer(60); 18 | 19 | bitInit(); 20 | } 21 | 22 | NumberScreen::~NumberScreen() 23 | { 24 | } 25 | 26 | void NumberScreen::paint (juce::Graphics& g) 27 | { 28 | 29 | if (audioProcessor.getBypassState()) 30 | { 31 | if (getMouseCursor() != juce::MouseCursor::NormalCursor) 32 | setMouseCursor(juce::MouseCursor::NormalCursor); 33 | 34 | return; 35 | } 36 | 37 | currentSample = audioProcessor.getBitSample(); 38 | 39 | g.setFont(sevenSegFont.withHeight(83.f)); 40 | 41 | g.setColour(juce::Colour(0xad00102b)); 42 | 43 | g.drawText("88888888", screenNums, juce::Justification::topLeft, false); 44 | 45 | if(audioProcessor.inBitMode()) 46 | { 47 | for (int i = 7; i >= 0; i--) 48 | { 49 | const char bitScreen[] = { static_cast(0x30 + ((currentSample & (1 << i)) >> i)), '\0' }; 50 | 51 | g.setColour(bits[i].color); 52 | g.drawText(juce::String(bitScreen, 2), bits[i].rect, juce::Justification::topLeft, false); 53 | 54 | g.setColour(juce::Colour(0x20d3d3d3)); 55 | 56 | if (bits[i].rect.contains(getMouseXYRelative())) 57 | { 58 | setMouseCursor(juce::MouseCursor::PointingHandCursor); 59 | g.fillRect(bits[i].rect); 60 | } 61 | } 62 | } 63 | else 64 | { 65 | volEdit(g, 7, 6, (audioProcessor.getPreGain() * 127.5f), editingPreGain); 66 | volEdit(g, 4, 3, (audioProcessor.getPostGain() * 127.5f), editingPostGain); 67 | volEdit(g, 1, 0, (audioProcessor.getBlend() * 255.0f), editingBlend); 68 | 69 | g.setColour(LED_WHT); 70 | 71 | g.setFont(sansFont); 72 | g.drawText("PRE GAIN", juce::Rectangle( 20, 100, 80, 20), juce::Justification::topLeft, false); 73 | g.drawText("POST GAIN", juce::Rectangle(162, 100, 100, 20), juce::Justification::topLeft, false); 74 | g.drawText("BLEND", juce::Rectangle(322, 100, 60, 20), juce::Justification::topLeft, false); 75 | } 76 | 77 | } 78 | 79 | void NumberScreen::resized() 80 | { 81 | } 82 | 83 | void NumberScreen::volEdit(juce::Graphics& g, int bit1, int bit2, float param, bool isEditing) 84 | { 85 | uint8_t float2nib = (uint8_t)std::round(param); 86 | 87 | juce::String bitScreen = juce::String::toHexString((float2nib & ~0x0F) >> 4).toUpperCase(); 88 | 89 | g.setColour(juce::Colour(0xFFBBBBBB)); 90 | 91 | g.drawText(bitScreen, bits[bit1].rect, juce::Justification::topLeft, false); 92 | 93 | bitScreen = juce::String::toHexString(float2nib & ~0xF0).toUpperCase(); 94 | 95 | g.drawText(bitScreen, bits[bit2].rect, juce::Justification::topLeft, false); 96 | 97 | if ((bits[bit1].rect.contains(getMouseXYRelative()) || bits[bit2].rect.contains(getMouseXYRelative())) || 98 | isEditing) 99 | { 100 | setMouseCursor(juce::MouseCursor::PointingHandCursor); 101 | g.setColour(juce::Colour(0x20d3d3d3)); 102 | g.fillRect(bits[bit1].rect); 103 | g.fillRect(bits[bit2].rect); 104 | } 105 | } 106 | 107 | void NumberScreen::mouseDown(const juce::MouseEvent& e) 108 | { 109 | const juce::Point mouseDownPos = e.getMouseDownPosition(); 110 | const int numClicks = e.getNumberOfClicks(); 111 | 112 | lastMouseY = e.position.y; 113 | 114 | if(audioProcessor.inBitMode()) 115 | { 116 | for (int i = 7; i >= 0; i--) 117 | { 118 | if (bits[i].rect.contains(mouseDownPos)) 119 | { 120 | if (!audioProcessor.getBypassState()) 121 | handleBitClick(i); 122 | } 123 | } 124 | } 125 | else 126 | { 127 | if (bits[7].rect.contains(mouseDownPos) || 128 | bits[6].rect.contains(mouseDownPos)) 129 | { 130 | editingPreGain = true; 131 | 132 | if (numClicks >= 2) 133 | { 134 | audioProcessor.setPreGain(1.0f); 135 | repaint(bits[7].rect); 136 | repaint(bits[6].rect); 137 | } 138 | } 139 | 140 | else if (bits[4].rect.contains(mouseDownPos) || 141 | bits[3].rect.contains(mouseDownPos)) 142 | { 143 | editingPostGain = true; 144 | 145 | if (numClicks >= 2) 146 | { 147 | audioProcessor.setPostGain(1.0f); 148 | repaint(bits[4].rect); 149 | repaint(bits[3].rect); 150 | } 151 | } 152 | 153 | else if (bits[1].rect.contains(mouseDownPos) || 154 | bits[0].rect.contains(mouseDownPos)) 155 | { 156 | editingBlend = true; 157 | 158 | if (numClicks >= 2) 159 | { 160 | audioProcessor.setBlend(1.0f); 161 | repaint(bits[1].rect); 162 | repaint(bits[0].rect); 163 | } 164 | } 165 | } 166 | } 167 | 168 | void NumberScreen::mouseMove(const juce::MouseEvent& e) 169 | { 170 | const juce::Point mousePos = e.getPosition(); 171 | mouseOverBit = -1; 172 | 173 | for (int i = 7; i >= 0; i--) 174 | { 175 | if (bits[i].rect.contains(mousePos)) 176 | { 177 | mouseOverBit = i; 178 | } 179 | } 180 | 181 | if (!audioProcessor.inBitMode() && getMouseCursor() != juce::MouseCursor::NormalCursor) 182 | if(mouseOverBit == 5 || mouseOverBit == 2) 183 | setMouseCursor(juce::MouseCursor::NormalCursor); 184 | } 185 | 186 | void NumberScreen::mouseDrag(const juce::MouseEvent& e) 187 | { 188 | float gainChange = 0.0f; 189 | 190 | if (audioProcessor.inBitMode()) return; 191 | 192 | gainChange = (lastMouseY - e.position.y) / 400.f; 193 | 194 | if (editingPreGain) 195 | audioProcessor.setPreGain(audioProcessor.getPreGain() + gainChange); 196 | 197 | if (editingPostGain) 198 | audioProcessor.setPostGain(audioProcessor.getPostGain() + gainChange); 199 | 200 | if (editingBlend) 201 | audioProcessor.setBlend(audioProcessor.getBlend() + gainChange); 202 | 203 | lastMouseY = e.position.y; 204 | } 205 | 206 | void NumberScreen::mouseUp(const juce::MouseEvent&) 207 | { 208 | if (editingPreGain) editingPreGain = false; 209 | if (editingPostGain) editingPostGain = false; 210 | if (editingBlend) editingBlend = false; 211 | } 212 | 213 | void NumberScreen::mouseExit(const juce::MouseEvent&) 214 | { 215 | for (int i = 7; i >= 0; i--) 216 | repaint(bits[i].rect); 217 | 218 | mouseOverBit = -1; 219 | } 220 | 221 | void NumberScreen::handleBitClick(int bit) 222 | { 223 | switch (audioProcessor.getBitSet(bit)) 224 | { 225 | case (NORMAL_BIT): 226 | audioProcessor.setBitInvert(bit); 227 | 228 | bits[bit].color = LED_AMB; 229 | audioProcessor.setBitSet(INVERT_BIT, bit); 230 | break; 231 | 232 | case (INVERT_BIT): 233 | 234 | audioProcessor.setBitZeroed(bit); 235 | 236 | bits[bit].color = LED_RED; 237 | audioProcessor.setBitSet(HARD_0_BIT, bit); 238 | break; 239 | 240 | case (HARD_0_BIT): 241 | 242 | audioProcessor.resetBit(bit); 243 | 244 | bits[bit].color = LED_GRN; 245 | audioProcessor.setBitSet(NORMAL_BIT, bit); 246 | break; 247 | } 248 | 249 | repaint(bits[bit].rect); 250 | } 251 | 252 | void NumberScreen::bitInit() 253 | { 254 | for (int i = 7; i >= 0; i--) 255 | { 256 | 257 | switch (audioProcessor.getBitSet(i)) 258 | { 259 | case (NORMAL_BIT): 260 | 261 | bits[i].color = LED_GRN; 262 | break; 263 | 264 | case (INVERT_BIT): 265 | 266 | bits[i].color = LED_AMB; 267 | break; 268 | 269 | case (HARD_0_BIT): 270 | 271 | bits[i].color = LED_RED; 272 | break; 273 | } 274 | } 275 | } 276 | 277 | void NumberScreen::timerCallback() 278 | { 279 | if (audioProcessor.getBypassState()) return; 280 | 281 | const juce::Point mousePos = getMouseXYRelative(); 282 | const float currRealSamp = audioProcessor.getCurrentSample(); 283 | const bool currBitMode = audioProcessor.inBitMode(); 284 | 285 | if (lastMode == currBitMode && lastSamp == currRealSamp) 286 | if (!(lastMousePos != mousePos && mouseOverBit > -1)) return; 287 | 288 | for (int i = 7; i >= 0; i--) 289 | repaint(bits[i].rect); 290 | 291 | lastMode = currBitMode; 292 | lastMousePos = mousePos; 293 | lastSamp = currRealSamp; 294 | } 295 | -------------------------------------------------------------------------------- /Source/NumberScreen.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | NumberScreen.h 5 | Created: 24 Sep 2023 1:08:06am 6 | Author: _astriid_ 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include "PluginProcessor.h" 15 | 16 | //============================================================================== 17 | /* 18 | */ 19 | class NumberScreen : public juce::Component, 20 | juce::Timer 21 | { 22 | public: 23 | NumberScreen(BitDosAudioProcessor&); 24 | ~NumberScreen() override; 25 | 26 | void paint (juce::Graphics&) override; 27 | void resized() override; 28 | 29 | void volEdit(juce::Graphics&, int bit1, int bit2, float param, bool isEditing); 30 | 31 | void mouseDown(const juce::MouseEvent& e) override; 32 | void mouseMove(const juce::MouseEvent& e) override; 33 | void mouseDrag(const juce::MouseEvent& e) override; 34 | void mouseUp(const juce::MouseEvent& e) override; 35 | void mouseExit(const juce::MouseEvent& e) override; 36 | 37 | void handleBitClick(int bit); 38 | 39 | private: 40 | void bitInit(); 41 | void timerCallback() override; 42 | 43 | const juce::Font sansFont = juce::Font(juce::FontOptions(juce::Font::getDefaultSansSerifFontName(), 18.0f, juce::Font::plain)); 44 | const juce::Font sevenSegFont = juce::Font(juce::FontOptions(juce::Typeface::createSystemTypefaceFor(BinaryData::seg_7_otf, BinaryData::seg_7_otfSize))); 45 | 46 | uint8_t currentSample{ 0 }; 47 | 48 | bool editingPreGain { false }, 49 | editingPostGain{ false }, 50 | editingBlend { false }, 51 | lastMode { false }; 52 | 53 | const int bitW{ 49 }, bitY{ 12 }, bitH{ 70 }; 54 | int mouseOverBit{ -1 }; 55 | 56 | typedef struct 57 | { 58 | const juce::Rectangle rect; 59 | juce::Colour color; 60 | } BitScreen; 61 | 62 | const juce::Colour LED_RED = juce::Colour(0xFFBB0000), 63 | LED_GRN = juce::Colour(0xFF00BB00), 64 | LED_AMB = juce::Colour(0xFFD26200), 65 | LED_WHT = juce::Colour(0xFFBBBBBB); 66 | 67 | BitScreen bits[8] = { {{ 352, bitY, bitW, bitH }, LED_GRN }, 68 | {{ 304, bitY, bitW, bitH }, LED_GRN }, 69 | {{ 255, bitY, bitW, bitH }, LED_GRN }, 70 | {{ 206, bitY, bitW, bitH }, LED_GRN }, 71 | {{ 157, bitY, bitW, bitH }, LED_GRN }, 72 | {{ 108, bitY, bitW, bitH }, LED_GRN }, 73 | {{ 59, bitY, bitW, bitH }, LED_GRN }, 74 | {{ 10, bitY, bitW, bitH }, LED_GRN } }; 75 | 76 | const juce::Rectangle screenNums { 10, bitY, 388, bitH }; 77 | 78 | float lastMouseY = 0.0f, lastSamp = 0.0f; 79 | juce::Point lastMousePos = { 0, 0 }; 80 | 81 | BitDosAudioProcessor& audioProcessor; 82 | 83 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NumberScreen) 84 | }; 85 | -------------------------------------------------------------------------------- /Source/PluginEditor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | This file contains the basic framework code for a JUCE plugin editor. 5 | 6 | ============================================================================== 7 | */ 8 | 9 | #include "PluginProcessor.h" 10 | #include "PluginEditor.h" 11 | 12 | //============================================================================== 13 | BitDosAudioProcessorEditor::BitDosAudioProcessorEditor (BitDosAudioProcessor& p) 14 | : AudioProcessorEditor (&p), background(p), display(p), audioProcessor (p) 15 | { 16 | addAndMakeVisible(background); 17 | addAndMakeVisible(display); 18 | 19 | addMouseListener(&display, false); 20 | 21 | setSize(720, 526); 22 | 23 | setWantsKeyboardFocus(false); 24 | } 25 | 26 | BitDosAudioProcessorEditor::~BitDosAudioProcessorEditor() 27 | { 28 | } 29 | 30 | //============================================================================== 31 | void BitDosAudioProcessorEditor::paint (juce::Graphics&) 32 | { 33 | } 34 | 35 | void BitDosAudioProcessorEditor::paintOverChildren(juce::Graphics& g) 36 | { 37 | if(audioProcessor.getBypassState()) 38 | { 39 | g.setColour(juce::Colour(0x40000000)); 40 | g.fillAll(); 41 | } 42 | } 43 | 44 | void BitDosAudioProcessorEditor::resized() 45 | { 46 | background.setBounds(0, 0, 720, 526); 47 | display.setBounds(88, 307, 412, 130); 48 | } -------------------------------------------------------------------------------- /Source/PluginEditor.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | This file contains the basic framework code for a JUCE plugin editor. 5 | 6 | ============================================================================== 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | #include "PluginProcessor.h" 13 | #include "NumberScreen.h" 14 | #include "Background.h" 15 | 16 | //============================================================================== 17 | /** 18 | */ 19 | class BitDosAudioProcessorEditor : public juce::AudioProcessorEditor 20 | { 21 | public: 22 | BitDosAudioProcessorEditor (BitDosAudioProcessor&); 23 | ~BitDosAudioProcessorEditor() override; 24 | 25 | //============================================================================== 26 | void paint (juce::Graphics&) override; 27 | void paintOverChildren(juce::Graphics&) override; 28 | void resized() override; 29 | 30 | private: 31 | void mouseMove(const juce::MouseEvent&) override {} 32 | 33 | Background background; 34 | NumberScreen display; 35 | 36 | 37 | BitDosAudioProcessor& audioProcessor; 38 | 39 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BitDosAudioProcessorEditor) 40 | }; 41 | -------------------------------------------------------------------------------- /Source/PluginProcessor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | This file contains the basic framework code for a JUCE plugin processor. 5 | 6 | ============================================================================== 7 | */ 8 | 9 | #include "PluginProcessor.h" 10 | #include "PluginEditor.h" 11 | 12 | //============================================================================== 13 | BitDosAudioProcessor::BitDosAudioProcessor() 14 | #ifndef JucePlugin_PreferredChannelConfigurations 15 | : AudioProcessor (BusesProperties() 16 | #if ! JucePlugin_IsMidiEffect 17 | #if ! JucePlugin_IsSynth 18 | .withInput ("Input", juce::AudioChannelSet::stereo(), true) 19 | #endif 20 | .withOutput ("Output", juce::AudioChannelSet::stereo(), true) 21 | #endif 22 | ), APVTS(*this, nullptr, "Parameters", createParameters()) 23 | #endif 24 | { 25 | APVTS.state.addListener(this); 26 | } 27 | 28 | BitDosAudioProcessor::~BitDosAudioProcessor() 29 | { 30 | } 31 | 32 | //============================================================================== 33 | const juce::String BitDosAudioProcessor::getName() const 34 | { 35 | return JucePlugin_Name; 36 | } 37 | 38 | bool BitDosAudioProcessor::acceptsMidi() const 39 | { 40 | #if JucePlugin_WantsMidiInput 41 | return true; 42 | #else 43 | return false; 44 | #endif 45 | } 46 | 47 | bool BitDosAudioProcessor::producesMidi() const 48 | { 49 | #if JucePlugin_ProducesMidiOutput 50 | return true; 51 | #else 52 | return false; 53 | #endif 54 | } 55 | 56 | bool BitDosAudioProcessor::isMidiEffect() const 57 | { 58 | #if JucePlugin_IsMidiEffect 59 | return true; 60 | #else 61 | return false; 62 | #endif 63 | } 64 | 65 | double BitDosAudioProcessor::getTailLengthSeconds() const 66 | { 67 | return 0.0; 68 | } 69 | 70 | int BitDosAudioProcessor::getNumPrograms() 71 | { 72 | return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs, 73 | // so this should be at least 1, even if you're not really implementing programs. 74 | } 75 | 76 | int BitDosAudioProcessor::getCurrentProgram() 77 | { 78 | return 0; 79 | } 80 | 81 | void BitDosAudioProcessor::setCurrentProgram (int) 82 | { 83 | } 84 | 85 | const juce::String BitDosAudioProcessor::getProgramName (int) 86 | { 87 | return {}; 88 | } 89 | 90 | void BitDosAudioProcessor::changeProgramName (int, const juce::String&) 91 | { 92 | } 93 | 94 | //============================================================================== 95 | void BitDosAudioProcessor::prepareToPlay (double, int) 96 | { 97 | } 98 | 99 | void BitDosAudioProcessor::releaseResources() 100 | { 101 | // When playback stops, you can use this as an opportunity to free up any 102 | // spare memory, etc. 103 | } 104 | 105 | #ifndef JucePlugin_PreferredChannelConfigurations 106 | bool BitDosAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const 107 | { 108 | #if JucePlugin_IsMidiEffect 109 | juce::ignoreUnused (layouts); 110 | return true; 111 | #else 112 | // This is the place where you check if the layout is supported. 113 | // In this template code we only support mono or stereo. 114 | // Some plugin hosts, such as certain GarageBand versions, will only 115 | // load plugins that support stereo bus layouts. 116 | if (layouts.getMainOutputChannelSet() != juce::AudioChannelSet::mono() 117 | && layouts.getMainOutputChannelSet() != juce::AudioChannelSet::stereo()) 118 | return false; 119 | 120 | // This checks if the input layout matches the output layout 121 | #if ! JucePlugin_IsSynth 122 | if (layouts.getMainOutputChannelSet() != layouts.getMainInputChannelSet()) 123 | return false; 124 | #endif 125 | 126 | return true; 127 | #endif 128 | } 129 | #endif 130 | 131 | static int_fast8_t clamp_int8(const int_fast16_t samp) 132 | { 133 | if ((int_fast8_t)samp == samp) return (int_fast8_t)samp; 134 | else return (int_fast8_t)(INT8_MAX ^ (samp >> 4)); 135 | } 136 | 137 | static uint_fast8_t clamp_uint8(const int_fast16_t samp) 138 | { 139 | if ((uint_fast8_t)samp == samp) return (uint_fast8_t)samp; 140 | else return (uint_fast8_t)(UINT8_MAX ^ (samp >> 4)); 141 | } 142 | 143 | static float clamp_float(const float samp) 144 | { 145 | return samp > 1 ? 1.0f : samp < -1 ? -1.0f : samp; 146 | } 147 | 148 | void BitDosAudioProcessor::processBlock (juce::AudioBuffer& buffer, juce::MidiBuffer&) 149 | { 150 | const int totalNumInputChannels = getTotalNumInputChannels(); 151 | const int totalNumOutputChannels = getTotalNumOutputChannels(); 152 | 153 | const float* inL = buffer.getReadPointer(0); 154 | const float* inR = totalNumInputChannels > 1 ? buffer.getReadPointer(1) : nullptr; 155 | 156 | float* outL = buffer.getWritePointer(0); 157 | float* outR = totalNumOutputChannels > 1 ? buffer.getWritePointer(1) : nullptr; 158 | 159 | int numSamples = buffer.getNumSamples(); 160 | 161 | for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i) 162 | buffer.clear (i, 0, buffer.getNumSamples()); 163 | 164 | if (isBypassed) return; 165 | 166 | while (--numSamples >= 0) 167 | { 168 | float out[2] = { 0.f, 0.f }; 169 | 170 | float sampL = *inL++; 171 | float sampR = inR == nullptr ? sampL : *inR++; 172 | 173 | uint8_t bitSampleR = 0; 174 | 175 | currentSample = sampL == 0.f ? sampR : sampL; 176 | 177 | if (std::abs(sampL) <= 0.01f && std::abs(sampR) <= 0.01f) 178 | { 179 | bitSample = 0; 180 | muteCounter += 1.f; 181 | } 182 | else if (bitZeroed == 255) 183 | { 184 | bitSample = 0; 185 | muteCounter += 1.f; 186 | } 187 | else muteCounter = 0.f; 188 | 189 | if (signedMode) 190 | { 191 | bitSample = (clamp_int8((int_fast16_t)((sampL * preGain) * 127.5f)) ^ bitInvert) & ~bitZeroed; 192 | bitSampleR = (clamp_int8((int_fast16_t)((sampR * preGain) * 127.5f)) ^ bitInvert) & ~bitZeroed; 193 | 194 | out[0] = clamp_float(((blend * ((float)(int_fast8_t)bitSample / 128)) + (sampL * -(blend - 1))) * postGain); 195 | out[1] = clamp_float(((blend * ((float)(int_fast8_t)bitSampleR / 128)) + (sampR * -(blend - 1))) * postGain); 196 | } 197 | else 198 | { 199 | bitSample = (clamp_uint8((int_fast16_t)(((sampL * preGain) + 1.0) * 127.5f)) ^ bitInvert) & ~bitZeroed; 200 | bitSampleR = (clamp_uint8((int_fast16_t)(((sampR * preGain) + 1.0) * 127.5f)) ^ bitInvert) & ~bitZeroed; 201 | 202 | out[0] = clamp_float(((blend * (((float)bitSample / 128) - 1.0f)) + (sampL * -(blend - 1))) * postGain); 203 | out[1] = clamp_float(((blend * (((float)bitSampleR / 128) - 1.0f)) + (sampR * -(blend - 1))) * postGain); 204 | } 205 | 206 | if (sampL == 0.f) bitSample = bitSampleR; 207 | 208 | if (outR == nullptr) 209 | { 210 | *outL++ = muteCounter >= 128.f ? (out[0] + out[1]) * 64.f / muteCounter : (out[0] + out[1]) * 0.5f; 211 | } 212 | else 213 | { 214 | *outL++ = muteCounter >= 128.f ? out[0] * 128.f / muteCounter : out[0]; 215 | *outR++ = muteCounter >= 128.f ? out[1] * 128.f / muteCounter : out[1]; 216 | } 217 | } 218 | 219 | } 220 | 221 | //============================================================================== 222 | bool BitDosAudioProcessor::hasEditor() const 223 | { 224 | return true; // (change this to false if you choose to not supply an editor) 225 | } 226 | 227 | juce::AudioProcessorEditor* BitDosAudioProcessor::createEditor() 228 | { 229 | return new BitDosAudioProcessorEditor (*this); 230 | } 231 | 232 | //============================================================================== 233 | void BitDosAudioProcessor::getStateInformation (juce::MemoryBlock& destData) 234 | { 235 | auto state = APVTS.copyState(); 236 | std::unique_ptr xml(state.createXml()); 237 | 238 | for(int i = 0; i < xml->getNumChildElements(); i++) 239 | { 240 | juce::String attrib(xml->getChildElement(i)->getStringAttribute("id")); 241 | if(attrib.isEmpty()) continue; 242 | if(!attrib.contains(" ")) continue; 243 | xml->removeChildElement(xml->getChildElement(i), true); 244 | } 245 | 246 | copyXmlToBinary(*xml, destData); 247 | } 248 | 249 | void BitDosAudioProcessor::setStateInformation (const void* data, int sizeInBytes) 250 | { 251 | std::unique_ptr xmlState(getXmlFromBinary(data, sizeInBytes)); 252 | 253 | if (xmlState.get() == nullptr) return; 254 | if (!xmlState->hasTagName(APVTS.state.getType())) return; 255 | 256 | APVTS.replaceState(juce::ValueTree::fromXml(*xmlState)); 257 | 258 | for(int i = 0; i < APVTS.state.getNumChildren(); i++) 259 | { 260 | juce::ValueTree param = APVTS.state.getChild(i); 261 | if (param.getNumProperties() < 2) continue; 262 | valueTreePropertyChanged(param, param.getPropertyName(1)); 263 | } 264 | 265 | signedMode = APVTS.state.getProperty("mode").operator bool(); 266 | isBypassed = APVTS.state.getProperty("bypass").operator bool(); 267 | } 268 | 269 | std::unique_ptr BitDosAudioProcessor::createParam(const juce::String& name, const int min, const int max, const int def) 270 | { 271 | return std::make_unique(juce::ParameterID{ name.toUpperCase(), 1 }, name, min, max, def); 272 | } 273 | 274 | std::unique_ptr BitDosAudioProcessor::createParam(const juce::String &name, const float& min, const float& max, const float& inc, const float def) 275 | { 276 | return std::make_unique(juce::ParameterID{ name.toUpperCase(), 1 }, name, juce::NormalisableRange(min, max, inc), def); 277 | } 278 | 279 | juce::AudioProcessorValueTreeState::ParameterLayout BitDosAudioProcessor::createParameters() 280 | { 281 | std::vector> parameters(11); 282 | 283 | for (int i = 7; i >= 0; i--) 284 | { 285 | const char bitTxt[] = { 'B', 'i', 't', static_cast(i + 0x31), '\0' }; 286 | parameters.operator[](i) = createParam(juce::String(bitTxt, 5), 1, 3, 1); 287 | } 288 | 289 | parameters.operator[](8) = createParam("PreGain", 0.0f, 2.0f, 0.001f, 1.0f); 290 | parameters.operator[](9) = createParam("PostGain", 0.0f, 2.0f, 0.001f, 1.0f); 291 | parameters.operator[](10) = createParam("Blend", 0.0f, 2.0f, 0.001f, 1.0f); 292 | 293 | return { parameters.begin(), parameters.end() }; 294 | } 295 | 296 | void BitDosAudioProcessor::valueTreePropertyChanged(juce::ValueTree& treeWhosePropertyHasChanged, const juce::Identifier& property) 297 | { 298 | const char* changedParam = treeWhosePropertyHasChanged.getProperty(treeWhosePropertyHasChanged.getPropertyName(0)).toString().toRawUTF8(); 299 | const juce::var paramVal = treeWhosePropertyHasChanged.getProperty(property); 300 | 301 | if(std::strstr(changedParam, "BIT") != nullptr) 302 | { 303 | const int bit = changedParam[3] == ' ' ? changedParam[4] : changedParam[3]; 304 | readBits(bit - 0x31, static_cast(paramVal.operator int())); 305 | return; 306 | } 307 | 308 | if(std::strstr(changedParam, "PRE") != nullptr) 309 | { 310 | preGain.store(paramVal.operator float()); 311 | return; 312 | } 313 | 314 | if(std::strstr(changedParam, "POST") != nullptr) 315 | { 316 | postGain.store(paramVal.operator float()); 317 | return; 318 | } 319 | 320 | if(std::strstr(changedParam, "BLEND") != nullptr) 321 | { 322 | blend.store(paramVal.operator float()); 323 | return; 324 | } 325 | } 326 | 327 | void BitDosAudioProcessor::readBits(const int bit, const BitSelect select) 328 | { 329 | bitSet[bit] = select; 330 | 331 | switch (bitSet[bit]) 332 | { 333 | case (NORMAL_BIT): 334 | 335 | resetBit(bit); 336 | break; 337 | 338 | case (INVERT_BIT): 339 | 340 | setBitInvert(bit); 341 | break; 342 | 343 | case (HARD_0_BIT): 344 | 345 | setBitZeroed(bit); 346 | break; 347 | } 348 | } 349 | 350 | //============================================================================== 351 | // This creates new instances of the plugin.. 352 | juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter() 353 | { 354 | return new BitDosAudioProcessor(); 355 | } 356 | -------------------------------------------------------------------------------- /Source/PluginProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | This file contains the basic framework code for a JUCE plugin processor. 5 | 6 | ============================================================================== 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | //============================================================================== 14 | /** 15 | */ 16 | 17 | typedef enum 18 | { 19 | NORMAL_BIT = 1, 20 | INVERT_BIT = 2, 21 | HARD_0_BIT = 3 22 | 23 | } BitSelect; 24 | 25 | class BitDosAudioProcessor : public juce::AudioProcessor, 26 | public juce::ValueTree::Listener 27 | #if JucePlugin_Enable_ARA 28 | , public juce::AudioProcessorARAExtension 29 | #endif 30 | { 31 | public: 32 | //============================================================================== 33 | BitDosAudioProcessor(); 34 | ~BitDosAudioProcessor() override; 35 | 36 | //============================================================================== 37 | void prepareToPlay (double sampleRate, int samplesPerBlock) override; 38 | void releaseResources() override; 39 | 40 | #ifndef JucePlugin_PreferredChannelConfigurations 41 | bool isBusesLayoutSupported (const BusesLayout& layouts) const override; 42 | #endif 43 | 44 | void processBlock (juce::AudioBuffer&, juce::MidiBuffer&) override; 45 | 46 | //============================================================================== 47 | juce::AudioProcessorEditor* createEditor() override; 48 | bool hasEditor() const override; 49 | 50 | //============================================================================== 51 | const juce::String getName() const override; 52 | 53 | bool acceptsMidi() const override; 54 | bool producesMidi() const override; 55 | bool isMidiEffect() const override; 56 | double getTailLengthSeconds() const override; 57 | 58 | //============================================================================== 59 | int getNumPrograms() override; 60 | int getCurrentProgram() override; 61 | void setCurrentProgram (int index) override; 62 | const juce::String getProgramName (int index) override; 63 | void changeProgramName (int index, const juce::String& newName) override; 64 | 65 | //============================================================================== 66 | void getStateInformation (juce::MemoryBlock& destData) override; 67 | void setStateInformation (const void* data, int sizeInBytes) override; 68 | 69 | void setBitInvert(int shift) { bitInvert |= (1 << shift); } 70 | void setBitZeroed(int shift) { bitZeroed |= (1 << shift); } 71 | 72 | void resetBit(int shift) 73 | { 74 | bitInvert &= ~(1 << shift); 75 | bitZeroed &= ~(1 << shift); 76 | } 77 | 78 | juce::AudioProcessorValueTreeState& getAPVTS() { return APVTS; } 79 | 80 | std::atomic& getBitSample() { return bitSample; } 81 | 82 | std::atomic& getBypassState() { return isBypassed; } 83 | void setBypassState() 84 | { 85 | isBypassed = !isBypassed; 86 | 87 | APVTS.state.setProperty("bypass", (bool)isBypassed, nullptr); 88 | } 89 | 90 | void setBitSet(BitSelect select, int i) 91 | { 92 | const char bit[] = { 'B', 'I', 'T', static_cast(i + 0x31), '\0' }; 93 | 94 | APVTS.getParameter(bit)->beginChangeGesture(); 95 | APVTS.getParameterAsValue(bit).setValue(select); 96 | APVTS.getParameter(bit)->endChangeGesture(); 97 | } 98 | 99 | BitSelect& getBitSet(int bit) { return bitSet[bit]; } 100 | 101 | std::atomic& inSignedMode() { return signedMode; } 102 | 103 | void setSignedMode() 104 | { 105 | signedMode = !signedMode; 106 | APVTS.state.setProperty("mode", (bool)signedMode, nullptr); 107 | } 108 | 109 | bool& inBitMode() { return bitMode; } 110 | void setBitMode() { bitMode ^= 1; } 111 | 112 | std::atomic& getPreGain() { return preGain; } 113 | 114 | void setPreGain(float gain) 115 | { 116 | APVTS.getParameter("PREGAIN")->beginChangeGesture(); 117 | 118 | if(gain >= 2.0) APVTS.getParameterAsValue("PREGAIN").setValue(2.0f); 119 | else if (gain <= 0.0) APVTS.getParameterAsValue("PREGAIN").setValue(0.0f); 120 | else APVTS.getParameterAsValue("PREGAIN").setValue(gain); 121 | 122 | APVTS.getParameter("PREGAIN")->endChangeGesture(); 123 | } 124 | 125 | std::atomic& getPostGain() { return postGain; } 126 | 127 | void setPostGain(float gain) 128 | { 129 | APVTS.getParameter("POSTGAIN")->beginChangeGesture(); 130 | 131 | if (gain >= 2.0) APVTS.getParameterAsValue("POSTGAIN").setValue(2.0f); 132 | else if (gain <= 0.0) APVTS.getParameterAsValue("POSTGAIN").setValue(0.0f); 133 | else APVTS.getParameterAsValue("POSTGAIN").setValue(gain); 134 | 135 | APVTS.getParameter("POSTGAIN")->endChangeGesture(); 136 | } 137 | 138 | std::atomic& getBlend() { return blend; } 139 | void setBlend(float vol) 140 | { 141 | APVTS.getParameter("BLEND")->beginChangeGesture(); 142 | 143 | if (vol >= 1.0) APVTS.getParameterAsValue("BLEND").setValue(1.0f); 144 | else if (vol <= 0.0) APVTS.getParameterAsValue("BLEND").setValue(0.0f); 145 | else APVTS.getParameterAsValue("BLEND").setValue(vol); 146 | 147 | APVTS.getParameter("BLEND")->endChangeGesture(); 148 | } 149 | 150 | float& getCurrentSample() { return currentSample; } 151 | 152 | private: 153 | 154 | BitSelect bitSet[8] = { NORMAL_BIT, NORMAL_BIT, NORMAL_BIT, NORMAL_BIT, 155 | NORMAL_BIT, NORMAL_BIT, NORMAL_BIT, NORMAL_BIT }; 156 | 157 | juce::AudioProcessorValueTreeState APVTS; 158 | std::unique_ptr listener; 159 | 160 | juce::AudioProcessorValueTreeState::ParameterLayout createParameters(); 161 | void valueTreePropertyChanged(juce::ValueTree& treeWhosePropertyHasChanged, 162 | const juce::Identifier& property) override; 163 | 164 | std::unique_ptr createParam(const juce::String& name, const int min, const int max, const int def); 165 | std::unique_ptr createParam(const juce::String &name, const float& min, const float& max, const float& inc, const float def); 166 | 167 | void readBits(const int bit, const BitSelect select); 168 | 169 | bool bitMode{ true }; 170 | 171 | float currentSample{ 0.0f }, muteCounter{ 0.0f }; 172 | 173 | std::atomic preGain { 1.0f }, postGain{ 1.0f }, blend { 1.0f }; 174 | std::atomic signedMode{ false }, isBypassed{ false }, paramsUpdated{ false }; 175 | std::atomic bitInvert { 0 }, bitZeroed { 0 }, bitSample { 0 }; 176 | 177 | //============================================================================== 178 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BitDosAudioProcessor) 179 | }; 180 | -------------------------------------------------------------------------------- /res/bitdos_badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astriiddev/BitDOS-VST/6eff7e66cc0ab1da775e43917b64dbe9fa87f1a5/res/bitdos_badge.png -------------------------------------------------------------------------------- /res/bitdos_gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astriiddev/BitDOS-VST/6eff7e66cc0ab1da775e43917b64dbe9fa87f1a5/res/bitdos_gui.png -------------------------------------------------------------------------------- /res/bitdos_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astriiddev/BitDOS-VST/6eff7e66cc0ab1da775e43917b64dbe9fa87f1a5/res/bitdos_on.png -------------------------------------------------------------------------------- /res/floppy_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astriiddev/BitDOS-VST/6eff7e66cc0ab1da775e43917b64dbe9fa87f1a5/res/floppy_btn.png -------------------------------------------------------------------------------- /res/seg_7.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astriiddev/BitDOS-VST/6eff7e66cc0ab1da775e43917b64dbe9fa87f1a5/res/seg_7.otf --------------------------------------------------------------------------------