├── .gitignore ├── .gitmodules ├── BLow.ttl ├── LICENSE ├── README.md ├── doc └── screenshot.png ├── inc ├── breviceps.wav ├── dleigh.wav ├── flash-shumway.wav ├── inspectorj.wav ├── junkfood2121.flac ├── junkfood2121.wav ├── katavlogsyt.wav ├── kuchtaa.wav ├── peridactyloptrix.wav ├── shaundoogan.wav ├── surface.png ├── surface.svg ├── unfa.wav └── yyzjj.wav ├── makefile ├── manifest.ttl └── src ├── BLow.cpp ├── BLow_GUI.cpp ├── Definitions.hpp ├── Ports.hpp ├── StaticArrayList.hpp └── Urids.hpp /.gitignore: -------------------------------------------------------------------------------- 1 | /BLow.lv2/** 2 | /.tags 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "BWidgets"] 2 | path = BWidgets 3 | url = https://github.com/sjaehn/BWidgets.git 4 | -------------------------------------------------------------------------------- /BLow.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix atom: . 3 | @prefix midi: . 4 | @prefix urid: . 5 | @prefix foaf: . 6 | @prefix doap: . 7 | @prefix rdf: . 8 | @prefix rdfs: . 9 | @prefix ui: . 10 | 11 | 12 | a ui:X11UI ; 13 | lv2:binary ; 14 | lv2:extensionData ui:idleInterface , ui:resize ; 15 | lv2:optionalFeature ui:resize ; 16 | lv2:requiredFeature ui:idleInterface . 17 | 18 | a lv2:Plugin ; 19 | a lv2:Plugin, lv2:InstrumentPlugin, doap:Project; 20 | doap:name "B.Low"; 21 | doap:license ; 22 | lv2:binary ; 23 | lv2:microVersion 2 ; 24 | lv2:minorVersion 2 ; 25 | ui:ui ; 26 | lv2:optionalFeature lv2:hardRTCapable ; 27 | lv2:port [ 28 | a lv2:InputPort , atom:AtomPort ; 29 | atom:bufferType atom:Sequence ; 30 | atom:supports midi:MidiEvent ; 31 | lv2:designation lv2:control ; 32 | lv2:index 0 ; 33 | lv2:symbol "midi_in" ; 34 | lv2:name "MIDI_in" 35 | ] , [ 36 | a lv2:AudioPort ; 37 | a lv2:OutputPort ; 38 | lv2:index 1 ; 39 | lv2:symbol "audio_out" ; 40 | lv2:name "Audio out" 41 | ] , [ 42 | a lv2:InputPort , lv2:ControlPort ; 43 | lv2:index 2 ; 44 | lv2:symbol "sample" ; 45 | lv2:name "Sample" ; 46 | lv2:portProperty lv2:integer, lv2:enumeration ; 47 | lv2:scalePoint [ rdfs:label "Unfa" ; rdf:value 0 ] ; 48 | lv2:scalePoint [ rdfs:label "Kuchtaa" ; rdf:value 1 ] ; 49 | lv2:scalePoint [ rdfs:label "Junkfood2121" ; rdf:value 2 ] ; 50 | lv2:scalePoint [ rdfs:label "KataVlogsYT" ; rdf:value 3 ] ; 51 | lv2:scalePoint [ rdfs:label "Peridactyloptrix" ; rdf:value 4 ] ; 52 | lv2:scalePoint [ rdfs:label "Dleigh" ; rdf:value 5 ] ; 53 | lv2:scalePoint [ rdfs:label "YYZJJ" ; rdf:value 6 ] ; 54 | lv2:scalePoint [ rdfs:label "Flash_Shumway" ; rdf:value 7 ] ; 55 | lv2:scalePoint [ rdfs:label "Shaundoogan" ; rdf:value 8 ] ; 56 | lv2:scalePoint [ rdfs:label "Breviceps" ; rdf:value 9 ] ; 57 | lv2:default 0 ; 58 | lv2:minimum 0 ; 59 | lv2:maximum 3 60 | ] , [ 61 | a lv2:InputPort , lv2:ControlPort ; 62 | lv2:index 3 ; 63 | lv2:symbol "gain" ; 64 | lv2:name "Gain" ; 65 | lv2:default 0.0 ; 66 | lv2:minimum -70.0 ; 67 | lv2:maximum 30.0 68 | ] , [ 69 | a lv2:InputPort , lv2:ControlPort ; 70 | lv2:index 4 ; 71 | lv2:symbol "tune" ; 72 | lv2:name "Tune" ; 73 | lv2:portProperty lv2:integer ; 74 | lv2:default 0 ; 75 | lv2:minimum -12 ; 76 | lv2:maximum 12 77 | ] , [ 78 | a lv2:InputPort , lv2:ControlPort ; 79 | lv2:index 5 ; 80 | lv2:symbol "tune_ct" ; 81 | lv2:name "Tune (cents)" ; 82 | lv2:portProperty lv2:integer ; 83 | lv2:default 0.0 ; 84 | lv2:minimum -1.0 ; 85 | lv2:maximum 1.0 86 | ] . 87 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 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 General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # B.Low 2 | 3 | B.Low is the unique sample-based sound generator plugin you always waited for. 4 | It blows out low sounds from below to spice up your music production with a 5 | special flavour. The high quality samples were gratefully provided by 6 | numerous international artists (see b-low). 7 | 8 | ![screenshot](https://github.com/sjaehn/BLow/blob/master/doc/screenshot.png "Screenshot from B.Low") 9 | 10 | Released on April 1, 2022 11 | 12 | 13 | ## Installation 14 | 15 | Choose one of the following options: 16 | 17 | a) Install the blow package for your system (once established) 18 | 19 | b) Use the latest provided binaries 20 | 21 | Unpack the provided blow-\*.zip or blow-\*.tar.xz from the latest release and 22 | copy the BLow.lv2 folder to your lv2 directory (depending on your system settings, 23 | ~/.lv2/, /usr/lib/lv2/, /usr/local/lib/lv2/, or ...). 24 | 25 | c) Build your own binaries in the following three steps. 26 | 27 | Step 1: [Download the latest published version](https://github.com/sjaehn/BLow/releases) of Low. Or clone or 28 | [download the master](https://github.com/sjaehn/BLow/archive/master.zip) of this repository including the submodules. For git cloning use: 29 | ``` 30 | git clone --recurse-submodules https://github.com/sjaehn/BLow.git 31 | ``` 32 | 33 | Step 2: Install pkg-config and the development packages for x11, cairo, soundfile, and lv2 if not done yet. If you 34 | don't have already got the build tools (compilers, make, libraries) then install them too. 35 | 36 | On Debian-based systems you may run: 37 | ``` 38 | sudo apt-get install build-essential 39 | sudo apt-get install pkg-config libx11-dev libcairo2-dev libsndfile-dev lv2-dev 40 | ``` 41 | 42 | On Arch-based systems you may run: 43 | ``` 44 | sudo pacman -S base-devel 45 | sudo pacman -S pkg-config libx11 cairo libsndfile lv2 46 | ``` 47 | 48 | Step 3: Building and installing into the default lv2 directory (/usr/local/lib/lv2/) is easy using `make` and 49 | `make install`. Simply call: 50 | ``` 51 | make 52 | sudo make install 53 | ``` 54 | 55 | **Optional:** Standard `make` and `make install` parameters are supported. You may build a debugging version 56 | using `make CXXFLAGS+=-g`. For installation into an alternative directory (e.g., /usr/lib/lv2/), change the 57 | variable `PREFIX` while installing: `sudo make install PREFIX=/usr`. If you want to freely choose the 58 | install target directory, change the variable `LV2DIR` (e.g., `make install LV2DIR=~/.lv2`). 59 | 60 | 61 | ## Running 62 | 63 | After the installation Ardour, Carla, and any other LV2 host should automatically detect B.Low. 64 | 65 | If jalv is installed, you can also call it using one of the graphical jalv executables (like 66 | jalv.gtk, or jalv.gtk3, or jalv.qt4, or jalv.qt5, depending on what is installed), like 67 | 68 | ``` 69 | jalv.gtk https://www.jahnichen.de/plugins/lv2/BLow 70 | ``` 71 | 72 | to run it stand-alone and connect it to the JACK system. 73 | 74 | 75 | ## Acknowledgments 76 | 77 | Samples provided by: 78 | * unfa (https://freesound.org/people/unfa/sounds/573745/, CC0) 79 | * kuchtaa (https://freesound.org/people/kuchtaa/sounds/555418/, CC0) 80 | * junkfood2121 (https://freesound.org/people/junkfood2121/sounds/242004/, CC0) 81 | * KataVlogsYT (https://freesound.org/people/KataVlogsYT/sounds/324453/, CC0) 82 | * peridactyloptrix (https://freesound.org/people/peridactyloptrix/sounds/202527/, CC0) 83 | * dleigh (https://freesound.org/people/dleigh/sounds/346143/, CC0) 84 | * YYZJJ (https://freesound.org/people/YYZJJ/sounds/508867/, CC0) 85 | * Flash_Shumway (https://freesound.org/people/Flash_Shumway/sounds/113763/, CC0) 86 | * shaundoogan (https://freesound.org/people/shaundoogan/sounds/465486/, CC0) 87 | * Breviceps (https://freesound.org/people/Breviceps/sounds/445999/, CC0) 88 | 89 | -------------------------------------------------------------------------------- /doc/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/doc/screenshot.png -------------------------------------------------------------------------------- /inc/breviceps.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/breviceps.wav -------------------------------------------------------------------------------- /inc/dleigh.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/dleigh.wav -------------------------------------------------------------------------------- /inc/flash-shumway.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/flash-shumway.wav -------------------------------------------------------------------------------- /inc/inspectorj.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/inspectorj.wav -------------------------------------------------------------------------------- /inc/junkfood2121.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/junkfood2121.flac -------------------------------------------------------------------------------- /inc/junkfood2121.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/junkfood2121.wav -------------------------------------------------------------------------------- /inc/katavlogsyt.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/katavlogsyt.wav -------------------------------------------------------------------------------- /inc/kuchtaa.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/kuchtaa.wav -------------------------------------------------------------------------------- /inc/peridactyloptrix.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/peridactyloptrix.wav -------------------------------------------------------------------------------- /inc/shaundoogan.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/shaundoogan.wav -------------------------------------------------------------------------------- /inc/surface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/surface.png -------------------------------------------------------------------------------- /inc/unfa.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/unfa.wav -------------------------------------------------------------------------------- /inc/yyzjj.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjaehn/BLow/7e230a8d2286dbf07adef0216f08d473981a2850/inc/yyzjj.wav -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | SHELL = /bin/sh 2 | 3 | PKG_CONFIG ?= pkg-config 4 | GUI_LIBS += lv2 sndfile x11 cairo 5 | LV2_LIBS += lv2 sndfile 6 | ifneq ($(shell $(PKG_CONFIG) --exists fontconfig || echo no), no) 7 | GUI_LIBS += fontconfig 8 | GUIPPFLAGS += -DPKG_HAVE_FONTCONFIG 9 | endif 10 | 11 | CC ?= gcc 12 | CXX ?= g++ 13 | INSTALL ?= install 14 | INSTALL_PROGRAM ?= $(INSTALL) 15 | INSTALL_DATA ?= $(INSTALL) -m644 16 | STRIP ?= strip 17 | 18 | PREFIX ?= /usr/local 19 | LV2DIR ?= $(PREFIX)/lib/lv2 20 | 21 | OPTIMIZATIONS ?=-O3 -ffast-math 22 | CFLAGS ?=-Wall 23 | CXXFLAGS ?=-Wall 24 | STRIPFLAGS ?=-s --strip-program=$(STRIP) 25 | LDFLAGS ?=-Wl,-Bstatic -Wl,-Bdynamic -Wl,--as-needed 26 | 27 | override CFLAGS += -std=c99 -fvisibility=hidden -fPIC 28 | override CXXFLAGS += -std=c++11 -fvisibility=hidden -fPIC 29 | override LDFLAGS += -shared -pthread 30 | 31 | override GUIPPFLAGS += -DPUGL_HAVE_CAIRO 32 | DSPCFLAGS += `$(PKG_CONFIG) --cflags $(LV2_LIBS)` 33 | GUICFLAGS += `$(PKG_CONFIG) --cflags $(GUI_LIBS)` 34 | DSPLIBS += -lm `$(PKG_CONFIG) --libs $(LV2_LIBS)` 35 | GUILIBS += -lm `$(PKG_CONFIG) --libs $(GUI_LIBS)` 36 | 37 | #ifeq ($(shell test -e src/Locale_$(LANGUAGE).hpp && echo -n yes),yes) 38 | # override GUIPPFLAGS += -DLOCALEFILE=\"Locale_$(LANGUAGE).hpp\" 39 | #endif 40 | 41 | #ifdef WWW_BROWSER_CMD 42 | # override GUIPPFLAGS += -DWWW_BROWSER_CMD=\"$(WWW_BROWSER_CMD)\" 43 | #endif 44 | 45 | BUNDLE = BLow.lv2 46 | DSP = BLow 47 | DSP_SRC = ./src/BLow.cpp 48 | GUI = BLow_GUI 49 | GUI_SRC = ./src/BLow_GUI.cpp 50 | OBJ_EXT = .so 51 | DSP_OBJ = $(DSP)$(OBJ_EXT) 52 | GUI_OBJ = $(GUI)$(OBJ_EXT) 53 | B_OBJECTS = $(addprefix $(BUNDLE)/, $(DSP_OBJ) $(GUI_OBJ)) 54 | ROOTFILES = \ 55 | *.ttl \ 56 | LICENSE 57 | 58 | INCFILES = inc/*.png inc/*.wav 59 | 60 | B_FILES = $(addprefix $(BUNDLE)/, $(ROOTFILES) $(INCFILES)) 61 | 62 | DSP_INCL = 63 | 64 | GUI_CXX_INCL = \ 65 | BWidgets/BUtilities/Urid.cpp \ 66 | BWidgets/BUtilities/Dictionary.cpp \ 67 | BWidgets/BWidgets/Supports/Closeable.cpp \ 68 | BWidgets/BWidgets/Supports/Messagable.cpp \ 69 | BWidgets/BWidgets/Window.cpp \ 70 | BWidgets/BWidgets/Widget.cpp 71 | 72 | GUI_C_INCL = \ 73 | BWidgets/BUtilities/cairoplus.c \ 74 | BWidgets/BWidgets/pugl/implementation.c \ 75 | BWidgets/BWidgets/pugl/x11_stub.c \ 76 | BWidgets/BWidgets/pugl/x11_cairo.c \ 77 | BWidgets/BWidgets/pugl/x11.c 78 | 79 | $(BUNDLE): check clean $(DSP_OBJ) $(GUI_OBJ) 80 | @cp $(ROOTFILES) $(BUNDLE) 81 | @mkdir -p $(BUNDLE)/inc 82 | @cp $(INCFILES) $(BUNDLE)/inc 83 | 84 | all: $(BUNDLE) 85 | 86 | $(DSP_OBJ): $(DSP_SRC) 87 | @echo -n Build $(BUNDLE) DSP... 88 | @mkdir -p $(BUNDLE) 89 | @$(CXX) $(CPPFLAGS) $(OPTIMIZATIONS) $(CXXFLAGS) $(LDFLAGS) $(DSPCFLAGS) -Wl,--start-group $(DSPLIBS) $< $(DSP_INCL) -Wl,--end-group -o $(BUNDLE)/$@ 90 | @echo \ done. 91 | 92 | $(GUI_OBJ): $(GUI_SRC) 93 | @echo -n Build $(BUNDLE) GUI... 94 | @mkdir -p $(BUNDLE) 95 | @mkdir -p $(BUNDLE)/tmp 96 | @cd $(BUNDLE)/tmp; $(CC) $(CPPFLAGS) $(GUIPPFLAGS) $(CFLAGS) $(GUICFLAGS) $(addprefix ../../, $(GUI_C_INCL)) -c 97 | @cd $(BUNDLE)/tmp; $(CXX) $(CPPFLAGS) $(GUIPPFLAGS) $(CXXFLAGS) $(GUICFLAGS) $(addprefix ../../, $< $(GUI_CXX_INCL)) -c 98 | @$(CXX) $(CPPFLAGS) $(GUIPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(GUICFLAGS) -Wl,--start-group $(GUILIBS) $(BUNDLE)/tmp/*.o -Wl,--end-group -o $(BUNDLE)/$@ 99 | @rm -rf $(BUNDLE)/tmp 100 | @echo \ done. 101 | 102 | install: 103 | @echo -n Install $(BUNDLE) to $(DESTDIR)$(LV2DIR)... 104 | @$(INSTALL) -d $(DESTDIR)$(LV2DIR)/$(BUNDLE) 105 | @$(INSTALL) -d $(DESTDIR)$(LV2DIR)/$(BUNDLE)/inc 106 | @$(INSTALL_PROGRAM) -m755 $(B_OBJECTS) $(DESTDIR)$(LV2DIR)/$(BUNDLE) 107 | @$(INSTALL_DATA) $(addprefix $(BUNDLE)/, $(ROOTFILES)) $(DESTDIR)$(LV2DIR)/$(BUNDLE) 108 | @$(INSTALL_DATA) $(addprefix $(BUNDLE)/, $(INCFILES)) $(DESTDIR)$(LV2DIR)/$(BUNDLE)/inc 109 | @echo \ done. 110 | 111 | install-strip: 112 | @echo -n "Install (stripped)" $(BUNDLE) to $(DESTDIR)$(LV2DIR)... 113 | @$(INSTALL) -d $(DESTDIR)$(LV2DIR)/$(BUNDLE) 114 | @$(INSTALL) -d $(DESTDIR)$(LV2DIR)/$(BUNDLE)/inc 115 | @$(INSTALL_PROGRAM) -m755 $(STRIPFLAGS) $(B_OBJECTS) $(DESTDIR)$(LV2DIR)/$(BUNDLE) 116 | @$(INSTALL_DATA) $(addprefix $(BUNDLE)/, $(ROOTFILES)) $(DESTDIR)$(LV2DIR)/$(BUNDLE) 117 | @$(INSTALL_DATA) $(addprefix $(BUNDLE)/, $(INCFILES)) $(DESTDIR)$(LV2DIR)/$(BUNDLE)/inc 118 | @echo \ done. 119 | 120 | uninstall: 121 | @echo -n Uninstall $(BUNDLE)... 122 | @rm -f $(addprefix $(DESTDIR)$(LV2DIR)/$(BUNDLE)/, $(ROOTFILES) $(INCFILES)) 123 | -@rmdir $(DESTDIR)$(LV2DIR)/$(BUNDLE)/inc 124 | # @rm -f $(DESTDIR)$(LV2DIR)/$(BUNDLE)/$(GUI_OBJ) 125 | @rm -f $(DESTDIR)$(LV2DIR)/$(BUNDLE)/$(DSP_OBJ) 126 | -@rmdir $(DESTDIR)$(LV2DIR)/$(BUNDLE) 127 | @echo \ done. 128 | 129 | check: 130 | ifeq ($(shell $(PKG_CONFIG) --exists 'sndfile > 1.0.18' || echo no), no) 131 | $(error sndfile >= 1.0.18 not found. Please install sndfile >= 1.0.18 first.) 132 | endif 133 | ifeq ($(shell $(PKG_CONFIG) --exists 'lv2 >= 1.14.0' || echo no), no) 134 | $(error lv2 >= 1.14.0 not found. Please install lv2 >= 1.14.0 first.) 135 | endif 136 | ifeq ($(shell $(PKG_CONFIG) --exists 'x11 >= 1.6.0' || echo no), no) 137 | $(error x11 >= 1.6.0 not found. Please install x11 >= 1.6.0 first.) 138 | endif 139 | ifeq ($(shell $(PKG_CONFIG) --exists 'cairo >= 1.12.0' || echo no), no) 140 | $(error cairo >= 1.12.0 not found. Please install cairo >= 1.12.0 first.) 141 | endif 142 | 143 | clean: 144 | @rm -rf $(BUNDLE) 145 | 146 | .PHONY: all install uninstall check clean 147 | 148 | .NOTPARALLEL: -------------------------------------------------------------------------------- /manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a ui:X11UI ; 7 | ui:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a lv2:Plugin ; 12 | lv2:binary ; 13 | rdfs:seeAlso . 14 | -------------------------------------------------------------------------------- /src/BLow.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define MINIMP3_IMPLEMENTATION 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "Definitions.hpp" 16 | #include "Ports.hpp" 17 | #include "Urids.hpp" 18 | #include "StaticArrayList.hpp" 19 | #include "../BWidgets/BMusic/Sample.hpp" 20 | 21 | #define BLOW_VOICES 16 22 | #define BLOW_BLOWSAMPLES 2 23 | #define BLOW_FADINGTIME 0.05 24 | #define BLOW_SAMPLEFLATTENING 50.0 25 | #define BLOW_MODULATIONRATE 1.5 26 | 27 | struct Range 28 | { 29 | uint64_t start; 30 | uint64_t end; 31 | }; 32 | 33 | struct BSample 34 | { 35 | BMusic::Sample sample; 36 | uint8_t note; 37 | std::vector ranges; 38 | uint64_t sustainEnd; 39 | }; 40 | 41 | struct Voice 42 | { 43 | BSample* sample; 44 | uint8_t note; 45 | uint8_t velocity; 46 | uint64_t startFrame; 47 | uint64_t releaseFrame; 48 | uint64_t endFrame; 49 | double position; 50 | double releasePosition; 51 | Range range; 52 | Range nextRange; 53 | }; 54 | 55 | class BLow 56 | { 57 | public: 58 | BLow (const double rate, const char* bundle_path, const LV2_Feature* const* features); 59 | void run (uint32_t n_samples); 60 | void connect_port (uint32_t portnr, void* data); 61 | 62 | private: 63 | double rate; 64 | BLowURIs uris; 65 | std::array ports; 66 | std::array controllers; 67 | StaticArrayList voices; 68 | uint64_t count; 69 | float amp; 70 | float modulation; 71 | float dm; 72 | std::array samples; 73 | std::minstd_rand rnd; 74 | std::uniform_real_distribution unidist; 75 | std::uniform_real_distribution bidist; 76 | 77 | void noteOn (const uint8_t note, const uint8_t velocity, const uint64_t frame); 78 | void noteOff (const uint8_t note, const uint64_t frame); 79 | void allSoundsOff (const uint64_t frame); 80 | void allNotesOff (const uint64_t frame); 81 | void process (const uint32_t start, const uint32_t end); 82 | }; 83 | 84 | 85 | BLow::BLow (const double rate, const char* bundle_path, const LV2_Feature* const* features) : 86 | rate (rate), 87 | voices(), 88 | count (0), 89 | amp (1.0f), 90 | modulation (0.0f), 91 | dm (0.0f), 92 | samples {BSample {BMusic::Sample((std::string (bundle_path) + "/inc/unfa.wav").c_str()), 51, {{21691, 22000}, {21075, 21690}, {20773, 21383}}, 22000}, 93 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/kuchtaa.wav").c_str()), 54, {{20357, 21500}, {18727, 20920}, {19259, 21500}}, 21500}, 94 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/junkfood2121.wav").c_str()), 40, {{39615, 42315}, {37316, 45603}, {39542, 47263}}, 47263}, 95 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/katavlogsyt.wav").c_str()), 54, {{2850, 5111}, {1492, 4616}, {2574, 3613}}, 5111}, 96 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/peridactyloptrix.wav").c_str()), 34, {{32459, 43958}, {27485, 34226}, {35161, 54495}}, 54495}, 97 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/dleigh.wav").c_str()), 44, {{6560, 9495}, {3340, 6242}, {4987, 7131}}, 9495}, 98 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/yyzjj.wav").c_str()), 54, {{4491, 10412}, {7272, 15579}, {10863, 16333}}, 16333}, 99 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/flash-shumway.wav").c_str()), 68, {{4729, 8770}, {3715, 6339}, {5925, 8291}}, 8770}, 100 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/shaundoogan.wav").c_str()), 40, {{2970, 16612}, {14899, 24570}, {7564, 11765}}, 24570}, 101 | BSample {BMusic::Sample((std::string (bundle_path) + "/inc/breviceps.wav").c_str()), 40, {{30639, 32202}, {29915, 31307}, {29117, 30638}}, 32202}}, 102 | rnd (time (0)), 103 | unidist (0.0, 1.0), 104 | bidist (-1.0f, 1.0f) 105 | { 106 | //Scan host features for URID map 107 | LV2_URID_Map* m = NULL; 108 | for (int i = 0; features[i]; ++i) 109 | { 110 | if (strcmp(features[i]->URI, LV2_URID__map) == 0) m = (LV2_URID_Map*) features[i]->data; 111 | } 112 | if (!m) throw std::invalid_argument ("Host does not support urid:map"); 113 | getURIs (m, &uris); 114 | 115 | // Init ports 116 | ports.fill (NULL); 117 | } 118 | 119 | void BLow::connect_port (uint32_t portnr, void* data) 120 | { 121 | if (portnr < BLOW_N_PORTS) ports[portnr] = data; 122 | } 123 | 124 | void BLow::run (uint32_t n_samples) 125 | { 126 | // Check if all ports connected 127 | for (int i = 0; i < BLOW_N_PORTS; ++i) 128 | { 129 | if (!ports[i]) return; 130 | } 131 | 132 | // Update controllers 133 | for (int i = 0; i < BLOW_NR_CONTROLLERS; ++i) 134 | { 135 | float nc = *(float*)ports[BLOW_CONTROLLERS + i]; 136 | // TODO Validate nc 137 | 138 | if (nc != controllers[i]) 139 | { 140 | switch (i) 141 | { 142 | case BLOW_SAMPLE: // TODO Switch sample 143 | break; 144 | 145 | case BLOW_GAIN: amp = powf (10.0, 0.05f * nc); 146 | break; 147 | 148 | default: break; 149 | } 150 | 151 | controllers[i] = nc; 152 | } 153 | } 154 | 155 | const LV2_Atom_Sequence* const midiIn = (const LV2_Atom_Sequence*) ports[BLOW_MIDI_IN]; 156 | uint32_t last_t = 0; 157 | LV2_ATOM_SEQUENCE_FOREACH(midiIn, ev) 158 | { 159 | // Atom messages 160 | if ((ev->body.type == uris.atom_Object) || (ev->body.type == uris.atom_Blank)) 161 | { 162 | const LV2_Atom_Object* obj = (const LV2_Atom_Object*)&ev->body; 163 | 164 | // GUI Keyboard 165 | if (obj->body.otype ==uris.blow_keyboardEvent) 166 | { 167 | LV2_Atom *okOn = NULL, *okOff = NULL, *oVel = NULL; 168 | lv2_atom_object_get (obj, 169 | uris.blow_noteOn, &okOn, 170 | uris.blow_noteOff, &okOff, 171 | uris.blow_velocity, &oVel, 172 | NULL); 173 | 174 | if (oVel && (oVel->type == uris.atom_Int)) 175 | { 176 | const int vel = ((const LV2_Atom_Int*)oVel)->body; 177 | 178 | if (okOn && (okOn->type == uris.atom_Int)) 179 | { 180 | const int note = ((const LV2_Atom_Int*)okOn)->body; 181 | noteOn (note, vel, count + ev->time.frames); 182 | } 183 | 184 | if (okOff && (okOff->type == uris.atom_Int)) 185 | { 186 | const int note = ((const LV2_Atom_Int*)okOff)->body; 187 | noteOff (note, count + ev->time.frames); 188 | } 189 | } 190 | } 191 | } 192 | 193 | 194 | // Read incoming MIDI events 195 | if (ev->body.type == uris.midi_Event) 196 | { 197 | const uint8_t* const msg = (const uint8_t*)(ev + 1); 198 | const uint8_t status = (msg[0] & 0xF0); 199 | //const uint8_t channel = msg[0] & 0x0F; 200 | const uint8_t note = msg[1]; 201 | const uint8_t value = msg[2]; 202 | 203 | switch (status) 204 | { 205 | case LV2_MIDI_MSG_NOTE_ON: if (value != 0) 206 | { 207 | noteOn (note, value, count + ev->time.frames); 208 | break; 209 | } 210 | // Otherwise continue with note off 211 | // No break here! 212 | 213 | case LV2_MIDI_MSG_NOTE_OFF: noteOff (note, count + ev->time.frames); 214 | break; 215 | 216 | case LV2_MIDI_MSG_CONTROLLER: switch (note) // note == cc 217 | { 218 | case LV2_MIDI_CTL_SUSTAIN: break; 219 | 220 | case LV2_MIDI_CTL_ALL_SOUNDS_OFF: allSoundsOff (count + ev->time.frames); 221 | break; 222 | 223 | case LV2_MIDI_CTL_ALL_NOTES_OFF: allNotesOff (count + ev->time.frames); 224 | break; 225 | 226 | // All other MIDI signals 227 | default: break; 228 | } 229 | 230 | default: break; 231 | } 232 | } 233 | 234 | // Update for this iteration 235 | uint32_t next_t = (ev->time.frames < n_samples ? ev->time.frames : n_samples); 236 | process (last_t, next_t); 237 | last_t = next_t; 238 | } 239 | 240 | // Process all samples 241 | if (last_t < n_samples) process (last_t, n_samples); 242 | } 243 | 244 | void BLow::process (uint32_t start, uint32_t end) 245 | { 246 | float* const audioOut = (float*) ports[BLOW_AUDIO_OUT]; 247 | 248 | for (uint32_t i = start; i < end; ++i) 249 | { 250 | float out = 0.0f; 251 | 252 | for (Voice** it = voices.begin(); it < voices.end(); ) 253 | { 254 | BSample* s = (**it).sample; 255 | if (count >= (**it).startFrame) 256 | { 257 | const double dp = pow (2.0, (double (int((**it).note) - int(s->note)) + controllers[BLOW_TUNE] + controllers[BLOW_TUNE_CT]) / 12.0); 258 | float adsOut = 0.0f; 259 | float rOut = 0.0f; 260 | float f = 0.0f; 261 | 262 | 263 | if (s && (count < (**it).endFrame)) 264 | { 265 | // ADS 266 | if ((**it).position + BLOW_SAMPLEFLATTENING < double ((**it).range.end)) adsOut = s->sample.get((**it).position, 0, rate) * amp * (1.0 + 0.5 * modulation); 267 | 268 | // Crossfading sustain loop end -> sustain loop begin 269 | else 270 | { 271 | const float out1 = s->sample.get((**it).position, 0, rate) * amp * (1.0f + 0.5f * modulation); 272 | const float out2 = s->sample.get(double ((**it).nextRange.start) + (**it).position + BLOW_SAMPLEFLATTENING - double ((**it).range.end), 0, rate) * amp * (1.0f + 0.5f * modulation); 273 | const float f1 = ((**it).position + BLOW_SAMPLEFLATTENING - double ((**it).range.end)) / BLOW_SAMPLEFLATTENING; 274 | adsOut = (1.0f - f1) * out1 + f1 * out2; 275 | } 276 | 277 | (**it).position += dp * (1.0f + 0.01f * modulation); 278 | if ((**it).position >= (**it).range.end) 279 | { 280 | (**it).position = (**it).position - double ((**it).range.end) + double ((**it).nextRange.start); 281 | (**it).range = (**it).nextRange; 282 | const size_t idx = double (s->ranges.size()) * unidist (rnd); 283 | (**it).nextRange = s->ranges[idx]; 284 | } 285 | 286 | // R 287 | if (count >= (**it).releaseFrame) 288 | { 289 | rOut = s->sample.get((**it).releasePosition, 0, rate) * amp * (1.0 + 0.5 * modulation); 290 | f = std::min (((**it).releasePosition - s->sustainEnd) / (BLOW_FADINGTIME * (s->sample.info.frames - s->sustainEnd)), 1.0); 291 | 292 | (**it).releasePosition += dp * (1.0 + 0.01 * modulation); 293 | } 294 | 295 | float vel = float ((**it).velocity) / 127.0f; 296 | 297 | out += vel * ((1.0 - f) * adsOut + f * rOut); 298 | ++it; 299 | } 300 | 301 | // Ended 302 | else it = voices.erase (it); 303 | } 304 | 305 | else ++it; 306 | } 307 | 308 | audioOut[i] = out; 309 | ++count; 310 | 311 | dm += bidist(rnd) * 0.1 / rate; 312 | dm = std::max (std::min (dm, 1.0f - modulation), -1.0f - modulation); 313 | modulation += dm; 314 | } 315 | } 316 | 317 | void BLow::noteOn (const uint8_t note, const uint8_t velocity, const uint64_t frame) 318 | { 319 | // Scan if this is an additional midi message 320 | // (e.g., double note on, velocity changed) 321 | for (Voice** it = voices.begin(); it < voices.end(); ++it) 322 | { 323 | if (((**it).note == note) && (frame < (**it).releaseFrame)) 324 | { 325 | (**it).velocity = velocity; 326 | return; 327 | } 328 | } 329 | 330 | // New voice 331 | if (voices.size < BLOW_VOICES) 332 | { 333 | // Add new voice 334 | BSample* s = &samples[int (controllers[BLOW_SAMPLE])]; 335 | const Voice v = Voice {s, note, velocity, frame, UINT64_MAX, UINT64_MAX, 0.0, 0.0, s->ranges[0], s->ranges[0]}; 336 | voices.push_back (v); 337 | } 338 | } 339 | 340 | void BLow::noteOff (const uint8_t note, const uint64_t frame) 341 | { 342 | for (Voice** it = voices.begin(); it < voices.end(); ++it) 343 | { 344 | if (((**it).note == note) && (frame < (**it).releaseFrame)) 345 | { 346 | // Calulate release time 347 | BSample* s = (**it).sample; 348 | if (s) 349 | { 350 | const uint64_t rt = (s->sample.info.frames - s->sustainEnd) / pow (2.0, double (int((**it).note) - int(s->note)) / 12.0); 351 | 352 | (**it).releaseFrame = frame; 353 | (**it).releasePosition = s->sustainEnd; 354 | (**it).endFrame = frame + rt; 355 | break; 356 | } 357 | } 358 | } 359 | } 360 | 361 | void BLow::allSoundsOff (const uint64_t frame) 362 | { 363 | // TODO 364 | voices.clear(); 365 | } 366 | 367 | void BLow::allNotesOff (const uint64_t frame) 368 | { 369 | for (Voice** it = voices.begin(); it < voices.end(); ++it) noteOff ((**it).note, frame); 370 | } 371 | 372 | static LV2_Handle 373 | instantiate (const LV2_Descriptor* descriptor, double rate, const char* bundle_path, const LV2_Feature* const* features) 374 | { 375 | BLow* instance = new BLow (rate, bundle_path, features); 376 | return (LV2_Handle) instance; 377 | } 378 | 379 | static void 380 | connect_port(LV2_Handle instance, uint32_t port, void* data) 381 | { 382 | BLow* bLow = (BLow*)instance; 383 | if (bLow) bLow->connect_port (port, data); 384 | } 385 | 386 | static void 387 | run(LV2_Handle instance, uint32_t n_samples) 388 | { 389 | BLow* bLow = (BLow*) instance; 390 | if (bLow) bLow->run (n_samples); 391 | } 392 | 393 | static void 394 | cleanup(LV2_Handle instance) 395 | { 396 | BLow* bLow = (BLow*) instance; 397 | if (bLow) delete bLow; 398 | } 399 | 400 | static const LV2_Descriptor descriptor = 401 | { 402 | BLOW_URI, 403 | instantiate, 404 | connect_port, 405 | NULL, 406 | run, 407 | NULL, 408 | cleanup, 409 | NULL 410 | }; 411 | 412 | LV2_SYMBOL_EXPORT 413 | const LV2_Descriptor* 414 | lv2_descriptor(uint32_t index) 415 | { 416 | switch (index) 417 | { 418 | case 0: return &descriptor; 419 | default: return NULL; 420 | } 421 | } 422 | -------------------------------------------------------------------------------- /src/BLow_GUI.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "../BWidgets/BEvents/ExposeEvent.hpp" 6 | #include "../BWidgets/BUtilities/to_string.hpp" 7 | #include "../BWidgets/BWidgets/Window.hpp" 8 | #include "../BWidgets/BWidgets/ValueDial.hpp" 9 | #include "../BWidgets/BWidgets/ComboBox.hpp" 10 | #include "../BWidgets/BWidgets/HPianoRoll.hpp" 11 | #include "Definitions.hpp" 12 | #include "Ports.hpp" 13 | #include "Urids.hpp" 14 | 15 | #define BG_FILE "inc/surface.png" 16 | 17 | class BLow_GUI : public BWidgets::Window 18 | { 19 | public: 20 | BLow_GUI (const char *bundle_path, const LV2_Feature *const *features, PuglNativeView parentWindow); 21 | void portEvent (uint32_t port_index, uint32_t buffer_size, uint32_t format, const void* buffer); 22 | virtual void onConfigureRequest (BEvents::Event* event) override; 23 | static void valueChangedCallback (BEvents::Event* event); 24 | static void pianoCallback (BEvents::Event* event); 25 | 26 | LV2UI_Write_Function write_function; 27 | LV2UI_Controller controller; 28 | 29 | protected: 30 | BLowURIs uris; 31 | LV2_Atom_Forge forge; 32 | std::string pluginPath; 33 | BWidgets::ComboBox sampleMenu; 34 | BWidgets::ValueDial gainDial; 35 | BWidgets::ValueDial tuneStDial; 36 | BWidgets::ValueDial tuneCtDial; 37 | std::array controllerWidgets; 38 | BWidgets::HPianoRoll pianoRoll; 39 | BWidgets::Dial velocityDial; 40 | std::array velocities; 41 | 42 | // Style definitions 43 | BStyles::ColorMap fgColors = {{{0.7, 0.25, 0.1, 1.0}, {0.7, 0.25, 0.1, 1.0}, {0.1, 0.02, 0.01, 1.0}, {0.0, 0.0, 0.0, 0.0}}}; 44 | BStyles::ColorMap txColors = {{{1.0, 1.0, 1.0, 1.0}, {1.0, 1.0, 1.0, 1.0}, {0.1, 0.1, 0.1, 1.0}, {0.0, 0.0, 0.0, 0.0}}}; 45 | BStyles::ColorMap bgColors = {{{0.15, 0.15, 0.15, 1.0}, {0.3, 0.3, 0.3, 1.0}, {0.05, 0.05, 0.05, 1.0}, {0.0, 0.0, 0.0, 1.0}}}; 46 | BStyles::Border menuBorder = {{BStyles::grey, 1.0}, 0.0, 0.0, 0.0}; 47 | BStyles::Border labelborder = {BStyles::noLine, 4.0, 0.0, 0.0}; 48 | BStyles::Fill menuBg = BStyles::Fill (BStyles::Color (0.05, 0.02, 0.01, 1.0)); 49 | BStyles::Font ctLabelFont = BStyles::Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 12.0, 50 | BStyles::Font::TEXT_ALIGN_CENTER, BStyles::Font::TEXT_VALIGN_MIDDLE); 51 | BStyles::Font lfLabelFont = BStyles::Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 12.0, 52 | BStyles::Font::TEXT_ALIGN_LEFT, BStyles::Font::TEXT_VALIGN_MIDDLE); 53 | 54 | BStyles::Style style = 55 | { 56 | {BUtilities::Urid::urid (BLOW_URI "/dial"), BUtilities::makeAny({ 57 | {BUtilities::Urid::urid (STYLEPROPERTY_FGCOLORS_URI), BUtilities::makeAny(fgColors)}, 58 | {BUtilities::Urid::urid (STYLEPROPERTY_BGCOLORS_URI), BUtilities::makeAny(bgColors)}, 59 | {BUtilities::Urid::urid (BLOW_URI "/dial/label"), BUtilities::makeAny({ 60 | {BUtilities::Urid::urid (STYLEPROPERTY_FONT_URI), BUtilities::makeAny(ctLabelFont)}, 61 | {BUtilities::Urid::urid (STYLEPROPERTY_TXCOLORS_URI), BUtilities::makeAny(txColors)} 62 | })} 63 | })}, 64 | 65 | {BUtilities::Urid::urid (BLOW_URI "/piano"), BUtilities::makeAny({ 66 | {BUtilities::Urid::urid (STYLEPROPERTY_FGCOLORS_URI), BUtilities::makeAny(fgColors)} 67 | })} 68 | }; 69 | }; 70 | 71 | BLow_GUI::BLow_GUI (const char *bundle_path, const LV2_Feature *const *features, PuglNativeView parentWindow) : 72 | BWidgets::Window (600, 320, parentWindow, URID_UNKNOWN_URID, "BLow", true, PUGL_MODULE, 0), 73 | write_function (NULL), 74 | controller (NULL), 75 | pluginPath (bundle_path ? std::string (bundle_path) + ((strlen (bundle_path) > 0) && (bundle_path[strlen (bundle_path) - 1] != '/') ? "/" : "") : std::string ("")), 76 | sampleMenu (100, 90, 140, 20, 0, 20, 140, 180, {"Unfa", "Kuchtaa", "Junkfood2121", "KataVlogsYT", "Peridactyloptrix", "Dleigh", "YYZJJ", "Flash_Shumway", "Shaundoogan", "Breviceps"}, 1, BUtilities::Urid::urid (BLOW_URI "/menu")), 77 | gainDial (110, 140, 60, 72, 0.0, -70.0, 30.0, 0.0, 78 | BWidgets::ValueTransferable::noTransfer, BWidgets::ValueTransferable::noTransfer, 79 | [] (const double& x) {return BUtilities::to_string (x, "%1.1f") + " db";}, BWidgets::ValueDial::stringToValue, 80 | BUtilities::Urid::urid (BLOW_URI "/dial")), 81 | tuneStDial (350, 140, 60, 72, 0.0, -12.0, 12.0, 1.0, 82 | BWidgets::ValueTransferable::noTransfer, BWidgets::ValueTransferable::noTransfer, 83 | [] (const double& x) {return BUtilities::to_string (x, "%1.0f");}, BWidgets::ValueDial::stringToValue, 84 | BUtilities::Urid::urid (BLOW_URI "/dial")), 85 | tuneCtDial (430, 140, 60, 72, 0.0, -1.0, 1.0, 0.0, 86 | BWidgets::ValueTransferable::noTransfer, BWidgets::ValueTransferable::noTransfer, 87 | [] (const double& x) {return BUtilities::to_string (x * 100.0, "%1.0f");}, [] (const std::string& s) {return std::stod (s) / 100.0;}, 88 | BUtilities::Urid::urid (BLOW_URI "/dial")), 89 | pianoRoll (20, 280, 520, 40, 0, 127, std::vector{}, BUtilities::Urid::urid (BLOW_URI "/piano")), 90 | velocityDial(550, 280, 30, 30, 64, 0, 127, 1, 91 | BWidgets::ValueTransferable::noTransfer, BWidgets::ValueTransferable::noTransfer, 92 | BUtilities::Urid::urid (BLOW_URI "/dial")) 93 | 94 | { 95 | // Link controllerWidgets 96 | controllerWidgets[BLOW_SAMPLE] = (BWidgets::Valueable*) &sampleMenu; 97 | controllerWidgets[BLOW_GAIN] = (BWidgets::Valueable*) &gainDial; 98 | controllerWidgets[BLOW_TUNE] = (BWidgets::Valueable*) &tuneStDial; 99 | controllerWidgets[BLOW_TUNE_CT] = (BWidgets::Valueable*) &tuneCtDial; 100 | 101 | // Set callbacks 102 | for (BWidgets::Valueable* c : controllerWidgets) c->setCallbackFunction (BEvents::Event::VALUE_CHANGED_EVENT, valueChangedCallback); 103 | pianoRoll.setCallbackFunction (BEvents::Event::VALUE_CHANGED_EVENT, pianoCallback); 104 | 105 | // Init params 106 | setStyle (style); 107 | setBackground (pluginPath + BG_FILE); 108 | gainDial.setClickable (false); 109 | tuneStDial.setClickable (false); 110 | tuneCtDial.setClickable (false); 111 | velocityDial.setClickable (false); 112 | velocities.fill (0); 113 | pianoRoll.activate(); 114 | 115 | // Add widgets 116 | for (BWidgets::Valueable* c : controllerWidgets) 117 | { 118 | if (dynamic_cast (c)) add (dynamic_cast (c)); 119 | } 120 | add (&pianoRoll); 121 | add (&velocityDial); 122 | 123 | //Scan host features for URID map 124 | LV2_URID_Map* map = NULL; 125 | for (int i = 0; features[i]; ++i) 126 | { 127 | if (strcmp(features[i]->URI, LV2_URID__map) == 0) 128 | { 129 | map = (LV2_URID_Map*) features[i]->data; 130 | } 131 | } 132 | if (!map) throw std::invalid_argument ("Host does not support urid:map"); 133 | 134 | //Map URIS 135 | getURIs (map, &uris); 136 | 137 | // Initialize forge 138 | lv2_atom_forge_init (&forge, map); 139 | 140 | } 141 | 142 | void BLow_GUI::portEvent (uint32_t port_index, uint32_t buffer_size, uint32_t format, const void* buffer) 143 | { 144 | if (port_index == BLOW_MIDI_IN) 145 | { 146 | fprintf (stderr, "MIDI_IN:\n"); 147 | } 148 | 149 | if ((port_index >= BLOW_CONTROLLERS) && (port_index < BLOW_NR_CONTROLLERS) && (format == 0)) 150 | { 151 | float* pval = (float*) buffer; 152 | if (port_index == BLOW_CONTROLLERS + BLOW_SAMPLE) sampleMenu.setValue (*pval + 1); 153 | else 154 | { 155 | BWidgets::ValueableTyped* v = dynamic_cast*> (controllerWidgets[port_index - BLOW_CONTROLLERS]); 156 | if (v) v->setValue (*pval); 157 | } 158 | } 159 | } 160 | 161 | void BLow_GUI::onConfigureRequest (BEvents::Event* event) 162 | { 163 | Window::onConfigureRequest (event); 164 | 165 | BEvents::ExposeEvent* ee = dynamic_cast(event); 166 | if (!ee) return; 167 | double sz = (ee->getArea().getWidth() / 600.0 > ee->getArea().getHeight() / 320.0 ? ee->getArea().getHeight() / 320.0 : ee->getArea().getWidth() / 600.0); 168 | setZoom (sz); 169 | } 170 | 171 | void BLow_GUI::valueChangedCallback(BEvents::Event* event) 172 | { 173 | if (!event) return; 174 | BWidgets::Widget* widget = event->getWidget (); 175 | if (!widget) return; 176 | BWidgets::Valueable* valueable = dynamic_cast (widget); 177 | if (!valueable) return; 178 | BLow_GUI* ui = (BLow_GUI*) widget->getMainWindow(); 179 | if (!ui) return; 180 | 181 | // Identify controller 182 | for (int i = 0; i < BLOW_NR_CONTROLLERS; ++i) 183 | { 184 | if (valueable == ui->controllerWidgets[i]) 185 | { 186 | // Sample ComboBox 187 | if (i == BLOW_SAMPLE) 188 | { 189 | BWidgets::ValueableTyped* vt = dynamic_cast*> (valueable); 190 | if (vt) 191 | { 192 | float value = std::min (static_cast(vt->getValue() - 1), 9.0f); 193 | ui->write_function(ui->controller, BLOW_CONTROLLERS + i, sizeof(float), 0, &value); 194 | } 195 | } 196 | 197 | // Dials 198 | else 199 | { 200 | BWidgets::ValueableTyped* vt = dynamic_cast*> (valueable); 201 | if (vt) 202 | { 203 | float value = vt->getValue(); 204 | ui->write_function(ui->controller, BLOW_CONTROLLERS + i, sizeof(float), 0, &value); 205 | } 206 | } 207 | 208 | break; 209 | } 210 | } 211 | } 212 | 213 | void BLow_GUI::pianoCallback (BEvents::Event* event) 214 | { 215 | if (!event) return; 216 | BWidgets::HPianoRoll* widget = dynamic_cast (event->getWidget ()); 217 | if (!widget) return; 218 | BLow_GUI* ui = (BLow_GUI*) widget->getMainWindow(); 219 | if (!ui) return; 220 | 221 | for (uint8_t i = 0; i < 128; ++i) 222 | { 223 | const uint8_t vel = widget->getKey(i); 224 | if (vel != ui->velocities[i]) 225 | { 226 | ui->velocities[i] = vel; 227 | uint8_t obj_buf[64]; 228 | lv2_atom_forge_set_buffer(&ui->forge, obj_buf, sizeof(obj_buf)); 229 | LV2_URID urid = (vel != 0 ? ui->uris.blow_noteOn : ui->uris.blow_noteOff); 230 | LV2_Atom_Forge_Frame frame; 231 | LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object(&ui->forge, &frame, 0, ui->uris.blow_keyboardEvent); 232 | lv2_atom_forge_key (&ui->forge, urid); 233 | lv2_atom_forge_int (&ui->forge, i); 234 | lv2_atom_forge_key (&ui->forge, ui->uris.blow_velocity); 235 | lv2_atom_forge_int (&ui->forge, vel * ui->velocityDial.getValue() / 64); 236 | lv2_atom_forge_pop (&ui->forge, &frame); 237 | ui->write_function (ui->controller, BLOW_MIDI_IN, lv2_atom_total_size (msg), ui->uris.atom_eventTransfer, msg); 238 | } 239 | } 240 | } 241 | 242 | static LV2UI_Handle instantiate (const LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, 243 | LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, 244 | const LV2_Feature *const *features) 245 | { 246 | PuglNativeView parentWindow = 0; 247 | LV2UI_Resize* resize = NULL; 248 | 249 | if (strcmp(plugin_uri, BLOW_URI) != 0) 250 | { 251 | std::cerr << "BLow_GUI: This GUI does not support plugin with URI " << plugin_uri << std::endl; 252 | return NULL; 253 | } 254 | 255 | for (int i = 0; features[i]; ++i) 256 | { 257 | if (!strcmp(features[i]->URI, LV2_UI__parent)) parentWindow = (PuglNativeView) features[i]->data; 258 | else if (!strcmp(features[i]->URI, LV2_UI__resize)) resize = (LV2UI_Resize*)features[i]->data; 259 | } 260 | if (parentWindow == 0) std::cerr << "BLow_GUI: No parent window.\n"; 261 | 262 | BLow_GUI* ui = new BLow_GUI (bundle_path, features, parentWindow); 263 | 264 | if (ui) 265 | { 266 | ui->controller = controller; 267 | ui->write_function = write_function; 268 | if (resize) resize->ui_resize(resize->handle, 600, 320 ); 269 | 270 | PuglNativeView nativeWindow = puglGetNativeWindow (ui->getPuglView ()); 271 | *widget = (LV2UI_Widget) nativeWindow; 272 | } 273 | else std::cerr << "BLow_GUI: Couldn't instantiate.\n"; 274 | return (LV2UI_Handle) ui; 275 | } 276 | 277 | static void cleanup(LV2UI_Handle ui) 278 | { 279 | BLow_GUI* pluginGui = (BLow_GUI*) ui; 280 | if (pluginGui) delete pluginGui; 281 | } 282 | 283 | static void portEvent(LV2UI_Handle ui, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void* buffer) 284 | { 285 | BLow_GUI* pluginGui = (BLow_GUI*) ui; 286 | if (pluginGui) pluginGui->portEvent(port_index, buffer_size, format, buffer); 287 | } 288 | 289 | static int callIdle(LV2UI_Handle ui) 290 | { 291 | BLow_GUI* pluginGui = (BLow_GUI*) ui; 292 | if (pluginGui) pluginGui->handleEvents (); 293 | return 0; 294 | } 295 | 296 | static int callResize (LV2UI_Handle ui, int width, int height) 297 | { 298 | BLow_GUI* self = (BLow_GUI*) ui; 299 | if (!self) return 0; 300 | BEvents::ExposeEvent* ev = new BEvents::ExposeEvent (self, self, BEvents::Event::CONFIGURE_REQUEST_EVENT, self->getPosition().x, self->getPosition().y, width, height); 301 | self->addEventToQueue (ev); 302 | return 0; 303 | } 304 | 305 | static const LV2UI_Idle_Interface idle = {callIdle}; 306 | static const LV2UI_Resize resize = {nullptr, callResize} ; 307 | 308 | static const void* extensionData(const char* uri) 309 | { 310 | if (!strcmp(uri, LV2_UI__idleInterface)) return &idle; 311 | else if(!strcmp(uri, LV2_UI__resize)) return &resize; 312 | else return NULL; 313 | } 314 | 315 | 316 | static const LV2UI_Descriptor guiDescriptor = 317 | { 318 | BLOW_GUI_URI, 319 | instantiate, 320 | cleanup, 321 | portEvent, 322 | extensionData 323 | }; 324 | 325 | // LV2 Symbol Export 326 | LV2_SYMBOL_EXPORT const LV2UI_Descriptor *lv2ui_descriptor(uint32_t index) 327 | { 328 | switch (index) 329 | { 330 | case 0: return &guiDescriptor; 331 | default:return NULL; 332 | } 333 | } 334 | -------------------------------------------------------------------------------- /src/Definitions.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DEFINITIONS_HPP_ 2 | #define DEFINITIONS_HPP_ 3 | 4 | #define BLOW_URI "https://www.jahnichen.de/plugins/lv2/BLow" 5 | #define BLOW_GUI_URI "https://www.jahnichen.de/plugins/lv2/BLow#GUI" 6 | 7 | #endif /* DEFINITIONS_HPP_ */ 8 | -------------------------------------------------------------------------------- /src/Ports.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PORTS_HPP_ 2 | #define PORTS_HPP_ 3 | 4 | enum PortIndex { 5 | BLOW_MIDI_IN = 0, 6 | BLOW_AUDIO_OUT = 1, 7 | BLOW_CONTROLLERS = 2, 8 | BLOW_SAMPLE = 0, 9 | BLOW_GAIN = 1, 10 | BLOW_TUNE = 2, 11 | BLOW_TUNE_CT = 3, 12 | BLOW_NR_CONTROLLERS = 4, 13 | BLOW_N_PORTS = BLOW_CONTROLLERS + BLOW_NR_CONTROLLERS 14 | }; 15 | 16 | #endif /* PORTS_HPP_ */ 17 | -------------------------------------------------------------------------------- /src/StaticArrayList.hpp: -------------------------------------------------------------------------------- 1 | /* StaticArrayList 2 | * ArrayList without dynamic memory allocation 3 | * 4 | * Copyright (C) 2018 - 2020 by Sven Jähnichen 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software Foundation, 18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | */ 20 | 21 | #ifndef STATICARRAYLIST_HPP_ 22 | #define STATICARRAYLIST_HPP_ 23 | 24 | #include 25 | #include 26 | // #include 27 | 28 | template struct StaticArrayList 29 | { 30 | T data[sz]; 31 | T* iterator[sz + 1]; // +1 for end () 32 | T** reverse_iterator[sz]; 33 | std::size_t size; 34 | 35 | StaticArrayList () : data {}, iterator {nullptr}, reverse_iterator {nullptr}, size (0) {} 36 | 37 | /*StaticArrayList (T dataarray[sz]) : data (dataarray), iterator ({}), reverse_iterator ({}), size (sz) 38 | { 39 | for (size_t i = 0; i < size; ++i) 40 | { 41 | iterator[i] = &data[i]; 42 | reverse_iterator[i] = &iterator[i]; 43 | } 44 | }*/ 45 | 46 | StaticArrayList (const StaticArrayList& that) : data {}, iterator {nullptr}, reverse_iterator {nullptr}, size (that.size) 47 | { 48 | for (size_t i = 0; i < size; ++i) 49 | { 50 | iterator[i] = &data[i]; 51 | reverse_iterator[i] = &iterator[i]; 52 | data[i] = *that.iterator[i]; 53 | } 54 | } 55 | 56 | StaticArrayList& operator= (const StaticArrayList& that) 57 | { 58 | clear(); 59 | size = that.size; 60 | for (size_t i = 0; i < that.size; ++i) 61 | { 62 | iterator[i] = &data[i]; 63 | reverse_iterator[i] = &iterator[i]; 64 | data[i] = *that.iterator[i]; 65 | } 66 | 67 | return *this; 68 | } 69 | 70 | void clear () 71 | { 72 | size = 0; 73 | memset (iterator, 0, (sz + 1) * sizeof (T*)); 74 | memset (reverse_iterator, 0, sz * sizeof (T*)); 75 | } 76 | 77 | T** begin () {return &iterator [0];} 78 | 79 | T** end () {return &iterator[size];} 80 | 81 | bool empty () const {return (size == 0);} 82 | 83 | T& operator[] (const size_t n) {return *iterator[n];} 84 | 85 | const T& operator[] (const size_t n) const {return *iterator[n];} 86 | 87 | T& at (const size_t n) {return ((n >= 0) && (n < size) ? *iterator[n] : data[0]);} 88 | 89 | const T& at (const size_t n) const {return ((n >= 0) && (n < size) ? *iterator[n] : data[0]);} 90 | 91 | T& front () {return *iterator[0];} 92 | 93 | const T& front () const {return *iterator[0];} 94 | 95 | T& back () {return *iterator[size - 1];} 96 | 97 | const T& back () const {return *iterator[size - 1];} 98 | 99 | void new_data_segment (T** iterator_ptr) 100 | { 101 | T* new_ptr = &data[0]; 102 | if (!empty ()) 103 | { 104 | new_ptr = iterator[sz - 1]; // Default: last segment 105 | for (size_t i = 0; i < sz; ++i) // But look for the first free segment 106 | { 107 | if (!reverse_iterator[i]) 108 | { 109 | new_ptr = &data[i]; 110 | //fprintf (stderr, "<%li> ", i); 111 | break; 112 | } 113 | } 114 | 115 | } 116 | 117 | //fprintf (stderr, "%li %li %li\n", size, long (new_ptr), long (iterator[sz - 1])); 118 | *iterator_ptr = new_ptr; 119 | reverse_iterator[new_ptr - &data[0]] = iterator_ptr; 120 | } 121 | 122 | void push_back (const T& content) 123 | { 124 | T** end_ptr = (size < sz ? end () : end () - 1); 125 | new_data_segment (end_ptr); 126 | **end_ptr = content; 127 | if (size < sz) ++size; 128 | } 129 | 130 | void pop_back () 131 | { 132 | if (!empty ()) 133 | { 134 | T** last = end () - 1; 135 | reverse_iterator[*last - &data[0]] = nullptr; 136 | *last = nullptr; 137 | --size; 138 | } 139 | } 140 | 141 | T** erase (T** iterator_ptr) 142 | { 143 | T** end_iit = end (); 144 | 145 | if (!empty ()) 146 | { 147 | if (iterator_ptr == end_iit - 1) 148 | { 149 | pop_back (); 150 | return end (); // Return new(!) end 151 | } 152 | 153 | if ((iterator_ptr >= begin ()) && (iterator_ptr < end_iit)) 154 | { 155 | reverse_iterator[*iterator_ptr - &data[0]] = nullptr; 156 | for (T** iit = iterator_ptr; iit < end_iit - 1; ++iit) 157 | { 158 | reverse_iterator[*(iit + 1) - &data[0]] = iit; 159 | *iit = *(iit + 1); 160 | } 161 | *(end_iit - 1) = nullptr; // New end: nullptr 162 | --size; 163 | return iterator_ptr; 164 | } 165 | } 166 | 167 | return end_iit; 168 | } 169 | 170 | T** insert (T** iterator_ptr, const T& content) 171 | { 172 | T** end_iit = (size < sz ? end () : end () - 1); 173 | 174 | if (iterator_ptr >= end_iit) 175 | { 176 | push_back (content); 177 | return end () - 1; 178 | } 179 | 180 | if ((iterator_ptr >= begin ()) && (iterator_ptr < end_iit)) 181 | { 182 | if (size == sz) reverse_iterator[*end_iit - &data[0]] = nullptr; 183 | 184 | for (T** iit = end_iit - 1; iit >= iterator_ptr; --iit) 185 | { 186 | reverse_iterator[*iit - &data[0]] = iit + 1; 187 | *(iit + 1) = *iit; 188 | } 189 | 190 | new_data_segment (iterator_ptr); 191 | **iterator_ptr = content; 192 | if (size < sz) ++size; 193 | return iterator_ptr; 194 | } 195 | 196 | else return end (); 197 | } 198 | 199 | void push_front (const T& content) {insert (begin (), content);} 200 | 201 | void pop_front () {erase (begin ());} 202 | 203 | }; 204 | 205 | /* 206 | template std::ostream &operator<<(std::ostream &output, StaticArrayList& list) 207 | { 208 | output << "{"; 209 | for (T** it = list.begin (); it != list.end (); ++it) 210 | { 211 | if (it != list.begin ()) output << ", "; 212 | output << **it; 213 | } 214 | output << "}"; 215 | return output; 216 | } 217 | */ 218 | 219 | #endif /* STATICARRAYLIST_HPP_ */ 220 | -------------------------------------------------------------------------------- /src/Urids.hpp: -------------------------------------------------------------------------------- 1 | /* B.Low 2 | * Dynamic distorted bandpass filter plugin 3 | * 4 | * Copyright (C) 2021 by Sven Jähnichen 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 3, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software Foundation, 18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 | */ 20 | 21 | #ifndef URIDS_HPP_ 22 | #define URIDS_HPP_ 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "Definitions.hpp" 29 | 30 | struct BLowURIs 31 | { 32 | LV2_URID atom_Int; 33 | LV2_URID atom_Object; 34 | LV2_URID atom_Blank; 35 | LV2_URID atom_eventTransfer; 36 | LV2_URID midi_Event; 37 | LV2_URID blow_keyboardEvent; 38 | LV2_URID blow_noteOn; 39 | LV2_URID blow_noteOff; 40 | LV2_URID blow_velocity; 41 | }; 42 | 43 | inline void getURIs (LV2_URID_Map* m, BLowURIs* uris) 44 | { 45 | uris->atom_Int = m->map(m->handle, LV2_ATOM__Int); 46 | uris->atom_Object = m->map(m->handle, LV2_ATOM__Object); 47 | uris->atom_Blank = m->map(m->handle, LV2_ATOM__Blank); 48 | uris->atom_eventTransfer = m->map(m->handle, LV2_ATOM__eventTransfer); 49 | uris->midi_Event = m->map(m->handle, LV2_MIDI__MidiEvent); 50 | uris->blow_keyboardEvent = m->map(m->handle, BLOW_URI "#keyboardEvent"); 51 | uris->blow_noteOn = m->map(m->handle, BLOW_URI "#noteOn"); 52 | uris->blow_noteOff = m->map(m->handle, BLOW_URI "#noteOff"); 53 | uris->blow_velocity = m->map(m->handle, BLOW_URI "#velocity"); 54 | } 55 | 56 | #endif /* URIDS_HPP_ */ 57 | --------------------------------------------------------------------------------